readd removal cause for thrown eggs

This commit is contained in:
Lulu13022002
2024-12-15 23:07:15 +01:00
parent f5cd5989a4
commit ec57b99bf5
22 changed files with 96 additions and 82 deletions

View File

@@ -128,7 +128,7 @@
}
compound.putBoolean("CancelDrop", this.cancelDrop);
+ if (!autoExpire) {compound.putBoolean("Paper.AutoExpire", false);} // Paper - Expand FallingBlock API
+ if (!this.autoExpire) compound.putBoolean("Paper.AutoExpire", false); // Paper - Expand FallingBlock API
}
@Override

View File

@@ -51,7 +51,7 @@
f = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F;
}
@@ -184,11 +_,42 @@
@@ -184,11 +_,40 @@
}
}
@@ -75,14 +75,12 @@
+ // Spigot start - copied from above
+ @Override
+ public void inactiveTick() {
+ // Paper start - remove anti tick skipping measures / wall time - copied from above
+ if (this.pickupDelay > 0 && this.pickupDelay != 32767) {
+ --this.pickupDelay;
+ }
+ if (this.age != -32768) {
+ ++this.age;
+ }
+ // Paper end - remove anti tick skipping measures / wall time - copied from above
+
+ if (!this.level().isClientSide && this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate
+ // CraftBukkit start - fire ItemDespawnEvent
@@ -202,7 +200,7 @@
if (this.getItem().isEmpty()) {
- this.discard();
+ this.discard(null); // CraftBukkit - add Bukkit remove cause
+ this.discard(null); // CraftBukkit - add Bukkit remove cause
}
}