SPIGOT-6289: Fix setting entity equipment

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-12-23 07:53:45 +11:00
parent 9f19f0b9c4
commit 59490dfe12
2 changed files with 37 additions and 33 deletions

View File

@@ -520,16 +520,7 @@
this.world.getMethodProfiler().exit();
}
@@ -1690,6 +2000,8 @@
public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack) {}
+ public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack, boolean silent) {} // CraftBukkit
+
public boolean isBurning() {
boolean flag = this.world != null && this.world.isClientSide;
@@ -1753,6 +2065,13 @@
@@ -1753,6 +2063,13 @@
}
public void setSwimming(boolean flag) {
@@ -543,7 +534,7 @@
this.setFlag(4, flag);
}
@@ -1785,8 +2104,12 @@
@@ -1785,8 +2102,12 @@
return this.getScoreboardTeam() != null ? this.getScoreboardTeam().isAlly(scoreboardteambase) : false;
}
@@ -557,7 +548,7 @@
}
public boolean getFlag(int i) {
@@ -1813,16 +2136,56 @@
@@ -1813,16 +2134,56 @@
}
public void setAirTicks(int i) {
@@ -617,7 +608,7 @@
}
public void k(boolean flag) {
@@ -1972,15 +2335,32 @@
@@ -1972,15 +2333,32 @@
@Nullable
public Entity b(WorldServer worldserver) {
@@ -652,7 +643,7 @@
this.world.getMethodProfiler().exitEnter("reloading");
Entity entity = this.getEntityType().a((World) worldserver);
@@ -1989,9 +2369,17 @@
@@ -1989,9 +2367,17 @@
entity.setPositionRotation(shapedetectorshape.position.x, shapedetectorshape.position.y, shapedetectorshape.position.z, shapedetectorshape.yaw, entity.pitch);
entity.setMot(shapedetectorshape.velocity);
worldserver.addEntityTeleport(entity);
@@ -672,7 +663,7 @@
}
this.bN();
@@ -2012,13 +2400,18 @@
@@ -2012,13 +2398,18 @@
@Nullable
protected ShapeDetectorShape a(WorldServer worldserver) {
@@ -695,7 +686,7 @@
return null;
} else {
WorldBorder worldborder = worldserver.getWorldBorder();
@@ -2028,8 +2421,16 @@
@@ -2028,8 +2419,16 @@
double d3 = Math.min(2.9999872E7D, worldborder.h() - 16.0D);
double d4 = DimensionManager.a(this.world.getDimensionManager(), worldserver.getDimensionManager());
BlockPosition blockposition = new BlockPosition(MathHelper.a(this.locX() * d4, d0, d2), this.locY(), MathHelper.a(this.locZ() * d4, d1, d3));
@@ -713,7 +704,7 @@
IBlockData iblockdata = this.world.getType(this.ac);
EnumDirection.EnumAxis enumdirection_enumaxis;
Vec3D vec3d;
@@ -2046,8 +2447,8 @@
@@ -2046,8 +2445,8 @@
vec3d = new Vec3D(0.5D, 0.0D, 0.0D);
}
@@ -724,7 +715,7 @@
}
} else {
BlockPosition blockposition1;
@@ -2057,8 +2458,15 @@
@@ -2057,8 +2456,15 @@
} else {
blockposition1 = worldserver.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver.getSpawn());
}
@@ -741,7 +732,7 @@
}
}
@@ -2066,8 +2474,23 @@
@@ -2066,8 +2472,23 @@
return BlockPortalShape.a(blockutil_rectangle, enumdirection_enumaxis, this.getPositionVector(), this.a(this.getPose()));
}
@@ -767,7 +758,7 @@
}
public boolean canPortal() {
@@ -2253,7 +2676,26 @@
@@ -2253,7 +2674,26 @@
}
public void a(AxisAlignedBB axisalignedbb) {