diff options
-rw-r--r-- | nms-patches/Entity.patch | 82 | ||||
-rw-r--r-- | nms-patches/EntityLeash.patch | 10 | ||||
-rw-r--r-- | nms-patches/EntityShulker.patch | 10 | ||||
-rw-r--r-- | nms-patches/PlayerConnection.patch | 96 |
4 files changed, 124 insertions, 74 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch index 39777cd1..07daf4e7 100644 --- a/nms-patches/Entity.patch +++ b/nms-patches/Entity.patch @@ -99,7 +99,15 @@ this.yaw = f % 360.0F; this.pitch = f1 % 360.0F; } -@@ -230,6 +306,51 @@ +@@ -220,6 +296,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 B_() { +@@ -230,6 +307,51 @@ this.Y(); } @@ -151,7 +159,7 @@ public void Y() { this.world.methodProfiler.a("entityBaseTick"); if (this.isPassenger() && this.bJ().dead) { -@@ -246,6 +367,8 @@ +@@ -246,6 +368,8 @@ this.lastZ = this.locZ; this.lastPitch = this.pitch; this.lastYaw = this.yaw; @@ -160,7 +168,7 @@ if (!this.world.isClientSide && this.world instanceof WorldServer) { this.world.methodProfiler.a("portal"); if (this.ak) { -@@ -285,6 +408,7 @@ +@@ -285,6 +409,7 @@ this.I(); this.world.methodProfiler.b(); } @@ -168,7 +176,7 @@ this.as(); this.aq(); -@@ -336,6 +460,27 @@ +@@ -336,6 +461,27 @@ protected void burnFromLava() { if (!this.fireProof) { this.damageEntity(DamageSource.LAVA, 4.0F); @@ -196,7 +204,7 @@ this.setOnFire(15); } } -@@ -376,6 +521,22 @@ +@@ -376,6 +522,22 @@ this.a(this.getBoundingBox().d(d0, d1, d2)); this.recalcPosition(); } else { @@ -219,7 +227,7 @@ if (enummovetype == EnumMoveType.PISTON) { long i = this.world.getTime(); -@@ -517,7 +678,7 @@ +@@ -517,7 +679,7 @@ } } @@ -228,7 +236,7 @@ double d11; if (this.P > 0.0F && flag && (d7 != d0 || d9 != d2)) { -@@ -615,7 +776,7 @@ +@@ -615,7 +777,7 @@ this.world.methodProfiler.a("rest"); this.recalcPosition(); this.positionChanged = d7 != d0 || d9 != d2; @@ -237,7 +245,7 @@ this.onGround = this.B && d8 < 0.0D; this.C = this.positionChanged || this.B; l = MathHelper.floor(this.locX); -@@ -650,6 +811,28 @@ +@@ -650,6 +812,28 @@ block1.a(this.world, this); } @@ -266,7 +274,7 @@ if (this.playStepSound() && (!this.onGround || !this.isSneaking() || !(this instanceof EntityHuman)) && !this.isPassenger()) { double d22 = this.locX - d4; double d23 = this.locY - d5; -@@ -685,6 +868,8 @@ +@@ -685,6 +869,8 @@ } } @@ -275,7 +283,7 @@ try { this.checkBlockCollisions(); } catch (Throwable throwable) { -@@ -694,6 +879,8 @@ +@@ -694,6 +880,8 @@ this.appendEntityCrashDetails(crashreportsystemdetails); throw new ReportedException(crashreport); } @@ -284,7 +292,7 @@ boolean flag1 = this.an(); -@@ -702,7 +889,14 @@ +@@ -702,7 +890,14 @@ if (!flag1) { ++this.fireTicks; if (this.fireTicks == 0) { @@ -300,7 +308,15 @@ } } } else if (this.fireTicks <= 0) { -@@ -834,7 +1028,7 @@ +@@ -724,6 +919,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 ae() { +@@ -834,7 +1030,7 @@ return null; } @@ -309,7 +325,7 @@ if (!this.fireProof) { this.damageEntity(DamageSource.FIRE, (float) i); } -@@ -1008,6 +1202,13 @@ +@@ -1008,6 +1204,13 @@ } public void spawnIn(World world) { @@ -323,7 +339,15 @@ this.world = world; } -@@ -1245,6 +1446,18 @@ +@@ -1033,6 +1236,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); + } +@@ -1245,6 +1449,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})); @@ -342,7 +366,7 @@ nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch})); nbttagcompound.setFloat("FallDistance", this.fallDistance); nbttagcompound.setShort("Fire", (short) this.fireTicks); -@@ -1254,6 +1467,12 @@ +@@ -1254,6 +1470,12 @@ nbttagcompound.setBoolean("Invulnerable", this.invulnerable); nbttagcompound.setInt("PortalCooldown", this.portalCooldown); nbttagcompound.a("UUID", this.getUniqueID()); @@ -355,7 +379,7 @@ if (this.hasCustomName()) { nbttagcompound.setString("CustomName", this.getCustomName()); } -@@ -1329,6 +1548,8 @@ +@@ -1329,6 +1551,8 @@ this.motX = nbttaglist1.f(0); this.motY = nbttaglist1.f(1); this.motZ = nbttaglist1.f(2); @@ -364,7 +388,7 @@ if (Math.abs(this.motX) > 10.0D) { this.motX = 0.0D; } -@@ -1340,6 +1561,7 @@ +@@ -1340,6 +1564,7 @@ if (Math.abs(this.motZ) > 10.0D) { this.motZ = 0.0D; } @@ -372,7 +396,7 @@ this.locX = nbttaglist.f(0); this.locY = nbttaglist.f(1); -@@ -1397,6 +1619,57 @@ +@@ -1397,6 +1622,57 @@ this.setPosition(this.locX, this.locY, this.locZ); } @@ -430,7 +454,7 @@ } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1464,6 +1737,12 @@ +@@ -1464,6 +1740,12 @@ if (itemstack.isEmpty()) { return null; } else { @@ -443,7 +467,7 @@ EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack); entityitem.q(); -@@ -1589,6 +1868,24 @@ +@@ -1589,6 +1871,24 @@ if (entity.bJ() != this) { throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { @@ -468,7 +492,7 @@ if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bE() instanceof EntityHuman)) { this.passengers.add(0, entity); } else { -@@ -1602,6 +1899,22 @@ +@@ -1602,6 +1902,22 @@ if (entity.bJ() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { @@ -491,7 +515,7 @@ this.passengers.remove(entity); entity.j = 60; } -@@ -1741,14 +2054,49 @@ +@@ -1741,14 +2057,49 @@ } public void setAirTicks(int i) { @@ -544,7 +568,7 @@ } } -@@ -1893,19 +2241,76 @@ +@@ -1893,19 +2244,76 @@ if (!this.world.isClientSide && !this.dead) { this.world.methodProfiler.a("changeDimension"); MinecraftServer minecraftserver = this.C_(); @@ -624,7 +648,7 @@ BlockPosition blockposition; if (i == 1) { -@@ -1934,12 +2339,18 @@ +@@ -1934,12 +2342,18 @@ blockposition = new BlockPosition(this); } @@ -644,7 +668,7 @@ if (j == 1 && i == 1) { BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn()); -@@ -1947,6 +2358,7 @@ +@@ -1947,6 +2361,7 @@ } else { entity.setPositionRotation(blockposition, entity.yaw, entity.pitch); } @@ -652,7 +676,7 @@ boolean flag = entity.attachedToPlayer; -@@ -1954,13 +2366,21 @@ +@@ -1954,13 +2369,21 @@ worldserver1.addEntity(entity); entity.attachedToPlayer = flag; worldserver1.entityJoinedWorld(entity, false); @@ -675,7 +699,7 @@ return entity; } else { return null; -@@ -2064,6 +2484,11 @@ +@@ -2064,6 +2487,11 @@ } public void setCustomName(String s) { @@ -687,7 +711,7 @@ this.datawatcher.set(Entity.aB, s); } -@@ -2121,7 +2546,26 @@ +@@ -2121,7 +2549,26 @@ } public void a(AxisAlignedBB axisalignedbb) { @@ -715,7 +739,7 @@ } public float getHeadHeight() { -@@ -2295,7 +2739,7 @@ +@@ -2295,7 +2742,7 @@ for (Iterator iterator = this.bF().iterator(); iterator.hasNext(); entity.a(oclass, set)) { entity = (Entity) iterator.next(); if (oclass.isAssignableFrom(entity.getClass())) { diff --git a/nms-patches/EntityLeash.patch b/nms-patches/EntityLeash.patch index c742be1c..59c1825f 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; -@@ -71,22 +73,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) {} +@@ -71,22 +74,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 9b21b293..6b8b9b7d 100644 --- a/nms-patches/EntityShulker.patch +++ b/nms-patches/EntityShulker.patch @@ -20,7 +20,15 @@ } } -@@ -331,8 +335,17 @@ +@@ -227,6 +231,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; +@@ -331,8 +336,17 @@ EnumDirection enumdirection = aenumdirection[k]; if (this.world.d(blockposition1.shift(enumdirection), false)) { diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch index e67b4538..0f7ec312 100644 --- a/nms-patches/PlayerConnection.patch +++ b/nms-patches/PlayerConnection.patch @@ -219,7 +219,17 @@ PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); return; -@@ -231,6 +367,62 @@ +@@ -223,14 +359,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)).isEmpty(); + + 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; } @@ -282,7 +292,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.c(entity.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D)); -@@ -244,7 +436,7 @@ +@@ -244,7 +438,7 @@ public void a(PacketPlayInTeleportAccept packetplayinteleportaccept) { PlayerConnectionUtils.ensureMainThread(packetplayinteleportaccept, this, this.player.x()); @@ -291,7 +301,7 @@ this.player.setLocation(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch); if (this.player.L()) { this.o = this.teleportPos.x; -@@ -289,7 +481,7 @@ +@@ -289,7 +483,7 @@ } else { WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); @@ -300,7 +310,7 @@ if (this.e == 0) { this.syncPosition(); } -@@ -299,13 +491,21 @@ +@@ -299,13 +493,21 @@ this.A = this.e; this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch); } @@ -323,7 +333,7 @@ double d0 = this.player.locX; double d1 = this.player.locY; double d2 = this.player.locZ; -@@ -330,15 +530,33 @@ +@@ -330,15 +532,33 @@ ++this.receivedMovePackets; int i = this.receivedMovePackets - this.processedMovePackets; @@ -359,7 +369,7 @@ PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getName(), 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; -@@ -384,6 +602,69 @@ +@@ -384,6 +604,69 @@ } } @@ -429,7 +439,7 @@ this.B = d12 >= -0.03125D; this.B &= !this.minecraftServer.getAllowFlight() && !this.player.abilities.canFly; this.B &= !this.player.hasEffect(MobEffects.LEVITATION) && !this.player.cP() && !worldserver.c(this.player.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D)); -@@ -401,10 +682,76 @@ +@@ -401,10 +684,76 @@ } public void a(double d0, double d1, double d2, float f, float f1) { @@ -507,7 +517,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; -@@ -421,6 +768,14 @@ +@@ -421,6 +770,14 @@ f3 = f1 + this.player.pitch; } @@ -522,7 +532,7 @@ if (++this.teleportAwait == Integer.MAX_VALUE) { this.teleportAwait = 0; } -@@ -432,6 +787,7 @@ +@@ -432,6 +789,7 @@ public void a(PacketPlayInBlockDig packetplayinblockdig) { PlayerConnectionUtils.ensureMainThread(packetplayinblockdig, this, this.player.x()); @@ -530,7 +540,7 @@ WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); BlockPosition blockposition = packetplayinblockdig.a(); -@@ -441,7 +797,15 @@ +@@ -441,7 +799,15 @@ if (!this.player.isSpectator()) { ItemStack itemstack = this.player.b(EnumHand.OFF_HAND); @@ -547,7 +557,7 @@ this.player.a(EnumHand.MAIN_HAND, itemstack); } -@@ -449,6 +813,21 @@ +@@ -449,6 +815,21 @@ case DROP_ITEM: if (!this.player.isSpectator()) { @@ -569,7 +579,7 @@ this.player.a(false); } -@@ -482,7 +861,15 @@ +@@ -482,7 +863,15 @@ if (!this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) { this.player.playerInteractManager.a(blockposition, packetplayinblockdig.b()); } else { @@ -585,7 +595,7 @@ } } else { if (packetplayinblockdig.c() == PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK) { -@@ -502,10 +889,12 @@ +@@ -502,10 +891,12 @@ default: throw new IllegalArgumentException("Invalid player action"); } @@ -598,7 +608,7 @@ WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); EnumHand enumhand = packetplayinuseitem.c(); ItemStack itemstack = this.player.b(enumhand); -@@ -519,6 +908,13 @@ +@@ -519,6 +910,13 @@ chatmessage.getChatModifier().setColor(EnumChatFormat.RED); this.player.playerConnection.sendPacket(new PacketPlayOutChat(chatmessage, 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)) { @@ -612,7 +622,7 @@ this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand, blockposition, enumdirection, packetplayinuseitem.d(), packetplayinuseitem.e(), packetplayinuseitem.f()); } -@@ -528,13 +924,52 @@ +@@ -528,13 +926,52 @@ public void a(PacketPlayInBlockPlace packetplayinblockplace) { PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.x()); @@ -666,7 +676,7 @@ } } -@@ -545,8 +980,8 @@ +@@ -545,8 +982,8 @@ WorldServer[] aworldserver = this.minecraftServer.worldServer; int i = aworldserver.length; @@ -677,7 +687,7 @@ if (worldserver != null) { entity = packetplayinspectate.a(worldserver); -@@ -559,6 +994,8 @@ +@@ -559,6 +996,8 @@ if (entity != null) { this.player.setSpectatorTarget(this.player); this.player.stopRiding(); @@ -686,7 +696,7 @@ if (entity.world == this.player.world) { this.player.enderTeleportTo(entity.locX, entity.locY, entity.locZ); } else { -@@ -584,12 +1021,20 @@ +@@ -584,12 +1023,20 @@ this.minecraftServer.getPlayerList().b(this.player, worldserver2); this.minecraftServer.getPlayerList().updateClient(this.player); } @@ -708,7 +718,7 @@ public void a(PacketPlayInBoatMove packetplayinboatmove) { PlayerConnectionUtils.ensureMainThread(packetplayinboatmove, this, this.player.x()); -@@ -602,14 +1047,29 @@ +@@ -602,14 +1049,29 @@ } public void a(IChatBaseComponent ichatbasecomponent) { @@ -739,7 +749,7 @@ if (this.minecraftServer.R() && this.player.getName().equals(this.minecraftServer.Q())) { PlayerConnection.LOGGER.info("Stopping singleplayer server as player logged out"); this.minecraftServer.safeShutdown(); -@@ -631,6 +1091,15 @@ +@@ -631,6 +1093,15 @@ } } @@ -755,7 +765,7 @@ try { this.networkManager.sendPacket(packet); } catch (Throwable throwable) { -@@ -652,17 +1121,37 @@ +@@ -652,17 +1123,37 @@ public void a(PacketPlayInHeldItemSlot packetplayinhelditemslot) { PlayerConnectionUtils.ensureMainThread(packetplayinhelditemslot, this, this.player.x()); @@ -795,7 +805,7 @@ ChatMessage chatmessage = new ChatMessage("chat.cannotSend", new Object[0]); chatmessage.getChatModifier().setColor(EnumChatFormat.RED); -@@ -675,39 +1164,249 @@ +@@ -675,39 +1166,249 @@ for (int i = 0; i < s.length(); ++i) { if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) { @@ -1052,7 +1062,7 @@ this.player.resetIdleTimer(); IJumpable ijumpable; -@@ -779,6 +1478,7 @@ +@@ -779,6 +1480,7 @@ public void a(PacketPlayInUseEntity packetplayinuseentity) { PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.x()); @@ -1060,7 +1070,7 @@ WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); Entity entity = packetplayinuseentity.a((World) worldserver); -@@ -794,20 +1494,68 @@ +@@ -794,20 +1496,68 @@ if (this.player.h(entity) < d0) { EnumHand enumhand; @@ -1130,7 +1140,7 @@ } } } -@@ -823,7 +1571,8 @@ +@@ -823,7 +1573,8 @@ case PERFORM_RESPAWN: if (this.player.viewingCredits) { this.player.viewingCredits = false; @@ -1140,7 +1150,7 @@ CriterionTriggers.u.a(this.player, DimensionManager.THE_END, DimensionManager.OVERWORLD); } else { if (this.player.getHealth() > 0.0F) { -@@ -846,14 +1595,20 @@ +@@ -846,14 +1597,20 @@ public void a(PacketPlayInCloseWindow packetplayinclosewindow) { PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.x()); @@ -1163,7 +1173,7 @@ NonNullList nonnulllist = NonNullList.a(); for (int i = 0; i < this.player.activeContainer.slots.size(); ++i) { -@@ -862,8 +1617,274 @@ +@@ -862,8 +1619,274 @@ this.player.a(this.player.activeContainer, nonnulllist); } else { @@ -1439,7 +1449,7 @@ if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) { this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true)); this.player.f = true; -@@ -900,6 +1921,7 @@ +@@ -900,6 +1923,7 @@ public void a(PacketPlayInEnchantItem packetplayinenchantitem) { PlayerConnectionUtils.ensureMainThread(packetplayinenchantitem, this, this.player.x()); @@ -1447,7 +1457,7 @@ this.player.resetIdleTimer(); if (this.player.activeContainer.windowId == packetplayinenchantitem.a() && this.player.activeContainer.c(this.player) && !this.player.isSpectator()) { this.player.activeContainer.a(this.player, packetplayinenchantitem.b()); -@@ -933,7 +1955,45 @@ +@@ -933,7 +1957,45 @@ } boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() <= 45; @@ -1494,7 +1504,7 @@ if (flag1 && flag2) { if (itemstack.isEmpty()) { -@@ -957,6 +2017,7 @@ +@@ -957,6 +2019,7 @@ public void a(PacketPlayInTransaction packetplayintransaction) { PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.x()); @@ -1502,7 +1512,7 @@ Short oshort = (Short) this.k.get(this.player.activeContainer.windowId); if (oshort != null && packetplayintransaction.b() == oshort.shortValue() && this.player.activeContainer.windowId == packetplayintransaction.a() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) { -@@ -967,6 +2028,7 @@ +@@ -967,6 +2030,7 @@ public void a(PacketPlayInUpdateSign packetplayinupdatesign) { PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.x()); @@ -1510,7 +1520,7 @@ this.player.resetIdleTimer(); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); BlockPosition blockposition = packetplayinupdatesign.a(); -@@ -983,14 +2045,30 @@ +@@ -983,14 +2047,30 @@ if (!tileentitysign.a() || tileentitysign.e() != this.player) { this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign"); @@ -1542,7 +1552,7 @@ tileentitysign.update(); worldserver.notify(blockposition, iblockdata, iblockdata, 3); -@@ -999,6 +2077,7 @@ +@@ -999,6 +2079,7 @@ } public void a(PacketPlayInKeepAlive packetplayinkeepalive) { @@ -1550,7 +1560,7 @@ if (this.g && packetplayinkeepalive.a() == this.h) { int i = (int) (this.d() - this.f); -@@ -1016,11 +2095,27 @@ +@@ -1016,11 +2097,27 @@ public void a(PacketPlayInAbilities packetplayinabilities) { PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x()); @@ -1579,7 +1589,7 @@ ArrayList arraylist = Lists.newArrayList(); Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b(), packetplayintabcomplete.c()).iterator(); -@@ -1046,6 +2141,13 @@ +@@ -1046,6 +2143,13 @@ ItemStack itemstack1; if ("MC|BEdit".equals(s)) { @@ -1593,7 +1603,7 @@ packetdataserializer = packetplayincustompayload.b(); try { -@@ -1065,14 +2167,23 @@ +@@ -1065,14 +2169,23 @@ if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) { itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8)); @@ -1617,7 +1627,7 @@ packetdataserializer = packetplayincustompayload.b(); try { -@@ -1106,10 +2217,11 @@ +@@ -1106,10 +2219,11 @@ } itemstack2.a("pages", (NBTBase) nbttaglist); @@ -1630,7 +1640,7 @@ } } else if ("MC|TrSel".equals(s)) { try { -@@ -1121,6 +2233,7 @@ +@@ -1121,6 +2235,7 @@ } } catch (Exception exception2) { PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2); @@ -1638,7 +1648,7 @@ } } else { TileEntity tileentity; -@@ -1170,6 +2283,7 @@ +@@ -1170,6 +2285,7 @@ } } catch (Exception exception3) { PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3); @@ -1646,7 +1656,7 @@ } } else if ("MC|AutoCmd".equals(s)) { if (!this.minecraftServer.getEnableCommandBlock()) { -@@ -1237,6 +2351,7 @@ +@@ -1237,6 +2353,7 @@ } } catch (Exception exception4) { PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4); @@ -1654,7 +1664,7 @@ } } else { int k; -@@ -1260,6 +2375,7 @@ +@@ -1260,6 +2377,7 @@ } } catch (Exception exception5) { PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5); @@ -1662,7 +1672,7 @@ } } } else if ("MC|ItemName".equals(s)) { -@@ -1346,6 +2462,7 @@ +@@ -1346,6 +2464,7 @@ } } catch (Exception exception6) { PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6); @@ -1670,7 +1680,7 @@ } } else if ("MC|PickItem".equals(s)) { packetdataserializer = packetplayincustompayload.b(); -@@ -1358,11 +2475,49 @@ +@@ -1358,11 +2477,49 @@ this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex)); } catch (Exception exception7) { PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7); |