summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorAikar <aikar@aikar.co>2018-09-26 17:19:16 +1000
committermd_5 <git@md-5.net>2018-09-26 17:19:16 +1000
commit40aed54d112176ab49f1c3c65877e23bcb49f463 (patch)
treed9de9a077512a483651babafe03211b15f9dbd35 /nms-patches
parent020b495274c324208721de841671298060d93987 (diff)
downloadcraftbukkit-40aed54d112176ab49f1c3c65877e23bcb49f463.tar
craftbukkit-40aed54d112176ab49f1c3c65877e23bcb49f463.tar.gz
craftbukkit-40aed54d112176ab49f1c3c65877e23bcb49f463.tar.lz
craftbukkit-40aed54d112176ab49f1c3c65877e23bcb49f463.tar.xz
craftbukkit-40aed54d112176ab49f1c3c65877e23bcb49f463.zip
SPIGOT-4396: Improve vehicle movement
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/Entity.patch78
-rw-r--r--nms-patches/EntityLeash.patch10
-rw-r--r--nms-patches/EntityShulker.patch8
-rw-r--r--nms-patches/PlayerConnection.patch84
4 files changed, 115 insertions, 65 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch
index d9384b8a..fd248cfc 100644
--- a/nms-patches/Entity.patch
+++ b/nms-patches/Entity.patch
@@ -107,7 +107,15 @@
this.yaw = f % 360.0F;
this.pitch = f1 % 360.0F;
}
-@@ -234,6 +318,51 @@
+@@ -224,6 +308,7 @@
+ float f1 = this.length;
+
+ this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f));
++ if (valid) world.entityJoinedWorld(this, false); // CraftBukkit
+ }
+
+ public void tick() {
+@@ -234,6 +319,51 @@
this.W();
}
@@ -159,7 +167,7 @@
public void W() {
this.world.methodProfiler.a("entityBaseTick");
if (this.isPassenger() && this.getVehicle().dead) {
-@@ -250,6 +379,8 @@
+@@ -250,6 +380,8 @@
this.lastZ = this.locZ;
this.lastPitch = this.pitch;
this.lastYaw = this.yaw;
@@ -168,7 +176,7 @@
if (!this.world.isClientSide && this.world instanceof WorldServer) {
this.world.methodProfiler.a("portal");
if (this.an) {
-@@ -289,6 +420,7 @@
+@@ -289,6 +421,7 @@
this.E();
this.world.methodProfiler.e();
}
@@ -176,7 +184,7 @@
this.av();
this.r();
-@@ -339,7 +471,23 @@
+@@ -339,7 +472,23 @@
protected void burnFromLava() {
if (!this.fireProof) {
@@ -201,7 +209,7 @@
this.damageEntity(DamageSource.LAVA, 4.0F);
}
}
-@@ -505,7 +653,7 @@
+@@ -505,7 +654,7 @@
}
}
@@ -210,7 +218,7 @@
double d11;
if (this.Q > 0.0F && flag && (d7 != d0 || d9 != d2)) {
-@@ -592,7 +740,7 @@
+@@ -592,7 +741,7 @@
this.world.methodProfiler.a("rest");
this.recalcPosition();
this.positionChanged = d7 != d0 || d9 != d2;
@@ -219,7 +227,7 @@
this.onGround = this.C && d8 < 0.0D;
this.D = this.positionChanged || this.C;
int k = MathHelper.floor(this.locX);
-@@ -627,6 +775,28 @@
+@@ -627,6 +776,28 @@
block1.a((IBlockAccess) this.world, this);
}
@@ -248,7 +256,7 @@
if (this.playStepSound() && (!this.onGround || !this.isSneaking() || !(this instanceof EntityHuman)) && !this.isPassenger()) {
double d22 = this.locX - d4;
double d23 = this.locY - d5;
-@@ -678,7 +848,14 @@
+@@ -678,7 +849,14 @@
if (!flag1) {
++this.fireTicks;
if (this.fireTicks == 0) {
@@ -264,7 +272,15 @@
}
}
-@@ -876,7 +1053,7 @@
+@@ -706,6 +884,7 @@
+ this.locX = (axisalignedbb.a + axisalignedbb.d) / 2.0D;
+ this.locY = axisalignedbb.b;
+ this.locZ = (axisalignedbb.c + axisalignedbb.f) / 2.0D;
++ if (valid) world.entityJoinedWorld(this, false); // CraftBukkit
+ }
+
+ protected SoundEffect ad() {
+@@ -876,7 +1055,7 @@
return null;
}
@@ -273,7 +289,7 @@
if (!this.fireProof) {
this.damageEntity(DamageSource.FIRE, (float) i);
}
-@@ -1095,6 +1272,13 @@
+@@ -1095,6 +1274,13 @@
}
public void spawnIn(World world) {
@@ -287,7 +303,15 @@
this.world = world;
}
-@@ -1302,7 +1486,7 @@
+@@ -1120,6 +1306,7 @@
+ this.lastYaw -= 360.0F;
+ }
+
++ world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit
+ this.setPosition(this.locX, this.locY, this.locZ);
+ this.setYawPitch(f, f1);
+ }
+@@ -1302,7 +1489,7 @@
public boolean c(NBTTagCompound nbttagcompound) {
String s = this.getSaveID();
@@ -296,7 +320,7 @@
nbttagcompound.setString("id", s);
this.save(nbttagcompound);
return true;
-@@ -1319,6 +1503,18 @@
+@@ -1319,6 +1506,18 @@
try {
nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ}));
nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ}));
@@ -315,7 +339,7 @@
nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch}));
nbttagcompound.setFloat("FallDistance", this.fallDistance);
nbttagcompound.setShort("Fire", (short) this.fireTicks);
-@@ -1328,6 +1524,12 @@
+@@ -1328,6 +1527,12 @@
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
nbttagcompound.a("UUID", this.getUniqueID());
@@ -328,7 +352,7 @@
IChatBaseComponent ichatbasecomponent = this.getCustomName();
if (ichatbasecomponent != null) {
-@@ -1404,6 +1606,8 @@
+@@ -1404,6 +1609,8 @@
this.motX = nbttaglist1.k(0);
this.motY = nbttaglist1.k(1);
this.motZ = nbttaglist1.k(2);
@@ -337,7 +361,7 @@
if (Math.abs(this.motX) > 10.0D) {
this.motX = 0.0D;
}
-@@ -1415,6 +1619,7 @@
+@@ -1415,6 +1622,7 @@
if (Math.abs(this.motZ) > 10.0D) {
this.motZ = 0.0D;
}
@@ -345,7 +369,7 @@
this.locX = nbttaglist.k(0);
this.locY = nbttaglist.k(1);
-@@ -1471,6 +1676,56 @@
+@@ -1471,6 +1679,56 @@
this.setPosition(this.locX, this.locY, this.locZ);
}
@@ -402,7 +426,7 @@
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
-@@ -1544,9 +1799,22 @@
+@@ -1544,9 +1802,22 @@
if (itemstack.isEmpty()) {
return null;
} else {
@@ -425,7 +449,7 @@
this.world.addEntity(entityitem);
return entityitem;
}
-@@ -1658,7 +1926,7 @@
+@@ -1658,7 +1929,7 @@
}
this.vehicle = entity;
@@ -434,7 +458,7 @@
return true;
}
}
-@@ -1679,15 +1947,33 @@
+@@ -1679,15 +1950,33 @@
Entity entity = this.vehicle;
this.vehicle = null;
@@ -470,7 +494,7 @@
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bO() instanceof EntityHuman)) {
this.passengers.add(0, entity);
} else {
-@@ -1695,15 +1981,33 @@
+@@ -1695,15 +1984,33 @@
}
}
@@ -505,7 +529,7 @@
}
protected boolean q(Entity entity) {
-@@ -1800,6 +2104,13 @@
+@@ -1800,6 +2107,13 @@
}
public void setSwimming(boolean flag) {
@@ -519,7 +543,7 @@
this.setFlag(4, flag);
}
-@@ -1860,16 +2171,53 @@
+@@ -1860,16 +2174,53 @@
}
public void setAirTicks(int i) {
@@ -576,7 +600,7 @@
}
public void j(boolean flag) {
-@@ -2036,19 +2384,72 @@
+@@ -2036,19 +2387,72 @@
if (!this.world.isClientSide && !this.dead) {
this.world.methodProfiler.a("changeDimension");
MinecraftServer minecraftserver = this.bK();
@@ -652,7 +676,7 @@
BlockPosition blockposition;
if (dimensionmanager == DimensionManager.THE_END) {
-@@ -2077,12 +2478,18 @@
+@@ -2077,12 +2481,18 @@
blockposition = new BlockPosition(this);
}
@@ -672,7 +696,7 @@
if (dimensionmanager1 == DimensionManager.THE_END && dimensionmanager == DimensionManager.THE_END) {
BlockPosition blockposition1 = worldserver1.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver1.getSpawn());
-@@ -2090,6 +2497,7 @@
+@@ -2090,6 +2500,7 @@
} else {
entity.setPositionRotation(blockposition, entity.yaw, entity.pitch);
}
@@ -680,7 +704,7 @@
boolean flag = entity.attachedToPlayer;
-@@ -2097,13 +2505,21 @@
+@@ -2097,13 +2508,21 @@
worldserver1.addEntity(entity);
entity.attachedToPlayer = flag;
worldserver1.entityJoinedWorld(entity, false);
@@ -703,7 +727,7 @@
return entity;
} else {
return null;
-@@ -2243,7 +2659,26 @@
+@@ -2243,7 +2662,26 @@
}
public void a(AxisAlignedBB axisalignedbb) {
diff --git a/nms-patches/EntityLeash.patch b/nms-patches/EntityLeash.patch
index 78552678..75bc78be 100644
--- a/nms-patches/EntityLeash.patch
+++ b/nms-patches/EntityLeash.patch
@@ -8,7 +8,15 @@
import java.util.Iterator;
import java.util.List;
import javax.annotation.Nullable;
-@@ -67,22 +69,42 @@
+@@ -29,6 +31,7 @@
+ this.locX = (double) this.blockPosition.getX() + 0.5D;
+ this.locY = (double) this.blockPosition.getY() + 0.5D;
+ this.locZ = (double) this.blockPosition.getZ() + 0.5D;
++ if (valid) world.entityJoinedWorld(this, false); // CraftBukkit
+ }
+
+ public void setDirection(EnumDirection enumdirection) {}
+@@ -67,22 +70,42 @@
while (iterator.hasNext()) {
entityinsentient = (EntityInsentient) iterator.next();
if (entityinsentient.isLeashed() && entityinsentient.getLeashHolder() == entityhuman) {
diff --git a/nms-patches/EntityShulker.patch b/nms-patches/EntityShulker.patch
index 80e651f4..4ccadf23 100644
--- a/nms-patches/EntityShulker.patch
+++ b/nms-patches/EntityShulker.patch
@@ -31,3 +31,11 @@
break;
}
}
+@@ -372,6 +385,7 @@
+ this.locX = (double) blockposition.getX() + 0.5D;
+ this.locY = (double) blockposition.getY();
+ this.locZ = (double) blockposition.getZ() + 0.5D;
++ if (valid) world.entityJoinedWorld(this, false); // CraftBukkit
+ this.lastX = this.locX;
+ this.lastY = this.locY;
+ this.lastZ = this.locZ;
diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch
index a1e874c2..c878bb2c 100644
--- a/nms-patches/PlayerConnection.patch
+++ b/nms-patches/PlayerConnection.patch
@@ -212,7 +212,17 @@
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8));
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
return;
-@@ -230,6 +366,62 @@
+@@ -222,14 +358,72 @@
+ }
+
+ entity.setLocation(d3, d4, d5, f, f1);
++ player.setLocation(d3, d4, d5, f, f1); // CraftBukkit
+ boolean flag2 = worldserver.getCubes(entity, entity.getBoundingBox().shrink(0.0625D));
+
+ if (flag && (flag1 || !flag2)) {
+ entity.setLocation(d0, d1, d2, f, f1);
++ player.setLocation(d0, d1, d2, f, f1); // CraftBukkit
+ this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
return;
}
@@ -275,7 +285,7 @@
this.minecraftServer.getPlayerList().d(this.player);
this.player.checkMovement(this.player.locX - d0, this.player.locY - d1, this.player.locZ - d2);
this.D = d11 >= -0.03125D && !this.minecraftServer.getAllowFlight() && !worldserver.a(entity.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D));
-@@ -243,7 +435,7 @@
+@@ -243,7 +437,7 @@
public void a(PacketPlayInTeleportAccept packetplayinteleportaccept) {
PlayerConnectionUtils.ensureMainThread(packetplayinteleportaccept, this, this.player.getWorldServer());
@@ -284,7 +294,7 @@
this.player.setLocation(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch);
this.o = this.teleportPos.x;
this.p = this.teleportPos.y;
-@@ -253,6 +445,7 @@
+@@ -253,6 +447,7 @@
}
this.teleportPos = null;
@@ -292,7 +302,7 @@
}
}
-@@ -289,6 +482,12 @@
+@@ -289,6 +484,12 @@
public void a(PacketPlayInTabComplete packetplayintabcomplete) {
PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer());
@@ -305,7 +315,7 @@
StringReader stringreader = new StringReader(packetplayintabcomplete.c());
if (stringreader.canRead() && stringreader.peek() == 47) {
-@@ -298,7 +497,8 @@
+@@ -298,7 +499,8 @@
ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener());
this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
@@ -315,7 +325,7 @@
});
}
-@@ -492,6 +692,15 @@
+@@ -492,6 +694,15 @@
}
public void a(PacketPlayInBEdit packetplayinbedit) {
@@ -331,7 +341,7 @@
ItemStack itemstack = packetplayinbedit.b();
if (!itemstack.isEmpty()) {
-@@ -516,11 +725,13 @@
+@@ -516,11 +727,13 @@
}
itemstack2.a("pages", (NBTBase) nbttaglist);
@@ -347,7 +357,7 @@
}
}
-@@ -560,7 +771,7 @@
+@@ -560,7 +773,7 @@
} else {
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
@@ -356,7 +366,7 @@
if (this.e == 0) {
this.syncPosition();
}
-@@ -570,13 +781,21 @@
+@@ -570,13 +783,21 @@
this.A = this.e;
this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch);
}
@@ -379,7 +389,7 @@
double d0 = this.player.locX;
double d1 = this.player.locY;
double d2 = this.player.locZ;
-@@ -601,15 +820,33 @@
+@@ -601,15 +822,33 @@
++this.receivedMovePackets;
int i = this.receivedMovePackets - this.processedMovePackets;
@@ -415,7 +425,7 @@
PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getDisplayName().getString(), Double.valueOf(d7), Double.valueOf(d8), Double.valueOf(d9));
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
return;
-@@ -655,6 +892,69 @@
+@@ -655,6 +894,69 @@
}
}
@@ -485,7 +495,7 @@
this.B = d12 >= -0.03125D;
this.B &= !this.minecraftServer.getAllowFlight() && !this.player.abilities.canFly;
this.B &= !this.player.hasEffect(MobEffects.LEVITATION) && !this.player.dc() && !worldserver.a(this.player.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D));
-@@ -672,10 +972,76 @@
+@@ -672,10 +974,76 @@
}
public void a(double d0, double d1, double d2, float f, float f1) {
@@ -563,7 +573,7 @@
double d3 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.X) ? this.player.locX : 0.0D;
double d4 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Y) ? this.player.locY : 0.0D;
double d5 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Z) ? this.player.locZ : 0.0D;
-@@ -687,6 +1053,14 @@
+@@ -687,6 +1055,14 @@
this.teleportAwait = 0;
}
@@ -578,7 +588,7 @@
this.A = this.e;
this.player.setLocation(d0, d1, d2, f, f1);
this.player.playerConnection.sendPacket(new PacketPlayOutPosition(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.teleportAwait));
-@@ -694,6 +1068,7 @@
+@@ -694,6 +1070,7 @@
public void a(PacketPlayInBlockDig packetplayinblockdig) {
PlayerConnectionUtils.ensureMainThread(packetplayinblockdig, this, this.player.getWorldServer());
@@ -586,7 +596,7 @@
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
BlockPosition blockposition = packetplayinblockdig.b();
-@@ -703,14 +1078,46 @@
+@@ -703,14 +1080,46 @@
if (!this.player.isSpectator()) {
ItemStack itemstack = this.player.b(EnumHand.OFF_HAND);
@@ -635,7 +645,7 @@
this.player.a(false);
}
-@@ -744,7 +1151,15 @@
+@@ -744,7 +1153,15 @@
if (!this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
this.player.playerInteractManager.a(blockposition, packetplayinblockdig.c());
} else {
@@ -651,7 +661,7 @@
}
} else {
if (packetplayinblockdig.d() == PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK) {
-@@ -764,10 +1179,12 @@
+@@ -764,10 +1181,12 @@
default:
throw new IllegalArgumentException("Invalid player action");
}
@@ -664,7 +674,7 @@
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
EnumHand enumhand = packetplayinuseitem.d();
ItemStack itemstack = this.player.b(enumhand);
-@@ -780,6 +1197,13 @@
+@@ -780,6 +1199,13 @@
this.player.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent, ChatMessageType.GAME_INFO));
} else if (this.teleportPos == null && this.player.d((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && !this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
@@ -678,7 +688,7 @@
this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand, blockposition, enumdirection, packetplayinuseitem.e(), packetplayinuseitem.f(), packetplayinuseitem.g());
}
-@@ -789,13 +1213,52 @@
+@@ -789,13 +1215,52 @@
public void a(PacketPlayInBlockPlace packetplayinblockplace) {
PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.getWorldServer());
@@ -732,7 +742,7 @@
}
}
-@@ -815,13 +1278,18 @@
+@@ -815,13 +1280,18 @@
}
if (entity != null) {
@@ -753,7 +763,7 @@
public void a(PacketPlayInBoatMove packetplayinboatmove) {
PlayerConnectionUtils.ensureMainThread(packetplayinboatmove, this, this.player.getWorldServer());
-@@ -834,11 +1302,26 @@
+@@ -834,11 +1304,26 @@
}
public void a(IChatBaseComponent ichatbasecomponent) {
@@ -781,7 +791,7 @@
if (this.minecraftServer.H() && this.player.getDisplayName().getString().equals(this.minecraftServer.G())) {
PlayerConnection.LOGGER.info("Stopping singleplayer server as player logged out");
this.minecraftServer.safeShutdown();
-@@ -864,6 +1347,15 @@
+@@ -864,6 +1349,15 @@
}
}
@@ -797,7 +807,7 @@
try {
this.networkManager.sendPacket(packet, genericfuturelistener);
} catch (Throwable throwable) {
-@@ -879,17 +1371,37 @@
+@@ -879,17 +1373,37 @@
public void a(PacketPlayInHeldItemSlot packetplayinhelditemslot) {
PlayerConnectionUtils.ensureMainThread(packetplayinhelditemslot, this, this.player.getWorldServer());
@@ -837,7 +847,7 @@
this.sendPacket(new PacketPlayOutChat((new ChatMessage("chat.cannotSend", new Object[0])).a(EnumChatFormat.RED)));
} else {
this.player.resetIdleTimer();
-@@ -899,39 +1411,249 @@
+@@ -899,39 +1413,249 @@
for (int i = 0; i < s.length(); ++i) {
if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) {
@@ -1094,7 +1104,7 @@
this.player.resetIdleTimer();
IJumpable ijumpable;
-@@ -1003,6 +1725,7 @@
+@@ -1003,6 +1727,7 @@
public void a(PacketPlayInUseEntity packetplayinuseentity) {
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.getWorldServer());
@@ -1102,7 +1112,7 @@
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
Entity entity = packetplayinuseentity.a((World) worldserver);
-@@ -1018,20 +1741,73 @@
+@@ -1018,20 +1743,73 @@
if (this.player.h(entity) < d0) {
EnumHand enumhand;
@@ -1177,7 +1187,7 @@
}
}
}
-@@ -1047,7 +1823,8 @@
+@@ -1047,7 +1825,8 @@
case PERFORM_RESPAWN:
if (this.player.viewingCredits) {
this.player.viewingCredits = false;
@@ -1187,7 +1197,7 @@
CriterionTriggers.v.a(this.player, DimensionManager.THE_END, DimensionManager.OVERWORLD);
} else {
if (this.player.getHealth() > 0.0F) {
-@@ -1070,14 +1847,20 @@
+@@ -1070,14 +1849,20 @@
public void a(PacketPlayInCloseWindow packetplayinclosewindow) {
PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer());
@@ -1210,7 +1220,7 @@
NonNullList nonnulllist = NonNullList.a();
for (int i = 0; i < this.player.activeContainer.slots.size(); ++i) {
-@@ -1086,8 +1869,274 @@
+@@ -1086,8 +1871,274 @@
this.player.a(this.player.activeContainer, nonnulllist);
} else {
@@ -1486,7 +1496,7 @@
if (ItemStack.matches(packetplayinwindowclick.f(), itemstack)) {
this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.b(), packetplayinwindowclick.e(), true));
this.player.f = true;
-@@ -1130,6 +2179,7 @@
+@@ -1130,6 +2181,7 @@
public void a(PacketPlayInEnchantItem packetplayinenchantitem) {
PlayerConnectionUtils.ensureMainThread(packetplayinenchantitem, this, this.player.getWorldServer());
@@ -1494,7 +1504,7 @@
this.player.resetIdleTimer();
if (this.player.activeContainer.windowId == packetplayinenchantitem.b() && this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
this.player.activeContainer.a(this.player, packetplayinenchantitem.c());
-@@ -1161,6 +2211,43 @@
+@@ -1161,6 +2213,43 @@
boolean flag1 = packetplayinsetcreativeslot.b() >= 1 && packetplayinsetcreativeslot.b() <= 45;
boolean flag2 = itemstack.isEmpty() || itemstack.getDamage() >= 0 && itemstack.getCount() <= 64 && !itemstack.isEmpty();
@@ -1538,7 +1548,7 @@
if (flag1 && flag2) {
if (itemstack.isEmpty()) {
-@@ -1184,6 +2271,7 @@
+@@ -1184,6 +2273,7 @@
public void a(PacketPlayInTransaction packetplayintransaction) {
PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.getWorldServer());
@@ -1546,7 +1556,7 @@
Short oshort = (Short) this.k.get(this.player.activeContainer.windowId);
if (oshort != null && packetplayintransaction.c() == oshort.shortValue() && this.player.activeContainer.windowId == packetplayintransaction.b() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
-@@ -1194,6 +2282,7 @@
+@@ -1194,6 +2284,7 @@
public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.getWorldServer());
@@ -1554,7 +1564,7 @@
this.player.resetIdleTimer();
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
BlockPosition blockposition = packetplayinupdatesign.b();
-@@ -1210,14 +2299,30 @@
+@@ -1210,14 +2301,30 @@
if (!tileentitysign.d() || tileentitysign.e() != this.player) {
this.minecraftServer.warning("Player " + this.player.getDisplayName().getString() + " just tried to change non-editable sign");
@@ -1586,7 +1596,7 @@
tileentitysign.update();
worldserver.notify(blockposition, iblockdata, iblockdata, 3);
-@@ -1226,6 +2331,7 @@
+@@ -1226,6 +2333,7 @@
}
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
@@ -1594,7 +1604,7 @@
if (this.g && packetplayinkeepalive.b() == this.h) {
int i = (int) (SystemUtils.b() - this.f);
-@@ -1239,7 +2345,17 @@
+@@ -1239,7 +2347,17 @@
public void a(PacketPlayInAbilities packetplayinabilities) {
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.getWorldServer());
@@ -1613,7 +1623,7 @@
}
public void a(PacketPlayInSettings packetplayinsettings) {
-@@ -1247,5 +2363,47 @@
+@@ -1247,5 +2365,47 @@
this.player.a(packetplayinsettings);
}