From 7b70491991455dafa9dc45a0d8bbf5c36159fe5c Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Wed, 19 Aug 2020 21:46:18 -0500 Subject: [PATCH] Updated Upstream (Tuinity) Upstream has released updates that appears to apply and compile correctly Tuinity Changes: 466adfb Range check flag dirty calls in PlayerChunk --- .../server/0001-Tuinity-Server-Changes.patch | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/patches/server/0001-Tuinity-Server-Changes.patch b/patches/server/0001-Tuinity-Server-Changes.patch index c09d2d6b0..4130f8054 100644 --- a/patches/server/0001-Tuinity-Server-Changes.patch +++ b/patches/server/0001-Tuinity-Server-Changes.patch @@ -3880,9 +3880,27 @@ index a0555b132d..9caf6598f8 100644 return fluid.a((Tag) TagsFluid.WATER) ? PathType.WATER : (fluid.a((Tag) TagsFluid.LAVA) ? PathType.LAVA : (a(iblockdata) ? PathType.DAMAGE_FIRE : (BlockDoor.l(iblockdata) && !(Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_WOOD_CLOSED : (block instanceof BlockDoor && material == Material.ORE && !(Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_IRON_CLOSED : (block instanceof BlockDoor && (Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_OPEN : (block instanceof BlockMinecartTrackAbstract ? PathType.RAIL : (block instanceof BlockLeaves ? PathType.LEAVES : (!block.a((Tag) TagsBlock.FENCES) && !block.a((Tag) TagsBlock.WALLS) && (!(block instanceof BlockFenceGate) || (Boolean) iblockdata.get(BlockFenceGate.OPEN)) ? (!iblockdata.a(iblockaccess, blockposition, PathMode.LAND) ? PathType.BLOCKED : PathType.OPEN) : PathType.FENCE)))))))); } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 835320bde4..577f0a234b 100644 +index 835320bde4..a65da4e7d1 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java +@@ -361,7 +361,7 @@ public class PlayerChunk { + public void a(BlockPosition blockposition) { + Chunk chunk = this.getSendingChunk(); // Paper - no-tick view distance + +- if (chunk != null) { ++ if (chunk != null && (blockposition.getY() >= 0 && blockposition.getY() <= 255)) { // Tuinity - updates cannot happen in sections that don't exist + byte b0 = (byte) SectionPosition.a(blockposition.getY()); + + if (this.dirtyBlocks[b0] == null) { +@@ -419,7 +419,7 @@ public class PlayerChunk { + this.a(world, blockposition, iblockdata); + } else { + ChunkSection chunksection = chunk.getSections()[sectionposition.getY()]; +- if (chunksection == null) chunksection = new ChunkSection(sectionposition.getY(), chunk, world, true); // Paper - make a new chunk section if none was found ++ //if (chunksection == null) chunksection = new ChunkSection(sectionposition.getY(), chunk, world, true); // Paper - make a new chunk section if none was found // Tuinity - handled better by spigot + PacketPlayOutMultiBlockChange packetplayoutmultiblockchange = new PacketPlayOutMultiBlockChange(sectionposition, shortset, chunksection, this.x); + + this.a(packetplayoutmultiblockchange, false); @@ -502,6 +502,7 @@ public class PlayerChunk { // Paper end - per player view distance }