Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-24 07:10:10 +01:00
Fixed sprinting while breaking a painting edge case. Fixes BUKKIT-740
Dieser Commit ist enthalten in:
Ursprung
9b10970f6b
Commit
1c28c946fa
src/main/java/net/minecraft/server
@ -286,11 +286,14 @@ public class EntityPainting extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void b_(double d0, double d1, double d2) {
|
public void b_(double d0, double d1, double d2) {
|
||||||
if (!this.world.isStatic && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
|
// CraftBukkit start - not needed for paintings
|
||||||
|
/* if (!this.world.isStatic && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
|
||||||
if (dead) return; // CraftBukkit
|
if (dead) return; // CraftBukkit
|
||||||
|
|
||||||
this.die();
|
this.die();
|
||||||
this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
|
this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
|
||||||
|
}*/
|
||||||
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -244,6 +244,13 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (packet10flying.hasPos && packet10flying.y == -999.0D && packet10flying.stance == -999.0D) {
|
if (packet10flying.hasPos && packet10flying.y == -999.0D && packet10flying.stance == -999.0D) {
|
||||||
|
// CraftBukkit start
|
||||||
|
if (packet10flying.x > 1 || packet10flying.z > 1) {
|
||||||
|
System.err.println(player.getName() + " was caught trying to crash the server with an invalid position.");
|
||||||
|
player.kickPlayer("Nope!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
d5 = packet10flying.x;
|
d5 = packet10flying.x;
|
||||||
d4 = packet10flying.z;
|
d4 = packet10flying.z;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren