From 0f61ed8fe4961a7e1a0c4da912e3d86824367bbc Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Fri, 11 Mar 2022 15:13:46 -0500 Subject: [PATCH] Remove Patches (#7541) --- .../Add-exception-reporting-event.patch | 4 +- .../Don-t-let-fishinghooks-use-portals.patch | 22 --------- ...a-from-ArmorStand-and-SpawnEgg-items.patch | 4 +- ...tion-to-remove-corrupt-tile-entities.patch | 46 ------------------- ...ok-reference-on-Craft-Entity-removal.patch | 26 ----------- ...ve-invalid-mob-spawner-tile-entities.patch | 22 --------- ...nd-for-setting-passengers-on-players.patch | 29 ------------ 7 files changed, 4 insertions(+), 149 deletions(-) delete mode 100644 patches/server/Don-t-let-fishinghooks-use-portals.patch delete mode 100644 patches/server/Option-to-remove-corrupt-tile-entities.patch delete mode 100644 patches/server/Remove-FishingHook-reference-on-Craft-Entity-removal.patch delete mode 100644 patches/server/Remove-invalid-mob-spawner-tile-entities.patch delete mode 100644 patches/server/Workaround-for-setting-passengers-on-players.patch diff --git a/patches/server/Add-exception-reporting-event.patch b/patches/server/Add-exception-reporting-event.patch index 132385a8a1..8ec052a1dd 100644 --- a/patches/server/Add-exception-reporting-event.patch +++ b/patches/server/Add-exception-reporting-event.patch @@ -155,8 +155,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import com.google.common.collect.UnmodifiableIterator; import com.mojang.logging.LogUtils; @@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess { - this.removeBlockEntity(blockEntity.getBlockPos()); - // Paper end + + // CraftBukkit start } else { - System.out.println("Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + "," + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ() - + " (" + this.getBlockState(blockposition) + ") where there was no entity tile!"); diff --git a/patches/server/Don-t-let-fishinghooks-use-portals.patch b/patches/server/Don-t-let-fishinghooks-use-portals.patch deleted file mode 100644 index 62553c4460..0000000000 --- a/patches/server/Don-t-let-fishinghooks-use-portals.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Fri, 16 Dec 2016 16:03:19 -0600 -Subject: [PATCH] Don't let fishinghooks use portals - - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -@@ -0,0 +0,0 @@ public class FishingHook extends Projectile { - - this.setDeltaMovement(this.getDeltaMovement().scale(0.92D)); - this.reapplyPosition(); -+ // Paper start - These shouldn't be going through portals -+ if (this.isInsidePortal) { -+ this.discard(); -+ } -+ // Paper end - } - } - diff --git a/patches/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/patches/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index 283dafc399..45d5c4e6cf 100644 --- a/patches/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/patches/server/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { - private void removeCorruptTEs() { - removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); + preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false); + log("Prevent TNT from moving in water: " + preventTntFromMovingInWater); } + + public boolean filterNBTFromSpawnEgg = true; diff --git a/patches/server/Option-to-remove-corrupt-tile-entities.patch b/patches/server/Option-to-remove-corrupt-tile-entities.patch deleted file mode 100644 index 40087731eb..0000000000 --- a/patches/server/Option-to-remove-corrupt-tile-entities.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Wed, 5 Oct 2016 16:27:36 -0500 -Subject: [PATCH] Option to remove corrupt tile entities - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -0,0 +0,0 @@ public class PaperWorldConfig { - preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false); - log("Prevent TNT from moving in water: " + preventTntFromMovingInWater); - } -+ -+ public boolean removeCorruptTEs = false; -+ private void removeCorruptTEs() { -+ removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); -+ } - } -diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess { - } - - this.setLightCorrect(protoChunk.isLightCorrect()); -- this.unsaved = true; -+ this.setUnsaved(true); - this.needsDecoration = true; // CraftBukkit - // CraftBukkit start - this.persistentDataContainer = protoChunk.persistentDataContainer; // SPIGOT-6814: copy PDC to account for 1.17 to 1.18 chunk upgrading. -@@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess { - "Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16)); - e.printStackTrace(); - ServerInternalException.reportInternalException(e); -+ -+ if (this.level.paperConfig.removeCorruptTEs) { -+ this.removeBlockEntity(blockEntity.getBlockPos()); -+ this.setUnsaved(true); -+ org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity"); -+ } - // Paper end - // CraftBukkit end - } diff --git a/patches/server/Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/patches/server/Remove-FishingHook-reference-on-Craft-Entity-removal.patch deleted file mode 100644 index 9e240ca79e..0000000000 --- a/patches/server/Remove-FishingHook-reference-on-Craft-Entity-removal.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Thu, 16 Jun 2016 00:17:23 -0400 -Subject: [PATCH] Remove FishingHook reference on Craft Entity removal - -TODO 1.17 isn't this supposed to be applied to when the fish hook is removed _in general_? Not just in Bukkit api calls? - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -@@ -0,0 +0,0 @@ public class CraftFishHook extends CraftProjectile implements FishHook { - public HookState getState() { - return HookState.values()[this.getHandle().currentState.ordinal()]; - } -+ -+ // Paper start -+ @Override -+ public void remove() { -+ super.remove(); -+ if (getHandle().getPlayerOwner() != null) { -+ getHandle().getPlayerOwner().fishing = null; -+ } -+ } -+ // Paper end - } diff --git a/patches/server/Remove-invalid-mob-spawner-tile-entities.patch b/patches/server/Remove-invalid-mob-spawner-tile-entities.patch deleted file mode 100644 index 1b3331109a..0000000000 --- a/patches/server/Remove-invalid-mob-spawner-tile-entities.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Byteflux -Date: Tue, 1 Mar 2016 15:08:03 -0600 -Subject: [PATCH] Remove invalid mob spawner tile entities - - -diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess { - } - - // CraftBukkit start -+ // Paper start - Remove invalid mob spawner tile entities -+ } else if (blockEntity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity -+ && !(getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SpawnerBlock)) { -+ this.removeBlockEntity(blockEntity.getBlockPos()); -+ // Paper end - } else { - System.out.println("Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + "," + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ() - + " (" + this.getBlockState(blockposition) + ") where there was no entity tile!"); diff --git a/patches/server/Workaround-for-setting-passengers-on-players.patch b/patches/server/Workaround-for-setting-passengers-on-players.patch deleted file mode 100644 index 87510db76c..0000000000 --- a/patches/server/Workaround-for-setting-passengers-on-players.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Sun, 10 Apr 2016 03:23:32 -0500 -Subject: [PATCH] Workaround for setting passengers on players - -SPIGOT-1915 & GH-114 - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - return true; - } - -+ // Paper start - Ugly workaround for SPIGOT-1915 & GH-114 -+ @Override -+ public boolean setPassenger(org.bukkit.entity.Entity passenger) { -+ boolean wasSet = super.setPassenger(passenger); -+ if (wasSet) { -+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSetPassengersPacket(this.getHandle())); -+ } -+ return wasSet; -+ } -+ // Paper end -+ - @Override - public void setSneaking(boolean sneak) { - this.getHandle().setShiftKeyDown(sneak);