From a1d90ea32f76a6455849ccb2bc49f147d33abfb4 Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Wed, 16 Jun 2021 00:24:12 +0200 Subject: [PATCH] AT bullshit --- build-data/paper.at | 147 ++++++++++++++++++ patches/server/Add-Destroy-Speed-API.patch | 2 +- .../Add-PlayerConnectionCloseEvent.patch | 9 -- .../server/Add-PlayerInitialSpawnEvent.patch | 13 -- .../Add-PlayerUseUnknownEntityEvent.patch | 9 -- ...Add-Raw-Byte-ItemStack-Serialization.patch | 2 +- patches/server/Add-entity-liquid-API.patch | 16 -- patches/server/Add-more-Evoker-API.patch | 19 --- patches/server/Add-more-Zombie-API.patch | 6 +- ...ke-parrots-stay-on-shoulders-despite.patch | 9 -- patches/server/Add-sun-related-API.patch | 13 -- .../server/Add-villager-reputation-API.patch | 9 -- ...llow-delegation-to-vanilla-chunk-gen.patch | 13 -- patches/server/Anti-Xray.patch | 2 +- .../Asynchronous-chunk-IO-and-loading.patch | 61 +------- ...tator-target-events-and-improve-impl.patch | 9 -- patches/server/Chunk-Save-Reattempt.patch | 4 +- patches/server/Chunk-debug-command.patch | 13 -- .../server/Configurable-RCON-IP-address.patch | 13 -- ...onfigurable-door-breaking-difficulty.patch | 18 --- ...move-existing-players-to-world-spawn.patch | 9 -- .../server/Entity-Activation-Range-2.0.patch | 18 --- patches/server/Firework-API-s.patch | 4 +- patches/server/Fix-Light-Command.patch | 13 -- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 9 -- .../Fix-World-isChunkGenerated-calls.patch | 28 +--- ...x-and-optimise-world-force-upgrading.patch | 2 +- ...ient-rendering-skulls-from-same-user.patch | 13 -- patches/server/Here-s-Johnny.patch | 2 +- ...k-Priority-Urgency-System-for-Chunks.patch | 2 +- patches/server/Implement-Mob-Goal-API.patch | 19 +-- .../Implement-Player-Client-Options-API.patch | 13 -- ...er-Thread-Pool-and-Thread-Priorities.patch | 9 -- patches/server/Improve-death-events.patch | 15 +- patches/server/LivingEntity-setKiller.patch | 13 -- ...Load-Chunks-for-Login-Asynchronously.patch | 13 -- ...-API-Replenishable-Lootables-Feature.patch | 35 ----- patches/server/MC-Utils.patch | 78 +--------- patches/server/More-lightning-API.patch | 16 -- ...No-Tick-view-distance-implementation.patch | 21 ++- ...hunkMap-memory-use-for-visibleChunks.patch | 2 +- .../server/Optimize-redstone-algorithm.patch | 9 -- patches/server/Paper-config-files.patch | 47 ------ ...-PlayerChunkMap-adds-crashing-server.patch | 2 +- .../Remove-streams-from-Mob-AI-System.patch | 2 +- ...egionFileCache-and-make-configurable.patch | 2 +- patches/server/SkeletonHorse-Additions.patch | 13 -- patches/server/Turtle-API.patch | 33 ---- 48 files changed, 191 insertions(+), 638 deletions(-) diff --git a/build-data/paper.at b/build-data/paper.at index 84637b2535..98e0759000 100644 --- a/build-data/paper.at +++ b/build-data/paper.at @@ -6,6 +6,152 @@ # Leave out the member and it will apply to the class itself # More info, see here https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers +# Paper config files +public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z +public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;)D +public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;D)D +public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;)I +public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;I)I +public org.spigotmc.SpigotWorldConfig getList(Ljava/lang/String;Ljava/lang/Object;)Ljava/util/List; +public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + +# MC Utils +public net.minecraft.core.Vec3i setX(I)Lnet/minecraft/core/Vec3i; +public net.minecraft.core.Vec3i setY(I)Lnet/minecraft/core/Vec3i; +public net.minecraft.core.Vec3i setZ(I)Lnet/minecraft/core/Vec3i; +public net.minecraft.server.level.ServerChunkCache mainThread +public net.minecraft.server.level.ServerLevel chunkSource +public org.bukkit.craftbukkit.inventory.CraftItemStack handle + +# Add PlayerInitialSpawnEvent +public net.minecraft.world.entity.Entity setRot(FF)V + +# Add PlayerUseUnknownEntityEvent +public net.minecraft.network.protocol.game.ServerboundInteractPacket$ActionType + +# Configurable RCON IP address +public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String; + +# LootTable API +public org.bukkit.craftbukkit.block.CraftBlockEntityState getTileEntity()Lnet/minecraft/world/level/block/entity/BlockEntity; +public org.bukkit.craftbukkit.block.CraftLootable setLootTable(Lorg/bukkit/loot/LootTable;J)V +public org.bukkit.craftbukkit.entity.CraftMinecartContainer setLootTable(Lorg/bukkit/loot/LootTable;J)V + +# Firework API +public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity + +# Add option to make parrots stay +public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V + +# LivingEntity setkiller +public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime + +# SkeletonHore Addittions +public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime + +# Fix client rendering skulls +public net.minecraft.world.item.ItemStack tag + +# Async chunk io +public net.minecraft.server.level.ChunkMap structureManager +public net.minecraft.server.level.ChunkMap getUpdatingChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder; +public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder; +public net.minecraft.server.level.ServerChunkCache mainThreadProcessor +public-f net.minecraft.world.level.chunk.storage.RegionFileStorage +public net.minecraft.world.level.chunk.storage.RegionFileStorage getFile(Lnet/minecraft/world/level/ChunkPos;Z)Lnet/minecraft/world/level/chunk/storage/RegionFile; +public net.minecraft.world.level.chunk.storage.SectionStorage dirty + +# Improve death events +public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent; +public net.minecraft.world.entity.LivingEntity getSoundVolume()F +public net.minecraft.world.entity.ambient.Bat getSoundVolume()F +public net.minecraft.world.entity.monster.Ghast getSoundVolume()F +public net.minecraft.world.entity.monster.Phantom getSoundVolume()F +public net.minecraft.world.entity.animal.Squid getSoundVolume()F +public net.minecraft.world.entity.animal.Wolf getSoundVolume()F + +# Add sun related api +public net.minecraft.world.entity.Mob isSunBurnTick()Z + +# Turtle API +public net.minecraft.world.entity.animal.Turtle getHomePos()Lnet/minecraft/core/BlockPos; +public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V +public net.minecraft.world.entity.animal.Turtle isGoingHome()Z +public net.minecraft.world.entity.animal.Turtle setGoingHome(Z)V +public net.minecraft.world.entity.animal.Turtle isTravelling()Z +public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V + +# Call player spectator target event +public net.minecraft.server.network.ServerGamePacketListenerImpl a(Ljava/util/List;Ljava/util/function/UnaryOperator;Lnet/minecraft/world/item/ItemStack;ILnet/minecraft/world/item/ItemStack;)V # todo fix this mapping + +# Improve Server THread Pool +public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V + +# Add more zombie API +public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z + +# Add PlayerConnectionCloseEvent +public net.minecraft.server.network.ServerLoginPacketListenerImpl$State + +# Entity Activation Range 2.0 +public net.minecraft.world.entity.Entity isInsidePortal +public net.minecraft.world.entity.Mob leashHolder + +# No-Tick view distance +public net.minecraft.server.level.ChunkHolder broadcast(Lnet/minecraft/network/protocol/Packet;Z)V +public net.minecraft.server.level.ChunkMap setViewDistance(I)V +public net.minecraft.server.level.ChunkMap readChunk(Lnet/minecraft/world/level/ChunkPos;)Lnet/minecraft/nbt/CompoundTag; +public net.minecraft.server.level.ChunkMap playerLoadedChunk(Lnet/minecraft/server/level/ServerPlayer;[Lnet/minecraft/network/protocol/Packet;Lnet/minecraft/world/level/chunk/LevelChunk;)V +public net.minecraft.server.level.ChunkMap mainThreadMailbox # todo one of these doesn't belong here + +# Optimise TickListServer +public net.minecraft.world.level.ServerTickList saveTickList(Ljava/util/function/Function;Ljava/lang/Iterable;J)Lnet/minecraft/nbt/ListTag; + +# Don't move existing players to world spawn +public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V + +# Implement Player Client Options API +public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION + +# Fix Longstanding Broken behavior +public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V + +# Load Chunks for Login Async +public net.minecraft.server.level.ServerChunkCache runDistanceManagerUpdates()Z +public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor # todo doesn't belong here but oh well + +# Implement MobGoalApi +public net.minecraft.world.entity.ai.goal.GoalSelector availableGoals + +# Add villager reputation API +public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips +public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips ()V + +# Add entity liquid API +public net.minecraft.world.entity.Entity isInRain()Z +public net.minecraft.world.entity.Entity isInBubbleColumn()Z + +# Allow delegation to vanilla chunk gen +public org.bukkit.craftbukkit.generator.CustomChunkGenerator delegate + +# Optimize redstone algorithm +public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal + +# Add more Evoker API +public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V +public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep; + +# More lightning API +public net.minecraft.world.entity.LightningBolt life +public net.minecraft.world.entity.LightningBolt flashes + +# Configurable door breaking difficulty +public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE +public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE + +# Optimize sending packets to nearby locations (sounds/effects) +public net.minecraft.server.level.ServerLevel players + # Item Rarity API public net.minecraft.world.item.Item rarity @@ -29,3 +175,4 @@ public net.minecraft.util.thread.BlockableEventLoop runAllTasks()V # Chunk debug command public net.minecraft.server.level.ChunkMap entitiesInLevel +public net.minecraft.server.level.ServerLevel players diff --git a/patches/server/Add-Destroy-Speed-API.patch b/patches/server/Add-Destroy-Speed-API.patch index c9a8765903..85196c63a1 100644 --- a/patches/server/Add-Destroy-Speed-API.patch +++ b/patches/server/Add-Destroy-Speed-API.patch @@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public float getDestroySpeed(ItemStack itemStack, boolean considerEnchants) { + net.minecraft.world.item.ItemStack nmsItemStack; + if (itemStack instanceof CraftItemStack) { -+ nmsItemStack = ((CraftItemStack) itemStack).getHandle(); ++ nmsItemStack = ((CraftItemStack) itemStack).handle; + } else { + nmsItemStack = CraftItemStack.asNMSCopy(itemStack); + } diff --git a/patches/server/Add-PlayerConnectionCloseEvent.patch b/patches/server/Add-PlayerConnectionCloseEvent.patch index db993adad9..45d0c6d036 100644 --- a/patches/server/Add-PlayerConnectionCloseEvent.patch +++ b/patches/server/Add-PlayerConnectionCloseEvent.patch @@ -81,12 +81,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final String serverId; @Nullable private ServerPlayer delayedAcceptPlayer; -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener - return new GameProfile(uuid, profile.getName()); - } - -- private static enum State { -+ public static enum State { // Paper - make public - - HELLO, KEY, AUTHENTICATING, NEGOTIATING, READY_TO_ACCEPT, DELAY_ACCEPT, ACCEPTED; - diff --git a/patches/server/Add-PlayerInitialSpawnEvent.patch b/patches/server/Add-PlayerInitialSpawnEvent.patch index ed496480ba..64786e0d05 100644 --- a/patches/server/Add-PlayerInitialSpawnEvent.patch +++ b/patches/server/Add-PlayerInitialSpawnEvent.patch @@ -33,16 +33,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Spigot end // CraftBukkit - Moved message to after join -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n - return d1 * d1 + d2 * d2 + d3 * d3 < radius * radius; - } - -- protected void setRot(float yaw, float pitch) { -+ public void setRot(float yaw, float pitch) { // Paper - protected -> public - // CraftBukkit start - yaw was sometimes set to NaN, so we need to set it back to 0 - if (Float.isNaN(yaw)) { - yaw = 0; diff --git a/patches/server/Add-PlayerUseUnknownEntityEvent.patch b/patches/server/Add-PlayerUseUnknownEntityEvent.patch index 0e895b9b16..659f33894c 100644 --- a/patches/server/Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/Add-PlayerUseUnknownEntityEvent.patch @@ -19,15 +19,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final boolean usingSecondaryAction; static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() { @Override -@@ -0,0 +0,0 @@ public class ServerboundInteractPacket implements Packet public - INTERACT(ServerboundInteractPacket.InteractionAction::new), - ATTACK((friendlyByteBuf) -> { - return ServerboundInteractPacket.ATTACK_ACTION; diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/patches/server/Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/Add-Raw-Byte-ItemStack-Serialization.patch index 6f285725c8..e165b9612d 100644 --- a/patches/server/Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/server/Add-Raw-Byte-ItemStack-Serialization.patch @@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + Preconditions.checkArgument(item.getType() != Material.AIR, "air cannot be serialized"); + + java.io.ByteArrayOutputStream outputStream = new java.io.ByteArrayOutputStream(); -+ CompoundTag compound = (item instanceof CraftItemStack ? ((CraftItemStack) item).getHandle() : CraftItemStack.asNMSCopy(item)).save(new CompoundTag()); ++ CompoundTag compound = (item instanceof CraftItemStack ? ((CraftItemStack) item).handle : CraftItemStack.asNMSCopy(item)).save(new CompoundTag()); + compound.putInt("DataVersion", getDataVersion()); + try { + net.minecraft.nbt.NbtIo.writeCompressed( diff --git a/patches/server/Add-entity-liquid-API.patch b/patches/server/Add-entity-liquid-API.patch index 62e0b362c3..e6aea6f55d 100644 --- a/patches/server/Add-entity-liquid-API.patch +++ b/patches/server/Add-entity-liquid-API.patch @@ -8,22 +8,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n - return this.wasTouchingWater; - } - -- private boolean isInRain() { -+ public boolean isInRain() { // Paper - private -> public - BlockPos blockposition = this.blockPosition(); - - return this.level.isRainingAt(blockposition) || this.level.isRainingAt(new BlockPos((double) blockposition.getX(), this.getBoundingBox().maxY, (double) blockposition.getZ())); - } - -- private boolean isInBubbleColumn() { -+ public boolean isInBubbleColumn() { // Paper - make public - return this.level.getBlockState(this.blockPosition()).is(Blocks.BUBBLE_COLUMN); - } - @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n return this.isInWater() || this.isInRain(); } diff --git a/patches/server/Add-more-Evoker-API.patch b/patches/server/Add-more-Evoker-API.patch index 3cdd4b5a70..0b853fe9ad 100644 --- a/patches/server/Add-more-Evoker-API.patch +++ b/patches/server/Add-more-Evoker-API.patch @@ -4,25 +4,6 @@ Date: Sun, 23 Aug 2020 15:28:35 +0200 Subject: [PATCH] Add more Evoker API -diff --git a/src/main/java/net/minecraft/world/entity/monster/Evoker.java b/src/main/java/net/minecraft/world/entity/monster/Evoker.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Evoker.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Evoker.java -@@ -0,0 +0,0 @@ public class Evoker extends SpellcasterIllager { - return SoundEvents.EVOKER_HURT; - } - -- void setWololoTarget(@Nullable Sheep sheep) { -+ public void setWololoTarget(@Nullable Sheep sheep) { // Paper - make public - this.wololoTarget = sheep; - } - - @Nullable -- Sheep getWololoTarget() { -+ public Sheep getWololoTarget() { // Paper - make public - return this.wololoTarget; - } - diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java diff --git a/patches/server/Add-more-Zombie-API.patch b/patches/server/Add-more-Zombie-API.patch index fb685775bf..d8f3c6c419 100644 --- a/patches/server/Add-more-Zombie-API.patch +++ b/patches/server/Add-more-Zombie-API.patch @@ -30,11 +30,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.lastTick = MinecraftServer.currentTick; // CraftBukkit this.conversionTime = ticksUntilWaterConversion; @@ -0,0 +0,0 @@ public class Zombie extends Monster { - } -+ public boolean isSunSensitivePublic() { return this.isSunSensitive(); } // Paper - public getter - protected boolean isSunSensitive() { + public boolean isSunSensitive() { - return true; + return this.shouldBurnInDay; // Paper - use api value instead } @@ -94,7 +92,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public boolean shouldBurnInDay() { -+ return getHandle().isSunSensitivePublic(); ++ return getHandle().isSunSensitive(); + } + + @Override diff --git a/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch index b5204e8ce5..f720fb5f0b 100644 --- a/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/patches/server/Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -56,12 +56,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } -@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity { - } - } - -- protected void removeEntitiesOnShoulder() { -+ public void removeEntitiesOnShoulder() { // Paper - protected -> public - if (this.timeEntitySatOnShoulder + 20L < this.level.getGameTime()) { - // CraftBukkit start - if (this.spawnEntityFromShoulder(this.getShoulderEntityLeft())) { diff --git a/patches/server/Add-sun-related-API.patch b/patches/server/Add-sun-related-API.patch index dfb99a7327..448a77da13 100644 --- a/patches/server/Add-sun-related-API.patch +++ b/patches/server/Add-sun-related-API.patch @@ -4,19 +4,6 @@ Date: Sun, 7 Oct 2018 00:54:21 -0500 Subject: [PATCH] Add sun related API -diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/Mob.java -+++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity { - - } - -- protected boolean isSunBurnTick() { -+ public boolean isSunBurnTick() { // Paper - protected -> public - if (this.level.isDay() && !this.level.isClientSide) { - float f = this.getBrightness(); - BlockPos blockposition = new BlockPos(this.getX(), this.getEyeY(), this.getZ()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/patches/server/Add-villager-reputation-API.patch b/patches/server/Add-villager-reputation-API.patch index 43ba8e9449..53e26000fd 100644 --- a/patches/server/Add-villager-reputation-API.patch +++ b/patches/server/Add-villager-reputation-API.patch @@ -32,15 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @VisibleForDebug public Map> getGossipEntries() { -@@ -0,0 +0,0 @@ public class GossipContainer { - return i > type.max ? Math.max(type.max, left) : i; - } - -- static class EntityGossips { -+ public static class EntityGossips { // Paper - make public - final Object2IntMap entries = new Object2IntOpenHashMap<>(); - - public int weightedValue(Predicate gossipTypeFilter) { @@ -0,0 +0,0 @@ public class GossipContainer { public void remove(GossipType gossipType) { this.entries.removeInt(gossipType); diff --git a/patches/server/Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/Allow-delegation-to-vanilla-chunk-gen.patch index b7b202f478..820c8124d3 100644 --- a/patches/server/Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/Allow-delegation-to-vanilla-chunk-gen.patch @@ -67,16 +67,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Set getTiles() { return this.tiles; } -diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java -+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java -@@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator.ChunkData; - - public class CustomChunkGenerator extends InternalChunkGenerator { - -- private final net.minecraft.world.level.chunk.ChunkGenerator delegate; -+ public final net.minecraft.world.level.chunk.ChunkGenerator delegate; // Paper - public - private final ChunkGenerator generator; - private final ServerLevel world; - private final Random random = new Random(); diff --git a/patches/server/Anti-Xray.patch b/patches/server/Anti-Xray.patch index c7e4054e1e..870ecfea6d 100644 --- a/patches/server/Anti-Xray.patch +++ b/patches/server/Anti-Xray.patch @@ -1110,7 +1110,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - private void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { + public void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { if (packets[0] == null) { - packets[0] = new ClientboundLevelChunkPacket(chunk); + packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass diff --git a/patches/server/Asynchronous-chunk-IO-and-loading.patch b/patches/server/Asynchronous-chunk-IO-and-loading.patch index d30ad1b1f4..68c2f3cf81 100644 --- a/patches/server/Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/Asynchronous-chunk-IO-and-loading.patch @@ -2369,30 +2369,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final PoiManager poiManager; public final LongSet toDrop; private boolean modified; -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - private final ChunkStatusUpdateListener chunkStatusListener; - public final ChunkMap.ChunkDistanceManager distanceManager; - private final AtomicInteger tickingGenerated; -- private final StructureManager structureManager; -+ public final StructureManager structureManager; // Paper - private -> public - private final File storageFolder; - private final PlayerMap playerMap; - public final Int2ObjectMap entityMap; -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - } - - @Nullable -- protected ChunkHolder getUpdatingChunkIfPresent(long pos) { -+ public final ChunkHolder getUpdatingChunkIfPresent(long pos) { // Paper - protected -> public - return (ChunkHolder) this.updatingChunkMap.get(pos); - } - - @Nullable -- protected ChunkHolder getVisibleChunkIfPresent(long pos) { -+ public final ChunkHolder getVisibleChunkIfPresent(long pos) { // Paper - protected -> public - return (ChunkHolder) this.visibleChunkMap.get(pos); - } - @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public void close() throws IOException { try { @@ -2680,15 +2656,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/sr index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { - final ServerLevel level; - public final Thread mainThread; // Paper - package-private -> public - final ThreadedLevelLightEngine lightEngine; -- private final ServerChunkCache.MainThreadExecutor mainThreadProcessor; -+ public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper - private -> public - public final ChunkMap chunkMap; - private final DimensionDataStorage dataStorage; - private long lastInhabitedUpdate; @@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { return ret; } @@ -3446,16 +3413,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -0,0 +0,0 @@ import net.minecraft.server.MinecraftServer; - import net.minecraft.util.ExceptionCollector; - import net.minecraft.world.level.ChunkPos; - --public final class RegionFileStorage implements AutoCloseable { -+public class RegionFileStorage implements AutoCloseable { // Paper - no final - - public static final String ANVIL_EXTENSION = ".mca"; - private static final int MAX_CACHE_SIZE = 256; -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { this.sync = dsync; } @@ -3471,7 +3429,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return regionfile != null ? regionfile.hasChunk(pos) : false; + } + -+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit // Paper - public ++ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit + return this.getFile(chunkcoordintpair, existingOnly, false); + } + public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly, boolean lock) throws IOException { @@ -3489,7 +3447,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return regionfile; } else { if (this.regionCache.size() >= com.destroystokyo.paper.PaperConfig.regionFileCacheSize) { // Paper - configurable -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { RegionFile regionfile1 = new RegionFile(file1, this.folder, this.sync); this.regionCache.putAndMoveToFirst(i, regionfile1); @@ -3502,7 +3460,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return regionfile1; } } -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { @Nullable public CompoundTag read(ChunkPos pos) throws IOException { // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing @@ -3516,7 +3474,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos); CompoundTag nbttagcompound; -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { } return nbttagcompound; @@ -3532,7 +3490,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper if (nbt == null) { -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { MinecraftServer.LOGGER.error("Failed to save chunk", laste); } // Paper end @@ -3546,7 +3504,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ExceptionCollector exceptionsuppressor = new ExceptionCollector<>(); ObjectIterator objectiterator = this.regionCache.values().iterator(); -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { exceptionsuppressor.throwIfPresent(); } @@ -3570,11 +3528,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - private final IOWorker worker; + // Paper - remove mojang I/O thread private final Long2ObjectMap> storage = new Long2ObjectOpenHashMap<>(); -- private final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet(); -+ public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet(); // Paper - private -> public + public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet(); private final Function> codec; - private final Function factory; - private final DataFixer fixerUpper; @@ -0,0 +0,0 @@ public class SectionStorage implements AutoCloseable { protected final LevelHeightAccessor levelHeightAccessor; diff --git a/patches/server/Call-player-spectator-target-events-and-improve-impl.patch b/patches/server/Call-player-spectator-target-events-and-improve-impl.patch index a00162d522..083ad71631 100644 --- a/patches/server/Call-player-spectator-target-events-and-improve-impl.patch +++ b/patches/server/Call-player-spectator-target-events-and-improve-impl.patch @@ -89,15 +89,6 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - } - } - -- private void a(List list, UnaryOperator unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit -+ public void a(List list, UnaryOperator unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit // Paper - make public - ListTag nbttaglist = new ListTag(); - - if (this.player.isTextFilteringEnabled()) { @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser this.a(x, y, z, yaw, pitch, PlayerTeleportEvent.TeleportCause.UNKNOWN); } diff --git a/patches/server/Chunk-Save-Reattempt.patch b/patches/server/Chunk-Save-Reattempt.patch index a12a50463d..4896724473 100644 --- a/patches/server/Chunk-Save-Reattempt.patch +++ b/patches/server/Chunk-Save-Reattempt.patch @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.util.ExceptionCollector; import net.minecraft.world.level.ChunkPos; -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException { RegionFile regionfile = this.getFile(pos, false); // CraftBukkit @@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (nbt == null) { regionfile.clear(pos); -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { } } diff --git a/patches/server/Chunk-debug-command.patch b/patches/server/Chunk-debug-command.patch index ff3a28cb02..439ccedef9 100644 --- a/patches/server/Chunk-debug-command.patch +++ b/patches/server/Chunk-debug-command.patch @@ -454,19 +454,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final DistanceManager distanceManager; public final ChunkGenerator generator; final ServerLevel level; -diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ServerLevel.java -+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -0,0 +0,0 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl - public static final BlockPos END_SPAWN_POINT = new BlockPos(100, 50, 0); - private static final Logger LOGGER = LogManager.getLogger(); - private static final int EMPTY_TIME_NO_TICK = 300; -- final List players; -+ public final List players; // Paper - package->public - public final ServerChunkCache chunkSource; // Paper - public - private final MinecraftServer server; - public final PrimaryLevelData serverLevelData; // CraftBukkit - type diff --git a/src/main/java/net/minecraft/server/level/Ticket.java b/src/main/java/net/minecraft/server/level/Ticket.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/Ticket.java diff --git a/patches/server/Configurable-RCON-IP-address.patch b/patches/server/Configurable-RCON-IP-address.patch index de07ee2d40..4c9f5b3283 100644 --- a/patches/server/Configurable-RCON-IP-address.patch +++ b/patches/server/Configurable-RCON-IP-address.patch @@ -29,19 +29,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } // CraftBukkit start -diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/dedicated/Settings.java -+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java -@@ -0,0 +0,0 @@ public abstract class Settings> { - } - - @Nullable -- private String getStringRaw(String key) { -+ public String getStringRaw(String key) { // Paper - private -> public - return (String) this.getOverride(key, this.properties.getProperty(key)); // CraftBukkit - } - diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java diff --git a/patches/server/Configurable-door-breaking-difficulty.patch b/patches/server/Configurable-door-breaking-difficulty.patch index 9cfc9dffb7..79052186b7 100644 --- a/patches/server/Configurable-door-breaking-difficulty.patch +++ b/patches/server/Configurable-door-breaking-difficulty.patch @@ -62,15 +62,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java +++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java -@@ -0,0 +0,0 @@ import net.minecraft.world.level.ServerLevelAccessor; - - public class Vindicator extends AbstractIllager { - private static final String TAG_JOHNNY = "Johnny"; -- static final Predicate DOOR_BREAKING_PREDICATE = (difficulty) -> { -+ public static final Predicate DOOR_BREAKING_PREDICATE = (difficulty) -> { // Paper - package private -> public - return difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD; - }; - private boolean isJohnny; public boolean isJohnny() { return this.isJohnny; } public void setJohnny(boolean johnny) { this.isJohnny = johnny; } // Paper - OBFHELPER @@ -0,0 +0,0 @@ public class Vindicator extends AbstractIllager { static class VindicatorBreakDoorGoal extends BreakDoorGoal { @@ -84,15 +75,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -0,0 +0,0 @@ public class Zombie extends Monster { - public static final int REINFORCEMENT_RANGE_MAX = 40; - public static final int REINFORCEMENT_RANGE_MIN = 7; - private static final float BREAK_DOOR_CHANCE = 0.1F; -- private static final Predicate DOOR_BREAKING_PREDICATE = (enumdifficulty) -> { -+ public static final Predicate DOOR_BREAKING_PREDICATE = (enumdifficulty) -> { // Paper - private -> public - return enumdifficulty == Difficulty.HARD; - }; - private final BreakDoorGoal breakDoorGoal; @@ -0,0 +0,0 @@ public class Zombie extends Monster { public Zombie(EntityType type, Level world) { diff --git a/patches/server/Don-t-move-existing-players-to-world-spawn.patch b/patches/server/Don-t-move-existing-players-to-world-spawn.patch index 4f2a5cf0d4..e128b64886 100644 --- a/patches/server/Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/Don-t-move-existing-players-to-world-spawn.patch @@ -22,15 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { - } - // CraftBukkit end - -- private void fudgeSpawnLocation(ServerLevel world) { -+ public void fudgeSpawnLocation(ServerLevel world) { // Paper - private -> public - BlockPos blockposition = world.getSharedSpawnPos(); - - if (world.dimensionType().hasSkyLight() && world.serverLevelData.getGameType() != GameType.ADVENTURE) { // CraftBukkit @@ -0,0 +0,0 @@ public class ServerPlayer extends Player { position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos()); } diff --git a/patches/server/Entity-Activation-Range-2.0.patch b/patches/server/Entity-Activation-Range-2.0.patch index 536e521791..a30d34d63b 100644 --- a/patches/server/Entity-Activation-Range-2.0.patch +++ b/patches/server/Entity-Activation-Range-2.0.patch @@ -127,15 +127,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n - public boolean noCulling; - public boolean hasImpulse; - public int portalCooldown; -- protected boolean isInsidePortal; -+ public boolean isInsidePortal; // Paper - public - protected int portalTime; - protected BlockPos portalEntrancePos; - private boolean invulnerable; @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; @@ -183,15 +174,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/n index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity { - public ResourceLocation lootTable; - public long lootTableSeed; - @Nullable -- private Entity leashHolder; -+ public Entity leashHolder; // Paper - private -> public - private int delayedLeashHolderId; - @Nullable - private CompoundTag leashInfoTag; @@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity { return this.lookControl; } diff --git a/patches/server/Firework-API-s.patch b/patches/server/Firework-API-s.patch index 422b5deb6c..9496737356 100644 --- a/patches/server/Firework-API-s.patch +++ b/patches/server/Firework-API-s.patch @@ -9,11 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java @@ -0,0 +0,0 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { - private int life; public int lifetime; @Nullable -- private LivingEntity attachedToEntity; -+ public LivingEntity attachedToEntity; // Paper - private -> public + public LivingEntity attachedToEntity; + public java.util.UUID spawningEntity; // Paper public FireworkRocketEntity(EntityType type, Level world) { diff --git a/patches/server/Fix-Light-Command.patch b/patches/server/Fix-Light-Command.patch index e0d53a3213..ab5c6074fc 100644 --- a/patches/server/Fix-Light-Command.patch +++ b/patches/server/Fix-Light-Command.patch @@ -133,19 +133,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + }, MinecraftServer.getServer()); + } } -diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ChunkHolder.java -+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -0,0 +0,0 @@ public class ChunkHolder { - - } - -- private void broadcast(Packet packet, boolean onlyOnWatchDistanceEdge) { -+ public void broadcast(Packet packet, boolean onlyOnWatchDistanceEdge) { // Paper - private -> public - this.playerProvider.getPlayers(this.pos, onlyOnWatchDistanceEdge).forEach((entityplayer) -> { - entityplayer.connection.send(packet); - }); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index bdd7bd5469..a5a6926557 100644 --- a/patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -31,15 +31,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/j index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - // Paper end - per player view distance - } - -- protected void addEntity(Entity entity) { -+ public void addEntity(Entity entity) { // Paper - protected -> public - org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot - // Paper start - ignore and warn about illegal addEntity calls instead of crashing server - if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) { @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider .printStackTrace(); return; diff --git a/patches/server/Fix-World-isChunkGenerated-calls.patch b/patches/server/Fix-World-isChunkGenerated-calls.patch index 3b0d5bbd3b..f3a19957df 100644 --- a/patches/server/Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/Fix-World-isChunkGenerated-calls.patch @@ -111,21 +111,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/sr index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { - private static final List CHUNK_STATUSES = ChunkStatus.getStatusList(); public static final List getPossibleChunkStatuses() { return ServerChunkCache.CHUNK_STATUSES; } // Paper - OBFHELPER - private final DistanceManager distanceManager; - public final ChunkGenerator generator; -- final ServerLevel level; -- public final Thread mainThread; // Paper - package-private -> public -- final ThreadedLevelLightEngine lightEngine; -- public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper - private -> public -+ private final ServerLevel level; -+ public final Thread mainThread; // Paper - private -> public -+ private final ThreadedLevelLightEngine lightEngine; -+ public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper private -> public - public final ChunkMap chunkMap; - private final DimensionDataStorage dataStorage; - private long lastInhabitedUpdate; @@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { } // Paper end @@ -134,15 +119,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public ChunkAccess getChunkAtImmediately(int x, int z) { ChunkHolder holder = this.chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (holder == null) { -@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { - return this.lastSpawnState; - } - -- private final class MainThreadExecutor extends BlockableEventLoop { -+ public final class MainThreadExecutor extends BlockableEventLoop { // Paper - package -> public - - MainThreadExecutor(Level world) { - super("Chunk source main thread executor for " + world.dimension().location()); 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java @@ -258,7 +234,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { try { NbtIo.write(nbt, (DataOutput) dataoutputstream); @@ -266,7 +242,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } catch (Throwable throwable) { if (dataoutputstream != null) { try { -@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { } } diff --git a/patches/server/Fix-and-optimise-world-force-upgrading.patch b/patches/server/Fix-and-optimise-world-force-upgrading.patch index eb822e536e..a1ed63431f 100644 --- a/patches/server/Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/Fix-and-optimise-world-force-upgrading.patch @@ -320,7 +320,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { } // Paper start diff --git a/patches/server/Fix-client-rendering-skulls-from-same-user.patch b/patches/server/Fix-client-rendering-skulls-from-same-user.patch index 30e25f3a3c..52bc9ba2cb 100644 --- a/patches/server/Fix-client-rendering-skulls-from-same-user.patch +++ b/patches/server/Fix-client-rendering-skulls-from-same-user.patch @@ -65,19 +65,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.blockEntitiesTags.add(compoundTag); } -diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/item/ItemStack.java -+++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -0,0 +0,0 @@ public final class ItemStack { - private int popTime; - @Deprecated - private Item item; -- private CompoundTag tag; -+ public CompoundTag tag; // Paper private -> public - private boolean emptyCacheFlag; - private Entity entityRepresentation; - private BlockInWorld cachedBreakBlock; diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java diff --git a/patches/server/Here-s-Johnny.patch b/patches/server/Here-s-Johnny.patch index 16164fc315..165cd077e1 100644 --- a/patches/server/Here-s-Johnny.patch +++ b/patches/server/Here-s-Johnny.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java +++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java @@ -0,0 +0,0 @@ public class Vindicator extends AbstractIllager { - static final Predicate DOOR_BREAKING_PREDICATE = (difficulty) -> { + public static final Predicate DOOR_BREAKING_PREDICATE = (difficulty) -> { return difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD; }; - boolean isJohnny; diff --git a/patches/server/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 5cd80642b5..6f04089791 100644 --- a/patches/server/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/patches/server/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1029,7 +1029,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { } - public boolean runDistanceManagerUpdates() { // Paper - packate-private -> public + public boolean runDistanceManagerUpdates() { + if (distanceManager.delayDistanceManagerTick) return false; // Paper boolean flag = this.distanceManager.runAllUpdates(this.chunkMap); boolean flag1 = this.chunkMap.promoteChunkMap(); diff --git a/patches/server/Implement-Mob-Goal-API.patch b/patches/server/Implement-Mob-Goal-API.patch index e2ad26c96f..13375a64bf 100644 --- a/patches/server/Implement-Mob-Goal-API.patch +++ b/patches/server/Implement-Mob-Goal-API.patch @@ -603,7 +603,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + getHandle(craftMob, goal.getTypes()).removeGoal(((PaperVanillaGoal) goal).getHandle()); + } else { + List toRemove = new LinkedList<>(); -+ for (WrappedGoal item : getHandle(craftMob, goal.getTypes()).availableGoals()) { ++ for (WrappedGoal item : getHandle(craftMob, goal.getTypes()).availableGoals) { + if (item.getGoal() instanceof PaperCustomGoal) { + //noinspection unchecked + if (((PaperCustomGoal) item.getGoal()).getHandle() == goal) { @@ -683,7 +683,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public Collection> getAllGoals(T mob, GoalType type) { + CraftMob craftMob = (CraftMob) mob; + Set> goals = new HashSet<>(); -+ for (WrappedGoal item : getHandle(craftMob, type).availableGoals()) { ++ for (WrappedGoal item : getHandle(craftMob, type).availableGoals) { + if (!item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) { + continue; + } @@ -707,7 +707,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (internalType == type) { + continue; + } -+ for (WrappedGoal item : getHandle(craftMob, internalType).availableGoals()) { ++ for (WrappedGoal item : getHandle(craftMob, internalType).availableGoals) { + if (item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) { + continue; + } @@ -919,19 +919,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 MOVE, LOOK, JUMP, -diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -0,0 +0,0 @@ public class GoalSelector { - } - }; - private final Map lockedFlags = new EnumMap<>(Goal.Flag.class); -- private final Set availableGoals = Sets.newLinkedHashSet(); -+ private final Set availableGoals = Sets.newLinkedHashSet(); public final Set availableGoals() { return this.availableGoals; } // Paper - public getter - private final Supplier profiler; - private final EnumSet disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. - private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/patches/server/Implement-Player-Client-Options-API.patch b/patches/server/Implement-Player-Client-Options-API.patch index 4b60795440..9eb2e5f9f3 100644 --- a/patches/server/Implement-Player-Client-Options-API.patch +++ b/patches/server/Implement-Player-Client-Options-API.patch @@ -96,19 +96,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start if (getMainArm() != packet.getMainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); -diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/player/Player.java -+++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity { - private static final int FLY_ACHIEVEMENT_SPEED = 25; - private static final EntityDataAccessor DATA_PLAYER_ABSORPTION_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.FLOAT); - private static final EntityDataAccessor DATA_SCORE_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.INT); -- protected static final EntityDataAccessor DATA_PLAYER_MODE_CUSTOMISATION = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); -+ public static final EntityDataAccessor DATA_PLAYER_MODE_CUSTOMISATION = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); // Paper - protected -> public - protected static final EntityDataAccessor DATA_PLAYER_MAIN_HAND = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); - protected static final EntityDataAccessor DATA_SHOULDER_LEFT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); - protected static final EntityDataAccessor DATA_SHOULDER_RIGHT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch index e50181f9a7..1fbf015998 100644 --- a/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -66,15 +66,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return executorService; } -@@ -0,0 +0,0 @@ public class Util { - throw t instanceof RuntimeException ? (RuntimeException)t : new RuntimeException(t); - } - -- private static void onThreadException(Thread thread, Throwable t) { -+ public static void onThreadException(Thread thread, Throwable t) { // Paper - make public - pauseInIde(t); - if (t instanceof CompletionException) { - t = t.getCause(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/patches/server/Improve-death-events.patch b/patches/server/Improve-death-events.patch index 9d6de22b6c..9d3691b0fc 100644 --- a/patches/server/Improve-death-events.patch +++ b/patches/server/Improve-death-events.patch @@ -194,25 +194,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start public int getExpReward() { @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { - return SoundEvents.GENERIC_HURT; } -+ @Nullable - protected SoundEvent getDeathSound() { -+ public final SoundEvent getDeathSoundPublic() { return this.getDeathSound(); } protected SoundEvent getDeathSound() { // Paper - provide PUBLIC accessor, overrides are hell to deal with ++ protected SoundEvent getDeathSound() { return getDeathSoundPublic(); } public SoundEvent getDeathSoundPublic() { // Paper - public OBFHELPER return SoundEvents.GENERIC_DEATH; } -@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { - - } - -- protected float getSoundVolume() { -+ public final float getSoundVolumePublic() { return this.getSoundVolume(); } protected float getSoundVolume() { // Paper - provide PUBLIC accessor, overrides are hell - return 1.0F; - } - diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java @@ -354,7 +343,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + net.minecraft.sounds.SoundEvent soundEffect = victim.getDeathSoundPublic(); + event.setDeathSound(soundEffect != null ? org.bukkit.craftbukkit.CraftSound.getBukkit(soundEffect) : null); + event.setDeathSoundCategory(org.bukkit.SoundCategory.valueOf(victim.getSoundSource().name())); -+ event.setDeathSoundVolume(victim.getSoundVolumePublic()); ++ event.setDeathSoundVolume(victim.getSoundVolume()); + event.setDeathSoundPitch(victim.getVoicePitch()); + } + diff --git a/patches/server/LivingEntity-setKiller.patch b/patches/server/LivingEntity-setKiller.patch index 5f5f3baeff..38028d9151 100644 --- a/patches/server/LivingEntity-setKiller.patch +++ b/patches/server/LivingEntity-setKiller.patch @@ -4,19 +4,6 @@ Date: Mon, 31 Jul 2017 01:49:48 -0500 Subject: [PATCH] LivingEntity#setKiller -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity { - public float flyingSpeed; - @Nullable - public net.minecraft.world.entity.player.Player lastHurtByPlayer; -- protected int lastHurtByPlayerTime; -+ public int lastHurtByPlayerTime; // Paper - protected -> public - protected boolean dead; - protected int noActionTime; - protected float oRun; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/patches/server/Load-Chunks-for-Login-Asynchronously.patch b/patches/server/Load-Chunks-for-Login-Asynchronously.patch index efb3727ce7..f14b159f86 100644 --- a/patches/server/Load-Chunks-for-Login-Asynchronously.patch +++ b/patches/server/Load-Chunks-for-Login-Asynchronously.patch @@ -4,19 +4,6 @@ Date: Sun, 19 Apr 2020 04:28:29 -0400 Subject: [PATCH] Load Chunks for Login Asynchronously -diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java -+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { - return this.mainThreadProcessor.pollTask(); - } - -- boolean runDistanceManagerUpdates() { -+ public boolean runDistanceManagerUpdates() { // Paper - packate-private -> public - boolean flag = this.distanceManager.runAllUpdates(this.chunkMap); - boolean flag1 = this.chunkMap.promoteChunkMap(); - diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch index ee7e17e206..102124b2b2 100644 --- a/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch @@ -641,19 +641,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)).withOptionalRandomSeed(this.lootTableSeed); if (player != null) { builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player); -diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -@@ -0,0 +0,0 @@ public class CraftBlockEntityState extends CraftBlockStat - } - - // gets the wrapped TileEntity -- protected T getTileEntity() { -+ public T getTileEntity() { // Paper - protected -> public - return this.tileEntity; - } - diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -682,15 +669,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public CraftLootable(Block block, Class tileEntityClass) { super(block, tileEntityClass); -@@ -0,0 +0,0 @@ public abstract class CraftLootable - this.setLootTable(this.getLootTable(), seed); - } - -- private void setLootTable(LootTable table, long seed) { -+ public void setLootTable(LootTable table, long seed) { // Paper - public - ResourceLocation key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey()); - getSnapshot().setLootTable(key, seed); - } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java @@ -704,19 +682,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final CraftInventory inventory; public CraftMinecartChest(CraftServer server, MinecartChest entity) { -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java -@@ -0,0 +0,0 @@ public abstract class CraftMinecartContainer extends CraftMinecart implements Lo - return this.getHandle().lootTableSeed; - } - -- private void setLootTable(LootTable table, long seed) { -+ @Override public void setLootTable(LootTable table, long seed) { // Paper - ResourceLocation newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey()); - this.getHandle().setLootTable(newKey, seed); - } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java diff --git a/patches/server/MC-Utils.patch b/patches/server/MC-Utils.patch index c4561bf821..d1fb9e1949 100644 --- a/patches/server/MC-Utils.patch +++ b/patches/server/MC-Utils.patch @@ -2314,39 +2314,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public BlockPos immutable() { -diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/core/Vec3i.java -+++ b/src/main/java/net/minecraft/core/Vec3i.java -@@ -0,0 +0,0 @@ public class Vec3i implements Comparable { - return this.z; - } - -- protected Vec3i setX(int x) { -+ public Vec3i setX(int x) { // Paper - protected -> public - this.x = x; - return this; - } - -- protected Vec3i setY(int y) { -+ public Vec3i setY(int y) { // Paper - protected -> public - this.y = y; - return this; - } - -- protected Vec3i setZ(int z) { -+ public Vec3i setZ(int z) { // Paper - protected -> public - this.z = z; - return this; - } -@@ -0,0 +0,0 @@ public class Vec3i implements Comparable { - return this.distSqr(pos.x(), pos.y(), pos.z(), true) < distance * distance; - } - -+ @Deprecated public final double distanceSquared(Vec3i baseblockposition) { return distSqr(baseblockposition); } // Paper - OBFHELPER - public double distSqr(Vec3i vec) { - return this.distSqr((double)vec.getX(), (double)vec.getY(), (double)vec.getZ(), true); - } diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java @@ -3171,15 +3138,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public class ServerChunkCache extends ChunkSource { -@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { - private final DistanceManager distanceManager; - public final ChunkGenerator generator; - final ServerLevel level; -- final Thread mainThread; -+ public final Thread mainThread; // Paper - package-private -> public - final ThreadedLevelLightEngine lightEngine; - private final ServerChunkCache.MainThreadExecutor mainThreadProcessor; - public final ChunkMap chunkMap; @@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { @Nullable @VisibleForDebug @@ -3415,15 +3373,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import it.unimi.dsi.fastutil.objects.ObjectIterator; import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; -@@ -0,0 +0,0 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl - private static final Logger LOGGER = LogManager.getLogger(); - private static final int EMPTY_TIME_NO_TICK = 300; - final List players; -- private final ServerChunkCache chunkSource; -+ public final ServerChunkCache chunkSource; // Paper - public - private final MinecraftServer server; - public final PrimaryLevelData serverLevelData; // CraftBukkit - type - final EntityTickList entityTickList; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -3641,7 +3590,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + private org.bukkit.craftbukkit.inventory.CraftItemStack bukkitStack; + public org.bukkit.inventory.ItemStack getBukkitStack() { -+ if (bukkitStack == null || bukkitStack.getHandle() != this) { ++ if (bukkitStack == null || bukkitStack.handle != this) { + bukkitStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this); + } + return bukkitStack; @@ -4349,18 +4298,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public static VoxelShape block() { return BLOCK; } -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack { - } - - net.minecraft.world.item.ItemStack handle; -+ public net.minecraft.world.item.ItemStack getHandle() { return handle; } // Paper - - /** - * Mirror diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -4603,19 +4540,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public WorldBorder getWorldBorder() { throw new UnsupportedOperationException("Not supported yet."); -diff --git a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java -@@ -0,0 +0,0 @@ import java.util.RandomAccess; - public class UnsafeList extends AbstractList implements List, RandomAccess, Cloneable, Serializable { - private static final long serialVersionUID = 8683452581112892191L; - -- private transient Object[] data; -+ private transient Object[] data; public final Object[] getRawDataArray() { return this.data; } // Paper - expose for raw get - private int size; - private int initialCapacity; - diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java diff --git a/patches/server/More-lightning-API.patch b/patches/server/More-lightning-API.patch index 7813fe4bec..8f7f315443 100644 --- a/patches/server/More-lightning-API.patch +++ b/patches/server/More-lightning-API.patch @@ -4,22 +4,6 @@ Date: Sun, 26 Jul 2020 14:44:09 +0200 Subject: [PATCH] More lightning API -diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/LightningBolt.java -+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java -@@ -0,0 +0,0 @@ public class LightningBolt extends Entity { - private static final int START_LIFE = 2; - private static final double DAMAGE_RADIUS = 3.0D; - private static final double DETECTION_RADIUS = 15.0D; -- private int life; -+ public int life; // Paper - private -> public - public long seed; -- private int flashes; -+ public int flashes; // Paper - private -> public - public boolean visualOnly; - @Nullable - private ServerPlayer cause; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java diff --git a/patches/server/No-Tick-view-distance-implementation.patch b/patches/server/No-Tick-view-distance-implementation.patch index 6b5dd263b8..69a7d70bb0 100644 --- a/patches/server/No-Tick-view-distance-implementation.patch +++ b/patches/server/No-Tick-view-distance-implementation.patch @@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ChunkHolder { } - public void broadcast(Packet packet, boolean onlyOnWatchDistanceEdge) { // Paper - private -> public + public void broadcast(Packet packet, boolean onlyOnWatchDistanceEdge) { - this.playerProvider.getPlayers(this.pos, onlyOnWatchDistanceEdge).forEach((entityplayer) -> { - entityplayer.connection.send(packet); - }); @@ -290,12 +290,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return completablefuture1; } @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - } } -- protected void setViewDistance(int watchDistance) { + public void setViewDistance(int watchDistance) { - int j = Mth.clamp(watchDistance + 1, 3, 33); -+ public void setViewDistance(int watchDistance) { // Paper - public + int j = Mth.clamp(watchDistance + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32 if (j != this.viewDistance) { @@ -348,6 +346,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (chunk != null) { this.playerLoadedChunk(player, packets, chunk); +@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + // Paper end + + @Nullable +- public CompoundTag readChunk(ChunkPos pos) throws IOException { // Paper - private -> public ++ public CompoundTag readChunk(ChunkPos pos) throws IOException { + CompoundTag nbttagcompound = this.read(pos); + // Paper start - Cache chunk status on disk + if (nbttagcompound == null) { @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.removePlayerFromDistanceMaps(player); // Paper - distance maps } @@ -438,12 +445,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end - per player view distance } - protected void addEntity(Entity entity) { + public void addEntity(Entity entity) { @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } -- private void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { + // Paper start + private static int getLightMask(final LevelChunk chunk) { + final net.minecraft.world.level.chunk.LevelChunkSection[] chunkSections = chunk.getSections(); @@ -485,10 +491,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end + -+ public void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { // Paper - private -> public + public void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { if (packets[0] == null) { packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass - packets[1] = new ClientboundLightUpdatePacket(chunk.getPos(), this.lightEngine, (BitSet) null, (BitSet) null, true); diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/DistanceManager.java diff --git a/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 82ceb96a16..0d2ac828b9 100644 --- a/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -162,7 +162,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end + @Nullable - public final ChunkHolder getVisibleChunkIfPresent(long pos) { // Paper - protected -> public + public ChunkHolder getVisibleChunkIfPresent(long pos) { - return (ChunkHolder) this.visibleChunkMap.get(pos); + // Paper start - mt safe get + if (Thread.currentThread() != this.level.thread) { diff --git a/patches/server/Optimize-redstone-algorithm.patch b/patches/server/Optimize-redstone-algorithm.patch index ce1fb709cd..9355bf1b01 100644 --- a/patches/server/Optimize-redstone-algorithm.patch +++ b/patches/server/Optimize-redstone-algorithm.patch @@ -970,15 +970,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -0,0 +0,0 @@ public class RedStoneWireBlock extends Block { - }); - private static final float PARTICLE_DENSITY = 0.2F; - private final BlockState crossState; -- private boolean shouldSignal = true; -+ public boolean shouldSignal = true; // Paper private -> public - - public RedStoneWireBlock(BlockBehaviour.Properties settings) { - super(settings); @@ -0,0 +0,0 @@ public class RedStoneWireBlock extends Block { return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER); } diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 96578cae10..ba1d2176c1 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -770,50 +770,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } }; -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -0,0 +0,0 @@ public class SpigotWorldConfig - this.config.set( "world-settings.default." + path, val ); - } - -- private boolean getBoolean(String path, boolean def) -+ public boolean getBoolean(String path, boolean def) // Paper - private -> public - { - this.config.addDefault( "world-settings.default." + path, def ); - return this.config.getBoolean( "world-settings." + this.worldName + "." + path, this.config.getBoolean( "world-settings.default." + path ) ); - } - -- private double getDouble(String path, double def) -+ public double getDouble(String path, double def) // Paper - private -> public - { - this.config.addDefault( "world-settings.default." + path, def ); - return this.config.getDouble( "world-settings." + this.worldName + "." + path, this.config.getDouble( "world-settings.default." + path ) ); - } - -- private int getInt(String path) -+ public int getInt(String path) // Paper - private -> public - { - return this.config.getInt( "world-settings." + this.worldName + "." + path ); - } - -- private int getInt(String path, int def) -+ public int getInt(String path, int def) // Paper - private -> public - { - this.config.addDefault( "world-settings.default." + path, def ); - return this.config.getInt( "world-settings." + this.worldName + "." + path, this.config.getInt( "world-settings.default." + path ) ); - } - -- private List getList(String path, T def) -+ public List getList(String path, T def) // Paper - private -> public - { - this.config.addDefault( "world-settings.default." + path, def ); - return (List) this.config.getList( "world-settings." + this.worldName + "." + path, this.config.getList( "world-settings.default." + path ) ); - } - -- private String getString(String path, String def) -+ public String getString(String path, String def) // Paper - private -> public - { - this.config.addDefault( "world-settings.default." + path, def ); - return this.config.getString( "world-settings." + this.worldName + "." + path, this.config.getString( "world-settings.default." + path ) ); diff --git a/patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index 6b20c64685..6b1ef0b75d 100644 --- a/patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - protected void addEntity(Entity entity) { + public void addEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot + // Paper start - ignore and warn about illegal addEntity calls instead of crashing server + if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) { diff --git a/patches/server/Remove-streams-from-Mob-AI-System.patch b/patches/server/Remove-streams-from-Mob-AI-System.patch index c080fdd0e4..a0363bd310 100644 --- a/patches/server/Remove-streams-from-Mob-AI-System.patch +++ b/patches/server/Remove-streams-from-Mob-AI-System.patch @@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java @@ -0,0 +0,0 @@ public class GoalSelector { private final Map lockedFlags = new EnumMap<>(Goal.Flag.class); - private final Set availableGoals = Sets.newLinkedHashSet(); + public final Set availableGoals = Sets.newLinkedHashSet(); private final Supplier profiler; - private final EnumSet disabledFlags = EnumSet.noneOf(Goal.Flag.class); + private final EnumSet disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. diff --git a/patches/server/Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/Sanitise-RegionFileCache-and-make-configurable.patch index 7b0b183fe6..496eaabaa7 100644 --- a/patches/server/Sanitise-RegionFileCache-and-make-configurable.patch +++ b/patches/server/Sanitise-RegionFileCache-and-make-configurable.patch @@ -28,7 +28,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable { +@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable { if (regionfile != null) { return regionfile; } else { diff --git a/patches/server/SkeletonHorse-Additions.patch b/patches/server/SkeletonHorse-Additions.patch index 916eed3612..28c6f2b746 100644 --- a/patches/server/SkeletonHorse-Additions.patch +++ b/patches/server/SkeletonHorse-Additions.patch @@ -4,19 +4,6 @@ Date: Fri, 27 Jul 2018 22:36:31 -0500 Subject: [PATCH] SkeletonHorse Additions -diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java -+++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java -@@ -0,0 +0,0 @@ public class SkeletonHorse extends AbstractHorse { - private final SkeletonTrapGoal skeletonTrapGoal = new SkeletonTrapGoal(this); - private static final int TRAP_MAX_LIFE = 18000; - private boolean isTrap; -- private int trapTime; -+ public int trapTime; // Paper private -> public - - public SkeletonHorse(EntityType type, Level world) { - super(type, world); diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java diff --git a/patches/server/Turtle-API.patch b/patches/server/Turtle-API.patch index b93acd3ff5..c9495c065c 100644 --- a/patches/server/Turtle-API.patch +++ b/patches/server/Turtle-API.patch @@ -38,39 +38,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return (BlockPos) this.entityData.get(Turtle.HOME_POS); } -@@ -0,0 +0,0 @@ public class Turtle extends Animal { - return (Boolean) this.entityData.get(Turtle.HAS_EGG); - } - -- void setHasEgg(boolean hasEgg) { -+ public void setHasEgg(boolean hasEgg) { // Paper - this.entityData.set(Turtle.HAS_EGG, hasEgg); - } - -@@ -0,0 +0,0 @@ public class Turtle extends Animal { - this.entityData.set(Turtle.LAYING_EGG, diggingSand); - } - -- boolean isGoingHome() { -+ public boolean isGoingHome() { // Paper - public - return (Boolean) this.entityData.get(Turtle.GOING_HOME); - } - -- void setGoingHome(boolean landBound) { -+ public void setGoingHome(boolean landBound) { // Paper - public - this.entityData.set(Turtle.GOING_HOME, landBound); - } - -- boolean isTravelling() { -+ public boolean isTravelling() { // Paper - public - return (Boolean) this.entityData.get(Turtle.TRAVELLING); - } - -- void setTravelling(boolean travelling) { -+ public void setTravelling(boolean travelling) { // Paper - public - this.entityData.set(Turtle.TRAVELLING, travelling); - } - @@ -0,0 +0,0 @@ public class Turtle extends Animal { if (!this.turtle.isInWater() && this.isReachedTarget()) {