From eb38e51ee0edf9ceaa6bcfbf5adb381aba9ce577 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 21:13:58 -0400 Subject: [PATCH] Fix "prevent players from moving into unloaded chunks" it used public method instead of private, and moved to world config also improved the implementation to not use obfuscated stuff Also removed the Fix Double chest conversion patch since its fixed in other ways in vanilla --- ...rseException-in-Entity-and-TE-names.patch} | 0 ...15-Fix-Double-Chest-Conversion-Error.patch | 67 ------------------- ... 0369-Avoid-dimension-id-collisions.patch} | 0 ...=> 0370-Honor-EntityAgeable.ageLock.patch} | 0 ...-Async-Chunk-Loading-and-Generation.patch} | 0 ...-Dimension-NBT-field-in-Entity-data.patch} | 0 ... 0373-Optimize-Light-Recalculations.patch} | 2 +- ...-entity-loss-due-to-unloaded-chunks.patch} | 0 ...-recheck-type-after-setting-a-block.patch} | 2 +- ...> 0376-Fix-Sending-Chunks-to-Client.patch} | 4 +- ...le-connection-throttle-kick-message.patch} | 0 ...Fix-FileIOThread-concurrency-issues.patch} | 0 ...9-Don-t-update-snapshot-blockstates.patch} | 0 ...> 0380-Hook-into-CB-plugin-rewrites.patch} | 0 ...81-Allow-setting-the-vex-s-summoner.patch} | 0 ...82-Add-LivingEntity-getTargetEntity.patch} | 0 ...I.patch => 0383-Add-sun-related-API.patch} | 0 ...wned-for-Villager-Aggression-Config.patch} | 0 ...-Johnny.patch => 0385-Here-s-Johnny.patch} | 0 ...Turtle-API.patch => 0386-Turtle-API.patch} | 0 ...ire-EntityCombustEvent-for-phantoms.patch} | 0 ...it-lightning-strike-effect-distance.patch} | 0 ...-and-setters-for-EntityItem-owner-a.patch} | 0 ...her-worlds-for-shooter-of-projectil.patch} | 0 ...Call-player-spectator-target-events.patch} | 0 ...-Add-Velocity-IP-Forwarding-Support.patch} | 0 ...PI.patch => 0393-Add-more-Witch-API.patch} | 0 ...MC-93764.patch => 0394-Fix-MC-93764.patch} | 0 ...item-tag-if-interaction-is-canceled.patch} | 0 ...vent-players-from-moving-into-unloa.patch} | 32 ++++++--- ...7-Reset-players-airTicks-on-respawn.patch} | 0 ...-area-unicode-characters-from-signs.patch} | 4 +- 32 files changed, 28 insertions(+), 83 deletions(-) rename Spigot-Server-Patches/{0369-Catch-JsonParseException-in-Entity-and-TE-names.patch => 0368-Catch-JsonParseException-in-Entity-and-TE-names.patch} (100%) delete mode 100644 Spigot-Server-Patches/0368-MC-134115-Fix-Double-Chest-Conversion-Error.patch rename Spigot-Server-Patches/{0370-Avoid-dimension-id-collisions.patch => 0369-Avoid-dimension-id-collisions.patch} (100%) rename Spigot-Server-Patches/{0371-Honor-EntityAgeable.ageLock.patch => 0370-Honor-EntityAgeable.ageLock.patch} (100%) rename Spigot-Server-Patches/{0372-Async-Chunk-Loading-and-Generation.patch => 0371-Async-Chunk-Loading-and-Generation.patch} (100%) rename Spigot-Server-Patches/{0373-Ignore-Dimension-NBT-field-in-Entity-data.patch => 0372-Ignore-Dimension-NBT-field-in-Entity-data.patch} (100%) rename Spigot-Server-Patches/{0374-Optimize-Light-Recalculations.patch => 0373-Optimize-Light-Recalculations.patch} (98%) rename Spigot-Server-Patches/{0375-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch => 0374-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch} (100%) rename Spigot-Server-Patches/{0376-Don-t-recheck-type-after-setting-a-block.patch => 0375-Don-t-recheck-type-after-setting-a-block.patch} (95%) rename Spigot-Server-Patches/{0377-Fix-Sending-Chunks-to-Client.patch => 0376-Fix-Sending-Chunks-to-Client.patch} (94%) rename Spigot-Server-Patches/{0378-Configurable-connection-throttle-kick-message.patch => 0377-Configurable-connection-throttle-kick-message.patch} (100%) rename Spigot-Server-Patches/{0379-Fix-FileIOThread-concurrency-issues.patch => 0378-Fix-FileIOThread-concurrency-issues.patch} (100%) rename Spigot-Server-Patches/{0380-Don-t-update-snapshot-blockstates.patch => 0379-Don-t-update-snapshot-blockstates.patch} (100%) rename Spigot-Server-Patches/{0381-Hook-into-CB-plugin-rewrites.patch => 0380-Hook-into-CB-plugin-rewrites.patch} (100%) rename Spigot-Server-Patches/{0382-Allow-setting-the-vex-s-summoner.patch => 0381-Allow-setting-the-vex-s-summoner.patch} (100%) rename Spigot-Server-Patches/{0383-Add-LivingEntity-getTargetEntity.patch => 0382-Add-LivingEntity-getTargetEntity.patch} (100%) rename Spigot-Server-Patches/{0384-Add-sun-related-API.patch => 0383-Add-sun-related-API.patch} (100%) rename Spigot-Server-Patches/{0385-Check-Drowned-for-Villager-Aggression-Config.patch => 0384-Check-Drowned-for-Villager-Aggression-Config.patch} (100%) rename Spigot-Server-Patches/{0386-Here-s-Johnny.patch => 0385-Here-s-Johnny.patch} (100%) rename Spigot-Server-Patches/{0387-Turtle-API.patch => 0386-Turtle-API.patch} (100%) rename Spigot-Server-Patches/{0388-Fire-EntityCombustEvent-for-phantoms.patch => 0387-Fire-EntityCombustEvent-for-phantoms.patch} (100%) rename Spigot-Server-Patches/{0389-Limit-lightning-strike-effect-distance.patch => 0388-Limit-lightning-strike-effect-distance.patch} (100%) rename Spigot-Server-Patches/{0390-Implement-getters-and-setters-for-EntityItem-owner-a.patch => 0389-Implement-getters-and-setters-for-EntityItem-owner-a.patch} (100%) rename Spigot-Server-Patches/{0391-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch => 0390-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch} (100%) rename Spigot-Server-Patches/{0392-Call-player-spectator-target-events.patch => 0391-Call-player-spectator-target-events.patch} (100%) rename Spigot-Server-Patches/{0393-Add-Velocity-IP-Forwarding-Support.patch => 0392-Add-Velocity-IP-Forwarding-Support.patch} (100%) rename Spigot-Server-Patches/{0394-Add-more-Witch-API.patch => 0393-Add-more-Witch-API.patch} (100%) rename Spigot-Server-Patches/{0395-Fix-MC-93764.patch => 0394-Fix-MC-93764.patch} (100%) rename Spigot-Server-Patches/{0396-Don-t-modify-item-tag-if-interaction-is-canceled.patch => 0395-Don-t-modify-item-tag-if-interaction-is-canceled.patch} (100%) rename Spigot-Server-Patches/{0397-Add-option-to-prevent-players-from-moving-into-unloa.patch => 0396-Add-option-to-prevent-players-from-moving-into-unloa.patch} (53%) rename Spigot-Server-Patches/{0398-Reset-players-airTicks-on-respawn.patch => 0397-Reset-players-airTicks-on-respawn.patch} (100%) rename Spigot-Server-Patches/{0399-Strip-private-area-unicode-characters-from-signs.patch => 0398-Strip-private-area-unicode-characters-from-signs.patch} (97%) diff --git a/Spigot-Server-Patches/0369-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0368-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 100% rename from Spigot-Server-Patches/0369-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0368-Catch-JsonParseException-in-Entity-and-TE-names.patch diff --git a/Spigot-Server-Patches/0368-MC-134115-Fix-Double-Chest-Conversion-Error.patch b/Spigot-Server-Patches/0368-MC-134115-Fix-Double-Chest-Conversion-Error.patch deleted file mode 100644 index 34f64181e..000000000 --- a/Spigot-Server-Patches/0368-MC-134115-Fix-Double-Chest-Conversion-Error.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Thu, 20 Sep 2018 19:11:33 -0400 -Subject: [PATCH] MC-134115: Fix Double Chest Conversion Error - -A bug with double chest conversion would lead to data -loss from chunks if they crossed chunk boundries. - -This fixes the issue. - -diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 7ac07ac07ac0..7ac07ac07ac0 100644 ---- a/src/main/java/net/minecraft/server/Chunk.java -+++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -514,6 +514,26 @@ public class Chunk implements IChunkAccess { - return this.setType(blockposition, iblockdata, flag, true); - } - -+ // Paper start -+ public void setTypeDirect(BlockPosition blockposition, IBlockData iblockdata) { -+ int i = blockposition.getX() & 15; -+ int j = blockposition.getY(); -+ int k = blockposition.getZ() & 15; -+ ChunkSection section = this.sections[j >> 4]; -+ -+ if (section == Chunk.EMPTY_CHUNK_SECTION) { -+ if (iblockdata.isAir()) { -+ return; -+ } -+ -+ section = new ChunkSection(j >> 4 << 4, this.world.worldProvider.g(), this, this.world, true); // Paper - Anti-Xray -+ this.sections[j >> 4] = section; -+ } -+ -+ section.setType(i, j & 15, k, iblockdata); -+ } -+ // Paper end -+ - @Nullable - public IBlockData setType(BlockPosition blockposition, IBlockData iblockdata, boolean flag, boolean doPlace) { - // CraftBukkit end -diff --git a/src/main/java/net/minecraft/server/ChunkConverter.java b/src/main/java/net/minecraft/server/ChunkConverter.java -index 7ac07ac07ac0..7ac07ac07ac0 100644 ---- a/src/main/java/net/minecraft/server/ChunkConverter.java -+++ b/src/main/java/net/minecraft/server/ChunkConverter.java -@@ -198,10 +198,15 @@ public class ChunkConverter { - EnumDirection enumdirection1 = (EnumDirection)iblockdata.get(BlockChest.FACING); - if (enumdirection.k() != enumdirection1.k() && enumdirection1 == iblockdata1.get(BlockChest.FACING)) { - BlockPropertyChestType blockpropertychesttype = enumdirection == enumdirection1.e() ? BlockPropertyChestType.LEFT : BlockPropertyChestType.RIGHT; -- generatoraccess.setTypeAndData(blockposition1, (IBlockData)iblockdata1.set(BlockChest.b, blockpropertychesttype.a()), 18); -+ // Paper start -+ Chunk chunk = ((World) generatoraccess.getMinecraftWorld()).getChunkAtWorldCoords(blockposition); -+ Chunk chunk1 = ((World) generatoraccess.getMinecraftWorld()).getChunkAtWorldCoords(blockposition1); -+ chunk1.setTypeDirect(blockposition1, (IBlockData)iblockdata1.set(BlockChest.b, blockpropertychesttype.a())); -+ - if (enumdirection1 == EnumDirection.NORTH || enumdirection1 == EnumDirection.EAST) { -- TileEntity tileentity = generatoraccess.getTileEntity(blockposition); -- TileEntity tileentity1 = generatoraccess.getTileEntity(blockposition1); -+ TileEntity tileentity = chunk.getTileEntity(blockposition); -+ TileEntity tileentity1 = chunk1.getTileEntity(blockposition1); -+ // Paper end - if (tileentity instanceof TileEntityChest && tileentity1 instanceof TileEntityChest) { - TileEntityChest.a((TileEntityChest)tileentity, (TileEntityChest)tileentity1); - } --- -2.19.1 - diff --git a/Spigot-Server-Patches/0370-Avoid-dimension-id-collisions.patch b/Spigot-Server-Patches/0369-Avoid-dimension-id-collisions.patch similarity index 100% rename from Spigot-Server-Patches/0370-Avoid-dimension-id-collisions.patch rename to Spigot-Server-Patches/0369-Avoid-dimension-id-collisions.patch diff --git a/Spigot-Server-Patches/0371-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0370-Honor-EntityAgeable.ageLock.patch similarity index 100% rename from Spigot-Server-Patches/0371-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0370-Honor-EntityAgeable.ageLock.patch diff --git a/Spigot-Server-Patches/0372-Async-Chunk-Loading-and-Generation.patch b/Spigot-Server-Patches/0371-Async-Chunk-Loading-and-Generation.patch similarity index 100% rename from Spigot-Server-Patches/0372-Async-Chunk-Loading-and-Generation.patch rename to Spigot-Server-Patches/0371-Async-Chunk-Loading-and-Generation.patch diff --git a/Spigot-Server-Patches/0373-Ignore-Dimension-NBT-field-in-Entity-data.patch b/Spigot-Server-Patches/0372-Ignore-Dimension-NBT-field-in-Entity-data.patch similarity index 100% rename from Spigot-Server-Patches/0373-Ignore-Dimension-NBT-field-in-Entity-data.patch rename to Spigot-Server-Patches/0372-Ignore-Dimension-NBT-field-in-Entity-data.patch diff --git a/Spigot-Server-Patches/0374-Optimize-Light-Recalculations.patch b/Spigot-Server-Patches/0373-Optimize-Light-Recalculations.patch similarity index 98% rename from Spigot-Server-Patches/0374-Optimize-Light-Recalculations.patch rename to Spigot-Server-Patches/0373-Optimize-Light-Recalculations.patch index e9a2480c8..14ecd1fa5 100644 --- a/Spigot-Server-Patches/0374-Optimize-Light-Recalculations.patch +++ b/Spigot-Server-Patches/0373-Optimize-Light-Recalculations.patch @@ -26,7 +26,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644 } this.x = true; -@@ -578,7 +578,7 @@ public class Chunk implements IChunkAccess { +@@ -558,7 +558,7 @@ public class Chunk implements IChunkAccess { } else { if (flag1) { this.initLighting(); diff --git a/Spigot-Server-Patches/0375-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/0374-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0375-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch rename to Spigot-Server-Patches/0374-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch diff --git a/Spigot-Server-Patches/0376-Don-t-recheck-type-after-setting-a-block.patch b/Spigot-Server-Patches/0375-Don-t-recheck-type-after-setting-a-block.patch similarity index 95% rename from Spigot-Server-Patches/0376-Don-t-recheck-type-after-setting-a-block.patch rename to Spigot-Server-Patches/0375-Don-t-recheck-type-after-setting-a-block.patch index ee626e2ae..1b8dcc6ee 100644 --- a/Spigot-Server-Patches/0376-Don-t-recheck-type-after-setting-a-block.patch +++ b/Spigot-Server-Patches/0375-Don-t-recheck-type-after-setting-a-block.patch @@ -19,7 +19,7 @@ diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/m index 7ac07ac07ac0..7ac07ac07ac0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -573,7 +573,7 @@ public class Chunk implements IChunkAccess { +@@ -553,7 +553,7 @@ public class Chunk implements IChunkAccess { this.world.n(blockposition); } diff --git a/Spigot-Server-Patches/0377-Fix-Sending-Chunks-to-Client.patch b/Spigot-Server-Patches/0376-Fix-Sending-Chunks-to-Client.patch similarity index 94% rename from Spigot-Server-Patches/0377-Fix-Sending-Chunks-to-Client.patch rename to Spigot-Server-Patches/0376-Fix-Sending-Chunks-to-Client.patch index d0b5f51af..8ef0a3b2e 100644 --- a/Spigot-Server-Patches/0377-Fix-Sending-Chunks-to-Client.patch +++ b/Spigot-Server-Patches/0376-Fix-Sending-Chunks-to-Client.patch @@ -17,7 +17,7 @@ diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/m index 7ac07ac07ac0..7ac07ac07ac0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -1205,7 +1205,7 @@ public class Chunk implements IChunkAccess { +@@ -1185,7 +1185,7 @@ public class Chunk implements IChunkAccess { } public boolean isReady() { @@ -26,7 +26,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644 } public boolean v() { -@@ -1443,6 +1443,13 @@ public class Chunk implements IChunkAccess { +@@ -1423,6 +1423,13 @@ public class Chunk implements IChunkAccess { this.h.clear(); this.a(ChunkStatus.POSTPROCESSED); this.m.a(this); diff --git a/Spigot-Server-Patches/0378-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0377-Configurable-connection-throttle-kick-message.patch similarity index 100% rename from Spigot-Server-Patches/0378-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0377-Configurable-connection-throttle-kick-message.patch diff --git a/Spigot-Server-Patches/0379-Fix-FileIOThread-concurrency-issues.patch b/Spigot-Server-Patches/0378-Fix-FileIOThread-concurrency-issues.patch similarity index 100% rename from Spigot-Server-Patches/0379-Fix-FileIOThread-concurrency-issues.patch rename to Spigot-Server-Patches/0378-Fix-FileIOThread-concurrency-issues.patch diff --git a/Spigot-Server-Patches/0380-Don-t-update-snapshot-blockstates.patch b/Spigot-Server-Patches/0379-Don-t-update-snapshot-blockstates.patch similarity index 100% rename from Spigot-Server-Patches/0380-Don-t-update-snapshot-blockstates.patch rename to Spigot-Server-Patches/0379-Don-t-update-snapshot-blockstates.patch diff --git a/Spigot-Server-Patches/0381-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0380-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from Spigot-Server-Patches/0381-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0380-Hook-into-CB-plugin-rewrites.patch diff --git a/Spigot-Server-Patches/0382-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0381-Allow-setting-the-vex-s-summoner.patch similarity index 100% rename from Spigot-Server-Patches/0382-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0381-Allow-setting-the-vex-s-summoner.patch diff --git a/Spigot-Server-Patches/0383-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0382-Add-LivingEntity-getTargetEntity.patch similarity index 100% rename from Spigot-Server-Patches/0383-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0382-Add-LivingEntity-getTargetEntity.patch diff --git a/Spigot-Server-Patches/0384-Add-sun-related-API.patch b/Spigot-Server-Patches/0383-Add-sun-related-API.patch similarity index 100% rename from Spigot-Server-Patches/0384-Add-sun-related-API.patch rename to Spigot-Server-Patches/0383-Add-sun-related-API.patch diff --git a/Spigot-Server-Patches/0385-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0384-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 100% rename from Spigot-Server-Patches/0385-Check-Drowned-for-Villager-Aggression-Config.patch rename to Spigot-Server-Patches/0384-Check-Drowned-for-Villager-Aggression-Config.patch diff --git a/Spigot-Server-Patches/0386-Here-s-Johnny.patch b/Spigot-Server-Patches/0385-Here-s-Johnny.patch similarity index 100% rename from Spigot-Server-Patches/0386-Here-s-Johnny.patch rename to Spigot-Server-Patches/0385-Here-s-Johnny.patch diff --git a/Spigot-Server-Patches/0387-Turtle-API.patch b/Spigot-Server-Patches/0386-Turtle-API.patch similarity index 100% rename from Spigot-Server-Patches/0387-Turtle-API.patch rename to Spigot-Server-Patches/0386-Turtle-API.patch diff --git a/Spigot-Server-Patches/0388-Fire-EntityCombustEvent-for-phantoms.patch b/Spigot-Server-Patches/0387-Fire-EntityCombustEvent-for-phantoms.patch similarity index 100% rename from Spigot-Server-Patches/0388-Fire-EntityCombustEvent-for-phantoms.patch rename to Spigot-Server-Patches/0387-Fire-EntityCombustEvent-for-phantoms.patch diff --git a/Spigot-Server-Patches/0389-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0388-Limit-lightning-strike-effect-distance.patch similarity index 100% rename from Spigot-Server-Patches/0389-Limit-lightning-strike-effect-distance.patch rename to Spigot-Server-Patches/0388-Limit-lightning-strike-effect-distance.patch diff --git a/Spigot-Server-Patches/0390-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0389-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 100% rename from Spigot-Server-Patches/0390-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0389-Implement-getters-and-setters-for-EntityItem-owner-a.patch diff --git a/Spigot-Server-Patches/0391-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0390-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 100% rename from Spigot-Server-Patches/0391-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to Spigot-Server-Patches/0390-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch diff --git a/Spigot-Server-Patches/0392-Call-player-spectator-target-events.patch b/Spigot-Server-Patches/0391-Call-player-spectator-target-events.patch similarity index 100% rename from Spigot-Server-Patches/0392-Call-player-spectator-target-events.patch rename to Spigot-Server-Patches/0391-Call-player-spectator-target-events.patch diff --git a/Spigot-Server-Patches/0393-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0392-Add-Velocity-IP-Forwarding-Support.patch similarity index 100% rename from Spigot-Server-Patches/0393-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0392-Add-Velocity-IP-Forwarding-Support.patch diff --git a/Spigot-Server-Patches/0394-Add-more-Witch-API.patch b/Spigot-Server-Patches/0393-Add-more-Witch-API.patch similarity index 100% rename from Spigot-Server-Patches/0394-Add-more-Witch-API.patch rename to Spigot-Server-Patches/0393-Add-more-Witch-API.patch diff --git a/Spigot-Server-Patches/0395-Fix-MC-93764.patch b/Spigot-Server-Patches/0394-Fix-MC-93764.patch similarity index 100% rename from Spigot-Server-Patches/0395-Fix-MC-93764.patch rename to Spigot-Server-Patches/0394-Fix-MC-93764.patch diff --git a/Spigot-Server-Patches/0396-Don-t-modify-item-tag-if-interaction-is-canceled.patch b/Spigot-Server-Patches/0395-Don-t-modify-item-tag-if-interaction-is-canceled.patch similarity index 100% rename from Spigot-Server-Patches/0396-Don-t-modify-item-tag-if-interaction-is-canceled.patch rename to Spigot-Server-Patches/0395-Don-t-modify-item-tag-if-interaction-is-canceled.patch diff --git a/Spigot-Server-Patches/0397-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0396-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 53% rename from Spigot-Server-Patches/0397-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0396-Add-option-to-prevent-players-from-moving-into-unloa.patch index aa452b503..32eed1ad7 100644 --- a/Spigot-Server-Patches/0397-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0396-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded chunks #1551 -diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index 7ac07ac07ac0..7ac07ac07ac0 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -458,4 +458,9 @@ public class PaperConfig { - velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8); - } +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -564,4 +564,9 @@ public class PaperWorldConfig { + replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList("stone", "planks")); + log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Chunk Edge Mode: " + chunkEdgeMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius); } + -+ public static boolean preventMovingIntoUnloadedChunks = false; -+ public static void preventMovingIntoUnloadedChunks() { ++ public boolean preventMovingIntoUnloadedChunks = false; ++ private void preventMovingIntoUnloadedChunks() { + preventMovingIntoUnloadedChunks = getBoolean("settings.prevent-moving-into-unloaded-chunks", false); + } } @@ -28,7 +28,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644 speed *= 2f; // TODO: Get the speed of the vehicle instead of the player + // Paper start - Prevent moving into unloaded chunks -+ if(com.destroystokyo.paper.PaperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(d4) >> 4, (int) Math.floor(d6) >> 4, false)) { ++ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(packetplayinvehiclemove.getX()) >> 4, (int) Math.floor(packetplayinvehiclemove.getZ()) >> 4, false)) { + this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); + return; + } @@ -37,12 +37,24 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.H() || !this.minecraftServer.G().equals(entity.getDisplayName().getString()))) { // CraftBukkit end PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); +@@ -851,9 +858,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + double d1 = this.player.locY; + double d2 = this.player.locZ; + double d3 = this.player.locY; +- double d4 = packetplayinflying.a(this.player.locX); ++ double d4 = packetplayinflying.a(this.player.locX);double toX = d4; // Paper - OBFHELPER + double d5 = packetplayinflying.b(this.player.locY); +- double d6 = packetplayinflying.c(this.player.locZ); ++ double d6 = packetplayinflying.c(this.player.locZ);double toZ = d6; // Paper - OBFHELPER + float f = packetplayinflying.a(this.player.yaw); + float f1 = packetplayinflying.b(this.player.pitch); + double d7 = d4 - this.l; @@ -893,6 +900,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { speed = player.abilities.walkSpeed * 10f; } + // Paper start - Prevent moving into unloaded chunks -+ if(com.destroystokyo.paper.PaperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(d4) >> 4, (int) Math.floor(d6) >> 4, false)) { ++ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4, false)) { + this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet()); + return; + } diff --git a/Spigot-Server-Patches/0398-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0397-Reset-players-airTicks-on-respawn.patch similarity index 100% rename from Spigot-Server-Patches/0398-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0397-Reset-players-airTicks-on-respawn.patch diff --git a/Spigot-Server-Patches/0399-Strip-private-area-unicode-characters-from-signs.patch b/Spigot-Server-Patches/0398-Strip-private-area-unicode-characters-from-signs.patch similarity index 97% rename from Spigot-Server-Patches/0399-Strip-private-area-unicode-characters-from-signs.patch rename to Spigot-Server-Patches/0398-Strip-private-area-unicode-characters-from-signs.patch index adb6be226..c6d0c15cb 100644 --- a/Spigot-Server-Patches/0399-Strip-private-area-unicode-characters-from-signs.patch +++ b/Spigot-Server-Patches/0398-Strip-private-area-unicode-characters-from-signs.patch @@ -1,4 +1,4 @@ -From 74d15ab6f2245fde253e1718bc7269170716f2b7 Mon Sep 17 00:00:00 2001 +From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 23 Oct 2018 20:53:43 -0400 Subject: [PATCH] Strip private area unicode characters from signs @@ -20,7 +20,7 @@ think of no reason to use it. Fixes GH-1571 diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 20dc3f272..3c712fc93 100644 +index 7ac07ac07ac0..7ac07ac07ac0 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java @@ -11,6 +11,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener {