mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 14:33:56 +01:00
Boats can only die once.
In certain scenarios a boat can be killed multiple ways in a single tick. Due to improper guards this can cause the death code to run multiple times creating item drops. To correct this we insert the appropriate death check.
This commit is contained in:
parent
7939572c33
commit
70a778f475
@ -294,7 +294,7 @@ public class EntityBoat extends Entity {
|
|||||||
|
|
||||||
this.move(this.motX, this.motY, this.motZ);
|
this.move(this.motX, this.motY, this.motZ);
|
||||||
if (this.positionChanged && d3 > 0.2D) {
|
if (this.positionChanged && d3 > 0.2D) {
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isStatic && !this.dead) { // CraftBukkit - That which is dead cannot die
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||||
VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, null);
|
VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, null);
|
||||||
|
Loading…
Reference in New Issue
Block a user