More param name fixes

This commit is contained in:
Nassim Jahnke
2024-12-20 12:45:19 +01:00
parent 42a2ccff55
commit f3c1eb3dc0
19 changed files with 68 additions and 86 deletions

View File

@@ -79,20 +79,19 @@
@Override
public void remove(Entity.RemovalReason reason) {
- if (!this.level().isClientSide && reason.shouldDestroy() && this.isLeashed()) {
+ // CraftBukkit start - add Bukkit remove cause
+ this.remove(reason, null);
+ }
+
+ @Override
+ public void remove(Entity.RemovalReason entity_removalreason, org.bukkit.event.entity.EntityRemoveEvent.Cause cause) {
+ public void remove(Entity.RemovalReason reason, org.bukkit.event.entity.EntityRemoveEvent.Cause eventCause) {
+ // CraftBukkit end
+ if (!this.level().isClientSide && entity_removalreason.shouldDestroy() && this.isLeashed()) {
if (!this.level().isClientSide && reason.shouldDestroy() && this.isLeashed()) {
this.dropLeash();
}
- super.remove(reason);
+ super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
+ super.remove(reason, eventCause); // CraftBukkit - add Bukkit remove cause
}
@Override

View File

@@ -19,7 +19,7 @@
public double getSlowdownFactor() {
- return this.minecart.isVehicle() ? 0.997 : 0.975;
+ if (this.minecart.frictionState == net.kyori.adventure.util.TriState.FALSE) return 1; // Paper
+ return this.minecart.isVehicle() || !this.minecart.slowWhenEmpty ? 0.997D : 0.975D; // CraftBukkit - add !this.slowWhenEmpty
+ return this.minecart.isVehicle() || !this.minecart.slowWhenEmpty ? 0.997 : 0.975; // CraftBukkit - add !this.slowWhenEmpty
}
@Override

View File

@@ -53,6 +53,6 @@
public double getSlowdownFactor() {
- return this.minecart.isVehicle() ? 0.997 : 0.96;
+ if (this.minecart.frictionState == net.kyori.adventure.util.TriState.FALSE) return 1; // Paper
+ return this.minecart.isVehicle() || !this.minecart.slowWhenEmpty ? 0.997D : 0.96D; // CraftBukkit - add !this.slowWhenEmpty
+ return this.minecart.isVehicle() || !this.minecart.slowWhenEmpty ? 0.997 : 0.96; // CraftBukkit - add !this.slowWhenEmpty
}
}