From 62fabeca0c63bb59ae660ec2fffb0c49067549d3 Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Thu, 17 Jun 2021 21:52:26 +0200 Subject: [PATCH] deprecate all obfhelpers --- .../Ability-to-apply-mending-to-XP-API.patch | 2 +- .../Add-LivingEntity-getTargetEntity.patch | 2 +- .../Add-PlayerConnectionCloseEvent.patch | 4 +- patches/server/Add-World-Util-Methods.patch | 2 +- ...-translation-keys-for-blocks-entitie.patch | 2 +- patches/server/Add-entity-liquid-API.patch | 2 +- patches/server/Add-more-Witch-API.patch | 2 +- .../server/Add-villager-reputation-API.patch | 2 +- ...d-mobs-to-jump-and-take-water-damage.patch | 4 +- patches/server/Anti-Xray.patch | 8 ++-- .../Asynchronous-chunk-IO-and-loading.patch | 2 +- .../Do-not-load-chunks-for-Pathfinding.patch | 4 +- ...der-respects-game-and-entity-rules-f.patch | 2 +- .../server/Entity-Activation-Range-2.0.patch | 4 +- patches/server/EntityPathfindEvent.patch | 2 +- ...PI-for-Reason-Source-Triggering-play.patch | 2 +- .../Fix-World-isChunkGenerated-calls.patch | 2 +- ...Fix-some-rails-connecting-improperly.patch | 6 +-- patches/server/Implement-Mob-Goal-API.patch | 6 +-- patches/server/Improve-death-events.patch | 2 +- patches/server/MC-Utils.patch | 42 +++++++++---------- patches/server/Mob-Pathfinding-API.patch | 28 ++++++------- ...imise-TickListServer-by-rewriting-it.patch | 2 +- patches/server/Optimize-Pathfinding.patch | 2 +- ...spawn-settings-and-per-player-option.patch | 2 +- .../server/Player-affects-spawning-API.patch | 2 +- ...-headless-pistons-from-being-created.patch | 2 +- patches/server/RangedEntity-API.patch | 2 +- .../Support-old-UUID-format-for-NBT.patch | 2 +- patches/server/Timings-v2.patch | 4 +- patches/server/Turtle-API.patch | 2 +- ...pdate-itemstack-legacy-name-and-lore.patch | 2 +- .../Use-ConcurrentHashMap-in-JsonList.patch | 2 - patches/server/Villager-Restocks-API.patch | 2 +- ...CreateEvent-players-and-end-platform.patch | 2 +- ...rt-serverside-behavior-of-keepalives.patch | 6 +-- 36 files changed, 82 insertions(+), 84 deletions(-) diff --git a/patches/server/Ability-to-apply-mending-to-XP-API.patch b/patches/server/Ability-to-apply-mending-to-XP-API.patch index 973490692e..d4132ad311 100644 --- a/patches/server/Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/Ability-to-apply-mending-to-XP-API.patch @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - @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/Add-LivingEntity-getTargetEntity.patch b/patches/server/Add-LivingEntity-getTargetEntity.patch index 7519459f08..27141642ac 100644 --- a/patches/server/Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/Add-LivingEntity-getTargetEntity.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/patches/server/Add-PlayerConnectionCloseEvent.patch b/patches/server/Add-PlayerConnectionCloseEvent.patch index 45d0c6d036..18f6aaa812 100644 --- a/patches/server/Add-PlayerConnectionCloseEvent.patch +++ b/patches/server/Add-PlayerConnectionCloseEvent.patch @@ -73,11 +73,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Add-World-Util-Methods.patch b/patches/server/Add-World-Util-Methods.patch index a9ad2e2066..65b939de3c 100644 --- a/patches/server/Add-World-Util-Methods.patch +++ b/patches/server/Add-World-Util-Methods.patch @@ -59,7 +59,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/patches/server/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch index c5646cc713..e35ab63baf 100644 --- a/patches/server/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch +++ b/patches/server/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Add-entity-liquid-API.patch b/patches/server/Add-entity-liquid-API.patch index e6aea6f55d..a8c4164158 100644 --- a/patches/server/Add-entity-liquid-API.patch +++ b/patches/server/Add-entity-liquid-API.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Add-more-Witch-API.patch b/patches/server/Add-more-Witch-API.patch index 91b6d014b6..5af2f880bf 100644 --- a/patches/server/Add-more-Witch-API.patch +++ b/patches/server/Add-more-Witch-API.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Add-villager-reputation-API.patch b/patches/server/Add-villager-reputation-API.patch index 53e26000fd..40b1fc8d6f 100644 --- a/patches/server/Add-villager-reputation-API.patch +++ b/patches/server/Add-villager-reputation-API.patch @@ -69,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/patches/server/Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index bda84e8246..a8fd62a880 100644 --- a/patches/server/Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/patches/server/Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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(); } @@ -74,7 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Anti-Xray.patch b/patches/server/Anti-Xray.patch index 3b48fec834..a2999a96a4 100644 --- a/patches/server/Anti-Xray.patch +++ b/patches/server/Anti-Xray.patch @@ -1313,9 +1313,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 @@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { this.lock.release(); } @@ -1380,7 +1380,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ 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/Asynchronous-chunk-IO-and-loading.patch b/patches/server/Asynchronous-chunk-IO-and-loading.patch index 93a2954b0e..f76277bfba 100644 --- a/patches/server/Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/Asynchronous-chunk-IO-and-loading.patch @@ -2631,7 +2631,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } -+ public PoiManager getVillagePlace() { return this.getPoiManager(); } // Paper - OBFHELPER ++ @Deprecated public PoiManager getVillagePlace() { return this.getPoiManager(); } // Paper - OBFHELPER protected PoiManager getPoiManager() { return this.poiManager; } diff --git a/patches/server/Do-not-load-chunks-for-Pathfinding.patch b/patches/server/Do-not-load-chunks-for-Pathfinding.patch index 43ea94ed21..313a9303e9 100644 --- a/patches/server/Do-not-load-chunks-for-Pathfinding.patch +++ b/patches/server/Do-not-load-chunks-for-Pathfinding.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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) { @@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch index 47c534a523..9e454e1101 100644 --- a/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch +++ b/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Entity-Activation-Range-2.0.patch b/patches/server/Entity-Activation-Range-2.0.patch index 9bbcce2a1b..a1d98102c6 100644 --- a/patches/server/Entity-Activation-Range-2.0.patch +++ b/patches/server/Entity-Activation-Range-2.0.patch @@ -234,8 +234,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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; diff --git a/patches/server/EntityPathfindEvent.patch b/patches/server/EntityPathfindEvent.patch index 074bf0f4ec..0877d9edd8 100644 --- a/patches/server/EntityPathfindEvent.patch +++ b/patches/server/EntityPathfindEvent.patch @@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 2faa54877b..8aae5ff2af 100644 --- a/patches/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/patches/server/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -264,7 +264,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Fix-World-isChunkGenerated-calls.patch b/patches/server/Fix-World-isChunkGenerated-calls.patch index da846155c6..f3030e6215 100644 --- a/patches/server/Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/Fix-World-isChunkGenerated-calls.patch @@ -127,7 +127,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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; } diff --git a/patches/server/Fix-some-rails-connecting-improperly.patch b/patches/server/Fix-some-rails-connecting-improperly.patch index 261d3ce634..172074456c 100644 --- a/patches/server/Fix-some-rails-connecting-improperly.patch +++ b/patches/server/Fix-some-rails-connecting-improperly.patch @@ -38,11 +38,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Implement-Mob-Goal-API.patch b/patches/server/Implement-Mob-Goal-API.patch index 97adb19da3..27fb321fc9 100644 --- a/patches/server/Implement-Mob-Goal-API.patch +++ b/patches/server/Implement-Mob-Goal-API.patch @@ -873,10 +873,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - 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/Improve-death-events.patch b/patches/server/Improve-death-events.patch index 89cbf20f03..3e2b2c7849 100644 --- a/patches/server/Improve-death-events.patch +++ b/patches/server/Improve-death-events.patch @@ -197,7 +197,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return SoundEvents.GENERIC_HURT; } -+ public SoundEvent getDeathSoundPublic() { return getDeathSound(); } // Paper - public OBFHELPER ++ @Deprecated public SoundEvent getDeathSoundPublic() { return getDeathSound(); } // Paper - public OBFHELPER @Nullable protected SoundEvent getDeathSound() { return SoundEvents.GENERIC_DEATH; diff --git a/patches/server/MC-Utils.patch b/patches/server/MC-Utils.patch index 461b5989f6..61070a0fc8 100644 --- a/patches/server/MC-Utils.patch +++ b/patches/server/MC-Utils.patch @@ -2323,7 +2323,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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)); } @@ -3441,9 +3441,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - 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 @@ -3523,7 +3523,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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; @@ -3580,7 +3580,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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) { @@ -3781,8 +3781,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - @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); @@ -3867,7 +3867,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 }; @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 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 @@ -4107,12 +4107,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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); @@ -4125,7 +4125,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 - 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 } -+ 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(); @@ -4190,7 +4190,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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) { @@ -4202,7 +4202,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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); @@ -4214,7 +4214,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Mob-Pathfinding-API.patch b/patches/server/Mob-Pathfinding-API.patch index 5d58d5d851..d0e0827345 100644 --- a/patches/server/Mob-Pathfinding-API.patch +++ b/patches/server/Mob-Pathfinding-API.patch @@ -159,7 +159,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Nullable - public final Path createPath(double x, double y, double z, int distance) { -+ public final Path calculateDestination(double d0, double d1, double d2) { return createPath(d0, d1, d2, 0); } public final Path createPath(double x, double y, double z, int distance) { // Paper - OBFHELPER ++ @Deprecated public final Path calculateDestination(double d0, double d1, double d2) { return createPath(d0, d1, d2, 0); } public final Path createPath(double x, double y, double z, int distance) { // Paper - OBFHELPER return this.createPath(new BlockPos(x, y, z), distance); } @@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return path != null && this.moveTo(path, speed); } -+ 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 public boolean moveTo(@Nullable Path path, double speed) { if (path == null) { this.path = null; @@ -185,7 +185,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - @Nullable -+ @Nullable public Path getPathEntity() { return getPath(); } @Nullable // Paper - OBFHELPER ++ @Deprecated @Nullable public Path getPathEntity() { return getPath(); } @Nullable // Paper - OBFHELPER public Path getPath() { return this.path; } @@ -193,7 +193,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return !this.isDone(); } -+ public void stopPathfinding() { stop(); } // Paper - OBFHELPER ++ @Deprecated public void stopPathfinding() { stop(); } // Paper - OBFHELPER public void stop() { this.path = null; } @@ -208,9 +208,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - public final int x; - public final int y; - public final int z; -+ public final int x; public final int getX() { return x; } // Paper - OBFHELPER -+ public final int y; public final int getY() { return y; } // Paper - OBFHELPER -+ public final int z; public final int getZ() { return z; } // Paper - OBFHELPER ++ public final int x; @Deprecated public final int getX() { return x; } // Paper - OBFHELPER ++ public final int y; @Deprecated public final int getY() { return y; } // Paper - OBFHELPER ++ public final int z; @Deprecated public final int getZ() { return z; } // Paper - OBFHELPER private final int hash; public int heapIdx = -1; public float g; @@ -225,9 +225,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - protected boolean canPassDoors; - protected boolean canOpenDoors; - protected boolean canFloat; -+ protected boolean canPassDoors; public boolean shouldPassDoors() { return canPassDoors; } public void setShouldPassDoors(boolean b) { canPassDoors = b; } // Paper - obfhelper -+ protected boolean canOpenDoors; public boolean shouldOpenDoors() { return canOpenDoors; } public void setShouldOpenDoors(boolean b) { canOpenDoors = b; } // Paper - obfhelper -+ protected boolean canFloat; public boolean shouldFloat() { return canFloat; } public void setShouldFloat(boolean b) { canFloat = b; } // Paper - obfhelper ++ protected boolean canPassDoors; @Deprecated public boolean shouldPassDoors() { return canPassDoors; } @Deprecated public void setShouldPassDoors(boolean b) { canPassDoors = b; } // Paper - obfhelper ++ protected boolean canOpenDoors; @Deprecated public boolean shouldOpenDoors() { return canOpenDoors; } @Deprecated public void setShouldOpenDoors(boolean b) { canOpenDoors = b; } // Paper - obfhelper ++ protected boolean canFloat; @Deprecated public boolean shouldFloat() { return canFloat; } @Deprecated public void setShouldFloat(boolean b) { canFloat = b; } // Paper - obfhelper public void prepare(PathNavigationRegion cachedWorld, Mob entity) { this.level = cachedWorld; @@ -240,12 +240,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public class Path { - private final List 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 @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 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - 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/Optimise-TickListServer-by-rewriting-it.patch b/patches/server/Optimise-TickListServer-by-rewriting-it.patch index 83a1a167f7..0960ce08fc 100644 --- a/patches/server/Optimise-TickListServer-by-rewriting-it.patch +++ b/patches/server/Optimise-TickListServer-by-rewriting-it.patch @@ -1061,7 +1061,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Optimize-Pathfinding.patch b/patches/server/Optimize-Pathfinding.patch index b73a05b281..d89486cd3e 100644 --- a/patches/server/Optimize-Pathfinding.patch +++ b/patches/server/Optimize-Pathfinding.patch @@ -40,4 +40,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // 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/Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch index e1bdf8b19b..718f292b55 100644 --- a/patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -70,7 +70,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Player-affects-spawning-API.patch b/patches/server/Player-affects-spawning-API.patch index 8636a07770..7e48a6b3d4 100644 --- a/patches/server/Player-affects-spawning-API.patch +++ b/patches/server/Player-affects-spawning-API.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Prevent-headless-pistons-from-being-created.patch b/patches/server/Prevent-headless-pistons-from-being-created.patch index 817ed0c1e2..188ed5fdfb 100644 --- a/patches/server/Prevent-headless-pistons-from-being-created.patch +++ b/patches/server/Prevent-headless-pistons-from-being-created.patch @@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/RangedEntity-API.patch b/patches/server/RangedEntity-API.patch index 54eaf1d35b..d304517f18 100644 --- a/patches/server/RangedEntity-API.patch +++ b/patches/server/RangedEntity-API.patch @@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Support-old-UUID-format-for-NBT.patch b/patches/server/Support-old-UUID-format-for-NBT.patch index 2ce312717e..aaa8f2cff4 100644 --- a/patches/server/Support-old-UUID-format-for-NBT.patch +++ b/patches/server/Support-old-UUID-format-for-NBT.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java @@ -0,0 +0,0 @@ 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/Timings-v2.patch b/patches/server/Timings-v2.patch index 61202a2bda..5895838434 100644 --- a/patches/server/Timings-v2.patch +++ b/patches/server/Timings-v2.patch @@ -785,8 +785,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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; diff --git a/patches/server/Turtle-API.patch b/patches/server/Turtle-API.patch index c9495c065c..1f3622f2e5 100644 --- a/patches/server/Turtle-API.patch +++ b/patches/server/Turtle-API.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Update-itemstack-legacy-name-and-lore.patch b/patches/server/Update-itemstack-legacy-name-and-lore.patch index 77c90b34bd..6e7e518f1e 100644 --- a/patches/server/Update-itemstack-legacy-name-and-lore.patch +++ b/patches/server/Update-itemstack-legacy-name-and-lore.patch @@ -65,7 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } -+ @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/Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch index bf93199f9f..33c5c83701 100644 --- a/patches/server/Use-ConcurrentHashMap-in-JsonList.patch +++ b/patches/server/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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/patches/server/Villager-Restocks-API.patch b/patches/server/Villager-Restocks-API.patch index 56bce3f675..f011dfa7d6 100644 --- a/patches/server/Villager-Restocks-API.patch +++ b/patches/server/Villager-Restocks-API.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/call-PortalCreateEvent-players-and-end-platform.patch index b5fae41987..350027464f 100644 --- a/patches/server/call-PortalCreateEvent-players-and-end-platform.patch +++ b/patches/server/call-PortalCreateEvent-players-and-end-platform.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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); } diff --git a/patches/server/revert-serverside-behavior-of-keepalives.patch b/patches/server/revert-serverside-behavior-of-keepalives.patch index b572888275..6edfb3e3eb 100644 --- a/patches/server/revert-serverside-behavior-of-keepalives.patch +++ b/patches/server/revert-serverside-behavior-of-keepalives.patch @@ -24,9 +24,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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;