From 272fb20b26a10930fc99e11395e272e40f00eecc Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Thu, 17 Jun 2021 21:52:26 +0200 Subject: [PATCH] deprecate all obfhelpers --- patches/server/0006-MC-Utils.patch | 64 +++++++++---------- patches/server/0009-Timings-v2.patch | 12 ++-- ...d-mobs-to-jump-and-take-water-damage.patch | 8 +-- .../0021-Player-affects-spawning-API.patch | 4 +- .../server/0064-Add-World-Util-Methods.patch | 8 +-- patches/server/0073-EntityPathfindEvent.patch | 4 +- ...5-Do-not-load-chunks-for-Pathfinding.patch | 8 +-- ...PI-for-Reason-Source-Triggering-play.patch | 6 +- ...rt-serverside-behavior-of-keepalives.patch | 8 +-- ...1-Ability-to-apply-mending-to-XP-API.patch | 4 +- patches/server/0217-RangedEntity-API.patch | 4 +- ...47-Use-ConcurrentHashMap-in-JsonList.patch | 2 - ...60-Asynchronous-chunk-IO-and-loading.patch | 8 +-- .../server/0263-Improve-death-events.patch | 4 +- patches/server/0265-Mob-Pathfinding-API.patch | 36 +++++------ ...276-Add-LivingEntity-getTargetEntity.patch | 6 +- patches/server/0277-Turtle-API.patch | 4 +- patches/server/0281-Add-more-Witch-API.patch | 4 +- .../0300-Add-PlayerConnectionCloseEvent.patch | 6 +- ...336-Fix-World-isChunkGenerated-calls.patch | 8 +-- .../0364-Entity-Activation-Range-2.0.patch | 10 +-- patches/server/0367-Anti-Xray.patch | 16 ++--- ...imise-TickListServer-by-rewriting-it.patch | 4 +- ...spawn-settings-and-per-player-option.patch | 4 +- .../server/0405-Optimize-Pathfinding.patch | 4 +- .../server/0426-Villager-Restocks-API.patch | 4 +- .../server/0431-Implement-Mob-Goal-API.patch | 8 +-- .../0434-Add-villager-reputation-API.patch | 4 +- ...der-respects-game-and-entity-rules-f.patch | 4 +- ...0473-Support-old-UUID-format-for-NBT.patch | 4 +- .../server/0481-Add-entity-liquid-API.patch | 4 +- ...pdate-itemstack-legacy-name-and-lore.patch | 4 +- ...Fix-some-rails-connecting-improperly.patch | 8 +-- ...-headless-pistons-from-being-created.patch | 4 +- ...-translation-keys-for-blocks-entitie.patch | 4 +- ...CreateEvent-players-and-end-platform.patch | 4 +- 36 files changed, 148 insertions(+), 150 deletions(-) diff --git a/patches/server/0006-MC-Utils.patch b/patches/server/0006-MC-Utils.patch index 5d9a0a90a7..fa1809e9ab 100644 --- a/patches/server/0006-MC-Utils.patch +++ b/patches/server/0006-MC-Utils.patch @@ -2307,7 +2307,7 @@ index 59240bb0ce088a14f8ccb62de8b69bc7bf313975..cfc2a5145e47de86a5a738d86abf333f @Override public BlockPos immutable() { diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java -index 3d374000cd61d4a29dae21035c5ee9a93a1ff0f9..750df4ab2fbfdcf759f4d3451340e66b6764391d 100644 +index 3d374000cd61d4a29dae21035c5ee9a93a1ff0f9..a16fa7c0effdd192e873eb1afdee79103bb8308e 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java @@ -60,7 +60,7 @@ public class CompoundTag implements Tag { @@ -2323,7 +2323,7 @@ index 3d374000cd61d4a29dae21035c5ee9a93a1ff0f9..750df4ab2fbfdcf759f4d3451340e66b this.tags.put(key, LongTag.valueOf(value)); } -+ public void setUUID(String prefix, UUID uuid) { putUUID(prefix, uuid); } // Paper - OBFHELPER ++ @Deprecated public void setUUID(String prefix, UUID uuid) { putUUID(prefix, uuid); } // Paper - OBFHELPER public void putUUID(String key, UUID value) { this.tags.put(key, NbtUtils.createUUID(value)); } @@ -3431,7 +3431,7 @@ index 391bae98e542333a431fb48bf0675c0e8a1873ac..0f6b534a4c789a2f09f6c4624e5d58b9 public BlockState getBlockState(BlockPos pos) { return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a401610e083b699be2c60a505f673cb3968d452b..ab32d84cd0f29fefceb080598bdf1283cb0a33d5 100644 +index a401610e083b699be2c60a505f673cb3968d452b..e02562f8d0160dc3516768555604ae47f3f55461 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -219,9 +219,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -3441,9 +3441,9 @@ index a401610e083b699be2c60a505f673cb3968d452b..ab32d84cd0f29fefceb080598bdf1283 - private long keepAliveTime; - private boolean keepAlivePending; - private long keepAliveChallenge; -+ private long keepAliveTime; private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER -+ private boolean keepAlivePending; private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER -+ private long keepAliveChallenge; private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER ++ private long keepAliveTime; @Deprecated private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; @Deprecated private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER ++ private boolean keepAlivePending; @Deprecated private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; @Deprecated private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER ++ private long keepAliveChallenge; @Deprecated private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; @Deprecated private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER // CraftBukkit start - multithreaded fields private AtomicInteger chatSpamTickCount = new AtomicInteger(); // CraftBukkit end @@ -3515,7 +3515,7 @@ index d31c62b612a5a8016ffbfbb9dc85d9a941c08cf4..fc34cfa8bfb3b82a8e1b28d261f0e901 super(type, world); this.xpReward = 5; diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java -index 6d0b9f8834e86a465cae3fa2af830b797c65a4fb..a193358bf274bf13bfa090dd7f796d8d64cbfb39 100644 +index 6d0b9f8834e86a465cae3fa2af830b797c65a4fb..911cecb3c1d0cd682dcff37636e1fefd979456ae 100644 --- a/src/main/java/net/minecraft/world/entity/player/Inventory.java +++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java @@ -44,7 +44,7 @@ public class Inventory implements Container, Nameable { @@ -3523,7 +3523,7 @@ index 6d0b9f8834e86a465cae3fa2af830b797c65a4fb..a193358bf274bf13bfa090dd7f796d8d public final NonNullList armor; public final NonNullList offhand; - private final List> compartments; -+ private final List> compartments; public final List> getComponents() { return compartments; } // Paper - OBFHELPER ++ private final List> compartments; @Deprecated public final List> getComponents() { return compartments; } // Paper - OBFHELPER public int selected; public final Player player; private int timesChanged; @@ -3573,14 +3573,14 @@ index 48902f822ccb6e231201f888a2a92923a946e8cf..680c4eb99b650c8ec7fe50022ba36070 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/item/alchemy/PotionUtils.java b/src/main/java/net/minecraft/world/item/alchemy/PotionUtils.java -index 3d9fffa3f07264743b9323557a0b2ac360e01fb9..c68cf35dc89b22f349aeb2faab45f6057aac5333 100644 +index 3d9fffa3f07264743b9323557a0b2ac360e01fb9..eca0f3b95b3af4dade992889a5e310a467c2e9fc 100644 --- a/src/main/java/net/minecraft/world/item/alchemy/PotionUtils.java +++ b/src/main/java/net/minecraft/world/item/alchemy/PotionUtils.java @@ -126,6 +126,7 @@ public class PotionUtils { return compound == null ? Potions.EMPTY : Potion.byName(compound.getString("Potion")); } -+ public static ItemStack addPotionToItemStack(ItemStack itemstack, Potion potionregistry) { return setPotion(itemstack, potionregistry); } // Paper - OBFHELPER ++ @Deprecated public static ItemStack addPotionToItemStack(ItemStack itemstack, Potion potionregistry) { return setPotion(itemstack, potionregistry); } // Paper - OBFHELPER public static ItemStack setPotion(ItemStack stack, Potion potion) { ResourceLocation resourceLocation = Registry.POTION.getKey(potion); if (potion == Potions.EMPTY) { @@ -3686,7 +3686,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..c7d499bfc22152e0a49f50a2a8133f31 public BlockState getBlockState(BlockPos pos) { return Blocks.AIR.defaultBlockState(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 90854842fda0f91ac68c70efbcf8ad9e3297ceb4..c9c8ce20e3adff1fe49489a6ac2d2e6be2795949 100644 +index 90854842fda0f91ac68c70efbcf8ad9e3297ceb4..20fafb95e98ac2e656999ea2208db166d841db9f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -84,6 +84,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -3781,8 +3781,8 @@ index 90854842fda0f91ac68c70efbcf8ad9e3297ceb4..c9c8ce20e3adff1fe49489a6ac2d2e6b - @Override - public boolean removeBlock(BlockPos pos, boolean move) { -+ public boolean setAir(BlockPos blockposition) { return this.removeBlock(blockposition, false); } // Paper - OBFHELPER -+ public boolean setAir(BlockPos blockposition, boolean moved) { return this.removeBlock(blockposition, moved); } // Paper - OBFHELPER ++ @Deprecated public boolean setAir(BlockPos blockposition) { return this.removeBlock(blockposition, false); } // Paper - OBFHELPER ++ @Deprecated public boolean setAir(BlockPos blockposition, boolean moved) { return this.removeBlock(blockposition, moved); } // Paper - OBFHELPER + @Override public boolean removeBlock(BlockPos pos, boolean move) { // Paper - OBFHELPER FluidState fluid = this.getFluidState(pos); @@ -3851,7 +3851,7 @@ index 00118cc80ebc31e5fac95c31c07634f0e2904263..138b6792bc6ee26e0b9aaaef7bf58fb2 @Override public BlockEntity getBlockEntity(BlockPos pos) { 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 62417156dd3e7e68e657f322c089fb6f30a11c0e..57f32618d6c95734fa4b45274afaf2319c7608ae 100644 +index 62417156dd3e7e68e657f322c089fb6f30a11c0e..34d108a3177b31d0094d6d81c180081cc728bcd4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -33,6 +33,7 @@ import net.minecraft.core.SectionPos; @@ -3867,7 +3867,7 @@ index 62417156dd3e7e68e657f322c089fb6f30a11c0e..57f32618d6c95734fa4b45274afaf231 }; @Nullable - public static final LevelChunkSection EMPTY_SECTION = null; -+ public static final LevelChunkSection EMPTY_SECTION = null; public static final LevelChunkSection EMPTY_CHUNK_SECTION = EMPTY_SECTION; // Paper - OBFHELPER ++ public static final LevelChunkSection EMPTY_SECTION = null; @Deprecated public static final LevelChunkSection EMPTY_CHUNK_SECTION = EMPTY_SECTION; // Paper - OBFHELPER private final LevelChunkSection[] sections; private ChunkBiomeContainer biomes; private final Map pendingBlockEntities; @@ -4024,7 +4024,7 @@ index 62417156dd3e7e68e657f322c089fb6f30a11c0e..57f32618d6c95734fa4b45274afaf231 return this.getBlockEntity(pos, LevelChunk.EntityCreationType.CHECK); } -+ @Nullable public final BlockEntity getTileEntityImmediately(BlockPos pos) { return this.getBlockEntity(pos, EntityCreationType.IMMEDIATE); } // Paper - OBFHELPER ++ @Deprecated @Nullable public final BlockEntity getTileEntityImmediately(BlockPos pos) { return this.getBlockEntity(pos, EntityCreationType.IMMEDIATE); } // Paper - OBFHELPER @Nullable public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) { // CraftBukkit start @@ -4100,24 +4100,24 @@ index 62417156dd3e7e68e657f322c089fb6f30a11c0e..57f32618d6c95734fa4b45274afaf231 } diff --git a/src/main/java/net/minecraft/world/level/chunk/Palette.java b/src/main/java/net/minecraft/world/level/chunk/Palette.java -index 967cc874eacdb8f589e548b0ee3d60efff72392e..2d95baf6f93b9710dd0910b0c6634ffc3d94d11f 100644 +index 967cc874eacdb8f589e548b0ee3d60efff72392e..b5c67a9733ef2f738d00174bb4f4251a6c2f24ea 100644 --- a/src/main/java/net/minecraft/world/level/chunk/Palette.java +++ b/src/main/java/net/minecraft/world/level/chunk/Palette.java @@ -6,10 +6,12 @@ import net.minecraft.nbt.ListTag; import net.minecraft.network.FriendlyByteBuf; public interface Palette { -+ default int getOrCreateIdFor(T object) { return this.idFor(object); } // Paper - OBFHELPER ++ @Deprecated default int getOrCreateIdFor(T object) { return this.idFor(object); } // Paper - OBFHELPER int idFor(T object); boolean maybeHas(Predicate predicate); -+ @Nullable default T getObject(int dataBits) { return this.valueFor(dataBits); } // Paper - OBFHELPER ++ @Deprecated @Nullable default T getObject(int dataBits) { return this.valueFor(dataBits); } // Paper - OBFHELPER @Nullable T valueFor(int index); diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 527238373b944a1e4a6e3a408534c72dd4c84035..4a6781919eb78abc33f549693d88019b42ef6e95 100644 +index 527238373b944a1e4a6e3a408534c72dd4c84035..c874515f1f460bd66baa47c9b8984ef875e735fb 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -20,7 +20,7 @@ public class PalettedContainer implements PaletteResize { @@ -4125,7 +4125,7 @@ index 527238373b944a1e4a6e3a408534c72dd4c84035..4a6781919eb78abc33f549693d88019b public static final int GLOBAL_PALETTE_BITS = 9; public static final int MIN_PALETTE_SIZE = 4; - private final Palette globalPalette; -+ private final Palette globalPalette; private final Palette getDataPaletteGlobal() { return this.globalPalette; } // Paper - OBFHELPER ++ private final Palette globalPalette; @Deprecated private final Palette getDataPaletteGlobal() { return this.globalPalette; } // Paper - OBFHELPER private final PaletteResize dummyPaletteResize = (newSize, added) -> { return 0; }; @@ -4136,9 +4136,9 @@ index 527238373b944a1e4a6e3a408534c72dd4c84035..4a6781919eb78abc33f549693d88019b - protected BitStorage storage; - private Palette palette; - private int bits; -+ protected BitStorage storage; public final BitStorage getDataBits() { return this.storage; } // Paper - OBFHELPER -+ private Palette palette; private Palette getDataPalette() { return this.palette; } // Paper - OBFHELPER -+ private int bits; private int getBitsPerObject() { return this.bits; } // Paper - OBFHELPER ++ protected BitStorage storage; @Deprecated public final BitStorage getDataBits() { return this.storage; } // Paper - OBFHELPER ++ private Palette palette; @Deprecated private Palette getDataPalette() { return this.palette; } // Paper - OBFHELPER ++ private int bits; @Deprecated private int getBitsPerObject() { return this.bits; } // Paper - OBFHELPER private final Semaphore lock = new Semaphore(1); @Nullable private final DebugBuffer> traces = null; @@ -4146,7 +4146,7 @@ index 527238373b944a1e4a6e3a408534c72dd4c84035..4a6781919eb78abc33f549693d88019b return y << 8 | z << 4 | x; } -+ private void initialize(int bitsPerObject) { this.setBits(bitsPerObject); } // Paper - OBFHELPER ++ @Deprecated private void initialize(int bitsPerObject) { this.setBits(bitsPerObject); } // Paper - OBFHELPER private void setBits(int size) { if (size != this.bits) { this.bits = size; @@ -4154,7 +4154,7 @@ index 527238373b944a1e4a6e3a408534c72dd4c84035..4a6781919eb78abc33f549693d88019b } -+ public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER ++ @Deprecated public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER public void write(FriendlyByteBuf buf) { try { this.acquire(); @@ -4182,7 +4182,7 @@ index c0b68bd470d245121e14b75e2c97f6616b83c92a..39fe8f64528ad08594aaaa88e5c989c8 public BlockState getBlockState(BlockPos pos) { int i = pos.getY(); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/IOWorker.java b/src/main/java/net/minecraft/world/level/chunk/storage/IOWorker.java -index ed4539f25dbd5b1c5c48b70a8d1e9f63fff5d964..7fae9cd0c7c515426b437435117585924983bf45 100644 +index ed4539f25dbd5b1c5c48b70a8d1e9f63fff5d964..79c8315e145befac4cab7d42d006e8f42105b6d9 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/IOWorker.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/IOWorker.java @@ -26,7 +26,7 @@ public class IOWorker implements AutoCloseable { @@ -4190,31 +4190,31 @@ index ed4539f25dbd5b1c5c48b70a8d1e9f63fff5d964..7fae9cd0c7c515426b43743511758592 private final AtomicBoolean shutdownRequested = new AtomicBoolean(); private final ProcessorMailbox mailbox; - private final RegionFileStorage storage; -+ private final RegionFileStorage storage;public RegionFileStorage getRegionFileCache() { return storage; } // Paper - OBFHELPER ++ private final RegionFileStorage storage;@Deprecated public RegionFileStorage getRegionFileCache() { return storage; } // Paper - OBFHELPER private final Map pendingWrites = Maps.newLinkedHashMap(); protected IOWorker(File directory, boolean dsync, String name) { diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 1441888430687b9de2a67f21ed426f16d5b30538..2da42f1bc6922adae32d782aac780a7e0e94e352 100644 +index 1441888430687b9de2a67f21ed426f16d5b30538..289c82bc490201eff896534261e6a2edef2ea8dc 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -121,6 +121,7 @@ public class RegionFile implements AutoCloseable { return this.externalFileDir.resolve(s); } -+ @Nullable public synchronized DataInputStream getReadStream(ChunkPos chunkCoordIntPair) throws IOException { return getChunkDataInputStream(chunkCoordIntPair);} // Paper - OBFHELPER ++ @Deprecated @Nullable public synchronized DataInputStream getReadStream(ChunkPos chunkCoordIntPair) throws IOException { return getChunkDataInputStream(chunkCoordIntPair);} // Paper - OBFHELPER @Nullable public synchronized DataInputStream getChunkDataInputStream(ChunkPos pos) throws IOException { int i = this.getOffset(pos); diff --git a/src/main/java/net/minecraft/world/phys/shapes/Shapes.java b/src/main/java/net/minecraft/world/phys/shapes/Shapes.java -index 5af90e0f7222356cb0e905a9b6e0c4eac5617a41..5d4d953f197afc402248ab73daeb6ef59134f48f 100644 +index 5af90e0f7222356cb0e905a9b6e0c4eac5617a41..eaf5b5794061d034cc5e1f80f5acd7f5b6688a30 100644 --- a/src/main/java/net/minecraft/world/phys/shapes/Shapes.java +++ b/src/main/java/net/minecraft/world/phys/shapes/Shapes.java @@ -34,6 +34,7 @@ public final class Shapes { return EMPTY; } -+ public static final VoxelShape fullCube() {return block();} // Paper - OBFHELPER ++ @Deprecated public static final VoxelShape fullCube() {return block();} // Paper - OBFHELPER public static VoxelShape block() { return BLOCK; } diff --git a/patches/server/0009-Timings-v2.patch b/patches/server/0009-Timings-v2.patch index eaa7acc294..8a7ac0d979 100644 --- a/patches/server/0009-Timings-v2.patch +++ b/patches/server/0009-Timings-v2.patch @@ -767,7 +767,7 @@ index b3a6aeba2363d283f03982cf749f25cfa11a5052..449f1b2f5dca350dc0912e14c8c2bf3e PacketUtils.LOGGER.debug("Ignoring packet due to disconnection: {}", packet); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1b76d1b929b85b130639e7937a118342b568e795..4985aa808fa378ab0463470d4635fda9cc15d268 100644 +index 1b76d1b929b85b130639e7937a118342b568e795..46bd0b6f8b13c64993ed1deeb8cfa7c105ee3cd9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -183,7 +183,7 @@ import org.bukkit.craftbukkit.Main; @@ -785,8 +785,8 @@ index 1b76d1b929b85b130639e7937a118342b568e795..4985aa808fa378ab0463470d4635fda9 private long nextTickTime; - private long delayedTasksMaxNextTickTime; - private boolean mayHaveDelayedTasks; -+ private long delayedTasksMaxNextTickTime; final long getTickOversleepMaxTime() { return this.delayedTasksMaxNextTickTime; } // Paper - OBFHELPER -+ private boolean mayHaveDelayedTasks; final boolean hasExecutedTask() { return this.mayHaveDelayedTasks; } // Paper - OBFHELPER ++ private long delayedTasksMaxNextTickTime; @Deprecated final long getTickOversleepMaxTime() { return this.delayedTasksMaxNextTickTime; } // Paper - OBFHELPER ++ private boolean mayHaveDelayedTasks; @Deprecated final boolean hasExecutedTask() { return this.mayHaveDelayedTasks; } // Paper - OBFHELPER private boolean hasWorldScreenshot; private final PackRepository packRepository; private final ServerScoreboard scoreboard; @@ -1371,7 +1371,7 @@ index bcfc6ea89aa3b1df92d2b181d1d23902859e2584..5c5cfc31ced6695af7b1dd06cb867274 this.entityManager.saveAll(); } else { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ab32d84cd0f29fefceb080598bdf1283cb0a33d5..f4f6f3e388a39efd2b076616350c49a0e8e65908 100644 +index e02562f8d0160dc3516768555604ae47f3f55461..8a77e28c9b12a110c721943aca545270ef8bbaef 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -209,6 +209,7 @@ import org.bukkit.inventory.EquipmentSlot; @@ -1627,7 +1627,7 @@ index 9f68aa235949520b445b368782ccde6b0e26859d..67bc396d880771a135b1b95ffad79952 if (!this.level.isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) { this.hurt(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c9c8ce20e3adff1fe49489a6ac2d2e6be2795949..59730455fcdf22bada7288833cf7e8b6c9b4096a 100644 +index 20fafb95e98ac2e656999ea2208db166d841db9f..e967d612ffb2e4d2834e2057e9953f82c7a3d50b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -82,7 +82,6 @@ import org.bukkit.Bukkit; @@ -1765,7 +1765,7 @@ index 92b042080f06fb95958ff5e824830a84f2d1f2a6..7b333e2d6884b272abefbc820bcce802 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public CraftPersistentDataContainer persistentDataContainer; 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 57f32618d6c95734fa4b45274afaf2319c7608ae..485cb87e83dd4b4b052905fb7f5f83d3c26f542f 100644 +index 34d108a3177b31d0094d6d81c180081cc728bcd4..f8873d76b675e062619d849ffe78376668c8289f 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -725,6 +725,7 @@ public class LevelChunk implements ChunkAccess { diff --git a/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index fd39f344c6..be41892170 100644 --- a/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -19,14 +19,14 @@ index 78948c42b13194005bdbbbc69c2b7ae0732a78c5..b41e7922dd96c3358eb849ab39982a75 + } } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0b63d81ecbcb56bf3dc25661cc2b219cd8c25592..c22eb7451aaf142f6c722715dbfda5ee332e068b 100644 +index 0b63d81ecbcb56bf3dc25661cc2b219cd8c25592..018792503e5d18470ad17b9f4b4524d5dfba31e9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1264,6 +1264,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n return this.isInWater() || this.isInRain(); } -+ public final boolean isInWaterOrRainOrBubble() { return isInWaterRainOrBubble(); } // Paper - OBFHELPER ++ @Deprecated public final boolean isInWaterOrRainOrBubble() { return isInWaterRainOrBubble(); } // Paper - OBFHELPER public boolean isInWaterRainOrBubble() { return this.isInWater() || this.isInRain() || this.isInBubbleColumn(); } @@ -62,7 +62,7 @@ index e91932d25e7b5d4a95e485bfa8b70632e0641b0a..1456dd2ef7ff28701555f4ac4b764579 this.sensing.tick(); this.level.getProfiler().pop(); diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java -index 54085b104547f2fe7c08ff8aa4839b1230877bca..1e6c92a3e9a28315814b250b56ecfb3e85f151b4 100644 +index 54085b104547f2fe7c08ff8aa4839b1230877bca..730788a1ceba4390d2638e22c6409ab86f6351e6 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java @@ -9,10 +9,12 @@ public class FloatGoal extends Goal { @@ -74,7 +74,7 @@ index 54085b104547f2fe7c08ff8aa4839b1230877bca..1e6c92a3e9a28315814b250b56ecfb3e mob.getNavigation().setCanFloat(true); } -+ public final boolean validConditions() { return this.canUse(); } // Paper - OBFHELPER ++ @Deprecated public final boolean validConditions() { return this.canUse(); } // Paper - OBFHELPER @Override public boolean canUse() { return this.mob.isInWater() && this.mob.getFluidHeight(FluidTags.WATER) > this.mob.getFluidJumpThreshold() || this.mob.isInLava(); diff --git a/patches/server/0021-Player-affects-spawning-API.patch b/patches/server/0021-Player-affects-spawning-API.patch index da4654296a..8a68681534 100644 --- a/patches/server/0021-Player-affects-spawning-API.patch +++ b/patches/server/0021-Player-affects-spawning-API.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c22eb7451aaf142f6c722715dbfda5ee332e068b..a65646832867e62c758eae3ee1359bdd0d810835 100644 +index 018792503e5d18470ad17b9f4b4524d5dfba31e9..023396b4cb9eeeb345cde43a4d7bdf514575f350 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1498,6 +1498,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n return Mth.sqrt(f * f + f1 * f1 + f2 * f2); } -+ public double getDistanceSquared(double x, double y, double z) { return distanceToSqr(x, y, z); } // Paper - OBFHELPER ++ @Deprecated public double getDistanceSquared(double x, double y, double z) { return distanceToSqr(x, y, z); } // Paper - OBFHELPER public double distanceToSqr(double x, double y, double z) { double d3 = this.getX() - x; double d4 = this.getY() - y; diff --git a/patches/server/0064-Add-World-Util-Methods.patch b/patches/server/0064-Add-World-Util-Methods.patch index 9ee7105fb9..bd14875e7f 100644 --- a/patches/server/0064-Add-World-Util-Methods.patch +++ b/patches/server/0064-Add-World-Util-Methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b0ecf3c491e802aa292a0a8b7be37362c38ce084..6aab4ba5da83f523632a0a39d45a0bcb2405f0cc 100644 +index 9b98eddb8238e36b17989d6f685ddc950151a7f8..b8a816a2f58c1ab51271f027f500d08bc3a63503 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -202,7 +202,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -19,7 +19,7 @@ index b0ecf3c491e802aa292a0a8b7be37362c38ce084..6aab4ba5da83f523632a0a39d45a0bcb } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index a6b1572a82fd22eea5b3d4124c510d94fea5917d..aee97243cc3e73f9e07ba8ed5d6dbe8c73ba016e 100644 +index 76182fd83d6dcd2359dd8d8a75e7e15304dc5d0f..fc7896e22b31f6ca0bb4b249d327f3f3ef52caf6 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -309,11 +309,27 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -52,14 +52,14 @@ index a6b1572a82fd22eea5b3d4124c510d94fea5917d..aee97243cc3e73f9e07ba8ed5d6dbe8c @Override diff --git a/src/main/java/net/minecraft/world/level/border/WorldBorder.java b/src/main/java/net/minecraft/world/level/border/WorldBorder.java -index 72087476c65b69c86af67424a15708c463d69a43..02b10be4878b871742efb0f65980d9672f32b388 100644 +index a0c4bc4eb42a3d2de6f66510d88f92c06b535353..5c1a2e88f4f5e78a481b8845b77be9c38aa8497f 100644 --- a/src/main/java/net/minecraft/world/level/border/WorldBorder.java +++ b/src/main/java/net/minecraft/world/level/border/WorldBorder.java @@ -32,6 +32,7 @@ public class WorldBorder { public WorldBorder() {} -+ public final boolean isInBounds(BlockPos blockposition) { return this.isWithinBounds(blockposition); } // Paper - OBFHELPER ++ @Deprecated public final boolean isInBounds(BlockPos blockposition) { return this.isWithinBounds(blockposition); } // Paper - OBFHELPER public boolean isWithinBounds(BlockPos pos) { return (double) (pos.getX() + 1) > this.getMinX() && (double) pos.getX() < this.getMaxX() && (double) (pos.getZ() + 1) > this.getMinZ() && (double) pos.getZ() < this.getMaxZ(); } diff --git a/patches/server/0073-EntityPathfindEvent.patch b/patches/server/0073-EntityPathfindEvent.patch index 1f2104c785..fef0f0b8c0 100644 --- a/patches/server/0073-EntityPathfindEvent.patch +++ b/patches/server/0073-EntityPathfindEvent.patch @@ -32,7 +32,7 @@ index d2e71f1e70a8b3360110f7e5e6c5ec278218ae27..0ac90b5fefa9720a9d0130f5438e5ef5 private int getSurfaceY() { diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 92e1c43b0b7d901636b7fee7136e573f440e0179..e6a2f836e70a267da36ec87e0df68e36bae3626c 100644 +index 92e1c43b0b7d901636b7fee7136e573f440e0179..34ce42afc6e822d209d2facc130b32e76836f40a 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -10,6 +10,7 @@ import net.minecraft.core.BlockPos; @@ -48,7 +48,7 @@ index 92e1c43b0b7d901636b7fee7136e573f440e0179..e6a2f836e70a267da36ec87e0df68e36 public abstract class PathNavigation { private static final int MAX_TIME_RECOMPUTE = 20; - protected final Mob mob; -+ protected final Mob mob; public Entity getEntity() { return mob; } // Paper - OBFHELPER ++ protected final Mob mob; @Deprecated public Entity getEntity() { return mob; } // Paper - OBFHELPER protected final Level level; @Nullable protected Path path; diff --git a/patches/server/0075-Do-not-load-chunks-for-Pathfinding.patch b/patches/server/0075-Do-not-load-chunks-for-Pathfinding.patch index 98b2ec3b26..e363fcce7f 100644 --- a/patches/server/0075-Do-not-load-chunks-for-Pathfinding.patch +++ b/patches/server/0075-Do-not-load-chunks-for-Pathfinding.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not load chunks for Pathfinding diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index e6a2f836e70a267da36ec87e0df68e36bae3626c..6c063351c76e92a8a91142a12db846d1c1f11921 100644 +index 34ce42afc6e822d209d2facc130b32e76836f40a..8b3513e4e2881bc4ba59e50fda399ecb88540323 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -46,7 +46,7 @@ public abstract class PathNavigation { @@ -13,12 +13,12 @@ index e6a2f836e70a267da36ec87e0df68e36bae3626c..6c063351c76e92a8a91142a12db846d1 private int reachRange; private float maxVisitedNodesMultiplier = 1.0F; - private final PathFinder pathFinder; -+ private final PathFinder pathFinder; public PathFinder getPathfinder() { return this.pathFinder; } // Paper - OBFHELPER ++ private final PathFinder pathFinder; @Deprecated public PathFinder getPathfinder() { return this.pathFinder; } // Paper - OBFHELPER private boolean isStuck; public PathNavigation(Mob mob, Level world) { diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java -index e855754bdb8431efc06c77b42d9a90b870abab8d..800d464207026d145056b39b298045121342b899 100644 +index e855754bdb8431efc06c77b42d9a90b870abab8d..a9048cabf88b1309cc6dc90a9ba928564cbc18cf 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java @@ -21,7 +21,7 @@ public class PathFinder { @@ -26,7 +26,7 @@ index e855754bdb8431efc06c77b42d9a90b870abab8d..800d464207026d145056b39b29804512 private final Node[] neighbors = new Node[32]; private final int maxVisitedNodes; - private final NodeEvaluator nodeEvaluator; -+ private final NodeEvaluator nodeEvaluator; public NodeEvaluator getPathfinder() { return this.nodeEvaluator; } // Paper - OBFHELPER ++ private final NodeEvaluator nodeEvaluator; @Deprecated public NodeEvaluator getPathfinder() { return this.nodeEvaluator; } // Paper - OBFHELPER private static final boolean DEBUG = false; private final BinaryHeap openSet = new BinaryHeap(); diff --git a/patches/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 6a64c09fd0..8683fcbace 100644 --- a/patches/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/patches/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -21,7 +21,7 @@ index f772924217c0531b09662a145d8ee5d22dd5ca51..ecfb88b4d9727ad20a2c33475cc6b1ec return true; diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 919fbe73f46238a1846c969bf64c309f3b9ad9d6..9662104a85faff2cdafd8cf001a8222182b56073 100644 +index 4000480a14d2ba52149f4fa47f824abfa2e0e5f8..cb0194d688ae176e0fba6c48cf59a51ceb1a5c4e 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -38,13 +38,63 @@ public class ExperienceOrb extends Entity { @@ -256,7 +256,7 @@ index 467f9814e0991d31bff7259f266262c81328f05f..11d1db5ef709dfb6fa596ebc4f5fff14 } diff --git a/src/main/java/net/minecraft/world/inventory/FurnaceResultSlot.java b/src/main/java/net/minecraft/world/inventory/FurnaceResultSlot.java -index d486b8d7d80bc79c5af6106de56a3ba49021258e..6f26688347ff2c206ab0b3ccae30b95ee7475fa2 100644 +index d486b8d7d80bc79c5af6106de56a3ba49021258e..97c76e7a6b3be6422d15744ce299deba48b1de02 100644 --- a/src/main/java/net/minecraft/world/inventory/FurnaceResultSlot.java +++ b/src/main/java/net/minecraft/world/inventory/FurnaceResultSlot.java @@ -8,7 +8,7 @@ import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; @@ -264,7 +264,7 @@ index d486b8d7d80bc79c5af6106de56a3ba49021258e..6f26688347ff2c206ab0b3ccae30b95e public class FurnaceResultSlot extends Slot { - private final Player player; -+ private final Player player; public final Player getPlayer() { return this.player; } // Paper OBFHELPER ++ private final Player player; @Deprecated public final Player getPlayer() { return this.player; } // Paper OBFHELPER private int removeCount; public FurnaceResultSlot(Player player, Container inventory, int index, int x, int y) { diff --git a/patches/server/0162-revert-serverside-behavior-of-keepalives.patch b/patches/server/0162-revert-serverside-behavior-of-keepalives.patch index 7b5d479023..db5a28e6c7 100644 --- a/patches/server/0162-revert-serverside-behavior-of-keepalives.patch +++ b/patches/server/0162-revert-serverside-behavior-of-keepalives.patch @@ -17,16 +17,16 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 20084d956082d4656f50c4e5e5f2b1c1a9cb9cbc..a679b30076cec74976cd04a7fab737fe88a83329 100644 +index e06179ca9c26368e47ef819f2e7bdf59518842f5..a679b30076cec74976cd04a7fab737fe88a83329 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -222,9 +222,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser private final MinecraftServer server; public ServerPlayer player; private int tickCount; -- private long keepAliveTime; private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER -- private boolean keepAlivePending; private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER -- private long keepAliveChallenge; private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER +- private long keepAliveTime; @Deprecated private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; @Deprecated private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER +- private boolean keepAlivePending; @Deprecated private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; @Deprecated private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER +- private long keepAliveChallenge; @Deprecated private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; @Deprecated private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER + private long keepAliveTime = Util.getMillis(); + private boolean keepAlivePending; + private long keepAliveChallenge; diff --git a/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch index 86e1a578bb..06a0c64d66 100644 --- a/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0171-Ability-to-apply-mending-to-XP-API.patch @@ -10,7 +10,7 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java -index 27cdfbeb6cb2159075b35dd4f9e9557ec0eac7c2..069ce59faab5184ab9da8ca3fe1cebf7449cd7fe 100644 +index 27cdfbeb6cb2159075b35dd4f9e9557ec0eac7c2..e246bf034a86deba5a15e7c639f5e08213fe7eee 100644 --- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java +++ b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java @@ -246,8 +246,11 @@ public class EnchantmentHelper { @@ -19,7 +19,7 @@ index 27cdfbeb6cb2159075b35dd4f9e9557ec0eac7c2..069ce59faab5184ab9da8ca3fe1cebf7 - @Nullable - public static Entry getRandomItemWith(Enchantment enchantment, LivingEntity entity) { -+ public static @javax.annotation.Nonnull ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, LivingEntity entityliving) { ++ @Deprecated public static @javax.annotation.Nonnull ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, LivingEntity entityliving) { + Entry entry = getRandomItemWith(enchantment, entityliving); + return entry != null ? entry.getValue() : ItemStack.EMPTY; + } // Paper - OBFHELPER diff --git a/patches/server/0217-RangedEntity-API.patch b/patches/server/0217-RangedEntity-API.patch index 1cfaceeec1..28d122dd3a 100644 --- a/patches/server/0217-RangedEntity-API.patch +++ b/patches/server/0217-RangedEntity-API.patch @@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..e75e1d0d833c96af139fd955b2585ec2 + } +} diff --git a/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java b/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java -index 6c3162606ccf799e99d591da33fd649847db54b8..7ff5d0410ac281da20a031e748e8c15f3156d809 100644 +index 6c3162606ccf799e99d591da33fd649847db54b8..ad9a8198cec21ab766ad8a274937ecbbed56bef6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java +++ b/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java @@ -3,5 +3,8 @@ package net.minecraft.world.entity.monster; @@ -40,7 +40,7 @@ index 6c3162606ccf799e99d591da33fd649847db54b8..7ff5d0410ac281da20a031e748e8c15f public interface RangedAttackMob { - void performRangedAttack(LivingEntity target, float pullProgress); -+ void performRangedAttack(LivingEntity target, float pullProgress); default void rangedAttack(LivingEntity entityliving, float f) { performRangedAttack(entityliving, f); } // Paper - OBFHELPER ++ void performRangedAttack(LivingEntity target, float pullProgress); @Deprecated default void rangedAttack(LivingEntity entityliving, float f) { performRangedAttack(entityliving, f); } // Paper - OBFHELPER + + // - see EntitySkeletonAbstract melee goal + void setAggressive(boolean flag); default void setChargingAttack(boolean charging) { setAggressive(charging); }; // Paper diff --git a/patches/server/0247-Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/0247-Use-ConcurrentHashMap-in-JsonList.patch index 9755902d2a..8a5c214839 100644 --- a/patches/server/0247-Use-ConcurrentHashMap-in-JsonList.patch +++ b/patches/server/0247-Use-ConcurrentHashMap-in-JsonList.patch @@ -22,8 +22,6 @@ This will eliminate stale values being flushed to disk Modified isEmpty to use the isEmpty() method instead of the slightly confusing size() < 1 The point of this is readability, but does have a side-benefit of a small microptimization -Finally, added a couple obfhelpers for the modified code - diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java index 7c5a75fb34640bb4e7ef839412dbb30b0d0fc8e8..b62aa9f934c33b4d22b985b5e56937baa8454677 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/patches/server/0260-Asynchronous-chunk-IO-and-loading.patch b/patches/server/0260-Asynchronous-chunk-IO-and-loading.patch index b31c2e1790..7e693901d7 100644 --- a/patches/server/0260-Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/0260-Asynchronous-chunk-IO-and-loading.patch @@ -2299,7 +2299,7 @@ index fb0b3c5770f66cc3590f5ac4e690a33cb6179be3..7ce854edba32ffcafaa5268d4bb2822a DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataFixers.getDataFixer(), minecraftsessionservice, gameprofilerepository, usercache, LoggerChunkProgressListener::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 537efec03939b0f5640dfd974bb0bd68e93b4325..627887227e266155c025592b50defede4271d978 100644 +index 9f7e89ccd716edac22d3bee907c39eedbffb05b5..8750199325adf72da10bf292bf56f75bafe10726 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -976,7 +976,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop nodes; -+ private final List nodes; public List getPoints() { return nodes; } // Paper - OBFHELPER ++ private final List nodes; @Deprecated public List getPoints() { return nodes; } // Paper - OBFHELPER private Node[] openSet = new Node[0]; private Node[] closedSet = new Node[0]; private Set targetNodes; - private int nextNodeIndex; -+ private int nextNodeIndex; public int getNextIndex() { return this.nextNodeIndex; } // Paper - OBFHELPER ++ private int nextNodeIndex; @Deprecated public int getNextIndex() { return this.nextNodeIndex; } // Paper - OBFHELPER private final BlockPos target; private final float distToTarget; private final boolean reached; @@ -258,7 +258,7 @@ index 6928c415e328dd7cff2e9ec553bc4faa1ff8facf..e95312e5b0f0200178cbe1a61b3629df @Nullable - public Node getEndNode() { -+ public Node getFinalPoint() { return getEndNode(); } @Nullable public Node getEndNode() { // Paper - OBFHELPER ++ @Deprecated public Node getFinalPoint() { return getEndNode(); } @Nullable public Node getEndNode() { // Paper - OBFHELPER return !this.nodes.isEmpty() ? this.nodes.get(this.nodes.size() - 1) : null; } @@ -267,7 +267,7 @@ index 6928c415e328dd7cff2e9ec553bc4faa1ff8facf..e95312e5b0f0200178cbe1a61b3629df } - public BlockPos getNextNodePos() { -+ public BlockPos getNext() { return getNextNodePos(); } public BlockPos getNextNodePos() { // Paper - OBFHELPER ++ @Deprecated public BlockPos getNext() { return getNextNodePos(); } public BlockPos getNextNodePos() { // Paper - OBFHELPER return this.nodes.get(this.nextNodeIndex).asBlockPos(); } diff --git a/patches/server/0276-Add-LivingEntity-getTargetEntity.patch b/patches/server/0276-Add-LivingEntity-getTargetEntity.patch index b8384d8122..427328bdd6 100644 --- a/patches/server/0276-Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/0276-Add-LivingEntity-getTargetEntity.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2138db2c7dc750cc9c2eb49b7878e4f172fb97e5..6b451733da0ccd5f300ccf1614ff301d641f0996 100644 +index 734559b4f36128afb4178fecbba99e8e4ac0aa7e..e62427c4dcd77eac147180349b95f76749d5ba56 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2362,6 +2362,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n this.setYHeadRot(yaw); } -+ public final float getCollisionBorderSize() { return getPickRadius(); } // Paper - OBFHELPER ++ @Deprecated public final float getCollisionBorderSize() { return getPickRadius(); } // Paper - OBFHELPER public float getPickRadius() { return 0.0F; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1ee5575d098b1727e33a00eb02e420245e4b6a15..77d816a5a98f3118abb91eb65e0bb316b8b0c549 100644 +index 3e7a2e37108f07c6057d1cd0bf673b0ed162f16a..205c3cf4b9c602c6765060a669b41dcdec1a854a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable; diff --git a/patches/server/0277-Turtle-API.patch b/patches/server/0277-Turtle-API.patch index 94bca6236d..9fcbb3eea1 100644 --- a/patches/server/0277-Turtle-API.patch +++ b/patches/server/0277-Turtle-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Turtle API diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java -index 70a51ba19fb34f652858b18f24554261787d97e2..065d0752db0e3ae2a89d707aaa2145807f50ecad 100644 +index 70a51ba19fb34f652858b18f24554261787d97e2..27ea9c10b7f66c2133b0829c0b1c37143dd80b56 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java @@ -14,7 +14,7 @@ public abstract class MoveToBlockGoal extends Goal { @@ -13,7 +13,7 @@ index 70a51ba19fb34f652858b18f24554261787d97e2..065d0752db0e3ae2a89d707aaa214580 protected int tryTicks; private int maxStayTicks; - protected BlockPos blockPos = BlockPos.ZERO; -+ protected BlockPos blockPos = BlockPos.ZERO; public final BlockPos getTargetPosition() { return this.blockPos; } // Paper - OBFHELPER ++ protected BlockPos blockPos = BlockPos.ZERO; @Deprecated public final BlockPos getTargetPosition() { return this.blockPos; } // Paper - OBFHELPER private boolean reachedTarget; private final int searchRange; private final int verticalSearchRange; diff --git a/patches/server/0281-Add-more-Witch-API.patch b/patches/server/0281-Add-more-Witch-API.patch index 8c1a40d946..20aa726c7a 100644 --- a/patches/server/0281-Add-more-Witch-API.patch +++ b/patches/server/0281-Add-more-Witch-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Witch API diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index 5e2e8cb5eba4ba36065f07abed954b2aad022321..ee32917c9852a97c27779ea969131e6c28bbb3ac 100644 +index 5e2e8cb5eba4ba36065f07abed954b2aad022321..cc00bfd72cc106a170731f4dfdb3bebeb8bb0c21 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java @@ -1,5 +1,8 @@ @@ -22,7 +22,7 @@ index 5e2e8cb5eba4ba36065f07abed954b2aad022321..ee32917c9852a97c27779ea969131e6c private static final AttributeModifier SPEED_MODIFIER_DRINKING = new AttributeModifier(Witch.SPEED_MODIFIER_DRINKING_UUID, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION); private static final EntityDataAccessor DATA_USING_ITEM = SynchedEntityData.defineId(Witch.class, EntityDataSerializers.BOOLEAN); - private int usingTime; -+ private int usingTime; public int getPotionUseTimeLeft() { return usingTime; } public void setPotionUseTimeLeft(int timeLeft) { usingTime = timeLeft; } // Paper - OBFHELPER ++ private int usingTime; @Deprecated public int getPotionUseTimeLeft() { return usingTime; } @Deprecated public void setPotionUseTimeLeft(int timeLeft) { usingTime = timeLeft; } // Paper - OBFHELPER private NearestHealableRaiderTargetGoal healRaidersGoal; private NearestAttackableWitchTargetGoal attackPlayersGoal; diff --git a/patches/server/0300-Add-PlayerConnectionCloseEvent.patch b/patches/server/0300-Add-PlayerConnectionCloseEvent.patch index 67df705ec6..4b385aaab0 100644 --- a/patches/server/0300-Add-PlayerConnectionCloseEvent.patch +++ b/patches/server/0300-Add-PlayerConnectionCloseEvent.patch @@ -65,7 +65,7 @@ index 8bbf13a7aea1142b3154a1c76837a98aa5ed431d..9f0537799a3cae43fb120056b8fe805a } diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 3d97f76f14b8c22c78c46a34c2da2e6406ba28b6..477117affabfe07d52d3b40404613492b0bcdc56 100644 +index 3d97f76f14b8c22c78c46a34c2da2e6406ba28b6..2e272db2b03bd1bf93e9d2af62b4eb43ae1be75b 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -56,10 +56,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -73,11 +73,11 @@ index 3d97f76f14b8c22c78c46a34c2da2e6406ba28b6..477117affabfe07d52d3b40404613492 final MinecraftServer server; public final Connection connection; - ServerLoginPacketListenerImpl.State state; -+ ServerLoginPacketListenerImpl.State state; public final ServerLoginPacketListenerImpl.State getLoginState() { return this.state; }; // Paper - OBFHELPER ++ ServerLoginPacketListenerImpl.State state; @Deprecated public final ServerLoginPacketListenerImpl.State getLoginState() { return this.state; }; // Paper - OBFHELPER private int tick; @Nullable - GameProfile gameProfile; -+ GameProfile gameProfile; private void setGameProfile(final GameProfile profile) { this.gameProfile = profile; } public GameProfile getGameProfile() { return this.gameProfile; } // Paper - OBFHELPER ++ GameProfile gameProfile; @Deprecated private void setGameProfile(final GameProfile profile) { this.gameProfile = profile; } @Deprecated public GameProfile getGameProfile() { return this.gameProfile; } // Paper - OBFHELPER private final String serverId; @Nullable private ServerPlayer delayedAcceptPlayer; diff --git a/patches/server/0336-Fix-World-isChunkGenerated-calls.patch b/patches/server/0336-Fix-World-isChunkGenerated-calls.patch index 522064262a..a417be52ec 100644 --- a/patches/server/0336-Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/0336-Fix-World-isChunkGenerated-calls.patch @@ -32,7 +32,7 @@ index ddaf9d682772d5dbbe6ee4891f9995a8ee365329..a3692debdf8c0df1f785794bff29235b public CompletableFuture> getFutureIfPresentUnchecked(ChunkStatus leastStatus) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 2c2f0497e34c58c358b04e72c9d27ef1eead4a42..39bf531bce103161cbd836d3a1eb882627cd89a6 100644 +index 36bc19cbb5242207ff019f62f59205e1a6336728..f271d7b32fef73401778682a1d4832bfbfd49b2f 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -84,6 +84,7 @@ import net.minecraft.world.level.chunk.ProtoChunk; @@ -120,14 +120,14 @@ index 672f78d1560ccd45d1a0ca04d6daf8188105c3e9..734b204d53a4b9e9b1112efe3a50b53c ChunkHolder holder = this.chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (holder == null) { diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java -index 6e0cf8ee76143301c939fc4af5eeb091abdcbc5c..066f03ee7b4feda9ec2b0984ee7cf63fa0b9e4fc 100644 +index 6e0cf8ee76143301c939fc4af5eeb091abdcbc5c..11739e01ea7188a45a3824ade8342124780ce936 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java @@ -204,6 +204,7 @@ public class ChunkStatus { return this.name; } -+ public ChunkStatus getPreviousStatus() { return this.getParent(); } // Paper - OBFHELPER ++ @Deprecated public ChunkStatus getPreviousStatus() { return this.getParent(); } // Paper - OBFHELPER public ChunkStatus getParent() { return this.parent; } @@ -172,7 +172,7 @@ index 21b3da831cd959e3fd85d437e1ba3c7a6c72502f..1c975b686c1e335d46e63ab12e0a97dd if (nbt != null) { ChunkStatus chunkstatus = ChunkStatus.byName(nbt.getCompound("Level").getString("Status")); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 26ad58e7a73e63d2393eb277984be20472157539..3dae5a4d13118c232529d4d5af29bf7b76ac2a7c 100644 +index 2f1d53037ac00bf2570def599641263fdc3859a1..933acb9bd1c6dd2baedee4bddea83a9de7f1e3d1 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -27,6 +27,7 @@ import net.minecraft.Util; diff --git a/patches/server/0364-Entity-Activation-Range-2.0.patch b/patches/server/0364-Entity-Activation-Range-2.0.patch index 70c6af6034..c5f4a4098d 100644 --- a/patches/server/0364-Entity-Activation-Range-2.0.patch +++ b/patches/server/0364-Entity-Activation-Range-2.0.patch @@ -124,7 +124,7 @@ index 95fed7617c2b37886e912e35e7ad446c39e791ab..22db34272c6635438d11f525fb4f08e2 } else { passenger.stopRiding(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 88b9a6b7157c9e1b6d1acf80b95fb15004e9c4d3..fe2535aa505232df1b6c5a71e463c5c0004b4de6 100644 +index 5bd250a9f9edb0391aaf935d51334bdb0a4e8575..0a3b0919f3de645de6d63d67a2e6bf64d1d3048c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -326,6 +326,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -227,15 +227,15 @@ index dc7da3b806d1c759958d7c51b05efbc4b6c42653..69bf112655615337e0df3ea56b9e42fa this.availableGoals.stream().filter((wrappedGoal) -> { return wrappedGoal.getGoal() == goal; diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java -index 065d0752db0e3ae2a89d707aaa2145807f50ecad..c93805ae832d049ea13ca495b778ed52381b1f78 100644 +index 27ea9c10b7f66c2133b0829c0b1c37143dd80b56..c28ade67f6a59146064a57bf016a646197f47ac4 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java @@ -14,7 +14,7 @@ public abstract class MoveToBlockGoal extends Goal { protected int nextStartTick; protected int tryTicks; private int maxStayTicks; -- protected BlockPos blockPos = BlockPos.ZERO; public final BlockPos getTargetPosition() { return this.blockPos; } // Paper - OBFHELPER -+ protected BlockPos blockPos = BlockPos.ZERO; public final BlockPos getTargetPosition() { return this.blockPos; } public void setTargetPosition(BlockPos pos) { this.blockPos = pos; mob.movingTarget = pos != BlockPos.ZERO ? pos : null; } // Paper - OBFHELPER +- protected BlockPos blockPos = BlockPos.ZERO; @Deprecated public final BlockPos getTargetPosition() { return this.blockPos; } // Paper - OBFHELPER ++ protected BlockPos blockPos = BlockPos.ZERO; @Deprecated public final BlockPos getTargetPosition() { return this.blockPos; } @Deprecated public void setTargetPosition(BlockPos pos) { this.blockPos = pos; mob.movingTarget = pos != BlockPos.ZERO ? pos : null; } // Paper - OBFHELPER private boolean reachedTarget; private final int searchRange; private final int verticalSearchRange; @@ -317,7 +317,7 @@ index 555cf6d39108d40998adbbaf6b09dd9973f5f2e3..426fa33c9e5ddf2de5435859ee4a5f35 super.customServerAiStep(); } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 6acff46faa03842567d5fe81609bec6ea7922c21..dea7d392d12ce088fd0708e73a5938d77b10069c 100644 +index 76ef2337d87b6ae3f190d4bd5410b04af917a507..fff1d38e07439ab1bc83aa9e7153b3666a351129 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -154,6 +154,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0367-Anti-Xray.patch b/patches/server/0367-Anti-Xray.patch index bab94340f9..a8bad7a2d4 100644 --- a/patches/server/0367-Anti-Xray.patch +++ b/patches/server/0367-Anti-Xray.patch @@ -1107,7 +1107,7 @@ index c28879f32b004f36ff746ea2274f91ddd9501e71..7762d8ff94f856d613a6f50311006b69 + // Paper end } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 513876fc53fe5790e5bc6271a1a9ec345a614b98..c8cc8fa2d210acf82d9c3fa96c0b0c3912dec4d8 100644 +index badac53382c776eba3efccfda42283912d07b99a..06e581bc0c0ea4e8141f7b9610cc5a7ef350c287 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1485,7 +1485,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1155,7 +1155,7 @@ index f4a056185990181e486f452960159a5287947382..a695e5a0c2e8846333ccb9aea499b565 public void destroyAndAck(BlockPos pos, ServerboundPlayerActionPacket.Action action, String reason) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index dea7d392d12ce088fd0708e73a5938d77b10069c..7357319e9186c9ffd878268ed9c1f4846ceb3ea9 100644 +index fff1d38e07439ab1bc83aa9e7153b3666a351129..7e4949155914a8ea5612080bd4a13ce63c2b10d7 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -164,6 +164,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1231,7 +1231,7 @@ index 69c2454533e6f21c70792b555ec02c6bc6d169b3..2607c7ba5cf1aca5f3e5c22be2e4e8b3 @Override 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 521f199e495f3bec232cc9ca36e51e0392afe737..164df6e9a91d9fbdbf6e4b835ea1946d81f3be55 100644 +index 448f28856387cf9967063dd8c02b34e5e90d95c9..3399ca62de7ae71af7c3f537bac3345b4c46d0a5 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -456,7 +456,7 @@ public class LevelChunk implements ChunkAccess { @@ -1305,7 +1305,7 @@ index 5fd66020a937b641e2a060cf38df731a43f3bf55..ec8b67c1b024df38d5e1ad81acff3353 public int getSerializedSize() { diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 5ea60bbb56450502f1ceb41959239ab579458ac2..66175691af9417275dee33bbc07c6826e807d571 100644 +index 3dfe539a9ca08d85ddbcc334cfec0734bf92f348..bb3311edffb7a460df8321f00d7d1d9f26c6340e 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -28,6 +28,7 @@ public class PalettedContainer implements PaletteResize { @@ -1313,9 +1313,9 @@ index 5ea60bbb56450502f1ceb41959239ab579458ac2..66175691af9417275dee33bbc07c6826 private final Function writer; private final T defaultValue; + private final T[] predefinedObjects; // Paper - Anti-Xray - Add predefined objects - protected BitStorage storage; public final BitStorage getDataBits() { return this.storage; } // Paper - OBFHELPER - private Palette palette; private Palette getDataPalette() { return this.palette; } // Paper - OBFHELPER - private int bits; private int getBitsPerObject() { return this.bits; } // Paper - OBFHELPER + protected BitStorage storage; @Deprecated public final BitStorage getDataBits() { return this.storage; } // Paper - OBFHELPER + private Palette palette; @Deprecated private Palette getDataPalette() { return this.palette; } // Paper - OBFHELPER + private int bits; @Deprecated private int getBitsPerObject() { return this.bits; } // Paper - OBFHELPER @@ -48,15 +49,51 @@ public class PalettedContainer implements PaletteResize { this.lock.release(); } @@ -1380,7 +1380,7 @@ index 5ea60bbb56450502f1ceb41959239ab579458ac2..66175691af9417275dee33bbc07c6826 @@ -161,11 +199,26 @@ public class PalettedContainer implements PaletteResize { } - public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER + @Deprecated public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER - public void write(FriendlyByteBuf buf) { + // Paper start - Anti-Xray - Add chunk packet info + @Deprecated public void write(FriendlyByteBuf buf) { diff --git a/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch b/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch index 17dc66e25a..536def3a19 100644 --- a/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch +++ b/patches/server/0388-Optimise-TickListServer-by-rewriting-it.patch @@ -1053,7 +1053,7 @@ index 702203f4a4fa4fc03c35ec974a97e08ed0f3c67c..609c8ece9e9f151875bf8191cc671206 Iterator iterator = scheduledTicks.iterator(); diff --git a/src/main/java/net/minecraft/world/level/TickNextTickData.java b/src/main/java/net/minecraft/world/level/TickNextTickData.java -index 3b8c04f6ffd7e6c197465aa1caf633ba92529472..6b4b7c290b623a9821734ef74a2e566343e3c5bd 100644 +index 3b8c04f6ffd7e6c197465aa1caf633ba92529472..1007bfc9c19641f42afd5526cfe7bdb61906d1a0 100644 --- a/src/main/java/net/minecraft/world/level/TickNextTickData.java +++ b/src/main/java/net/minecraft/world/level/TickNextTickData.java @@ -9,7 +9,9 @@ public class TickNextTickData { @@ -1061,7 +1061,7 @@ index 3b8c04f6ffd7e6c197465aa1caf633ba92529472..6b4b7c290b623a9821734ef74a2e5663 public final long triggerTick; public final TickPriority priority; - private final long c; -+ private final long c; public final long getId() { return this.c; } // Paper - OBFHELPER ++ private final long c; @Deprecated public final long getId() { return this.c; } // Paper - OBFHELPER + private final int hash; // Paper + public int tickState; // Paper diff --git a/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch index 16a7d2d77d..bd132c3608 100644 --- a/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/patches/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -48,7 +48,7 @@ index 14f88e575f46d81175eaa04b3e7294990e749a14..f758a85306b9df817e60577b7ffcf777 public boolean queueHealthUpdatePacket = false; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java -index 744b58d59a5f34ed3bd6f2d4a0f876acfa6a7135..d75a04e7a70b7fb2527fdd7d1a45a101d064824f 100644 +index 744b58d59a5f34ed3bd6f2d4a0f876acfa6a7135..275d18e33b468e2ca343bb8b2632f0775aef52f4 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java @@ -4,11 +4,12 @@ import java.util.Random; @@ -70,7 +70,7 @@ index 744b58d59a5f34ed3bd6f2d4a0f876acfa6a7135..d75a04e7a70b7fb2527fdd7d1a45a101 public class PatrolSpawner implements CustomSpawner { - private int nextTick; -+ private int nextTick;private int getSpawnDelay() { return nextTick; } private void setSpawnDelay(int spawnDelay) { this.nextTick = spawnDelay; } // Paper - OBFHELPER ++ private int nextTick;@Deprecated private int getSpawnDelay() { return nextTick; } @Deprecated private void setSpawnDelay(int spawnDelay) { this.nextTick = spawnDelay; } // Paper - OBFHELPER public PatrolSpawner() {} diff --git a/patches/server/0405-Optimize-Pathfinding.patch b/patches/server/0405-Optimize-Pathfinding.patch index 4e073805ba..d29c619e3f 100644 --- a/patches/server/0405-Optimize-Pathfinding.patch +++ b/patches/server/0405-Optimize-Pathfinding.patch @@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 69edca1ef95c37b11fe3f793e6a8f8a674bd7f6f..3f4d7552e7f219aec043f0cc06a816758e5a3f66 100644 +index 289494db53d368d56f1abd34abad8ce57e4694b1..9bf3ecfd8267bd4e49bf13fc16fc6d59e4986d10 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -190,9 +190,29 @@ public abstract class PathNavigation { @@ -40,4 +40,4 @@ index 69edca1ef95c37b11fe3f793e6a8f8a674bd7f6f..3f4d7552e7f219aec043f0cc06a81675 + // Paper end } - public boolean setDestination(@Nullable Path pathentity, double speed) { return moveTo(pathentity, speed); } // Paper - OBFHELPER + @Deprecated public boolean setDestination(@Nullable Path pathentity, double speed) { return moveTo(pathentity, speed); } // Paper - OBFHELPER diff --git a/patches/server/0426-Villager-Restocks-API.patch b/patches/server/0426-Villager-Restocks-API.patch index 4212655fc2..abfb0d7b3b 100644 --- a/patches/server/0426-Villager-Restocks-API.patch +++ b/patches/server/0426-Villager-Restocks-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Villager Restocks API diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 426fa33c9e5ddf2de5435859ee4a5f352313869c..124a8eb24bc9428011075925092e99f8159ee1c2 100644 +index 426fa33c9e5ddf2de5435859ee4a5f352313869c..29d8448e1e38c571f6c0019fcb45a9df82eabbe5 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java @@ -127,7 +127,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -13,7 +13,7 @@ index 426fa33c9e5ddf2de5435859ee4a5f352313869c..124a8eb24bc9428011075925092e99f8 private int villagerXp; private long lastRestockGameTime; - private int numberOfRestocksToday; -+ private int numberOfRestocksToday; public int getRestocksToday(){ return this.numberOfRestocksToday; } public void setRestocksToday(int restocksToday){ this.numberOfRestocksToday = restocksToday; } // Paper OBFHELPER ++ private int numberOfRestocksToday; @Deprecated public int getRestocksToday(){ return this.numberOfRestocksToday; } @Deprecated public void setRestocksToday(int restocksToday){ this.numberOfRestocksToday = restocksToday; } // Paper OBFHELPER private long lastRestockCheckDayTime; private boolean assignProfessionWhenSpawned; private static final ImmutableList> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.HOME, MemoryModuleType.JOB_SITE, MemoryModuleType.POTENTIAL_JOB_SITE, MemoryModuleType.MEETING_POINT, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.VISIBLE_VILLAGER_BABIES, MemoryModuleType.NEAREST_PLAYERS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, MemoryModuleType.WALK_TARGET, new MemoryModuleType[]{MemoryModuleType.LOOK_TARGET, MemoryModuleType.INTERACTION_TARGET, MemoryModuleType.BREED_TARGET, MemoryModuleType.PATH, MemoryModuleType.DOORS_TO_CLOSE, MemoryModuleType.NEAREST_BED, MemoryModuleType.HURT_BY, MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.NEAREST_HOSTILE, MemoryModuleType.SECONDARY_JOB_SITE, MemoryModuleType.HIDING_PLACE, MemoryModuleType.HEARD_BELL_TIME, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.LAST_SLEPT, MemoryModuleType.LAST_WOKEN, MemoryModuleType.LAST_WORKED_AT_POI, MemoryModuleType.GOLEM_DETECTED_RECENTLY}); diff --git a/patches/server/0431-Implement-Mob-Goal-API.patch b/patches/server/0431-Implement-Mob-Goal-API.patch index ac8cef16a6..bc0a20c821 100644 --- a/patches/server/0431-Implement-Mob-Goal-API.patch +++ b/patches/server/0431-Implement-Mob-Goal-API.patch @@ -857,7 +857,7 @@ index 9df0006c1a283f77c4d01d9fce9062fc1c9bbb1f..b3329c6fcd6758a781a51f5ba8f5052a + } } diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java b/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java -index 8c2ec30a35e86f2b30863045b586a67e485c624b..a20faf55488baa31d7f8bf8231e3e8258b91cdc8 100644 +index 8c2ec30a35e86f2b30863045b586a67e485c624b..5a92574307bc27a18a383f1356a7007e1dd15f9c 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java @@ -6,9 +6,17 @@ public abstract class Goal { @@ -873,10 +873,10 @@ index 8c2ec30a35e86f2b30863045b586a67e485c624b..a20faf55488baa31d7f8bf8231e3e825 + } + // Paper end + -+ public boolean canUse() { return this.shouldActivate(); } public boolean shouldActivate() { return false;} public boolean shouldActivate2() { return canUse(); } // Paper - OBFHELPER, for both directions... ++ public boolean canUse() { return this.shouldActivate(); } @Deprecated public boolean shouldActivate() { return false;} @Deprecated public boolean shouldActivate2() { return canUse(); } // Paper - OBFHELPER, for both directions... - public boolean canContinueToUse() { -+ public boolean canContinueToUse() { return this.shouldStayActive(); } public boolean shouldStayActive2() { return canContinueToUse(); } public boolean shouldStayActive() { // Paper - OBFHELPER, for both directions... ++ public boolean canContinueToUse() { return this.shouldStayActive(); } @Deprecated public boolean shouldStayActive2() { return canContinueToUse(); } @Deprecated public boolean shouldStayActive() { // Paper - OBFHELPER, for both directions... return this.canUse(); } @@ -885,7 +885,7 @@ index 8c2ec30a35e86f2b30863045b586a67e485c624b..a20faf55488baa31d7f8bf8231e3e825 } - public void setFlags(EnumSet controls) { -+ public void setFlags(EnumSet controls) { this.setTypes(controls); } public void setTypes(EnumSet enumset) { // Paper - OBFHELPER ++ @Deprecated public void setFlags(EnumSet controls) { this.setTypes(controls); } public void setTypes(EnumSet enumset) { // Paper - OBFHELPER // Paper start - remove streams from pathfindergoalselector this.goalTypes.clear(); - this.goalTypes.addAllUnchecked(controls); diff --git a/patches/server/0434-Add-villager-reputation-API.patch b/patches/server/0434-Add-villager-reputation-API.patch index 18e7254c2a..1a27f00655 100644 --- a/patches/server/0434-Add-villager-reputation-API.patch +++ b/patches/server/0434-Add-villager-reputation-API.patch @@ -62,14 +62,14 @@ index 2e342e1c258180dc02080f76385351c0a65eade2..39c0fbae8b94dabd27ee8687015557c6 static class GossipEntry { diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 124a8eb24bc9428011075925092e99f8159ee1c2..23ea91449a04e8457273db34c4a388bdf85d7dfc 100644 +index 29d8448e1e38c571f6c0019fcb45a9df82eabbe5..2a3dcabead39d74532613b8fc28924ec251e2d85 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java @@ -1080,6 +1080,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler this.numberOfRestocksToday = 0; } -+ public GossipContainer getReputation() { return this.getGossips(); } // Paper - OBFHELPER ++ @Deprecated public GossipContainer getReputation() { return this.getGossips(); } // Paper - OBFHELPER public GossipContainer getGossips() { return this.gossips; } diff --git a/patches/server/0441-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/0441-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch index 395498f30b..3985934ccc 100644 --- a/patches/server/0441-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch +++ b/patches/server/0441-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ensure EntityRaider respects game and entity rules for diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java -index 37f4becb39d6d4c13aa0c3901ed123083518cdbf..49028fef0706a4413e446c337750f31e756e8de1 100644 +index 37f4becb39d6d4c13aa0c3901ed123083518cdbf..19d1070afc7f6af92beb1fe7e90b67358596eca3 100644 --- a/src/main/java/net/minecraft/world/entity/raid/Raider.java +++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java @@ -305,7 +305,7 @@ public abstract class Raider extends PatrollingMonster { @@ -14,7 +14,7 @@ index 37f4becb39d6d4c13aa0c3901ed123083518cdbf..49028fef0706a4413e446c337750f31e public class ObtainRaidLeaderBannerGoal extends Goal { - private final T mob; -+ private final T mob; private T getRaider() { return mob; } // Paper - obfhelper ++ private final T mob; @Deprecated private T getRaider() { return mob; } // Paper - obfhelper public ObtainRaidLeaderBannerGoal(T entityraider) { // CraftBukkit - decompile error this.mob = entityraider; diff --git a/patches/server/0473-Support-old-UUID-format-for-NBT.patch b/patches/server/0473-Support-old-UUID-format-for-NBT.patch index 9fd9265bf0..f7713f9782 100644 --- a/patches/server/0473-Support-old-UUID-format-for-NBT.patch +++ b/patches/server/0473-Support-old-UUID-format-for-NBT.patch @@ -8,12 +8,12 @@ We have stored UUID in plenty of places that did not get DFU'd So just look for old format and load it if it exists. diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java -index 1aa3af8c7714b2c850fb4264c863db8e639e6284..2a805d6bbeede50898d36258976ff25ee0aea165 100644 +index c25d605e7cd59ffd69d60d53c145c531e092cdb3..cb2a9b262a918b9c410fcfd9d25e85109dbb1ba0 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java @@ -121,6 +121,12 @@ public class CompoundTag implements Tag { - public void setUUID(String prefix, UUID uuid) { putUUID(prefix, uuid); } // Paper - OBFHELPER + @Deprecated public void setUUID(String prefix, UUID uuid) { putUUID(prefix, uuid); } // Paper - OBFHELPER public void putUUID(String key, UUID value) { + // Paper start - support old format + if (this.contains(key + "Most", 99) && this.contains(key + "Least", 99)) { diff --git a/patches/server/0481-Add-entity-liquid-API.patch b/patches/server/0481-Add-entity-liquid-API.patch index e633220227..8f896d4f83 100644 --- a/patches/server/0481-Add-entity-liquid-API.patch +++ b/patches/server/0481-Add-entity-liquid-API.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Add entity liquid API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7bfd4d85f5af889f6d6e13087331af12ea141238..2a0f72b98d025f1f140d9118937d41e7b172be60 100644 +index 4b9af76f9d73b3bdddab2bcaa2b6b2e733ff3e0f..b85537f70f99b245bf15b703898ae69ad5c122e8 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1339,7 +1339,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n return this.isInWater() || this.isInRain(); } -- public final boolean isInWaterOrRainOrBubble() { return isInWaterRainOrBubble(); } // Paper - OBFHELPER +- @Deprecated public final boolean isInWaterOrRainOrBubble() { return isInWaterRainOrBubble(); } // Paper - OBFHELPER public boolean isInWaterRainOrBubble() { return this.isInWater() || this.isInRain() || this.isInBubbleColumn(); } diff --git a/patches/server/0482-Update-itemstack-legacy-name-and-lore.patch b/patches/server/0482-Update-itemstack-legacy-name-and-lore.patch index 629f47345b..f317d9326a 100644 --- a/patches/server/0482-Update-itemstack-legacy-name-and-lore.patch +++ b/patches/server/0482-Update-itemstack-legacy-name-and-lore.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Update itemstack legacy name and lore diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 2fd3d56768f9121c1e5de3f193258bb360bb103b..b513fa552440da7a722dfe8cbf92e7294495cd67 100644 +index 2fd3d56768f9121c1e5de3f193258bb360bb103b..d74f5a722e566143472dd2e23cb1eb1233f369ae 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -170,6 +170,44 @@ public final class ItemStack { @@ -65,7 +65,7 @@ index 2fd3d56768f9121c1e5de3f193258bb360bb103b..b513fa552440da7a722dfe8cbf92e729 } } -+ @Nullable public CompoundTag getSubTag(String s) { return getTagElement(s); } // Paper - OBFHELPER ++ @Deprecated @Nullable public CompoundTag getSubTag(String s) { return getTagElement(s); } // Paper - OBFHELPER @Nullable public CompoundTag getTagElement(String key) { return this.tag != null && this.tag.contains(key, 10) ? this.tag.getCompound(key) : null; diff --git a/patches/server/0500-Fix-some-rails-connecting-improperly.patch b/patches/server/0500-Fix-some-rails-connecting-improperly.patch index 39dfbdd227..847aa14164 100644 --- a/patches/server/0500-Fix-some-rails-connecting-improperly.patch +++ b/patches/server/0500-Fix-some-rails-connecting-improperly.patch @@ -29,7 +29,7 @@ index 2335e7af6bc16a0d65c7818c316f3194c680c69d..63c7f2cf530ac9562960ae5a3cbc6e51 boolean flag1 = false; List list = this.getInteractingMinecartOfType(world, pos, AbstractMinecart.class, (entity) -> { diff --git a/src/main/java/net/minecraft/world/level/block/RailState.java b/src/main/java/net/minecraft/world/level/block/RailState.java -index a205e04bce8706302e4a077646749d05dee98251..0f24187dc3f1340d142f88cbac64c4f5c333e5b8 100644 +index a205e04bce8706302e4a077646749d05dee98251..abb388df212b2feabcaa2f9b4576a0d9dbf4db4b 100644 --- a/src/main/java/net/minecraft/world/level/block/RailState.java +++ b/src/main/java/net/minecraft/world/level/block/RailState.java @@ -10,13 +10,19 @@ import net.minecraft.world.level.block.state.BlockState; @@ -38,11 +38,11 @@ index a205e04bce8706302e4a077646749d05dee98251..0f24187dc3f1340d142f88cbac64c4f5 public class RailState { - private final Level level; - private final BlockPos pos; -+ private final Level level; public final Level getWorld() { return this.level; } // Paper - OBFHELPER -+ private final BlockPos pos; public final BlockPos getPos() { return this.pos; } // Paper - OBFHELPER ++ private final Level level; @Deprecated public final Level getWorld() { return this.level; } // Paper - OBFHELPER ++ private final BlockPos pos; @Deprecated public final BlockPos getPos() { return this.pos; } // Paper - OBFHELPER private final BaseRailBlock block; - private BlockState state; -+ private BlockState state; public final BlockState getRailState() { return this.state; } // Paper - OBFHELPER ++ private BlockState state; @Deprecated public final BlockState getRailState() { return this.state; } // Paper - OBFHELPER private final boolean isStraight; private final List connections = Lists.newArrayList(); diff --git a/patches/server/0510-Prevent-headless-pistons-from-being-created.patch b/patches/server/0510-Prevent-headless-pistons-from-being-created.patch index a8508e9361..7a5c642dd9 100644 --- a/patches/server/0510-Prevent-headless-pistons-from-being-created.patch +++ b/patches/server/0510-Prevent-headless-pistons-from-being-created.patch @@ -60,14 +60,14 @@ index a12af10e28f2d023ba6f916b5e7a53539416713f..822a8dbfaea0a312c4eb2849f2386ecd d4 += d0 * 0.30000001192092896D; diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -index 87bedba9ab495edcce289c6665271d92b7165944..985f1112963c3b644a88788a6b4f8a9bd5f5c11a 100644 +index 87bedba9ab495edcce289c6665271d92b7165944..4a6ee6a01aeb6c09149c7a16230399abaec5fd91 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java @@ -66,6 +66,8 @@ public class PistonMovingBlockEntity extends BlockEntity { return this.direction; } -+ public final boolean isHead() { return this.isSourcePiston(); } // Paper - OBFHELPER ++ @Deprecated public final boolean isHead() { return this.isSourcePiston(); } // Paper - OBFHELPER + public boolean isSourcePiston() { return this.isSourcePiston; diff --git a/patches/server/0519-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/patches/server/0519-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch index 780431dddb..7d72081e5d 100644 --- a/patches/server/0519-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch +++ b/patches/server/0519-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch @@ -6,14 +6,14 @@ Subject: [PATCH] Add a way to get translation keys for blocks, entities and diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index f38ccdecbade43983358dfbeadca86be7d15a68c..bd51753e3afaa5e025583964b16851dfa5dc8796 100644 +index f38ccdecbade43983358dfbeadca86be7d15a68c..a8d9df5a31ba5d2ff01a7a7b3e99faa47e5eb1ef 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java @@ -290,6 +290,7 @@ public class EntityType implements EntityTypeTest { return Registry.ENTITY_TYPE.getKey(type); } -+ public static Optional> getByName(String name) { return byString(name); } // Paper - OBFHELPER ++ @Deprecated public static Optional> getByName(String name) { return byString(name); } // Paper - OBFHELPER public static Optional> byString(String id) { return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse(id)); } diff --git a/patches/server/0677-call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/0677-call-PortalCreateEvent-players-and-end-platform.patch index e572442162..8ce7ff7b23 100644 --- a/patches/server/0677-call-PortalCreateEvent-players-and-end-platform.patch +++ b/patches/server/0677-call-PortalCreateEvent-players-and-end-platform.patch @@ -5,14 +5,14 @@ Subject: [PATCH] call PortalCreateEvent players and end platform diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java -index 1c980abc4fb5cab2a6dc9d1a8a3e8fdd0a7e3a4b..ad444adbd1dc17c52689a2b04ef3fea23fa746ed 100644 +index 1c980abc4fb5cab2a6dc9d1a8a3e8fdd0a7e3a4b..5c194f32f273350afcc33ec8b4d4a3e5ee599836 100644 --- a/src/main/java/net/minecraft/core/BlockPos.java +++ b/src/main/java/net/minecraft/core/BlockPos.java @@ -522,6 +522,7 @@ public class BlockPos extends Vec3i { return this.set(this.getX() + direction.getStepX() * distance, this.getY() + direction.getStepY() * distance, this.getZ() + direction.getStepZ() * distance); } -+ public BlockPos.MutableBlockPos withOffset(int x, int y, int z) { return move(x, y, z); } // Paper - OBFHELPER ++ @Deprecated public BlockPos.MutableBlockPos withOffset(int x, int y, int z) { return move(x, y, z); } // Paper - OBFHELPER public BlockPos.MutableBlockPos move(int dx, int dy, int dz) { return this.set(this.getX() + dx, this.getY() + dy, this.getZ() + dz); }