From 1cff98202112f21048946fb212ae7a724a906481 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 21 Jul 2018 02:00:31 -0500 Subject: [PATCH 01/67] PlayerElytraBoostEvent --- .../PlayerElytraBoostEvent.patch | 93 +++++++++++++++++++ .../PlayerElytraBoostEvent.patch | 30 ++++++ 2 files changed, 123 insertions(+) create mode 100644 Spigot-API-Patches/PlayerElytraBoostEvent.patch create mode 100644 Spigot-Server-Patches/PlayerElytraBoostEvent.patch diff --git a/Spigot-API-Patches/PlayerElytraBoostEvent.patch b/Spigot-API-Patches/PlayerElytraBoostEvent.patch new file mode 100644 index 0000000000..a0079e2839 --- /dev/null +++ b/Spigot-API-Patches/PlayerElytraBoostEvent.patch @@ -0,0 +1,93 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:59:53 -0500 +Subject: [PATCH] PlayerElytraBoostEvent + + +diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java +new file mode 100644 +index 00000000..cecb2182 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java +@@ -0,0 +0,0 @@ ++package com.destroystokyo.paper.event.player; ++ ++import org.bukkit.entity.Firework; ++import org.bukkit.entity.Player; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.player.PlayerEvent; ++import org.bukkit.inventory.ItemStack; ++ ++/** ++ * Fired when a player boosts elytra flight with a firework ++ */ ++public class PlayerElytraBoostEvent extends PlayerEvent implements Cancellable { ++ private static final HandlerList handlers = new HandlerList(); ++ private boolean cancelled = false; ++ private final ItemStack itemStack; ++ private Firework firework; ++ private boolean consume = true; ++ ++ public PlayerElytraBoostEvent(Player player, ItemStack itemStack, Firework firework) { ++ super(player); ++ this.itemStack = itemStack; ++ this.firework = firework; ++ } ++ ++ /** ++ * Get the firework itemstack used ++ * ++ * @return ItemStack of firework ++ */ ++ public ItemStack getItemStack() { ++ return itemStack; ++ } ++ ++ /** ++ * Get the firework entity that was spawned ++ * ++ * @return Firework entity ++ */ ++ public Firework getFirework() { ++ return firework; ++ } ++ ++ /** ++ * Get whether to consume the firework or not ++ * ++ * @return True to consume ++ */ ++ public boolean shouldConsume() { ++ return consume; ++ } ++ ++ /** ++ * Set whether to consume the firework or not ++ * ++ * @param consume True to consume ++ */ ++ public void setShouldConsume(boolean consume) { ++ this.consume = consume; ++ } ++ ++ @Override ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/PlayerElytraBoostEvent.patch new file mode 100644 index 0000000000..d17211a7be --- /dev/null +++ b/Spigot-Server-Patches/PlayerElytraBoostEvent.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:59:59 -0500 +Subject: [PATCH] PlayerElytraBoostEvent + + +diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java +index 1493d0999..48cc5bf7d 100644 +--- a/src/main/java/net/minecraft/server/ItemFireworks.java ++++ b/src/main/java/net/minecraft/server/ItemFireworks.java +@@ -0,0 +0,0 @@ public class ItemFireworks extends Item { + EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman); + + entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper +- world.addEntity(entityfireworks); +- if (!entityhuman.abilities.canInstantlyBuild) { +- itemstack.subtract(1); ++ // Paper start ++ com.destroystokyo.paper.event.player.PlayerElytraBoostEvent event = new com.destroystokyo.paper.event.player.PlayerElytraBoostEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Firework) entityfireworks.getBukkitEntity()); ++ if (event.callEvent() && world.addEntity(entityfireworks)) { ++ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { ++ itemstack.subtract(1); ++ } else ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ } else if (entityhuman instanceof EntityPlayer) { ++ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ // Paper end + } + } + +-- \ No newline at end of file From 4cccd48a4cd0b3f898e0b3dd79a0b737284ba42e Mon Sep 17 00:00:00 2001 From: NickAcPT <32451103+NickAcPT@users.noreply.github.com> Date: Sat, 21 Jul 2018 12:58:48 +0100 Subject: [PATCH 02/67] Extend player profile API to support skin changes Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile --- ...-profile-API-to-support-skin-changes.patch | 27 +++ ...-profile-API-to-support-skin-changes.patch | 161 ++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch create mode 100644 Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch diff --git a/Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch b/Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch new file mode 100644 index 0000000000..569b4caf8d --- /dev/null +++ b/Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: NickAcPT <32451103+NickAcPT@users.noreply.github.com> +Date: Sat, 21 Jul 2018 01:30:41 +0100 +Subject: [PATCH] Extend player profile API to support skin changes + +Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile + +diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java +index e060c38a..98eade06 100644 +--- a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java ++++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java +@@ -0,0 +0,0 @@ public interface PlayerProfile { + * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail) + */ + boolean complete(boolean textures); ++ /** ++ * If this profile is not complete, then make the API call to complete it. ++ * This is a blocking operation and should be done asynchronously. ++ * ++ * Optionally will also fill textures. ++ * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail) ++ */ ++ boolean complete(boolean textures, boolean force); + + /** + * Whether or not this Profile has textures associated to it +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch new file mode 100644 index 0000000000..3a13f606bd --- /dev/null +++ b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch @@ -0,0 +1,161 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: NickAcPT <32451103+NickAcPT@users.noreply.github.com> +Date: Sat, 21 Jul 2018 01:30:30 +0100 +Subject: [PATCH] Extend player profile API to support skin changes + +Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile + +diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java +index 9ad5853d..dda24052 100644 +--- a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java ++++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java +@@ -0,0 +0,0 @@ public class CraftPlayerProfile implements PlayerProfile { + } + + public boolean complete(boolean textures) { ++ return complete(textures, false); ++ } ++ ++ public boolean complete(boolean textures, boolean force) { + MinecraftServer server = MinecraftServer.getServer(); + + boolean isOnlineMode = server.getOnlineMode() || (SpigotConfig.bungee && PaperConfig.bungeeOnlineMode); + boolean isCompleteFromCache = this.completeFromCache(true); +- if (isOnlineMode && (!isCompleteFromCache || textures && !hasTextures())) { ++ if ((isOnlineMode || force) && (!isCompleteFromCache || textures && !hasTextures())) { + GameProfile result = server.getSessionService().fillProfileProperties(profile, true); + if (result != null) { + this.profile = result; + } + } +- return profile.isComplete() && (!isOnlineMode || !textures || hasTextures()); ++ return profile.isComplete() && (!(isOnlineMode || force) || !textures || hasTextures()); + } + + private static void copyProfileProperties(GameProfile source, GameProfile target) { +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index dd78a87b..e3f7be28 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + return this; + } + ++ // Paper start - Provide dimension number of world ++ public int getDimension() { ++ return dimension; ++ } ++ // Paper end ++ + // CraftBukkit start + @Override + public TileEntity getTileEntity(BlockPosition pos) { +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +index 210e3bc4..b0335684 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -0,0 +0,0 @@ public class CraftWorld implements World { + } + // Paper end + ++ // Paper start - Provide dimension number of world ++ public int getDimension() { ++ return world.dimension; ++ } ++ // Paper end ++ + private static final Random rand = new Random(); + + public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index 6cbf429f..bd743be5 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftStatistic; + import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.advancement.CraftAdvancement; + import org.bukkit.craftbukkit.advancement.CraftAdvancementProgress; ++import org.bukkit.craftbukkit.inventory.CraftItemStack; + import org.bukkit.craftbukkit.map.CraftMapView; + import org.bukkit.craftbukkit.map.RenderData; + import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; +@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + public void setPlayerProfile(PlayerProfile profile) { + EntityPlayer self = getHandle(); + self.setProfile(CraftPlayerProfile.asAuthlibCopy(profile)); +- List players = server.getServer().getPlayerList().players; +- for (EntityPlayer player : players) { +- player.getBukkitEntity().reregisterPlayer(self); +- } ++ refreshPlayer(); + } + public PlayerProfile getPlayerProfile() { + return new CraftPlayerProfile(this).clone(); + } ++ ++ private void refreshPlayer() { ++ int dimension = getWorld().getEnvironment().getId(); ++ Packet respawn = new PacketPlayOutRespawn(dimension, ((WorldServer)getHandle().getWorld()).worldData.getDifficulty(), ((WorldServer)getHandle().getWorld()).worldData.getType(), EnumGamemode.getById(getHandle().playerInteractManager.getGameMode().getId())); ++ Location l = getLocation(); ++ ++ Packet pos = new PacketPlayOutPosition(l.getX(), l.getY(), l.getZ(), l.getYaw(), l.getPitch(), new HashSet<>(), 0); ++ Packet mainhand = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.MAINHAND, CraftItemStack.asNMSCopy(getInventory().getItemInMainHand())); ++ Packet offhand = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.OFFHAND, CraftItemStack.asNMSCopy(getInventory().getItemInOffHand())); ++ Packet helm = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.HEAD, CraftItemStack.asNMSCopy(getInventory().getHelmet())); ++ Packet chest = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.CHEST, CraftItemStack.asNMSCopy(getInventory().getChestplate())); ++ Packet legs = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.LEGS, CraftItemStack.asNMSCopy(getInventory().getLeggings())); ++ Packet feet = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.FEET, CraftItemStack.asNMSCopy(getInventory().getBoots())); ++ Packet slot = new PacketPlayOutHeldItemSlot(getInventory().getHeldItemSlot()); ++ ++ for (Player pOnline : Bukkit.getOnlinePlayers()) { ++ EntityPlayer handle = ((CraftPlayer) pOnline).getHandle(); ++ PlayerConnection playerCon = handle.playerConnection; ++ if (pOnline.equals(this)) { ++ reregisterPlayer(handle); ++ ++ //Respawn the player then update their position and selected slot ++ handle.playerConnection.sendPacket(respawn); ++ handle.updateAbilities(); ++ handle.playerConnection.sendPacket(pos); ++ handle.playerConnection.sendPacket(slot); ++ ++ ((CraftPlayer) pOnline).updateScaledHealth(); ++ pOnline.updateInventory(); ++ ++ handle.triggerHealthUpdate(); ++ ++ if (pOnline.isOp()) { ++ pOnline.setOp(false); ++ pOnline.setOp(true); ++ } ++ continue; ++ } ++ if (pOnline.getWorld().equals(getWorld()) && pOnline.canSee(this) && isOnline()) { ++ PacketPlayOutEntityDestroy removeEntity = new PacketPlayOutEntityDestroy(new int[]{getEntityId()}); ++ PacketPlayOutNamedEntitySpawn addNamed = new PacketPlayOutNamedEntitySpawn(getHandle()); ++ ++ //Remove and reregister the player ++ handle.playerConnection.sendPacket(removeEntity); ++ ((CraftPlayer) pOnline).reregisterPlayer(this.getHandle()); ++ handle.playerConnection.sendPacket(addNamed); ++ ++ //Send hand items ++ handle.playerConnection.sendPacket(mainhand); ++ handle.playerConnection.sendPacket(offhand); ++ ++ //Send armor ++ handle.playerConnection.sendPacket(helm); ++ handle.playerConnection.sendPacket(chest); ++ handle.playerConnection.sendPacket(legs); ++ handle.playerConnection.sendPacket(feet); ++ } else { ++ //Just send player update ++ ((CraftPlayer) pOnline).reregisterPlayer(this.getHandle()); ++ } ++ } ++ ++ } + // Paper end + + public void removeDisconnectingPlayer(Player player) { +-- \ No newline at end of file From 185b6b4c592257114f03a5d870be72aae3aa9d6d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 08:09:40 -0400 Subject: [PATCH 03/67] Create a symlink on not-windows to current minecraft decompile dir This is useful for project developers switching back and forth between 1.12.2 and 1.13 so we can have our IDE automatically use the current version we are working on for included mc-dev files. --- scripts/decompile.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/decompile.sh b/scripts/decompile.sh index f2c1754fdd..2018259c37 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -6,9 +6,9 @@ PS1="$" basedir="$(cd "$1" && pwd -P)" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) +windows="$([[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]] && echo "true" || echo "false")" decompiledir="$workdir/Minecraft/$minecraftversion" classdir="$decompiledir/classes" - echo "Extracting NMS classes..." if [ ! -d "$classdir" ]; then mkdir -p "$classdir" @@ -30,4 +30,13 @@ if [ ! -d "$decompiledir/net/minecraft/server" ]; then exit 1 fi fi + +# set a symlink to current +currentlink="$workdir/Minecraft/current" +if ([ ! -e "$currentlink" ] || [ -L "$currentlink" ]) && [ "$windows" == "false" ]; then + echo "Pointing $currentlink to $minecraftversion" + rm -rf "$currentlink" + ln -sfn "$minecraftversion" "$currentlink" +fi + ) From df8c42d4ad93f8994ed6a47598768e936dc7cb8d Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 21 Jul 2018 14:47:22 +0200 Subject: [PATCH 04/67] 1.13: Resend bed on cancelled interaction (#1245) Minecraft 1.13 requires resending the block for both parts of the bed --- .../Extend-Player-Interact-cancellation.patch | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch b/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch index 42c3579dfa..616fe9715f 100644 --- a/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch +++ b/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch @@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds when cancelling interaction. diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index e34198e40..620efb1ac 100644 +index e34198e4..e375e255 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -0,0 +0,0 @@ public class PlayerInteractManager { @@ -42,15 +42,14 @@ index e34198e40..620efb1ac 100644 + BlockPosition piston = position.shift(data.get(BlockPistonExtension.FACING).opposite()); + this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, piston)); + } else if (block instanceof BlockBed) { -+ if (data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT) { -+ // Restore head of bed -+ BlockPosition head = position.shift(data.get(BlockBed.FACING)); -+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, head)); ++ // Restore other half of bed ++ boolean foot = data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT; ++ BlockPosition otherBlock = position.shift(foot ? data.get(BlockBed.FACING) : data.get(BlockBed.FACING).opposite()); ++ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, otherBlock)); + -+ TileEntity tileentity = this.world.getTileEntity(head); -+ if (tileentity != null) { -+ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket()); -+ } ++ TileEntity tileentity = this.world.getTileEntity(otherBlock); ++ if (tileentity != null) { ++ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket()); + } + } + } From 33cf273156130024d6f98a7f68693cf7b9723f49 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 09:03:10 -0400 Subject: [PATCH 05/67] Guard the Entity.SHARED_RANDOM from seed changes I don't clearly see any, but as a protection for future changes. --- .../Cap-Entity-Collisions.patch | 2 +- ...-allow-entities-to-ride-themselves-572.patch | 2 +- .../Don-t-let-fishinghooks-use-portals.patch | 2 +- .../Don-t-teleport-dead-entities.patch | 2 +- .../Entity-Tracking-Improvements.patch | 2 +- .../Entity-fromMobSpawner.patch | 2 +- .../Make-entities-look-for-hoppers.patch | 2 +- ...vanilla-per-world-scoreboard-coloring-.patch | 2 +- .../Optional-TNT-doesn-t-move-in-water.patch | 2 +- ...-remove-entities-on-dimension-teleport.patch | 6 +++--- .../Use-a-Shared-Random-for-Entities.patch | 17 +++++++++++++++-- .../Vanished-players-don-t-have-rights.patch | 2 +- .../Vehicle-Event-Cancellation-Changes.patch | 2 +- 13 files changed, 29 insertions(+), 16 deletions(-) diff --git a/Spigot-Server-Patches/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch index b7dcecc518..e519ae05cc 100644 --- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index 5f06d4e5e..29b4bdb47 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 20324deeb..b4233df5f 100644 +index 92b2bcb86..5a4de30fe 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index 218a3cfd6f..6c26b4e26b 100644 --- a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b6711dcfa..e7f63c927 100644 +index 6d1e61e23..92b2bcb86 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch index e63387125b..dcd132001e 100644 --- a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c675a6e16..f71528b5f 100644 +index 0950c315f..d79844a98 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch index 9a2a869adc..01e4686f72 100644 --- a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch @@ -7,7 +7,7 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index eb07d4233..e2202ed0c 100644 +index daf97bce3..87b82f908 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Entity-Tracking-Improvements.patch b/Spigot-Server-Patches/Entity-Tracking-Improvements.patch index 585cc4d692..25e88f6eef 100644 --- a/Spigot-Server-Patches/Entity-Tracking-Improvements.patch +++ b/Spigot-Server-Patches/Entity-Tracking-Improvements.patch @@ -7,7 +7,7 @@ If any part of a Vehicle/Passenger relationship is visible to a player, send all passenger/vehicles to the player in the chain. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d1f07bbbd..945f06c93 100644 +index a3e9ee052..9b01c23e0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Entity-fromMobSpawner.patch b/Spigot-Server-Patches/Entity-fromMobSpawner.patch index fbf6f7a3ac..40037b9f05 100644 --- a/Spigot-Server-Patches/Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b4233df5f..00791faf2 100644 +index 5a4de30fe..2dbb88f2d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch b/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch index 9f786e9369..132a029e92 100644 --- a/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch +++ b/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch @@ -133,7 +133,7 @@ index 008ed206d..b3c1f550c 100644 this.b = i; this.c = j; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cb9ef622c..c675a6e16 100644 +index 0a62ebf4a..0950c315f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 3f6db273fb..de115b9a2c 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -19,7 +19,7 @@ index abc1aabdd..6ea608ba9 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e2202ed0c..88faa4601 100644 +index 87b82f908..fa9319aff 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index 8ed18760d8..60336912ac 100644 --- a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -32,7 +32,7 @@ index 067cb233e..06acdaaf0 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c105dd9b0..334441ed7 100644 +index 9b01c23e0..0a62ebf4a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch index 24aba42aba..62247100bb 100644 --- a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch +++ b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch @@ -22,7 +22,7 @@ requirement, but plugins (such as my own) use this method to trigger a "reload" of the entity on the client. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7b17c32bb..d03e7c24f 100644 +index 2dbb88f2d..80ecdb282 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -35,14 +35,14 @@ index 7b17c32bb..d03e7c24f 100644 this.world.methodProfiler.a("reposition"); /* CraftBukkit start - Handled in calculateTarget diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 49019d54d..9fe5c4406 100644 +index 49019d54d..bba2e164f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { } protected void c(Entity entity) { -+ if (!entity.valid) return; // Paper - Already removed, dont fire twice - this looks like it can happen even without our changes ++ if (!this.entitiesByUUID.containsKey(entity.getUniqueID()) && !entity.valid) return; // Paper - Already removed, dont fire twice - this looks like it can happen even without our changes super.c(entity); this.entitiesById.d(entity.getId()); this.entitiesByUUID.remove(entity.getUniqueID()); diff --git a/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch index 11e964da2c..236e260ec8 100644 --- a/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch @@ -6,14 +6,27 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b4ad611fc..4a08db5ba 100644 +index f547dbfd0..daf97bce3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper // CraftBukkit start private static final int CURRENT_LEVEL = 2; -+ public static Random SHARED_RANDOM = new Random(); // Paper ++ // Paper start ++ public static Random SHARED_RANDOM = new Random() { ++ private boolean locked = false; ++ @Override ++ public synchronized void setSeed(long seed) { ++ if (locked) { ++ LogManager.getLogger().error("Ignoring setSeed on Entity.SHARED_RANDOM", new Throwable()); ++ } else { ++ super.setSeed(seed); ++ locked = true; ++ } ++ } ++ }; ++ // Paper end static boolean isLevelAtLeast(NBTTagCompound tag, int level) { return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } diff --git a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch index 03f4a5529c..d47c797797 100644 --- a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f71528b5f..b13830e87 100644 +index d79844a98..6d1e61e23 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch index ef41df90ca..1b392eecc5 100644 --- a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch +++ b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vehicle Event Cancellation Changes diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 88faa4601..aece54d26 100644 +index fa9319aff..a3e9ee052 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper From 19cec888527af7bf5855c9be61bcc3e135f4af94 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 10:29:14 -0400 Subject: [PATCH 06/67] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to enable more logging --- ...ies-option-to-debug-dupe-uuid-issues.patch | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch diff --git a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch new file mode 100644 index 0000000000..dceaca58c0 --- /dev/null +++ b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -0,0 +1,93 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Jul 2018 08:25:40 -0400 +Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues + +Add -Ddebug.entities=true to your JVM flags to gain more information + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index f6b755863..108654d63 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper + } + return bukkitEntity; + } ++ Throwable addedToWorldStack; // Paper - entity debug + // CraftBukikt end + + private static final Logger a = LogManager.getLogger(); +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index b16324e1a..994d4bbb8 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -0,0 +0,0 @@ import com.google.common.util.concurrent.ListenableFuture; + import java.io.File; + import java.util.ArrayList; + import java.util.Collection; ++import java.util.Date; + import java.util.Iterator; + import java.util.List; + import java.util.Map; +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + private final List W = Lists.newArrayList(); + + // CraftBukkit start ++ private static final boolean DEBUG_ENTITIES = Boolean.getBoolean("debug.entities"); // Paper ++ private static Throwable getAddToWorldStackTrace(Entity entity) { ++ return new Throwable(entity + " Added to world at " + new Date()); ++ } + public final int dimension; + + // Add env and gen to constructor +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + private boolean j(Entity entity) { + if (entity.dead) { + WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.a(entity)); // CraftBukkit // Paper ++ if (DEBUG_ENTITIES) getAddToWorldStackTrace(entity).printStackTrace(); + return false; + } else { + UUID uuid = entity.getUniqueID(); +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + this.f.remove(entity1); + } else { + if (!(entity instanceof EntityHuman)) { +- WorldServer.a.error("Keeping entity {} that already exists with UUID {} - " + entity1, EntityTypes.a(entity1), uuid.toString()); // CraftBukkit // Paper ++ WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper + WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper ++ if (DEBUG_ENTITIES) { ++ if (entity1.addedToWorldStack != null) { ++ entity1.addedToWorldStack.printStackTrace(); ++ } ++ getAddToWorldStackTrace(entity).printStackTrace(); ++ } + return false; + } + +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + protected void b(Entity entity) { + super.b(entity); + this.entitiesById.a(entity.getId(), entity); +- this.entitiesByUUID.put(entity.getUniqueID(), entity); ++ // Paper start ++ if (DEBUG_ENTITIES) { ++ entity.addedToWorldStack = getAddToWorldStackTrace(entity); ++ } ++ Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); ++ if (old != null && old.getId() != entity.getId() && old.valid) { ++ Logger logger = LogManager.getLogger(); ++ logger.error("Overwrote an existing entity " + old + " with " + entity); ++ if (DEBUG_ENTITIES) { ++ if (old.addedToWorldStack != null) { ++ old.addedToWorldStack.printStackTrace(); ++ } else { ++ logger.error("Oddly, the old entity was not added to the world in the normal way. Plugins?"); ++ } ++ entity.addedToWorldStack.printStackTrace(); ++ } ++ } ++ // Paper end + Entity[] aentity = entity.bb(); + + if (aentity != null) { +-- \ No newline at end of file From f8af5faa43e8f661946932263defcb7ae36d4848 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 10:29:37 -0400 Subject: [PATCH 07/67] Add more information to Entity.toString() --- ...patch => add-more-information-to-Entity.toString.patch} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename Spigot-Server-Patches/{add-uuid-to-Entity.toString.patch => add-more-information-to-Entity.toString.patch} (65%) diff --git a/Spigot-Server-Patches/add-uuid-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch similarity index 65% rename from Spigot-Server-Patches/add-uuid-to-Entity.toString.patch rename to Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index 386b4db556..0362c15512 100644 --- a/Spigot-Server-Patches/add-uuid-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -1,11 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:13:28 -0400 -Subject: [PATCH] add uuid to Entity.toString() +Subject: [PATCH] add more information to Entity.toString() +UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d03e7c24f..fe1ccba8d 100644 +index 80ecdb282..f6b755863 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -13,7 +14,7 @@ index d03e7c24f..fe1ccba8d 100644 public String toString() { - return String.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); -+ return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); // Paper - add UUID ++ return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), this.ticksLived, this.valid, this.dead}); // Paper - add more information } public boolean isInvulnerable(DamageSource damagesource) { From a7f45fb1b4bf25314328e1fb01ce234db8bfa303 Mon Sep 17 00:00:00 2001 From: NickAcPT <32451103+NickAcPT@users.noreply.github.com> Date: Sat, 21 Jul 2018 16:22:10 +0100 Subject: [PATCH 08/67] Extend player profile API to support skin changes Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile --- ...-profile-API-to-support-skin-changes.patch | 27 ---- ...-profile-API-to-support-skin-changes.patch | 124 +++--------------- 2 files changed, 21 insertions(+), 130 deletions(-) delete mode 100644 Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch diff --git a/Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch b/Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch deleted file mode 100644 index 569b4caf8d..0000000000 --- a/Spigot-API-Patches/Extend-player-profile-API-to-support-skin-changes.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: NickAcPT <32451103+NickAcPT@users.noreply.github.com> -Date: Sat, 21 Jul 2018 01:30:41 +0100 -Subject: [PATCH] Extend player profile API to support skin changes - -Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile - -diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java -index e060c38a..98eade06 100644 ---- a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java -+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java -@@ -0,0 +0,0 @@ public interface PlayerProfile { - * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail) - */ - boolean complete(boolean textures); -+ /** -+ * If this profile is not complete, then make the API call to complete it. -+ * This is a blocking operation and should be done asynchronously. -+ * -+ * Optionally will also fill textures. -+ * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail) -+ */ -+ boolean complete(boolean textures, boolean force); - - /** - * Whether or not this Profile has textures associated to it --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch index 3a13f606bd..73e1bbeded 100644 --- a/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch +++ b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch @@ -5,51 +5,6 @@ Subject: [PATCH] Extend player profile API to support skin changes Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile -diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -index 9ad5853d..dda24052 100644 ---- a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -@@ -0,0 +0,0 @@ public class CraftPlayerProfile implements PlayerProfile { - } - - public boolean complete(boolean textures) { -+ return complete(textures, false); -+ } -+ -+ public boolean complete(boolean textures, boolean force) { - MinecraftServer server = MinecraftServer.getServer(); - - boolean isOnlineMode = server.getOnlineMode() || (SpigotConfig.bungee && PaperConfig.bungeeOnlineMode); - boolean isCompleteFromCache = this.completeFromCache(true); -- if (isOnlineMode && (!isCompleteFromCache || textures && !hasTextures())) { -+ if ((isOnlineMode || force) && (!isCompleteFromCache || textures && !hasTextures())) { - GameProfile result = server.getSessionService().fillProfileProperties(profile, true); - if (result != null) { - this.profile = result; - } - } -- return profile.isComplete() && (!isOnlineMode || !textures || hasTextures()); -+ return profile.isComplete() && (!(isOnlineMode || force) || !textures || hasTextures()); - } - - private static void copyProfileProperties(GameProfile source, GameProfile target) { -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index dd78a87b..e3f7be28 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - return this; - } - -+ // Paper start - Provide dimension number of world -+ public int getDimension() { -+ return dimension; -+ } -+ // Paper end -+ - // CraftBukkit start - @Override - public TileEntity getTileEntity(BlockPosition pos) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 210e3bc4..b0335684 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -68,7 +23,7 @@ index 210e3bc4..b0335684 100644 public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6cbf429f..bd743be5 100644 +index 6cbf429f..57f17120 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftStatistic; @@ -80,13 +35,9 @@ index 6cbf429f..bd743be5 100644 import org.bukkit.craftbukkit.map.RenderData; import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - public void setPlayerProfile(PlayerProfile profile) { - EntityPlayer self = getHandle(); - self.setProfile(CraftPlayerProfile.asAuthlibCopy(profile)); -- List players = server.getServer().getPlayerList().players; -- for (EntityPlayer player : players) { -- player.getBukkitEntity().reregisterPlayer(self); -- } + for (EntityPlayer player : players) { + player.getBukkitEntity().reregisterPlayer(self); + } + refreshPlayer(); } public PlayerProfile getPlayerProfile() { @@ -94,64 +45,31 @@ index 6cbf429f..bd743be5 100644 } + + private void refreshPlayer() { -+ int dimension = getWorld().getEnvironment().getId(); -+ Packet respawn = new PacketPlayOutRespawn(dimension, ((WorldServer)getHandle().getWorld()).worldData.getDifficulty(), ((WorldServer)getHandle().getWorld()).worldData.getType(), EnumGamemode.getById(getHandle().playerInteractManager.getGameMode().getId())); -+ Location l = getLocation(); ++ EntityPlayer entityplayer = getHandle(); + ++ Packet respawn = new PacketPlayOutRespawn(entityplayer.dimension, entityplayer.world.getDifficulty(), entityplayer.world.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode()); ++ Location l = getLocation(); + Packet pos = new PacketPlayOutPosition(l.getX(), l.getY(), l.getZ(), l.getYaw(), l.getPitch(), new HashSet<>(), 0); -+ Packet mainhand = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.MAINHAND, CraftItemStack.asNMSCopy(getInventory().getItemInMainHand())); -+ Packet offhand = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.OFFHAND, CraftItemStack.asNMSCopy(getInventory().getItemInOffHand())); -+ Packet helm = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.HEAD, CraftItemStack.asNMSCopy(getInventory().getHelmet())); -+ Packet chest = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.CHEST, CraftItemStack.asNMSCopy(getInventory().getChestplate())); -+ Packet legs = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.LEGS, CraftItemStack.asNMSCopy(getInventory().getLeggings())); -+ Packet feet = new PacketPlayOutEntityEquipment(getEntityId(), EnumItemSlot.FEET, CraftItemStack.asNMSCopy(getInventory().getBoots())); + Packet slot = new PacketPlayOutHeldItemSlot(getInventory().getHeldItemSlot()); + -+ for (Player pOnline : Bukkit.getOnlinePlayers()) { -+ EntityPlayer handle = ((CraftPlayer) pOnline).getHandle(); -+ PlayerConnection playerCon = handle.playerConnection; -+ if (pOnline.equals(this)) { -+ reregisterPlayer(handle); ++ EntityPlayer handle = getHandle(); ++ PlayerConnection playerCon = handle.playerConnection; ++ reregisterPlayer(handle); + -+ //Respawn the player then update their position and selected slot -+ handle.playerConnection.sendPacket(respawn); -+ handle.updateAbilities(); -+ handle.playerConnection.sendPacket(pos); -+ handle.playerConnection.sendPacket(slot); ++ //Respawn the player then update their position and selected slot ++ playerCon.sendPacket(respawn); ++ handle.updateAbilities(); ++ playerCon.sendPacket(pos); ++ playerCon.sendPacket(slot); + -+ ((CraftPlayer) pOnline).updateScaledHealth(); -+ pOnline.updateInventory(); ++ updateScaledHealth(); ++ this.updateInventory(); + -+ handle.triggerHealthUpdate(); ++ handle.triggerHealthUpdate(); + -+ if (pOnline.isOp()) { -+ pOnline.setOp(false); -+ pOnline.setOp(true); -+ } -+ continue; -+ } -+ if (pOnline.getWorld().equals(getWorld()) && pOnline.canSee(this) && isOnline()) { -+ PacketPlayOutEntityDestroy removeEntity = new PacketPlayOutEntityDestroy(new int[]{getEntityId()}); -+ PacketPlayOutNamedEntitySpawn addNamed = new PacketPlayOutNamedEntitySpawn(getHandle()); -+ -+ //Remove and reregister the player -+ handle.playerConnection.sendPacket(removeEntity); -+ ((CraftPlayer) pOnline).reregisterPlayer(this.getHandle()); -+ handle.playerConnection.sendPacket(addNamed); -+ -+ //Send hand items -+ handle.playerConnection.sendPacket(mainhand); -+ handle.playerConnection.sendPacket(offhand); -+ -+ //Send armor -+ handle.playerConnection.sendPacket(helm); -+ handle.playerConnection.sendPacket(chest); -+ handle.playerConnection.sendPacket(legs); -+ handle.playerConnection.sendPacket(feet); -+ } else { -+ //Just send player update -+ ((CraftPlayer) pOnline).reregisterPlayer(this.getHandle()); -+ } ++ if (this.isOp()) { ++ this.setOp(false); ++ this.setOp(true); + } + + } From 8672424ca11aa40b75d9ffb26fd02434d8675a79 Mon Sep 17 00:00:00 2001 From: NickAcPT <32451103+NickAcPT@users.noreply.github.com> Date: Sat, 21 Jul 2018 16:54:52 +0100 Subject: [PATCH 09/67] Remove unsed method --- ...er-profile-API-to-support-skin-changes.patch | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch index 73e1bbeded..157636b288 100644 --- a/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch +++ b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch @@ -5,23 +5,6 @@ Subject: [PATCH] Extend player profile API to support skin changes Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 210e3bc4..b0335684 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -0,0 +0,0 @@ public class CraftWorld implements World { - } - // Paper end - -+ // Paper start - Provide dimension number of world -+ public int getDimension() { -+ return world.dimension; -+ } -+ // Paper end -+ - private static final Random rand = new Random(); - - public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 6cbf429f..57f17120 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java From d291411d94792001825619717bec9502f19d5644 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 12:07:33 -0400 Subject: [PATCH 10/67] change LAST_EDIT to PAPER_LAST_EDIT for edit commands LAST_EDIT is way too generic considering it pollutes the users global environment.... --- paper | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paper b/paper index 24bc958b55..f80040c8f6 100755 --- a/paper +++ b/paper @@ -99,7 +99,7 @@ case "$1" in "e" | "edit") case "$2" in "s" | "server") - export LAST_EDIT="$basedir/Paper-Server" + export PAPER_LAST_EDIT="$basedir/Paper-Server" cd "$basedir/Paper-Server" ( set -e @@ -110,7 +110,7 @@ case "$1" in ) ;; "a" | "api") - export LAST_EDIT="$basedir/Paper-API" + export PAPER_LAST_EDIT="$basedir/Paper-API" cd "$basedir/Paper-API" ( set -e @@ -121,8 +121,8 @@ case "$1" in ) ;; "c" | "continue") - cd "$LAST_EDIT" - unset LAST_EDIT + cd "$PAPER_LAST_EDIT" + unset PAPER_LAST_EDIT ( set -e From 9526c764387f57ed118f0af12d9659f8d8f36c31 Mon Sep 17 00:00:00 2001 From: NickAcPT <32451103+NickAcPT@users.noreply.github.com> Date: Sat, 21 Jul 2018 18:17:54 +0100 Subject: [PATCH 11/67] Fixed more stuff --- ...-profile-API-to-support-skin-changes.patch | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch index 157636b288..5c151536a0 100644 --- a/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch +++ b/Spigot-Server-Patches/Extend-player-profile-API-to-support-skin-changes.patch @@ -6,17 +6,9 @@ Subject: [PATCH] Extend player profile API to support skin changes Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6cbf429f..57f17120 100644 +index 6cbf429f..01335b6b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftStatistic; - import org.bukkit.craftbukkit.CraftWorld; - import org.bukkit.craftbukkit.advancement.CraftAdvancement; - import org.bukkit.craftbukkit.advancement.CraftAdvancementProgress; -+import org.bukkit.craftbukkit.inventory.CraftItemStack; - import org.bukkit.craftbukkit.map.CraftMapView; - import org.bukkit.craftbukkit.map.RenderData; - import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { for (EntityPlayer player : players) { player.getBukkitEntity().reregisterPlayer(self); @@ -30,20 +22,17 @@ index 6cbf429f..57f17120 100644 + private void refreshPlayer() { + EntityPlayer entityplayer = getHandle(); + -+ Packet respawn = new PacketPlayOutRespawn(entityplayer.dimension, entityplayer.world.getDifficulty(), entityplayer.world.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode()); -+ Location l = getLocation(); -+ Packet pos = new PacketPlayOutPosition(l.getX(), l.getY(), l.getZ(), l.getYaw(), l.getPitch(), new HashSet<>(), 0); -+ Packet slot = new PacketPlayOutHeldItemSlot(getInventory().getHeldItemSlot()); ++ Location loc = getLocation(); + + EntityPlayer handle = getHandle(); -+ PlayerConnection playerCon = handle.playerConnection; ++ PlayerConnection connection = handle.playerConnection; + reregisterPlayer(handle); + + //Respawn the player then update their position and selected slot -+ playerCon.sendPacket(respawn); ++ connection.sendPacket(new PacketPlayOutRespawn(entityplayer.dimension, entityplayer.world.getDifficulty(), entityplayer.world.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode())); + handle.updateAbilities(); -+ playerCon.sendPacket(pos); -+ playerCon.sendPacket(slot); ++ connection.sendPacket(new PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0)); ++ connection.sendPacket(new PacketPlayOutHeldItemSlot(getInventory().getHeldItemSlot())); + + updateScaledHealth(); + this.updateInventory(); From 1b8cee45a020503cf2278e03a94add800620b62d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:46:56 -0400 Subject: [PATCH 12/67] Add more information to Entity.toString --- .../add-more-information-to-Entity.toString.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index 0362c15512..188e517b86 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 80ecdb282..f6b755863 100644 +index 80ecdb282..99dac412f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -14,7 +14,7 @@ index 80ecdb282..f6b755863 100644 public String toString() { - return String.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); -+ return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), this.ticksLived, this.valid, this.dead}); // Paper - add more information ++ return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cd=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information } public boolean isInvulnerable(DamageSource damagesource) { From 51f03d3579820615c62f37e8e6dd846f565278b4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:47:05 -0400 Subject: [PATCH 13/67] Duplicate UUID Resolve Option Due to a bug in https://github.com/PaperMC/Paper/commit/bd75ff8b5b715c3fdf587b6aa3c0f2ecc4bf3443 which was added all the way back in March of 2016, it was unknown (potentially not at the time) that an entity might actually change the seed of the random object. At some point, EntitySquid did start setting the seed. Due to this shared random, this caused every entity to use a Random object with a predictable seed. This has caused entities to potentially generate with the same UUID.... Over the years, servers have had entities disappear, but no sign of trouble because CraftBukkit removed the log lines indicating that something was wrong. We have fixed the root issue causing duplicate UUID's, however we now have chunk files full of entities that have the same UUID as another entity! When these chunks load, the 2nd entity will not be added to the world correctly. If that chunk loads in a different order in the future, then it will reverse and the missing one is now the one added to the world and not the other. This results in very inconsistent entity behavior. This change allows you to recover any duplicate entity by generating a new UUID for it. This also lets you delete them instead if you don't want to risk having new entities added to the world that you previously did not see. But for those who are ok with leaving this inconsistent behavior, you may use WARN or NOTHING options. It is recommended you regenerate the entities, as these were legit entities, and deserve your love. --- .../Additional-Paper-Config-options.patch | 35 +++ .../Duplicate-UUID-Resolve-Option.patch | 207 ++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 Spigot-Server-Patches/Additional-Paper-Config-options.patch create mode 100644 Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch diff --git a/Spigot-Server-Patches/Additional-Paper-Config-options.patch b/Spigot-Server-Patches/Additional-Paper-Config-options.patch new file mode 100644 index 0000000000..11679c2eb1 --- /dev/null +++ b/Spigot-Server-Patches/Additional-Paper-Config-options.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Jul 2018 14:23:31 -0400 +Subject: [PATCH] Additional Paper Config options + +Have to keep as sep patch for now until 1.13, otherwise we can't merge :/ + +diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java +index 62bce1806..5a17ce3d2 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +@@ -0,0 +0,0 @@ public class PaperConfig { + readConfig(PaperConfig.class, null); + } + ++ protected static void logError(String s) { ++ Bukkit.getLogger().severe(s); ++ } ++ + protected static void log(String s) { + if (verbose) { + Bukkit.getLogger().info(s); +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 50416f40a..14c8edeff 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ import org.bukkit.configuration.file.YamlConfiguration; + import org.spigotmc.SpigotWorldConfig; + + import static com.destroystokyo.paper.PaperConfig.log; ++import static com.destroystokyo.paper.PaperConfig.logError; + + public class PaperWorldConfig { + +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch new file mode 100644 index 0000000000..56262f7bc9 --- /dev/null +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -0,0 +1,207 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Jul 2018 14:27:34 -0400 +Subject: [PATCH] Duplicate UUID Resolve Option + +Due to a bug in https://github.com/PaperMC/Paper/commit/2e29af3df05ec0a383f48be549d1c03200756d24 +which was added all the way back in March of 2016, it was unknown (potentially not at the time) +that an entity might actually change the seed of the random object. + +At some point, EntitySquid did start setting the seed. Due to this shared random, this caused +every entity to use a Random object with a predictable seed. + +This has caused entities to potentially generate with the same UUID.... + +Over the years, servers have had entities disappear, but no sign of trouble +because CraftBukkit removed the log lines indicating that something was wrong. + +We have fixed the root issue causing duplicate UUID's, however we now have chunk +files full of entities that have the same UUID as another entity! + +When these chunks load, the 2nd entity will not be added to the world correctly. + +If that chunk loads in a different order in the future, then it will reverse and the +missing one is now the one added to the world and not the other. This results in very +inconsistent entity behavior. + +This change allows you to recover any duplicate entity by generating a new UUID for it. +This also lets you delete them instead if you don't want to risk having new entities added to +the world that you previously did not see. + +But for those who are ok with leaving this inconsistent behavior, you may use WARN or NOTHING options. + +It is recommended you regenerate the entities, as these were legit entities, and deserve your love. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 14c8edeff..e3f6557e1 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + log("Bed Search Radius: " + bedSearchRadius); + } + } ++ ++ public enum DuplicateUUIDMode { ++ REGEN, DELETE, NOTHING, WARN ++ } ++ public DuplicateUUIDMode duplicateUUIDMode = DuplicateUUIDMode.REGEN; ++ public void repairDuplicateUUID() { ++ String desiredMode = getString("duplicate-uuid-resolver", "regenerate").toLowerCase().trim(); ++ switch (desiredMode.toLowerCase()) { ++ case "regen": ++ case "regenerate": ++ duplicateUUIDMode = DuplicateUUIDMode.REGEN; ++ log("Duplicate UUID Resolve: Regenerate New UUID"); ++ break; ++ case "remove": ++ case "delete": ++ duplicateUUIDMode = DuplicateUUIDMode.DELETE; ++ log("Duplicate UUID Resolve: Delete Entity"); ++ break; ++ case "silent": ++ case "nothing": ++ duplicateUUIDMode = DuplicateUUIDMode.NOTHING; ++ logError("Duplicate UUID Resolve: Do Nothing (no logs) - Warning, may lose indication of bad things happening"); ++ logError("PaperMC Strongly discourages use of this setting! Triggering these messages means SOMETHING IS WRONG!"); ++ break; ++ case "log": ++ case "warn": ++ duplicateUUIDMode = DuplicateUUIDMode.WARN; ++ log("Duplicate UUID Resolve: Warn (do nothing but log it happened, may be spammy)"); ++ break; ++ default: ++ duplicateUUIDMode = DuplicateUUIDMode.WARN; ++ logError("Warning: Invalidate duplicate-uuid-resolver config " + desiredMode + " - must be one of: regen, delete, nothing, warn"); ++ log("Duplicate UUID Resolve: Warn (do nothing but log it happened, may be spammy)"); ++ break; ++ } ++ } + } +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 04adf4e3c..ea9559583 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -0,0 +0,0 @@ + package net.minecraft.server; + ++// Paper start ++import com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode; ++import java.util.HashMap; ++import java.util.UUID; ++// Paper end + import com.destroystokyo.paper.exception.ServerInternalException; + import com.google.common.base.Predicate; + import com.google.common.collect.Maps; +@@ -0,0 +0,0 @@ public class Chunk { + public final World world; + public final int[] heightMap; + public Long scheduledForUnload; // Paper - delay chunk unloads ++ private static final Logger logger = LogManager.getLogger(); // Paper + public final int locX; + public final int locZ; + private boolean m; +@@ -0,0 +0,0 @@ public class Chunk { + if (i != this.locX || j != this.locZ) { + Chunk.e.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity); + entity.die(); ++ return; // Paper + } + + int k = MathHelper.floor(entity.locY / 16.0D); +@@ -0,0 +0,0 @@ public class Chunk { + + for (int j = 0; j < i; ++j) { + List entityslice = aentityslice[j]; // Spigot ++ // Paper start ++ DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode; ++ if (mode == DuplicateUUIDMode.DELETE || mode == DuplicateUUIDMode.REGEN) { ++ Map thisChunk = new HashMap<>(); ++ for (Iterator iterator = ((List) entityslice).iterator(); iterator.hasNext(); ) { ++ Entity entity = iterator.next(); ++ Entity other = ((WorldServer) world).entitiesByUUID.get(entity.uniqueID); ++ if (other == null) { ++ other = thisChunk.get(entity.uniqueID); ++ } ++ if (other != null) { ++ switch (mode) { ++ case REGEN: { ++ entity.setUUID(UUID.randomUUID()); ++ logger.error("Duplicate UUID found used by " + other); ++ logger.error("Regenerated a new UUID for " + entity); ++ break; ++ } ++ case DELETE: { ++ logger.error("Duplicate UUID found used by " + other); ++ logger.error("Deleting duplicate entity " + entity); ++ entity.die(); ++ iterator.remove(); ++ break; ++ } ++ } ++ } ++ thisChunk.put(entity.uniqueID, entity); ++ } ++ } ++ // Paper end + + this.world.a((Collection) entityslice); + } +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 0d3af8cb7..7188d0c99 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper + }); + } + ++ public void setUUID(UUID uuid) { a(uuid); } // Paper - OBFHELPER + public void a(UUID uuid) { + this.uniqueID = uuid; + this.ar = this.uniqueID.toString(); +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 994d4bbb8..1244baf45 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + private final PlayerChunkMap manager; + // private final Set nextTickListHash = Sets.newHashSet(); + private final HashTreeSet nextTickList = new HashTreeSet(); // CraftBukkit - HashTreeSet +- private final Map entitiesByUUID = Maps.newHashMap(); ++ public final Map entitiesByUUID = Maps.newHashMap(); // Paper + public boolean savingDisabled; + private boolean Q; + private int emptyTime; +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + this.f.remove(entity1); + } else { + if (!(entity instanceof EntityHuman)) { +- WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper +- WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper +- if (DEBUG_ENTITIES) { +- if (entity1.addedToWorldStack != null) { +- entity1.addedToWorldStack.printStackTrace(); ++ if (entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) { ++ WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper ++ WorldServer.a.error("Duplicate entity {} will not be added to the world. See paper.yml duplicate-uuid-resolver and set this to either regen, delete or nothing to get rid of this message", entity); // Paper ++ if (DEBUG_ENTITIES) { ++ if (entity1.addedToWorldStack != null) { ++ entity1.addedToWorldStack.printStackTrace(); ++ } ++ getAddToWorldStackTrace(entity).printStackTrace(); + } +- getAddToWorldStackTrace(entity).printStackTrace(); + } ++ + return false; + } + +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + entity.addedToWorldStack = getAddToWorldStackTrace(entity); + } + Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); +- if (old != null && old.getId() != entity.getId() && old.valid) { ++ if (old != null && old.getId() != entity.getId() && old.valid && entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) { + Logger logger = LogManager.getLogger(); + logger.error("Overwrote an existing entity " + old + " with " + entity); + if (DEBUG_ENTITIES) { +-- \ No newline at end of file From 97d99711ffaedc833ab9be0baa682951ce74971f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 16:03:10 -0400 Subject: [PATCH 14/67] Update Upstream --- .../Add-ArmorStand-Item-Meta.patch | 2 +- .../Add-PlayerArmorChangeEvent.patch | 4 +- .../Auto-Save-Improvements.patch | 36 ++++++++---- .../Basic-PlayerProfile-API.patch | 4 +- .../Cap-Entity-Collisions.patch | 6 +- .../Custom-replacement-for-eaten-items.patch | 2 +- .../Disable-explosion-knockback.patch | 6 +- ...ityRegainHealthEvent-isFastRegen-API.patch | 4 +- .../Further-improve-server-tick-loop.patch | 7 ++- .../Handle-Item-Meta-Inconsistencies.patch | 2 +- ...plement-EntityKnockbackByEntityEvent.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 2 +- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 4 +- ...e-shield-blocking-delay-configurable.patch | 6 +- .../Optimize-UserCache-Thread-Safe.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 2 +- Spigot-Server-Patches/Timings-v2.patch | 58 +++++++++---------- ...oleAppender-for-console-improvements.patch | 6 +- ...th-absorb-values-and-repair-bad-data.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 5 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 23 files changed, 93 insertions(+), 77 deletions(-) diff --git a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch index c3e5f355cb..fc9960d5a6 100644 --- a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch @@ -354,7 +354,7 @@ index 000000000..30941c7b0 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index e43a24989..df4bbba57 100644 +index 86c61abe4..c48911d00 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { diff --git a/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch index ab1e22e494..49c9fb88c6 100644 --- a/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 38baecd862..2f325f695e 100644 +index 0dcafdbcc..a4026d64a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ @@ -30,7 +30,7 @@ index 38baecd862..2f325f695e 100644 if (!itemstack.isEmpty()) { this.getAttributeMap().a(itemstack.a(enumitemslot)); diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java -index cdf3a3ba4a..be5d0bf898 100644 +index cdf3a3ba4..be5d0bf89 100644 --- a/src/main/java/net/minecraft/server/EnumItemSlot.java +++ b/src/main/java/net/minecraft/server/EnumItemSlot.java @@ -0,0 +0,0 @@ public enum EnumItemSlot { diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index 6fa813d188..054b9dfb52 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -64,9 +64,21 @@ index 0e6c18b32..c182ceffb 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6c6924937..5163bd11b 100644 +index 6c6924937..2f40f687a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { + private final TickList t; + private final TickList u; + private boolean v; +- private boolean w; ++ private boolean w; public boolean hasEntities() { return w; } // Paper - OBFHELPER + private long lastSaved; +- private boolean y; ++ private boolean y; public boolean isModified() { return y; } // Paper - OBFHELPER + private int z; + private long A; public long getInhabitedTime() { return A; } // Paper - OBFHELPER + private int B; @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { if (this.w && this.world.getTime() != this.lastSaved || this.y) { return true; @@ -76,8 +88,10 @@ index 6c6924937..5163bd11b 100644 } - - return this.y; -+ // This !flag section should say if y(isModified) or w(hasEntities), then check auto save -+ return ((this.y || this.w) && this.world.getTime() >= this.lastSaved + world.paperConfig.autoSavePeriod); // Paper - Make world configurable and incremental ++ // Paper start - Make world configurable and incremental ++ // This !flag section should say if isModified or hasEntities, then check auto save ++ return ((isModified() || hasEntities()) && this.world.getTime() >= this.lastSaved + world.paperConfig.autoSavePeriod); ++ // Paper end } public boolean isEmpty() { @@ -102,7 +116,7 @@ index 2e72a294d..1e6ea3084 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5aafa4e23..f5fae7ba8 100644 +index 08d6f77ae..5122cee42 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -114,17 +128,17 @@ index 5aafa4e23..f5fae7ba8 100644 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 49b2c27c6..bf020293d 100644 +index 0e59fc9eb..603ce9fe2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; + public ConsoleReader reader; + public static int currentTick = 0; // Paper - Further improve tick loop ++ public boolean serverAutoSave = false; // Paper + public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; - public File bukkitDataPackFolder; -+ public boolean serverAutoSave = false; // Paper - // CraftBukkit end - // Spigot start - public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.n.b().a(agameprofile); } @@ -200,7 +214,7 @@ index 6b7d81933..3ee587014 100644 public WhiteList getWhitelist() { return this.whitelist; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e3d62fc9c..72b3a6d40 100644 +index 6c976e3b1..a08ef197e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index 16b615dda7..efeff2f566 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -429,7 +429,7 @@ index 02940d697..4539b5601 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 39a8b1d69..4654e22c8 100644 +index c95f12351..26ace3cbf 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -486,7 +486,7 @@ index a47a51a41..4c476f757 100644 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 69cfe5c4d..0ef1186b9 100644 +index ac46e50ac..a8da20e35 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/Spigot-Server-Patches/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch index f84f39dd00..bcb0b3b89f 100644 --- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch @@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped. You can set this to 0 to disable collisions. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5df8b1143f..0b748d402b 100644 +index 5df8b1143..0b748d402 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -27,7 +27,7 @@ index 5df8b1143f..0b748d402b 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b47bf97387..db7e37aee6 100644 +index b47bf9738..db7e37aee 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -39,7 +39,7 @@ index b47bf97387..db7e37aee6 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 9f493e43d4..fc0e440798 100644 +index b25d4b714..f85da758d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch index fa8cfdc595..b72d3e3c6e 100644 --- a/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ab64fb7872..8d06249b6c 100644 +index 00cd44a72..bcbc77ad2 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Disable-explosion-knockback.patch b/Spigot-Server-Patches/Disable-explosion-knockback.patch index 4c3916eec2..ddbaa318c2 100644 --- a/Spigot-Server-Patches/Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/Disable-explosion-knockback.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable explosion knockback diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3626aa717d..be92c1af60 100644 +index 3626aa717..be92c1af6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 3626aa717d..be92c1af60 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d7a8a82a6a..18dd06980f 100644 +index f1840f4fa..17955d0f7 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -48,7 +48,7 @@ index d7a8a82a6a..18dd06980f 100644 if (!this.e(damagesource)) { SoundEffect soundeffect = this.cr(); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 8fdcd52b2f..75b21010b8 100644 +index 8fdcd52b2..75b21010b 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -0,0 +0,0 @@ public class Explosion { diff --git a/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch index b497ad4bea..3be37d27b8 100644 --- a/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ed9045f62a..1bef317758 100644 +index 746e19165..f5c3679b1 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -28,7 +28,7 @@ index ed9045f62a..1bef317758 100644 if (!event.isCancelled()) { diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index bbcc488bd7..d886e476bf 100644 +index bbcc488bd..d886e476b 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -0,0 +0,0 @@ public class FoodMetaData { diff --git a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index 9c58d7036a..bc7bac41cd 100644 --- a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4889a82a2..2e691b9f6 100644 +index cba7c18f2..093190108 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -24,7 +24,8 @@ index 4889a82a2..2e691b9f6 100644 public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; - public File bukkitDataPackFolder; +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + public CommandDispatcher vanillaCommandDispatcher; // CraftBukkit end // Spigot start - public static final int TPS = 20; @@ -148,7 +149,7 @@ index 4889a82a2..2e691b9f6 100644 } lastTick = curTime; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 34a07a7e7..6e152fe17 100644 +index a1a0a9b34..f39ddbf09 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch index 04e4c040fb..74541752a7 100644 --- a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch @@ -204,7 +204,7 @@ index d41459ef0..cadff64bf 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 3b73e52fa..e43a24989 100644 +index 86ae0a4b6..86c61abe4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ import java.lang.reflect.Constructor; diff --git a/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch index f8d672d2d0..c790b29ef0 100644 --- a/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ab3246ee02..f67b4ca353 100644 +index dffa42ba5..7cacbaffe 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index c2724af367..c542d198be 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 000000000..350410527 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4654e22c8..97581d995 100644 +index 26ace3cbf..bc2712898 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch index 45511e5687..2f6bd47777 100644 --- a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f67b4ca353..cda8151487 100644 +index 7cacbaffe..5f3ccee2e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -28,7 +28,7 @@ index f67b4ca353..cda8151487 100644 return this.isHandRaised() ? this.activeItem.k() - this.cW() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 35ba95e0f5..0975181e06 100644 +index 35ba95e0f..0975181e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch index 1facbfa3f9..2bb888bf20 100644 --- a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f1db4becde..ef4bfb480c 100644 +index f1db4becd..ef4bfb480 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index f1db4becde..ef4bfb480c 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2f325f695e..ab3246ee02 100644 +index a4026d64a..dffa42ba5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -49,7 +49,7 @@ index 2f325f695e..ab3246ee02 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 460a050cce..35ba95e0f5 100644 +index 460a050cc..35ba95e0f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch index b1fdaad9eb..096c175a4a 100644 --- a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch @@ -10,7 +10,7 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e11289217..49b2c27c6 100644 +index 05dc8451e..0e59fc9eb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch index d2dc234320..cf1f3ba8b8 100644 --- a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f81ff5628..f679c6bc2 100644 +index ab3193295..5d13f053f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index eb8108f8e5..340296944d 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java new file mode 100644 -index 0000000000..4f624e39c7 +index 000000000..4f624e39c --- /dev/null +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java @@ -0,0 +0,0 @@ @@ -137,7 +137,7 @@ index 0000000000..4f624e39c7 +} diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java new file mode 100644 -index 0000000000..0bb63600f3 +index 000000000..0bb63600f --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java @@ -0,0 +0,0 @@ @@ -323,7 +323,7 @@ index 0000000000..0bb63600f3 +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 -index 0000000000..145cb274b0 +index 000000000..145cb274b --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +0,0 @@ @@ -432,7 +432,7 @@ index 0000000000..145cb274b0 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5ab2cf6eec..b5795b6d34 100644 +index 5ab2cf6ee..b5795b6d3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import java.util.concurrent.TimeUnit; @@ -476,7 +476,7 @@ index 5ab2cf6eec..b5795b6d34 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index ffb91b27b0..ff110c8e95 100644 +index ffb91b27b..ff110c8e9 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -0,0 +0,0 @@ public class Block implements IMaterial { @@ -500,7 +500,7 @@ index ffb91b27b0..ff110c8e95 100644 Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap = new Object2ByteLinkedOpenHashMap(200) { protected void rehash(int i) {} diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java -index 5164e5c928..0c2386f5ec 100644 +index 5164e5c92..0c2386f5e 100644 --- a/src/main/java/net/minecraft/server/ChunkMap.java +++ b/src/main/java/net/minecraft/server/ChunkMap.java @@ -0,0 +0,0 @@ public class ChunkMap extends Long2ObjectOpenHashMap { @@ -531,7 +531,7 @@ index 5164e5c928..0c2386f5ec 100644 return chunk1; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 0296d3ef02..badfe86b22 100644 +index 0296d3ef0..badfe86b2 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -544,7 +544,7 @@ index 0296d3ef02..badfe86b22 100644 this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot } catch (IOException ioexception) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 90d8571053..3a0e52d882 100644 +index 90d857105..3a0e52d88 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ @@ -591,7 +591,7 @@ index 90d8571053..3a0e52d882 100644 } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 9155aa727d..a3d58b5ce5 100644 +index 9155aa727..a3d58b5ce 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Level; @@ -644,7 +644,7 @@ index 9155aa727d..a3d58b5ce5 100644 return waitable.get(); } catch (java.util.concurrent.ExecutionException e) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7a17a4ff99..2ed362791b 100644 +index 7a17a4ff9..2ed362791 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender; @@ -683,7 +683,7 @@ index 7a17a4ff99..2ed362791b 100644 protected float ab() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3c1adeea65..d7a8a82a6a 100644 +index b6dd6dc5d..f1840f4fa 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -759,7 +759,7 @@ index 3c1adeea65..d7a8a82a6a 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index ae31935c48..70c9b1f50c 100644 +index ae31935c4..70c9b1f50 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -0,0 +0,0 @@ public class EntityTracker { @@ -790,7 +790,7 @@ index ae31935c48..70c9b1f50c 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bcdd9e0fa4..590eb507c0 100644 +index d813c72e1..61ec088d2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ @@ -944,7 +944,7 @@ index bcdd9e0fa4..590eb507c0 100644 this.methodProfiler.e(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ac6d8cc6e6..d975c2ccf1 100644 +index ac6d8cc6e..d975c2ccf 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ @@ -1038,7 +1038,7 @@ index ac6d8cc6e6..d975c2ccf1 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6f21b01a83..359aa3997a 100644 +index 6f21b01a8..359aa3997 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; @@ -1077,7 +1077,7 @@ index 6f21b01a83..359aa3997a 100644 // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index 889b32287e..69da194f52 100644 +index 889b32287..69da194f5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -0,0 +0,0 @@ @@ -1100,7 +1100,7 @@ index 889b32287e..69da194f52 100644 throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0156175fb8..1e3dd22e5a 100644 +index 0156175fb..1e3dd22e5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ @@ -1124,7 +1124,7 @@ index 0156175fb8..1e3dd22e5a 100644 public WhiteList getWhitelist() { diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java -index a07895935e..ee5c2421bb 100644 +index a07895935..ee5c2421b 100644 --- a/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java @@ -0,0 +0,0 @@ public class TickListServer implements TickList { @@ -1178,7 +1178,7 @@ index a07895935e..ee5c2421bb 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index b992360ac2..5b7f6ca84c 100644 +index b992360ac..5b7f6ca84 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -1198,7 +1198,7 @@ index b992360ac2..5b7f6ca84c 100644 private final TileEntityTypes e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 330ea4e72e..e6b916a5db 100644 +index 330ea4e72..e6b916a5d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -1313,7 +1313,7 @@ index 330ea4e72e..e6b916a5db 100644 public boolean a(@Nullable Entity entity, VoxelShape voxelshape) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cecc9bc623..271d75c48d 100644 +index cecc9bc62..271d75c48 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ @@ -1429,7 +1429,7 @@ index cecc9bc623..271d75c48d 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 88766d30d8..d33f237b76 100644 +index 60182cecf..33826231d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -1466,7 +1466,7 @@ index 88766d30d8..d33f237b76 100644 org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java deleted file mode 100644 -index 4c8ab2bc97..0000000000 +index 4c8ab2bc9..000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -1645,7 +1645,7 @@ index 4c8ab2bc97..0000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -index 413dd35f06..52a8c48fa4 100644 +index 413dd35f0..52a8c48fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java @@ -0,0 +0,0 @@ @@ -1681,7 +1681,7 @@ index 413dd35f06..52a8c48fa4 100644 public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a2199b6a5..fad258f116 100644 +index 0a2199b6a..fad258f11 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1698,7 +1698,7 @@ index 0a2199b6a5..fad258f116 100644 public Player.Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index f11bd7545f..93b9134d6e 100644 +index f11bd7545..93b9134d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -1774,7 +1774,7 @@ index f11bd7545f..93b9134d6e 100644 private boolean isReady(final int currentTick) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index 7e7ce9a81b..46029ce246 100644 +index 7e7ce9a81..46029ce24 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -0,0 +0,0 @@ @@ -1856,7 +1856,7 @@ index 7e7ce9a81b..46029ce246 100644 - // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java -index e52ef47b78..3d90b34268 100644 +index e52ef47b7..3d90b3426 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java @@ -0,0 +0,0 @@ import org.bukkit.util.CachedServerIcon; @@ -1868,7 +1868,7 @@ index e52ef47b78..3d90b34268 100644 this.value = value; } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index e60fe5a920..f68e42c4d4 100644 +index e60fe5a92..f68e42c4d 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityWither; diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index 885d826218..ef582b099b 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -199,7 +199,7 @@ index a3d58b5ce..681194e94 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f679c6bc2..39a8b1d69 100644 +index 5d13f053f..c95f12351 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; @@ -217,8 +217,8 @@ index f679c6bc2..39a8b1d69 100644 - public ConsoleReader reader; + //public ConsoleReader reader; // Paper public static int currentTick = 0; // Paper - Further improve tick loop + public boolean serverAutoSave = false; // Paper public final Thread primaryThread; - public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati this.ac.a((IResourcePackListener) this.al); // CraftBukkit start @@ -271,7 +271,7 @@ index 4c9ff8c29..9e403d625 100644 this.k = new GameProfileBanList(PlayerList.a); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 470e334f7..9fe7c6a0d 100644 +index 8719fe35e..f6dfe2e2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import java.nio.ByteBuffer; diff --git a/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch index a03b58bae9..3710943932 100644 --- a/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 8d06249b6c..ed9045f62a 100644 +index bcbc77ad2..746e19165 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -44,7 +44,7 @@ index 8d06249b6c..ed9045f62a 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f6a7f08f96..e71fc971d7 100644 +index f6a7f08f9..e71fc971d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index 89435b2de8..e7e514ae6f 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c5670fe8d..e11289217 100644 +index 3c201c2e2..05dc8451e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -22,9 +22,10 @@ index c5670fe8d..e11289217 100644 public MinecraftServer(OptionSet options, Proxy proxy, DataFixer datafixer, CommandDispatcher commanddispatcher, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { + SERVER = this; // Paper - better singleton - this.commandDispatcher = commanddispatcher; // CraftBukkit ++ this.commandDispatcher = commanddispatcher; // CraftBukkit this.ac = new ResourceManager(EnumResourcePackType.SERVER_DATA); this.resourcePackRepository = new ResourcePackRepository(ResourcePackLoader::new); + this.ag = new CraftingManager(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // CraftBukkit start @Deprecated diff --git a/work/Bukkit b/work/Bukkit index ac92f0355a..2ba30dddd4 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit ac92f0355a7bf319d51b78837f8e7a3889b6c549 +Subproject commit 2ba30dddd4acb3bd789b4e487ed0647984576e8c diff --git a/work/CraftBukkit b/work/CraftBukkit index 7c0f69e449..961295e432 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 7c0f69e449b94547f95daa5c09407dd3f4a6fd52 +Subproject commit 961295e4327324766a0404857c1ca85051971995 diff --git a/work/Spigot b/work/Spigot index 751edf9136..3fa6cc486b 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 751edf9136cc98e37842b9dc43d4d119452c5433 +Subproject commit 3fa6cc486bf213165cc95cc3809162036cf9bf78 From 1b778924c37c12e0530731be2d84101276faa906 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 16:43:00 -0400 Subject: [PATCH 15/67] Rebuild patches for upstream merge --- ...ies-option-to-debug-dupe-uuid-issues.patch | 39 ++++++++----------- .../Additional-Paper-Config-options.patch | 2 +- ...e-if-stack-size-above-max-stack-size.patch | 2 +- .../Cap-Entity-Collisions.patch | 2 +- ...llow-entities-to-ride-themselves-572.patch | 2 +- .../Don-t-let-fishinghooks-use-portals.patch | 2 +- .../Don-t-teleport-dead-entities.patch | 2 +- .../Duplicate-UUID-Resolve-Option.patch | 32 +++++++-------- .../Entity-Tracking-Improvements.patch | 2 +- .../Entity-fromMobSpawner.patch | 2 +- ...nilla-per-world-scoreboard-coloring-.patch | 2 +- .../Optional-TNT-doesn-t-move-in-water.patch | 2 +- ...emove-entities-on-dimension-teleport.patch | 4 +- .../Use-a-Shared-Random-for-Entities.patch | 2 +- .../Use-asynchronous-Log4j-2-loggers.patch | 4 +- .../Vehicle-Event-Cancellation-Changes.patch | 2 +- ...-more-information-to-Entity.toString.patch | 8 ++-- 17 files changed, 52 insertions(+), 59 deletions(-) diff --git a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index dceaca58c0..1ed6586300 100644 --- a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,36 +6,28 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f6b755863..108654d63 100644 +index 0e0dc72f0..d725bf13e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper - } - return bukkitEntity; - } -+ Throwable addedToWorldStack; // Paper - entity debug - // CraftBukikt end +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + protected CraftEntity bukkitEntity; - private static final Logger a = LogManager.getLogger(); + EntityTrackerEntry tracker; // Paper ++ Throwable addedToWorldStack; // Paper - entity debug + public CraftEntity getBukkitEntity() { + if (bukkitEntity == null) { + bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b16324e1a..994d4bbb8 100644 +index fcb5f68f8..013f4eef5 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -0,0 +0,0 @@ import com.google.common.util.concurrent.ListenableFuture; - import java.io.File; - import java.util.ArrayList; - import java.util.Collection; -+import java.util.Date; - import java.util.Iterator; - import java.util.List; - import java.util.Map; @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - private final List W = Lists.newArrayList(); + private boolean Q; // CraftBukkit start + private static final boolean DEBUG_ENTITIES = Boolean.getBoolean("debug.entities"); // Paper + private static Throwable getAddToWorldStackTrace(Entity entity) { -+ return new Throwable(entity + " Added to world at " + new Date()); ++ return new Throwable(entity + " Added to world at " + new java.util.Date()); + } public final int dimension; @@ -43,16 +35,16 @@ index b16324e1a..994d4bbb8 100644 @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { private boolean j(Entity entity) { if (entity.dead) { - WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.a(entity)); // CraftBukkit // Paper + WorldServer.a.warn("Tried to add entity {} but it was marked as removed already: " + entity); // CraftBukkit // Paper + if (DEBUG_ENTITIES) getAddToWorldStackTrace(entity).printStackTrace(); return false; } else { UUID uuid = entity.getUniqueID(); @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - this.f.remove(entity1); + this.g.remove(entity1); } else { if (!(entity instanceof EntityHuman)) { -- WorldServer.a.error("Keeping entity {} that already exists with UUID {} - " + entity1, EntityTypes.a(entity1), uuid.toString()); // CraftBukkit // Paper +- WorldServer.a.error("Keeping entity {} that already exists with UUID {} - " + entity1, EntityTypes.getName(entity1.P()), uuid.toString()); // CraftBukkit // Paper + WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper + if (DEBUG_ENTITIES) { @@ -73,6 +65,7 @@ index b16324e1a..994d4bbb8 100644 + if (DEBUG_ENTITIES) { + entity.addedToWorldStack = getAddToWorldStackTrace(entity); + } ++ + Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); + if (old != null && old.getId() != entity.getId() && old.valid) { + Logger logger = LogManager.getLogger(); @@ -87,7 +80,7 @@ index b16324e1a..994d4bbb8 100644 + } + } + // Paper end - Entity[] aentity = entity.bb(); + Entity[] aentity = entity.bi(); if (aentity != null) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Additional-Paper-Config-options.patch b/Spigot-Server-Patches/Additional-Paper-Config-options.patch index 11679c2eb1..bb14fd471c 100644 --- a/Spigot-Server-Patches/Additional-Paper-Config-options.patch +++ b/Spigot-Server-Patches/Additional-Paper-Config-options.patch @@ -21,7 +21,7 @@ index 62bce1806..5a17ce3d2 100644 if (verbose) { Bukkit.getLogger().info(s); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 50416f40a..14c8edeff 100644 +index 692206127..7bd7aa0d9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ import org.bukkit.configuration.file.YamlConfiguration; diff --git a/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch index ae4a52d773..7f2dba8f75 100644 --- a/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch +++ b/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index d232bab745..b0f22f8f09 100644 +index d232bab74..b0f22f8f0 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { diff --git a/Spigot-Server-Patches/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch index bcb0b3b89f..d60d762cdd 100644 --- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index 5df8b1143..0b748d402 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b47bf9738..db7e37aee 100644 +index 4bfc49076..8a04a801b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index 343fcc718e..b8e4e0d7d3 100644 --- a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index eb2a693af..b47bf9738 100644 +index c7ef67a52..4bfc49076 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch index 0d98bd02b4..6bb752ba1b 100644 --- a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 51b42933d..eb2a693af 100644 +index 34c617958..c7ef67a52 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch index ef238d4b8c..73f559192b 100644 --- a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch @@ -7,7 +7,7 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c0367df20..c37c46e71 100644 +index 56aa89b45..f98f93c5c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index 56262f7bc9..43bf5c70a2 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 14c8edeff..e3f6557e1 100644 +index 7bd7aa0d9..ba6d5b7ff 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -78,7 +78,7 @@ index 14c8edeff..e3f6557e1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 04adf4e3c..ea9559583 100644 +index 03afa1236..1f50004cb 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -90,17 +90,17 @@ index 04adf4e3c..ea9559583 100644 +import java.util.UUID; +// Paper end import com.destroystokyo.paper.exception.ServerInternalException; - import com.google.common.base.Predicate; import com.google.common.collect.Maps; -@@ -0,0 +0,0 @@ public class Chunk { + import com.google.common.collect.Queues; +@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { public final World world; - public final int[] heightMap; + public final Map heightMap; public Long scheduledForUnload; // Paper - delay chunk unloads + private static final Logger logger = LogManager.getLogger(); // Paper public final int locX; public final int locZ; private boolean m; -@@ -0,0 +0,0 @@ public class Chunk { +@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { if (i != this.locX || j != this.locZ) { Chunk.e.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity); entity.die(); @@ -108,7 +108,7 @@ index 04adf4e3c..ea9559583 100644 } int k = MathHelper.floor(entity.locY / 16.0D); -@@ -0,0 +0,0 @@ public class Chunk { +@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot @@ -147,32 +147,32 @@ index 04adf4e3c..ea9559583 100644 this.world.a((Collection) entityslice); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0d3af8cb7..7188d0c99 100644 +index d725bf13e..7154692ee 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke }); } + public void setUUID(UUID uuid) { a(uuid); } // Paper - OBFHELPER public void a(UUID uuid) { this.uniqueID = uuid; - this.ar = this.uniqueID.toString(); + this.au = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 994d4bbb8..1244baf45 100644 +index 013f4eef5..b9d03d801 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + private final MinecraftServer server; + public EntityTracker tracker; private final PlayerChunkMap manager; - // private final Set nextTickListHash = Sets.newHashSet(); - private final HashTreeSet nextTickList = new HashTreeSet(); // CraftBukkit - HashTreeSet - private final Map entitiesByUUID = Maps.newHashMap(); + public final Map entitiesByUUID = Maps.newHashMap(); // Paper public boolean savingDisabled; - private boolean Q; + private boolean K; private int emptyTime; @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - this.f.remove(entity1); + this.g.remove(entity1); } else { if (!(entity instanceof EntityHuman)) { - WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper @@ -196,8 +196,8 @@ index 994d4bbb8..1244baf45 100644 } @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - entity.addedToWorldStack = getAddToWorldStackTrace(entity); } + Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); - if (old != null && old.getId() != entity.getId() && old.valid) { + if (old != null && old.getId() != entity.getId() && old.valid && entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) { diff --git a/Spigot-Server-Patches/Entity-Tracking-Improvements.patch b/Spigot-Server-Patches/Entity-Tracking-Improvements.patch index 007e4087c9..14f4c9ef6b 100644 --- a/Spigot-Server-Patches/Entity-Tracking-Improvements.patch +++ b/Spigot-Server-Patches/Entity-Tracking-Improvements.patch @@ -7,7 +7,7 @@ If any part of a Vehicle/Passenger relationship is visible to a player, send all passenger/vehicles to the player in the chain. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9af242380..70694c8e5 100644 +index 16d521dfd..dd4ac4bfe 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Entity-fromMobSpawner.patch b/Spigot-Server-Patches/Entity-fromMobSpawner.patch index cf08d13ff8..fc6aed19db 100644 --- a/Spigot-Server-Patches/Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index db7e37aee..cd1639e26 100644 +index 8a04a801b..0d69e6187 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index dbdfc8a14c..56e21c5409 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -19,7 +19,7 @@ index 6ac58e5ec..ff9929a05 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c37c46e71..88092d823 100644 +index f98f93c5c..31c580de1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index e2ab38cf53..7445ef0af3 100644 --- a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -32,7 +32,7 @@ index 38de48ebc..321da3be3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 70694c8e5..51b42933d 100644 +index dd4ac4bfe..34c617958 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch index 0038947481..0c75354c6a 100644 --- a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch +++ b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch @@ -22,7 +22,7 @@ requirement, but plugins (such as my own) use this method to trigger a "reload" of the entity on the client. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cd1639e26..ea42800ae 100644 +index 0d69e6187..67af3e25c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -35,7 +35,7 @@ index cd1639e26..ea42800ae 100644 this.world.methodProfiler.a("reposition"); /* CraftBukkit start - Handled in calculateTarget diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4ac2d39c5..d6d3ffa6f 100644 +index 9e3804579..44d867663 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch index 3789709708..7081428b15 100644 --- a/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e16579116..c0367df20 100644 +index e16579116..56aa89b45 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch index 5642695e59..66aa8eae96 100644 --- a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use asynchronous Log4j 2 loggers diff --git a/pom.xml b/pom.xml -index 8fd1e36283..0c4b0daf56 100644 +index a034c87d6..efa52f356 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -25,7 +25,7 @@ index 8fd1e36283..0c4b0daf56 100644 junit diff --git a/src/main/resources/log4j2.component.properties b/src/main/resources/log4j2.component.properties new file mode 100644 -index 0000000000..ee7c90784c +index 000000000..ee7c90784 --- /dev/null +++ b/src/main/resources/log4j2.component.properties @@ -0,0 +1 @@ diff --git a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch index 3301260f19..797bc1a608 100644 --- a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch +++ b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vehicle Event Cancellation Changes diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 88092d823..9af242380 100644 +index 31c580de1..16d521dfd 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index 188e517b86..def4954791 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,15 +6,15 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 80ecdb282..99dac412f 100644 +index 67af3e25c..0e0dc72f0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public String toString() { -- return String.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); -+ return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cd=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information +- return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); ++ return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information } public boolean isInvulnerable(DamageSource damagesource) { From 58a8ca3eae028794deac561b586821ede99d7785 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 16:55:43 -0400 Subject: [PATCH 16/67] Restore World.loadChunkAsync API - but load chunks sync We are still missing Async Chunk Loading, but plugins may be depending on this API, so it missing blocks upgrading. --- .../Add-async-chunk-load-API.patch | 90 +++++++++++++++++++ .../Add-async-chunk-load-API.patch | 39 ++++++++ 2 files changed, 129 insertions(+) create mode 100644 Spigot-API-Patches/Add-async-chunk-load-API.patch create mode 100644 Spigot-Server-Patches/Add-async-chunk-load-API.patch diff --git a/Spigot-API-Patches/Add-async-chunk-load-API.patch b/Spigot-API-Patches/Add-async-chunk-load-API.patch new file mode 100644 index 0000000000..d55083c276 --- /dev/null +++ b/Spigot-API-Patches/Add-async-chunk-load-API.patch @@ -0,0 +1,90 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 29 Feb 2016 17:43:33 -0600 +Subject: [PATCH] Add async chunk load API + + +diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java +index 550c26be..121033e9 100644 +--- a/src/main/java/org/bukkit/World.java ++++ b/src/main/java/org/bukkit/World.java +@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable { + */ + public Chunk getChunkAt(Block block); + ++ /** ++ * Used by {@link World#getChunkAtAsync(Location,ChunkLoadCallback)} methods ++ * to request a {@link Chunk} to be loaded, with this callback receiving ++ * the chunk when it is finished. ++ * ++ * This callback will be executed on synchronously on the main thread. ++ * ++ * Timing and order this callback is fired is intentionally not defined and ++ * and subject to change. ++ */ ++ public static interface ChunkLoadCallback { ++ public void onLoad(Chunk chunk); ++ } ++ ++ /** ++ * Requests a {@link Chunk} to be loaded at the given coordinates ++ * ++ * This method makes no guarantee on how fast the chunk will load, ++ * and will return the chunk to the callback at a later time. ++ * ++ * You should use this method if you need a chunk but do not need it ++ * immediately, and you wish to let the server control the speed ++ * of chunk loads, keeping performance in mind. ++ * ++ * The {@link ChunkLoadCallback} will always be executed synchronously ++ * on the main Server Thread. ++ * ++ * @param x Chunk X-coordinate of the chunk - (world coordinate / 16) ++ * @param z Chunk Z-coordinate of the chunk - (world coordinate / 16) ++ * @param cb Callback to receive the chunk when it is loaded. ++ * will be executed synchronously ++ */ ++ public void getChunkAtAsync(int x, int z, ChunkLoadCallback cb); ++ ++ /** ++ * Requests a {@link Chunk} to be loaded at the given {@link Location} ++ * ++ * This method makes no guarantee on how fast the chunk will load, ++ * and will return the chunk to the callback at a later time. ++ * ++ * You should use this method if you need a chunk but do not need it ++ * immediately, and you wish to let the server control the speed ++ * of chunk loads, keeping performance in mind. ++ * ++ * The {@link ChunkLoadCallback} will always be executed synchronously ++ * on the main Server Thread. ++ * ++ * @param location Location of the chunk ++ * @param cb Callback to receive the chunk when it is loaded. ++ * will be executed synchronously ++ */ ++ public void getChunkAtAsync(Location location, ChunkLoadCallback cb); ++ ++ /** ++ * Requests {@link Chunk} to be loaded that contains the given {@link Block} ++ * ++ * This method makes no guarantee on how fast the chunk will load, ++ * and will return the chunk to the callback at a later time. ++ * ++ * You should use this method if you need a chunk but do not need it ++ * immediately, and you wish to let the server control the speed ++ * of chunk loads, keeping performance in mind. ++ * ++ * The {@link ChunkLoadCallback} will always be executed synchronously ++ * on the main Server Thread. ++ * ++ * @param block Block to get the containing chunk from ++ * @param cb Callback to receive the chunk when it is loaded. ++ * will be executed synchronously ++ */ ++ public void getChunkAtAsync(Block block, ChunkLoadCallback cb); ++ + /** + * Checks if the specified {@link Chunk} is loaded + * +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Add-async-chunk-load-API.patch b/Spigot-Server-Patches/Add-async-chunk-load-API.patch new file mode 100644 index 0000000000..be6b17b1f9 --- /dev/null +++ b/Spigot-Server-Patches/Add-async-chunk-load-API.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Jul 2018 16:55:04 -0400 +Subject: [PATCH] Add async chunk load API + + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +index 0f4a894eb..995e02f1d 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -0,0 +0,0 @@ public class CraftWorld implements World { + } + } + ++ // Paper start - Async chunk load API ++ public void getChunkAtAsync(final int x, final int z, final ChunkLoadCallback callback) { ++ final ChunkProviderServer cps = this.world.getChunkProviderServer(); ++ callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); // TODO: Add back async variant ++ /*cps.getChunkAt(x, z, new Runnable() { ++ @Override ++ public void run() { ++ callback.onLoad(cps.getChunkAt(x, z).bukkitChunk); ++ } ++ });*/ ++ } ++ ++ public void getChunkAtAsync(Block block, ChunkLoadCallback callback) { ++ getChunkAtAsync(block.getX() >> 4, block.getZ() >> 4, callback); ++ } ++ ++ public void getChunkAtAsync(Location location, ChunkLoadCallback callback) { ++ getChunkAtAsync(location.getBlockX() >> 4, location.getBlockZ() >> 4, callback); ++ } ++ // Paper end ++ + public Chunk getChunkAt(int x, int z) { + return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk; + } +-- \ No newline at end of file From d6293c533d1e384848388586b976055b870531ad Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 17:03:26 -0400 Subject: [PATCH 17/67] Restore Configurable Allowance of Perm Chunk Loaders --- ...Allowance-of-Permanent-Chunk-Loaders.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch diff --git a/Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch b/Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch new file mode 100644 index 0000000000..91bbcb5c42 --- /dev/null +++ b/Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 21 Apr 2018 11:21:48 -0400 +Subject: [PATCH] Configurable Allowance of Permanent Chunk Loaders + +This disables the behavior that allows players to keep chunks permanently loaded +by default and allows server operators to enable it if they wish. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index ba6d5b7ff..b9f5f4905 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + break; + } + } ++ public boolean allowPermaChunkLoaders = false; ++ private void allowPermaChunkLoaders() { ++ allowPermaChunkLoaders = getBoolean("game-mechanics.allow-permanent-chunk-loaders", allowPermaChunkLoaders); ++ log("Allow Perma Chunk Loaders: " + (allowPermaChunkLoaders ? "enabled" : "disabled")); ++ } + } +diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index 70790386e..7f83ed51d 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { + Long2ObjectMap long2objectmap = this.chunks; + + synchronized (this.chunks) { +- Chunk chunk = this.getLoadedChunkAt(i, j); ++ Chunk chunk = world.paperConfig.allowPermaChunkLoaders ? getLoadedChunkAt(i, j) : getChunkIfLoaded(i, j); // Paper - Configurable perma chunk loaders + + return chunk != null ? chunk : this.loadChunkAt(i, j); + } +-- \ No newline at end of file From 1db0b7ed585897a2ce66b43fc2d8a6f0b7c0ab8c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 17:24:18 -0400 Subject: [PATCH 18/67] Readd configurable max chunk gens per tick --- ...ups-for-Entity-TileEntity-Current-Ch.patch | 2 +- ...Configurable-Max-Chunk-Gens-per-Tick.patch | 109 ++++++++++++++++++ ...urable-sprint-interruption-on-attack.patch | 7 +- ...ent-consumeArrow-and-getArrowItem-AP.patch | 6 +- ...ld.spawnParticle-API-and-add-Builder.patch | 2 +- .../Extend-Player-Interact-cancellation.patch | 2 +- ...e-EntityShootBowEvent-for-Illusioner.patch | 2 +- ...leHitEvent-to-include-the-BlockFace-.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 16 +-- ...Load-version-history-at-server-start.patch | 2 +- ...-max-squid-spawn-height-configurable.patch | 16 +-- .../Player.setPlayerProfile-API.patch | 2 +- ...nilla-entity-warnings-for-duplicates.patch | 2 +- ...r-crits-helps-mitigate-hacked-client.patch | 4 +- .../WitchConsumePotionEvent.patch | 2 +- .../WitchReadyPotionEvent.patch | 2 +- .../WitchThrowPotionEvent.patch | 2 +- .../getPlayerUniqueId-API.patch | 2 +- scripts/importmcdev.sh | 10 +- 19 files changed, 148 insertions(+), 44 deletions(-) create mode 100644 Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch diff --git a/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch b/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch index fe9361e162..ed730d0769 100644 --- a/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch +++ b/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch @@ -10,7 +10,7 @@ to the object directly on the Entity/TileEntity object we can directly grab. Use that local value instead to reduce lookups in many hot places. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2612d4207..b3cdc0b7d 100644 +index 9e798038b..03afa1236 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch b/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch new file mode 100644 index 0000000000..ee7257fe4f --- /dev/null +++ b/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch @@ -0,0 +1,109 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 1 Jan 2018 16:10:24 -0500 +Subject: [PATCH] Configurable Max Chunk Gens per Tick + +Limit the number of generations that can occur in a single tick, forcing them +to be spread out more. + +Defaulting to 10 as an average generation is going to be 3-6ms, which means 10 will +likely cause the server to lose TPS, but constrain how much. + +This should result in no noticeable speed reduction in generation for servers not +lagging, and let larger servers reduce this value according to their own desires. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 703642c0b..faa7597b3 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + } + log("Max Chunk Sends Per Tick: " + maxChunkSendsPerTick); + } ++ ++ public int maxChunkGensPerTick = 10; ++ private void maxChunkGensPerTick() { ++ maxChunkGensPerTick = getInt("max-chunk-gens-per-tick", maxChunkGensPerTick); ++ if (maxChunkGensPerTick <= 0) { ++ maxChunkGensPerTick = Integer.MAX_VALUE; ++ log("Max Chunk Gens Per Tick: Unlimited (NOT RECOMMENDED)"); ++ } else { ++ log("Max Chunk Gens Per Tick: " + maxChunkGensPerTick); ++ } ++ } + } +diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java +index 344b95233..fcd9f5491 100644 +--- a/src/main/java/net/minecraft/server/PlayerChunk.java ++++ b/src/main/java/net/minecraft/server/PlayerChunk.java +@@ -0,0 +0,0 @@ public class PlayerChunk { + // CraftBukkit start - add fields + // You know the drill, https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse + // All may seem good at first, but there's deeper issues if you play for a bit ++ boolean chunkExists; // Paper + private boolean loadInProgress = false; + private Runnable loadedRunnable = new Runnable() { + public void run() { +@@ -0,0 +0,0 @@ public class PlayerChunk { + this.playerChunkMap = playerchunkmap; + this.location = new ChunkCoordIntPair(i, j); + this.chunk = playerchunkmap.getWorld().getChunkProviderServer().getOrLoadChunkAt(i, j); ++ this.chunkExists = this.chunk != null || ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), i, j); // Paper + markChunkUsed(); // Paper - delay chunk unloads + } + +diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java +index 9fd07f859..e29aaab2d 100644 +--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java ++++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +@@ -0,0 +0,0 @@ public class PlayerChunkMap { + // Spigot start + org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; + activityAccountant.startActivity(0.5); ++ int chunkGensAllowed = world.paperConfig.maxChunkGensPerTick; // Paper + // Spigot end + + Iterator iterator1 = this.h.iterator(); +@@ -0,0 +0,0 @@ public class PlayerChunkMap { + + if (playerchunk1.f() == null) { + boolean flag = playerchunk1.a(PlayerChunkMap.b); ++ // Paper start ++ if (flag && !playerchunk1.chunkExists && chunkGensAllowed-- <= 0) { ++ continue; ++ } ++ // Paper end + + if (playerchunk1.a(flag)) { + iterator1.remove(); +diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java +index 9aaca21a7..f50d55c8e 100644 +--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java ++++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java +@@ -0,0 +0,0 @@ public class ChunkIOExecutor { + public static void tick() { + instance.finishActive(); + } ++ ++ // Paper start ++ public static boolean hasQueuedChunkLoad(World world, int x, int z) { ++ return instance.hasTask(new QueuedChunk(x, z, null, world, null)); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java +index 193c3621c..cf1258c55 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java +@@ -0,0 +0,0 @@ public final class AsynchronousExecutor { + public void setActiveThreads(final int coreSize) { + pool.setCorePoolSize(coreSize); + } ++ ++ // Paper start ++ public boolean hasTask(P parameter) throws IllegalStateException { ++ return tasks.get(parameter) != null; ++ } ++ // Paper end + } +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch index 6b8d2308c5..800e85977d 100644 --- a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch @@ -6,20 +6,21 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4ca31c8eb..b07ff9587 100644 +index 79df2c171..b07ff9587 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { + private void squidMaxSpawnHeight() { squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); } - ++ + public boolean disableSprintInterruptionOnAttack; + private void disableSprintInterruptionOnAttack() { + disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 65f4ea6cc..a766a1467 100644 +index de1b6ac86..4aba5716c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index 03210a4af8..84cf61ed74 100644 --- a/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API Adds ability to get what arrow was shot, and control if it should be consumed. diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -index c2bc8060ac..1ae967d1c0 100644 +index c2bc8060a..1ae967d1c 100644 --- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java +++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java @@ -0,0 +0,0 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR @@ -19,7 +19,7 @@ index c2bc8060ac..1ae967d1c0 100644 event.getProjectile().remove(); return; diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java -index 4aa3b6249f..c8fc180458 100644 +index 4aa3b6249..c8fc18045 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -0,0 +0,0 @@ public class ItemBow extends Item { @@ -58,7 +58,7 @@ index 4aa3b6249f..c8fc180458 100644 if (itemstack1.isEmpty()) { entityhuman.inventory.f(itemstack1); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 8df07536f8..28b156e439 100644 +index 8df07536f..28b156e43 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch index b8b1748805..8c3b992efe 100644 --- a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch @@ -9,7 +9,7 @@ the standard API is to send the packet to everyone in the world, which is ineffe This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c5da2cde3..4ac2d39c5 100644 +index 23414c776..9e3804579 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch b/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch index 616fe9715f..8060394e2a 100644 --- a/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch +++ b/Spigot-Server-Patches/Extend-Player-Interact-cancellation.patch @@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds when cancelling interaction. diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index e34198e4..e375e255 100644 +index e34198e40..e375e2556 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -0,0 +0,0 @@ public class PlayerInteractManager { diff --git a/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch b/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch index c357141d8d..048c623f7d 100644 --- a/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch +++ b/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fire EntityShootBowEvent for Illusioner diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -index d03fa6318..16c3be42e 100644 +index d64664c4d..4832fdd02 100644 --- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java +++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java @@ -0,0 +0,0 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan diff --git a/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch index a86ff89218..275663c7b8 100644 --- a/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ b/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 28b156e439..8ac599b7a2 100644 +index 28b156e43..8ac599b7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index d735f0b8f6..304b07350b 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index f31524eb02..2612d4207f 100644 +index ac90ca802..9e798038b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -29,7 +29,7 @@ index f31524eb02..2612d4207f 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4aba5716ce..d84bb0e40c 100644 +index 4aba5716c..d84bb0e40 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -56,7 +56,7 @@ index 4aba5716ce..d84bb0e40c 100644 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5db6e07640..99c638857b 100644 +index 5db6e0764..99c638857 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -110,7 +110,7 @@ index 5db6e07640..99c638857b 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 067f7b9908..97b315bca0 100644 +index 067f7b990..97b315bca 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -123,7 +123,7 @@ index 067f7b9908..97b315bca0 100644 this.player.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 879780c5b1..907f0232bf 100644 +index 879780c5b..907f0232b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -136,7 +136,7 @@ index 879780c5b1..907f0232bf 100644 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 4b9ecb4a62..b602a5d1b9 100644 +index 4b9ecb4a6..b602a5d1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -155,7 +155,7 @@ index 4b9ecb4a62..b602a5d1b9 100644 public boolean isBlocking() { return getHandle().isBlocking(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 60bc6d3316..b25980027b 100644 +index 60bc6d331..b25980027 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -168,7 +168,7 @@ index 60bc6d3316..b25980027b 100644 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 8ac599b7a2..cf398cd250 100644 +index 8ac599b7a..cf398cd25 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Load-version-history-at-server-start.patch b/Spigot-Server-Patches/Load-version-history-at-server-start.patch index f820f1b51b..4d46d091e0 100644 --- a/Spigot-Server-Patches/Load-version-history-at-server-start.patch +++ b/Spigot-Server-Patches/Load-version-history-at-server-start.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Load version history at server start diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 927cbeedcd..ae7a8c1046 100644 +index 927cbeedc..ae7a8c104 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch index 509430070a..dd2735e716 100644 --- a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch @@ -7,30 +7,18 @@ I don't know why upstream made only the minimum height configurable but whatever diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 703642c0b..a33c55f41 100644 +index faa7597b3..fddd52caf 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { + log("Max Chunk Gens Per Tick: " + maxChunkGensPerTick); } - log("Max Chunk Sends Per Tick: " + maxChunkSendsPerTick); } + -+ public int maxChunkGensPerTick = 10; -+ private void maxChunkGensPerTick() { -+ maxChunkGensPerTick = getInt("max-chunk-gens-per-tick", maxChunkGensPerTick); -+ if (maxChunkGensPerTick <= 0) { -+ maxChunkGensPerTick = Integer.MAX_VALUE; -+ log("Max Chunk Gens Per Tick: Unlimited (NOT RECOMMENDED)"); -+ } else { -+ log("Max Chunk Gens Per Tick: " + maxChunkGensPerTick); -+ } -+ } -+ + public double squidMaxSpawnHeight; + private void squidMaxSpawnHeight() { + squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); + } -+ } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java index ffc6d0b68..70b251210 100644 diff --git a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index 898e3fff04..c4effa329f 100644 --- a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4fb300468..65f4ea6cc 100644 +index 98fdfcb60..de1b6ac86 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch index 18e0458eec..8c7fe5080f 100644 --- a/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -8,7 +8,7 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d6d3ffa6f..2c5004e61 100644 +index 44d867663..fcb5f68f8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch index d46e251314..43cf743b7d 100644 --- a/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a33c55f41..4ca31c8eb 100644 +index fddd52caf..79df2c171 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index a33c55f41..4ca31c8eb 100644 private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index ae4dd621d..4fb300468 100644 +index 28688f2ac..98fdfcb60 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/WitchConsumePotionEvent.patch b/Spigot-Server-Patches/WitchConsumePotionEvent.patch index b8def6d503..d035212720 100644 --- a/Spigot-Server-Patches/WitchConsumePotionEvent.patch +++ b/Spigot-Server-Patches/WitchConsumePotionEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] WitchConsumePotionEvent Fires when a witch consumes the potion in their hand diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 71d8b6f8f..cf0669589 100644 +index 524d84c5b..c77328e76 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/WitchReadyPotionEvent.patch b/Spigot-Server-Patches/WitchReadyPotionEvent.patch index d2385c4fd3..2c39dd8f7a 100644 --- a/Spigot-Server-Patches/WitchReadyPotionEvent.patch +++ b/Spigot-Server-Patches/WitchReadyPotionEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 59f3f4404..45b6e2b7b 100644 +index 2d8e307e7..b6f4ec842 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/WitchThrowPotionEvent.patch b/Spigot-Server-Patches/WitchThrowPotionEvent.patch index 9beb930235..d94f47e2ef 100644 --- a/Spigot-Server-Patches/WitchThrowPotionEvent.patch +++ b/Spigot-Server-Patches/WitchThrowPotionEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] WitchThrowPotionEvent Fired when a witch throws a potion at a player diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index cf0669589..59f3f4404 100644 +index c77328e76..2d8e307e7 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/getPlayerUniqueId-API.patch b/Spigot-Server-Patches/getPlayerUniqueId-API.patch index 57ae921785..63d94493a4 100644 --- a/Spigot-Server-Patches/getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d605e5792..0b361d82f 100644 +index b1d3f2a5e..f3050b126 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 255d8b25f4..9217d06df0 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -69,8 +69,14 @@ for f in $files; do fi done -import NBTList -import NBTBase +# Temporarily add new NMS dev imports here before you run paper patch +# but after you have paper rb'd your changes, remove the line from this file before committing. +# we do not need any lines added to this file + +# import FileName + + + set -e cd "$workdir/Spigot/Spigot-Server/" From 6b5f080374b579d971b1cd52d120af6fffa24e75 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 00:45:49 -0400 Subject: [PATCH 19/67] Add mc util methods --- .../Basic-PlayerProfile-API.patch | 2 +- Spigot-Server-Patches/MC-Utils.patch | 73 ++++++++++++++++++- .../String-based-Action-Bar-API.patch | 10 +-- 3 files changed, 75 insertions(+), 10 deletions(-) diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index efeff2f566..688de6b70d 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -404,7 +404,7 @@ index 000000000..3aceb0ea8 + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 02940d697..4539b5601 100644 +index 70db1cc14..9ab3844fc 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index dc0bb83ecf..8e7e57c1d1 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -18,7 +18,7 @@ index c3e990bdf..e2a7b4be2 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 002da2a19..70a7edf57 100644 +index 121a137f3..35ec4981c 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -181,7 +181,7 @@ index a540167d6..add618866 100644 } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 000000000..a4b0901cf +index 000000000..edaa7713d --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -193,9 +193,13 @@ index 000000000..a4b0901cf +import org.spigotmc.AsyncCatcher; + +import javax.annotation.Nullable; ++import java.util.Queue; ++import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; ++import java.util.concurrent.TimeUnit; ++import java.util.concurrent.TimeoutException; +import java.util.function.Supplier; +import java.util.regex.Pattern; + @@ -205,6 +209,65 @@ index 000000000..a4b0901cf + private MCUtil() {} + + ++ public static boolean isMainThread() { ++ return MinecraftServer.getServer().isMainThread(); ++ } ++ ++ public static void processQueue() { ++ Runnable runnable; ++ Queue processQueue = getProcessQueue(); ++ while ((runnable = processQueue.poll()) != null) { ++ try { ++ runnable.run(); ++ } catch (Exception e) { ++ MinecraftServer.LOGGER.error("Error executing task", e); ++ } ++ } ++ } ++ public static T processQueueWhileWaiting(CompletableFuture future) { ++ try { ++ if (isMainThread()) { ++ while (!future.isDone()) { ++ try { ++ return future.get(1, TimeUnit.MILLISECONDS); ++ } catch (TimeoutException ignored) { ++ processQueue(); ++ } ++ } ++ } ++ return future.get(); ++ } catch (Exception e) { ++ throw new RuntimeException(e); ++ } ++ } ++ ++ public static void ensureMain(Runnable run) { ++ ensureMain(null, run); ++ } ++ /** ++ * Ensures the target code is running on the main thread ++ * @param reason ++ * @param run ++ * @return ++ */ ++ public static void ensureMain(String reason, Runnable run) { ++ if (AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().primaryThread) { ++ if (reason != null) { ++ new IllegalStateException("Asynchronous " + reason + "!").printStackTrace(); ++ } ++ getProcessQueue().add(run); ++ return; ++ } ++ run.run(); ++ } ++ ++ private static Queue getProcessQueue() { ++ return MinecraftServer.getServer().processQueue; ++ } ++ ++ public static T ensureMain(Supplier run) { ++ return ensureMain(null, run); ++ } + /** + * Ensures the target code is running on the main thread + * @param reason @@ -214,14 +277,16 @@ index 000000000..a4b0901cf + */ + public static T ensureMain(String reason, Supplier run) { + if (AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().primaryThread) { -+ new IllegalStateException( "Asynchronous " + reason + "! Blocking thread until it returns ").printStackTrace(); ++ if (reason != null) { ++ new IllegalStateException("Asynchronous " + reason + "! Blocking thread until it returns ").printStackTrace(); ++ } + Waitable wait = new Waitable() { + @Override + protected T evaluate() { + return run.get(); + } + }; -+ MinecraftServer.getServer().processQueue.add(wait); ++ getProcessQueue().add(wait); + try { + return wait.get(); + } catch (InterruptedException | ExecutionException e) { diff --git a/Spigot-Server-Patches/String-based-Action-Bar-API.patch b/Spigot-Server-Patches/String-based-Action-Bar-API.patch index 2de31c81a7..0fef359074 100644 --- a/Spigot-Server-Patches/String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/String-based-Action-Bar-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] String based Action Bar API diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index a4b0901cf..02940d697 100644 +index edaa7713d..70db1cc14 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -20,8 +20,8 @@ index a4b0901cf..02940d697 100644 +import javax.annotation.Nonnull; import javax.annotation.Nullable; - import java.util.concurrent.ExecutionException; - import java.util.concurrent.Executor; + import java.util.Queue; + import java.util.concurrent.CompletableFuture; @@ -0,0 +0,0 @@ public final class MCUtil { private MCUtil() {} @@ -45,8 +45,8 @@ index a4b0901cf..02940d697 100644 + return ExceptionUtils.getFullStackTrace(new Throwable(str)); + } - /** - * Ensures the target code is running on the main thread + public static boolean isMainThread() { + return MinecraftServer.getServer().isMainThread(); @@ -0,0 +0,0 @@ public final class MCUtil { } return null; From 70c967fb6b5554af9048effa02d3f9e2cc36b98a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 01:27:46 -0400 Subject: [PATCH 20/67] Update Paper to 1.13 proper - THIS IS STILL HIGHLY UNSTABLE DO NOT RUN ON PRODUCTION SERVERS!!! Use Backups!! --- Spigot-API-Patches/Entity-Origin-API.patch | 2 +- Spigot-API-Patches/POM-changes.patch | 4 +- .../Activation-Range-Improvements.patch | 16 +++--- ...to-control-if-armour-stands-can-move.patch | 4 +- .../Add-PlayerJumpEvent.patch | 12 ++-- ...n-option-to-prevent-player-names-fro.patch | 2 +- .../Add-exception-reporting-event.patch | 14 ++--- .../Add-server-name-parameter.patch | 2 +- ...setting-for-proxy-online-mode-status.patch | 2 +- .../Allow-Reloading-of-Command-Aliases.patch | 2 +- ...llow-Reloading-of-Custom-Permissions.patch | 2 +- .../Allow-nerfed-mobs-to-jump.patch | 11 ++-- .../AsyncTabCompleteEvent.patch | 4 +- .../Auto-Save-Improvements.patch | 12 ++-- .../Basic-PlayerProfile-API.patch | 4 +- ...player-logins-during-server-shutdown.patch | 4 +- .../Chunk-Save-Reattempt.patch | 4 +- .../Chunk-Save-Stats-Debug-Option.patch | 4 +- .../Chunk-registration-fixes.patch | 2 +- .../Chunk-save-queue-improvements.patch | 17 +----- ...le-Keep-Spawn-Loaded-range-per-world.patch | 6 +- .../Configurable-Player-Collision.patch | 6 +- .../Custom-replacement-for-eaten-items.patch | 7 ++- ...unk-Unloads-based-on-Player-Movement.patch | 6 +- .../Disable-explosion-knockback.patch | 6 +- .../Do-not-let-armorstands-drown.patch | 12 ++-- ...Chunks-from-Hoppers-and-other-things.patch | 4 +- ...y-scoreboard-teams-to-scoreboard.dat.patch | 2 +- ...am-reload-spawn-chunks-in-nether-end.patch | 2 +- .../Enderman.teleportRandomly.patch | 6 +- .../EndermanEscapeEvent.patch | 10 ++-- .../Enforce-Sync-Player-Saves.patch | 2 +- .../EntityPathfindEvent.patch | 6 +- ...PI-for-Reason-Source-Triggering-play.patch | 26 ++++----- .../Expose-server-CommandMap.patch | 2 +- .../Fix-Chunk-Unload-Queue-Issues.patch | 4 +- .../Fix-Double-World-Add-issues.patch | 4 +- .../Fix-Furnace-cook-time-bug.patch | 2 +- .../Fix-this-stupid-bullshit.patch | 2 +- .../Further-improve-server-tick-loop.patch | 4 +- ...n-prefixes-using-Log4J-configuration.patch | 4 +- ...nt-extended-PaperServerListPingEvent.patch | 6 +- .../Include-Log4J2-SLF4J-implementation.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 14 ++--- Spigot-Server-Patches/Lighting-Queue.patch | 8 +-- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 30 +++++----- ...-API-Replenishable-Lootables-Feature.patch | 4 +- ...e-shield-blocking-delay-configurable.patch | 6 +- ...more-aggressive-in-the-chunk-unload-.patch | 2 +- .../Optimize-Pathfinding.patch | 4 +- .../Optimize-UserCache-Thread-Safe.patch | 2 +- .../Optimize-explosions.patch | 6 +- ...Location-getType-and-getBlockData-fo.patch | 6 +- .../Optimized-Light-Level-Comparisons.patch | 12 ++-- Spigot-Server-Patches/POM-Changes.patch | 5 +- .../Paper-config-files.patch | 12 ++-- .../Player-affects-spawning-API.patch | 12 ++-- ...vent-Auto-Save-if-Save-Queue-is-full.patch | 4 +- ...event-tile-entity-and-entity-crashes.patch | 6 +- .../ProfileWhitelistVerifyEvent.patch | 2 +- .../Properly-fix-item-duplication-bug.patch | 4 +- ...le-async-calls-to-restart-the-server.patch | 4 +- ...Remove-unused-World-Tile-Entity-List.patch | 2 +- ...dEffects-only-to-players-who-can-see.patch | 6 +- ...ient-crashes-server-lists-and-Mojang.patch | 6 +- Spigot-Server-Patches/Timings-v2.patch | 56 ++++++++++++------- ...ed-flag-on-cancel-of-Explosion-Event.patch | 4 +- ...ams-to-redirect-System.out-err-to-lo.patch | 4 +- ...oleAppender-for-console-improvements.patch | 12 ++-- .../Use-asynchronous-Log4j-2-loggers.patch | 2 +- .../getPlayerUniqueId-API.patch | 2 +- ...urable-option-to-disable-creeper-lin.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 2 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 77 files changed, 254 insertions(+), 252 deletions(-) diff --git a/Spigot-API-Patches/Entity-Origin-API.patch b/Spigot-API-Patches/Entity-Origin-API.patch index 6af144086e..7267824a20 100644 --- a/Spigot-API-Patches/Entity-Origin-API.patch +++ b/Spigot-API-Patches/Entity-Origin-API.patch @@ -25,7 +25,7 @@ index 28b169d2..9b0f97f1 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java -index 9d34e691..b0b1defc 100644 +index 0cd830d9..170a9aee 100644 --- a/src/main/java/org/bukkit/entity/FallingBlock.java +++ b/src/main/java/org/bukkit/entity/FallingBlock.java @@ -0,0 +0,0 @@ public interface FallingBlock extends Entity { diff --git a/Spigot-API-Patches/POM-changes.patch b/Spigot-API-Patches/POM-changes.patch index c1ae35f2f9..13da6a3fc9 100644 --- a/Spigot-API-Patches/POM-changes.patch +++ b/Spigot-API-Patches/POM-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 3e6c8707..c2d0651e 100644 +index e946bccf..7374304f 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -21,7 +21,7 @@ index 3e6c8707..c2d0651e 100644 + + + paper-api - 1.13-pre7-R0.1-SNAPSHOT + 1.13-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-Server-Patches/Activation-Range-Improvements.patch b/Spigot-Server-Patches/Activation-Range-Improvements.patch index 5fb21b1803..034b01015c 100644 --- a/Spigot-Server-Patches/Activation-Range-Improvements.patch +++ b/Spigot-Server-Patches/Activation-Range-Improvements.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Activation Range Improvements Fixes and adds new Immunities to improve gameplay behavior diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java -index e2e1095118..34dcd01ded 100644 +index b34756769..53b25dd80 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -18,7 +18,7 @@ index e2e1095118..34dcd01ded 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1bef317758..c1618f8c36 100644 +index 8dbff3c37..3da4bc356 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -31,19 +31,19 @@ index 1bef317758..c1618f8c36 100644 protected int ticksFarFromPlayer; protected float aZ; diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 2698579603..864ca3cc6e 100644 +index bb86ecb2f..5cd8c3f28 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java @@ -0,0 +0,0 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn return this.bR != null; } -+ public boolean inCaravan() { return this.em(); } // Paper - OBFHELPER - public boolean em() { ++ public boolean inCaravan() { return this.en(); } // Paper - OBFHELPER + public boolean en() { return this.bQ != null; } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java -index a146a8b459..a19853463c 100644 +index a146a8b45..a19853463 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoal.java +++ b/src/main/java/net/minecraft/server/PathfinderGoal.java @@ -0,0 +0,0 @@ public abstract class PathfinderGoal { @@ -59,7 +59,7 @@ index a146a8b459..a19853463c 100644 public void e() {} diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java -index d5c08aa7cb..fe6570c88d 100644 +index d5c08aa7c..fe6570c88 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -99,7 +99,7 @@ index d5c08aa7cb..fe6570c88d 100644 } } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index e02647f806..cdbf769e7b 100644 +index e02647f80..cdbf769e7 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityFireball; diff --git a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch index d2dd4f69a5..8a47eb2129 100644 --- a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 4c615baea..52a1036fd 100644 +index cf11a2225..578d96640 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -17,7 +17,7 @@ index 4c615baea..52a1036fd 100644 public EntityArmorStand(World world) { super(EntityTypes.ARMOR_STAND, world); @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { - public boolean de() { + public boolean df() { return false; } + diff --git a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch index f33441dbab..6064e1726c 100644 --- a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index f08c0ba60..1b944abea 100644 +index b20cab58b..1bfe9d0e7 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { return 0; } -+ public void jump() { this.cG(); } // Paper - OBFHELPER - public void cG() { - super.cG(); ++ public void jump() { this.cH(); } // Paper - OBFHELPER + public void cH() { + super.cH(); this.a(StatisticList.JUMP); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 383ef87ba..480b93aa0 100644 +index 932eeb19d..7465c548a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; @@ -33,7 +33,7 @@ index 383ef87ba..480b93aa0 100644 d8 = d5 - this.p; d9 = d6 - this.q; if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) { -- this.player.cG(); +- this.player.cH(); + // Paper start - Add player jump event + Player player = this.getPlayer(); + Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location. diff --git a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch index 7f6fd0958a..8512e69ae1 100644 --- a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,7 +20,7 @@ index ea6fcb39f..dbafef023 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1b6a849e2..470e334f7 100644 +index d7247a1ec..ff9346023 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-exception-reporting-event.patch b/Spigot-Server-Patches/Add-exception-reporting-event.patch index f2c5bbd63a..2f6b8aa733 100644 --- a/Spigot-Server-Patches/Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/Add-exception-reporting-event.patch @@ -50,7 +50,7 @@ index 000000000..93397188b +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2d55abd7a..7ea4b9b5c 100644 +index 0c2540938..15ecac26c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -98,7 +98,7 @@ index 2d55abd7a..7ea4b9b5c 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 51bc23daf..bb96a7392 100644 +index 48b484da1..6917fdbe0 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ import java.util.concurrent.ExecutionException; @@ -167,7 +167,7 @@ index 33e5aaf2c..f13534917 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java -index 0ffca4301..86d8fd0d9 100644 +index 6b5600ba5..72f386720 100644 --- a/src/main/java/net/minecraft/server/PersistentCollection.java +++ b/src/main/java/net/minecraft/server/PersistentCollection.java @@ -0,0 +0,0 @@ @@ -194,7 +194,7 @@ index 0ffca4301..86d8fd0d9 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 94364baae..c80d724f0 100644 +index 31899549d..cc7cad8be 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -0,0 +0,0 @@ @@ -221,7 +221,7 @@ index 94364baae..c80d724f0 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index d394645a5..384628ccc 100644 +index 0e91aeec3..ff473a263 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -0,0 +0,0 @@ @@ -240,7 +240,7 @@ index d394645a5..384628ccc 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index aec9cdae5..6d842df62 100644 +index b12e767db..342a15db5 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager; @@ -288,7 +288,7 @@ index 4ff243dab..67b2e41c7 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 26b2a1fd4..d51ed0f80 100644 +index 30cafca04..fa75ed496 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Add-server-name-parameter.patch b/Spigot-Server-Patches/Add-server-name-parameter.patch index b6307358dd..24c6033abc 100644 --- a/Spigot-Server-Patches/Add-server-name-parameter.patch +++ b/Spigot-Server-Patches/Add-server-name-parameter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index d9059129d..aad208f47 100644 +index 38e696aa9..c552c624e 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch index 9610554a8d..81493469cd 100644 --- a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch @@ -33,7 +33,7 @@ index f13534917..85c7a96c5 100644 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 06b59657f..6c7151536 100644 +index 7cb795dd8..e125632ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch index 3ada77266f..bb3c87a464 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6c7151536..1b6a849e2 100644 +index e125632ff..d7247a1ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch index 49dfb9bd0f..7bc1884e6c 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4db5aacc4..1c9637ff7 100644 +index ff966de55..3f51eb384 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch index 2d7f36f0cc..f221d1b635 100644 --- a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch @@ -31,7 +31,7 @@ index 4ed5192c6..489beed26 100644 this.b.o(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 5de20721c..27b01d1ee 100644 +index d24ff109c..3744d01ec 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -56,7 +56,7 @@ index 5de20721c..27b01d1ee 100644 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index 4d8876cae..2cb9d1b5a 100644 +index 0d9505138..38a0b2db1 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java @@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal { @@ -65,15 +65,12 @@ index 4d8876cae..2cb9d1b5a 100644 this.a = entityinsentient; + if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper this.a(4); - if (entityinsentient.getNavigation() instanceof Navigation) { - ((Navigation) entityinsentient.getNavigation()).c(true); -@@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal { - + entityinsentient.getNavigation().d(true); } + public boolean validConditions() { return this.a(); } // Paper - OBFHELPER public boolean a() { - return this.a.isInWater() || this.a.ax(); + return this.a.isInWater() && this.a.bY() > 0.4D || this.a.ax(); } + public void update() { this.e(); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch index 449411d885..a130f9cabb 100644 --- a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7e96c4eb4..ab2bd6dae 100644 +index cb9f25e96..c0249933b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -85,7 +85,7 @@ index 7e96c4eb4..ab2bd6dae 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0ef1186b9..d605e5792 100644 +index 202c6c492..c74831b3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index 054b9dfb52..d1d2b7bfdf 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -64,7 +64,7 @@ index 0e6c18b32..c182ceffb 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6c6924937..2f40f687a 100644 +index 99421aca9..ee992e346 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -96,7 +96,7 @@ index 6c6924937..2f40f687a 100644 public boolean isEmpty() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 2e72a294d..1e6ea3084 100644 +index 4f9ece9e4..afeb0685b 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ @@ -116,7 +116,7 @@ index 2e72a294d..1e6ea3084 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 08d6f77ae..5122cee42 100644 +index 982e18f8a..1879c3238 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -128,7 +128,7 @@ index 08d6f77ae..5122cee42 100644 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0e59fc9eb..603ce9fe2 100644 +index 0e385e4ea..326d4242d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -175,7 +175,7 @@ index 0e59fc9eb..603ce9fe2 100644 this.methodProfiler.a("snooper"); if (getSnooperEnabled() && !this.j.d() && this.ticks > 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6b7d81933..3ee587014 100644 +index d0c547cc9..12f6812d6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -214,7 +214,7 @@ index 6b7d81933..3ee587014 100644 public WhiteList getWhitelist() { return this.whitelist; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6c976e3b1..a08ef197e 100644 +index 96002184b..bf07155bc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index 688de6b70d..f20d000ea5 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -429,7 +429,7 @@ index 70db1cc14..9ab3844fc 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c95f12351..26ace3cbf 100644 +index 88900121d..5d12855ba 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -486,7 +486,7 @@ index a47a51a41..4c476f757 100644 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ac46e50ac..a8da20e35 100644 +index 814a65ec5..202c6c492 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch index 080f289267..188351af03 100644 --- a/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch +++ b/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Block player logins during server shutdown diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 89a11a496..bab13a4fd 100644 +index b6e829682..85eff6e2d 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { } - public void X_() { + public void Y_() { + // Paper start - Do not allow logins while the server is shutting down + if (!MinecraftServer.getServer().isRunning()) { + this.disconnect(new ChatMessage(org.spigotmc.SpigotConfig.restartMessage)); diff --git a/Spigot-Server-Patches/Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/Chunk-Save-Reattempt.patch index 5024cb890d..b1e423c302 100644 --- a/Spigot-Server-Patches/Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/Chunk-Save-Reattempt.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Chunk Save Reattempt We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 8701777cc..ad3bd3808 100644 +index b247d5f07..f007af2e1 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -28,7 +28,7 @@ index 8701777cc..ad3bd3808 100644 flag = true; diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index c80d724f0..3f9aa5923 100644 +index cc7cad8be..b8b514c87 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -0,0 +0,0 @@ public class RegionFile { diff --git a/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch b/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch index 7e3efced5a..5fa5629844 100644 --- a/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch +++ b/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch @@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing. Stats on current queue, how many was processed and how many were queued. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 9145401bc..ef35eb7ec 100644 +index a4c4a9486..4be7173bf 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -55,7 +55,7 @@ index 9145401bc..ef35eb7ec 100644 return false; } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 20aa20a98..de2231bb0 100644 +index 859148cb8..ea8684747 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/Chunk-registration-fixes.patch b/Spigot-Server-Patches/Chunk-registration-fixes.patch index cae2dadb17..89bc9ea17c 100644 --- a/Spigot-Server-Patches/Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/Chunk-registration-fixes.patch @@ -8,7 +8,7 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 067b92f3e..04b5521cd 100644 +index 45ab70167..5d3378be0 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/Chunk-save-queue-improvements.patch index 410443dd1b..2107f16c8f 100644 --- a/Spigot-Server-Patches/Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/Chunk-save-queue-improvements.patch @@ -41,7 +41,7 @@ index 36689db74..3898ad8fa 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 3a0e52d88..8701777cc 100644 +index 5001fd11d..b247d5f07 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ import java.util.function.Consumer; @@ -75,21 +75,6 @@ index 3a0e52d88..8701777cc 100644 private final File c; private final DataFixer d; private PersistentStructureLegacy e; -@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { - } - }; - } else { -- if (this.b.containsKey(chunkcoordintpair) && this.a(this.b.get(chunkcoordintpair).get()) == ChunkStatus.Type.LEVELCHUNK || this.a(this.b(world, chunkcoordintpair.x, chunkcoordintpair.z)) == ChunkStatus.Type.LEVELCHUNK) { -+ // Paper start -+ Supplier existingSave; -+ synchronized (this) { -+ existingSave = this.b.get(chunkcoordintpair); -+ } -+ if (existingSave != null && this.a(existingSave.get()) == ChunkStatus.Type.LEVELCHUNK || this.a(this.b(world, chunkcoordintpair.x, chunkcoordintpair.z)) == ChunkStatus.Type.LEVELCHUNK) { // Paper - extract existingSave to synchronized lookup -+ // Paper end - return; - } - @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } }; diff --git a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch index ca2123342f..3d4f1f5628 100644 --- a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -21,7 +21,7 @@ index eb09be512..6ac58e5ec 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1027b0588..b7aa9e869 100644 +index 96d31f874..664007c29 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -39,7 +39,7 @@ index 1027b0588..b7aa9e869 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cc1492e4d..2c6774082 100644 +index 6ec1ee26d..a4c8e62e2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -54,7 +54,7 @@ index cc1492e4d..2c6774082 100644 public void a(Packet packet) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f90dc11f2..06b59657f 100644 +index 62872675d..7cb795dd8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Configurable-Player-Collision.patch b/Spigot-Server-Patches/Configurable-Player-Collision.patch index 90970e5d4e..7ce0647637 100644 --- a/Spigot-Server-Patches/Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/Configurable-Player-Collision.patch @@ -19,7 +19,7 @@ index ec4643384..430b5d0cd 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b7aa9e869..c5670fe8d 100644 +index 664007c29..eb0e1361a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -44,7 +44,7 @@ index b7aa9e869..c5670fe8d 100644 protected void a(File file, WorldData worlddata) { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java -index 5f54e7b9c..759288b97 100644 +index a6aed2531..575e3762b 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java @@ -0,0 +0,0 @@ public class PacketPlayOutScoreboardTeam implements Packet 0.5F && this.world.e(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { + if (f > 0.5F && this.world.e(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper this.setGoalTarget((EntityLiving) null); - this.dz(); + this.dA(); } @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { public boolean damageEntity(DamageSource damagesource, float f) { @@ -48,7 +48,7 @@ index 96e29539b..e5eb0189d 100644 - } else if (damagesource instanceof EntityDamageSourceIndirect) { + } else if (damagesource instanceof EntityDamageSourceIndirect && tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper for (int i = 0; i < 64; ++i) { - if (this.dz()) { + if (this.dA()) { return true; @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { } else { @@ -56,7 +56,7 @@ index 96e29539b..e5eb0189d 100644 - if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0) { + if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper - this.dz(); + this.dA(); } @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -74,7 +74,7 @@ index 96e29539b..e5eb0189d 100644 if (this.i.f((EntityHuman) this.d)) { - if (((EntityHuman) this.d).h(this.i) < 16.0D) { + if (((EntityHuman) this.d).h(this.i) < 16.0D && this.getEnderman().tryEscape(EndermanEscapeEvent.Reason.STARE)) { // Paper - this.i.dz(); + this.i.dA(); } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch index e6cea80aae..71e2f1c38b 100644 --- a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3ee587014..fdbc01792 100644 +index 12f6812d6..c8b5a610a 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/EntityPathfindEvent.patch b/Spigot-Server-Patches/EntityPathfindEvent.patch index 8d1f03abf8..1967a69707 100644 --- a/Spigot-Server-Patches/EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/EntityPathfindEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityPathfindEvent Fires when an Entity decides to start moving to a location. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 1964684ac..0c5215657 100644 +index 8111317e3..76d1f4bd2 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -24,7 +24,7 @@ index 1964684ac..0c5215657 100644 } else { + if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper this.q = blockposition; - float f = this.k(); + float f = this.j(); @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { @@ -32,6 +32,6 @@ index 1964684ac..0c5215657 100644 } else { + if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper this.q = blockposition; - float f = this.k(); + float f = this.j(); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index d8e54333bb..752e7bd41f 100644 --- a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -8,7 +8,7 @@ Adds lots of information about why this orb exists. Replaces isFromBottle() with logic that persists entity reloads too. diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index ff110c8e95..d95587c8cc 100644 +index 43feccef8..e820bfbd5 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -0,0 +0,0 @@ public class Block implements IMaterial { @@ -28,7 +28,7 @@ index ff110c8e95..d95587c8cc 100644 } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index e5f0645774..e237c5dc1a 100644 +index 131f8a515..d8ab87e21 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo @@ -41,7 +41,7 @@ index e5f0645774..e237c5dc1a 100644 } diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 3c888d6015..79d80596df 100644 +index 3c888d601..79d80596d 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @@ -120,7 +120,7 @@ index 3c888d6015..79d80596df 100644 public void d(EntityHuman entityhuman) { diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 7440e4a2a9..895254c155 100644 +index 1804a49de..82e4d2eab 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { @@ -131,9 +131,9 @@ index 7440e4a2a9..895254c155 100644 + this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.owner, this)); // Paper } // CraftBukkit end - if (itemstack1.getItem().a(TagsItem.G)) { + if (itemstack1.getItem().a(TagsItem.D)) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c1618f8c36..9f493e43d4 100644 +index 3da4bc356..f9a76ce27 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -147,7 +147,7 @@ index c1618f8c36..9f493e43d4 100644 this.expToDrop = 0; // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java -index a5e1939e05..e73dba09a6 100644 +index a5e1939e0..e73dba09a 100644 --- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java +++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java @@ -0,0 +0,0 @@ public class EntityThrownExpBottle extends EntityProjectile { @@ -160,7 +160,7 @@ index a5e1939e05..e73dba09a6 100644 this.die(); diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index fc0c1cc3b2..dd4ecfa883 100644 +index e8fdf8625..b51543ea7 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { @@ -173,7 +173,7 @@ index fc0c1cc3b2..dd4ecfa883 100644 if (this.tradingPlayer instanceof EntityPlayer) { diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java -index 4a128f707b..b870964674 100644 +index 4a128f707..b87096467 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -0,0 +0,0 @@ public class PathfinderGoalBreed extends PathfinderGoal { @@ -186,7 +186,7 @@ index 4a128f707b..b870964674 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 33b5080147..e34198e407 100644 +index 545a98302..55ec29bd2 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -0,0 +0,0 @@ public class PlayerInteractManager { @@ -199,7 +199,7 @@ index 33b5080147..e34198e407 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java -index 998662d9e6..6b4eb7f053 100644 +index 998662d9e..6b4eb7f05 100644 --- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java +++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java @@ -0,0 +0,0 @@ import org.bukkit.event.inventory.FurnaceExtractEvent; @@ -221,7 +221,7 @@ index 998662d9e6..6b4eb7f053 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 86848543d0..7004f11764 100644 +index 86848543d..7004f1176 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { @@ -234,7 +234,7 @@ index 86848543d0..7004f11764 100644 // not sure what this can do if (LightningStrike.class.isAssignableFrom(clazz)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java -index 3a09cab3d4..3302af0e45 100644 +index 3a09cab3d..3302af0e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java @@ -0,0 +0,0 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb { diff --git a/Spigot-Server-Patches/Expose-server-CommandMap.patch b/Spigot-Server-Patches/Expose-server-CommandMap.patch index 619cfdc808..8d1f5f835b 100644 --- a/Spigot-Server-Patches/Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/Expose-server-CommandMap.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d637199ca..703d38f0c 100644 +index 2d8820070..6d00be24b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch b/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch index 2f2cf36fc8..2025768f27 100644 --- a/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch +++ b/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch @@ -9,7 +9,7 @@ has not resolved all the bugs with the changes. This patch fixes known issues and really should be applied by Spigot team. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 744b5bc6d..718ebfea0 100644 +index 49c5953fb..8da7e39ee 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -22,7 +22,7 @@ index 744b5bc6d..718ebfea0 100644 private int E; private final AtomicInteger F; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index bb96a7392..7825dc91b 100644 +index 6917fdbe0..bac5c921b 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch index 2a53261018..6011018343 100644 --- a/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch @@ -8,7 +8,7 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index ad3bd3808..e70c2184c 100644 +index f007af2e1..2f1488ee5 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -21,7 +21,7 @@ index ad3bd3808..e70c2184c 100644 Iterator iterator = entity.bP().iterator(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c9b6b57af..067b92f3e 100644 +index 95ec4f48f..45ab70167 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Fix-Furnace-cook-time-bug.patch b/Spigot-Server-Patches/Fix-Furnace-cook-time-bug.patch index 92f5292bb6..907f35a499 100644 --- a/Spigot-Server-Patches/Fix-Furnace-cook-time-bug.patch +++ b/Spigot-Server-Patches/Fix-Furnace-cook-time-bug.patch @@ -9,7 +9,7 @@ cook in the expected amount of time as the cook time was not decremented correct This patch ensures that furnaces cook to the correct wall time expectation. diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 8f9a59693..3a587a766 100644 +index b484fc721..bc158b877 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java @@ -0,0 +0,0 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve diff --git a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch index 5987c16193..c364e3215f 100644 --- a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch @@ -9,7 +9,7 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ac38028d7..ad0635925 100644 +index 3245fded9..d4f6e009e 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index bc7bac41cd..c85233c61a 100644 --- a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cba7c18f2..093190108 100644 +index 5d5aa72ca..ae17796ce 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -149,7 +149,7 @@ index cba7c18f2..093190108 100644 } lastTick = curTime; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a1a0a9b34..f39ddbf09 100644 +index ce87736da..fdcdbf508 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch index 0c84b6a476..f2962b357e 100644 --- a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index 9d2473317..eb2cdf129 100644 +index a93ed45df..bb32cb749 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -28,7 +28,7 @@ index 9d2473317..eb2cdf129 100644 diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9a1ffed07..b39096f04 100644 +index 676780b61..5a873fe9d 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index c542d198be..13ce83dcb1 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 000000000..350410527 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 26ace3cbf..bc2712898 100644 +index 5d12855ba..ebc0709eb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -190,7 +190,7 @@ index 26ace3cbf..bc2712898 100644 for (int k = 0; k < agameprofile.length; ++k) { @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati - return "1.13-pre7"; + return "1.13"; } + public int getPlayerCount() { return A(); } // Paper - OBFHELPER @@ -251,7 +251,7 @@ index d7e1ecc03..f20cddc41 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b39096f04..d89224e7d 100644 +index 5a873fe9d..42bd3b6ed 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch index c6432fcd51..f06c66f4a5 100644 --- a/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch +++ b/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Include Log4J2 SLF4J implementation diff --git a/pom.xml b/pom.xml -index eb2cdf129..353a5560e 100644 +index bb32cb749..a319cfe3b 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 304b07350b..05b12b1329 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ac90ca802..9e798038b 100644 +index a5a63a01d..e504b7858 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -29,11 +29,11 @@ index ac90ca802..9e798038b 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4aba5716c..d84bb0e40 100644 +index 738ac8570..14a61f68e 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - this.df(); + this.dg(); super.tick(); if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) { - this.closeInventory(); @@ -56,7 +56,7 @@ index 4aba5716c..d84bb0e40 100644 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5db6e0764..99c638857 100644 +index 7059fc118..0c01f8daf 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -110,7 +110,7 @@ index 5db6e0764..99c638857 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 067f7b990..97b315bca 100644 +index 42bb86d31..2860df860 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -123,7 +123,7 @@ index 067f7b990..97b315bca 100644 this.player.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 879780c5b..907f0232b 100644 +index 45e42e998..7a2b219c6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -155,7 +155,7 @@ index 4b9ecb4a6..b602a5d1b 100644 public boolean isBlocking() { return getHandle().isBlocking(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 60bc6d331..b25980027 100644 +index ab9956fa2..0f3e1d5ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Lighting-Queue.patch b/Spigot-Server-Patches/Lighting-Queue.patch index 0aa9703c36..ec8abbc5a1 100644 --- a/Spigot-Server-Patches/Lighting-Queue.patch +++ b/Spigot-Server-Patches/Lighting-Queue.patch @@ -43,7 +43,7 @@ index a340866f3..1e3405cc1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 4a4cc6c59..b0060c363 100644 +index 091a53371..d46578b3e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -102,7 +102,7 @@ index 4a4cc6c59..b0060c363 100644 IMMEDIATE, QUEUED, CHECK; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index badfe86b2..51bc23daf 100644 +index d23f4e80c..48b484da1 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -114,7 +114,7 @@ index badfe86b2..51bc23daf 100644 // Update neighbor counts for (int x = -2; x < 3; x++) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2e691b9f6..4473c3b51 100644 +index ae17796ce..1ac8d61cd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -233,7 +233,7 @@ index 000000000..345cd5824 + } +} diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c605d7e52..f57bd081b 100644 +index bfe09a205..c40ecbc0c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch index 2f6bd47777..31b3ec0554 100644 --- a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,29 +6,33 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 7cacbaffe..5f3ccee2e 100644 +index 4455dc489..8be1ba526 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - - } - -+ public ItemStack getActiveItem() { return cV(); } // Paper - OBFHELPER - public ItemStack cV() { + private float bI; + private int bJ; + private float bK; +- protected ItemStack activeItem; ++ public ItemStack activeItem; // Paper - public + protected int bu; + protected int bv; + private BlockPosition bL; +@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { return this.activeItem; } -+ public int getItemUseRemainingTime() { return cW(); } // Paper - OBFHELPER - public int cW() { ++ public int getItemUseRemainingTime() { return cX(); } // Paper - OBFHELPER + public int cX() { return this.bu; } -+ public int getHandRaisedTime() { return cX(); } // Paper - OBFHELPER - public int cX() { - return this.isHandRaised() ? this.activeItem.k() - this.cW() : 0; ++ public int getHandRaisedTime() { return cY(); } // Paper - OBFHELPER + public int cY() { + return this.isHandRaised() ? this.activeItem.k() - this.cX() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 35ba95e0f..0975181e0 100644 +index a6f847e31..768bce141 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -38,7 +42,7 @@ index 35ba95e0f..0975181e0 100644 + + @Override + public ItemStack getActiveItem() { -+ return getHandle().getActiveItem().asBukkitMirror(); ++ return getHandle().activeItem.asBukkitMirror(); + } + + @Override diff --git a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index ef65110e6e..008156b51d 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -418,7 +418,7 @@ index 000000000..9a65603bc + } +} diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index dc329dcc5..d3bf88585 100644 +index 9ec73ac06..8bd7976f9 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -540,7 +540,7 @@ index dc329dcc5..d3bf88585 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index ce710d219..9c8bebe4b 100644 +index fbda02b32..e6fc1ae92 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch index 2bb888bf20..8bfbbbb2cc 100644 --- a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch @@ -19,7 +19,7 @@ index f1db4becd..ef4bfb480 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a4026d64a..dffa42ba5 100644 +index 999a02cad..eaab10a14 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -32,7 +32,7 @@ index a4026d64a..dffa42ba5 100644 return false; } @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - public boolean de() { + public boolean df() { return true; } + @@ -49,7 +49,7 @@ index a4026d64a..dffa42ba5 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 460a050cc..35ba95e0f 100644 +index 524cfd99b..a6f847e31 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 2ef6f258b8..1d9b8f94e5 100644 --- a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index ef35eb7ec..70790386e 100644 +index 4be7173bf..7d77c5fb3 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/Optimize-Pathfinding.patch b/Spigot-Server-Patches/Optimize-Pathfinding.patch index b367ef6077..cc02fd7ac4 100644 --- a/Spigot-Server-Patches/Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/Optimize-Pathfinding.patch @@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 9337b9397..1964684ac 100644 +index 62cb81516..8111317e3 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { @@ -41,7 +41,7 @@ index 9337b9397..1964684ac 100644 @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { } - public void r() { + public void q() { + this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; } diff --git a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch index 096c175a4a..8c5053ec5e 100644 --- a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch @@ -10,7 +10,7 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 05dc8451e..0e59fc9eb 100644 +index 68ab9b7eb..0e385e4ea 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Optimize-explosions.patch b/Spigot-Server-Patches/Optimize-explosions.patch index e83c836f8d..f8c418f11e 100644 --- a/Spigot-Server-Patches/Optimize-explosions.patch +++ b/Spigot-Server-Patches/Optimize-explosions.patch @@ -25,7 +25,7 @@ index dccccbf5b..3626aa717 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 6b9f6c956..8fdcd52b2 100644 +index e558a3a57..18c55402d 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -0,0 +0,0 @@ public class Explosion { @@ -124,7 +124,7 @@ index 6b9f6c956..8fdcd52b2 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4473c3b51..1027b0588 100644 +index 1ac8d61cd..96d31f874 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -136,7 +136,7 @@ index 4473c3b51..1027b0588 100644 // this.f[i][this.ticks % 100] = SystemUtils.c() - j; // CraftBukkit diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f57bd081b..04493a1f9 100644 +index c40ecbc0c..1ca3eef11 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; diff --git a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch index afd12689a8..de79588eed 100644 --- a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -31,7 +31,7 @@ index e2a7b4be2..58f8b4b72 100644 public BaseBlockPosition(int i, int j, int k) { this.a = i; diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 70a7edf57..fff08f09d 100644 +index 35ec4981c..ca73ac82f 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { @@ -52,7 +52,7 @@ index 70a7edf57..fff08f09d 100644 public MutableBlockPosition() { this(0, 0, 0); diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index fb27dcac2..1c0580f79 100644 +index 0dc05b644..94d036865 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -96,7 +96,7 @@ index 7c6308dbe..880058a9e 100644 private NibbleArray skyLight; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d3785f73b..f8e4cd14c 100644 +index 11cf087e7..489c152ee 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch index 0a3a4efae5..3c5e3bc2c7 100644 --- a/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch @@ -8,7 +8,7 @@ Use an optimized method to test if a block position meets a desired light level. This method benefits from returning as soon as the desired light level matches. diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java -index e64b6dbda..8acfe9e66 100644 +index b392846aa..c64e6c197 100644 --- a/src/main/java/net/minecraft/server/BlockCrops.java +++ b/src/main/java/net/minecraft/server/BlockCrops.java @@ -0,0 +0,0 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement @@ -17,9 +17,9 @@ index e64b6dbda..8acfe9e66 100644 super.a(iblockdata, world, blockposition, random); - if (world.getLightLevel(blockposition.up(), 0) >= 9) { + if (world.isLightLevel(blockposition.up(), 9)) { // Paper - int i = this.j(iblockdata); + int i = this.k(iblockdata); - if (i < this.d()) { + if (i < this.e()) { diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java index 723e5c9b4..e24fb1736 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java @@ -34,7 +34,7 @@ index 723e5c9b4..e24fb1736 100644 world.captureTreeGeneration = true; // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java -index 3959e0700..c4aff522b 100644 +index 0192f9386..334c42d0d 100644 --- a/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java @@ -0,0 +0,0 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { @@ -47,7 +47,7 @@ index 3959e0700..c4aff522b 100644 if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index bef146aa9..9c387365b 100644 +index 494ce0bc0..f06c34c6f 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -0,0 +0,0 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -73,7 +73,7 @@ index bef146aa9..9c387365b 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 268e4d57b..24224efc6 100644 +index 9f8f667c1..90aa8641b 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index bbdcd0100a..0fb3c57073 100644 --- a/Spigot-Server-Patches/POM-Changes.patch +++ b/Spigot-Server-Patches/POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 958eb763a..17bc80776 100644 +index 5d398f7cb..09b4ddf19 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -14,10 +14,9 @@ index 958eb763a..17bc80776 100644 4.0.0 - org.spigotmc - spigot -+ com.destroystokyo.paper + paper jar - 1.13-pre7-R0.1-SNAPSHOT + 1.13-R0.1-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper diff --git a/Spigot-Server-Patches/Paper-config-files.patch b/Spigot-Server-Patches/Paper-config-files.patch index 919de379e8..e196d6f83b 100644 --- a/Spigot-Server-Patches/Paper-config-files.patch +++ b/Spigot-Server-Patches/Paper-config-files.patch @@ -499,7 +499,7 @@ index 000000000..621bf7051 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 8563712d9..9155aa727 100644 +index 5ff1e9686..3706e44a3 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -514,7 +514,7 @@ index 8563712d9..9155aa727 100644 DedicatedServer.LOGGER.info("Generating keypair"); this.a(MinecraftEncryption.b()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 015959b9f..f3f8b65be 100644 +index 5046ecb3b..3fa32228b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -531,7 +531,7 @@ index 015959b9f..f3f8b65be 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index a0c701f35..557a3f97f 100644 +index ad3f89199..ca2a14d7a 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -555,7 +555,7 @@ index a0c701f35..557a3f97f 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c7f5cba2d..330ea4e72 100644 +index 13c404337..b2bb06c79 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -576,7 +576,7 @@ index c7f5cba2d..330ea4e72 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ce5ebcc54..88766d30d 100644 +index 4dc0c8fcb..99d397872 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -631,7 +631,7 @@ index ce5ebcc54..88766d30d 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c234b8749..5e49bca8a 100644 +index df07dc594..57da619d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Player-affects-spawning-API.patch b/Spigot-Server-Patches/Player-affects-spawning-API.patch index 22bcadc2e2..1ddc40284b 100644 --- a/Spigot-Server-Patches/Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/Player-affects-spawning-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 40efd6c60..1aa32bf11 100644 +index fc64ba3c9..a47ef2ca5 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -19,7 +19,7 @@ index 40efd6c60..1aa32bf11 100644 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index c8c191667..d29364b01 100644 +index 27c97530f..3723fd977 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -32,7 +32,7 @@ index c8c191667..d29364b01 100644 double d1 = entityhuman.locY - this.locY; double d2 = entityhuman.locZ - this.locZ; diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java -index 6cb4f889c..a1ebf5c68 100644 +index 75040a0f2..683191c4a 100644 --- a/src/main/java/net/minecraft/server/EntitySilverfish.java +++ b/src/main/java/net/minecraft/server/EntitySilverfish.java @@ -0,0 +0,0 @@ public class EntitySilverfish extends EntityMonster { @@ -45,7 +45,7 @@ index 6cb4f889c..a1ebf5c68 100644 return false; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 44fb75c6f..aec9cdae5 100644 +index e54dcaa99..b12e767db 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -58,7 +58,7 @@ index 44fb75c6f..aec9cdae5 100644 j = MathHelper.floor(entityhuman.locZ / 16.0D); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 05d363171..fd64b75ed 100644 +index 6ca7a2069..ae11c2e43 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; @@ -79,7 +79,7 @@ index 05d363171..fd64b75ed 100644 if (d3 < 0.0D || d4 < d3 * d3) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fad258f11..c67137a80 100644 +index 47f650e42..0109d8e97 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch index 9b843a4037..11db71c436 100644 --- a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -23,7 +23,7 @@ index 9a2ec0793..f88444c7e 100644 private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1e6ea3084..9145401bc 100644 +index afeb0685b..a4c4a9486 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -51,7 +51,7 @@ index 1e6ea3084..9145401bc 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index e70c2184c..20aa20a98 100644 +index 2f1488ee5..859148cb8 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch index 76b8aa4df7..1b2fc5e9cf 100644 --- a/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 5b7f6ca84..8cab71c0e 100644 +index 6b8a1c8c8..e03965fc7 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -23,7 +23,7 @@ index 5b7f6ca84..8cab71c0e 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3f0b6ac26..c605d7e52 100644 +index e3c56a750..bfe09a205 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -44,7 +44,7 @@ index 3f0b6ac26..c605d7e52 100644 } @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose - ((ITickable) tileentity).X_(); + ((ITickable) tileentity).Y_(); this.methodProfiler.e(); } catch (Throwable throwable2) { - crashreport1 = CrashReport.a(throwable2, "Ticking block entity"); diff --git a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch index d5472ab94b..a70ffba6fe 100644 --- a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 9e403d625..879780c5b 100644 +index 4cbe14801..45e42e998 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch index ae38156d33..fe96838aff 100644 --- a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index cf2a39384..c91caf578 100644 +index 4bde378af..7059fc118 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -19,7 +19,7 @@ index cf2a39384..c91caf578 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1f2cfbc92..f26636e30 100644 +index fc4e927d6..9ac86f7af 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch index cf1f3ba8b8..09c44877df 100644 --- a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ab3193295..5d13f053f 100644 +index 9405dc7bf..eb8c7aaad 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -78,7 +78,7 @@ index ab3193295..5d13f053f 100644 return this.serverThread; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index fdbc01792..4c9ff8c29 100644 +index c8b5a610a..0b0d99652 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch index a753f27535..4cf5eb8b4f 100644 --- a/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3aecf7a5d..e5ecfdbf0 100644 +index e747d1e46..46eab028d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch index 52bd3a465d..2b4a74bba1 100644 --- a/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1b944abea..ae4dd621d 100644 +index 1bfe9d0e7..cd3e021a0 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -40,7 +40,7 @@ index 1b944abea..ae4dd621d 100644 - this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.bV(), 1.0F, 1.0F); + sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.bV(), 1.0F, 1.0F); // Paper - send while respecting visibility - this.dk(); + this.dl(); } @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -72,7 +72,7 @@ index 1b944abea..ae4dd621d 100644 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d0ce6b363..56292fad9 100644 +index 2f9aa10f8..2904a845b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index f543aa09fa..468e068283 100644 --- a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -25,7 +25,7 @@ index 220ca7bca..eb4b08be4 100644 } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 590eb507c..4889a82a2 100644 +index 1839bf7d2..5d5aa72ca 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -38,7 +38,7 @@ index 590eb507c..4889a82a2 100644 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 88ea651ba..28f6cdf96 100644 +index bc1f858af..ce87736da 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.event.server.TabCompleteEvent; @@ -51,7 +51,7 @@ index 88ea651ba..28f6cdf96 100644 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 5e49bca8a..d9059129d 100644 +index 57da619d8..38e696aa9 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index 340296944d..45c21378cb 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -476,7 +476,7 @@ index 5ab2cf6ee..b5795b6d3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index ffb91b27b..ff110c8e9 100644 +index 06f10e1e8..43feccef8 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -0,0 +0,0 @@ public class Block implements IMaterial { @@ -495,8 +495,7 @@ index ffb91b27b..ff110c8e9 100644 + return timing; + } + // Paper end -+ - private static final ThreadLocal>> r = ThreadLocal.withInitial(() -> { + private static final ThreadLocal> r = ThreadLocal.withInitial(() -> { Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap = new Object2ByteLinkedOpenHashMap(200) { protected void rehash(int i) {} diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java @@ -531,9 +530,26 @@ index 5164e5c92..0c2386f5e 100644 return chunk1; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 0296d3ef0..badfe86b2 100644 +index 0296d3ef0..d23f4e80c 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { + if (chunk != null) { + return chunk; + } else { +- try { +- world.timings.syncChunkLoadTimer.startTiming(); // Spigot ++ try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) { ++ ; // Spigot + chunk = (Chunk) this.generateChunk(i, j).get(); + return chunk; + } catch (ExecutionException | InterruptedException interruptedexception) { + throw this.a(i, j, (Throwable) interruptedexception); + } +- finally { world.timings.syncChunkLoadTimer.stopTiming(); } // Spigot + } + } + @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { } @@ -544,7 +560,7 @@ index 0296d3ef0..badfe86b2 100644 this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot } catch (IOException ioexception) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 90d857105..3a0e52d88 100644 +index 88301ee61..5001fd11d 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ @@ -591,7 +607,7 @@ index 90d857105..3a0e52d88 100644 } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 9155aa727..a3d58b5ce 100644 +index 3706e44a3..bf1fffcfe 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Level; @@ -644,7 +660,7 @@ index 9155aa727..a3d58b5ce 100644 return waitable.get(); } catch (java.util.concurrent.ExecutionException e) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7a17a4ff9..2ed362791 100644 +index 36cc0c18d..4830c7b8b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender; @@ -683,7 +699,7 @@ index 7a17a4ff9..2ed362791 100644 protected float ab() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b6dd6dc5d..f1840f4fa 100644 +index 514c95151..d6e9915c1 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -701,7 +717,7 @@ index b6dd6dc5d..f1840f4fa 100644 public void tick() { - SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot super.tick(); - this.cU(); + this.cV(); this.o(); @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { } @@ -753,7 +769,7 @@ index b6dd6dc5d..f1840f4fa 100644 } - SpigotTimings.timerEntityAICollision.startTiming(); // Spigot - this.cM(); + this.cN(); - SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot this.world.methodProfiler.e(); } @@ -790,7 +806,7 @@ index ae31935c4..70c9b1f50 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d813c72e1..61ec088d2 100644 +index 71ee66a9b..1839bf7d2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ @@ -871,7 +887,7 @@ index d813c72e1..61ec088d2 100644 this.methodProfiler.c("commandFunctions"); - SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot + MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot - this.aD().X_(); + this.getFunctionData().Y_(); - SpigotTimings.commandFunctionsTimer.stopTiming(); // Spigot + MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot this.methodProfiler.c("levels"); @@ -936,7 +952,7 @@ index d813c72e1..61ec088d2 100644 - SpigotTimings.tickablesTimer.startTiming(); // Spigot + MinecraftTimings.tickablesTimer.startTiming(); // Spigot for (i = 0; i < this.l.size(); ++i) { - ((ITickable) this.l.get(i)).X_(); + ((ITickable) this.l.get(i)).Y_(); } - SpigotTimings.tickablesTimer.stopTiming(); // Spigot + MinecraftTimings.tickablesTimer.stopTiming(); // Spigot @@ -1038,7 +1054,7 @@ index ac6d8cc6e..d975c2ccf 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6f21b01a8..359aa3997 100644 +index 556989f60..17b925f88 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; @@ -1100,7 +1116,7 @@ index 889b32287..69da194f5 100644 throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0156175fb..1e3dd22e5 100644 +index e476d3433..9cef6b9af 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ @@ -1178,7 +1194,7 @@ index a07895935..ee5c2421b 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index b992360ac..5b7f6ca84 100644 +index cffbcb8f7..6b8a1c8c8 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -1198,7 +1214,7 @@ index b992360ac..5b7f6ca84 100644 private final TileEntityTypes e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 330ea4e72..e6b916a5d 100644 +index b2bb06c79..562a85b72 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -1313,7 +1329,7 @@ index 330ea4e72..e6b916a5d 100644 public boolean a(@Nullable Entity entity, VoxelShape voxelshape) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cecc9bc62..271d75c48 100644 +index 2c6f6de4c..f032ecab6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ @@ -1429,7 +1445,7 @@ index cecc9bc62..271d75c48 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 60182cecf..33826231d 100644 +index 99d397872..bc1f858af 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -1681,7 +1697,7 @@ index 413dd35f0..52a8c48fa 100644 public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a2199b6a..fad258f11 100644 +index 75d56ee3b..47f650e42 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index 915f9a6173..0061311ba0 100644 --- a/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event Otherwise the creeper infinite explodes diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index f37169d73..86935f70a 100644 +index 0147054df..bbb4ca0fe 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { @@ -19,7 +19,7 @@ index f37169d73..86935f70a 100644 private int fuseTicks; public int maxFuseTicks = 30; @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { - this.dF(); + this.dG(); } else { fuseTicks = 0; + this.datawatcher.set(isIgnitedDW, Boolean.valueOf(false)); // Paper diff --git a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index 3387f40e2e..6b27afa780 100644 --- a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -12,7 +12,7 @@ results in a separate line, even though it should not result in a line break. Log4j's implementation handles it correctly. diff --git a/pom.xml b/pom.xml -index f2c7d2ba8b..fa6c3702a7 100644 +index 47e307a24..a93ed45df 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -30,7 +30,7 @@ index f2c7d2ba8b..fa6c3702a7 100644 junit diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 681194e94f..927cbeedcd 100644 +index af430b73f..8c7630018 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index ef582b099b..52018bd6f2 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -19,7 +19,7 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 17bc80776..47cb2c036 100644 +index 09b4ddf19..47e307a24 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -157,7 +157,7 @@ index 000000000..685deaa0e + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index a3d58b5ce..681194e94 100644 +index bf1fffcfe..af430b73f 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -199,7 +199,7 @@ index a3d58b5ce..681194e94 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5d13f053f..c95f12351 100644 +index eb8c7aaad..88900121d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; @@ -257,7 +257,7 @@ index 5d13f053f..c95f12351 100644 public KeyPair G() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4c9ff8c29..9e403d625 100644 +index 0b0d99652..4cbe14801 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -271,7 +271,7 @@ index 4c9ff8c29..9e403d625 100644 this.k = new GameProfileBanList(PlayerList.a); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8719fe35e..f6dfe2e2b 100644 +index ff9346023..21d9f381c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import java.nio.ByteBuffer; @@ -299,7 +299,7 @@ index 8719fe35e..f6dfe2e2b 100644 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index aad208f47..ac38028d7 100644 +index c552c624e..3245fded9 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ import java.util.logging.Logger; diff --git a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch index 66aa8eae96..f1b22972d3 100644 --- a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use asynchronous Log4j 2 loggers diff --git a/pom.xml b/pom.xml -index a034c87d6..efa52f356 100644 +index a319cfe3b..ddee1b048 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/getPlayerUniqueId-API.patch b/Spigot-Server-Patches/getPlayerUniqueId-API.patch index 63d94493a4..ddc5e9155c 100644 --- a/Spigot-Server-Patches/getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b1d3f2a5e..f3050b126 100644 +index c74831b3d..e860a83d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch b/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch index f6b10a3af3..83372d0d86 100644 --- a/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch @@ -21,11 +21,11 @@ index 99fe720e8..c80d84b9b 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index f286b6286..f37169d73 100644 +index 8b0134ecd..0147054df 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { - private void dF() { + private void dG() { Collection collection = this.getEffects(); - if (!collection.isEmpty()) { diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index e7e514ae6f..12635fea11 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3c201c2e2..05dc8451e 100644 +index eb0e1361a..68ab9b7eb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import co.aikar.timings.MinecraftTimings; // Paper diff --git a/work/BuildData b/work/BuildData index a5effc6142..351106b633 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit a5effc614208d06202688a775f25d7b820b36d47 +Subproject commit 351106b6336fc52f6acf94aabd34ac54fc772432 diff --git a/work/Bukkit b/work/Bukkit index 2ba30dddd4..7f22259662 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 2ba30dddd4acb3bd789b4e487ed0647984576e8c +Subproject commit 7f2225966203a65e7d2c32d686121360489375f3 diff --git a/work/CraftBukkit b/work/CraftBukkit index 961295e432..4e2f571337 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 961295e4327324766a0404857c1ca85051971995 +Subproject commit 4e2f57133714acc3f84bec56d8ebcbcfc0228326 diff --git a/work/Spigot b/work/Spigot index 3fa6cc486b..ed1cec9ae9 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 3fa6cc486bf213165cc95cc3809162036cf9bf78 +Subproject commit ed1cec9ae9ee07f1b51bdda14dfe14b40e92c9ed From f77470d72cd5caca52f42e458e89ca2951fd6ba6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 01:30:37 -0400 Subject: [PATCH 21/67] because upstream force pushed... lets try again --- work/Bukkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/Bukkit b/work/Bukkit index 7f22259662..7731ecdea4 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 7f2225966203a65e7d2c32d686121360489375f3 +Subproject commit 7731ecdea45210a641cedc66d7ef91a8176e3cfc From d5a4135e987a6d2e96b5796a7ca0ce9cbceda5df Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 13:10:15 -0400 Subject: [PATCH 22/67] Update upstream --- Spigot-Server-Patches/Add-exception-reporting-event.patch | 2 +- Spigot-Server-Patches/Auto-Save-Improvements.patch | 2 +- .../Avoid-hopper-searches-if-there-are-no-items.patch | 2 +- .../Configurable-Chunk-Inhabited-Timer.patch | 2 +- Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch | 6 +++--- Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch | 2 +- Spigot-Server-Patches/Lighting-Queue.patch | 2 +- .../Option-to-remove-corrupt-tile-entities.patch | 2 +- .../Remove-invalid-mob-spawner-tile-entities.patch | 2 +- work/CraftBukkit | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Spigot-Server-Patches/Add-exception-reporting-event.patch b/Spigot-Server-Patches/Add-exception-reporting-event.patch index 2f6b8aa733..e87841cb2c 100644 --- a/Spigot-Server-Patches/Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/Add-exception-reporting-event.patch @@ -50,7 +50,7 @@ index 000000000..93397188b +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0c2540938..15ecac26c 100644 +index 0d80d811a..e3f7ec610 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index d1d2b7bfdf..9fa6d7e9ea 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -64,7 +64,7 @@ index 0e6c18b32..c182ceffb 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 99421aca9..ee992e346 100644 +index c27073d27..06d6814b8 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch index ba67f6c0bc..70453074e4 100644 --- a/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch @@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b0060c363..2d55abd7a 100644 +index eb7a41977..0d80d811a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch b/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch index 51c3394e3d..94dc21aaca 100644 --- a/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch +++ b/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch @@ -23,7 +23,7 @@ index 1c2209270..17fb883f6 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1c0580f79..744b5bc6d 100644 +index 5d1812ab0..695c6d3b7 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index 43bf5c70a2..bf2c04870c 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -78,7 +78,7 @@ index 7bd7aa0d9..ba6d5b7ff 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 03afa1236..1f50004cb 100644 +index b37fa3829..c56e435b1 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -147,7 +147,7 @@ index 03afa1236..1f50004cb 100644 this.world.a((Collection) entityslice); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d725bf13e..7154692ee 100644 +index be3b1f096..6eceb1dce 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -159,7 +159,7 @@ index d725bf13e..7154692ee 100644 this.uniqueID = uuid; this.au = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 013f4eef5..b9d03d801 100644 +index 747d99dbe..7a9f28421 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 05b12b1329..f38e4c6799 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index a5a63a01d..e504b7858 100644 +index 7a797bef0..7a7d65692 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Lighting-Queue.patch b/Spigot-Server-Patches/Lighting-Queue.patch index ec8abbc5a1..0a7d307590 100644 --- a/Spigot-Server-Patches/Lighting-Queue.patch +++ b/Spigot-Server-Patches/Lighting-Queue.patch @@ -43,7 +43,7 @@ index a340866f3..1e3405cc1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 091a53371..d46578b3e 100644 +index adf3dee2e..eb7a41977 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch index 2e0d5574f1..efbef5fe0b 100644 --- a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch @@ -19,7 +19,7 @@ index c182ceffb..9a2ec0793 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 5163bd11b..f31524eb0 100644 +index 06d6814b8..7a797bef0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/Remove-invalid-mob-spawner-tile-entities.patch index d15feff11b..da1236f475 100644 --- a/Spigot-Server-Patches/Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/Remove-invalid-mob-spawner-tile-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove invalid mob spawner tile entities diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 3b97981bc..4a4cc6c59 100644 +index 0a0d04cf6..adf3dee2e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/work/CraftBukkit b/work/CraftBukkit index 4e2f571337..1c7adf74e4 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 4e2f57133714acc3f84bec56d8ebcbcfc0228326 +Subproject commit 1c7adf74e45bb83545603c1e4b7974ad979c442c From 1fbc4f4d9bc5464ee8141c2d1cf3ea68fa63a0e5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 18:46:13 -0400 Subject: [PATCH 23/67] Re-add block inlining - Closes #1229 Also reordered MC Utils to be higher up --- ...-MinecraftKey-Information-to-Objects.patch | 6 +- Spigot-Server-Patches/MC-Utils.patch | 9 +- ...Location-getType-and-getBlockData-fo.patch | 4 +- Spigot-Server-Patches/Paper-Metrics.patch | 2 +- .../Speedup-BlockPos-by-fixing-inlining.patch | 198 ++++++++++++++++++ ...ts-for-each-Entity-Block-Entity-Type.patch | 2 +- ...to-current-Chunk-for-Entity-and-Bloc.patch | 8 +- 7 files changed, 213 insertions(+), 16 deletions(-) create mode 100644 Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch diff --git a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch index fab2560e99..be9a1d89c6 100644 --- a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch @@ -26,7 +26,7 @@ index a0ebc1eaa..e4c771a39 100644 + } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 515c9d875..53fc37088 100644 +index 3fa32228b..e65558f7a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityPortalEvent; @@ -88,7 +88,7 @@ index 515c9d875..53fc37088 100644 protected abstract void a(NBTTagCompound nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 557a3f97f..97cfd6695 100644 +index 9a513b4e3..fa268f354 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ public class EntityTypes { @@ -114,7 +114,7 @@ index 000000000..61c2b993c + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 093e7eb7f..b09325097 100644 +index 8a0453245..257dd1da9 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 8e7e57c1d1..a888d020c0 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -18,7 +18,7 @@ index c3e990bdf..e2a7b4be2 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 121a137f3..35ec4981c 100644 +index 121a137f3..279045e49 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -26,7 +26,6 @@ index 121a137f3..35ec4981c 100644 public class BlockPosition extends BaseBlockPosition { - private static final Logger b = LogManager.getLogger(); -+ private static final Logger LOGGER = LogManager.getLogger(); // Paper - b > LOGGER - attempts to avoid /some/ stupidity public static final BlockPosition ZERO = new BlockPosition(0, 0, 0); private static final int c = 1 + MathHelper.e(MathHelper.c(30000000)); private static final int d = BlockPosition.c; @@ -55,7 +54,7 @@ index 121a137f3..35ec4981c 100644 return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0ae780c8e..3b97981bc 100644 +index 411ab6061..cd4fbee0c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ import com.google.common.collect.Lists; // CraftBukkit @@ -89,7 +88,7 @@ index 00a530c51..2947d9ff6 100644 return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 97cfd6695..81605b10f 100644 +index ca2a14d7a..9a513b4e3 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -601,7 +600,7 @@ index b3c944d70..a8280acf9 100644 - } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2fb86aa19..6f21b01a8 100644 +index 2f2f4c6c6..556989f60 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch index de79588eed..402f25aee5 100644 --- a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -31,7 +31,7 @@ index e2a7b4be2..58f8b4b72 100644 public BaseBlockPosition(int i, int j, int k) { this.a = i; diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 35ec4981c..ca73ac82f 100644 +index 279045e49..7122a9aa8 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { @@ -52,7 +52,7 @@ index 35ec4981c..ca73ac82f 100644 public MutableBlockPosition() { this(0, 0, 0); diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0dc05b644..94d036865 100644 +index 32c1dbd0b..5d1812ab0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Paper-Metrics.patch b/Spigot-Server-Patches/Paper-Metrics.patch index 821ba72184..25aba3be02 100644 --- a/Spigot-Server-Patches/Paper-Metrics.patch +++ b/Spigot-Server-Patches/Paper-Metrics.patch @@ -671,7 +671,7 @@ index 3d8ee9ed3..5ab2cf6ee 100644 static void readConfig(Class clazz, Object instance) { diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index ac36ea08e..09100408e 100644 +index 5175e9523..676780b61 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch new file mode 100644 index 0000000000..9564fb035a --- /dev/null +++ b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch @@ -0,0 +1,198 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Techcable +Date: Wed, 30 Nov 2016 20:56:58 -0600 +Subject: [PATCH] Speedup BlockPos by fixing inlining + +Normally the JVM can inline virtual getters by having two sets of code, one is the 'optimized' code and the other is the 'deoptimized' code. +If a single type is used 99% of the time, then its worth it to inline, and to revert to 'deoptimized' the 1% of the time we encounter other types. +But if two types are encountered commonly, then the JVM can't inline them both, and the call overhead remains. + +This scenario also occurs with BlockPos and MutableBlockPos. +The variables in BlockPos are final, so MutableBlockPos can't modify them. +MutableBlockPos fixes this by adding custom mutable variables, and overriding the getters to access them. + +This approach with utility methods that operate on MutableBlockPos and BlockPos. +Specific examples are BlockPosition.up(), and World.isValidLocation(). +It makes these simple methods much slower than they need to be. + +This should result in an across the board speedup in anything that accesses blocks or does logic with positions. + +This is based upon conclusions drawn from inspecting the assenmbly generated bythe JIT compiler on my mircorbenchmarks. +They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. + +diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java +index 58f8b4b72..98992513d 100644 +--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java ++++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java +@@ -0,0 +0,0 @@ import javax.annotation.concurrent.Immutable; + public class BaseBlockPosition implements Comparable { + + public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0); +- private final int a; +- private final int b; +- private final int c; + // Paper start ++ protected int x; ++ protected int y; ++ protected int z; + public boolean isValidLocation() { +- return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256; ++ return x >= -30000000 && z >= -30000000 && x < 30000000 && z < 30000000 && y >= 0 && y < 256; + } + public boolean isInvalidYLocation() { +- return b < 0 || b >= 256; ++ return y < 0 || y >= 256; + } + // Paper end + + public BaseBlockPosition(int i, int j, int k) { +- this.a = i; +- this.b = j; +- this.c = k; ++ this.x = i; ++ this.y = j; ++ this.z = k; + } + + public BaseBlockPosition(double d0, double d1, double d2) { +@@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable { + return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); + } + +- public int getX() { +- return this.a; ++ // Paper start ++ public final int getX() { ++ return this.x; + } + + public int getY() { +- return this.b; ++ return this.y; + } + + public int getZ() { +- return this.c; ++ return this.z; + } ++ // Paper end + + public BaseBlockPosition d(BaseBlockPosition baseblockposition) { + return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); +diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java +index 7122a9aa8..2f6fc330b 100644 +--- a/src/main/java/net/minecraft/server/BlockPosition.java ++++ b/src/main/java/net/minecraft/server/BlockPosition.java +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + if (this.g == null) { + this.g = new BlockPosition.MutableBlockPosition(i, j, k); + return this.g; +- } else if (this.g.b == l && this.g.c == i1 && this.g.d == j1) { ++ } else if (this.g.x == l && this.g.y == i1 && this.g.z == j1) { // Paper + return (BlockPosition.MutableBlockPosition) this.endOfData(); + } else { +- if (this.g.b < l) { +- ++this.g.b; +- } else if (this.g.c < i1) { +- ++this.g.c; +- } else if (this.g.d < j1) { +- ++this.g.d; ++ // Paper start - use xyz ++ if (this.g.x < l) { ++ ++this.g.x; ++ } else if (this.g.y < i1) { ++ ++this.g.y; ++ } else if (this.g.z < j1) { ++ ++this.g.z; ++ // Paper end + } + + return this.g; +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + + public static class MutableBlockPosition extends BlockPosition { + ++ // Paper start - comment out ++ /* + protected int b; + protected int c; + protected int d; +- // Paper start ++ + @Override + public boolean isValidLocation() { + return b >= -30000000 && d >= -30000000 && b < 30000000 && d < 30000000 && c >= 0 && c < 256; +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + public boolean isInvalidYLocation() { + return c < 0 || c >= 256; + } ++ */ + // Paper end + + public MutableBlockPosition() { +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + } + + public MutableBlockPosition(int i, int j, int k) { +- super(0, 0, 0); ++ // Paper start ++ super(i, j, k); ++ /* + this.b = i; + this.c = j; +- this.d = k; ++ this.d = k;*/ ++ // Paper end + } + + public BlockPosition a(double d0, double d1, double d2) { +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + return super.a(enumblockrotation).h(); + } + ++ /* ++ // Paper start - use parent getters + public int getX() { + return this.b; + } +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + + public int getZ() { + return this.d; +- } ++ }*/ ++ // Paper end + + public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return c(i, j, k);} // Paper - OBFHELPER + public BlockPosition.MutableBlockPosition c(int i, int j, int k) { +- this.b = i; +- this.c = j; +- this.d = k; ++ // Paper start - use xyz ++ this.x = i; ++ this.y = j; ++ this.z = k; ++ // Paper end + return this; + } + +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + } + + public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { +- return this.c(this.b + enumdirection.getAdjacentX() * i, this.c + enumdirection.getAdjacentY() * i, this.d + enumdirection.getAdjacentZ() * i); ++ return this.c(x + enumdirection.getAdjacentX() * i, y + enumdirection.getAdjacentY() * i, z + enumdirection.getAdjacentZ() * i); // Paper - use xyz + } + + public BlockPosition.MutableBlockPosition d(int i, int j, int k) { +- return this.c(this.b + i, this.c + j, this.d + k); ++ return this.c(x + i, y + j, z + k); // Paper - use xyz + } + + public void p(int i) { +- this.c = i; ++ this.y = i; // Paper change to y + } + + public BlockPosition h() { +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch b/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch index e1dbf12fa5..54154c909b 100644 --- a/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch +++ b/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type Opens door for future patches to optimize performance diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 120e66c78..0ae780c8e 100644 +index 7837f1024..0a0d04cf6 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index b17c8155ec..589972e8fe 100644 --- a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9500c456d..120e66c78 100644 +index cd4fbee0c..7837f1024 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -86,7 +86,7 @@ index 9500c456d..120e66c78 100644 public boolean c(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 53fc37088..1ef52cc6d 100644 +index e65558f7a..36cc0c18d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -131,7 +131,7 @@ index 53fc37088..1ef52cc6d 100644 public final String entityKeyString; diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index b09325097..b992360ac 100644 +index 257dd1da9..cffbcb8f7 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -151,7 +151,7 @@ index b09325097..b992360ac 100644 @Nullable diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 70143c4d3..1e3675e4f 100644 +index 72164e11a..f09251eec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ import java.util.UUID; From 9108f443a80b7c593b1d180b41b4e68e281e7e71 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 19:03:54 -0400 Subject: [PATCH 24/67] Re-add Optimize Hoppers patch --- Spigot-Server-Patches/Optimize-Hoppers.patch | 285 +++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 Spigot-Server-Patches/Optimize-Hoppers.patch diff --git a/Spigot-Server-Patches/Optimize-Hoppers.patch b/Spigot-Server-Patches/Optimize-Hoppers.patch new file mode 100644 index 0000000000..ae513b7418 --- /dev/null +++ b/Spigot-Server-Patches/Optimize-Hoppers.patch @@ -0,0 +1,285 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 27 Apr 2016 22:09:52 -0400 +Subject: [PATCH] Optimize Hoppers + +* Removes unnecessary extra calls to .update() that are very expensive +* Lots of itemstack cloning removed. Only clone if the item is actually moved +* Return true when a plugin cancels inventory move item event instead of false, as false causes pulls to cycle through all items. + However, pushes do not exhibit the same behavior, so this is not something plugins could of been relying on. +* Add option (Default on) to cooldown hoppers when they fail to move an item due to full inventory +* Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index b9f5f4905..a8470e6e7 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); + } + ++ public boolean cooldownHopperWhenFull = true; ++ public boolean disableHopperMoveEvents = false; ++ private void hopperOptimizations() { ++ cooldownHopperWhenFull = getBoolean("hopper.cooldown-when-full", cooldownHopperWhenFull); ++ log("Cooldown Hoppers when Full: " + (cooldownHopperWhenFull ? "enabled" : "disabled")); ++ disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); ++ log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); ++ } ++ + public boolean disableSprintInterruptionOnAttack; + private void disableSprintInterruptionOnAttack() { + disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index ebc0709eb..d989b065d 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + + if (true || i == 0 || this.getAllowNether()) { // CraftBukkit + WorldServer worldserver = this.worlds.get(i); ++ TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper + + this.methodProfiler.a(() -> { + return worldserver.getWorldData().getName(); +diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java +index 3e9b357c8..db78274a8 100644 +--- a/src/main/java/net/minecraft/server/TileEntity.java ++++ b/src/main/java/net/minecraft/server/TileEntity.java +@@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { + public void setCurrentChunk(Chunk chunk) { + this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null; + } ++ static boolean IGNORE_TILE_UPDATES = false; + // Paper end + + @Nullable +@@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { + + public void update() { + if (this.world != null) { ++ if (IGNORE_TILE_UPDATES) return; // Paper + this.f = this.world.getType(this.position); + this.world.b(this.position, this); + if (!this.f.isAir()) { +diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java +index bb41d4780..9e7a91fe4 100644 +--- a/src/main/java/net/minecraft/server/TileEntityHopper.java ++++ b/src/main/java/net/minecraft/server/TileEntityHopper.java +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + return false; + } + ++ // Paper start - Optimize Hoppers ++ private static boolean skipPullModeEventFire = false; ++ private static boolean skipPushModeEventFire = false; ++ static boolean skipHopperEvents = false; ++ ++ private boolean hopperPush(IInventory iinventory, EnumDirection enumdirection) { ++ skipPushModeEventFire = skipHopperEvents; ++ boolean foundItem = false; ++ for (int i = 0; i < this.getSize(); ++i) { ++ if (!this.getItem(i).isEmpty()) { ++ foundItem = true; ++ ItemStack origItemStack = this.getItem(i); ++ ItemStack itemstack = origItemStack; ++ ++ final int origCount = origItemStack.getCount(); ++ final int moved = Math.min(world.spigotConfig.hopperAmount, origCount); ++ origItemStack.setCount(moved); ++ ++ // We only need to fire the event once to give protection plugins a chance to cancel this event ++ // Because nothing uses getItem, every event call should end up the same result. ++ if (!skipPushModeEventFire) { ++ itemstack = callPushMoveEvent(iinventory, itemstack); ++ if (itemstack == null) { // cancelled ++ origItemStack.setCount(origCount); ++ return false; ++ } ++ } ++ final ItemStack itemstack2 = addItem(this, iinventory, itemstack, enumdirection); ++ final int remaining = itemstack2.getCount(); ++ if (remaining != moved) { ++ origItemStack = origItemStack.cloneItemStack(); ++ origItemStack.setCount(origCount - moved + remaining); ++ this.setItem(i, origItemStack); ++ iinventory.update(); ++ return true; ++ } ++ origItemStack.setCount(origCount); ++ } ++ } ++ if (foundItem && world.paperConfig.cooldownHopperWhenFull) { // Inventory was full - cooldown ++ this.setCooldown(world.spigotConfig.hopperTransfer); ++ } ++ return false; ++ } ++ ++ private static boolean hopperPull(IHopper ihopper, IInventory iinventory, int i) { ++ ItemStack origItemStack = iinventory.getItem(i); ++ ItemStack itemstack = origItemStack; ++ final int origCount = origItemStack.getCount(); ++ final World world = ihopper.getWorld(); ++ final int moved = Math.min(world.spigotConfig.hopperAmount, origCount); ++ itemstack.setCount(moved); ++ ++ if (!skipPullModeEventFire) { ++ itemstack = callPullMoveEvent(ihopper, iinventory, itemstack); ++ if (itemstack == null) { // cancelled ++ origItemStack.setCount(origCount); ++ // Drastically improve performance by returning true. ++ // No plugin could of relied on the behavior of false as the other call ++ // site for IMIE did not exhibit the same behavior ++ return true; ++ } ++ } ++ ++ final ItemStack itemstack2 = addItem(iinventory, ihopper, itemstack, null); ++ final int remaining = itemstack2.getCount(); ++ if (remaining != moved) { ++ origItemStack = origItemStack.cloneItemStack(); ++ origItemStack.setCount(origCount - moved + remaining); ++ IGNORE_TILE_UPDATES = true; ++ iinventory.setItem(i, origItemStack); ++ IGNORE_TILE_UPDATES = false; ++ iinventory.update(); ++ return true; ++ } ++ origItemStack.setCount(origCount); ++ ++ if (world.paperConfig.cooldownHopperWhenFull) { ++ cooldownHopper(ihopper); ++ } ++ ++ return false; ++ } ++ ++ private ItemStack callPushMoveEvent(IInventory iinventory, ItemStack itemstack) { ++ Inventory destinationInventory = getInventory(iinventory); ++ InventoryMoveItemEvent event = new InventoryMoveItemEvent(this.getOwner(false).getInventory(), ++ CraftItemStack.asCraftMirror(itemstack), destinationInventory, true); ++ boolean result = event.callEvent(); ++ if (!event.calledGetItem && !event.calledSetItem) { ++ skipPushModeEventFire = true; ++ } ++ if (!result) { ++ cooldownHopper(this); ++ return null; ++ } ++ ++ if (event.calledSetItem) { ++ return CraftItemStack.asNMSCopy(event.getItem()); ++ } else { ++ return itemstack; ++ } ++ } ++ ++ private static ItemStack callPullMoveEvent(IHopper hopper, IInventory iinventory, ItemStack itemstack) { ++ Inventory sourceInventory = getInventory(iinventory); ++ Inventory destination = getInventory(hopper); ++ ++ InventoryMoveItemEvent event = new InventoryMoveItemEvent(sourceInventory, ++ // Mirror is safe as we no plugins ever use this item ++ CraftItemStack.asCraftMirror(itemstack), destination, false); ++ boolean result = event.callEvent(); ++ if (!event.calledGetItem && !event.calledSetItem) { ++ skipPullModeEventFire = true; ++ } ++ if (!result) { ++ cooldownHopper(hopper); ++ return null; ++ } ++ ++ if (event.calledSetItem) { ++ return CraftItemStack.asNMSCopy(event.getItem()); ++ } else { ++ return itemstack; ++ } ++ } ++ ++ private static Inventory getInventory(IInventory iinventory) { ++ Inventory sourceInventory;// Have to special case large chests as they work oddly ++ if (iinventory instanceof InventoryLargeChest) { ++ sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory); ++ } else if (iinventory instanceof TileEntity) { ++ sourceInventory = ((TileEntity) iinventory).getOwner(false).getInventory(); ++ } else { ++ sourceInventory = iinventory.getOwner().getInventory(); ++ } ++ return sourceInventory; ++ } ++ ++ private static void cooldownHopper(IHopper hopper) { ++ if (hopper instanceof TileEntityHopper) { ++ ((TileEntityHopper) hopper).setCooldown(hopper.getWorld().spigotConfig.hopperTransfer); ++ } else if (hopper instanceof EntityMinecartHopper) { ++ ((EntityMinecartHopper) hopper).setCooldown(hopper.getWorld().spigotConfig.hopperTransfer / 2); ++ } ++ } ++ ++ // Paper end + private boolean s() { + IInventory iinventory = this.D(); + +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + if (this.a(iinventory, enumdirection)) { + return false; + } else { ++ return hopperPush(iinventory, enumdirection); /* // Paper - disable rest + for (int i = 0; i < this.getSize(); ++i) { + if (!this.getItem(i).isEmpty()) { + ItemStack itemstack = this.getItem(i).cloneItemStack(); +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + } + } + +- return false; ++ return false;*/ // Paper - end commenting out replaced block for Hopper Optimizations + } + } + } +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + if (b(iinventory, enumdirection)) { + return false; + } ++ skipPullModeEventFire = skipHopperEvents; // Paper + + if (iinventory instanceof IWorldInventory) { + IWorldInventory iworldinventory = (IWorldInventory) iinventory; +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + ItemStack itemstack = iinventory.getItem(i); + + if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) { ++ return hopperPull(ihopper, iinventory, i); /* // Paper - disable rest + ItemStack itemstack1 = itemstack.cloneItemStack(); + // ItemStack itemstack2 = addItem(iinventory, ihopper, iinventory.splitStack(i, 1), (EnumDirection) null); + // CraftBukkit start - Call event on collection of items from inventories into the hopper +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + } + + itemstack1.subtract(origCount - itemstack2.getCount()); // Spigot +- iinventory.setItem(i, itemstack1); ++ iinventory.setItem(i, itemstack1);*/ // Paper - end commenting out replaced block for Hopper Optimizations + } + + return false; +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + public static boolean a(IInventory iinventory, EntityItem entityitem) { + boolean flag = false; + // CraftBukkit start +- InventoryPickupItemEvent event = new InventoryPickupItemEvent(iinventory.getOwner().getInventory(), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); ++ InventoryPickupItemEvent event = new InventoryPickupItemEvent(getInventory(iinventory), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); // Paper - use getInventory() to avoid snapshot creation + entityitem.world.getServer().getPluginManager().callEvent(event); + if (event.isCancelled()) { + return false; +@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + boolean flag1 = iinventory1.P_(); + + if (itemstack1.isEmpty()) { ++ IGNORE_TILE_UPDATES = true; // Paper + iinventory1.setItem(i, itemstack); ++ IGNORE_TILE_UPDATES = false; // Paper + itemstack = ItemStack.a; + flag = true; + } else if (a(itemstack1, itemstack)) { +-- \ No newline at end of file From 84b819bcb8efa8e6224291794494734a98cdb41f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 19:39:56 -0400 Subject: [PATCH 25/67] Fix Chest open/close animations --- .../Basic-PlayerProfile-API.patch | 2 +- ...rable-Disabling-Cat-Chest-Detection.patch} | 5 +-- Spigot-Server-Patches/MC-Utils.patch | 28 ++++++++++++++- .../Optimize-TileEntity-Ticking.patch | 36 +++++++++++++++---- .../String-based-Action-Bar-API.patch | 4 +-- 5 files changed, 62 insertions(+), 13 deletions(-) rename Spigot-Server-Patches/{Disable-chest-cat-detection.patch => Configurable-Disabling-Cat-Chest-Detection.patch} (91%) diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index f20d000ea5..c7ede96610 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -404,7 +404,7 @@ index 000000000..3aceb0ea8 + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 70db1cc14..9ab3844fc 100644 +index 381542e0d..80927de08 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Disable-chest-cat-detection.patch b/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch similarity index 91% rename from Spigot-Server-Patches/Disable-chest-cat-detection.patch rename to Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch index 8e10ef6f50..9eb9aeadfe 100644 --- a/Spigot-Server-Patches/Disable-chest-cat-detection.patch +++ b/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch @@ -1,8 +1,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:13:45 -0600 -Subject: [PATCH] Disable chest cat detection +Subject: [PATCH] Configurable Disabling Cat Chest Detection +Offers a gameplay feature to stop cats from blocking chests diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index 26d8dbb60..43aa73e1d 100644 @@ -19,7 +20,7 @@ index 26d8dbb60..43aa73e1d 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index d55122c66..f8be07258 100644 +index 0f6902747..1ad39aca3 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java @@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index a888d020c0..dc55a3ffb9 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -180,7 +180,7 @@ index a540167d6..add618866 100644 } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 000000000..edaa7713d +index 000000000..70cdc3f10 --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -212,6 +212,32 @@ index 000000000..edaa7713d + return MinecraftServer.getServer().isMainThread(); + } + ++ private static class DelayedRunnable implements Runnable { ++ ++ private final int ticks; ++ private final Runnable run; ++ ++ private DelayedRunnable(int ticks, Runnable run) { ++ this.ticks = ticks; ++ this.run = run; ++ } ++ ++ @Override ++ public void run() { ++ if (ticks <= 0) { ++ run.run(); ++ } else { ++ scheduleTask(ticks-1, run); ++ } ++ } ++ } ++ ++ public static void scheduleTask(int ticks, Runnable runnable) { ++ // We use post to main instead of process queue as we don't want to process these mid tick if ++ // Someone uses processQueueWhileWaiting ++ MinecraftServer.getServer().postToMainThread(new DelayedRunnable(ticks, runnable)); ++ } ++ + public static void processQueue() { + Runnable runnable; + Queue processQueue = getProcessQueue(); diff --git a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch index 898662f3e5..c7b16e41e4 100644 --- a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch @@ -1,11 +1,11 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Tue, 1 Mar 2016 22:01:19 -0600 +From: Aikar +Date: Sun, 8 Mar 2015 22:55:25 -0600 Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index de06bd59a..9b54cbfdc 100644 +index a534c441a..591524f1e 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -30,7 +30,7 @@ index de06bd59a..9b54cbfdc 100644 + int i = this.position.getX(); + int j = this.position.getY(); + int k = this.position.getZ(); -+ if (!this.world.isClientSide && this.f != 0 /*&& (this.k + i + j + k) % 200 == 0*/) { // Paper - comment out tick rate limiter ++ if (false && !this.world.isClientSide && this.f != 0 && (this.k + i + j + k) % 200 == 0) { // Paper - disable block + // Paper end this.f = 0; f = 5.0F; @@ -41,7 +41,8 @@ index de06bd59a..9b54cbfdc 100644 - this.e = this.a; - f = 0.1F; - if (this.f > 0 && this.a == 0.0F) { +- if (this.f > 0 && this.a == 0.0F) { ++ if (this.f == 1 && this.a == 0.0F) { // check == 1 instead of > 0, first open this.a(SoundEffects.BLOCK_CHEST_OPEN); } + // Paper start @@ -50,8 +51,29 @@ index de06bd59a..9b54cbfdc 100644 + this.e = this.a; + // Paper end - if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) { +- if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) { ++ if (this.f == 0/* && this.a > 0.0F || this.f > 0 && this.a < 1.0F*/) { // Paper disable all but player count check ++ /* // Paper disable animation stuff float f1 = this.a; + + if (this.f > 0) { +@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { + + float f2 = 0.5F; + ++ + if (this.a < 0.5F && f1 >= 0.5F) { +- this.a(SoundEffects.BLOCK_CHEST_CLOSE); +- } ++ */ ++ // add some delay ++ MCUtil.scheduleTask(10, () -> { ++ if (this.f == 0) this.a(SoundEffects.BLOCK_CHEST_CLOSE); ++ }); ++ // } // Paper end + + if (this.a < 0.0F) { + this.a = 0.0F; @@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { ++this.f; @@ -69,7 +91,7 @@ index de06bd59a..9b54cbfdc 100644 int newPower = Math.max(0, Math.min(15, this.f)); diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java -index f275fd1c3..7d7628b04 100644 +index 61edd7cc6..9407a8c97 100644 --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/String-based-Action-Bar-API.patch b/Spigot-Server-Patches/String-based-Action-Bar-API.patch index 0fef359074..7f6340f2fb 100644 --- a/Spigot-Server-Patches/String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/String-based-Action-Bar-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] String based Action Bar API diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index edaa7713d..70db1cc14 100644 +index 70cdc3f10..381542e0d 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -62,7 +62,7 @@ index edaa7713d..70db1cc14 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7d4355439..1c8c364d3 100644 +index dea59d3fa..a546f3118 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { From 7c1ad2bc8d0a681849d7039c43ab0dafc3805e67 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 19:53:01 -0400 Subject: [PATCH 26/67] Fix spawn loading percentages --- .../Auto-Save-Improvements.patch | 2 +- .../Basic-PlayerProfile-API.patch | 2 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 26 ++++++++++++++++++- ...nt-extended-PaperServerListPingEvent.patch | 2 +- Spigot-Server-Patches/Optimize-Hoppers.patch | 2 +- .../Optimize-UserCache-Thread-Safe.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 2 +- ...oleAppender-for-console-improvements.patch | 2 +- ...-possibility-for-getServer-singleton.patch | 2 +- 9 files changed, 33 insertions(+), 9 deletions(-) diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index 9fa6d7e9ea..642786710f 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -128,7 +128,7 @@ index 982e18f8a..1879c3238 100644 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0e385e4ea..326d4242d 100644 +index 5f17ec1e9..94df23c31 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index c7ede96610..9b38e51eca 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -429,7 +429,7 @@ index 381542e0d..80927de08 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 88900121d..5d12855ba 100644 +index 0808da26f..cdcc37592 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch index 3d4f1f5628..e0f9d48af5 100644 --- a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -21,7 +21,7 @@ index eb09be512..6ac58e5ec 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 96d31f874..664007c29 100644 +index 96d31f874..7fb0a58f9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -37,6 +37,30 @@ index 96d31f874..664007c29 100644 + // Paper end arraylist.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); } ++ } // Paper ++ if (true) { // Paper ++ int expected = arraylist.size(); // Paper ++ + + CompletableFuture completablefuture = worldserver.getChunkProviderServer().a((Iterable) arraylist, (chunk) -> { + set.add(chunk.getPos()); ++ if (set.size() < expected && set.size() % 25 == 0) this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / expected); // Paper + }); + + while (!completablefuture.isDone()) { +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati + + throw new RuntimeException(executionexception.getCause()); + } catch (TimeoutException timeoutexception) { +- this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / 625); ++ this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / expected); // Paper + } + } + +- this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / 625); ++ this.a(new ChatMessage("menu.preparingSpawn", new Object[0]), set.size() * 100 / expected); // Paper + } + } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 6ec1ee26d..a4c8e62e2 100644 diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index 13ce83dcb1..71c5e5bdea 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 000000000..350410527 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5d12855ba..ebc0709eb 100644 +index cdcc37592..66b637326 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Optimize-Hoppers.patch b/Spigot-Server-Patches/Optimize-Hoppers.patch index ae513b7418..2b03a104b0 100644 --- a/Spigot-Server-Patches/Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/Optimize-Hoppers.patch @@ -31,7 +31,7 @@ index b9f5f4905..a8470e6e7 100644 private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ebc0709eb..d989b065d 100644 +index 66b637326..f9a7bde0b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch index 8c5053ec5e..a90991d744 100644 --- a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch @@ -10,7 +10,7 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 68ab9b7eb..0e385e4ea 100644 +index 6de0b22f7..5f17ec1e9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch index 09c44877df..a1b912e98b 100644 --- a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9405dc7bf..eb8c7aaad 100644 +index c97953a2f..8576545bb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index 52018bd6f2..edff194821 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -199,7 +199,7 @@ index bf1fffcfe..af430b73f 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eb8c7aaad..88900121d 100644 +index 8576545bb..0808da26f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index 12635fea11..b25c0bd9b3 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eb0e1361a..68ab9b7eb 100644 +index c181acd99..6de0b22f7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import co.aikar.timings.MinecraftTimings; // Paper From fa09f31f1071862473a4dc40f86c36879644b99b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 21:25:48 -0400 Subject: [PATCH 27/67] Don't save Proto Chunks These chunks are unfinished, and waste cpu time saving these unfinished chunks. the loadChunk method refuses to acknoledge they exists, and will restart a new chunk generation process to begin with, so saving them serves no benefit. --- .../Don-t-save-Proto-Chunks.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch diff --git a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch new file mode 100644 index 0000000000..a13a6ca8d9 --- /dev/null +++ b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 22 Jul 2018 21:21:41 -0400 +Subject: [PATCH] Don't save Proto Chunks + +These chunks are unfinished, and waste cpu time saving these unfinished chunks. +the loadChunk method refuses to acknoledge they exists, and will restart +a new chunk generation process to begin with, so saving them serves no benefit. + +diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index fd8430a68..b425704b1 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { + public boolean a(boolean flag) { + int i = 0; + +- this.f.a(); ++ //this.f.a(); // Paper - don't save proto chunks + ArrayList arraylist = Lists.newArrayList(this.chunks.values()); + Iterator iterator = arraylist.iterator(); + +@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { + } + // Paper end + +- this.f.a(); ++ //this.f.a(); // Paper - don't save proto chunks + this.chunkLoader.b(); + } + +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index ea8684747..7acb3744d 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + } + + public synchronized void saveChunk(World world, IChunkAccess ichunkaccess, boolean unloaded) throws IOException, ExceptionWorldConflict { ++ if (ichunkaccess.i().d() == ChunkStatus.Type.PROTOCHUNK) { new Throwable().printStackTrace(); return; } // Paper - don't save proto chunks + // Spigot end + world.checkSession(); + +-- \ No newline at end of file From 68c928477c11453fe016f0f453819ffc7c70ca1d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 22:33:43 -0400 Subject: [PATCH 28/67] Remove debug that got left in proto chunk change last build --- Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch index a13a6ca8d9..27c359e83c 100644 --- a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch +++ b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch @@ -30,14 +30,14 @@ index fd8430a68..b425704b1 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index ea8684747..7acb3744d 100644 +index ea8684747..a97e024ec 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } public synchronized void saveChunk(World world, IChunkAccess ichunkaccess, boolean unloaded) throws IOException, ExceptionWorldConflict { -+ if (ichunkaccess.i().d() == ChunkStatus.Type.PROTOCHUNK) { new Throwable().printStackTrace(); return; } // Paper - don't save proto chunks ++ if (ichunkaccess.i().d() == ChunkStatus.Type.PROTOCHUNK) { return; } // Paper - don't save proto chunks // Spigot end world.checkSession(); From 0c14fc6ee6593362909263a9238dd8e3cf77f8a9 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 23 Jul 2018 09:39:55 +0100 Subject: [PATCH 29/67] Update B/CB/S --- ...low-plugins-to-use-SLF4J-for-logging.patch | 2 +- .../Expose-server-CommandMap.patch | 2 +- ...upstream-javadoc-warnings-and-errors.patch | 2 +- ...cord-chat-API-from-spigot-subclasses.patch | 2 +- ...Made-EntityDismountEvent-Cancellable.patch | 45 ------------------- .../Profile-Lookup-Events.patch | 2 +- .../Use-ASM-for-event-executors.patch | 2 +- .../getPlayerUniqueId-API.patch | 2 +- ...-get-a-BlockState-without-a-snapshot.patch | 8 ++-- .../Ability-to-apply-mending-to-XP-API.patch | 8 ++-- ...e-PlayerProfile-in-AsyncPreLoginEven.patch | 2 +- .../Activation-Range-Improvements.patch | 12 ++--- ...to-control-if-armour-stands-can-move.patch | 4 +- .../Add-ArmorStand-Item-Meta.patch | 10 ++--- ...ies-option-to-debug-dupe-uuid-issues.patch | 4 +- .../Add-EntityZapEvent.patch | 4 +- .../Add-PlayerArmorChangeEvent.patch | 4 +- .../Add-PlayerJumpEvent.patch | 4 +- .../Add-ProjectileCollideEvent.patch | 2 +- ...dd-SentientNPC-Interface-to-Entities.patch | 12 ++--- .../Add-SkullMeta.setPlayerProfile-API.patch | 2 +- .../Add-UnknownCommandEvent.patch | 2 +- .../Add-async-chunk-load-API.patch | 2 +- ...to-disable-ender-dragon-legacy-check.patch | 4 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- ...d-method-to-open-already-placed-sign.patch | 2 +- ...rages-for-getTileEntity-in-order-to-.patch | 2 +- ...ke-parrots-stay-on-shoulders-despite.patch | 6 +-- ...-option-to-remove-invalid-statistics.patch | 4 +- .../Add-server-name-parameter.patch | 2 +- ...setting-for-proxy-online-mode-status.patch | 6 +-- ...property-to-disable-book-size-limits.patch | 2 +- .../Additional-Paper-Config-options.patch | 4 +- .../Allow-Reloading-of-Command-Aliases.patch | 2 +- ...Item-entities-with-World.spawnEntity.patch | 2 +- ...-a-custom-authentication-servers-dow.patch | 4 +- .../AsyncTabCompleteEvent.patch | 10 ++--- .../Auto-Save-Improvements.patch | 16 +++---- ...uto-fix-bad-Y-levels-on-player-login.patch | 2 +- ...ups-for-Entity-TileEntity-Current-Ch.patch | 4 +- .../Avoid-NPE-in-PathfinderGoalTempt.patch | 2 +- ...blocking-on-Network-Manager-creation.patch | 2 +- ...e-if-stack-size-above-max-stack-size.patch | 2 +- .../Basic-PlayerProfile-API.patch | 18 ++++---- .../Block-Enderpearl-Travel-Exploit.patch | 4 +- ...player-logins-during-server-shutdown.patch | 2 +- .../Bound-Treasure-Maps-to-World-Border.patch | 4 +- .../Cache-user-authenticator-threads.patch | 2 +- ...ServerListPingEvent-for-legacy-pings.patch | 4 +- ...l-PortalCreateEvent-for-exit-portals.patch | 2 +- .../Cap-Entity-Collisions.patch | 6 +-- .../Chunk-Save-Stats-Debug-Option.patch | 4 +- .../Chunk-registration-fixes.patch | 2 +- ...Allowance-of-Permanent-Chunk-Loaders.patch | 4 +- ...le-Alternative-LootPool-Luck-Formula.patch | 4 +- .../Configurable-Bed-Search-Radius.patch | 4 +- ...figurable-Cartographer-Treasure-Maps.patch | 4 +- ...urable-Chunks-Sends-per-Tick-setting.patch | 4 +- ...Configurable-Max-Chunk-Gens-per-Tick.patch | 10 ++--- .../Configurable-flying-kick-messages.patch | 4 +- ...onfigurable-packet-in-spam-threshold.patch | 4 +- ...urable-sprint-interruption-on-attack.patch | 4 +- ...unk-Unloads-based-on-Player-Movement.patch | 16 +++---- ...le-Explicit-Network-Manager-Flushing.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 4 +- .../Disable-Vanilla-Chunk-GC.patch | 2 +- ...refix-for-various-plugins-bypassing-.patch | 2 +- .../Disable-ticking-of-snow-blocks.patch | 2 +- .../Do-not-let-armorstands-drown.patch | 4 +- .../Do-not-load-chunks-for-pathfinding.patch | 2 +- ...llow-entities-to-ride-themselves-572.patch | 2 +- ...ge-the-Entity-Random-seed-for-squids.patch | 2 +- .../Don-t-let-fishinghooks-use-portals.patch | 4 +- ...Chunks-from-Hoppers-and-other-things.patch | 2 +- ...load-chunks-for-villager-door-checks.patch | 2 +- ...e-profiles-that-have-no-UUID-and-no-.patch | 2 +- ...spawn-if-entity-is-in-a-chunk-schedu.patch | 2 +- .../Don-t-save-Proto-Chunks.patch | 4 +- ...y-scoreboard-teams-to-scoreboard.dat.patch | 4 +- .../Don-t-teleport-dead-entities.patch | 2 +- .../Duplicate-UUID-Resolve-Option.patch | 8 ++-- .../Enderman.teleportRandomly.patch | 4 +- .../EndermanAttackPlayerEvent.patch | 2 +- .../EndermanEscapeEvent.patch | 2 +- .../Enforce-Sync-Chunk-Unloads.patch | 2 +- .../Enforce-Sync-Player-Saves.patch | 2 +- .../Ensure-Chunks-never-ever-load-async.patch | 4 +- .../Entity-Tracking-Improvements.patch | 4 +- .../Entity-fromMobSpawner.patch | 6 +-- ...ent-consumeArrow-and-getArrowItem-AP.patch | 6 +-- .../Expand-Explosions-API.patch | 2 +- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +- .../ExperienceOrbMergeEvent.patch | 2 +- ...PI-for-Reason-Source-Triggering-play.patch | 24 +++++----- ...nt-protocol-version-and-virtual-host.patch | 10 ++--- .../Extend-Player-Interact-cancellation.patch | 2 +- ...r-redstone-torch-rapid-clock-removal.patch | 2 +- .../Fill-Profile-Property-Events.patch | 2 +- ...a-from-ArmorStand-and-SpawnEgg-items.patch | 4 +- ...e-EntityShootBowEvent-for-Illusioner.patch | 2 +- Spigot-Server-Patches/Firework-API-s.patch | 8 ++-- .../Fix-AIOOBE-in-inventory-handling.patch | 2 +- .../Fix-Anvil-Level-sync-to-client.patch | 4 +- .../Fix-Chunk-Unload-Queue-Issues.patch | 4 +- .../Fix-CraftEntity-hashCode.patch | 2 +- .../Fix-Double-World-Add-issues.patch | 4 +- .../Fix-Dragon-Server-Crashes.patch | 2 +- .../Fix-MC-117075-TE-Unload-Lag-Spike.patch | 2 +- ...ting-location-from-InventoryEnderChe.patch | 2 +- .../Fix-Old-Sign-Conversion.patch | 6 +-- .../Fix-block-break-desync.patch | 2 +- ...-allowed-colored-signs-to-be-created.patch | 2 +- .../Fix-this-stupid-bullshit.patch | 2 +- .../Flag-to-disable-the-channel-limit.patch | 2 +- ...aving-disabled-before-unloading-all-.patch | 2 +- .../Handle-Item-Meta-Inconsistencies.patch | 8 ++-- ...n-prefixes-using-Log4J-configuration.patch | 6 +-- ...ecipes-in-RecipeBook-to-avoid-data-e.patch | 2 +- ...plement-EntityKnockbackByEntityEvent.patch | 2 +- ...lement-EntityTeleportEndGatewayEvent.patch | 2 +- .../Implement-World.getEntity-UUID-API.patch | 2 +- ...mplement-ensureServerConversions-API.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 14 +++--- .../Implement-getI18NDisplayName.patch | 2 +- ...item-frames-performance-and-bug-fixe.patch | 10 ++--- ...leHitEvent-to-include-the-BlockFace-.patch | 2 +- .../Improve-the-Saddle-API-for-Horses.patch | 6 +-- .../Improved-Async-Task-Scheduler.patch | 4 +- .../Include-Log4J2-SLF4J-implementation.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 16 +++---- .../Item-canEntityPickup.patch | 6 +-- .../ItemStack-getMaxItemUseDuration.patch | 4 +- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 4 +- .../LivingEntity-setKiller.patch | 2 +- ...Load-version-history-at-server-start.patch | 2 +- ...-API-Replenishable-Lootables-Feature.patch | 30 ++++++------- Spigot-Server-Patches/MC-Utils.patch | 34 +++++++------- ...ke-legacy-ping-handler-more-reliable.patch | 2 +- ...-max-squid-spawn-height-configurable.patch | 4 +- ...Make-player-data-saving-configurable.patch | 4 +- ...e-shield-blocking-delay-configurable.patch | 6 +-- ...more-aggressive-in-the-chunk-unload-.patch | 2 +- ...mative-vehicle-moved-wrongly-message.patch | 2 +- ...awns-should-honor-nametags-and-leash.patch | 2 +- ...on-Wither-Death-sounds-to-same-world.patch | 4 +- ...e-BlockStateEnum-hashCode-and-equals.patch | 2 +- .../Optimise-removeQueue.patch | 2 +- Spigot-Server-Patches/Optimize-EAR.patch | 2 +- Spigot-Server-Patches/Optimize-Hoppers.patch | 8 ++-- .../Optimize-ItemStack.isEmpty.patch | 2 +- .../Optimize-Network-Queue.patch | 2 +- .../Optimize-UserCache-Thread-Safe.patch | 4 +- ...imize-World.isLoaded-BlockPosition-Z.patch | 2 +- ...-maximum-exp-value-when-merging-orbs.patch | 4 +- ...tion-to-remove-corrupt-tile-entities.patch | 4 +- ...nilla-per-world-scoreboard-coloring-.patch | 6 +-- .../Optional-TNT-doesn-t-move-in-water.patch | 6 +-- .../Player.setPlayerProfile-API.patch | 6 +-- ...PlayerAdvancementCriterionGrantEvent.patch | 2 +- .../PlayerAttemptPickupItemEvent.patch | 2 +- .../PlayerNaturallySpawnCreaturesEvent.patch | 2 +- .../PlayerPickupExperienceEvent.patch | 2 +- ...PlayerPickupItemEvent-setFlyAtPlayer.patch | 2 +- .../PlayerReadyArrowEvent.patch | 2 +- .../PlayerTeleportEndGatewayEvent.patch | 2 +- .../PreCreatureSpawnEvent.patch | 4 +- ...vent-Auto-Save-if-Save-Queue-is-full.patch | 6 +-- ...sted-Ice-from-loading-holding-chunks.patch | 2 +- ...vent-Pathfinding-out-of-World-Border.patch | 4 +- ...rom-being-processed-when-the-player-.patch | 2 +- ...ils-when-failing-to-save-player-data.patch | 2 +- .../Profile-Lookup-Events.patch | 2 +- .../ProfileWhitelistVerifyEvent.patch | 2 +- .../Properly-fix-item-duplication-bug.patch | 4 +- ...le-async-calls-to-restart-the-server.patch | 6 +-- ...emove-entities-on-dimension-teleport.patch | 4 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- Spigot-Server-Patches/RangedEntity-API.patch | 16 +++---- ...nilla-entity-warnings-for-duplicates.patch | 2 +- ...ers-that-dismount-from-other-players.patch | 2 +- ...nventory-when-cancelling-PlayerInter.patch | 2 +- ...e-CraftScheduler-Async-Task-Debugger.patch | 2 +- ...ok-reference-on-Craft-Entity-removal.patch | 2 +- ...with-fastutil-s-ObjectOpenHashSet-in.patch | 2 +- ...imer-when-spawner-event-is-cancelled.patch | 2 +- ...dEffects-only-to-players-who-can-see.patch | 4 +- .../Shame-on-you-Mojang.patch | 2 +- .../Shoulder-Entities-Release-API.patch | 4 +- .../ShulkerBox-Dupe-Prevention.patch | 2 +- .../Speedup-BlockPos-by-fixing-inlining.patch | 4 +- .../String-based-Action-Bar-API.patch | 4 +- ...tem-property-for-disabling-watchdoge.patch | 2 +- .../Tameable-getOwnerUniqueId-API.patch | 4 +- ...r-crits-helps-mitigate-hacked-client.patch | 4 +- ...ed-flag-on-cancel-of-Explosion-Event.patch | 2 +- ...ams-to-redirect-System.out-err-to-lo.patch | 4 +- ...oleAppender-for-console-improvements.patch | 26 +++++------ .../Use-asynchronous-Log4j-2-loggers.patch | 4 +- .../Vehicle-Event-Cancellation-Changes.patch | 43 ------------------ Spigot-Server-Patches/Vex-getOwner-API.patch | 4 +- .../WitchConsumePotionEvent.patch | 2 +- .../WitchReadyPotionEvent.patch | 2 +- .../WitchThrowPotionEvent.patch | 2 +- ...-more-information-to-Entity.toString.patch | 2 +- .../getPlayerUniqueId-API.patch | 2 +- .../handle-PacketPlayInKeepAlive-async.patch | 2 +- ...urable-option-to-disable-creeper-lin.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 2 +- ...rt-serverside-behavior-of-keepalives.patch | 2 +- ...e-implementations-for-captured-block.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 213 files changed, 443 insertions(+), 531 deletions(-) delete mode 100644 Spigot-API-Patches/Made-EntityDismountEvent-Cancellable.patch delete mode 100644 Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch diff --git a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch index 6f0cc01a1e..b522275490 100644 --- a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch @@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index 44a8b2a5..c176dd7b 100644 +index bfe580f1..5167f5b9 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Expose-server-CommandMap.patch b/Spigot-API-Patches/Expose-server-CommandMap.patch index 6a8a1c521f..3974cca48b 100644 --- a/Spigot-API-Patches/Expose-server-CommandMap.patch +++ b/Spigot-API-Patches/Expose-server-CommandMap.patch @@ -39,7 +39,7 @@ index f3252e20..a291ebd6 100644 { return server.spigot(); diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index eb98c600..2b43ac1f 100644 +index e6a5cd2a..901199e3 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ import org.bukkit.boss.BarColor; diff --git a/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch index cf4135aae0..77a270be9e 100644 --- a/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues. diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java -index 1ed8f7e4..bd5238ce 100644 +index 43239f84..fe8d3468 100644 --- a/src/main/java/org/bukkit/NamespacedKey.java +++ b/src/main/java/org/bukkit/NamespacedKey.java @@ -0,0 +0,0 @@ public final class NamespacedKey { diff --git a/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 73b10c7e07..b359bc248d 100644 --- a/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -37,7 +37,7 @@ index a291ebd6..0844862c 100644 * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 2b43ac1f..d8ce8173 100644 +index 901199e3..1ad2cba4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/Made-EntityDismountEvent-Cancellable.patch b/Spigot-API-Patches/Made-EntityDismountEvent-Cancellable.patch deleted file mode 100644 index 1c808cfeec..0000000000 --- a/Spigot-API-Patches/Made-EntityDismountEvent-Cancellable.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nik Gil -Date: Mon, 29 Feb 2016 19:42:10 -0600 -Subject: [PATCH] Made EntityDismountEvent Cancellable - - -diff --git a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java -index 24d4942a..ce989bb1 100644 ---- a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java -+++ b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java -@@ -0,0 +0,0 @@ - package org.spigotmc.event.entity; - - import org.bukkit.entity.Entity; -+import org.bukkit.event.Cancellable; - import org.bukkit.event.HandlerList; - import org.bukkit.event.entity.EntityEvent; - -@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityEvent; - * Called when an entity stops riding another entity. - * - */ --public class EntityDismountEvent extends EntityEvent -+public class EntityDismountEvent extends EntityEvent implements Cancellable // Paper - implement Cancellable - { - - private static final HandlerList handlers = new HandlerList(); -@@ -0,0 +0,0 @@ public class EntityDismountEvent extends EntityEvent - { - return handlers; - } -+ -+ // Paper start - Implement cancellable methods -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancelled) { -+ this.cancelled = cancelled; -+ } -+ // Paper end - } --- \ No newline at end of file diff --git a/Spigot-API-Patches/Profile-Lookup-Events.patch b/Spigot-API-Patches/Profile-Lookup-Events.patch index bf98024b4a..68103b02a1 100644 --- a/Spigot-API-Patches/Profile-Lookup-Events.patch +++ b/Spigot-API-Patches/Profile-Lookup-Events.patch @@ -7,7 +7,7 @@ Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in p profiles that had to be looked up. diff --git a/pom.xml b/pom.xml -index bd9146dd..44a8b2a5 100644 +index a58d4424..bfe580f1 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Use-ASM-for-event-executors.patch b/Spigot-API-Patches/Use-ASM-for-event-executors.patch index ed93a1e2ab..73e14cf556 100644 --- a/Spigot-API-Patches/Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/Use-ASM-for-event-executors.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. diff --git a/pom.xml b/pom.xml -index 5e2024ca..bd9146dd 100644 +index a8a87820..a58d4424 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/getPlayerUniqueId-API.patch b/Spigot-API-Patches/getPlayerUniqueId-API.patch index e3ac8df614..d9be924f69 100644 --- a/Spigot-API-Patches/getPlayerUniqueId-API.patch +++ b/Spigot-API-Patches/getPlayerUniqueId-API.patch @@ -34,7 +34,7 @@ index 01a226d9..b389677a 100644 * Gets the plugin manager for interfacing with plugins. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index e7aab4bb..17ac4241 100644 +index 6c96fc14..f5aee1c5 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch index eb8053b10e..f5788b09cb 100644 --- a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 2cfe2202e..909432d51 100644 +index 9ad14417e3..3e9b357c87 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -39,7 +39,7 @@ index 2cfe2202e..909432d51 100644 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index bbf7b5088..c94b5c817 100644 +index 698d044a8d..9514968b07 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -0,0 +0,0 @@ public class CraftBlock implements Block { @@ -64,7 +64,7 @@ index bbf7b5088..c94b5c817 100644 switch (material) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 0558cafe3..d4d9c5fc5 100644 +index 0558cafe31..d4d9c5fc50 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 CraftBlockState @@ -114,7 +114,7 @@ index 0558cafe3..d4d9c5fc5 100644 private T createSnapshot(T tileEntity, World world) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java -index 7a8d44529..97b4e6910 100644 +index 7a8d445299..97b4e6910d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java @@ -0,0 +0,0 @@ public class CraftSign extends CraftBlockEntityState implements diff --git a/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch index 2420410f17..eac18acca0 100644 --- a/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch @@ -10,7 +10,7 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java -index 3204d94c5..e4ed9e206 100644 +index 3204d94c54..e4ed9e2066 100644 --- a/src/main/java/net/minecraft/server/EnchantmentManager.java +++ b/src/main/java/net/minecraft/server/EnchantmentManager.java @@ -0,0 +0,0 @@ public class EnchantmentManager { @@ -22,7 +22,7 @@ index 3204d94c5..e4ed9e206 100644 List list = enchantment.a(entityliving); diff --git a/src/main/java/net/minecraft/server/Enchantments.java b/src/main/java/net/minecraft/server/Enchantments.java -index 0f4aad20f..3a5263fd9 100644 +index 0f4aad20fe..3a5263fd9f 100644 --- a/src/main/java/net/minecraft/server/Enchantments.java +++ b/src/main/java/net/minecraft/server/Enchantments.java @@ -0,0 +0,0 @@ public class Enchantments { @@ -35,7 +35,7 @@ index 0f4aad20f..3a5263fd9 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index a87ef5fb8..b8bfc7577 100644 +index a87ef5fb8c..b8bfc75771 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @@ -52,7 +52,7 @@ index a87ef5fb8..b8bfc7577 100644 return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 43e357e39..7021a81be 100644 +index 23200bb597..9f69000cb2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index f235d77096..2eed5e36f4 100644 --- a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 7dbc6f437..02bbb0d1d 100644 +index ae10cd89c1..a721eb30e9 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Activation-Range-Improvements.patch b/Spigot-Server-Patches/Activation-Range-Improvements.patch index 034b01015c..a53df3172b 100644 --- a/Spigot-Server-Patches/Activation-Range-Improvements.patch +++ b/Spigot-Server-Patches/Activation-Range-Improvements.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Activation Range Improvements Fixes and adds new Immunities to improve gameplay behavior diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java -index b34756769..53b25dd80 100644 +index b347567699..53b25dd805 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -18,7 +18,7 @@ index b34756769..53b25dd80 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 8dbff3c37..3da4bc356 100644 +index 8dbff3c370..3da4bc356a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -31,7 +31,7 @@ index 8dbff3c37..3da4bc356 100644 protected int ticksFarFromPlayer; protected float aZ; diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index bb86ecb2f..5cd8c3f28 100644 +index bb86ecb2fb..5cd8c3f288 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java @@ -0,0 +0,0 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn @@ -43,7 +43,7 @@ index bb86ecb2f..5cd8c3f28 100644 return this.bQ != null; } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java -index a146a8b45..a19853463 100644 +index a146a8b459..a19853463c 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoal.java +++ b/src/main/java/net/minecraft/server/PathfinderGoal.java @@ -0,0 +0,0 @@ public abstract class PathfinderGoal { @@ -59,7 +59,7 @@ index a146a8b45..a19853463 100644 public void e() {} diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java -index d5c08aa7c..fe6570c88 100644 +index d5c08aa7cb..fe6570c88d 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -99,7 +99,7 @@ index d5c08aa7c..fe6570c88 100644 } } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index e02647f80..cdbf769e7 100644 +index e02647f806..cdbf769e7b 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityFireball; diff --git a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch index 8a47eb2129..b72c9056b2 100644 --- a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index cf11a2225..578d96640 100644 +index cf11a2225b..578d966401 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -31,7 +31,7 @@ index cf11a2225..578d96640 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -index 2b66a08ad..8a06cb165 100644 +index 2b66a08ade..8a06cb1656 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -0,0 +0,0 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { diff --git a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch index fc9960d5a6..e74548e54f 100644 --- a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch @@ -13,7 +13,7 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 1cdbdf6d0..da109e35a 100644 +index 1cdbdf6d07..da109e35a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { @@ -26,7 +26,7 @@ index 1cdbdf6d0..da109e35a 100644 case CHEST: case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index cadff64bf..b1e0d6185 100644 +index cadff64bfb..b1e0d61856 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 { @@ -40,7 +40,7 @@ index cadff64bf..b1e0d6185 100644 case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java new file mode 100644 -index 000000000..30941c7b0 +index 0000000000..30941c7b0c --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +0,0 @@ @@ -354,7 +354,7 @@ index 000000000..30941c7b0 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 86c61abe4..c48911d00 100644 +index f1430d226f..a3f293e4cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @@ -383,7 +383,7 @@ index 86c61abe4..c48911d00 100644 } return HANDLED_TAGS; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index f66cc81d9..eb6cf1bb3 100644 +index f66cc81d9e..eb6cf1bb33 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -0,0 +0,0 @@ import static org.hamcrest.Matchers.*; diff --git a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 1ed6586300..0d5cede95a 100644 --- a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0e0dc72f0..d725bf13e 100644 +index 47ce5cda76..b308f44168 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -18,7 +18,7 @@ index 0e0dc72f0..d725bf13e 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index fcb5f68f8..013f4eef5 100644 +index b048343b7c..747d99dbe6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Add-EntityZapEvent.patch b/Spigot-Server-Patches/Add-EntityZapEvent.patch index 9b2fd3fe4b..f95c728d04 100644 --- a/Spigot-Server-Patches/Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/Add-EntityZapEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index 286382399f..2c7677b480 100644 +index 34b6b01a30..670f26c827 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -0,0 +0,0 @@ public class EntityPig extends EntityAnimal { @@ -22,7 +22,7 @@ index 286382399f..2c7677b480 100644 if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { return; diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 6c66f7deb5..f14d118427 100644 +index 32893a32c9..45df38bad4 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { diff --git a/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch index 49c9fb88c6..15193bf772 100644 --- a/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 0dcafdbcc..a4026d64a 100644 +index b596a616fe..999a02cad3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ @@ -30,7 +30,7 @@ index 0dcafdbcc..a4026d64a 100644 if (!itemstack.isEmpty()) { this.getAttributeMap().a(itemstack.a(enumitemslot)); diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java -index cdf3a3ba4..be5d0bf89 100644 +index cdf3a3ba4a..be5d0bf898 100644 --- a/src/main/java/net/minecraft/server/EnumItemSlot.java +++ b/src/main/java/net/minecraft/server/EnumItemSlot.java @@ -0,0 +0,0 @@ public enum EnumItemSlot { diff --git a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch index 6064e1726c..b3e68188d8 100644 --- a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index b20cab58b..1bfe9d0e7 100644 +index b20cab58b1..1bfe9d0e7a 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -17,7 +17,7 @@ index b20cab58b..1bfe9d0e7 100644 super.cH(); this.a(StatisticList.JUMP); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 932eeb19d..7465c548a 100644 +index 932eeb19db..7465c548af 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; diff --git a/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch index 91d4190fd6..30f13cbd14 100644 --- a/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch @@ -46,7 +46,7 @@ index 3e3619d79f..58cc4824cf 100644 this.a(movingobjectposition); diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 8630184d4b..7440e4a2a9 100644 +index 4f801e8fec..1804a49de9 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { diff --git a/Spigot-Server-Patches/Add-SentientNPC-Interface-to-Entities.patch b/Spigot-Server-Patches/Add-SentientNPC-Interface-to-Entities.patch index 84faabaaca..6b1ca8304f 100644 --- a/Spigot-Server-Patches/Add-SentientNPC-Interface-to-Entities.patch +++ b/Spigot-Server-Patches/Add-SentientNPC-Interface-to-Entities.patch @@ -14,7 +14,7 @@ This interface lets you identify NPC entities capable of sentience, and able to diff --git a/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java b/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java new file mode 100644 -index 000000000..a60ba1349 +index 0000000000..a60ba13495 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java @@ -0,0 +0,0 @@ @@ -44,7 +44,7 @@ index 000000000..a60ba1349 + +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java -index 086980e76..ccce080ab 100644 +index 086980e76d..ccce080ab8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java @@ -0,0 +0,0 @@ @@ -62,7 +62,7 @@ index 086980e76..ccce080ab 100644 super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java -index cc115cc36..3a4e6f0c7 100644 +index cc115cc368..3a4e6f0c7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java @@ -0,0 +0,0 @@ @@ -89,7 +89,7 @@ index cc115cc36..3a4e6f0c7 100644 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java -index 09d42141f..30004e5e8 100644 +index 09d42141fb..30004e5e8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java @@ -0,0 +0,0 @@ @@ -124,7 +124,7 @@ index 09d42141f..30004e5e8 100644 @Override public EntityCreature getHandle() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java -index f374c7b88..9e6f523bf 100644 +index f374c7b880..9e6f523bf1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java @@ -0,0 +0,0 @@ @@ -141,7 +141,7 @@ index f374c7b88..9e6f523bf 100644 public CraftFlying(CraftServer server, EntityFlying entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java -index 6bf30c834..3768b9573 100644 +index 6bf30c834c..3768b9573a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch b/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch index fd38d65a09..a4961e16ea 100644 --- a/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch @@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo which commonly cause rate limit issues with Mojang API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 52de1439e..960ae59ae 100644 +index 52de1439e7..960ae59ae1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory; diff --git a/Spigot-Server-Patches/Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/Add-UnknownCommandEvent.patch index c2a10e9afb..23a3cf9723 100644 --- a/Spigot-Server-Patches/Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/Add-UnknownCommandEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9fe7c6a0d..69cfe5c4d 100644 +index 21d9f381cc..814a65ec58 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.Versioning; diff --git a/Spigot-Server-Patches/Add-async-chunk-load-API.patch b/Spigot-Server-Patches/Add-async-chunk-load-API.patch index be6b17b1f9..11b39fd430 100644 --- a/Spigot-Server-Patches/Add-async-chunk-load-API.patch +++ b/Spigot-Server-Patches/Add-async-chunk-load-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add async chunk load API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0f4a894eb..995e02f1d 100644 +index 0f4a894ebb..995e02f1d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch index 8b9cc83b6f..02e7b1eec2 100644 --- a/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add config to disable ender dragon legacy check diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ef4bfb480..1607619bd 100644 +index ef4bfb480c..1607619bd0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index ef4bfb480..1607619bd 100644 + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index a20d54ee3..48bcda0f5 100644 +index a20d54ee34..48bcda0f50 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java @@ -0,0 +0,0 @@ public class EnderDragonBattle { diff --git a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch index 8512e69ae1..b8ab894ebf 100644 --- a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ea6fcb39f..dbafef023 100644 +index ea6fcb39f4..dbafef023e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -20,7 +20,7 @@ index ea6fcb39f..dbafef023 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d7247a1ec..ff9346023 100644 +index d7247a1ec9..ff93460235 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch index 03541fcd23..7971fe0eed 100644 --- a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 9e2fc4947..4b9ecb4a6 100644 +index 9e2fc4947c..4b9ecb4a62 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/Spigot-Server-Patches/Add-missing-coverages-for-getTileEntity-in-order-to-.patch b/Spigot-Server-Patches/Add-missing-coverages-for-getTileEntity-in-order-to-.patch index 1a8d000671..864ede83d9 100644 --- a/Spigot-Server-Patches/Add-missing-coverages-for-getTileEntity-in-order-to-.patch +++ b/Spigot-Server-Patches/Add-missing-coverages-for-getTileEntity-in-order-to-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e766e2536..c5da2cde3 100644 +index 8f6ce6bf1a..5d5f6f6328 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch index cd341a5d53..e40e6f63fe 100644 --- a/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -11,7 +11,7 @@ I suspect Mojang may switch to this behavior before full release. To be converted into a Paper-API event at some point in the future? diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0b748d402..99fe720e8 100644 +index 0b748d402b..99fe720e8b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -26,7 +26,7 @@ index 0b748d402..99fe720e8 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 83bfb6611..0486dee2c 100644 +index 06b663c4db..42c6249535 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -39,7 +39,7 @@ index 83bfb6611..0486dee2c 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index aa93b5945..383ef87ba 100644 +index 62b7d86e17..932eeb19db 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch b/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch index 2d774ebe2a..5bb46349f1 100644 --- a/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch +++ b/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to remove invalid statistics diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 459c86bce..ea6fcb39f 100644 +index 459c86bce2..ea6fcb39f4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -23,7 +23,7 @@ index 459c86bce..ea6fcb39f 100644 + } } diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java -index 172f72fd8..7ba12c23d 100644 +index 07e7db455b..34c57e26f4 100644 --- a/src/main/java/net/minecraft/server/ServerStatisticManager.java +++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java @@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager { diff --git a/Spigot-Server-Patches/Add-server-name-parameter.patch b/Spigot-Server-Patches/Add-server-name-parameter.patch index 24c6033abc..c5e4f2f8e4 100644 --- a/Spigot-Server-Patches/Add-server-name-parameter.patch +++ b/Spigot-Server-Patches/Add-server-name-parameter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 38e696aa9..c552c624e 100644 +index 38e696aa94..c552c624e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch index 81493469cd..6daad77b81 100644 --- a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add setting for proxy online mode status diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 011cbf5e3..cf06f8ac3 100644 +index 011cbf5e31..cf06f8ac3c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -19,7 +19,7 @@ index 011cbf5e3..cf06f8ac3 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index f13534917..85c7a96c5 100644 +index f135349174..85c7a96c5a 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -0,0 +0,0 @@ public class NameReferencingFileConverter { @@ -33,7 +33,7 @@ index f13534917..85c7a96c5 100644 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7cb795dd8..e125632ff 100644 +index 7cb795dd89..e125632ffe 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch b/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch index 127ef2e57f..00b7a71dad 100644 --- a/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch +++ b/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch @@ -11,7 +11,7 @@ to make books with as much data as they want. Do not use this without limiting incoming data from packets in some other way. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 6ff1a2dcd..64a939952 100644 +index 6ff1a2dcd6..64a9399527 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -0,0 +0,0 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { diff --git a/Spigot-Server-Patches/Additional-Paper-Config-options.patch b/Spigot-Server-Patches/Additional-Paper-Config-options.patch index bb14fd471c..20159c87b8 100644 --- a/Spigot-Server-Patches/Additional-Paper-Config-options.patch +++ b/Spigot-Server-Patches/Additional-Paper-Config-options.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional Paper Config options Have to keep as sep patch for now until 1.13, otherwise we can't merge :/ diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 62bce1806..5a17ce3d2 100644 +index 62bce18061..5a17ce3d22 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -21,7 +21,7 @@ index 62bce1806..5a17ce3d2 100644 if (verbose) { Bukkit.getLogger().info(s); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 692206127..7bd7aa0d9 100644 +index 6922061276..7bd7aa0d94 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ import org.bukkit.configuration.file.YamlConfiguration; diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch index bb3c87a464..6f92d64557 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e125632ff..d7247a1ec 100644 +index e125632ffe..d7247a1ec9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch index 14f999bcb4..8a681e0f60 100644 --- a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,7 +8,7 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1afb480f8..f7eaecb3f 100644 +index 1afb480f86..f7eaecb3fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch index 6f93ac83cf..5771e1d9ed 100644 --- a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index dbafef023..ec89ecfca 100644 +index dbafef023e..ec89ecfcae 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ @@ -27,7 +27,7 @@ index dbafef023..ec89ecfca 100644 + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index bab13a4fd..d0e719f44 100644 +index 85eff6e2dd..3464af6791 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { diff --git a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch index a130f9cabb..7bf8bb8d74 100644 --- a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index cb9f25e96..c0249933b 100644 +index 619f020ba4..5778bf1c65 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -24,8 +24,8 @@ index cb9f25e96..c0249933b 100644 - PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); + // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async // CraftBukkit start - if (chatSpamField.addAndGet(this, 5) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) { -- this.disconnect(new ChatMessage("disconnect.spam", new Object[0])); + if (chatSpamField.addAndGet(this, 2) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) { + this.disconnect(new ChatMessage("disconnect.spam", new Object[0])); + minecraftServer.postToMainThread(() -> this.disconnect(new ChatMessage("disconnect.spam", new Object[0]))); // Paper return; } @@ -85,7 +85,7 @@ index cb9f25e96..c0249933b 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 202c6c492..c74831b3d 100644 +index 202c6c4927..c74831b3d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -98,7 +98,7 @@ index 202c6c492..c74831b3d 100644 return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions(); diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java -index 1e3aae3b8..95d13c146 100644 +index 1e3aae3b8f..95d13c146b 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -0,0 +0,0 @@ public class ConsoleCommandCompleter implements Completer { diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index 642786710f..d5ded57554 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -12,7 +12,7 @@ Re-introduce a cap per tick for auto save (Spigot disabled the vanilla cap) and Adds incremental player auto saving too diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 621c585e7..459c86bce 100644 +index 621c585e7e..459c86bce2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -32,7 +32,7 @@ index 621c585e7..459c86bce 100644 + } } diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0e6c18b32..c182ceffb 100644 +index 0e6c18b327..c182ceffb1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ package com.destroystokyo.paper; @@ -64,7 +64,7 @@ index 0e6c18b32..c182ceffb 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index c27073d27..06d6814b8 100644 +index c27073d27c..06d6814b83 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -96,7 +96,7 @@ index c27073d27..06d6814b8 100644 public boolean isEmpty() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4f9ece9e4..afeb0685b 100644 +index 4f9ece9e47..afeb0685b0 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ @@ -116,7 +116,7 @@ index 4f9ece9e4..afeb0685b 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 982e18f8a..1879c3238 100644 +index 982e18f8af..1879c32381 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -128,7 +128,7 @@ index 982e18f8a..1879c3238 100644 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5f17ec1e9..94df23c31 100644 +index 5f17ec1e9d..94df23c31f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -175,7 +175,7 @@ index 5f17ec1e9..94df23c31 100644 this.methodProfiler.a("snooper"); if (getSnooperEnabled() && !this.j.d() && this.ticks > 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d0c547cc9..12f6812d6 100644 +index d0c547cc99..12f6812d67 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -214,7 +214,7 @@ index d0c547cc9..12f6812d6 100644 public WhiteList getWhitelist() { return this.whitelist; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 96002184b..bf07155bc 100644 +index 96002184bb..bf07155bc1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch index c973e7e7d5..760848668a 100644 --- a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f5fae7ba8..dc32dc80d 100644 +index 1879c32381..b76c28147b 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch b/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch index ed730d0769..f3bcfc1eb2 100644 --- a/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch +++ b/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch @@ -10,7 +10,7 @@ to the object directly on the Entity/TileEntity object we can directly grab. Use that local value instead to reduce lookups in many hot places. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9e798038b..03afa1236 100644 +index 7a7d656926..b37fa3829b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -22,7 +22,7 @@ index 9e798038b..03afa1236 100644 this.a(entity, entity.af); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d8ce3efc9..35db0e184 100644 +index 00eb342f8c..127dcedc97 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch b/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch index c09f489930..4d46073a4c 100644 --- a/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch +++ b/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Avoid NPE in PathfinderGoalTempt diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java -index 154202700..64b1ac71b 100644 +index 8ca996e652..1b82479418 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java @@ -0,0 +0,0 @@ public class PathfinderGoalTempt extends PathfinderGoal { diff --git a/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch b/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch index 8c4cc73e2b..56ab77091c 100644 --- a/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch +++ b/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Avoid blocking on Network Manager creation Per Paper issue 294 diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index be8d07f41..9808561eb 100644 +index be8d07f41e..9808561eb3 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java +++ b/src/main/java/net/minecraft/server/ServerConnection.java @@ -0,0 +0,0 @@ public class ServerConnection { diff --git a/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch index 7f2dba8f75..ae4a52d773 100644 --- a/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch +++ b/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index d232bab74..b0f22f8f0 100644 +index d232bab745..b0f22f8f09 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index 9b38e51eca..c2bf6924f7 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -7,7 +7,7 @@ Establishes base extension of profile systems for future edits too diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java new file mode 100644 -index 000000000..9ad5853de +index 0000000000..9ad5853de3 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java @@ -0,0 +0,0 @@ @@ -294,7 +294,7 @@ index 000000000..9ad5853de +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java new file mode 100644 -index 000000000..25836b975 +index 0000000000..25836b975b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java @@ -0,0 +0,0 @@ @@ -330,7 +330,7 @@ index 000000000..25836b975 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java new file mode 100644 -index 000000000..3bcdb8f93 +index 0000000000..3bcdb8f93f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java @@ -0,0 +0,0 @@ @@ -353,7 +353,7 @@ index 000000000..3bcdb8f93 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java new file mode 100644 -index 000000000..4b2a67423 +index 0000000000..4b2a67423f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java @@ -0,0 +0,0 @@ @@ -388,7 +388,7 @@ index 000000000..4b2a67423 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java new file mode 100644 -index 000000000..3aceb0ea8 +index 0000000000..3aceb0ea8a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java @@ -0,0 +0,0 @@ @@ -404,7 +404,7 @@ index 000000000..3aceb0ea8 + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 381542e0d..80927de08 100644 +index 381542e0d2..80927de08b 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -429,7 +429,7 @@ index 381542e0d..80927de08 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0808da26f..cdcc37592 100644 +index 0808da26f6..cdcc375923 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -450,7 +450,7 @@ index 0808da26f..cdcc37592 100644 return this.V; } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index a47a51a41..4c476f757 100644 +index a47a51a412..4c476f757c 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -0,0 +0,0 @@ public class UserCache { @@ -486,7 +486,7 @@ index a47a51a41..4c476f757 100644 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 814a65ec5..202c6c492 100644 +index 814a65ec58..202c6c4927 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/Spigot-Server-Patches/Block-Enderpearl-Travel-Exploit.patch b/Spigot-Server-Patches/Block-Enderpearl-Travel-Exploit.patch index 184f4b7f0d..26e7addb93 100644 --- a/Spigot-Server-Patches/Block-Enderpearl-Travel-Exploit.patch +++ b/Spigot-Server-Patches/Block-Enderpearl-Travel-Exploit.patch @@ -12,7 +12,7 @@ This disables that by not saving the thrower when the chunk is unloaded. This is mainly useful for survival servers that do not allow freeform teleporting. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b07ff9587..f1db4becd 100644 +index b07ff95871..f1db4becde 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -27,7 +27,7 @@ index b07ff9587..f1db4becd 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index fc8c0cab5..dd8af4be8 100644 +index fc8c0cab55..dd8af4be80 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -0,0 +0,0 @@ public abstract class EntityProjectile extends Entity implements IProjectile { diff --git a/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch index 188351af03..4c664ca8f4 100644 --- a/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch +++ b/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Block player logins during server shutdown diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index b6e829682..85eff6e2d 100644 +index b6e8296824..85eff6e2dd 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { diff --git a/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch index 2bdfec4ebd..fcfa133c65 100644 --- a/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch @@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 263ea953a..8b8b468f3 100644 +index 263ea953ad..8b8b468f39 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -0,0 +0,0 @@ public abstract class StructureGenerator @@ -23,7 +23,7 @@ index 263ea953a..8b8b468f3 100644 if (structurestart != StructureGenerator.a) { diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index ec5386fd5..08424a88b 100644 +index ec5386fd50..08424a88bf 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -0,0 +0,0 @@ public class WorldBorder { diff --git a/Spigot-Server-Patches/Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/Cache-user-authenticator-threads.patch index f00252fd4c..60863e3830 100644 --- a/Spigot-Server-Patches/Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/Cache-user-authenticator-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 2f6d79b03..89a11a496 100644 +index a22f4c55e9..b6e8296824 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { diff --git a/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch b/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch index 813fafcaa2..cb308d2eb6 100644 --- a/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch +++ b/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Call PaperServerListPingEvent for legacy pings diff --git a/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java new file mode 100644 -index 000000000..74c012fd4 +index 0000000000..74c012fd40 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java @@ -0,0 +0,0 @@ @@ -84,7 +84,7 @@ index 000000000..74c012fd4 + +} diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java -index 07c53f505..91acfceec 100644 +index 07c53f5057..91acfceec8 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -0,0 +0,0 @@ import java.net.InetSocketAddress; diff --git a/Spigot-Server-Patches/Call-PortalCreateEvent-for-exit-portals.patch b/Spigot-Server-Patches/Call-PortalCreateEvent-for-exit-portals.patch index da658b02ba..5cdbd487b6 100644 --- a/Spigot-Server-Patches/Call-PortalCreateEvent-for-exit-portals.patch +++ b/Spigot-Server-Patches/Call-PortalCreateEvent-for-exit-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call PortalCreateEvent for exit portals diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java -index 402d8d7d6..f36373450 100644 +index 402d8d7d63..f363734500 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java @@ -0,0 +0,0 @@ package net.minecraft.server; diff --git a/Spigot-Server-Patches/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch index d60d762cdd..053a5eae5b 100644 --- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch @@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped. You can set this to 0 to disable collisions. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5df8b1143..0b748d402 100644 +index 5df8b1143f..0b748d402b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -27,7 +27,7 @@ index 5df8b1143..0b748d402 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4bfc49076..8a04a801b 100644 +index 78b7b8be99..6db20aa75c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -39,7 +39,7 @@ index 4bfc49076..8a04a801b 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b25d4b714..f85da758d 100644 +index f9a76ce27c..3b4867bfc9 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch b/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch index 5fa5629844..2e0e1f7909 100644 --- a/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch +++ b/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch @@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing. Stats on current queue, how many was processed and how many were queued. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index a4c4a9486..4be7173bf 100644 +index a4c4a9486b..4be7173bf2 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -55,7 +55,7 @@ index a4c4a9486..4be7173bf 100644 return false; } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 859148cb8..ea8684747 100644 +index 859148cb86..ea8684747d 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/Chunk-registration-fixes.patch b/Spigot-Server-Patches/Chunk-registration-fixes.patch index 89bc9ea17c..9e975ee1df 100644 --- a/Spigot-Server-Patches/Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/Chunk-registration-fixes.patch @@ -8,7 +8,7 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 45ab70167..5d3378be0 100644 +index 45ab70167a..5d3378be0b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch b/Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch index 91bbcb5c42..97baaaefea 100644 --- a/Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch +++ b/Spigot-Server-Patches/Configurable-Allowance-of-Permanent-Chunk-Loaders.patch @@ -7,7 +7,7 @@ This disables the behavior that allows players to keep chunks permanently loaded by default and allows server operators to enable it if they wish. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ba6d5b7ff..b9f5f4905 100644 +index ba6d5b7ff5..b9f5f49055 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index ba6d5b7ff..b9f5f4905 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 70790386e..7f83ed51d 100644 +index 7d77c5fb31..fd8430a68f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch index 25df4670a8..d1eed51bea 100644 --- a/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch @@ -36,7 +36,7 @@ This change will result in some major changes to fishing formulas. I would love to see this change in Vanilla, so Mojang please pull :) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b602bbf12..62bce1806 100644 +index b602bbf122..62bce18061 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -53,7 +53,7 @@ index b602bbf12..62bce1806 100644 + } } diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java -index add618866..9f8e17b9d 100644 +index add618866b..9f8e17b9d3 100644 --- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java @@ -0,0 +0,0 @@ import java.util.Random; diff --git a/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch b/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch index bb13203952..e87fbb289b 100644 --- a/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch +++ b/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch @@ -10,7 +10,7 @@ player at their bed should it of became obstructed. Defaults to vanilla 1. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1607619bd..692206127 100644 +index 1607619bd0..6922061276 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -30,7 +30,7 @@ index 1607619bd..692206127 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockBed.java b/src/main/java/net/minecraft/server/BlockBed.java -index 6832eaac5..b9cb59fa7 100644 +index 6832eaac5d..b9cb59fa72 100644 --- a/src/main/java/net/minecraft/server/BlockBed.java +++ b/src/main/java/net/minecraft/server/BlockBed.java @@ -0,0 +0,0 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { diff --git a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch index 3e87d66a75..dc53ae91c0 100644 --- a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch @@ -9,7 +9,7 @@ Also allow turning off treasure maps all together as they can eat up Map ID's which are limited in quantity. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f64a5ef35..5df8b1143 100644 +index f64a5ef35f..5df8b1143f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -28,7 +28,7 @@ index f64a5ef35..5df8b1143 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index abfd9adbd..dcc14aa11 100644 +index 45df38bad4..e8fdf86250 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { diff --git a/Spigot-Server-Patches/Configurable-Chunks-Sends-per-Tick-setting.patch b/Spigot-Server-Patches/Configurable-Chunks-Sends-per-Tick-setting.patch index 64784cf3fa..e1528e60b0 100644 --- a/Spigot-Server-Patches/Configurable-Chunks-Sends-per-Tick-setting.patch +++ b/Spigot-Server-Patches/Configurable-Chunks-Sends-per-Tick-setting.patch @@ -8,7 +8,7 @@ Vanilla already had this limited, make it configurable. Limit how much exploration lags the server diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 605e84173..703642c0b 100644 +index 605e84173d..703642c0b6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -26,7 +26,7 @@ index 605e84173..703642c0b 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index bfe2d03a5..9fd07f859 100644 +index bfe2d03a57..9fd07f8596 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap { diff --git a/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch b/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch index ee7257fe4f..119dc6b1bb 100644 --- a/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch +++ b/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch @@ -13,7 +13,7 @@ This should result in no noticeable speed reduction in generation for servers no lagging, and let larger servers reduce this value according to their own desires. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 703642c0b..faa7597b3 100644 +index 703642c0b6..faa7597b35 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -33,7 +33,7 @@ index 703642c0b..faa7597b3 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 344b95233..fcd9f5491 100644 +index 344b95233f..fcd9f5491f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -53,7 +53,7 @@ index 344b95233..fcd9f5491 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 9fd07f859..e29aaab2d 100644 +index 9fd07f8596..e29aaab2da 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap { @@ -77,7 +77,7 @@ index 9fd07f859..e29aaab2d 100644 if (playerchunk1.a(flag)) { iterator1.remove(); diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java -index 9aaca21a7..f50d55c8e 100644 +index 9aaca21a79..f50d55c8ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java @@ -0,0 +0,0 @@ public class ChunkIOExecutor { @@ -92,7 +92,7 @@ index 9aaca21a7..f50d55c8e 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java -index 193c3621c..cf1258c55 100644 +index 193c3621c6..cf1258c559 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java +++ b/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java @@ -0,0 +0,0 @@ public final class AsynchronousExecutor { diff --git a/Spigot-Server-Patches/Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/Configurable-flying-kick-messages.patch index 039b8cf909..d03a245f52 100644 --- a/Spigot-Server-Patches/Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/Configurable-flying-kick-messages.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 2001175bf..621c585e7 100644 +index 2001175bf8..621c585e7e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -21,7 +21,7 @@ index 2001175bf..621c585e7 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a41fa05ee..1f2cfbc92 100644 +index 7baa679e16..fc4e927d67 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch index 4d5b706d22..c7e115331b 100644 --- a/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index cf06f8ac3..2001175bf 100644 +index cf06f8ac3c..2001175bf8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -23,7 +23,7 @@ index cf06f8ac3..2001175bf 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b17540ecb..a41fa05ee 100644 +index 9ec898d164..7baa679e16 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch index 800e85977d..bf8e670141 100644 --- a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 79df2c171..b07ff9587 100644 +index 79df2c171c..b07ff95871 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -20,7 +20,7 @@ index 79df2c171..b07ff9587 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index de1b6ac86..4aba5716c 100644 +index 5015bd0710..738ac8570c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch index 78d82c761d..10a04d2dde 100644 --- a/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,7 +17,7 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 321da3be3..0e6c18b32 100644 +index 321da3be35..0e6c18b327 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -40,7 +40,7 @@ index 321da3be3..0e6c18b32 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8da7e39ee..99421aca9 100644 +index acc21aec02..c27073d27c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -52,7 +52,7 @@ index 8da7e39ee..99421aca9 100644 public final int locZ; private boolean m; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index bac5c921b..4f9ece9e4 100644 +index bac5c921b6..4f9ece9e47 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -76,7 +76,7 @@ index bac5c921b..4f9ece9e4 100644 this.f.a(); this.chunkLoader.b(); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index ffff87dc0..344b95233 100644 +index ffff87dc03..344b95233f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -112,7 +112,7 @@ index ffff87dc0..344b95233 100644 return this.chunk != null; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 4d888d6d4..cf5c76a78 100644 +index 4d888d6d4f..cf5c76a78e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap { @@ -131,7 +131,7 @@ index 4d888d6d4..cf5c76a78 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f1c036aa6..95ec4f48f 100644 +index f1c036aa6a..95ec4f48f2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -150,7 +150,7 @@ index f1c036aa6..95ec4f48f 100644 this.methodProfiler.a(() -> { return String.valueOf(TileEntityTypes.a(tileentity.C())); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ff3558363..90e260f3b 100644 +index ff3558363b..90e260f3b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { @@ -163,7 +163,7 @@ index ff3558363..90e260f3b 100644 } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index a9b84fdec..e02647f80 100644 +index a9b84fdec4..e02647f806 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ public class ActivationRange diff --git a/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch index f69911b04b..19249837a2 100644 --- a/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch +++ b/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch @@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 424464d09..909ad36fb 100644 +index 61f9eb3e64..2272f1239b 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler> { diff --git a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch index 48dd25cb56..272a37fa77 100644 --- a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch @@ -25,7 +25,7 @@ index 6fc3b7621d..93486b4b82 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d378f1a9df..e16579116a 100644 +index 1870930f69..085f95dfe3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -37,7 +37,7 @@ index d378f1a9df..e16579116a 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 18dd06980f..ab64fb7872 100644 +index 574883462d..dd48c6af0c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch b/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch index 6d4eef574c..354749f321 100644 --- a/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch +++ b/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Disable Vanilla Chunk GC Bukkit has its own system for this. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 72b3a6d40..e766e2536 100644 +index bf07155bc1..8f6ce6bf1a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch b/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch index 627c592f62..2a30a18c72 100644 --- a/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch +++ b/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch @@ -11,7 +11,7 @@ log. Disable the logger prefix for these plugins so the messages show up correctly. diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 9f8334376..6711e6dff 100644 +index 9f8334376f..6711e6dff9 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Disable-ticking-of-snow-blocks.patch b/Spigot-Server-Patches/Disable-ticking-of-snow-blocks.patch index f9f44388ce..080096c61d 100644 --- a/Spigot-Server-Patches/Disable-ticking-of-snow-blocks.patch +++ b/Spigot-Server-Patches/Disable-ticking-of-snow-blocks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable ticking of snow blocks diff --git a/src/main/java/net/minecraft/server/BlockSnowBlock.java b/src/main/java/net/minecraft/server/BlockSnowBlock.java -index 0c8f9d37f..44ed65626 100644 +index 0c8f9d37fd..44ed656263 100644 --- a/src/main/java/net/minecraft/server/BlockSnowBlock.java +++ b/src/main/java/net/minecraft/server/BlockSnowBlock.java @@ -0,0 +0,0 @@ public class BlockSnowBlock extends Block { diff --git a/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch index 0e864cd769..1e469cc2aa 100644 --- a/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 578d96640..e9a746f13 100644 +index 578d966401..e9a746f138 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -20,7 +20,7 @@ index 578d96640..e9a746f13 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3b4867bfc..b596a616f 100644 +index 3b4867bfc9..b596a616fe 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Do-not-load-chunks-for-pathfinding.patch b/Spigot-Server-Patches/Do-not-load-chunks-for-pathfinding.patch index 06d7f634eb..2c7b523d45 100644 --- a/Spigot-Server-Patches/Do-not-load-chunks-for-pathfinding.patch +++ b/Spigot-Server-Patches/Do-not-load-chunks-for-pathfinding.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not load chunks for pathfinding diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java -index 6d153e431..07444a86a 100644 +index 6d153e4311..07444a86ac 100644 --- a/src/main/java/net/minecraft/server/ChunkCache.java +++ b/src/main/java/net/minecraft/server/ChunkCache.java @@ -0,0 +0,0 @@ public class ChunkCache implements IIBlockAccess { diff --git a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index b8e4e0d7d3..dcf79a6c68 100644 --- a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c7ef67a52..4bfc49076 100644 +index 167cbb2820..78b7b8be99 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch index b4d3472401..a2fa02261a 100644 --- a/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch +++ b/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't change the Entity Random seed for squids diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 70b251210..0114d585b 100644 +index 3099f6aa7a..2205932295 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { diff --git a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch index 6bb752ba1b..812c303166 100644 --- a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 34c617958..c7ef67a52 100644 +index e56f458ca9..167cbb2820 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -18,7 +18,7 @@ index 34c617958..c7ef67a52 100644 public int dimension; protected BlockPosition aq; diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 866f41980..8630184d4 100644 +index 7c119282b9..4f801e8fec 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { diff --git a/Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch index 43fc0778ac..df470bab95 100644 --- a/Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch +++ b/Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch @@ -13,7 +13,7 @@ This of course is undesirable, so just return the loaded side as "primary" and treat it as a single chest if the other sides are unloaded diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 1ad39aca3..7262c2b19 100644 +index 1ad39aca3b..7262c2b19f 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java @@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC diff --git a/Spigot-Server-Patches/Don-t-load-chunks-for-villager-door-checks.patch b/Spigot-Server-Patches/Don-t-load-chunks-for-villager-door-checks.patch index 7a006f8d5b..3ef7e8b6ec 100644 --- a/Spigot-Server-Patches/Don-t-load-chunks-for-villager-door-checks.patch +++ b/Spigot-Server-Patches/Don-t-load-chunks-for-villager-door-checks.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't load chunks for villager door checks This avoids villages spam loading chunks sync diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index dfcabb83a..22fe23e8e 100644 +index dfcabb83a1..22fe23e8ed 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -0,0 +0,0 @@ public class Village { diff --git a/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch index c99a5d8806..8f99825753 100644 --- a/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch +++ b/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index f8b7d695c..a47a51a41 100644 +index f8b7d695c6..a47a51a412 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -0,0 +0,0 @@ public class UserCache { diff --git a/Spigot-Server-Patches/Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch b/Spigot-Server-Patches/Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch index 92be296bd7..eb0f288af7 100644 --- a/Spigot-Server-Patches/Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch +++ b/Spigot-Server-Patches/Don-t-process-despawn-if-entity-is-in-a-chunk-schedu.patch @@ -12,7 +12,7 @@ keep it vanilla in behavior a player may teleport away, and trigger instant despawn diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9dc86e90d..c03eaf1e4 100644 +index 14d122b22b..7b64ec27c3 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch index 27c359e83c..0d3459a90c 100644 --- a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch +++ b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch @@ -8,7 +8,7 @@ the loadChunk method refuses to acknoledge they exists, and will restart a new chunk generation process to begin with, so saving them serves no benefit. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index fd8430a68..b425704b1 100644 +index fd8430a68f..b425704b1a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -30,7 +30,7 @@ index fd8430a68..b425704b1 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index ea8684747..a97e024ec 100644 +index ea8684747d..a97e024ec4 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch index 0a3de5d8d8..b0e9afaf09 100644 --- a/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch +++ b/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 430b5d0cd..011cbf5e3 100644 +index 430b5d0cdc..011cbf5e31 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -19,7 +19,7 @@ index 430b5d0cd..011cbf5e3 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java -index 0260fb7ec..45d8de1b7 100644 +index 0260fb7ec9..45d8de1b7b 100644 --- a/src/main/java/net/minecraft/server/PersistentScoreboard.java +++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java @@ -0,0 +0,0 @@ public class PersistentScoreboard extends PersistentBase { diff --git a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch index 73f559192b..a3d379929b 100644 --- a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch @@ -7,7 +7,7 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 56aa89b45..f98f93c5c 100644 +index dd47797724..a465f1cf79 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index bf2c04870c..1e2418ca28 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7bd7aa0d9..ba6d5b7ff 100644 +index 7bd7aa0d94..ba6d5b7ff5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -78,7 +78,7 @@ index 7bd7aa0d9..ba6d5b7ff 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b37fa3829..c56e435b1 100644 +index b37fa3829b..c56e435b19 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -147,7 +147,7 @@ index b37fa3829..c56e435b1 100644 this.world.a((Collection) entityslice); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index be3b1f096..6eceb1dce 100644 +index b308f44168..b6d6d4f378 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -159,7 +159,7 @@ index be3b1f096..6eceb1dce 100644 this.uniqueID = uuid; this.au = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 747d99dbe..7a9f28421 100644 +index 747d99dbe6..7a9f28421b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Enderman.teleportRandomly.patch b/Spigot-Server-Patches/Enderman.teleportRandomly.patch index 8fe49a2cbb..46688b038f 100644 --- a/Spigot-Server-Patches/Enderman.teleportRandomly.patch +++ b/Spigot-Server-Patches/Enderman.teleportRandomly.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Enderman.teleportRandomly() Ability to trigger the vanilla "teleport randomly" mechanic of an enderman. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index a766b3895..0f64c8f2b 100644 +index a766b38959..0f64c8f2b5 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -18,7 +18,7 @@ index a766b3895..0f64c8f2b 100644 double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D; double d1 = this.locY + (double) (this.random.nextInt(64) - 32); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java -index 5998530a8..f62ea821f 100644 +index 5998530a8f..f62ea821fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java @@ -0,0 +0,0 @@ public class CraftEnderman extends CraftMonster implements Enderman { diff --git a/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch index 4712b74597..da5c8f8cb6 100644 --- a/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch +++ b/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch @@ -8,7 +8,7 @@ Allow control over whether or not an enderman aggros a player. This allows you to override/extend the pumpkin/stare logic. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index df94b4ca9..f2fcba3d9 100644 +index 0f64c8f2b5..2db0eb4946 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { diff --git a/Spigot-Server-Patches/EndermanEscapeEvent.patch b/Spigot-Server-Patches/EndermanEscapeEvent.patch index 04f18ce326..1fbc449a60 100644 --- a/Spigot-Server-Patches/EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/EndermanEscapeEvent.patch @@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player You may cancel this, enabling ranged attacks to damage the enderman for example. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index ddf64ee6c..a766b3895 100644 +index ddf64ee6c5..a766b38959 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch b/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch index 67e25b793c..ddc074e93f 100644 --- a/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch +++ b/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch @@ -7,7 +7,7 @@ Unloading Chunks async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8b63192cf..86848543d 100644 +index 8b63192cf9..86848543d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch index 71e2f1c38b..e5eea373a3 100644 --- a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 12f6812d6..c8b5a610a 100644 +index 12f6812d67..c8b5a610aa 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Ensure-Chunks-never-ever-load-async.patch b/Spigot-Server-Patches/Ensure-Chunks-never-ever-load-async.patch index 884e9d93cc..23691eb737 100644 --- a/Spigot-Server-Patches/Ensure-Chunks-never-ever-load-async.patch +++ b/Spigot-Server-Patches/Ensure-Chunks-never-ever-load-async.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ensure Chunks never ever load async Safely pushes the operation to main thread, then back to the posting thread diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java -index 7b7a3d01b..9aaca21a7 100644 +index 7b7a3d01b9..9aaca21a79 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java @@ -0,0 +0,0 @@ import com.destroystokyo.paper.PaperConfig; @@ -27,7 +27,7 @@ index 7b7a3d01b..9aaca21a7 100644 public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) { diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -index 52a8c48fa..2bbd5a7e2 100644 +index 52a8c48fa4..2bbd5a7e2a 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java @@ -0,0 +0,0 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider> { @@ -99,7 +99,7 @@ index 5b0d83a1d..424464d09 100644 public NetworkManager(EnumProtocolDirection enumprotocoldirection) { this.h = enumprotocoldirection; diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java -index 7acdac55e..f1a3be69d 100644 +index 7acdac55e5..f1a3be69d0 100644 --- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java +++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java @@ -0,0 +0,0 @@ public class PacketHandshakingInSetProtocol implements Packet e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER protected World world; diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 939d8790f..335a4d27f 100644 +index c5164ca3f4..2591c2f0b2 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java @@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener { diff --git a/Spigot-Server-Patches/Fix-block-break-desync.patch b/Spigot-Server-Patches/Fix-block-break-desync.patch index b80c0fd376..fd06285685 100644 --- a/Spigot-Server-Patches/Fix-block-break-desync.patch +++ b/Spigot-Server-Patches/Fix-block-break-desync.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix block break desync diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f26636e30..aa93b5945 100644 +index 9ac86f7af2..62b7d86e17 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch index 0033217173..fdd5089de5 100644 --- a/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ab2bd6dae..067f7b990 100644 +index 5778bf1c65..5ee25d70fc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch index c364e3215f..59a1dbf8d0 100644 --- a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch @@ -9,7 +9,7 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 3245fded9..d4f6e009e 100644 +index 3245fded9b..d4f6e009e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch index bb437f1544..ecc186735b 100644 --- a/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c0b484177..60bc6d331 100644 +index 3c85d6323b..ab9956fa24 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/GH-806-Respect-saving-disabled-before-unloading-all-.patch b/Spigot-Server-Patches/GH-806-Respect-saving-disabled-before-unloading-all-.patch index e6ec849965..a8c7284393 100644 --- a/Spigot-Server-Patches/GH-806-Respect-saving-disabled-before-unloading-all-.patch +++ b/Spigot-Server-Patches/GH-806-Respect-saving-disabled-before-unloading-all-.patch @@ -9,7 +9,7 @@ This behavior causes a save to occur even though saving was supposed to be turne It's triggered when Hell/End worlds are empty of players. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index cf5c76a78..bfe2d03a5 100644 +index cf5c76a78e..bfe2d03a57 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap { diff --git a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch index 74541752a7..3dd803a596 100644 --- a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 68a59e708..ed714c2cc 100644 +index c973397898..e120521611 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import com.mojang.brigadier.StringReader; @@ -78,7 +78,7 @@ index 68a59e708..ed714c2cc 100644 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index d41459ef0..cadff64bf 100644 +index d41459ef01..cadff64bfb 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 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -204,7 +204,7 @@ index d41459ef0..cadff64bf 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 86ae0a4b6..86c61abe4 100644 +index b2190b01d4..f1430d226f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ import java.lang.reflect.Constructor; @@ -229,7 +229,7 @@ index 86ae0a4b6..86c61abe4 100644 +import java.util.TreeMap; import java.util.logging.Level; import java.util.logging.Logger; - import net.minecraft.server.NBTCompressedStreamTools; + import net.minecraft.server.ChatComponentText; @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { private IChatBaseComponent displayName; private IChatBaseComponent locName; diff --git a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch index f2962b357e..4acd5ff998 100644 --- a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index a93ed45df..bb32cb749 100644 +index a93ed45df9..bb32cb749d 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -28,7 +28,7 @@ index a93ed45df..bb32cb749 100644 diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 676780b61..5a873fe9d 100644 +index 676780b619..5a873fe9d7 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig @@ -41,7 +41,7 @@ index 676780b61..5a873fe9d 100644 public static int playerShuffle; diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 08b6bb7f9..9f8334376 100644 +index 08b6bb7f97..9f8334376f 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch b/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch index 6ba13cc9c0..add2e4a629 100644 --- a/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch +++ b/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors This code was causing NPE's in saving player data, potentially related to reloads. diff --git a/src/main/java/net/minecraft/server/RecipeBookServer.java b/src/main/java/net/minecraft/server/RecipeBookServer.java -index 71d6c4552..799f2be70 100644 +index 71d6c45529..799f2be707 100644 --- a/src/main/java/net/minecraft/server/RecipeBookServer.java +++ b/src/main/java/net/minecraft/server/RecipeBookServer.java @@ -0,0 +0,0 @@ public class RecipeBookServer extends RecipeBook { diff --git a/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch index c790b29ef0..b907344703 100644 --- a/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dffa42ba5..7cacbaffe 100644 +index eaab10a146..4455dc4891 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch index f57eceaaaf..85916f7f5e 100644 --- a/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index c3d30dc94..fd9be7574 100644 +index 888bbd7a45..c6632588eb 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -0,0 +0,0 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick diff --git a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch index e8f1311248..037ac188bd 100644 --- a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e8290759b..0f4a894eb 100644 +index e8290759bb..0f4a894ebb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch index d09322099c..72a2e588bb 100644 --- a/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch @@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 59d2685dc..27a264f54 100644 +index 59d2685dc8..27a264f549 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index 71c5e5bdea..92fcf8c811 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java new file mode 100644 -index 000000000..c1a8e295b +index 0000000000..c1a8e295b6 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java @@ -0,0 +0,0 @@ @@ -43,7 +43,7 @@ index 000000000..c1a8e295b +} diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java new file mode 100644 -index 000000000..a2a409e63 +index 0000000000..a2a409e635 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java @@ -0,0 +0,0 @@ @@ -60,7 +60,7 @@ index 000000000..a2a409e63 +} diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java new file mode 100644 -index 000000000..350410527 +index 0000000000..350410527b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java @@ -0,0 +0,0 @@ @@ -177,7 +177,7 @@ index 000000000..350410527 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cdcc37592..66b637326 100644 +index cdcc375923..66b637326a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -203,7 +203,7 @@ index cdcc37592..66b637326 100644 return this.s.getMaxPlayers(); } diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index c9edd289a..8aa121e2f 100644 +index c9edd289ac..8aa121e2f7 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -0,0 +0,0 @@ public class PacketStatusListener implements PacketStatusInListener { @@ -226,7 +226,7 @@ index c9edd289a..8aa121e2f 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index d7e1ecc03..f20cddc41 100644 +index d7e1ecc031..f20cddc41c 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -0,0 +0,0 @@ public class ServerPing { @@ -251,7 +251,7 @@ index d7e1ecc03..f20cddc41 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 5a873fe9d..42bd3b6ed 100644 +index 5a873fe9d7..42bd3b6edd 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch index 85e637f700..16918f6bcb 100644 --- a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch @@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 27a264f54..1cdbdf6d0 100644 +index 27a264f549..1cdbdf6d07 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index a628846576..17ac44177d 100644 --- a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -13,7 +13,7 @@ custom renderers are in use, defaulting to the much simpler Vanilla system. Additionally, numerous issues to player position tracking on maps has been fixed. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1aa32bf11..83bfb6611 100644 +index a47ef2ca50..06b663c4db 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -30,7 +30,7 @@ index 1aa32bf11..83bfb6611 100644 ItemStack itemstack1 = this.a(entityitem); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 6ae576a2e..af1981967 100644 +index 40e0bd7ce2..a04a06f3bf 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -0,0 +0,0 @@ public class EntityTrackerEntry { @@ -43,7 +43,7 @@ index 6ae576a2e..af1981967 100644 ItemStack itemstack = entityitemframe.getItem(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e5ecfdbf0..5102f24ed 100644 +index 46eab028d9..f1c036aa6a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -55,7 +55,7 @@ index e5ecfdbf0..5102f24ed 100644 } } diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index 445a016b7..4c64f90be 100644 +index 445a016b72..4c64f90be3 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java @@ -0,0 +0,0 @@ public class WorldMap extends PersistentBase { @@ -127,7 +127,7 @@ index 445a016b7..4c64f90be 100644 for ( org.bukkit.map.MapCursor cursor : render.cursors) { diff --git a/src/main/java/org/bukkit/craftbukkit/map/RenderData.java b/src/main/java/org/bukkit/craftbukkit/map/RenderData.java -index 256a13178..5768cd512 100644 +index 256a131781..5768cd512e 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/RenderData.java +++ b/src/main/java/org/bukkit/craftbukkit/map/RenderData.java @@ -0,0 +0,0 @@ import org.bukkit.map.MapCursor; diff --git a/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch index 275663c7b8..a86ff89218 100644 --- a/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ b/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 28b156e43..8ac599b7a 100644 +index 28b156e439..8ac599b7a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch b/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch index 0d2b41aea7..d983166db5 100644 --- a/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch +++ b/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch @@ -7,7 +7,7 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa and access their saddle state separately from an interface shared with Armor. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 14d041680..e56bef334 100644 +index 14d0416802..e56bef3340 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityHorseAbstract; @@ -27,7 +27,7 @@ index 14d041680..e56bef334 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java -index 173818e68..2f6852404 100644 +index 173818e682..2f68524049 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java @@ -0,0 +0,0 @@ import net.minecraft.server.IInventory; @@ -41,7 +41,7 @@ index 173818e68..2f6852404 100644 super(inventory); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java new file mode 100644 -index 000000000..99cfbaf90 +index 0000000000..99cfbaf90b --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch b/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch index e05a55d8e2..f825619cfd 100644 --- a/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch +++ b/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch @@ -32,7 +32,7 @@ operations are decoupled from the sync tasks queue. diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java new file mode 100644 -index 000000000..eaf869287 +index 0000000000..eaf8692877 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java @@ -0,0 +0,0 @@ @@ -164,7 +164,7 @@ index 000000000..eaf869287 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index a2fadaf82..223afc7ed 100644 +index a2fadaf82c..223afc7edc 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicReference; diff --git a/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch index f06c66f4a5..e16da13198 100644 --- a/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch +++ b/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Include Log4J2 SLF4J implementation diff --git a/pom.xml b/pom.xml -index bb32cb749..a319cfe3b 100644 +index bb32cb749d..a319cfe3b8 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index f38e4c6799..51cf6c2dd5 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 7a797bef0..7a7d65692 100644 +index 7a797bef0d..7a7d656926 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -29,7 +29,7 @@ index 7a797bef0..7a7d65692 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 738ac8570..14a61f68e 100644 +index 738ac8570c..14a61f68e1 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -56,7 +56,7 @@ index 738ac8570..14a61f68e 100644 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7059fc118..0c01f8daf 100644 +index 7059fc1187..0c01f8dafa 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -110,7 +110,7 @@ index 7059fc118..0c01f8daf 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 42bb86d31..2860df860 100644 +index 5ee25d70fc..fc47738ec5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -123,7 +123,7 @@ index 42bb86d31..2860df860 100644 this.player.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 45e42e998..7a2b219c6 100644 +index 45e42e9989..7a2b219c67 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -136,7 +136,7 @@ index 45e42e998..7a2b219c6 100644 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 4b9ecb4a6..b602a5d1b 100644 +index 4b9ecb4a62..b602a5d1b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -155,7 +155,7 @@ index 4b9ecb4a6..b602a5d1b 100644 public boolean isBlocking() { return getHandle().isBlocking(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ab9956fa2..0f3e1d5ae 100644 +index ab9956fa24..0f3e1d5ae1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -168,7 +168,7 @@ index ab9956fa2..0f3e1d5ae 100644 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 8ac599b7a..cf398cd25 100644 +index 8ac599b7a2..cf398cd250 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Item-canEntityPickup.patch b/Spigot-Server-Patches/Item-canEntityPickup.patch index 9f52c4a53f..667cd8d62b 100644 --- a/Spigot-Server-Patches/Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/Item-canEntityPickup.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index d29364b01..9dc86e90d 100644 +index 3723fd9770..14d122b22b 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -21,7 +21,7 @@ index d29364b01..9dc86e90d 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 4af09f5cd..f2a4476c5 100644 +index 4af09f5cdb..f2a4476c5c 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { @@ -33,7 +33,7 @@ index 4af09f5cd..f2a4476c5 100644 private UUID f; private UUID g; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index a17a537d6..1df17f09b 100644 +index a17a537d69..1df17f09bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -0,0 +0,0 @@ public class CraftItem extends CraftEntity implements Item { diff --git a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch index 4ee6dea78e..85e67d60dc 100644 --- a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index ca169e113..dad883054 100644 +index 023dd48a23..00691f6de9 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { @@ -18,7 +18,7 @@ index ca169e113..dad883054 100644 return this.getItem().c(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index b1e0d6185..03f611518 100644 +index b1e0d61856..03f6115181 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 { diff --git a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch index 31b3ec0554..c484912db4 100644 --- a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 4455dc489..8be1ba526 100644 +index 4455dc4891..8be1ba5269 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -32,7 +32,7 @@ index 4455dc489..8be1ba526 100644 return this.isHandRaised() ? this.activeItem.k() - this.cX() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a6f847e31..768bce141 100644 +index a6f847e313..768bce1411 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/LivingEntity-setKiller.patch b/Spigot-Server-Patches/LivingEntity-setKiller.patch index 620de166b9..8d06989576 100644 --- a/Spigot-Server-Patches/LivingEntity-setKiller.patch +++ b/Spigot-Server-Patches/LivingEntity-setKiller.patch @@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 506d0d4e48..460a050cce 100644 +index bd2d90349e..524cfd99b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Load-version-history-at-server-start.patch b/Spigot-Server-Patches/Load-version-history-at-server-start.patch index 4d46d091e0..9be7e37f5d 100644 --- a/Spigot-Server-Patches/Load-version-history-at-server-start.patch +++ b/Spigot-Server-Patches/Load-version-history-at-server-start.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Load version history at server start diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 927cbeedc..ae7a8c104 100644 +index 8c76300185..8e15710caf 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index 008156b51d..6ac5425cbb 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -11,7 +11,7 @@ This feature is good for long term worlds so that newer players do not suffer with "Every chest has been looted" diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0c50cb4bd..38de48ebc 100644 +index 0c50cb4bd6..38de48ebc2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -43,7 +43,7 @@ index 0c50cb4bd..38de48ebc 100644 } diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootable.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootable.java new file mode 100644 -index 000000000..36c36d158 +index 0000000000..36c36d158f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootable.java @@ -0,0 +0,0 @@ @@ -61,7 +61,7 @@ index 000000000..36c36d158 +} diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootableBlockInventory.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableBlockInventory.java new file mode 100644 -index 000000000..20d236c45 +index 0000000000..20d236c451 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableBlockInventory.java @@ -0,0 +0,0 @@ @@ -100,7 +100,7 @@ index 000000000..20d236c45 +} diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootableEntityInventory.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableEntityInventory.java new file mode 100644 -index 000000000..1150dee01 +index 0000000000..1150dee01e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableEntityInventory.java @@ -0,0 +0,0 @@ @@ -137,7 +137,7 @@ index 000000000..1150dee01 +} diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventory.java new file mode 100644 -index 000000000..668097620 +index 0000000000..668097620f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventory.java @@ -0,0 +0,0 @@ @@ -231,7 +231,7 @@ index 000000000..668097620 +} diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java new file mode 100644 -index 000000000..9a65603bc +index 0000000000..9a65603bcb --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java @@ -0,0 +0,0 @@ @@ -418,7 +418,7 @@ index 000000000..9a65603bc + } +} diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index 9ec73ac06..8bd7976f9 100644 +index 9ec73ac06a..8bd7976f97 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -540,7 +540,7 @@ index 9ec73ac06..8bd7976f9 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index fbda02b32..e6fc1ae92 100644 +index fbda02b321..e6fc1ae923 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java @@ -0,0 +0,0 @@ @@ -657,7 +657,7 @@ index fbda02b32..e6fc1ae92 100644 + } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index ac9b4297b..0558cafe3 100644 +index ac9b4297b2..0558cafe31 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 CraftBlockState @@ -670,7 +670,7 @@ index ac9b4297b..0558cafe3 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java -index 6a54f2a16..a94c78512 100644 +index 6a54f2a166..a94c785126 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -0,0 +0,0 @@ @@ -691,7 +691,7 @@ index 6a54f2a16..a94c78512 100644 public CraftChest(final Block block) { super(block, TileEntityChest.class); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java -index 1dc8bfecd..bfcf9b6c4 100644 +index 1dc8bfecd2..bfcf9b6c4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java @@ -0,0 +0,0 @@ @@ -711,7 +711,7 @@ index 1dc8bfecd..bfcf9b6c4 100644 public CraftDispenser(final Block block) { super(block, TileEntityDispenser.class); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java -index 6566554ab..df156d0d9 100644 +index 6566554ab6..df156d0d92 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java @@ -0,0 +0,0 @@ @@ -731,7 +731,7 @@ index 6566554ab..df156d0d9 100644 public CraftHopper(final Block block) { super(block, TileEntityHopper.class); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java -index c029a1244..c26f0b5af 100644 +index c029a12441..c26f0b5afc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java @@ -0,0 +0,0 @@ @@ -751,7 +751,7 @@ index c029a1244..c26f0b5af 100644 public CraftShulkerBox(final Block block) { super(block, TileEntityShulkerBox.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java -index 69435c457..4291edf25 100644 +index 69435c4576..4291edf252 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java @@ -0,0 +0,0 @@ @@ -771,7 +771,7 @@ index 69435c457..4291edf25 100644 public CraftMinecartChest(CraftServer server, EntityMinecartChest entity) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java -index e9963e21c..acb4dee04 100644 +index e9963e21cd..acb4dee04f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index dc55a3ffb9..74dc97db3c 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC Utils diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index c3e990bdf..e2a7b4be2 100644 +index c3e990bdff..e2a7b4be2c 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable { @@ -18,7 +18,7 @@ index c3e990bdf..e2a7b4be2 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 121a137f3..279045e49 100644 +index 121a137f3b..279045e499 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -54,7 +54,7 @@ index 121a137f3..279045e49 100644 return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 411ab6061..cd4fbee0c 100644 +index 411ab6061b..cd4fbee0ca 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ import com.google.common.collect.Lists; // CraftBukkit @@ -75,7 +75,7 @@ index 411ab6061..cd4fbee0c 100644 public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index 00a530c51..2947d9ff6 100644 +index 00a530c51c..2947d9ff6a 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java @@ -0,0 +0,0 @@ public class ChunkCoordIntPair { @@ -88,7 +88,7 @@ index 00a530c51..2947d9ff6 100644 return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index ca2a14d7a..9a513b4e3 100644 +index ca2a14d7ac..9a513b4e3a 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -131,7 +131,7 @@ index ca2a14d7a..9a513b4e3 100644 private boolean c = true; private boolean d = true; diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 3f0c5d7dd..68a59e708 100644 +index 1e27433b90..c973397898 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import org.bukkit.Location; @@ -161,7 +161,7 @@ index 3f0c5d7dd..68a59e708 100644 this.tag = nbttagcompound; } diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java -index a540167d6..add618866 100644 +index a540167d6d..add618866b 100644 --- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java @@ -0,0 +0,0 @@ public abstract class LotoSelectorEntry { @@ -180,7 +180,7 @@ index a540167d6..add618866 100644 } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 000000000..70cdc3f10 +index 0000000000..70cdc3f102 --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -477,7 +477,7 @@ index 000000000..70cdc3f10 + } +} diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java -index 8170a8428..e21e60b00 100644 +index 8170a84280..e21e60b003 100644 --- a/src/main/java/net/minecraft/server/NBTBase.java +++ b/src/main/java/net/minecraft/server/NBTBase.java @@ -0,0 +0,0 @@ public interface NBTBase { @@ -499,7 +499,7 @@ index 8170a8428..e21e60b00 100644 case 0: return "TAG_End"; diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java -index 1a81d8e5f..057c2077a 100644 +index 1a81d8e5f6..057c2077a0 100644 --- a/src/main/java/net/minecraft/server/NBTList.java +++ b/src/main/java/net/minecraft/server/NBTList.java @@ -0,0 +0,0 @@ public abstract class NBTList extends AbstractList impleme @@ -525,7 +525,7 @@ index 1a81d8e5f..057c2077a 100644 + public abstract NBTList clone(); // Paper - decompile fix } diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java -index 11ffa6c34..3ff3a2983 100644 +index 11ffa6c342..3ff3a29835 100644 --- a/src/main/java/net/minecraft/server/NBTTagByteArray.java +++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java @@ -0,0 +0,0 @@ public class NBTTagByteArray extends NBTList { @@ -539,7 +539,7 @@ index 11ffa6c34..3ff3a2983 100644 System.arraycopy(this.data, 0, abyte, 0, this.data.length); diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 7fc9b5ff3..e658816c2 100644 +index 7fc9b5ff32..e658816c24 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { @@ -575,7 +575,7 @@ index 7fc9b5ff3..e658816c2 100644 - } } diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java -index f5c9b97d5..d121ad4f7 100644 +index f5c9b97d5c..d121ad4f7a 100644 --- a/src/main/java/net/minecraft/server/NBTTagIntArray.java +++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java @@ -0,0 +0,0 @@ public class NBTTagIntArray extends NBTList { @@ -588,7 +588,7 @@ index f5c9b97d5..d121ad4f7 100644 } } diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index b3c944d70..a8280acf9 100644 +index b3c944d701..a8280acf94 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -626,7 +626,7 @@ index b3c944d70..a8280acf9 100644 - } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2f2f4c6c6..556989f60 100644 +index 2f2f4c6c60..556989f603 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -643,7 +643,7 @@ index 2f2f4c6c6..556989f60 100644 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index ef332d651..7cc7eb773 100644 +index ef332d6517..7cc7eb7735 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -0,0 +0,0 @@ import java.util.Iterator; @@ -665,7 +665,7 @@ index ef332d651..7cc7eb773 100644 this.c.set(i, t0); diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index 2179664a0..d7e1ecc03 100644 +index 2179664a0c..d7e1ecc031 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -0,0 +0,0 @@ public class ServerPing { diff --git a/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch b/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch index 938e4d6d25..99a8f8f01c 100644 --- a/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch +++ b/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch @@ -28,7 +28,7 @@ respond to the request. [2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13 diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java -index 41115108f..07c53f505 100644 +index 41115108f1..07c53f5057 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -0,0 +0,0 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter { diff --git a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch index dd2735e716..eb77802cc4 100644 --- a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch @@ -7,7 +7,7 @@ I don't know why upstream made only the minimum height configurable but whatever diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index faa7597b3..fddd52caf 100644 +index faa7597b35..fddd52caf7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index faa7597b3..fddd52caf 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index ffc6d0b68..70b251210 100644 +index 97de169de2..3099f6aa7a 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { diff --git a/Spigot-Server-Patches/Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/Make-player-data-saving-configurable.patch index db4ae77296..0ccd441372 100644 --- a/Spigot-Server-Patches/Make-player-data-saving-configurable.patch +++ b/Spigot-Server-Patches/Make-player-data-saving-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make player data saving configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ec89ecfca..b602bbf12 100644 +index ec89ecfcae..b602bbf122 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -23,7 +23,7 @@ index ec89ecfca..b602bbf12 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index a562e1e46..cbfdb3cf7 100644 +index a562e1e46c..cbfdb3cf79 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -0,0 +0,0 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { diff --git a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch index 8bfbbbb2cc..b19bf1a16a 100644 --- a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f1db4becd..ef4bfb480 100644 +index f1db4becde..ef4bfb480c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index f1db4becd..ef4bfb480 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 999a02cad..eaab10a14 100644 +index 999a02cad3..eaab10a146 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -49,7 +49,7 @@ index 999a02cad..eaab10a14 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 524cfd99b..a6f847e31 100644 +index 524cfd99b7..a6f847e313 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 1d9b8f94e5..92c0453269 100644 --- a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4be7173bf..7d77c5fb3 100644 +index 4be7173bf2..7d77c5fb31 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch index eb0c623a2d..7c0c52477a 100644 --- a/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch +++ b/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More informative vehicle moved wrongly message diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 79fddc866..32cef8e30 100644 +index 9d705ed7d1..fc33baf2bf 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch index 5b25d5fb9d..f4b3635d3b 100644 --- a/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java -index 6ea276aa0..720e7bbf9 100644 +index 4e132eabb1..c28b72222e 100644 --- a/src/main/java/net/minecraft/server/EntityOcelot.java +++ b/src/main/java/net/minecraft/server/EntityOcelot.java @@ -0,0 +0,0 @@ public class EntityOcelot extends EntityTameableAnimal { diff --git a/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index ce5f31ff21..e1ddc48c68 100644 --- a/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world Also fix view distance lookup diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 24cce6c03..e5f064577 100644 +index bbd807315a..131f8a5156 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo @@ -25,7 +25,7 @@ index 24cce6c03..e5f064577 100644 double deltaZ = this.locZ - player.locZ; double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index e9d9ec239..28f524468 100644 +index 4f73b02baf..0d68a9be6c 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -0,0 +0,0 @@ public class EntityWither extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/Optimise-BlockStateEnum-hashCode-and-equals.patch b/Spigot-Server-Patches/Optimise-BlockStateEnum-hashCode-and-equals.patch index 8c47671b56..4c9b10dfc7 100644 --- a/Spigot-Server-Patches/Optimise-BlockStateEnum-hashCode-and-equals.patch +++ b/Spigot-Server-Patches/Optimise-BlockStateEnum-hashCode-and-equals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimise BlockStateEnum hashCode and equals diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java -index 725087de5..5e6cb5d7d 100644 +index 725087de59..5e6cb5d7de 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java @@ -0,0 +0,0 @@ public class BlockStateEnum & INamable> extends BlockState diff --git a/Spigot-Server-Patches/Optimise-removeQueue.patch b/Spigot-Server-Patches/Optimise-removeQueue.patch index 1017d30d29..33aaf79378 100644 --- a/Spigot-Server-Patches/Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/Optimise-removeQueue.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimise removeQueue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index dc32dc80d..cf2a39384 100644 +index b76c28147b..4bde378afb 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ import com.mojang.authlib.GameProfile; diff --git a/Spigot-Server-Patches/Optimize-EAR.patch b/Spigot-Server-Patches/Optimize-EAR.patch index 791144f56d..e049ec8a8e 100644 --- a/Spigot-Server-Patches/Optimize-EAR.patch +++ b/Spigot-Server-Patches/Optimize-EAR.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize EAR diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 1aade75f3..a9b84fdec 100644 +index 1aade75f34..a9b84fdec4 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ package org.spigotmc; diff --git a/Spigot-Server-Patches/Optimize-Hoppers.patch b/Spigot-Server-Patches/Optimize-Hoppers.patch index 2b03a104b0..7b088a9c80 100644 --- a/Spigot-Server-Patches/Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/Optimize-Hoppers.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Optimize Hoppers * Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b9f5f4905..a8470e6e7 100644 +index b9f5f49055..a8470e6e76 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -31,7 +31,7 @@ index b9f5f4905..a8470e6e7 100644 private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 66b637326..f9a7bde0b 100644 +index 66b637326a..f9a7bde0b6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -43,7 +43,7 @@ index 66b637326..f9a7bde0b 100644 this.methodProfiler.a(() -> { return worldserver.getWorldData().getName(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 3e9b357c8..db78274a8 100644 +index 3e9b357c87..db78274a8c 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -63,7 +63,7 @@ index 3e9b357c8..db78274a8 100644 this.world.b(this.position, this); if (!this.f.isAir()) { diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index bb41d4780..9e7a91fe4 100644 +index bb41d4780f..9e7a91fe48 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi diff --git a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch index c3f72c1514..97cb7cb556 100644 --- a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index ed714c2cc..ca169e113 100644 +index e120521611..023dd48a23 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { diff --git a/Spigot-Server-Patches/Optimize-Network-Queue.patch b/Spigot-Server-Patches/Optimize-Network-Queue.patch index 91b59fb77e..77b89c9cb5 100644 --- a/Spigot-Server-Patches/Optimize-Network-Queue.patch +++ b/Spigot-Server-Patches/Optimize-Network-Queue.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize Network Queue diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bf020293d..f81ff5628 100644 +index 94df23c31f..c97953a2fd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati diff --git a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch index a90991d744..45b5f4a961 100644 --- a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch @@ -10,7 +10,7 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6de0b22f7..5f17ec1e9 100644 +index 6de0b22f72..5f17ec1e9d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -23,7 +23,7 @@ index 6de0b22f7..5f17ec1e9 100644 // Spigot end } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index 0e168ad34..f8b7d695c 100644 +index 0e168ad349..f8b7d695c6 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -0,0 +0,0 @@ public class UserCache { diff --git a/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch index f27cbc7cd8..094b59937a 100644 --- a/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 04b5521cd..ca7c23f54 100644 +index 5d3378be0b..92070c9325 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch index 83716f5d43..96edc15a11 100644 --- a/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c80d84b9b..605e84173 100644 +index c80d84b9b2..605e84173d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -20,7 +20,7 @@ index c80d84b9b..605e84173 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 56292fad9..d5c509733 100644 +index 2904a845b1..142b6cc033 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch index efbef5fe0b..feb7fe3b9e 100644 --- a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to remove corrupt tile entities diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c182ceffb..9a2ec0793 100644 +index c182ceffb1..9a2ec07939 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index c182ceffb..9a2ec0793 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 06d6814b8..7a797bef0 100644 +index 06d6814b83..7a797bef0d 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 56e21c5409..5383024e47 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6ac58e5ec..ff9929a05 100644 +index 6ac58e5ec5..ff9929a051 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 6ac58e5ec..ff9929a05 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f98f93c5c..31c580de1 100644 +index a465f1cf79..76934f81a8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -31,7 +31,7 @@ index f98f93c5c..31c580de1 100644 public ScoreboardTeamBase be() { if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a3486bd46..79fddc866 100644 +index 12b7afc524..9d705ed7d1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index 7445ef0af3..41a3483bfd 100644 --- a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optional TNT doesn't move in water diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 38de48ebc..321da3be3 100644 +index 38de48ebc2..321da3be35 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ package com.destroystokyo.paper; @@ -32,7 +32,7 @@ index 38de48ebc..321da3be3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index dd4ac4bfe..34c617958 100644 +index 93df154b15..e56f458ca9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -61,7 +61,7 @@ index dd4ac4bfe..34c617958 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 87f3205f8..8c1d25979 100644 +index 87f3205f82..8c1d25979f 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index c4effa329f..58be27539b 100644 --- a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 98fdfcb60..de1b6ac86 100644 +index d04f9b380e..5015bd0710 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -19,7 +19,7 @@ index 98fdfcb60..de1b6ac86 100644 private final ItemCooldown ce; @Nullable diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 02bbb0d1d..e73b07f42 100644 +index a721eb30e9..258bdfe66a 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { @@ -48,7 +48,7 @@ index 02bbb0d1d..e73b07f42 100644 uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7021a81be..c0b484177 100644 +index 9f69000cb2..3c85d6323b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch b/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch index e5432125b2..de8f6f34e7 100644 --- a/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch +++ b/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index 57918d3d6..67556ed32 100644 +index d0eb65aaf0..5fe0e947c3 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java @@ -0,0 +0,0 @@ public class AdvancementDataPlayer { diff --git a/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch b/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch index 2958763031..03d0facb77 100644 --- a/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch +++ b/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 62d1c3d11..d232bab74 100644 +index 62d1c3d119..d232bab745 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch index d3cb948f71..f99e4b4f4d 100644 --- a/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch @@ -9,7 +9,7 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 8c6c68c9e..e7bf1e5fc 100644 +index 973c3d1e9e..f525fd1b42 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { diff --git a/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch b/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch index db8ad7ed8e..3e773ff4f9 100644 --- a/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch +++ b/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerPickupExperienceEvent Allows plugins to cancel a player picking up an experience orb diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 79d80596d..a87ef5fb8 100644 +index 79d80596df..a87ef5fb8c 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { diff --git a/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch index 88e5939410..cef658d7ed 100644 --- a/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index f2a4476c5..62d1c3d11 100644 +index f2a4476c5c..62d1c3d119 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { diff --git a/Spigot-Server-Patches/PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/PlayerReadyArrowEvent.patch index c58b63e3aa..91458d966e 100644 --- a/Spigot-Server-Patches/PlayerReadyArrowEvent.patch +++ b/Spigot-Server-Patches/PlayerReadyArrowEvent.patch @@ -7,7 +7,7 @@ Called when a player is firing a bow and the server is choosing an arrow to use. Plugins can skip selection of certain arrows and control which is used. diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java -index c8fc18045..de0d80361 100644 +index 379a7f84a5..c0caeda362 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch index 8099e97667..e012e4a85f 100644 --- a/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent Allows you to access the Gateway being used in a teleport event diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index bb9822799..c3d30dc94 100644 +index 9fd4ab6a7f..888bbd7a45 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -0,0 +0,0 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick diff --git a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch index 651d094301..fad870d042 100644 --- a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch @@ -15,7 +15,7 @@ instead and save a lot of server resources. See: https://github.com/PaperMC/Paper/issues/917 diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index c76dbe74a..b88160a2e 100644 +index c76dbe74ac..b88160a2ed 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ @@ -55,7 +55,7 @@ index c76dbe74a..b88160a2e 100644 if (entity == null) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 6d842df62..8c6c68c9e 100644 +index 342a15db5e..973c3d1e9e 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { diff --git a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch index 11db71c436..378a27eca3 100644 --- a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -7,7 +7,7 @@ If the save queue already has 50 (configurable) of chunks pending, then avoid processing auto save (which would add more) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9a2ec0793..f88444c7e 100644 +index 9a2ec07939..f88444c7e7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -23,7 +23,7 @@ index 9a2ec0793..f88444c7e 100644 private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index afeb0685b..a4c4a9486 100644 +index afeb0685b0..a4c4a9486b 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -51,7 +51,7 @@ index afeb0685b..a4c4a9486 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 2f1488ee5..859148cb8 100644 +index 2f1488ee53..859148cb86 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch index d4db018b02..141f89ab65 100644 --- a/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index 77cf6b8e9..9d9671eae 100644 +index 77cf6b8e9b..9d9671eaec 100644 --- a/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java @@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { diff --git a/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch index fdf8d0e25e..dc7525434d 100644 --- a/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch +++ b/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Pathfinding out of World Border This prevents Entities from trying to run outside of the World Border diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 0c5215657..05e0545fd 100644 +index 76d1f4bd21..76b2787bae 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { @@ -26,7 +26,7 @@ index 0c5215657..05e0545fd 100644 if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { return this.c; diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 4763c30a8..ec5386fd5 100644 +index 4763c30a81..ec5386fd50 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -0,0 +0,0 @@ public class WorldBorder { diff --git a/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch b/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch index f78435209e..f80b419312 100644 --- a/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch +++ b/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index d0e719f44..7dbc6f437 100644 +index 3464af6791..ae10cd89c1 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { diff --git a/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch b/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch index de39da0b87..b7cb64909d 100644 --- a/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch +++ b/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Print Error details when failing to save player data diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index cbfdb3cf7..9a243010d 100644 +index cbfdb3cf79..9a243010d0 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -0,0 +0,0 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { diff --git a/Spigot-Server-Patches/Profile-Lookup-Events.patch b/Spigot-Server-Patches/Profile-Lookup-Events.patch index 1707dabd5b..8aa926e60a 100644 --- a/Spigot-Server-Patches/Profile-Lookup-Events.patch +++ b/Spigot-Server-Patches/Profile-Lookup-Events.patch @@ -7,7 +7,7 @@ Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in p profiles that had to be looked up. diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java -index 3bcdb8f93..bb9894318 100644 +index 3bcdb8f93f..bb9894318e 100644 --- a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch index a70ffba6fe..619fd970ac 100644 --- a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4cbe14801..45e42e998 100644 +index 4cbe148010..45e42e9989 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch index fe96838aff..d451c21fd6 100644 --- a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 4bde378af..7059fc118 100644 +index 4bde378afb..7059fc1187 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -19,7 +19,7 @@ index 4bde378af..7059fc118 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index fc4e927d6..9ac86f7af 100644 +index fc4e927d67..9ac86f7af2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch index a1b912e98b..eaa8f2ac5e 100644 --- a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c97953a2f..8576545bb 100644 +index c97953a2fd..8576545bb7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -78,7 +78,7 @@ index c97953a2f..8576545bb 100644 return this.serverThread; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c8b5a610a..0b0d99652 100644 +index c8b5a610aa..0b0d996523 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -107,7 +107,7 @@ index c8b5a610a..0b0d99652 100644 // CraftBukkit start public void sendMessage(IChatBaseComponent[] iChatBaseComponents) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 947c43a5d..f15fd9f37 100644 +index 947c43a5d0..f15fd9f370 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -0,0 +0,0 @@ public class RestartCommand extends Command diff --git a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch index 0c75354c6a..0456c3f742 100644 --- a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch +++ b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch @@ -22,7 +22,7 @@ requirement, but plugins (such as my own) use this method to trigger a "reload" of the entity on the client. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0d69e6187..67af3e25c 100644 +index bd232b31e4..af7b91b479 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -35,7 +35,7 @@ index 0d69e6187..67af3e25c 100644 this.world.methodProfiler.a("reposition"); /* CraftBukkit start - Handled in calculateTarget diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9e3804579..44d867663 100644 +index d506503e93..697296acd0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch index a7975bccfa..e774b2f204 100644 --- a/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 90e260f3b..8b63192cf 100644 +index 90e260f3b3..8b63192cf9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/RangedEntity-API.patch b/Spigot-Server-Patches/RangedEntity-API.patch index 4900b527bb..83c1a60f4f 100644 --- a/Spigot-Server-Patches/RangedEntity-API.patch +++ b/Spigot-Server-Patches/RangedEntity-API.patch @@ -8,7 +8,7 @@ and to perform an attack. diff --git a/src/main/java/com/destroystokyo/paper/entity/CraftRangedEntity.java b/src/main/java/com/destroystokyo/paper/entity/CraftRangedEntity.java new file mode 100644 -index 000000000..696660b08 +index 0000000000..696660b089 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/CraftRangedEntity.java @@ -0,0 +0,0 @@ @@ -32,7 +32,7 @@ index 000000000..696660b08 + } +} diff --git a/src/main/java/net/minecraft/server/IRangedEntity.java b/src/main/java/net/minecraft/server/IRangedEntity.java -index 4fd69850f..7fe65b7c2 100644 +index 4fd69850fd..7fe65b7c24 100644 --- a/src/main/java/net/minecraft/server/IRangedEntity.java +++ b/src/main/java/net/minecraft/server/IRangedEntity.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -46,7 +46,7 @@ index 4fd69850f..7fe65b7c2 100644 + void s(boolean flag); default void setChargingAttack(boolean flag) { s(flag); } // Paper OBF HELPER } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java -index 2ec1af8be..f31d3eed3 100644 +index 2ec1af8be4..f31d3eed3a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java @@ -0,0 +0,0 @@ @@ -64,7 +64,7 @@ index 2ec1af8be..f31d3eed3 100644 public CraftIllusioner(CraftServer server, EntityIllagerIllusioner entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java -index 23ab78da1..3f94c5a92 100644 +index 23ab78da15..3f94c5a920 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java @@ -0,0 +0,0 @@ @@ -84,7 +84,7 @@ index 23ab78da1..3f94c5a92 100644 public CraftLlama(CraftServer server, EntityLlama entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java -index 4ed89615f..4fa5e84ea 100644 +index 4ed89615fd..4fa5e84ea4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java @@ -0,0 +0,0 @@ @@ -103,7 +103,7 @@ index 4ed89615f..4fa5e84ea 100644 public CraftSkeleton(CraftServer server, EntitySkeletonAbstract entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java -index 0349f0a57..2e3d8fcdf 100644 +index 0349f0a574..2e3d8fcdfa 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java @@ -0,0 +0,0 @@ @@ -121,7 +121,7 @@ index 0349f0a57..2e3d8fcdf 100644 super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java -index c08833cb7..f25998eb6 100644 +index c08833cb7a..f25998eb6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java @@ -0,0 +0,0 @@ @@ -139,7 +139,7 @@ index c08833cb7..f25998eb6 100644 super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java -index fad3db8af..b9bb3a0d1 100644 +index fad3db8af8..b9bb3a0d1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch index 8c7fe5080f..f41b29a0f2 100644 --- a/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -8,7 +8,7 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 44d867663..fcb5f68f8 100644 +index 697296acd0..b048343b7c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch b/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch index 3185543c04..15fb8be0a5 100644 --- a/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch +++ b/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Re-track players that dismount from other players diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8b5cfc78a..5aafa4e23 100644 +index 27ea8984fb..982e18f8af 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch index bc4daa79c4..8b72363374 100644 --- a/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,7 +16,7 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 97b315bca..d9d11a531 100644 +index fc47738ec5..6950f8a729 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/Remove-CraftScheduler-Async-Task-Debugger.patch index 5a9c541e39..a7ceedf26d 100644 --- a/Spigot-Server-Patches/Remove-CraftScheduler-Async-Task-Debugger.patch +++ b/Spigot-Server-Patches/Remove-CraftScheduler-Async-Task-Debugger.patch @@ -9,7 +9,7 @@ One report of a suspected memory leak with the system. This adds additional overhead to asynchronous task dispatching diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 26753fac5..a2fadaf82 100644 +index 26753fac5e..a2fadaf82c 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler { diff --git a/Spigot-Server-Patches/Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/Remove-FishingHook-reference-on-Craft-Entity-removal.patch index e45f59a965..2927ec07b8 100644 --- a/Spigot-Server-Patches/Remove-FishingHook-reference-on-Craft-Entity-removal.patch +++ b/Spigot-Server-Patches/Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove FishingHook reference on Craft Entity removal diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index 8392b16b3..752b56435 100644 +index 8392b16b3b..752b56435d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -0,0 +0,0 @@ public class CraftFishHook extends AbstractProjectile implements FishHook { diff --git a/Spigot-Server-Patches/Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch b/Spigot-Server-Patches/Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch index 437f318c97..3c20eb3e0b 100644 --- a/Spigot-Server-Patches/Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch +++ b/Spigot-Server-Patches/Replace-HashSet-with-fastutil-s-ObjectOpenHashSet-in.patch @@ -13,7 +13,7 @@ ObjectOpenHashSet never uses compareTo(), so the inconsistencies of NextTickList Fixes https://github.com/PaperMC/Paper/issues/588 diff --git a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java -index 80a5c29f3..cd864c404 100644 +index 80a5c29f3b..cd864c4047 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java +++ b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java @@ -0,0 +0,0 @@ import java.util.TreeSet; diff --git a/Spigot-Server-Patches/Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/Spigot-Server-Patches/Reset-spawner-timer-when-spawner-event-is-cancelled.patch index f3ea1bf8c3..6ac89f6cb5 100644 --- a/Spigot-Server-Patches/Reset-spawner-timer-when-spawner-event-is-cancelled.patch +++ b/Spigot-Server-Patches/Reset-spawner-timer-when-spawner-event-is-cancelled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 2b6b062c6..c76dbe74a 100644 +index 2b6b062c61..c76dbe74ac 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch index 2b4a74bba1..e0072d5db6 100644 --- a/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1bfe9d0e7..cd3e021a0 100644 +index 1bfe9d0e7a..cd3e021a09 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -72,7 +72,7 @@ index 1bfe9d0e7..cd3e021a0 100644 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2f9aa10f8..2904a845b 100644 +index 2f9aa10f85..2904a845b1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Shame-on-you-Mojang.patch b/Spigot-Server-Patches/Shame-on-you-Mojang.patch index a21930bc41..c3b8b2f44e 100644 --- a/Spigot-Server-Patches/Shame-on-you-Mojang.patch +++ b/Spigot-Server-Patches/Shame-on-you-Mojang.patch @@ -12,7 +12,7 @@ This then triggers async chunk loads! What in the hell were you thinking? diff --git a/src/main/java/net/minecraft/server/BlockBeacon.java b/src/main/java/net/minecraft/server/BlockBeacon.java -index 1181d45fa..d081166d8 100644 +index 1181d45fad..d081166d86 100644 --- a/src/main/java/net/minecraft/server/BlockBeacon.java +++ b/src/main/java/net/minecraft/server/BlockBeacon.java @@ -0,0 +0,0 @@ public class BlockBeacon extends BlockTileEntity { diff --git a/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch index 7240a0e090..fd3462cf2d 100644 --- a/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 0486dee2c..f08c0ba60 100644 +index 42c6249535..b20cab58b1 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -62,7 +62,7 @@ index 0486dee2c..f08c0ba60 100644 public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 073c8acf2..9e2fc4947 100644 +index 073c8acf2c..9e2fc4947c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch b/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch index 40302ca9f2..3f0d4026dd 100644 --- a/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch +++ b/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch @@ -7,7 +7,7 @@ This ensures that Shulker Boxes can never drop their contents twice, and that the inventory is cleared incase it some how also got saved to the world. diff --git a/src/main/java/net/minecraft/server/BlockShulkerBox.java b/src/main/java/net/minecraft/server/BlockShulkerBox.java -index a823e7073..37ec634f6 100644 +index 82b4d82c0e..d00bd9d610 100644 --- a/src/main/java/net/minecraft/server/BlockShulkerBox.java +++ b/src/main/java/net/minecraft/server/BlockShulkerBox.java @@ -0,0 +0,0 @@ public class BlockShulkerBox extends BlockTileEntity { diff --git a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch index 9564fb035a..6be8342b29 100644 --- a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch @@ -21,7 +21,7 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 58f8b4b72..98992513d 100644 +index 58f8b4b720..98992513da 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -0,0 +0,0 @@ import javax.annotation.concurrent.Immutable; @@ -80,7 +80,7 @@ index 58f8b4b72..98992513d 100644 public BaseBlockPosition d(BaseBlockPosition baseblockposition) { return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 7122a9aa8..2f6fc330b 100644 +index 7122a9aa8a..2f6fc330b3 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { diff --git a/Spigot-Server-Patches/String-based-Action-Bar-API.patch b/Spigot-Server-Patches/String-based-Action-Bar-API.patch index 7f6340f2fb..cd51defc33 100644 --- a/Spigot-Server-Patches/String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/String-based-Action-Bar-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] String based Action Bar API diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 70cdc3f10..381542e0d 100644 +index 70cdc3f102..381542e0d2 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -62,7 +62,7 @@ index 70cdc3f10..381542e0d 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index dea59d3fa..a546f3118 100644 +index dea59d3fab..a546f3118e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/System-property-for-disabling-watchdoge.patch b/Spigot-Server-Patches/System-property-for-disabling-watchdoge.patch index 478f2d0096..9cc29a177d 100644 --- a/Spigot-Server-Patches/System-property-for-disabling-watchdoge.patch +++ b/Spigot-Server-Patches/System-property-for-disabling-watchdoge.patch @@ -5,7 +5,7 @@ Subject: [PATCH] System property for disabling watchdoge diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 0c106ea9c..57a4748a3 100644 +index 0c106ea9c5..57a4748a30 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -0,0 +0,0 @@ public class WatchdogThread extends Thread diff --git a/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch b/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch index d4e973cc73..8f85decc14 100644 --- a/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch +++ b/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch @@ -7,7 +7,7 @@ This is faster if all you need is the UUID, as .getOwner() will cause an OfflinePlayer to be loaded from disk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index e56bef334..cc9d432e7 100644 +index e56bef3340..cc9d432e7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -0,0 +0,0 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac @@ -21,7 +21,7 @@ index e56bef334..cc9d432e7 100644 return getHandle().getOwnerUUID(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java -index eaaebeab8..2e959321b 100644 +index eaaebeab83..2e959321b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -0,0 +0,0 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat diff --git a/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch index 43cf743b7d..c3717c55bb 100644 --- a/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fddd52caf..79df2c171 100644 +index fddd52caf7..79df2c171c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index fddd52caf..79df2c171 100644 private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 28688f2ac..98fdfcb60 100644 +index cd3e021a09..d04f9b380e 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index 0061311ba0..7c6f6b73bf 100644 --- a/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event Otherwise the creeper infinite explodes diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 0147054df..bbb4ca0fe 100644 +index 0147054dff..bbb4ca0fe6 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { diff --git a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index 6b27afa780..94ed9bb931 100644 --- a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -12,7 +12,7 @@ results in a separate line, even though it should not result in a line break. Log4j's implementation handles it correctly. diff --git a/pom.xml b/pom.xml -index 47e307a24..a93ed45df 100644 +index 47e307a246..a93ed45df9 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -30,7 +30,7 @@ index 47e307a24..a93ed45df 100644 junit diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index af430b73f..8c7630018 100644 +index af430b73f0..8c76300185 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index edff194821..3c92ccc46b 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -19,7 +19,7 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 09b4ddf19..47e307a24 100644 +index 09b4ddf199..47e307a246 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -89,7 +89,7 @@ index 09b4ddf19..47e307a24 100644 org.apache.maven.plugins diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java new file mode 100644 -index 000000000..688b4715e +index 0000000000..688b4715eb --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java @@ -0,0 +0,0 @@ @@ -135,7 +135,7 @@ index 000000000..688b4715e +} diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java new file mode 100644 -index 000000000..685deaa0e +index 0000000000..685deaa0e5 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java @@ -0,0 +0,0 @@ @@ -157,7 +157,7 @@ index 000000000..685deaa0e + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index bf1fffcfe..af430b73f 100644 +index bf1fffcfee..af430b73f0 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -199,7 +199,7 @@ index bf1fffcfe..af430b73f 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8576545bb..0808da26f 100644 +index 8576545bb7..0808da26f6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; @@ -257,7 +257,7 @@ index 8576545bb..0808da26f 100644 public KeyPair G() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0b0d99652..4cbe14801 100644 +index 0b0d996523..4cbe148010 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -271,7 +271,7 @@ index 0b0d99652..4cbe14801 100644 this.k = new GameProfileBanList(PlayerList.a); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ff9346023..21d9f381c 100644 +index ff93460235..21d9f381cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import java.nio.ByteBuffer; @@ -299,7 +299,7 @@ index ff9346023..21d9f381c 100644 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c552c624e..3245fded9 100644 +index c552c624e5..3245fded9b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ import java.util.logging.Logger; @@ -341,7 +341,7 @@ index c552c624e..3245fded9 100644 if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java deleted file mode 100644 -index 26a2fb894..000000000 +index 26a2fb8942..0000000000 --- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -420,7 +420,7 @@ index 26a2fb894..000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java -index 33e8ea02c..1e3aae3b8 100644 +index 33e8ea02c4..1e3aae3b8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -0,0 +0,0 @@ import java.util.logging.Level; @@ -499,7 +499,7 @@ index 33e8ea02c..1e3aae3b8 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index 984df4083..bbb5a84f3 100644 +index 984df4083d..bbb5a84f36 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -0,0 +0,0 @@ public class ServerShutdownThread extends Thread { @@ -513,7 +513,7 @@ index 984df4083..bbb5a84f3 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java deleted file mode 100644 -index b64097113..000000000 +index b640971130..0000000000 --- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -572,7 +572,7 @@ index b64097113..000000000 - } -} diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 5cee8f00e..08b6bb7f9 100644 +index 5cee8f00ef..08b6bb7f97 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch index f1b22972d3..ecd5ac7a83 100644 --- a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use asynchronous Log4j 2 loggers diff --git a/pom.xml b/pom.xml -index a319cfe3b..ddee1b048 100644 +index a319cfe3b8..ddee1b0488 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -25,7 +25,7 @@ index a319cfe3b..ddee1b048 100644 junit diff --git a/src/main/resources/log4j2.component.properties b/src/main/resources/log4j2.component.properties new file mode 100644 -index 000000000..ee7c90784 +index 0000000000..ee7c90784c --- /dev/null +++ b/src/main/resources/log4j2.component.properties @@ -0,0 +1 @@ diff --git a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch deleted file mode 100644 index 797bc1a608..0000000000 --- a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Fri, 22 Apr 2016 18:20:05 -0500 -Subject: [PATCH] Vehicle Event Cancellation Changes - - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 31c580de1..16d521dfd 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - public boolean j; - public final List passengers; - protected int k; -- private Entity ax; -+ private Entity ax;public void setVehicle(Entity entity) { this.ax = entity; } // Paper - OBFHELPER - public boolean attachedToPlayer; - public World world; - public double lastX; -@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); - } else { - // CraftBukkit start -+ entity.setVehicle(this); // Paper - Set the vehicle back for the event - CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); - Entity orig = craft == null ? null : craft.getHandle(); - if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { -@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - } - } - // CraftBukkit end -- Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot -+ // Paper start - make EntityDismountEvent cancellable -+ if (!new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity()).callEvent()) { -+ return; -+ } -+ entity.setVehicle(null); -+ // Paper end -+ - this.passengers.remove(entity); - entity.k = 60; - } --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Vex-getOwner-API.patch b/Spigot-Server-Patches/Vex-getOwner-API.patch index 348082cc62..790047a2d0 100644 --- a/Spigot-Server-Patches/Vex-getOwner-API.patch +++ b/Spigot-Server-Patches/Vex-getOwner-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Vex#getOwner API Get's the NPC that summoned this Vex diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index 897d7c681..ba1109e03 100644 +index 80403473c8..36f8c315b5 100644 --- a/src/main/java/net/minecraft/server/EntityVex.java +++ b/src/main/java/net/minecraft/server/EntityVex.java @@ -0,0 +0,0 @@ public class EntityVex extends EntityMonster { @@ -18,7 +18,7 @@ index 897d7c681..ba1109e03 100644 return this.b; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java -index 787a41e01..5d5658136 100644 +index 787a41e015..5d5658136c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/WitchConsumePotionEvent.patch b/Spigot-Server-Patches/WitchConsumePotionEvent.patch index d035212720..8bfdec2b3f 100644 --- a/Spigot-Server-Patches/WitchConsumePotionEvent.patch +++ b/Spigot-Server-Patches/WitchConsumePotionEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] WitchConsumePotionEvent Fires when a witch consumes the potion in their hand diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 524d84c5b..c77328e76 100644 +index b397636247..790ab11c17 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/WitchReadyPotionEvent.patch b/Spigot-Server-Patches/WitchReadyPotionEvent.patch index 2c39dd8f7a..ca04c9edec 100644 --- a/Spigot-Server-Patches/WitchReadyPotionEvent.patch +++ b/Spigot-Server-Patches/WitchReadyPotionEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 2d8e307e7..b6f4ec842 100644 +index 9d802be18a..0096df5de0 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/WitchThrowPotionEvent.patch b/Spigot-Server-Patches/WitchThrowPotionEvent.patch index d94f47e2ef..4e26e54ffd 100644 --- a/Spigot-Server-Patches/WitchThrowPotionEvent.patch +++ b/Spigot-Server-Patches/WitchThrowPotionEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] WitchThrowPotionEvent Fired when a witch throws a potion at a player diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index c77328e76..2d8e307e7 100644 +index 790ab11c17..9d802be18a 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index def4954791..7305e3cdf2 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 67af3e25c..0e0dc72f0 100644 +index af7b91b479..47ce5cda76 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/getPlayerUniqueId-API.patch b/Spigot-Server-Patches/getPlayerUniqueId-API.patch index ddc5e9155c..9bb5845a16 100644 --- a/Spigot-Server-Patches/getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c74831b3d..e860a83d3 100644 +index c74831b3d7..e860a83d3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch index 9cf1ce0076..eabea7e75c 100644 --- a/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch @@ -15,7 +15,7 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 480b93aa0..9f7443ef0 100644 +index 7465c548af..add29081d2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch b/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch index 83372d0d86..cfe5d2e393 100644 --- a/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch @@ -6,7 +6,7 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 99fe720e8..c80d84b9b 100644 +index 99fe720e8b..c80d84b9b2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index 99fe720e8..c80d84b9b 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 8b0134ecd..0147054df 100644 +index 8b0134ecdb..0147054dff 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index b25c0bd9b3..b062391981 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c181acd99..6de0b22f7 100644 +index c181acd991..6de0b22f72 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import co.aikar.timings.MinecraftTimings; // Paper diff --git a/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch index cea3044b1d..f87596c45f 100644 --- a/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch @@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9f7443ef0..7e96c4eb4 100644 +index add29081d2..cb9f25e961 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch index ffa20a789a..04ac60bdfd 100644 --- a/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d5c509733..b96511804 100644 +index 142b6cc033..642a504d4f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/work/Bukkit b/work/Bukkit index 7731ecdea4..b7b10ad1c3 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 7731ecdea45210a641cedc66d7ef91a8176e3cfc +Subproject commit b7b10ad1c3cd0c03c041e2958a37895ce6990f65 diff --git a/work/CraftBukkit b/work/CraftBukkit index 1c7adf74e4..587014503b 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 1c7adf74e45bb83545603c1e4b7974ad979c442c +Subproject commit 587014503baa1ccdfb835404e1a88f1c0e1915d5 diff --git a/work/Spigot b/work/Spigot index ed1cec9ae9..5eb39219b1 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit ed1cec9ae9ee07f1b51bdda14dfe14b40e92c9ed +Subproject commit 5eb39219b1987510730e082ef6c14470b11bcc5b From fea7cd7e3c85b80dce5daaa2ed5651e071aa60f0 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 23 Jul 2018 10:24:51 +0100 Subject: [PATCH 30/67] Avoid ArithmeticException should server be stopped before worlds are loaded Our changes for the spawn radius have the potential to throw an ArithmeticException should the server be stopped before we've loaded worlds, we check if the server is running earlier to check if we should even consider attempting to load chunks, which would cause us to, 1) not load chunks anyways, as we're disabled; 2) throw an ArithmeticException due to us expecting that we're going to be loading more than 0 chunks. --- ...figurable-Keep-Spawn-Loaded-range-per-world.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch index e0f9d48af5..15e6168d82 100644 --- a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eb09be512..6ac58e5ec 100644 +index eb09be5126..6ac58e5ec5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index eb09be512..6ac58e5ec 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 96d31f874..7fb0a58f9 100644 +index 96d31f8749..071a1e30f7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -38,7 +38,7 @@ index 96d31f874..7fb0a58f9 100644 arraylist.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); } + } // Paper -+ if (true) { // Paper ++ if (this.isRunning()) { // Paper + int expected = arraylist.size(); // Paper + @@ -63,7 +63,7 @@ index 96d31f874..7fb0a58f9 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6ec1ee26d..a4c8e62e2 100644 +index 6ec1ee26dc..a4c8e62e22 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -78,7 +78,7 @@ index 6ec1ee26d..a4c8e62e2 100644 public void a(Packet packet) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 62872675d..7cb795dd8 100644 +index 62872675d9..7cb795dd89 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -91,7 +91,7 @@ index 62872675d..7cb795dd8 100644 for (int j = -short1; j <= short1; j += 16) { for (int k = -short1; k <= short1; k += 16) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0b2a9d09d..ff3558363 100644 +index 0b2a9d09df..ff3558363b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { From d6bfa1a05cb418e9a579447fda73f55e20460d64 Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Mon, 23 Jul 2018 13:08:02 +0200 Subject: [PATCH 31/67] Re-add Option to prevent armor stands from doing entity lookups Remove old patch --- ...t-armor-stands-from-doing-entity-loo.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch diff --git a/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch new file mode 100644 index 0000000000..7d0257e789 --- /dev/null +++ b/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -0,0 +1,50 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hugo Manrique +Date: Mon, 23 Jul 2018 12:57:39 +0200 +Subject: [PATCH] Option to prevent armor stands from doing entity lookups + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index a8470e6e..f33cd90d 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + } + } + ++ public boolean armorStandEntityLookups = true; ++ private void armorStandEntityLookups() { ++ armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); ++ } ++ + public int maxCollisionsPerEntity; + private void maxEntityCollision() { + maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 127dcedc..72e22c09 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ import java.util.Iterator; + import java.util.List; + import java.util.Random; + import java.util.UUID; ++ + import java.util.function.Function; + import java.util.function.Predicate; + import java.util.function.Supplier; +@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose + } + } + ++ // Paper start - Prevent armor stands from doing entity lookups ++ @Override ++ public boolean getCubes(@Nullable Entity entity, AxisAlignedBB axisAlignedBB) { ++ if (entity instanceof EntityArmorStand && !entity.world.paperConfig.armorStandEntityLookups) return false; ++ return GeneratorAccess.super.getCubes(entity, axisAlignedBB); ++ } ++ // Paper end ++ + public boolean a(AxisAlignedBB axisalignedbb) { + int i = MathHelper.floor(axisalignedbb.a); + int j = MathHelper.f(axisalignedbb.d); +-- \ No newline at end of file From f2fe0329c1e52b986d277ffdcaea28eb6afe7283 Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Mon, 23 Jul 2018 14:31:18 +0200 Subject: [PATCH 32/67] Re-add Vanished players don't have rights patch --- .../Vanished-players-don-t-have-rights.patch | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch diff --git a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch new file mode 100644 index 0000000000..66c71fbc13 --- /dev/null +++ b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch @@ -0,0 +1,127 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hugo Manrique +Date: Mon, 23 Jul 2018 14:22:26 +0200 +Subject: [PATCH] Vanished players don't have rights + + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index b6d6d4f3..ce2fdbeb 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + private static int entityCount; + private final EntityTypes g; public EntityTypes getEntityType() { return g; } // Paper - OBFHELPER + private int id; +- public boolean j; ++ public boolean j; public boolean blocksEntitySpawning() { return j; } // Paper - OBFHELPER + public final List passengers; + protected int k; + private Entity ax; +diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java +index c8f305e6..b57f6efb 100644 +--- a/src/main/java/net/minecraft/server/IBlockData.java ++++ b/src/main/java/net/minecraft/server/IBlockData.java +@@ -0,0 +0,0 @@ public interface IBlockData extends IBlockDataHolder { + return this.getBlock().a(this, iblockaccess, blockposition); + } + ++ default VoxelShape getBlockShape(IBlockAccess iblockaccess, BlockPosition blockposition) { return h(iblockaccess, blockposition); } // Paper - OBFHELPER + default VoxelShape h(IBlockAccess iblockaccess, BlockPosition blockposition) { + return this.getBlock().f(this, iblockaccess, blockposition); + } +diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java +index 1cecccef..afc881d9 100644 +--- a/src/main/java/net/minecraft/server/ItemBlock.java ++++ b/src/main/java/net/minecraft/server/ItemBlock.java +@@ -0,0 +0,0 @@ public class ItemBlock extends Item { + + protected boolean b(BlockActionContext blockactioncontext, IBlockData iblockdata) { + // CraftBukkit start - store default return +- boolean defaultReturn = iblockdata.canPlace(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()) && blockactioncontext.getWorld().a(iblockdata, blockactioncontext.getClickPosition()); ++ final World world = blockactioncontext.getWorld(); // Paper ++ boolean defaultReturn = iblockdata.canPlace(world, blockactioncontext.getClickPosition()) && world.a(iblockdata, blockactioncontext.getClickPosition()) && world.checkNoVisiblePlayerCollisions(blockactioncontext.getEntity(), iblockdata.getBlockShape(world, blockactioncontext.getClickPosition())); // Paper - Use our entity search + + BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), CraftBlockData.fromData(iblockdata), defaultReturn); + blockactioncontext.getWorld().getServer().getPluginManager().callEvent(event); +diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java +index 53c9f218..71e40843 100644 +--- a/src/main/java/net/minecraft/server/VoxelShape.java ++++ b/src/main/java/net/minecraft/server/VoxelShape.java +@@ -0,0 +0,0 @@ public abstract class VoxelShape { + return this.a(enumdirection_enumaxis, this.a.b(enumdirection_enumaxis)); + } + ++ public AxisAlignedBB getBounds() { return a(); } // Paper - OBFHELPER + public AxisAlignedBB a() { + if (this.b()) { + throw new UnsupportedOperationException("No bounds for empty shape."); +@@ -0,0 +0,0 @@ public abstract class VoxelShape { + + protected abstract DoubleList a(EnumDirection.EnumAxis enumdirection_enumaxis); + ++ public boolean isEmpty() { return b(); } // Paper - OBFHELPER + public boolean b() { + return this.a.a(); + } +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 127dcedc..302a3655 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose + } + } + ++ // Paper start - Based on method below ++ /** ++ * @param entity causing the action ex. block placer ++ * @param voxelshape area to search within ++ * @return if there are no visible players colliding ++ */ ++ public boolean checkNoVisiblePlayerCollisions(@Nullable Entity entity, VoxelShape voxelshape) { ++ if (voxelshape.isEmpty()) { ++ return true; ++ } else { ++ List list = this.getEntities((Entity) null, voxelshape.getBounds()); ++ ++ for (int i = 0; i < list.size(); ++i) { ++ Entity entity1 = (Entity) list.get(i); ++ ++ if (entity instanceof EntityPlayer && entity1 instanceof EntityPlayer) { ++ if (!((EntityPlayer) entity).getBukkitEntity().canSee(((EntityPlayer) entity1).getBukkitEntity())) { ++ continue; ++ } ++ } ++ ++ if (!entity1.dead && entity1.blocksEntitySpawning()) { ++ return false; ++ } ++ } ++ ++ return true; ++ } ++ } ++ // Paper end ++ + public boolean a(@Nullable Entity entity, VoxelShape voxelshape) { + if (voxelshape.b()) { + return true; +diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +index cf398cd2..140ddae0 100644 +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +@@ -0,0 +0,0 @@ public class CraftEventFactory { + Projectile projectile = (Projectile) entity.getBukkitEntity(); + org.bukkit.entity.Entity collided = position.entity.getBukkitEntity(); + com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); ++ ++ if (projectile.getShooter() instanceof Player && collided instanceof Player) { ++ if (!((Player) projectile.getShooter()).canSee((Player) collided)) { ++ event.setCancelled(true); ++ return event; ++ } ++ } ++ + Bukkit.getPluginManager().callEvent(event); + return event; + } +-- \ No newline at end of file From adbb709ff594ae9b31802528fef1c0557cf11337 Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Mon, 23 Jul 2018 16:57:21 +0200 Subject: [PATCH 33/67] Fix decompile error --- Spigot-Server-Patches/MC-Dev-fixes.patch | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index 61c39a92e2..bee1b88a38 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index e8f7b7292..a0ebc1eaa 100644 +index e8f7b729..a0ebc1ea 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +0,0 @@ public class PaperCommand extends Command { @@ -15,7 +15,7 @@ index e8f7b7292..a0ebc1eaa 100644 + } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 002da2a19..121a137f3 100644 +index 002da2a1..121a137f 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { @@ -57,7 +57,7 @@ index 002da2a19..121a137f3 100644 } diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 65910508f..15c7cc170 100644 +index a661789c..785a1a21 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java @@ -0,0 +0,0 @@ public class DefinedStructure { @@ -111,4 +111,17 @@ index 65910508f..15c7cc170 100644 } public Iterator iterator() { +diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java +index 4b5463cc..53c9f218 100644 +--- a/src/main/java/net/minecraft/server/VoxelShape.java ++++ b/src/main/java/net/minecraft/server/VoxelShape.java +@@ -0,0 +0,0 @@ public abstract class VoxelShape { + ArrayList arraylist = Lists.newArrayList(); + + this.b((d0, d1, d2, d3, d4, d5) -> { +- list.add(new AxisAlignedBB(d0, d1, d2, d3, d4, d5)); ++ arraylist.add(new AxisAlignedBB(d0, d1, d2, d3, d4, d5)); // Paper - decompile fix + }); + return arraylist; + } -- \ No newline at end of file From 9399a74c2ac1e0238a1defe904fb882ae1320ad4 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 23 Jul 2018 12:58:01 -0400 Subject: [PATCH 34/67] Optimize RegistryID.c() Fixes #1253 --- .../Player-Tab-List-and-Title-APIs.patch | 4 +- .../Optimize-RegistryID.c.patch | 97 +++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 Spigot-Server-Patches/Optimize-RegistryID.c.patch diff --git a/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch index ccbd26fd13..0c1908599c 100644 --- a/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch @@ -497,4 +497,6 @@ index f4d1ade5..65b7a076 100644 // Paper end /** --- \ No newline at end of file +-- +2.17.0 (Apple Git-106) + diff --git a/Spigot-Server-Patches/Optimize-RegistryID.c.patch b/Spigot-Server-Patches/Optimize-RegistryID.c.patch new file mode 100644 index 0000000000..2d3854aacb --- /dev/null +++ b/Spigot-Server-Patches/Optimize-RegistryID.c.patch @@ -0,0 +1,97 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Andrew Steinborn +Date: Mon, 23 Jul 2018 12:50:18 -0400 +Subject: [PATCH] Optimize RegistryID.c() + +This is a frequent hotspot for world loading/saving. + +diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java +index 3b8f6ec1..163da432 100644 +--- a/src/main/java/net/minecraft/server/RegistryID.java ++++ b/src/main/java/net/minecraft/server/RegistryID.java +@@ -0,0 +0,0 @@ import java.util.Arrays; + import java.util.Iterator; + import javax.annotation.Nullable; + +-public class RegistryID implements Registry { ++public class RegistryID implements Registry { // Paper - decompile fix + + private static final Object a = null; + private K[] b; +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + private K[] d; + private int e; + private int f; ++ private java.util.BitSet usedIds; // Paper + + public RegistryID(int i) { + i = (int) ((float) i / 0.8F); +- this.b = (Object[]) (new Object[i]); ++ this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.c = new int[i]; +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix ++ this.usedIds = new java.util.BitSet(); // Paper + } + + public int getId(@Nullable K k0) { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + } + + private int c() { ++ // Paper start ++ /* + while (this.e < this.d.length && this.d[this.e] != null) { + ++this.e; + } ++ */ ++ this.e = this.usedIds.nextClearBit(0); ++ // Paper end + + return this.e; + } + + private void d(int i) { +- Object[] aobject = this.b; ++ K[] aobject = this.b; // Paper - decompile fix + int[] aint = this.c; + +- this.b = (Object[]) (new Object[i]); ++ this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.c = new int[i]; +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.e = 0; + this.f = 0; ++ this.usedIds.clear(); // Paper + + for (int j = 0; j < aobject.length; ++j) { + if (aobject[j] != null) { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + } + + public void a(K k0, int i) { +- int j = Math.max(i, this.f + 1); ++ int j = this.usedIds.size(); // Paper + int k; + + if ((float) j >= (float) this.b.length * 0.8F) { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + this.b[k] = k0; + this.c[k] = i; + this.d[i] = k0; ++ this.usedIds.set(i); // Paper + ++this.f; + if (i == this.e) { + ++this.e; +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + Arrays.fill(this.d, (Object) null); + this.e = 0; + this.f = 0; ++ this.usedIds.clear(); // Paper + } + + public int b() { +-- +2.17.0 (Apple Git-106) + From 5e14f2410c3f8390c1a7f27a1e34afd87abb8a31 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 23 Jul 2018 13:10:06 -0400 Subject: [PATCH 35/67] Put the decompile fixes into MC Dev Fixes patch --- .../Add-BeaconEffectEvent.patch | 4 +- .../Add-PlayerLocaleChangeEvent.patch | 4 +- .../Add-player-view-distance-API.patch | 4 +- Spigot-Server-Patches/MC-Dev-fixes.patch | 51 +++++++++++++++++-- .../Optimize-RegistryID.c.patch | 49 ++++-------------- 5 files changed, 66 insertions(+), 46 deletions(-) diff --git a/Spigot-API-Patches/Add-BeaconEffectEvent.patch b/Spigot-API-Patches/Add-BeaconEffectEvent.patch index e82f5fe3bf..a0c68bceeb 100644 --- a/Spigot-API-Patches/Add-BeaconEffectEvent.patch +++ b/Spigot-API-Patches/Add-BeaconEffectEvent.patch @@ -91,4 +91,6 @@ index 00000000..6579ae99 + return handlers; + } +} --- \ No newline at end of file +-- +2.17.0 (Apple Git-106) + diff --git a/Spigot-API-Patches/Add-PlayerLocaleChangeEvent.patch b/Spigot-API-Patches/Add-PlayerLocaleChangeEvent.patch index ee8cf9b974..39e7e9a6bd 100644 --- a/Spigot-API-Patches/Add-PlayerLocaleChangeEvent.patch +++ b/Spigot-API-Patches/Add-PlayerLocaleChangeEvent.patch @@ -60,4 +60,6 @@ index 00000000..29dd763a + return handlers; + } +} --- \ No newline at end of file +-- +2.17.0 (Apple Git-106) + diff --git a/Spigot-API-Patches/Add-player-view-distance-API.patch b/Spigot-API-Patches/Add-player-view-distance-API.patch index 2319b13df5..f4fed10e48 100644 --- a/Spigot-API-Patches/Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/Add-player-view-distance-API.patch @@ -29,4 +29,6 @@ index 25e44028..7f215f1a 100644 // Spigot start public class Spigot extends Entity.Spigot { --- \ No newline at end of file +-- +2.17.0 (Apple Git-106) + diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index 61c39a92e2..798c3c42ed 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index e8f7b7292..a0ebc1eaa 100644 +index e8f7b729..a0ebc1ea 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +0,0 @@ public class PaperCommand extends Command { @@ -15,7 +15,7 @@ index e8f7b7292..a0ebc1eaa 100644 + } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 002da2a19..121a137f3 100644 +index 002da2a1..121a137f 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { @@ -57,7 +57,7 @@ index 002da2a19..121a137f3 100644 } diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 65910508f..15c7cc170 100644 +index a661789c..785a1a21 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java @@ -0,0 +0,0 @@ public class DefinedStructure { @@ -111,4 +111,47 @@ index 65910508f..15c7cc170 100644 } public Iterator iterator() { --- \ No newline at end of file +diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java +index 3b8f6ec1..bde5714d 100644 +--- a/src/main/java/net/minecraft/server/RegistryID.java ++++ b/src/main/java/net/minecraft/server/RegistryID.java +@@ -0,0 +0,0 @@ import java.util.Arrays; + import java.util.Iterator; + import javax.annotation.Nullable; + +-public class RegistryID implements Registry { ++public class RegistryID implements Registry { // Paper - decompile fix + + private static final Object a = null; + private K[] b; +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + + public RegistryID(int i) { + i = (int) ((float) i / 0.8F); +- this.b = (Object[]) (new Object[i]); ++ this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.c = new int[i]; +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix + } + + public int getId(@Nullable K k0) { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + } + + private void d(int i) { +- Object[] aobject = this.b; ++ K[] aobject = this.b; // Paper - decompile fix + int[] aint = this.c; + +- this.b = (Object[]) (new Object[i]); ++ this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.c = new int[i]; +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.e = 0; + this.f = 0; + +-- +2.17.0 (Apple Git-106) + diff --git a/Spigot-Server-Patches/Optimize-RegistryID.c.patch b/Spigot-Server-Patches/Optimize-RegistryID.c.patch index 2d3854aacb..414eba0e64 100644 --- a/Spigot-Server-Patches/Optimize-RegistryID.c.patch +++ b/Spigot-Server-Patches/Optimize-RegistryID.c.patch @@ -1,24 +1,15 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn -Date: Mon, 23 Jul 2018 12:50:18 -0400 +Date: Mon, 23 Jul 2018 13:08:19 -0400 Subject: [PATCH] Optimize RegistryID.c() This is a frequent hotspot for world loading/saving. diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index 3b8f6ec1..163da432 100644 +index bde5714d..a01cda9d 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java -@@ -0,0 +0,0 @@ import java.util.Arrays; - import java.util.Iterator; - import javax.annotation.Nullable; - --public class RegistryID implements Registry { -+public class RegistryID implements Registry { // Paper - decompile fix - - private static final Object a = null; - private K[] b; -@@ -0,0 +0,0 @@ public class RegistryID implements Registry { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { // Paper - decompile fix private K[] d; private int e; private int f; @@ -26,16 +17,14 @@ index 3b8f6ec1..163da432 100644 public RegistryID(int i) { i = (int) ((float) i / 0.8F); -- this.b = (Object[]) (new Object[i]); -+ this.b = (K[]) (new Object[i]); // Paper - decompile fix + this.b = (K[]) (new Object[i]); // Paper - decompile fix this.c = new int[i]; -- this.d = (Object[]) (new Object[i]); -+ this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.usedIds = new java.util.BitSet(); // Paper } public int getId(@Nullable K k0) { -@@ -0,0 +0,0 @@ public class RegistryID implements Registry { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { // Paper - decompile fix } private int c() { @@ -50,33 +39,15 @@ index 3b8f6ec1..163da432 100644 return this.e; } - - private void d(int i) { -- Object[] aobject = this.b; -+ K[] aobject = this.b; // Paper - decompile fix - int[] aint = this.c; - -- this.b = (Object[]) (new Object[i]); -+ this.b = (K[]) (new Object[i]); // Paper - decompile fix - this.c = new int[i]; -- this.d = (Object[]) (new Object[i]); -+ this.d = (K[]) (new Object[i]); // Paper - decompile fix +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { // Paper - decompile fix + this.d = (K[]) (new Object[i]); // Paper - decompile fix this.e = 0; this.f = 0; + this.usedIds.clear(); // Paper for (int j = 0; j < aobject.length; ++j) { if (aobject[j] != null) { -@@ -0,0 +0,0 @@ public class RegistryID implements Registry { - } - - public void a(K k0, int i) { -- int j = Math.max(i, this.f + 1); -+ int j = this.usedIds.size(); // Paper - int k; - - if ((float) j >= (float) this.b.length * 0.8F) { -@@ -0,0 +0,0 @@ public class RegistryID implements Registry { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { // Paper - decompile fix this.b[k] = k0; this.c[k] = i; this.d[i] = k0; @@ -84,7 +55,7 @@ index 3b8f6ec1..163da432 100644 ++this.f; if (i == this.e) { ++this.e; -@@ -0,0 +0,0 @@ public class RegistryID implements Registry { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { // Paper - decompile fix Arrays.fill(this.d, (Object) null); this.e = 0; this.f = 0; From ceedd8c4f186d1ed98e393944e0911150a8bef3d Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 23 Jul 2018 18:21:07 +0100 Subject: [PATCH 36/67] Update S Also drop a few patches which are no longer needed/already merged in. --- .../Handle-plugin-prefixes-using-Log4J-configuration.patch | 2 +- .../Implement-extended-PaperServerListPingEvent.patch | 4 ++-- work/Spigot | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch index 4acd5ff998..967db10276 100644 --- a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -28,7 +28,7 @@ index a93ed45df9..bb32cb749d 100644 diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 676780b619..5a873fe9d7 100644 +index ffbb1e894a..7f3543970f 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index 92fcf8c811..b59878b7d9 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 0000000000..350410527b + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cdcc375923..66b637326a 100644 +index 8e72220f37..90b1871196 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -251,7 +251,7 @@ index d7e1ecc031..f20cddc41c 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 5a873fe9d7..42bd3b6edd 100644 +index 7f3543970f..6cc48258dc 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig diff --git a/work/Spigot b/work/Spigot index 5eb39219b1..a85f7ec0de 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 5eb39219b1987510730e082ef6c14470b11bcc5b +Subproject commit a85f7ec0de6263efed322bb8527c6360ea1109a7 From 77c51f1785bd84e02f26de529068a68047f4d85b Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 18:57:54 -0400 Subject: [PATCH 37/67] Update upstream --- .../Add-getI18NDisplayName-API.patch | 2 +- ...PI-additions-for-quantity-flags-lore.patch | 2 +- .../ItemStack-getMaxItemUseDuration.patch | 2 +- .../ensureServerConversions-API.patch | 2 +- .../Add-ArmorStand-Item-Meta.patch | 10 +++--- .../Add-SkullMeta.setPlayerProfile-API.patch | 2 +- .../Ensure-inv-drag-is-in-bounds.patch | 2 +- .../Handle-Item-Meta-Inconsistencies.patch | 6 ++-- ...mplement-ensureServerConversions-API.patch | 2 +- .../Implement-getI18NDisplayName.patch | 2 +- .../ItemStack-getMaxItemUseDuration.patch | 4 +-- Spigot-Server-Patches/MC-Utils.patch | 34 +++++++++---------- .../Use-UserCache-for-player-heads.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 16 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Spigot-API-Patches/Add-getI18NDisplayName-API.patch b/Spigot-API-Patches/Add-getI18NDisplayName-API.patch index 1cd6d8dfb0..859ae734a6 100644 --- a/Spigot-API-Patches/Add-getI18NDisplayName-API.patch +++ b/Spigot-API-Patches/Add-getI18NDisplayName-API.patch @@ -28,7 +28,7 @@ index 045c26d9..47bbc0f9 100644 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 14b6b6b3..ca7a958f 100644 +index 24a45189..b1d0778f 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { diff --git a/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch b/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch index 7751a9c0dc..fdcc043f01 100644 --- a/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch +++ b/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index a240311e..c5befd8c 100644 +index 4385ca79..7eb00104 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ package org.bukkit.inventory; diff --git a/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch b/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch index 0a103e6098..c43c1344b0 100644 --- a/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index ca7a958f..a240311e 100644 +index b1d0778f..4385ca79 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { diff --git a/Spigot-API-Patches/ensureServerConversions-API.patch b/Spigot-API-Patches/ensureServerConversions-API.patch index dfc3e33b3a..64f4efee68 100644 --- a/Spigot-API-Patches/ensureServerConversions-API.patch +++ b/Spigot-API-Patches/ensureServerConversions-API.patch @@ -28,7 +28,7 @@ index 762c43d6..045c26d9 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 73f79b22..14b6b6b3 100644 +index 41a43053..24a45189 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { diff --git a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch index e74548e54f..9bd280792b 100644 --- a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch @@ -13,7 +13,7 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 1cdbdf6d07..da109e35a8 100644 +index 1df2b463a..abdbd4989 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { @@ -26,7 +26,7 @@ index 1cdbdf6d07..da109e35a8 100644 case CHEST: case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index cadff64bfb..b1e0d61856 100644 +index e2699564a..aad380c3b 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 { @@ -40,7 +40,7 @@ index cadff64bfb..b1e0d61856 100644 case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java new file mode 100644 -index 0000000000..30941c7b0c +index 000000000..30941c7b0 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +0,0 @@ @@ -354,7 +354,7 @@ index 0000000000..30941c7b0c + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index f1430d226f..a3f293e4cc 100644 +index f1430d226..a3f293e4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @@ -383,7 +383,7 @@ index f1430d226f..a3f293e4cc 100644 } return HANDLED_TAGS; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index f66cc81d9e..eb6cf1bb33 100644 +index f66cc81d9..eb6cf1bb3 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -0,0 +0,0 @@ import static org.hamcrest.Matchers.*; diff --git a/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch b/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch index a4961e16ea..cde4c4cedb 100644 --- a/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Add-SkullMeta.setPlayerProfile-API.patch @@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo which commonly cause rate limit issues with Mojang API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 52de1439e7..960ae59ae1 100644 +index e9e2c1445..d894fadef 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory; diff --git a/Spigot-Server-Patches/Ensure-inv-drag-is-in-bounds.patch b/Spigot-Server-Patches/Ensure-inv-drag-is-in-bounds.patch index 1e08c99c42..c8fe451a67 100644 --- a/Spigot-Server-Patches/Ensure-inv-drag-is-in-bounds.patch +++ b/Spigot-Server-Patches/Ensure-inv-drag-is-in-bounds.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure inv drag is in bounds diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java -index e86ffb4dc..0bf14b671 100644 +index 0ae0b5ed8..1573c0559 100644 --- a/src/main/java/net/minecraft/server/Container.java +++ b/src/main/java/net/minecraft/server/Container.java @@ -0,0 +0,0 @@ public abstract class Container { diff --git a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch index 3dd803a596..348cb9b594 100644 --- a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index c973397898..e120521611 100644 +index cf679df7b..405b867fe 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import com.mojang.brigadier.StringReader; @@ -78,7 +78,7 @@ index c973397898..e120521611 100644 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index d41459ef01..cadff64bfb 100644 +index f4672b9a4..e2699564a 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 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -204,7 +204,7 @@ index d41459ef01..cadff64bfb 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index b2190b01d4..f1430d226f 100644 +index b2190b01d..f1430d226 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ import java.lang.reflect.Constructor; diff --git a/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch index 72a2e588bb..fb412a5467 100644 --- a/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch @@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 59d2685dc8..27a264f549 100644 +index 0fb3c238a..e98e1ed72 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch index 16918f6bcb..7bbd2d7e95 100644 --- a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch @@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 27a264f549..1cdbdf6d07 100644 +index e98e1ed72..1df2b463a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch index 85e67d60dc..7d76999e5d 100644 --- a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 023dd48a23..00691f6de9 100644 +index e71d75a77..3c7a40c23 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { @@ -18,7 +18,7 @@ index 023dd48a23..00691f6de9 100644 return this.getItem().c(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index b1e0d61856..03f6115181 100644 +index aad380c3b..5f3331de1 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 { diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 74dc97db3c..eb6ee73dda 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC Utils diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index c3e990bdff..e2a7b4be2c 100644 +index c3e990bdf..e2a7b4be2 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable { @@ -18,7 +18,7 @@ index c3e990bdff..e2a7b4be2c 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 121a137f3b..279045e499 100644 +index 121a137f3..279045e49 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -54,7 +54,7 @@ index 121a137f3b..279045e499 100644 return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 411ab6061b..cd4fbee0ca 100644 +index 411ab6061..cd4fbee0c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ import com.google.common.collect.Lists; // CraftBukkit @@ -75,7 +75,7 @@ index 411ab6061b..cd4fbee0ca 100644 public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index 00a530c51c..2947d9ff6a 100644 +index 00a530c51..2947d9ff6 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java @@ -0,0 +0,0 @@ public class ChunkCoordIntPair { @@ -88,7 +88,7 @@ index 00a530c51c..2947d9ff6a 100644 return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index ca2a14d7ac..9a513b4e3a 100644 +index ca2a14d7a..9a513b4e3 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -131,7 +131,7 @@ index ca2a14d7ac..9a513b4e3a 100644 private boolean c = true; private boolean d = true; diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 1e27433b90..c973397898 100644 +index f5e311f2a..cf679df7b 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import org.bukkit.Location; @@ -161,7 +161,7 @@ index 1e27433b90..c973397898 100644 this.tag = nbttagcompound; } diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java -index a540167d6d..add618866b 100644 +index a540167d6..add618866 100644 --- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java @@ -0,0 +0,0 @@ public abstract class LotoSelectorEntry { @@ -180,7 +180,7 @@ index a540167d6d..add618866b 100644 } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 0000000000..70cdc3f102 +index 000000000..70cdc3f10 --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -477,7 +477,7 @@ index 0000000000..70cdc3f102 + } +} diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java -index 8170a84280..e21e60b003 100644 +index 8170a8428..e21e60b00 100644 --- a/src/main/java/net/minecraft/server/NBTBase.java +++ b/src/main/java/net/minecraft/server/NBTBase.java @@ -0,0 +0,0 @@ public interface NBTBase { @@ -499,7 +499,7 @@ index 8170a84280..e21e60b003 100644 case 0: return "TAG_End"; diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java -index 1a81d8e5f6..057c2077a0 100644 +index 1a81d8e5f..057c2077a 100644 --- a/src/main/java/net/minecraft/server/NBTList.java +++ b/src/main/java/net/minecraft/server/NBTList.java @@ -0,0 +0,0 @@ public abstract class NBTList extends AbstractList impleme @@ -525,7 +525,7 @@ index 1a81d8e5f6..057c2077a0 100644 + public abstract NBTList clone(); // Paper - decompile fix } diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java -index 11ffa6c342..3ff3a29835 100644 +index 11ffa6c34..3ff3a2983 100644 --- a/src/main/java/net/minecraft/server/NBTTagByteArray.java +++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java @@ -0,0 +0,0 @@ public class NBTTagByteArray extends NBTList { @@ -539,7 +539,7 @@ index 11ffa6c342..3ff3a29835 100644 System.arraycopy(this.data, 0, abyte, 0, this.data.length); diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 7fc9b5ff32..e658816c24 100644 +index 7fc9b5ff3..e658816c2 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { @@ -575,7 +575,7 @@ index 7fc9b5ff32..e658816c24 100644 - } } diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java -index f5c9b97d5c..d121ad4f7a 100644 +index f5c9b97d5..d121ad4f7 100644 --- a/src/main/java/net/minecraft/server/NBTTagIntArray.java +++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java @@ -0,0 +0,0 @@ public class NBTTagIntArray extends NBTList { @@ -588,7 +588,7 @@ index f5c9b97d5c..d121ad4f7a 100644 } } diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index b3c944d701..a8280acf94 100644 +index b3c944d70..a8280acf9 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -626,7 +626,7 @@ index b3c944d701..a8280acf94 100644 - } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2f2f4c6c60..556989f603 100644 +index 0618962e7..42e0630e6 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -643,7 +643,7 @@ index 2f2f4c6c60..556989f603 100644 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index ef332d6517..7cc7eb7735 100644 +index ef332d651..7cc7eb773 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -0,0 +0,0 @@ import java.util.Iterator; @@ -665,7 +665,7 @@ index ef332d6517..7cc7eb7735 100644 this.c.set(i, t0); diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index 2179664a0c..d7e1ecc031 100644 +index 2179664a0..d7e1ecc03 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -0,0 +0,0 @@ public class ServerPing { diff --git a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch index fd4e2b0e68..0e8cfcbb07 100644 --- a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch +++ b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use UserCache for player heads diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 4cfc70aa7..52de1439e 100644 +index e5b9310ea..e9e2c1445 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -0,0 +0,0 @@ import net.minecraft.server.GameProfileSerializer; diff --git a/work/Bukkit b/work/Bukkit index b7b10ad1c3..0f4e33e9c7 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit b7b10ad1c3cd0c03c041e2958a37895ce6990f65 +Subproject commit 0f4e33e9c7a5b3fc9912c67265b725db43fc92cb diff --git a/work/CraftBukkit b/work/CraftBukkit index 587014503b..ea7b61290a 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 587014503baa1ccdfb835404e1a88f1c0e1915d5 +Subproject commit ea7b61290a39f0ab355d7a723907ed312f713b05 diff --git a/work/Spigot b/work/Spigot index a85f7ec0de..0b44fa0bd4 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit a85f7ec0de6263efed322bb8527c6360ea1109a7 +Subproject commit 0b44fa0bd4ed14ac6ae791d7f9a486d31382a0c7 From 7349a434adb03f481c1755caa9917f1f0ff51d2d Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 19:41:29 -0400 Subject: [PATCH 38/67] Fix memory leak in proto chunk change --- .../Don-t-save-Proto-Chunks.patch | 37 +++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch index 0d3459a90c..218f246a73 100644 --- a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch +++ b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch @@ -7,30 +7,8 @@ These chunks are unfinished, and waste cpu time saving these unfinished chunks. the loadChunk method refuses to acknoledge they exists, and will restart a new chunk generation process to begin with, so saving them serves no benefit. -diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index fd8430a68f..b425704b1a 100644 ---- a/src/main/java/net/minecraft/server/ChunkProviderServer.java -+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { - public boolean a(boolean flag) { - int i = 0; - -- this.f.a(); -+ //this.f.a(); // Paper - don't save proto chunks - ArrayList arraylist = Lists.newArrayList(this.chunks.values()); - Iterator iterator = arraylist.iterator(); - -@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { - } - // Paper end - -- this.f.a(); -+ //this.f.a(); // Paper - don't save proto chunks - this.chunkLoader.b(); - } - diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index ea8684747d..a97e024ec4 100644 +index ea8684747..a97e024ec 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -41,4 +19,17 @@ index ea8684747d..a97e024ec4 100644 // Spigot end world.checkSession(); +diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +index 501565dd5..7b3068753 100644 +--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java ++++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler Date: Mon, 23 Jul 2018 19:41:41 -0400 Subject: [PATCH 39/67] Fix a concurrency issue with chunk scheduler It's possible we won't hit this on the servers current state since nothing is async, but we are working towards that. I experienced a crash due to this code during my work. --- ...ad-Safe-Iteration-of-Chunk-Scheduler.patch | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch diff --git a/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch b/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch new file mode 100644 index 0000000000..05f0267827 --- /dev/null +++ b/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch @@ -0,0 +1,45 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 23 Jul 2018 19:13:06 -0400 +Subject: [PATCH] Thread Safe Iteration of Chunk Scheduler + + +diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +index 7b3068753..45f9ad372 100644 +--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java ++++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +@@ -0,0 +0,0 @@ + package net.minecraft.server; + ++import com.google.common.collect.Lists; + import it.unimi.dsi.fastutil.longs.Long2ObjectMap; + import it.unimi.dsi.fastutil.longs.Long2ObjectMaps; + import java.io.IOException; ++import java.util.ArrayList; + import java.util.EnumMap; + import java.util.Map; + import java.util.function.Consumer; +@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler { ++ // Paper start ++ ArrayList list; ++ synchronized (this.g) { ++ list = Lists.newArrayList(this.g.values()); ++ } ++ list.forEach((scheduler_a) -> { ++ // Paper end + ProtoChunk protochunk = (ProtoChunk) scheduler_a.a(); + + if (protochunk.h() && protochunk.i().d() == ChunkStatus.Type.PROTOCHUNK) { +@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler Date: Mon, 23 Jul 2018 20:32:40 -0400 Subject: [PATCH 40/67] Licensing stuff I agree to license all of my current and future Paper changes under the MIT license. --- LICENSE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE.md b/LICENSE.md index c5341db551..30af870c0d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -34,4 +34,5 @@ Brokkonaut vemacs stonar96 Hugo Manrique +Andrew Steinborn ``` From d807cf08e19f698e1eeb75948fce94b43316da48 Mon Sep 17 00:00:00 2001 From: willies952002 Date: Mon, 23 Jul 2018 21:05:04 -0400 Subject: [PATCH 41/67] [CI-SKIP] Add Self to MIT List (#1262) Apparently I wasn't already on this list.. --- LICENSE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE.md b/LICENSE.md index 30af870c0d..f585b44f37 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -35,4 +35,5 @@ vemacs stonar96 Hugo Manrique Andrew Steinborn +willies952002 ``` From be34f22bf90ce8c8a7923f8886f9e25b63c7fe5c Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 21:09:25 -0400 Subject: [PATCH 42/67] Bring some 1.13 authors to master --- LICENSE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LICENSE.md b/LICENSE.md index c5341db551..f585b44f37 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -34,4 +34,6 @@ Brokkonaut vemacs stonar96 Hugo Manrique +Andrew Steinborn +willies952002 ``` From 64077154ff5ac360301bcc885a4be3d563946dbd Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:50:47 -0400 Subject: [PATCH 43/67] Add more entity debug info --- ...ies-option-to-debug-dupe-uuid-issues.patch | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index dceaca58c0..112f42f084 100644 --- a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -5,8 +5,27 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index bcce5e8b7..f5b9aa561 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + + while (iterator.hasNext()) { + Entity entity = (Entity) iterator.next(); ++ // Paper start ++ if (entity.getChunkX() != chunk.locX || entity.getChunkZ() != chunk.locZ) { ++ LogManager.getLogger().error(entity + " is not actually in this chunk! Report this to https://github.com/PaperMC/Paper/issues/1223", new Throwable()); ++ } ++ if ((int)Math.floor(entity.locX) >> 4 != chunk.locX || (int)Math.floor(entity.locZ) >> 4 != chunk.locZ) { ++ LogManager.getLogger().error(entity + " will be leaving this chunk but saved to it. Report this to https://github.com/PaperMC/Paper/issues/1223", new Throwable()); ++ } ++ // Paper end + + nbttagcompound1 = new NBTTagCompound(); + if (entity.d(nbttagcompound1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f6b755863..108654d63 100644 +index 99dac412f..0d3af8cb7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper From 3b12d748b40ea8117d83b1f2ee8ee3008767d5aa Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:50:56 -0400 Subject: [PATCH 44/67] Reduce and improve dupe uuid resolve message --- Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index 56262f7bc9..00494ddb1b 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -78,7 +78,7 @@ index 14c8edeff..e3f6557e1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 04adf4e3c..ea9559583 100644 +index 04adf4e3c..b31c301ec 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -126,13 +126,11 @@ index 04adf4e3c..ea9559583 100644 + switch (mode) { + case REGEN: { + entity.setUUID(UUID.randomUUID()); -+ logger.error("Duplicate UUID found used by " + other); -+ logger.error("Regenerated a new UUID for " + entity); ++ logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", regenerated UUID for " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); + break; + } + case DELETE: { -+ logger.error("Duplicate UUID found used by " + other); -+ logger.error("Deleting duplicate entity " + entity); ++ logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); + entity.die(); + iterator.remove(); + break; From f41ff893ddadba4256561eb350fa6dca6c8d9f7a Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:54:52 -0400 Subject: [PATCH 45/67] Mark chunk dirty on entity changes This is to hopefully help avoid any chunk saving entity issues. Marks the chunk that it NEEDS to be saved, ensuring the latest state gets saved. --- ...-anytime-entities-change-to-guarante.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch diff --git a/Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch new file mode 100644 index 0000000000..907f333677 --- /dev/null +++ b/Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 23 Jul 2018 22:18:31 -0400 +Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it + saves + + +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index b31c301ec..6de053781 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -0,0 +0,0 @@ public class Chunk { + entity.ad = this.locZ; + this.entitySlices[k].add(entity); + // Paper start ++ this.markDirty(); + entity.setCurrentChunk(this); + entityCounts.increment(entity.entityKeyString); + if (entity instanceof EntityItem) { +@@ -0,0 +0,0 @@ public class Chunk { + + // Paper start + if (!this.entitySlices[i].remove(entity)) { return; } ++ this.markDirty(); + entity.setCurrentChunk(null); + entityCounts.decrement(entity.entityKeyString); + if (entity instanceof EntityItem) { +-- \ No newline at end of file From 782c68dad715d371eb6bcd953320132aa9b96ecc Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:55:27 -0400 Subject: [PATCH 46/67] Add some debug for entity slices If we find any entity in an unexpected state, log it so we can discover what potentially put it in that state to relate to issue #1223 --- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch diff --git a/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch new file mode 100644 index 0000000000..c3e856e8fe --- /dev/null +++ b/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch @@ -0,0 +1,75 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 23 Jul 2018 22:44:23 -0400 +Subject: [PATCH] Add some Debug to Chunk Entity slices + +If we detect unexpected state, log and try to recover + +This should hopefully avoid duplicate entities ever being created +if the entity was to end up in 2 different chunk slices + +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 6de053781..be0b411e5 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -0,0 +0,0 @@ public class Chunk { + entity.ab = this.locX; + entity.ac = k; + entity.ad = this.locZ; +- this.entitySlices[k].add(entity); ++ + // Paper start ++ List entitySlice = this.entitySlices[k]; ++ boolean inThis = entitySlice.contains(entity); ++ if (entity.entitySlice != null || inThis) { ++ if (entity.entitySlice == entitySlice || inThis) { ++ LogManager.getLogger().warn(entity + " was already in this chunk section! Report this to https://github.com/PaperMC/Paper/issues/1223"); ++ new Throwable().printStackTrace(); ++ return; ++ } else { ++ LogManager.getLogger().warn(entity + " is still in another ChunkSection! Report this to https://github.com/PaperMC/Paper/issues/1223"); ++ ++ Chunk chunk = entity.getCurrentChunk(); ++ if (chunk != null) { ++ if (chunk != this) { ++ LogManager.getLogger().warn(entity + " was in another chunk at that! " + chunk.locX + "," + chunk.locZ); ++ } ++ chunk.removeEntity(entity); ++ } else { ++ removeEntity(entity); ++ } ++ new Throwable().printStackTrace(); ++ } ++ } ++ entity.entitySlice = entitySlice; ++ entitySlice.add(entity); ++ + this.markDirty(); + entity.setCurrentChunk(this); + entityCounts.increment(entity.entityKeyString); +@@ -0,0 +0,0 @@ public class Chunk { + + // Paper start + if (!this.entitySlices[i].remove(entity)) { return; } ++ if (entitySlices[i] == entity.entitySlice) { ++ entity.entitySlice = null; ++ } else { ++ LogManager.getLogger().warn(entity + " was removed from a entitySlice we did not expect. Report this to https://github.com/PaperMC/Paper/issues/1223"); ++ new Throwable().printStackTrace(); ++ } + this.markDirty(); + entity.setCurrentChunk(null); + entityCounts.decrement(entity.entityKeyString); +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 7188d0c99..b3120d7cc 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper + } + } + }; ++ Object entitySlice = null; + // Paper end + static boolean isLevelAtLeast(NBTTagCompound tag, int level) { + return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; +-- \ No newline at end of file From 6ee16a913b38ff03a254b9b85b855ae14f5cee40 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 23:00:57 -0400 Subject: [PATCH 47/67] Update upstream --- Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch | 8 ++++---- .../Handle-Item-Meta-Inconsistencies.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch index 9bd280792b..762d1ae440 100644 --- a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch @@ -40,7 +40,7 @@ index e2699564a..aad380c3b 100644 case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java new file mode 100644 -index 000000000..30941c7b0 +index 000000000..0e8acf12e --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +0,0 @@ @@ -219,8 +219,8 @@ index 000000000..30941c7b0 + } + + @Override -+ void deserializeInternal(NBTTagCompound tag) { -+ super.deserializeInternal(tag); ++ void deserializeInternal(NBTTagCompound tag, Object context) { ++ super.deserializeInternal(tag, context); + + if (tag.hasKey(ENTITY_TAG.NBT)) { + entityTag = tag.getCompound(ENTITY_TAG.NBT); @@ -354,7 +354,7 @@ index 000000000..30941c7b0 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index f1430d226..a3f293e4c 100644 +index f21c1e846..a5fcf6bd5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { diff --git a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch index 348cb9b594..997d285042 100644 --- a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch @@ -204,7 +204,7 @@ index f4672b9a4..e2699564a 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index b2190b01d..f1430d226 100644 +index f10de8550..f21c1e846 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ import java.lang.reflect.Constructor; @@ -274,7 +274,7 @@ index b2190b01d..f1430d226 100644 for (int i = 0; i < ench.size(); i++) { String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { - void deserializeInternal(NBTTagCompound tag) { + void deserializeInternal(NBTTagCompound tag, Object context) { } - static Map buildEnchantments(Map map, ItemMetaKey key) { diff --git a/work/Bukkit b/work/Bukkit index 0f4e33e9c7..d6214b1988 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 0f4e33e9c7a5b3fc9912c67265b725db43fc92cb +Subproject commit d6214b1988f3815e323c1c32c6885468ce21905e diff --git a/work/CraftBukkit b/work/CraftBukkit index ea7b61290a..2100017016 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit ea7b61290a39f0ab355d7a723907ed312f713b05 +Subproject commit 210001701695ed79ae0b6b81e23125671913fe9c From a78fe918bf447e83761650c1c2e3241fb62e4e69 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 23:50:09 -0400 Subject: [PATCH 48/67] Optimize Region File Cache CraftBukkit added synchronization to read and write methods. This adds much more contention on this object for accessing region files, as the entire read and write of NBT data is now a blocking operation. This causes issues when something then simply needs to check if a chunk exists on the main thread, causing a block... However, this synchronization was unnecessary, because there is already enough synchronization done to keep things safe 1) Obtaining a Region File: Those methods are still static synchronized. Meaning we can safely obtain a Region File concurrently. 2) RegionFile data access: Methods reading and manipulating data from a region file are also marked synchronized, ensuring that no 2 processes are reading or writing data at the same time. 3) Checking a region file for chunkExists: getOffset is also synchronized ensuring that even if a chunk is currently being written, it will be safe. By removing these synchronizations, we reduce the locking to only when data is being write or read. GZIP compression and NBT Buffer creation will no longer be part of the synchronized context, reducing lock times. Ultimately: This brings us back to Vanilla, which has had no indication of region file loss. Closes #1260 --- .../Optimize-Region-File-Cache.patch | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Spigot-Server-Patches/Optimize-Region-File-Cache.patch diff --git a/Spigot-Server-Patches/Optimize-Region-File-Cache.patch b/Spigot-Server-Patches/Optimize-Region-File-Cache.patch new file mode 100644 index 0000000000..fabd8d2f87 --- /dev/null +++ b/Spigot-Server-Patches/Optimize-Region-File-Cache.patch @@ -0,0 +1,65 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 23 Jul 2018 23:40:04 -0400 +Subject: [PATCH] Optimize Region File Cache + +CraftBukkit added synchronization to read and write methods. This adds +much more contention on this object for accessing region files, as +the entire read and write of NBT data is now a blocking operation. + +This causes issues when something then simply needs to check if a chunk exists +on the main thread, causing a block... + +However, this synchronization was unnecessary, because there is already +enough synchronization done to keep things safe + +1) Obtaining a Region File: Those methods are still static synchronized. + Meaning we can safely obtain a Region File concurrently. + +2) RegionFile data access: Methods reading and manipulating data from + a region file are also marked synchronized, ensuring that no 2 processes + are reading or writing data at the same time. + +3) Checking a region file for chunkExists: getOffset is also synchronized + ensuring that even if a chunk is currently being written, it will be safe. + +By removing these synchronizations, we reduce the locking to only +when data is being write or read. + +GZIP compression and NBT Buffer creation will no longer be part of the +synchronized context, reducing lock times. + +Ultimately: This brings us back to Vanilla, which has had no indication of region file loss. + +diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java +index 3b8d01ea1..609d6c355 100644 +--- a/src/main/java/net/minecraft/server/RegionFileCache.java ++++ b/src/main/java/net/minecraft/server/RegionFileCache.java +@@ -0,0 +0,0 @@ public class RegionFileCache { + + @Nullable + // CraftBukkit start - call sites hoisted for synchronization +- public static synchronized NBTTagCompound read(File file, int i, int j) throws IOException { ++ public static NBTTagCompound read(File file, int i, int j) throws IOException { // Paper - remove synchronization + RegionFile regionfile = a(file, i, j); + + DataInputStream datainputstream = regionfile.a(i & 31, j & 31); +@@ -0,0 +0,0 @@ public class RegionFileCache { + } + + @Nullable +- public static synchronized void write(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { ++ public static void write(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { // Paper - remove synchronization + RegionFile regionfile = a(file, i, j); + + DataOutputStream dataoutputstream = regionfile.c(i & 31, j & 31); +@@ -0,0 +0,0 @@ public class RegionFileCache { + } + // CraftBukkit end + +- public static synchronized boolean chunkExists(File file, int i, int j) { ++ public static boolean chunkExists(File file, int i, int j) { // Paper - remove synchronization + RegionFile regionfile = b(file, i, j); + + return regionfile != null ? regionfile.d(i & 31, j & 31) : false; +-- \ No newline at end of file From af10851ed2928d818c22a90ead4573be5b40714a Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 24 Jul 2018 00:48:07 -0400 Subject: [PATCH 49/67] restore uuid to Entity.toString --- .../add-more-information-to-Entity.toString.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index 7305e3cdf2..e26e844529 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index af7b91b479..47ce5cda76 100644 +index af7b91b47..a2101d44f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -14,7 +14,7 @@ index af7b91b479..47ce5cda76 100644 public String toString() { - return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}); -+ return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information ++ return String.format(Locale.ROOT, "%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information } public boolean isInvulnerable(DamageSource damagesource) { From 9b2a8bb9cf78bdebc3de3670a75ebf7f6b065301 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 24 Jul 2018 20:53:26 -0400 Subject: [PATCH 50/67] Update upstream --- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/work/Bukkit b/work/Bukkit index d6214b1988..f025ddf813 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit d6214b1988f3815e323c1c32c6885468ce21905e +Subproject commit f025ddf8133a837fa36a4220caefa1701c4e3466 diff --git a/work/CraftBukkit b/work/CraftBukkit index 2100017016..49a2604e1f 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 210001701695ed79ae0b6b81e23125671913fe9c +Subproject commit 49a2604e1f8721c813820c847f971df4c25002e1 From 875c84df6fd4ef50b36273c28b19191cc8f20723 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Wed, 25 Jul 2018 03:39:30 +0200 Subject: [PATCH 51/67] Fix broken block iteration (#1269) Fixes https://github.com/PaperMC/Paper/issues/1259 and generation of the end pillars --- Spigot-Server-Patches/MC-Dev-fixes.patch | 24 +++++++++++++------ Spigot-Server-Patches/MC-Utils.patch | 2 +- ...Location-getType-and-getBlockData-fo.patch | 2 +- .../Speedup-BlockPos-by-fixing-inlining.patch | 10 ++++++-- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index 798c3c42ed..dc44779c53 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index e8f7b729..a0ebc1ea 100644 +index e8f7b7292..a0ebc1eaa 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +0,0 @@ public class PaperCommand extends Command { @@ -15,7 +15,7 @@ index e8f7b729..a0ebc1ea 100644 + } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 002da2a1..121a137f 100644 +index 002da2a19..9f3aa2459 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { @@ -56,8 +56,20 @@ index 002da2a1..121a137f 100644 ++this.j; } +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + if (this.g.b < l) { + ++this.g.b; + } else if (this.g.c < i1) { ++ this.g.b = i; // Paper - Readd line removed by the decompiler + ++this.g.c; + } else if (this.g.d < j1) { ++ this.g.b = i; // Paper - Readd line removed by the decompiler ++ this.g.c = j; // Paper - Readd line removed by the decompiler + ++this.g.d; + } + diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index a661789c..785a1a21 100644 +index a661789c1..785a1a218 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java @@ -0,0 +0,0 @@ public class DefinedStructure { @@ -112,7 +124,7 @@ index a661789c..785a1a21 100644 public Iterator iterator() { diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index 3b8f6ec1..bde5714d 100644 +index 3b8f6ec16..bde5714dd 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java @@ -0,0 +0,0 @@ import java.util.Arrays; @@ -152,6 +164,4 @@ index 3b8f6ec1..bde5714d 100644 this.e = 0; this.f = 0; --- -2.17.0 (Apple Git-106) - +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index eb6ee73dda..eaba31a37a 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -18,7 +18,7 @@ index c3e990bdf..e2a7b4be2 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 121a137f3..279045e49 100644 +index 9f3aa2459..7dbea9090 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; diff --git a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch index 402f25aee5..76df830f37 100644 --- a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -31,7 +31,7 @@ index e2a7b4be2..58f8b4b72 100644 public BaseBlockPosition(int i, int j, int k) { this.a = i; diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 279045e49..7122a9aa8 100644 +index 7dbea9090..252e00e16 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { diff --git a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch index 6be8342b29..bf494c164f 100644 --- a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch @@ -21,7 +21,7 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 58f8b4b720..98992513da 100644 +index 58f8b4b72..98992513d 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -0,0 +0,0 @@ import javax.annotation.concurrent.Immutable; @@ -80,7 +80,7 @@ index 58f8b4b720..98992513da 100644 public BaseBlockPosition d(BaseBlockPosition baseblockposition) { return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 7122a9aa8a..2f6fc330b3 100644 +index 252e00e16..f769b178c 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { @@ -94,15 +94,21 @@ index 7122a9aa8a..2f6fc330b3 100644 - if (this.g.b < l) { - ++this.g.b; - } else if (this.g.c < i1) { +- this.g.b = i; // Paper - Readd line removed by the decompiler - ++this.g.c; - } else if (this.g.d < j1) { +- this.g.b = i; // Paper - Readd line removed by the decompiler +- this.g.c = j; // Paper - Readd line removed by the decompiler - ++this.g.d; + // Paper start - use xyz + if (this.g.x < l) { + ++this.g.x; + } else if (this.g.y < i1) { ++ this.g.x = i; // Paper - Readd line removed by the decompiler + ++this.g.y; + } else if (this.g.z < j1) { ++ this.g.x = i; // Paper - Readd line removed by the decompiler ++ this.g.y = j; // Paper - Readd line removed by the decompiler + ++this.g.z; + // Paper end } From 5992b9f2adfcd2116d96c0c14232d39140f6c5c5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 25 Jul 2018 01:11:08 -0400 Subject: [PATCH 52/67] Update upstream and remove hopper patch for #1270 --- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 4 +- .../Don-t-save-Proto-Chunks.patch | 4 +- ...-anytime-entities-change-to-guarante.patch | 2 +- Spigot-Server-Patches/Optimize-Hoppers.patch | 285 ------------------ .../Optimize-Region-File-Cache.patch | 2 +- .../Optimize-RegistryID.c.patch | 6 +- ...t-armor-stands-from-doing-entity-loo.patch | 4 +- ...ad-Safe-Iteration-of-Chunk-Scheduler.patch | 2 +- work/CraftBukkit | 2 +- 9 files changed, 12 insertions(+), 299 deletions(-) delete mode 100644 Spigot-Server-Patches/Optimize-Hoppers.patch diff --git a/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch index a4793ea548..e42524fe47 100644 --- a/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch @@ -9,7 +9,7 @@ This should hopefully avoid duplicate entities ever being created if the entity was to end up in 2 different chunk slices diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index aa75cc420..56a74c606 100644 +index aa75cc4205..56a74c6062 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -61,7 +61,7 @@ index aa75cc420..56a74c606 100644 if (entity instanceof EntityItem) { itemCounts[i]--; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b6d6d4f37..bc4ba9f3c 100644 +index 9f2a23d693..7a63114fe5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch index 218f246a73..4f433e2c6b 100644 --- a/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch +++ b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch @@ -8,7 +8,7 @@ the loadChunk method refuses to acknoledge they exists, and will restart a new chunk generation process to begin with, so saving them serves no benefit. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index ea8684747..a97e024ec 100644 +index 5fd0c0cf50..43348a627f 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -20,7 +20,7 @@ index ea8684747..a97e024ec 100644 world.checkSession(); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 501565dd5..7b3068753 100644 +index 501565dd5d..7b30687530 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java @@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler -Date: Wed, 27 Apr 2016 22:09:52 -0400 -Subject: [PATCH] Optimize Hoppers - -* Removes unnecessary extra calls to .update() that are very expensive -* Lots of itemstack cloning removed. Only clone if the item is actually moved -* Return true when a plugin cancels inventory move item event instead of false, as false causes pulls to cycle through all items. - However, pushes do not exhibit the same behavior, so this is not something plugins could of been relying on. -* Add option (Default on) to cooldown hoppers when they fail to move an item due to full inventory -* Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b9f5f49055..a8470e6e76 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -0,0 +0,0 @@ public class PaperWorldConfig { - squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); - } - -+ public boolean cooldownHopperWhenFull = true; -+ public boolean disableHopperMoveEvents = false; -+ private void hopperOptimizations() { -+ cooldownHopperWhenFull = getBoolean("hopper.cooldown-when-full", cooldownHopperWhenFull); -+ log("Cooldown Hoppers when Full: " + (cooldownHopperWhenFull ? "enabled" : "disabled")); -+ disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); -+ log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); -+ } -+ - public boolean disableSprintInterruptionOnAttack; - private void disableSprintInterruptionOnAttack() { - disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 66b637326a..f9a7bde0b6 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati - - if (true || i == 0 || this.getAllowNether()) { // CraftBukkit - WorldServer worldserver = this.worlds.get(i); -+ TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - - this.methodProfiler.a(() -> { - return worldserver.getWorldData().getName(); -diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 3e9b357c87..db78274a8c 100644 ---- a/src/main/java/net/minecraft/server/TileEntity.java -+++ b/src/main/java/net/minecraft/server/TileEntity.java -@@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { - public void setCurrentChunk(Chunk chunk) { - this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null; - } -+ static boolean IGNORE_TILE_UPDATES = false; - // Paper end - - @Nullable -@@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { - - public void update() { - if (this.world != null) { -+ if (IGNORE_TILE_UPDATES) return; // Paper - this.f = this.world.getType(this.position); - this.world.b(this.position, this); - if (!this.f.isAir()) { -diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index bb41d4780f..9e7a91fe48 100644 ---- a/src/main/java/net/minecraft/server/TileEntityHopper.java -+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - return false; - } - -+ // Paper start - Optimize Hoppers -+ private static boolean skipPullModeEventFire = false; -+ private static boolean skipPushModeEventFire = false; -+ static boolean skipHopperEvents = false; -+ -+ private boolean hopperPush(IInventory iinventory, EnumDirection enumdirection) { -+ skipPushModeEventFire = skipHopperEvents; -+ boolean foundItem = false; -+ for (int i = 0; i < this.getSize(); ++i) { -+ if (!this.getItem(i).isEmpty()) { -+ foundItem = true; -+ ItemStack origItemStack = this.getItem(i); -+ ItemStack itemstack = origItemStack; -+ -+ final int origCount = origItemStack.getCount(); -+ final int moved = Math.min(world.spigotConfig.hopperAmount, origCount); -+ origItemStack.setCount(moved); -+ -+ // We only need to fire the event once to give protection plugins a chance to cancel this event -+ // Because nothing uses getItem, every event call should end up the same result. -+ if (!skipPushModeEventFire) { -+ itemstack = callPushMoveEvent(iinventory, itemstack); -+ if (itemstack == null) { // cancelled -+ origItemStack.setCount(origCount); -+ return false; -+ } -+ } -+ final ItemStack itemstack2 = addItem(this, iinventory, itemstack, enumdirection); -+ final int remaining = itemstack2.getCount(); -+ if (remaining != moved) { -+ origItemStack = origItemStack.cloneItemStack(); -+ origItemStack.setCount(origCount - moved + remaining); -+ this.setItem(i, origItemStack); -+ iinventory.update(); -+ return true; -+ } -+ origItemStack.setCount(origCount); -+ } -+ } -+ if (foundItem && world.paperConfig.cooldownHopperWhenFull) { // Inventory was full - cooldown -+ this.setCooldown(world.spigotConfig.hopperTransfer); -+ } -+ return false; -+ } -+ -+ private static boolean hopperPull(IHopper ihopper, IInventory iinventory, int i) { -+ ItemStack origItemStack = iinventory.getItem(i); -+ ItemStack itemstack = origItemStack; -+ final int origCount = origItemStack.getCount(); -+ final World world = ihopper.getWorld(); -+ final int moved = Math.min(world.spigotConfig.hopperAmount, origCount); -+ itemstack.setCount(moved); -+ -+ if (!skipPullModeEventFire) { -+ itemstack = callPullMoveEvent(ihopper, iinventory, itemstack); -+ if (itemstack == null) { // cancelled -+ origItemStack.setCount(origCount); -+ // Drastically improve performance by returning true. -+ // No plugin could of relied on the behavior of false as the other call -+ // site for IMIE did not exhibit the same behavior -+ return true; -+ } -+ } -+ -+ final ItemStack itemstack2 = addItem(iinventory, ihopper, itemstack, null); -+ final int remaining = itemstack2.getCount(); -+ if (remaining != moved) { -+ origItemStack = origItemStack.cloneItemStack(); -+ origItemStack.setCount(origCount - moved + remaining); -+ IGNORE_TILE_UPDATES = true; -+ iinventory.setItem(i, origItemStack); -+ IGNORE_TILE_UPDATES = false; -+ iinventory.update(); -+ return true; -+ } -+ origItemStack.setCount(origCount); -+ -+ if (world.paperConfig.cooldownHopperWhenFull) { -+ cooldownHopper(ihopper); -+ } -+ -+ return false; -+ } -+ -+ private ItemStack callPushMoveEvent(IInventory iinventory, ItemStack itemstack) { -+ Inventory destinationInventory = getInventory(iinventory); -+ InventoryMoveItemEvent event = new InventoryMoveItemEvent(this.getOwner(false).getInventory(), -+ CraftItemStack.asCraftMirror(itemstack), destinationInventory, true); -+ boolean result = event.callEvent(); -+ if (!event.calledGetItem && !event.calledSetItem) { -+ skipPushModeEventFire = true; -+ } -+ if (!result) { -+ cooldownHopper(this); -+ return null; -+ } -+ -+ if (event.calledSetItem) { -+ return CraftItemStack.asNMSCopy(event.getItem()); -+ } else { -+ return itemstack; -+ } -+ } -+ -+ private static ItemStack callPullMoveEvent(IHopper hopper, IInventory iinventory, ItemStack itemstack) { -+ Inventory sourceInventory = getInventory(iinventory); -+ Inventory destination = getInventory(hopper); -+ -+ InventoryMoveItemEvent event = new InventoryMoveItemEvent(sourceInventory, -+ // Mirror is safe as we no plugins ever use this item -+ CraftItemStack.asCraftMirror(itemstack), destination, false); -+ boolean result = event.callEvent(); -+ if (!event.calledGetItem && !event.calledSetItem) { -+ skipPullModeEventFire = true; -+ } -+ if (!result) { -+ cooldownHopper(hopper); -+ return null; -+ } -+ -+ if (event.calledSetItem) { -+ return CraftItemStack.asNMSCopy(event.getItem()); -+ } else { -+ return itemstack; -+ } -+ } -+ -+ private static Inventory getInventory(IInventory iinventory) { -+ Inventory sourceInventory;// Have to special case large chests as they work oddly -+ if (iinventory instanceof InventoryLargeChest) { -+ sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory); -+ } else if (iinventory instanceof TileEntity) { -+ sourceInventory = ((TileEntity) iinventory).getOwner(false).getInventory(); -+ } else { -+ sourceInventory = iinventory.getOwner().getInventory(); -+ } -+ return sourceInventory; -+ } -+ -+ private static void cooldownHopper(IHopper hopper) { -+ if (hopper instanceof TileEntityHopper) { -+ ((TileEntityHopper) hopper).setCooldown(hopper.getWorld().spigotConfig.hopperTransfer); -+ } else if (hopper instanceof EntityMinecartHopper) { -+ ((EntityMinecartHopper) hopper).setCooldown(hopper.getWorld().spigotConfig.hopperTransfer / 2); -+ } -+ } -+ -+ // Paper end - private boolean s() { - IInventory iinventory = this.D(); - -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - if (this.a(iinventory, enumdirection)) { - return false; - } else { -+ return hopperPush(iinventory, enumdirection); /* // Paper - disable rest - for (int i = 0; i < this.getSize(); ++i) { - if (!this.getItem(i).isEmpty()) { - ItemStack itemstack = this.getItem(i).cloneItemStack(); -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - } - } - -- return false; -+ return false;*/ // Paper - end commenting out replaced block for Hopper Optimizations - } - } - } -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - if (b(iinventory, enumdirection)) { - return false; - } -+ skipPullModeEventFire = skipHopperEvents; // Paper - - if (iinventory instanceof IWorldInventory) { - IWorldInventory iworldinventory = (IWorldInventory) iinventory; -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - ItemStack itemstack = iinventory.getItem(i); - - if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) { -+ return hopperPull(ihopper, iinventory, i); /* // Paper - disable rest - ItemStack itemstack1 = itemstack.cloneItemStack(); - // ItemStack itemstack2 = addItem(iinventory, ihopper, iinventory.splitStack(i, 1), (EnumDirection) null); - // CraftBukkit start - Call event on collection of items from inventories into the hopper -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - } - - itemstack1.subtract(origCount - itemstack2.getCount()); // Spigot -- iinventory.setItem(i, itemstack1); -+ iinventory.setItem(i, itemstack1);*/ // Paper - end commenting out replaced block for Hopper Optimizations - } - - return false; -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - public static boolean a(IInventory iinventory, EntityItem entityitem) { - boolean flag = false; - // CraftBukkit start -- InventoryPickupItemEvent event = new InventoryPickupItemEvent(iinventory.getOwner().getInventory(), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); -+ InventoryPickupItemEvent event = new InventoryPickupItemEvent(getInventory(iinventory), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); // Paper - use getInventory() to avoid snapshot creation - entityitem.world.getServer().getPluginManager().callEvent(event); - if (event.isCancelled()) { - return false; -@@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - boolean flag1 = iinventory1.P_(); - - if (itemstack1.isEmpty()) { -+ IGNORE_TILE_UPDATES = true; // Paper - iinventory1.setItem(i, itemstack); -+ IGNORE_TILE_UPDATES = false; // Paper - itemstack = ItemStack.a; - flag = true; - } else if (a(itemstack1, itemstack)) { --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-Region-File-Cache.patch b/Spigot-Server-Patches/Optimize-Region-File-Cache.patch index fabd8d2f87..53a3455925 100644 --- a/Spigot-Server-Patches/Optimize-Region-File-Cache.patch +++ b/Spigot-Server-Patches/Optimize-Region-File-Cache.patch @@ -32,7 +32,7 @@ synchronized context, reducing lock times. Ultimately: This brings us back to Vanilla, which has had no indication of region file loss. diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 3b8d01ea1..609d6c355 100644 +index 3b8d01ea1a..609d6c3550 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -0,0 +0,0 @@ public class RegionFileCache { diff --git a/Spigot-Server-Patches/Optimize-RegistryID.c.patch b/Spigot-Server-Patches/Optimize-RegistryID.c.patch index 414eba0e64..97f312f7e5 100644 --- a/Spigot-Server-Patches/Optimize-RegistryID.c.patch +++ b/Spigot-Server-Patches/Optimize-RegistryID.c.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize RegistryID.c() This is a frequent hotspot for world loading/saving. diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index bde5714d..a01cda9d 100644 +index bde5714dd6..a01cda9d81 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java @@ -0,0 +0,0 @@ public class RegistryID implements Registry { // Paper - decompile fix @@ -63,6 +63,4 @@ index bde5714d..a01cda9d 100644 } public int b() { --- -2.17.0 (Apple Git-106) - +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 207a00974d..05ef0979e1 100644 --- a/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a8470e6e7..f33cd90d2 100644 +index b9f5f49055..aa95372e69 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index a8470e6e7..f33cd90d2 100644 private void maxEntityCollision() { maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 127dcedc9..72e22c09b 100644 +index 127dcedc97..72e22c09ba 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ import java.util.Iterator; diff --git a/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch b/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch index 05f0267827..af92ed24de 100644 --- a/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch +++ b/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Thread Safe Iteration of Chunk Scheduler diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 7b3068753..45f9ad372 100644 +index 7b30687530..45f9ad3726 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java @@ -0,0 +0,0 @@ diff --git a/work/CraftBukkit b/work/CraftBukkit index 49a2604e1f..9646d8d780 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 49a2604e1f8721c813820c847f971df4c25002e1 +Subproject commit 9646d8d7800931effa31be173fda765ecdf996c4 From 34a60bdae90fda28cff6d850117805ca2895615d Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 25 Jul 2018 01:24:28 -0400 Subject: [PATCH 53/67] Fix RCON Ip Defaulting to wrong value - Closes #1267 --- .../Configurable-RCON-IP-address.patch | 4 ++-- ...air-bad-rcon.ip-settings-temporarily.patch | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Spigot-Server-Patches/repair-bad-rcon.ip-settings-temporarily.patch diff --git a/Spigot-Server-Patches/Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/Configurable-RCON-IP-address.patch index 204dbae289..acc368ad05 100644 --- a/Spigot-Server-Patches/Configurable-RCON-IP-address.patch +++ b/Spigot-Server-Patches/Configurable-RCON-IP-address.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable RCON IP address For servers with multiple IP's, ability to bind to a specific interface. diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java -index 6f0176f6f..1e5caa13a 100644 +index 6f0176f6ff..c237f239f3 100644 --- a/src/main/java/net/minecraft/server/RemoteControlListener.java +++ b/src/main/java/net/minecraft/server/RemoteControlListener.java @@ -0,0 +0,0 @@ public class RemoteControlListener extends RemoteConnectionThread { @@ -14,7 +14,7 @@ index 6f0176f6f..1e5caa13a 100644 this.h = iminecraftserver.a("rcon.port", 0); this.l = iminecraftserver.a("rcon.password", ""); - this.j = iminecraftserver.e(); -+ this.j = iminecraftserver.a("rcon.ip", iminecraftserver.d_()); // Paper ++ this.j = iminecraftserver.a("rcon.ip", ((DedicatedServer) iminecraftserver).getServerIp()); // Paper this.i = iminecraftserver.f(); if (0 == this.h) { this.h = this.i + 10; diff --git a/Spigot-Server-Patches/repair-bad-rcon.ip-settings-temporarily.patch b/Spigot-Server-Patches/repair-bad-rcon.ip-settings-temporarily.patch new file mode 100644 index 0000000000..e5c7bc422c --- /dev/null +++ b/Spigot-Server-Patches/repair-bad-rcon.ip-settings-temporarily.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 25 Jul 2018 01:21:05 -0400 +Subject: [PATCH] repair bad rcon.ip settings temporarily + +accidently missed mapping change, and we defaulted rcon.ip to the server.properties file path + +clean up values for people, drop this patch after like 2 weeks. + +diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java +index c237f239f3..1319b3b916 100644 +--- a/src/main/java/net/minecraft/server/RemoteControlListener.java ++++ b/src/main/java/net/minecraft/server/RemoteControlListener.java +@@ -0,0 +0,0 @@ public class RemoteControlListener extends RemoteConnectionThread { + this.h = iminecraftserver.a("rcon.port", 0); + this.l = iminecraftserver.a("rcon.password", ""); + this.j = iminecraftserver.a("rcon.ip", ((DedicatedServer) iminecraftserver).getServerIp()); // Paper ++ if (this.j.equals(iminecraftserver.d_())) this.j = ((DedicatedServer) iminecraftserver).getServerIp(); // Paper - temporary - remove this after like 2 weeks - repair bad settings + this.i = iminecraftserver.f(); + if (0 == this.h) { + this.h = this.i + 10; +-- \ No newline at end of file From 3aa400a7ca5b4a1859523c496a52e28b99e0fda5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 25 Jul 2018 01:38:37 -0400 Subject: [PATCH 54/67] Expand Location Manipulation API - Closes #1265 Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z); --- .../Expand-Location-Manipulation-API.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Spigot-API-Patches/Expand-Location-Manipulation-API.patch diff --git a/Spigot-API-Patches/Expand-Location-Manipulation-API.patch b/Spigot-API-Patches/Expand-Location-Manipulation-API.patch new file mode 100644 index 0000000000..b4fc93e736 --- /dev/null +++ b/Spigot-API-Patches/Expand-Location-Manipulation-API.patch @@ -0,0 +1,64 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 25 Jul 2018 01:36:07 -0400 +Subject: [PATCH] Expand Location Manipulation API + +Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z); + +diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java +index d0d86e1a..253f0c2d 100644 +--- a/src/main/java/org/bukkit/Location.java ++++ b/src/main/java/org/bukkit/Location.java +@@ -0,0 +0,0 @@ public class Location implements Cloneable, ConfigurationSerializable { + public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper + + // Paper start ++ ++ /** ++ * Sets the position of this Location and returns itself ++ * ++ * This mutates this object, clone first. ++ * @param x X coordinate ++ * @param y Y coordinate ++ * @param z Z coordinate ++ * @return self (not cloned) ++ */ ++ public Location set(double x, double y, double z) { ++ this.x = x; ++ this.y = y; ++ this.z = z; ++ return this; ++ } ++ ++ /** ++ * Takes the x/y/z from base and adds the specified x/y/z to it and returns self ++ * ++ * This mutates this object, clone first. ++ * @param base The base coordinate to modify ++ * @param x X coordinate to add to base ++ * @param y Y coordinate to add to base ++ * @param z Z coordinate to add to base ++ * @return self (not cloned) ++ */ ++ public Location add(Location base, double x, double y, double z) { ++ return this.set(base.x + x, base.y + y, base.z + z); ++ } ++ ++ /** ++ * Takes the x/y/z from base and subtracts the specified x/y/z to it and returns self ++ * ++ * This mutates this object, clone first. ++ * @param base The base coordinate to modify ++ * @param x X coordinate to subtract from base ++ * @param y Y coordinate to subtract from base ++ * @param z Z coordinate to subtract from base ++ * @return self (not cloned) ++ */ ++ public Location subtract(Location base, double x, double y, double z) { ++ return this.set(base.x - x, base.y - y, base.z - z); ++ } ++ + /** + * @return A new location where X/Y/Z are on the Block location (integer value of X/Y/Z) + */ +-- \ No newline at end of file From 10ed7dc6b4b7baccc3f689c6d7abcc7f67bb2310 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 25 Jul 2018 09:58:03 +0100 Subject: [PATCH 55/67] Explictly reset chat format in vanilla scoreboard display (fixes #1263) Vanilla now uses chat components for scoreboards, thus no longer returns a string which also resets the chat the chat format, add this back ourselves. --- ...ption-to-make-parrots-stay-on-shoulders-despite.patch | 6 +++--- .../Fix-AIOOBE-in-inventory-handling.patch | 2 +- ...xploit-that-allowed-colored-signs-to-be-created.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 4 ++-- ...n-to-use-vanilla-per-world-scoreboard-coloring-.patch | 9 +++++---- .../Properly-fix-item-duplication-bug.patch | 2 +- ...sh-player-inventory-when-cancelling-PlayerInter.patch | 2 +- .../handle-PacketPlayInKeepAlive-async.patch | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch index 3481a7f023..6111f7fa74 100644 --- a/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -11,7 +11,7 @@ I suspect Mojang may switch to this behavior before full release. To be converted into a Paper-API event at some point in the future? diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4991138df..87c599338 100644 +index 4991138dfe..87c599338a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -26,7 +26,7 @@ index 4991138df..87c599338 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 06b663c4d..42c624953 100644 +index 06b663c4db..42c6249535 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -39,7 +39,7 @@ index 06b663c4d..42c624953 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 3bcca32ba..355d61704 100644 +index 08ef17dfe1..d4701d8d56 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch index a52244dcb3..773c3a1f95 100644 --- a/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch +++ b/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix AIOOBE in inventory handling diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index fc33baf2bf..9ec898d164 100644 +index 0fe8d1c3f1..ed02cd7a7a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch index fdd5089de5..3e2614a2e5 100644 --- a/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5778bf1c65..5ee25d70fc 100644 +index 90ac83b5b1..7bf99cae1b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 51cf6c2dd5..2e9ca41b7d 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -110,7 +110,7 @@ index 7059fc1187..0c01f8dafa 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5ee25d70fc..fc47738ec5 100644 +index 7bf99cae1b..5ffc4fccd0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -155,7 +155,7 @@ index 4b9ecb4a62..b602a5d1b9 100644 public boolean isBlocking() { return getHandle().isBlocking(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ab9956fa24..0f3e1d5ae1 100644 +index 8c1e497592..a10a78994f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 9105521fa0..6bd0bcd6b2 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 667a0dde8..b6ef1d437 100644 +index 667a0dde8c..b6ef1d4378 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 667a0dde8..b6ef1d437 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a465f1cf7..76934f81a 100644 +index a465f1cf79..76934f81a8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -31,7 +31,7 @@ index a465f1cf7..76934f81a 100644 public ScoreboardTeamBase be() { if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 90ab7f065..8902e3db0 100644 +index 90ab7f065f..1ca3c87c7a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -42,7 +42,8 @@ index 90ab7f065..8902e3db0 100644 + // Paper Start - (Meh) Support for vanilla world scoreboard name coloring + String displayName = event.getPlayer().getDisplayName(); + if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) { -+ displayName = CraftChatMessage.fromComponent(ScoreboardTeam.a(this.player.getTeam(),((CraftPlayer) player).getHandle().getDisplayName())); ++ // Explicitly add a RESET here, vanilla uses components for this now... ++ displayName = CraftChatMessage.fromComponent(ScoreboardTeam.a(this.player.getTeam(),((CraftPlayer) player).getHandle().getDisplayName())) + org.bukkit.ChatColor.RESET; + } + + s = String.format(event.getFormat(), displayName, event.getMessage()); diff --git a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch index d451c21fd6..566cfa7ccd 100644 --- a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch @@ -19,7 +19,7 @@ index 4bde378afb..7059fc1187 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index fc4e927d67..9ac86f7af2 100644 +index 969e28c3b2..3885c8628c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch index 8b72363374..669075fe40 100644 --- a/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,7 +16,7 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index fc47738ec5..6950f8a729 100644 +index 5ffc4fccd0..a405cc0a2a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch index eabea7e75c..800d15f9c9 100644 --- a/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch @@ -15,7 +15,7 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7465c548af..add29081d2 100644 +index c1dd2db89d..e8f1883c98 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { From dccf0f6a084d2fda2e45ca69ac65b55179095359 Mon Sep 17 00:00:00 2001 From: Max Lee Date: Wed, 25 Jul 2018 23:19:51 +0100 Subject: [PATCH 56/67] Apply spawner delay for cancelled pre spawn events (#1276) Setting the flag updates the spawner's delay which stops the spawner from trying to find a new spawn position each tick efter the event was cancelled/aborted which makes it usable for mob stackers/mergers and other plugins that don't actually want any mob to spawn in the spawner cycle but keep the overall behaviour close to vanilla. This might slightly effect existing plugins that use this event but I doubt anyone really relied on this behaviour, the only possible use case that I can think of is cancelling the event until you find a suitable position in your plugin... and this should be handled by the plugin itself by cancelling and spawning at the position manually. --- Spigot-Server-Patches/PreCreatureSpawnEvent.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch index b2dfcc1c6d..5cebb9ea2a 100644 --- a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch @@ -15,7 +15,7 @@ instead and save a lot of server resources. See: https://github.com/PaperMC/Paper/issues/917 diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 87fe4775f..9466bcdc7 100644 +index 87fe4775..94d0b8a3 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ @@ -44,6 +44,7 @@ index 87fe4775f..9466bcdc7 100644 + org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER + ); + if (!event.callEvent()) { ++ flag = true; + if (event.shouldAbortSpawn()) { + break; + } @@ -55,7 +56,7 @@ index 87fe4775f..9466bcdc7 100644 if (entity == null) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 2cd063829..e217d3340 100644 +index ed22607d..5d633774 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { From 8536a71daa9d6478330dc0ae561938e22e9ce3a9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 25 Jul 2018 19:05:07 -0400 Subject: [PATCH 57/67] Update upstream --- ...eload-permissions.yml-and-require-co.patch | 4 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- .../Add-getI18NDisplayName-API.patch | 2 +- Spigot-API-Patches/Add-getTPS-method.patch | 4 +- .../Allow-Reloading-of-Command-Aliases.patch | 4 +- .../Basic-PlayerProfile-API.patch | 4 +- .../Expose-server-CommandMap.patch | 4 +- ...PI-additions-for-quantity-flags-lore.patch | 2 +- .../ItemStack-getMaxItemUseDuration.patch | 2 +- Spigot-API-Patches/Timings-v2.patch | 4 +- .../ensureServerConversions-API.patch | 2 +- .../Add-UnknownCommandEvent.patch | 2 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- .../Add-exception-reporting-event.patch | 22 +++---- ...d-method-to-open-already-placed-sign.patch | 2 +- ...setting-for-proxy-online-mode-status.patch | 6 +- .../Add-velocity-warnings.patch | 6 +- .../Allow-Reloading-of-Command-Aliases.patch | 2 +- ...llow-Reloading-of-Custom-Permissions.patch | 2 +- ...Item-entities-with-World.spawnEntity.patch | 2 +- .../AsyncTabCompleteEvent.patch | 4 +- .../Auto-Save-Improvements.patch | 16 ++--- .../Basic-PlayerProfile-API.patch | 4 +- .../Chunk-Save-Stats-Debug-Option.patch | 2 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 10 ++-- ...ading-permissions.yml-before-plugins.patch | 4 +- ...unk-Unloads-based-on-Player-Movement.patch | 16 ++--- .../Ensure-commands-are-not-ran-async.patch | 10 ++-- .../Expand-Explosions-API.patch | 2 +- ...ld.spawnParticle-API-and-add-Builder.patch | 2 +- ...PI-for-Reason-Source-Triggering-play.patch | 2 +- .../Expose-server-CommandMap.patch | 2 +- .../Fix-Chunk-Unload-Queue-Issues.patch | 2 +- .../Further-improve-server-tick-loop.patch | 6 +- .../Implement-World.getEntity-UUID-API.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 2 +- Spigot-Server-Patches/Lighting-Queue.patch | 14 ++--- ...more-aggressive-in-the-chunk-unload-.patch | 2 +- .../Paper-config-files.patch | 20 +++---- ...vent-Auto-Save-if-Save-Queue-is-full.patch | 6 +- .../Remove-Metadata-on-reload.patch | 2 +- .../Shoulder-Entities-Release-API.patch | 2 +- ...ient-crashes-server-lists-and-Mojang.patch | 10 ++-- ...ad-Safe-Iteration-of-Chunk-Scheduler.patch | 2 +- Spigot-Server-Patches/Timings-v2.patch | 58 +++++++++---------- ...oleAppender-for-console-improvements.patch | 4 +- .../getPlayerUniqueId-API.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 49 files changed, 148 insertions(+), 148 deletions(-) diff --git a/Spigot-API-Patches/Add-command-to-reload-permissions.yml-and-require-co.patch b/Spigot-API-Patches/Add-command-to-reload-permissions.yml-and-require-co.patch index 4dd556270e..fbcc31b57b 100644 --- a/Spigot-API-Patches/Add-command-to-reload-permissions.yml-and-require-co.patch +++ b/Spigot-API-Patches/Add-command-to-reload-permissions.yml-and-require-co.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 0844862c..bce4ba1b 100644 +index 471ae811..d6686820 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { @@ -24,7 +24,7 @@ index 0844862c..bce4ba1b 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 1ad2cba4..b6a2141c 100644 +index 56b0fdb5..5a4528c4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch index 630bb029a5..de87f23c7d 100644 --- a/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-API-Patches/Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 70495c15..c918d67c 100644 +index 35e18341..9558645f 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { @@ -27,7 +27,7 @@ index 70495c15..c918d67c 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 94d709f4..96044f4b 100644 +index 12efd654..da0d08b3 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/Add-getI18NDisplayName-API.patch b/Spigot-API-Patches/Add-getI18NDisplayName-API.patch index 859ae734a6..e001c08c83 100644 --- a/Spigot-API-Patches/Add-getI18NDisplayName-API.patch +++ b/Spigot-API-Patches/Add-getI18NDisplayName-API.patch @@ -28,7 +28,7 @@ index 045c26d9..47bbc0f9 100644 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 24a45189..b1d0778f 100644 +index 4940e726..e52a39ec 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { diff --git a/Spigot-API-Patches/Add-getTPS-method.patch b/Spigot-API-Patches/Add-getTPS-method.patch index 4967340231..c948734314 100644 --- a/Spigot-API-Patches/Add-getTPS-method.patch +++ b/Spigot-API-Patches/Add-getTPS-method.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add getTPS method diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 68b5e1c9..f3252e20 100644 +index b56c09d3..477a5833 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { @@ -26,7 +26,7 @@ index 68b5e1c9..f3252e20 100644 * Get the advancement specified by this key. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 331bb061..eb98c600 100644 +index 4ddb8b02..1fa6f53e 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/Allow-Reloading-of-Command-Aliases.patch b/Spigot-API-Patches/Allow-Reloading-of-Command-Aliases.patch index f5a2817aa3..6b663c48d3 100644 --- a/Spigot-API-Patches/Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-API-Patches/Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index bce4ba1b..70495c15 100644 +index d6686820..35e18341 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { @@ -26,7 +26,7 @@ index bce4ba1b..70495c15 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b6a2141c..94d709f4 100644 +index 5a4528c4..12efd654 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/Basic-PlayerProfile-API.patch b/Spigot-API-Patches/Basic-PlayerProfile-API.patch index e52a2a9011..b4b7de1185 100644 --- a/Spigot-API-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-API-Patches/Basic-PlayerProfile-API.patch @@ -239,7 +239,7 @@ index 00000000..d17061e6 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index c918d67c..01a226d9 100644 +index 9558645f..86e72f95 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator; @@ -291,7 +291,7 @@ index c918d67c..01a226d9 100644 public static Server.Spigot spigot() diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 96044f4b..6c96fc14 100644 +index da0d08b3..878255a4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator; diff --git a/Spigot-API-Patches/Expose-server-CommandMap.patch b/Spigot-API-Patches/Expose-server-CommandMap.patch index 3974cca48b..b2189601a7 100644 --- a/Spigot-API-Patches/Expose-server-CommandMap.patch +++ b/Spigot-API-Patches/Expose-server-CommandMap.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index f3252e20..a291ebd6 100644 +index 477a5833..73c85063 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ import org.bukkit.boss.BarColor; @@ -39,7 +39,7 @@ index f3252e20..a291ebd6 100644 { return server.spigot(); diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index e6a5cd2a..901199e3 100644 +index 1fa6f53e..70e19580 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ import org.bukkit.boss.BarColor; diff --git a/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch b/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch index fdcc043f01..09ddac90be 100644 --- a/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch +++ b/Spigot-API-Patches/ItemStack-API-additions-for-quantity-flags-lore.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 4385ca79..7eb00104 100644 +index 84a399e0..4a27f4fc 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ package org.bukkit.inventory; diff --git a/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch b/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch index c43c1344b0..05ed4765a8 100644 --- a/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-API-Patches/ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index b1d0778f..4385ca79 100644 +index e52a39ec..84a399e0 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { diff --git a/Spigot-API-Patches/Timings-v2.patch b/Spigot-API-Patches/Timings-v2.patch index e4bee1cebd..54df8eaa4e 100644 --- a/Spigot-API-Patches/Timings-v2.patch +++ b/Spigot-API-Patches/Timings-v2.patch @@ -3004,7 +3004,7 @@ index 00000000..df592d85 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 0f42a66a..68b5e1c9 100644 +index ff7f436c..b56c09d3 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { @@ -3016,7 +3016,7 @@ index 0f42a66a..68b5e1c9 100644 /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 053a24dc..0d41f7db 100644 +index a766ee96..4ddb8b02 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/ensureServerConversions-API.patch b/Spigot-API-Patches/ensureServerConversions-API.patch index 64f4efee68..39045e6ae7 100644 --- a/Spigot-API-Patches/ensureServerConversions-API.patch +++ b/Spigot-API-Patches/ensureServerConversions-API.patch @@ -28,7 +28,7 @@ index 762c43d6..045c26d9 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 41a43053..24a45189 100644 +index 3c91cbe6..4940e726 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { diff --git a/Spigot-Server-Patches/Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/Add-UnknownCommandEvent.patch index 23a3cf9723..47c851df88 100644 --- a/Spigot-Server-Patches/Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/Add-UnknownCommandEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 21d9f381cc..814a65ec58 100644 +index 47b4c01067..ca696b2417 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.Versioning; diff --git a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch index 62439dde5b..672c40149d 100644 --- a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 644e01101..329950802 100644 +index 644e011017..329950802f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -20,7 +20,7 @@ index 644e01101..329950802 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d7247a1ec..ff9346023 100644 +index 35b26d6128..8412e71d71 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-exception-reporting-event.patch b/Spigot-Server-Patches/Add-exception-reporting-event.patch index e87841cb2c..8a07c47238 100644 --- a/Spigot-Server-Patches/Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/Add-exception-reporting-event.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java new file mode 100644 -index 000000000..93397188b +index 0000000000..93397188b7 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java @@ -0,0 +0,0 @@ @@ -50,7 +50,7 @@ index 000000000..93397188b +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0d80d811a..e3f7ec610 100644 +index 0d80d811a3..e3f7ec6100 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -98,7 +98,7 @@ index 0d80d811a..e3f7ec610 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 48b484da1..6917fdbe0 100644 +index d025d949e3..0e04d65981 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ import java.util.concurrent.ExecutionException; @@ -140,7 +140,7 @@ index 48b484da1..6917fdbe0 100644 } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 33e5aaf2c..f13534917 100644 +index 33e5aaf2c0..f135349174 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -0,0 +0,0 @@ @@ -167,7 +167,7 @@ index 33e5aaf2c..f13534917 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java -index 6b5600ba5..72f386720 100644 +index 6b5600ba5f..72f3867203 100644 --- a/src/main/java/net/minecraft/server/PersistentCollection.java +++ b/src/main/java/net/minecraft/server/PersistentCollection.java @@ -0,0 +0,0 @@ @@ -194,7 +194,7 @@ index 6b5600ba5..72f386720 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 31899549d..cc7cad8be 100644 +index 31899549d5..cc7cad8be4 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -0,0 +0,0 @@ @@ -221,7 +221,7 @@ index 31899549d..cc7cad8be 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 0e91aeec3..ff473a263 100644 +index 0e91aeec38..ff473a263f 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -0,0 +0,0 @@ @@ -240,7 +240,7 @@ index 0e91aeec3..ff473a263 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index b12e767db..342a15db5 100644 +index b12e767db9..342a15db5e 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager; @@ -268,7 +268,7 @@ index b12e767db..342a15db5 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index 4ff243dab..67b2e41c7 100644 +index 4ff243dabe..67b2e41c7c 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -0,0 +0,0 @@ @@ -288,7 +288,7 @@ index 4ff243dab..67b2e41c7 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 30cafca04..fa75ed496 100644 +index 30cafca041..fa75ed4963 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -325,7 +325,7 @@ index 30cafca04..fa75ed496 100644 this.tileEntityListTick.remove(tileTickPosition--); continue; diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 93b9134d6..26753fac5 100644 +index 93b9134d6e..26753fac5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicReference; diff --git a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch index 7971fe0eed..963a5c57bf 100644 --- a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 9e2fc4947c..4b9ecb4a62 100644 +index e06ac23852..6f1659b221 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch index f8bba283dd..4ef4d30796 100644 --- a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add setting for proxy online mode status diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5538dfd9d..0e5773bae 100644 +index 5538dfd9d8..0e5773bae4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -19,7 +19,7 @@ index 5538dfd9d..0e5773bae 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index f13534917..85c7a96c5 100644 +index f135349174..85c7a96c5a 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -0,0 +0,0 @@ public class NameReferencingFileConverter { @@ -33,7 +33,7 @@ index f13534917..85c7a96c5 100644 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7cb795dd8..e125632ff 100644 +index 761db58b29..3bbf9b0189 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-velocity-warnings.patch b/Spigot-Server-Patches/Add-velocity-warnings.patch index 2a7266c9ee..09d96eeb97 100644 --- a/Spigot-Server-Patches/Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/Add-velocity-warnings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 703d38f0c..a9d60b8d2 100644 +index d7e77a849a..e701b37cb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -17,7 +17,7 @@ index 703d38f0c..a9d60b8d2 100644 private final class BooleanWrapper { private boolean value = true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 34246369c..03a3328b0 100644 +index 34246369c5..03a3328b06 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -66,7 +66,7 @@ index 34246369c..03a3328b0 100644 public double getHeight() { return getHandle().length; diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 91b8aa6a1..0c106ea9c 100644 +index 91b8aa6a16..0c106ea9c5 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -0,0 +0,0 @@ public class WatchdogThread extends Thread diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch index 6f92d64557..0312d57c4d 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e125632ffe..d7247a1ec9 100644 +index 3bbf9b0189..35b26d6128 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch index 7bc1884e6c..574b13c4fa 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ff966de55..3f51eb384 100644 +index 030d68a704..83364efb50 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch index 8a681e0f60..e94a1741be 100644 --- a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,7 +8,7 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1afb480f86..f7eaecb3fe 100644 +index 62638d4e25..affbb93bfd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch index 7bf8bb8d74..e43e43275c 100644 --- a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 619f020ba4..5778bf1c65 100644 +index bfaeaa7559..90ac83b5b1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -85,7 +85,7 @@ index 619f020ba4..5778bf1c65 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 202c6c4927..c74831b3d7 100644 +index 213eb3f4aa..ed8d0de9fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index 109c73c563..02662ac52b 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -12,7 +12,7 @@ Re-introduce a cap per tick for auto save (Spigot disabled the vanilla cap) and Adds incremental player auto saving too diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 4bdb0a5f9..315d85090 100644 +index 4bdb0a5f9c..315d85090a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -32,7 +32,7 @@ index 4bdb0a5f9..315d85090 100644 + } } diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ec6b550ff..499230af6 100644 +index ec6b550ff6..499230af60 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ package com.destroystokyo.paper; @@ -64,7 +64,7 @@ index ec6b550ff..499230af6 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index c27073d27..06d6814b8 100644 +index c27073d27c..06d6814b83 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -96,7 +96,7 @@ index c27073d27..06d6814b8 100644 public boolean isEmpty() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4f9ece9e4..afeb0685b 100644 +index a5139b0b0d..aa8d25e765 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ @@ -116,7 +116,7 @@ index 4f9ece9e4..afeb0685b 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 982e18f8a..1879c3238 100644 +index 982e18f8af..1879c32381 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -128,7 +128,7 @@ index 982e18f8a..1879c3238 100644 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d25e5c508..3447afcad 100644 +index d25e5c508a..3447afcad8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -175,7 +175,7 @@ index d25e5c508..3447afcad 100644 this.methodProfiler.a("snooper"); if (getSnooperEnabled() && !this.j.d() && this.ticks > 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d0c547cc9..12f6812d6 100644 +index d0c547cc99..12f6812d67 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -214,7 +214,7 @@ index d0c547cc9..12f6812d6 100644 public WhiteList getWhitelist() { return this.whitelist; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 96002184b..bf07155bc 100644 +index 96002184bb..bf07155bc1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index c2bf6924f7..18582054bc 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -429,7 +429,7 @@ index 381542e0d2..80927de08b 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0808da26f6..cdcc375923 100644 +index 41ee97b1a4..8e72220f37 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -486,7 +486,7 @@ index a47a51a412..4c476f757c 100644 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 814a65ec58..202c6c4927 100644 +index ca696b2417..213eb3f4aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch b/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch index 2e0e1f7909..38618f4377 100644 --- a/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch +++ b/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch @@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing. Stats on current queue, how many was processed and how many were queued. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index a4c4a9486b..4be7173bf2 100644 +index c1a42e61e7..c96f1b2753 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch index 1c007f8d77..764f226429 100644 --- a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bb1c1c57c..667a0dde8 100644 +index bb1c1c57cc..667a0dde8c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index bb1c1c57c..667a0dde8 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 96d31f874..071a1e30f 100644 +index 96d31f8749..071a1e30f7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -63,7 +63,7 @@ index 96d31f874..071a1e30f 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6ec1ee26d..a4c8e62e2 100644 +index 6ec1ee26dc..a4c8e62e22 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -78,7 +78,7 @@ index 6ec1ee26d..a4c8e62e2 100644 public void a(Packet packet) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 62872675d..7cb795dd8 100644 +index f3af4ba520..761db58b29 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -91,7 +91,7 @@ index 62872675d..7cb795dd8 100644 for (int j = -short1; j <= short1; j += 16) { for (int k = -short1; k <= short1; k += 16) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0b2a9d09d..ff3558363 100644 +index 29a5ac639e..e3e45ed48a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch index 010ac3d385..b4e683ba80 100644 --- a/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch @@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 280cfd553..40c5ea474 100644 +index 280cfd5534..40c5ea4745 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -30,7 +30,7 @@ index 280cfd553..40c5ea474 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 899002f27..ff966de55 100644 +index e701b37cb4..030d68a704 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch index f00d2d85c1..9e0de6a264 100644 --- a/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,7 +17,7 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 41e73b340..ec6b550ff 100644 +index 41e73b3409..ec6b550ff6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -40,7 +40,7 @@ index 41e73b340..ec6b550ff 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index acc21aec0..c27073d27 100644 +index acc21aec02..c27073d27c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -52,7 +52,7 @@ index acc21aec0..c27073d27 100644 public final int locZ; private boolean m; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index bac5c921b..4f9ece9e4 100644 +index 2925c345a1..a5139b0b0d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -76,7 +76,7 @@ index bac5c921b..4f9ece9e4 100644 this.f.a(); this.chunkLoader.b(); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index ffff87dc0..344b95233 100644 +index ffff87dc03..344b95233f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -112,7 +112,7 @@ index ffff87dc0..344b95233 100644 return this.chunk != null; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 4d888d6d4..cf5c76a78 100644 +index 4d888d6d4f..cf5c76a78e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap { @@ -131,7 +131,7 @@ index 4d888d6d4..cf5c76a78 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f1c036aa6..95ec4f48f 100644 +index f1c036aa6a..95ec4f48f2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -150,7 +150,7 @@ index f1c036aa6..95ec4f48f 100644 this.methodProfiler.a(() -> { return String.valueOf(TileEntityTypes.a(tileentity.C())); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ff3558363..90e260f3b 100644 +index e3e45ed48a..d4851dd2a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { @@ -163,7 +163,7 @@ index ff3558363..90e260f3b 100644 } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index a9b84fdec..e02647f80 100644 +index a9b84fdec4..e02647f806 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ public class ActivationRange diff --git a/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch index c856426d77..8ca5a94ca5 100644 --- a/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch @@ -14,7 +14,7 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 359aa3997..88b761d27 100644 +index 5d42cfe81c..dc38e4e043 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -48,7 +48,7 @@ index 359aa3997..88b761d27 100644 } else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) { // Do nothing, this is coming from a plugin diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6e152fe17..d637199ca 100644 +index 6ad91a16f2..a270d31b22 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -82,7 +82,7 @@ index 6e152fe17..d637199ca 100644 return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index a0cdd2317..984df4083 100644 +index a0cdd2317c..984df4083d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -0,0 +0,0 @@ public class ServerShutdownThread extends Thread { @@ -94,7 +94,7 @@ index a0cdd2317..984df4083 100644 } catch (ExceptionWorldConflict ex) { ex.printStackTrace(); diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 4b3aa85c9..e44c23016 100644 +index 4b3aa85c97..e44c230165 100644 --- a/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java @@ -0,0 +0,0 @@ public class AsyncCatcher @@ -106,7 +106,7 @@ index 4b3aa85c9..e44c23016 100644 public static void catchOp(String reason) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 49768734d..947c43a5d 100644 +index 49768734d0..947c43a5d0 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -0,0 +0,0 @@ public class RestartCommand extends Command diff --git a/Spigot-Server-Patches/Expand-Explosions-API.patch b/Spigot-Server-Patches/Expand-Explosions-API.patch index cf4b51de86..bc3ebb8a87 100644 --- a/Spigot-Server-Patches/Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/Expand-Explosions-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f7eaecb3fe..e8290759bb 100644 +index affbb93bfd..23f0d5cb7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch index 49530d61e3..f48e219671 100644 --- a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch @@ -37,7 +37,7 @@ index 5d5f6f6328..d506503e93 100644 if (this.a(entityplayer, false, d0, d1, d2, packetplayoutworldparticles)) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7004f11764..1afb480f86 100644 +index b3756074b5..62638d4e25 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index e4f786ee9c..851afa85cd 100644 --- a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -221,7 +221,7 @@ index 998662d9e6..6b4eb7f053 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 86848543d0..7004f11764 100644 +index 9cd991c3e7..b3756074b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Expose-server-CommandMap.patch b/Spigot-Server-Patches/Expose-server-CommandMap.patch index 8d1f5f835b..4975b18694 100644 --- a/Spigot-Server-Patches/Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/Expose-server-CommandMap.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2d8820070..6d00be24b 100644 +index a270d31b22..d7e77a849a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch b/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch index 8c61f42f6c..bb1a2f7299 100644 --- a/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch +++ b/Spigot-Server-Patches/Fix-Chunk-Unload-Queue-Issues.patch @@ -22,7 +22,7 @@ index 695c6d3b70..acc21aec02 100644 private int E; private final AtomicInteger F; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 6917fdbe04..bac5c921b6 100644 +index 0e04d65981..2925c345a1 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index c85233c61a..5e05bd141f 100644 --- a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5d5aa72ca..ae17796ce 100644 +index 5d5aa72ca2..ae17796ce2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -149,7 +149,7 @@ index 5d5aa72ca..ae17796ce 100644 } lastTick = curTime; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ce87736da..fdcdbf508 100644 +index 0dda989453..6ad91a16f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -171,7 +171,7 @@ index ce87736da..fdcdbf508 100644 { diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -index be2e31dea..6d21c3269 100644 +index be2e31deae..6d21c32692 100644 --- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java +++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch index 037ac188bd..ff05fd82b0 100644 --- a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e8290759bb..0f4a894ebb 100644 +index 23f0d5cb7d..54a605f9b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 2e9ca41b7d..f6cd0502a1 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -136,7 +136,7 @@ index 45e42e9989..7a2b219c67 100644 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 4b9ecb4a62..b602a5d1b9 100644 +index 6f1659b221..26b30a1503 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/Spigot-Server-Patches/Lighting-Queue.patch b/Spigot-Server-Patches/Lighting-Queue.patch index cad493b45b..30ebc6ed57 100644 --- a/Spigot-Server-Patches/Lighting-Queue.patch +++ b/Spigot-Server-Patches/Lighting-Queue.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Lighting Queue This provides option to queue lighting updates to ensure they do not cause the server lag diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index 145cb274b..eff9dcf54 100644 +index 145cb274b0..eff9dcf54f 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +0,0 @@ public class WorldTimingsHandler { @@ -28,7 +28,7 @@ index 145cb274b..eff9dcf54 100644 public static Timing getTickList(WorldServer worldserver, String timingsType) { diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 68898d624..4b36a0f05 100644 +index 68898d624f..4b36a0f053 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -43,7 +43,7 @@ index 68898d624..4b36a0f05 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index adf3dee2e..eb7a41977 100644 +index adf3dee2ef..eb7a41977f 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -102,7 +102,7 @@ index adf3dee2e..eb7a41977 100644 IMMEDIATE, QUEUED, CHECK; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index d23f4e80c..48b484da1 100644 +index aabdc9e2f0..d025d949e3 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -114,7 +114,7 @@ index d23f4e80c..48b484da1 100644 // Update neighbor counts for (int x = -2; x < 3; x++) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ae17796ce..1ac8d61cd 100644 +index ae17796ce2..1ac8d61cd9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -136,7 +136,7 @@ index ae17796ce..1ac8d61cd 100644 } diff --git a/src/main/java/net/minecraft/server/PaperLightingQueue.java b/src/main/java/net/minecraft/server/PaperLightingQueue.java new file mode 100644 -index 000000000..345cd5824 +index 0000000000..345cd58240 --- /dev/null +++ b/src/main/java/net/minecraft/server/PaperLightingQueue.java @@ -0,0 +0,0 @@ @@ -233,7 +233,7 @@ index 000000000..345cd5824 + } +} diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index bfe09a205..c40ecbc0c 100644 +index bfe09a2055..c40ecbc0c3 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose diff --git a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 92c0453269..efbaa29978 100644 --- a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4be7173bf2..7d77c5fb31 100644 +index c96f1b2753..4973721243 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/Paper-config-files.patch b/Spigot-Server-Patches/Paper-config-files.patch index 5ce08f8275..4ef257f70d 100644 --- a/Spigot-Server-Patches/Paper-config-files.patch +++ b/Spigot-Server-Patches/Paper-config-files.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java new file mode 100644 -index 000000000..e8f7b7292 +index 0000000000..e8f7b7292d --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +0,0 @@ @@ -249,7 +249,7 @@ index 000000000..e8f7b7292 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 -index 000000000..d5c6c37fa +index 0000000000..d5c6c37fab --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ @@ -432,7 +432,7 @@ index 000000000..d5c6c37fa +} diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java new file mode 100644 -index 000000000..b8a6161d8 +index 0000000000..b8a6161d84 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ @@ -504,7 +504,7 @@ index 000000000..b8a6161d8 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 5ff1e9686..3706e44a3 100644 +index 5ff1e96861..3706e44a34 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -519,7 +519,7 @@ index 5ff1e9686..3706e44a3 100644 DedicatedServer.LOGGER.info("Generating keypair"); this.a(MinecraftEncryption.b()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 47fd48399..29c7043c8 100644 +index 47fd48399f..29c7043c86 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -536,7 +536,7 @@ index 47fd48399..29c7043c8 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index ad3f89199..ca2a14d7a 100644 +index ad3f891999..ca2a14d7ac 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -560,7 +560,7 @@ index ad3f89199..ca2a14d7a 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 13c404337..b2bb06c79 100644 +index 13c4043377..b2bb06c796 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose @@ -581,7 +581,7 @@ index 13c404337..b2bb06c79 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4dc0c8fcb..99d397872 100644 +index 1232ea4b2e..feab96c84c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -636,7 +636,7 @@ index 4dc0c8fcb..99d397872 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index df07dc594..57da619d8 100644 +index df07dc5946..57da619d80 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { @@ -655,7 +655,7 @@ index df07dc594..57da619d8 100644 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 9128f7754..7b1a9a8a0 100644 +index 9128f77543..7b1a9a8a0e 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -0,0 +0,0 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch index e034c1609c..75034ad565 100644 --- a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -7,7 +7,7 @@ If the save queue already has 50 (configurable) of chunks pending, then avoid processing auto save (which would add more) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 189ec79f0..4d0f2051a 100644 +index 189ec79f05..4d0f2051aa 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -23,7 +23,7 @@ index 189ec79f0..4d0f2051a 100644 private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index afeb0685b..a4c4a9486 100644 +index aa8d25e765..c1a42e61e7 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -51,7 +51,7 @@ index afeb0685b..a4c4a9486 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 2f1488ee5..859148cb8 100644 +index 2f1488ee53..859148cb86 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/Remove-Metadata-on-reload.patch index 534ca42b7a..9b4d301368 100644 --- a/Spigot-Server-Patches/Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/Remove-Metadata-on-reload.patch @@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1c9637ff7..f90dc11f2 100644 +index 83364efb50..f3af4ba520 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch index fd3462cf2d..17214e8455 100644 --- a/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/Shoulder-Entities-Release-API.patch @@ -62,7 +62,7 @@ index 42c6249535..b20cab58b1 100644 public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 073c8acf2c..9e2fc4947c 100644 +index d96c6afdb3..e06ac23852 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 468e068283..ec61be58e2 100644 --- a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index 220ca7bca..eb4b08be4 100644 +index 220ca7bca0..eb4b08be46 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -0,0 +0,0 @@ public class EULA { @@ -25,7 +25,7 @@ index 220ca7bca..eb4b08be4 100644 } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1839bf7d2..5d5aa72ca 100644 +index 1839bf7d24..5d5aa72ca2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -38,7 +38,7 @@ index 1839bf7d2..5d5aa72ca 100644 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bc1f858af..ce87736da 100644 +index 737ad3e1c0..0dda989453 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.event.server.TabCompleteEvent; @@ -51,7 +51,7 @@ index bc1f858af..ce87736da 100644 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 57da619d8..38e696aa9 100644 +index 57da619d80..38e696aa94 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { @@ -64,7 +64,7 @@ index 57da619d8..38e696aa9 100644 Thread.sleep(TimeUnit.SECONDS.toMillis(15)); } diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 94a3d4237..91b8aa6a1 100644 +index 94a3d4237d..91b8aa6a16 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -0,0 +0,0 @@ public class WatchdogThread extends Thread diff --git a/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch b/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch index af92ed24de..1f14c90e3d 100644 --- a/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch +++ b/Spigot-Server-Patches/Thread-Safe-Iteration-of-Chunk-Scheduler.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Thread Safe Iteration of Chunk Scheduler diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 7b30687530..45f9ad3726 100644 +index 7629e0d054..5ee8bedf34 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index e976e1f830..c86fa88cde 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java new file mode 100644 -index 000000000..4f624e39c +index 0000000000..4f624e39c7 --- /dev/null +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java @@ -0,0 +0,0 @@ @@ -137,7 +137,7 @@ index 000000000..4f624e39c +} diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java new file mode 100644 -index 000000000..0bb63600f +index 0000000000..0bb63600f3 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java @@ -0,0 +0,0 @@ @@ -323,7 +323,7 @@ index 000000000..0bb63600f +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 -index 000000000..145cb274b +index 0000000000..145cb274b0 --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +0,0 @@ @@ -432,7 +432,7 @@ index 000000000..145cb274b + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b89ec4252..e4ed7d674 100644 +index b89ec42525..e4ed7d674e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import java.util.concurrent.TimeUnit; @@ -476,7 +476,7 @@ index b89ec4252..e4ed7d674 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 06f10e1e8..43feccef8 100644 +index 06f10e1e84..43feccef8f 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -0,0 +0,0 @@ public class Block implements IMaterial { @@ -499,7 +499,7 @@ index 06f10e1e8..43feccef8 100644 Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap = new Object2ByteLinkedOpenHashMap(200) { protected void rehash(int i) {} diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java -index 5164e5c92..0c2386f5e 100644 +index 5164e5c928..0c2386f5ec 100644 --- a/src/main/java/net/minecraft/server/ChunkMap.java +++ b/src/main/java/net/minecraft/server/ChunkMap.java @@ -0,0 +0,0 @@ public class ChunkMap extends Long2ObjectOpenHashMap { @@ -530,7 +530,7 @@ index 5164e5c92..0c2386f5e 100644 return chunk1; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 0296d3ef0..d23f4e80c 100644 +index 00cd8d8cea..aabdc9e2f0 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -560,7 +560,7 @@ index 0296d3ef0..d23f4e80c 100644 this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot } catch (IOException ioexception) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 88301ee61..5001fd11d 100644 +index 88301ee61e..5001fd11dc 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ @@ -607,7 +607,7 @@ index 88301ee61..5001fd11d 100644 } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 3706e44a3..bf1fffcfe 100644 +index 3706e44a34..bf1fffcfee 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Level; @@ -660,7 +660,7 @@ index 3706e44a3..bf1fffcfe 100644 return waitable.get(); } catch (java.util.concurrent.ExecutionException e) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e67c5dc90..f1e71de42 100644 +index e67c5dc90b..f1e71de42a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender; @@ -699,7 +699,7 @@ index e67c5dc90..f1e71de42 100644 protected float ab() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 514c95151..d6e9915c1 100644 +index 514c951516..d6e9915c1f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -775,7 +775,7 @@ index 514c95151..d6e9915c1 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index ae31935c4..70c9b1f50 100644 +index ae31935c48..70c9b1f50c 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -0,0 +0,0 @@ public class EntityTracker { @@ -806,7 +806,7 @@ index ae31935c4..70c9b1f50 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 71ee66a9b..1839bf7d2 100644 +index 71ee66a9bb..1839bf7d24 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ @@ -960,7 +960,7 @@ index 71ee66a9b..1839bf7d2 100644 this.methodProfiler.e(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ac6d8cc6e..d975c2ccf 100644 +index ac6d8cc6e6..d975c2ccf1 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ @@ -1054,7 +1054,7 @@ index ac6d8cc6e..d975c2ccf 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 42e0630e6..5d42cfe81 100644 +index 42e0630e60..5d42cfe81c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; @@ -1093,7 +1093,7 @@ index 42e0630e6..5d42cfe81 100644 // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index 889b32287..69da194f5 100644 +index 889b32287e..69da194f52 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -0,0 +0,0 @@ @@ -1116,7 +1116,7 @@ index 889b32287..69da194f5 100644 throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e476d3433..9cef6b9af 100644 +index e476d3433b..9cef6b9af6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ @@ -1140,7 +1140,7 @@ index e476d3433..9cef6b9af 100644 public WhiteList getWhitelist() { diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java -index a07895935..ee5c2421b 100644 +index a07895935e..ee5c2421bb 100644 --- a/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java @@ -0,0 +0,0 @@ public class TickListServer implements TickList { @@ -1194,7 +1194,7 @@ index a07895935..ee5c2421b 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index cffbcb8f7..6b8a1c8c8 100644 +index cffbcb8f71..6b8a1c8c8b 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -1214,7 +1214,7 @@ index cffbcb8f7..6b8a1c8c8 100644 private final TileEntityTypes e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b2bb06c79..562a85b72 100644 +index b2bb06c796..562a85b726 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -1329,7 +1329,7 @@ index b2bb06c79..562a85b72 100644 public boolean a(@Nullable Entity entity, VoxelShape voxelshape) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2c6f6de4c..f032ecab6 100644 +index 2c6f6de4ce..f032ecab64 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ @@ -1445,7 +1445,7 @@ index 2c6f6de4c..f032ecab6 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 99d397872..bc1f858af 100644 +index feab96c84c..737ad3e1c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -1482,7 +1482,7 @@ index 99d397872..bc1f858af 100644 org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java deleted file mode 100644 -index 4c8ab2bc9..000000000 +index 4c8ab2bc97..0000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -1661,7 +1661,7 @@ index 4c8ab2bc9..000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -index 413dd35f0..52a8c48fa 100644 +index 413dd35f06..52a8c48fa4 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java @@ -0,0 +0,0 @@ @@ -1697,7 +1697,7 @@ index 413dd35f0..52a8c48fa 100644 public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 75d56ee3b..47f650e42 100644 +index 75d56ee3bd..47f650e426 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1714,7 +1714,7 @@ index 75d56ee3b..47f650e42 100644 public Player.Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index f11bd7545..93b9134d6 100644 +index f11bd7545f..93b9134d6e 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -1790,7 +1790,7 @@ index f11bd7545..93b9134d6 100644 private boolean isReady(final int currentTick) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index 7e7ce9a81..46029ce24 100644 +index 7e7ce9a81b..46029ce246 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -0,0 +0,0 @@ @@ -1872,7 +1872,7 @@ index 7e7ce9a81..46029ce24 100644 - // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java -index e52ef47b7..3d90b3426 100644 +index e52ef47b78..3d90b34268 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java @@ -0,0 +0,0 @@ import org.bukkit.util.CachedServerIcon; @@ -1884,7 +1884,7 @@ index e52ef47b7..3d90b3426 100644 this.value = value; } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index e60fe5a92..f68e42c4d 100644 +index e60fe5a920..f68e42c4d4 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityWither; diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index 3c92ccc46b..1e3f4752d1 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -199,7 +199,7 @@ index bf1fffcfee..af430b73f0 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8576545bb7..0808da26f6 100644 +index db09d391ea..41ee97b1a4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; @@ -271,7 +271,7 @@ index 0b0d996523..4cbe148010 100644 this.k = new GameProfileBanList(PlayerList.a); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ff93460235..21d9f381cc 100644 +index 8412e71d71..47b4c01067 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import java.nio.ByteBuffer; diff --git a/Spigot-Server-Patches/getPlayerUniqueId-API.patch b/Spigot-Server-Patches/getPlayerUniqueId-API.patch index 9bb5845a16..2ed4d5d358 100644 --- a/Spigot-Server-Patches/getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c74831b3d7..e860a83d3f 100644 +index ed8d0de9fa..6d23320e6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/work/Bukkit b/work/Bukkit index f025ddf813..3607913caf 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit f025ddf8133a837fa36a4220caefa1701c4e3466 +Subproject commit 3607913caf81560ff9e809aba8e6fcbfebab4d02 diff --git a/work/CraftBukkit b/work/CraftBukkit index 9646d8d780..1ef1ffd664 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 9646d8d7800931effa31be173fda765ecdf996c4 +Subproject commit 1ef1ffd664b55d9dc9800023182c779daff2594a From 0b2b5ecc336e36e24c9f660038c6933e514a4a72 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Wed, 25 Jul 2018 21:49:43 -0500 Subject: [PATCH 58/67] Remove deprecated AuthLib API from Paper-API Use the PlayerProfile API as a replacement --- ...low-plugins-to-use-SLF4J-for-logging.patch | 2 +- .../Profile-Lookup-Events.patch | 100 +++++------------- .../ProfileWhitelistVerifyEvent.patch | 12 +-- ...to-control-if-armour-stands-can-move.patch | 6 +- 4 files changed, 31 insertions(+), 89 deletions(-) diff --git a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch index b522275490..f279ab7b9a 100644 --- a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch @@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index bfe580f1..5167f5b9 100644 +index a58d4424..a771e156 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Profile-Lookup-Events.patch b/Spigot-API-Patches/Profile-Lookup-Events.patch index 68103b02a1..2f40b58821 100644 --- a/Spigot-API-Patches/Profile-Lookup-Events.patch +++ b/Spigot-API-Patches/Profile-Lookup-Events.patch @@ -6,34 +6,15 @@ Subject: [PATCH] Profile Lookup Events Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in profile data, and cache the responses from profiles that had to be looked up. -diff --git a/pom.xml b/pom.xml -index a58d4424..bfe580f1 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -0,0 +0,0 @@ - - provided - -+ -+ -+ com.mojang -+ authlib -+ 1.5.25 -+ compile -+ - - co.aikar - fastutil-lite diff --git a/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java new file mode 100644 -index 00000000..3b6995a7 +index 00000000..160c98fe --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java @@ -0,0 +0,0 @@ +package com.destroystokyo.paper.event.profile; + +import com.destroystokyo.paper.profile.PlayerProfile; -+import com.mojang.authlib.GameProfile; +import org.bukkit.Bukkit; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; @@ -60,16 +41,6 @@ index 00000000..3b6995a7 + + /** + * @return The profile that was recently looked up. This profile can be mutated -+ * @deprecated will be removed with 1.13, use {@link #getPlayerProfile()} -+ */ -+ @Deprecated -+ @Nonnull -+ public GameProfile getProfile() { -+ return profile.getGameProfile(); -+ } -+ -+ /** -+ * @return The profile that was recently looked up. This profile can be mutated + */ + @Nonnull + public PlayerProfile getPlayerProfile() { @@ -87,7 +58,7 @@ index 00000000..3b6995a7 +} diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java new file mode 100644 -index 00000000..aa0666d5 +index 00000000..e5a5986a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java @@ -0,0 +0,0 @@ @@ -96,8 +67,6 @@ index 00000000..aa0666d5 +import com.destroystokyo.paper.profile.PlayerProfile; +import com.destroystokyo.paper.profile.ProfileProperty; +import com.google.common.collect.ArrayListMultimap; -+import com.google.common.collect.Multimap; -+import com.mojang.authlib.properties.Property; +import org.bukkit.Bukkit; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; @@ -162,48 +131,6 @@ index 00000000..aa0666d5 + } + + /** -+ * Get the properties for this profile -+ * -+ * @return the property map to attach to the new {@link PlayerProfile} -+ * @deprecated will be removed with 1.13 Use {@link #getProfileProperties()} -+ */ -+ @Deprecated -+ @Nonnull -+ public Multimap getProperties() { -+ Multimap props = ArrayListMultimap.create(); -+ -+ for (ProfileProperty property : properties) { -+ props.put(property.getName(), new Property(property.getName(), property.getValue(), property.getSignature())); -+ } -+ return props; -+ } -+ -+ /** -+ * Completely replaces all Properties with the new provided properties -+ * @param properties the properties to set on the new profile -+ * @deprecated will be removed with 1.13 Use {@link #setProfileProperties(Set)} -+ */ -+ @Deprecated -+ public void setProperties(Multimap properties) { -+ this.properties = new HashSet<>(); -+ properties.values().forEach(property -> { -+ this.properties.add(new ProfileProperty(property.getName(), property.getValue(), property.getSignature())); -+ }); -+ } -+ -+ /** -+ * Adds additional properties, without removing the original properties -+ * @param properties the properties to add to the existing properties -+ * @deprecated will be removed with 1.13 use {@link #addProfileProperties(Set)} -+ */ -+ @Deprecated -+ public void addProperties(Multimap properties) { -+ properties.values().forEach(property -> { -+ this.properties.add(new ProfileProperty(property.getName(), property.getValue(), property.getSignature())); -+ }); -+ } -+ -+ /** + * @return The currently pending prepopulated properties. + * Any property in this Set will be automatically prefilled on this Profile + */ @@ -240,4 +167,27 @@ index 00000000..aa0666d5 + } + +} +diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java +index e060c38a..1a69e5f7 100644 +--- a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java ++++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java +@@ -0,0 +0,0 @@ + package com.destroystokyo.paper.profile; + +-import com.mojang.authlib.GameProfile; +- + import javax.annotation.Nonnull; + import javax.annotation.Nullable; + import java.util.Collection; +@@ -0,0 +0,0 @@ public interface PlayerProfile { + default boolean hasTextures() { + return hasProperty("textures"); + } +- +- /** +- * @deprecated Will be removed in 1.13 +- */ +- @Deprecated +- GameProfile getGameProfile(); + } -- \ No newline at end of file diff --git a/Spigot-API-Patches/ProfileWhitelistVerifyEvent.patch b/Spigot-API-Patches/ProfileWhitelistVerifyEvent.patch index ac07692b4b..d7f8202518 100644 --- a/Spigot-API-Patches/ProfileWhitelistVerifyEvent.patch +++ b/Spigot-API-Patches/ProfileWhitelistVerifyEvent.patch @@ -9,7 +9,7 @@ Allows you to do dynamic whitelisting and change of kick message diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java new file mode 100644 -index 00000000..662e79e3 +index 00000000..a11f811e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java @@ -0,0 +0,0 @@ @@ -39,7 +39,6 @@ index 00000000..662e79e3 +package com.destroystokyo.paper.event.profile; + +import com.destroystokyo.paper.profile.PlayerProfile; -+import com.mojang.authlib.GameProfile; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + @@ -81,15 +80,6 @@ index 00000000..662e79e3 + } + + /** -+ * The gameprofile of the player trying to connect -+ * @deprecated Will be removed in 1.13, use #{@link #getPlayerProfile()} -+ */ -+ @Deprecated -+ public GameProfile getProfile() { -+ return profile.getGameProfile(); -+ } -+ -+ /** + * @return The profile of the player trying to connect + */ + public PlayerProfile getPlayerProfile() { diff --git a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch index b72c9056b2..0c629d65a6 100644 --- a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index cf11a2225b..578d966401 100644 +index cf11a2225..578d96640 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -31,7 +31,7 @@ index cf11a2225b..578d966401 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -index 2b66a08ade..8a06cb1656 100644 +index 2b66a08ad..124c3185b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -0,0 +0,0 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { @@ -39,6 +39,7 @@ index 2b66a08ade..8a06cb1656 100644 getHandle().setMarker(marker); } + ++ // Paper start + @Override + public boolean canMove() { + return getHandle().canMove; @@ -48,5 +49,6 @@ index 2b66a08ade..8a06cb1656 100644 + public void setCanMove(boolean move) { + getHandle().canMove = move; + } ++ // Paper end } -- \ No newline at end of file From b41dde0d2be16262a79f5fead550d44e075a659d Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Wed, 25 Jul 2018 21:55:25 -0500 Subject: [PATCH 59/67] Move part of last change into proper file --- .../Basic-PlayerProfile-API.patch | 10 +------- .../Profile-Lookup-Events.patch | 23 ------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/Spigot-API-Patches/Basic-PlayerProfile-API.patch b/Spigot-API-Patches/Basic-PlayerProfile-API.patch index b4b7de1185..c05b5fbcd9 100644 --- a/Spigot-API-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-API-Patches/Basic-PlayerProfile-API.patch @@ -7,14 +7,12 @@ Provides basic elements of a PlayerProfile to be used by future API/events diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java new file mode 100644 -index 00000000..e060c38a +index 00000000..1a69e5f7 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java @@ -0,0 +0,0 @@ +package com.destroystokyo.paper.profile; + -+import com.mojang.authlib.GameProfile; -+ +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.Collection; @@ -153,12 +151,6 @@ index 00000000..e060c38a + default boolean hasTextures() { + return hasProperty("textures"); + } -+ -+ /** -+ * @deprecated Will be removed in 1.13 -+ */ -+ @Deprecated -+ GameProfile getGameProfile(); +} diff --git a/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java new file mode 100644 diff --git a/Spigot-API-Patches/Profile-Lookup-Events.patch b/Spigot-API-Patches/Profile-Lookup-Events.patch index 2f40b58821..bd5bd6f936 100644 --- a/Spigot-API-Patches/Profile-Lookup-Events.patch +++ b/Spigot-API-Patches/Profile-Lookup-Events.patch @@ -167,27 +167,4 @@ index 00000000..e5a5986a + } + +} -diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java -index e060c38a..1a69e5f7 100644 ---- a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java -+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java -@@ -0,0 +0,0 @@ - package com.destroystokyo.paper.profile; - --import com.mojang.authlib.GameProfile; -- - import javax.annotation.Nonnull; - import javax.annotation.Nullable; - import java.util.Collection; -@@ -0,0 +0,0 @@ public interface PlayerProfile { - default boolean hasTextures() { - return hasProperty("textures"); - } -- -- /** -- * @deprecated Will be removed in 1.13 -- */ -- @Deprecated -- GameProfile getGameProfile(); - } -- \ No newline at end of file From 119ae29b371dee7c1b8fffdaa8f3228aa2a6021e Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 26 Jul 2018 00:51:20 -0400 Subject: [PATCH 60/67] Prevent Saving Bad entities to chunks See https://github.com/PaperMC/Paper/issues/1223 Should fix Vanilla bugs Minecraft is saving invalid entities to the chunk files. Avoid saving bad data, and also make improvements to handle loading these chunks. Any invalid entity will be instant killed, so lets avoid adding it to the world... This lets us be safer about the dupe UUID resolver too, as now we can ignore instant killed entities and avoid risk of duplicating an invalid entity. This should reduce log occurrences of dupe uuid messages. Also reduce the logging spam overall. --- ...ies-option-to-debug-dupe-uuid-issues.patch | 23 +--- ...revent-Saving-Bad-entities-to-chunks.patch | 103 ++++++++++++++++++ 2 files changed, 105 insertions(+), 21 deletions(-) create mode 100644 Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch diff --git a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 112f42f084..0346641029 100644 --- a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -5,27 +5,8 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information -diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index bcce5e8b7..f5b9aa561 100644 ---- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java -+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { - - while (iterator.hasNext()) { - Entity entity = (Entity) iterator.next(); -+ // Paper start -+ if (entity.getChunkX() != chunk.locX || entity.getChunkZ() != chunk.locZ) { -+ LogManager.getLogger().error(entity + " is not actually in this chunk! Report this to https://github.com/PaperMC/Paper/issues/1223", new Throwable()); -+ } -+ if ((int)Math.floor(entity.locX) >> 4 != chunk.locX || (int)Math.floor(entity.locZ) >> 4 != chunk.locZ) { -+ LogManager.getLogger().error(entity + " will be leaving this chunk but saved to it. Report this to https://github.com/PaperMC/Paper/issues/1223", new Throwable()); -+ } -+ // Paper end - - nbttagcompound1 = new NBTTagCompound(); - if (entity.d(nbttagcompound1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 99dac412f..0d3af8cb7 100644 +index 99dac412f0..0d3af8cb77 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -37,7 +18,7 @@ index 99dac412f..0d3af8cb7 100644 private static final Logger a = LogManager.getLogger(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b16324e1a..994d4bbb8 100644 +index b16324e1a2..994d4bbb84 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ import com.google.common.util.concurrent.ListenableFuture; diff --git a/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch new file mode 100644 index 0000000000..97407ad8fb --- /dev/null +++ b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch @@ -0,0 +1,103 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 26 Jul 2018 00:11:12 -0400 +Subject: [PATCH] Prevent Saving Bad entities to chunks + +See https://github.com/PaperMC/Paper/issues/1223 + +Minecraft is saving invalid entities to the chunk files. + +Avoid saving bad data, and also make improvements to handle +loading these chunks. Any invalid entity will be instant killed, +so lets avoid adding it to the world... + +This lets us be safer about the dupe UUID resolver too, as now +we can ignore instant killed entities and avoid risk of duplicating +an invalid entity. + +This should reduce log occurrences of dupe uuid messages. + +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index be0b411e5c..e5a5217429 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -0,0 +0,0 @@ public class Chunk { + Map thisChunk = new HashMap<>(); + for (Iterator iterator = ((List) entityslice).iterator(); iterator.hasNext(); ) { + Entity entity = iterator.next(); ++ if (entity.dead) continue; + Entity other = ((WorldServer) world).entitiesByUUID.get(entity.uniqueID); + if (other == null) { + other = thisChunk.get(entity.uniqueID); + } +- if (other != null) { ++ if (other != null && !other.dead) { + switch (mode) { + case REGEN: { + entity.setUUID(UUID.randomUUID()); +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index bcce5e8b7e..bad287fca4 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + + Iterator iterator; + ++ List toUpdate = new java.util.ArrayList<>(); // Paper + for (i = 0; i < chunk.getEntitySlices().length; ++i) { + iterator = chunk.getEntitySlices()[i].iterator(); + + while (iterator.hasNext()) { + Entity entity = (Entity) iterator.next(); ++ // Paper start ++ if ((int)Math.floor(entity.locX) >> 4 != chunk.locX || (int)Math.floor(entity.locZ) >> 4 != chunk.locZ) { ++ LogManager.getLogger().warn(entity + " is not in this chunk, skipping save. This a bug fix to a vanilla bug. Do not report this to PaperMC please."); ++ toUpdate.add(entity); ++ continue; ++ } ++ if (entity.dead) { ++ continue; ++ } ++ // Paper end + + nbttagcompound1 = new NBTTagCompound(); + if (entity.d(nbttagcompound1)) { +@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + } + } + } ++ // Paper start - move entities to the correct chunk ++ for (Entity entity : toUpdate) { ++ world.entityJoinedWorld(entity, false); ++ } ++ // Paper end + + nbttagcompound.set("Entities", nbttaglist1); + NBTTagList nbttaglist2 = new NBTTagList(); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 52adee8806..c2b92ad3a5 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { + } + + this.getChunkAt(i, j).a(entity); +- this.entityList.add(entity); ++ if (!entity.dead) this.entityList.add(entity); // Paper - don't add dead entities, chunk registration may of killed it + this.b(entity); + return true; + } +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 1244baf45a..1763d9f94d 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { + if (this.entitiesByUUID.containsKey(uuid)) { + Entity entity1 = (Entity) this.entitiesByUUID.get(uuid); + +- if (this.f.contains(entity1)) { ++ if (this.f.contains(entity1) || entity1.dead) { // Paper - overwrite the current dead one + this.f.remove(entity1); + } else { + if (!(entity instanceof EntityHuman)) { +-- \ No newline at end of file From ff4fc525528fa22fbf1d2b0331a4b27bf871720b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 26 Jul 2018 16:20:37 +0100 Subject: [PATCH 61/67] Update B/CB/S --- ...e-PlayerProfile-in-AsyncPreLoginEven.patch | 2 +- ...-a-custom-authentication-servers-dow.patch | 4 +- .../Cache-user-authenticator-threads.patch | 2 +- .../Handle-Item-Meta-Inconsistencies.patch | 6 +-- .../ItemStack-getMaxItemUseDuration.patch | 4 +- Spigot-Server-Patches/MC-Utils.patch | 40 +++++++++---------- .../Optimize-ItemStack.isEmpty.patch | 2 +- .../Player.setPlayerProfile-API.patch | 6 +-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 11 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 2eed5e36f4..b455b2fe49 100644 --- a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index ae10cd89c1..a721eb30e9 100644 +index 91cd6e0f61..f02b28059c 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch index 0f3797544d..12eb7848e5 100644 --- a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 329950802..7a2c70302 100644 +index 329950802f..7a2c703022 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ @@ -27,7 +27,7 @@ index 329950802..7a2c70302 100644 + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 85eff6e2d..3464af679 100644 +index 005efbc111..6249b0e686 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { diff --git a/Spigot-Server-Patches/Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/Cache-user-authenticator-threads.patch index 60863e3830..dccf4a870a 100644 --- a/Spigot-Server-Patches/Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/Cache-user-authenticator-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index a22f4c55e9..b6e8296824 100644 +index eb936a0445..fae8a13973 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { diff --git a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch index 997d285042..b8c0c2c61d 100644 --- a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index cf679df7b..405b867fe 100644 +index e7b5daf28e..6e7b2e721d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import com.mojang.brigadier.StringReader; @@ -78,7 +78,7 @@ index cf679df7b..405b867fe 100644 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index f4672b9a4..e2699564a 100644 +index f4672b9a48..e2699564af 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 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -204,7 +204,7 @@ index f4672b9a4..e2699564a 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index f10de8550..f21c1e846 100644 +index f10de8550c..f21c1e846d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ import java.lang.reflect.Constructor; diff --git a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch index 7d76999e5d..472925579a 100644 --- a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index e71d75a77..3c7a40c23 100644 +index 33e82f5377..0952bf0b82 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { @@ -18,7 +18,7 @@ index e71d75a77..3c7a40c23 100644 return this.getItem().c(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index aad380c3b..5f3331de1 100644 +index aad380c3b7..5f3331de13 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 { diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index eaba31a37a..3796fae0c5 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC Utils diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index c3e990bdf..e2a7b4be2 100644 +index c3e990bdff..e2a7b4be2c 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable { @@ -18,7 +18,7 @@ index c3e990bdf..e2a7b4be2 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 9f3aa2459..7dbea9090 100644 +index 9f3aa24590..7dbea90902 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -54,7 +54,7 @@ index 9f3aa2459..7dbea9090 100644 return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 411ab6061..cd4fbee0c 100644 +index 411ab6061b..cd4fbee0ca 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ import com.google.common.collect.Lists; // CraftBukkit @@ -75,7 +75,7 @@ index 411ab6061..cd4fbee0c 100644 public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index 00a530c51..2947d9ff6 100644 +index 00a530c51c..2947d9ff6a 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java @@ -0,0 +0,0 @@ public class ChunkCoordIntPair { @@ -88,7 +88,7 @@ index 00a530c51..2947d9ff6 100644 return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index ca2a14d7a..9a513b4e3 100644 +index ca2a14d7ac..9a513b4e3a 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -131,17 +131,17 @@ index ca2a14d7a..9a513b4e3 100644 private boolean c = true; private boolean d = true; diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index f5e311f2a..cf679df7b 100644 +index 0d26fc56dd..e7b5daf28e 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -0,0 +0,0 @@ import org.bukkit.Location; - import org.bukkit.TreeType; +@@ -0,0 +0,0 @@ import org.bukkit.TreeType; import org.bukkit.block.BlockState; + import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.block.CraftBlockState; +import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.entity.Player; - import org.bukkit.event.world.StructureGrowEvent; + import org.bukkit.event.block.BlockFertilizeEvent; @@ -0,0 +0,0 @@ public final class ItemStack { return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList(); } @@ -161,7 +161,7 @@ index f5e311f2a..cf679df7b 100644 this.tag = nbttagcompound; } diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java -index a540167d6..add618866 100644 +index a540167d6d..add618866b 100644 --- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java @@ -0,0 +0,0 @@ public abstract class LotoSelectorEntry { @@ -180,7 +180,7 @@ index a540167d6..add618866 100644 } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 000000000..70cdc3f10 +index 0000000000..70cdc3f102 --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -477,7 +477,7 @@ index 000000000..70cdc3f10 + } +} diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java -index 8170a8428..e21e60b00 100644 +index 8170a84280..e21e60b003 100644 --- a/src/main/java/net/minecraft/server/NBTBase.java +++ b/src/main/java/net/minecraft/server/NBTBase.java @@ -0,0 +0,0 @@ public interface NBTBase { @@ -499,7 +499,7 @@ index 8170a8428..e21e60b00 100644 case 0: return "TAG_End"; diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java -index 1a81d8e5f..057c2077a 100644 +index 1a81d8e5f6..057c2077a0 100644 --- a/src/main/java/net/minecraft/server/NBTList.java +++ b/src/main/java/net/minecraft/server/NBTList.java @@ -0,0 +0,0 @@ public abstract class NBTList extends AbstractList impleme @@ -525,7 +525,7 @@ index 1a81d8e5f..057c2077a 100644 + public abstract NBTList clone(); // Paper - decompile fix } diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java -index 11ffa6c34..3ff3a2983 100644 +index 11ffa6c342..3ff3a29835 100644 --- a/src/main/java/net/minecraft/server/NBTTagByteArray.java +++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java @@ -0,0 +0,0 @@ public class NBTTagByteArray extends NBTList { @@ -539,7 +539,7 @@ index 11ffa6c34..3ff3a2983 100644 System.arraycopy(this.data, 0, abyte, 0, this.data.length); diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 7fc9b5ff3..e658816c2 100644 +index 7fc9b5ff32..e658816c24 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { @@ -575,7 +575,7 @@ index 7fc9b5ff3..e658816c2 100644 - } } diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java -index f5c9b97d5..d121ad4f7 100644 +index f5c9b97d5c..d121ad4f7a 100644 --- a/src/main/java/net/minecraft/server/NBTTagIntArray.java +++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java @@ -0,0 +0,0 @@ public class NBTTagIntArray extends NBTList { @@ -588,7 +588,7 @@ index f5c9b97d5..d121ad4f7 100644 } } diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index b3c944d70..a8280acf9 100644 +index b3c944d701..a8280acf94 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -626,7 +626,7 @@ index b3c944d70..a8280acf9 100644 - } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0618962e7..42e0630e6 100644 +index 0618962e75..42e0630e60 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -643,7 +643,7 @@ index 0618962e7..42e0630e6 100644 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index ef332d651..7cc7eb773 100644 +index ef332d6517..7cc7eb7735 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -0,0 +0,0 @@ import java.util.Iterator; @@ -665,7 +665,7 @@ index ef332d651..7cc7eb773 100644 this.c.set(i, t0); diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index 2179664a0..d7e1ecc03 100644 +index 2179664a0c..d7e1ecc031 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -0,0 +0,0 @@ public class ServerPing { diff --git a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch index 97cb7cb556..7a82116e41 100644 --- a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index e120521611..023dd48a23 100644 +index 6e7b2e721d..33e82f5377 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { diff --git a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index fcc0c05318..ca9cb32c56 100644 --- a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index d04f9b380..5015bd071 100644 +index d04f9b380e..5015bd0710 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -19,7 +19,7 @@ index d04f9b380..5015bd071 100644 private final ItemCooldown ce; @Nullable diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index a721eb30e..258bdfe66 100644 +index f02b28059c..bb33cf3029 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { @@ -48,7 +48,7 @@ index a721eb30e..258bdfe66 100644 uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9f69000cb..8313c5192 100644 +index 9f69000cb2..8313c5192b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ diff --git a/work/Bukkit b/work/Bukkit index 3607913caf..c520a96024 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 3607913caf81560ff9e809aba8e6fcbfebab4d02 +Subproject commit c520a96024beeb557ebccbc0f18a938a232635a1 diff --git a/work/CraftBukkit b/work/CraftBukkit index 1ef1ffd664..e70d864f00 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 1ef1ffd664b55d9dc9800023182c779daff2594a +Subproject commit e70d864f0063ccc5939ead10db5cc1fb6991fdf8 diff --git a/work/Spigot b/work/Spigot index 0b44fa0bd4..f68f5a8253 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 0b44fa0bd4ed14ac6ae791d7f9a486d31382a0c7 +Subproject commit f68f5a82539faf7fb36f64bd72731e35d3e57cc3 From 9629d652201822443eb29153ef65529d8a0a5a23 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 26 Jul 2018 18:41:00 +0100 Subject: [PATCH 62/67] Fix EntityDismountEvent changes While upstream has now made this event cancellable, their changes result in the vechicle being removed before the event is called, thus leading cancellation to not behave as expected. --- .../Vehicle-Event-Cancellation-Changes.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch diff --git a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch new file mode 100644 index 0000000000..f0e26eacab --- /dev/null +++ b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown <1254957+zachbr@users.noreply.github.com> +Date: Fri, 22 Apr 2016 18:20:05 -0500 +Subject: [PATCH] Vehicle Event Cancellation Changes + + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 85358902ff..98d67d9a17 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + public boolean j; public boolean blocksEntitySpawning() { return j; } // Paper - OBFHELPER + public final List passengers; + protected int k; +- private Entity ax; ++ private Entity ax;public void setVehicle(Entity entity) { this.ax = entity; } // Paper - OBFHELPER + public boolean attachedToPlayer; + public World world; + public double lastX; +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); + } else { + // CraftBukkit start ++ entity.setVehicle(this); // Paper - Set the vehicle back for the event + CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); + Entity orig = craft == null ? null : craft.getHandle(); + if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { +@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + return; + } + // Spigot end ++ ++ entity.setVehicle(null); // Paper - fix EntityDismountEvent cancellable + this.passengers.remove(entity); + entity.k = 60; + } +-- \ No newline at end of file From 3c8a4cb1bb4a9cb3b9d11b9b0493b3082d90ba03 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 26 Jul 2018 23:57:31 -0400 Subject: [PATCH 63/67] Relookup Entity Save ID if was null during precache Should fix #1280 Citizens hijacks entity map, and im guessing under the right conditions the result might actually be null during entity creation Pre the cache patch, the id is looked up on save, so it was fine. Now, if its null and the save ID is requested, we will try to look it up again and cache it if found. --- ...-get-a-BlockState-without-a-snapshot.patch | 10 +++---- ...-MinecraftKey-Information-to-Objects.patch | 26 +++++++++++++------ ...dd-some-Debug-to-Chunk-Entity-slices.patch | 8 +++--- ...opper-searches-if-there-are-no-items.patch | 6 ++--- ...oreboards-for-non-players-by-default.patch | 6 ++--- ...llow-entities-to-ride-themselves-572.patch | 2 +- .../Don-t-teleport-dead-entities.patch | 2 +- ...ck-and-tnt-entities-at-the-specified.patch | 8 +++--- .../Duplicate-UUID-Resolve-Option.patch | 8 +++--- Spigot-Server-Patches/Entity-Origin-API.patch | 12 ++++----- ...Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch | 6 ++--- ...-anytime-entities-change-to-guarante.patch | 6 ++--- Spigot-Server-Patches/Optimize-Hoppers.patch | 8 +++--- ...nilla-per-world-scoreboard-coloring-.patch | 6 ++--- .../Optional-TNT-doesn-t-move-in-water.patch | 6 ++--- ...event-tile-entity-and-entity-crashes.patch | 4 +-- ...emove-entities-on-dimension-teleport.patch | 4 +-- ...ts-for-each-Entity-Block-Entity-Type.patch | 12 ++++----- ...to-current-Chunk-for-Entity-and-Bloc.patch | 16 ++++++------ .../Vehicle-Event-Cancellation-Changes.patch | 2 +- ...-more-information-to-Entity.toString.patch | 2 +- 21 files changed, 85 insertions(+), 75 deletions(-) diff --git a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch index e616833ef3..088aea34fb 100644 --- a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 358c99227..5b5f102e2 100644 +index b4a7db2b66..30d3e19de8 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -39,7 +39,7 @@ index 358c99227..5b5f102e2 100644 return null; } diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 54b719d91..3f2c5b2d5 100644 +index 54b719d917..3f2c5b2d5c 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java @@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity { @@ -52,7 +52,7 @@ index 54b719d91..3f2c5b2d5 100644 }; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 46670c346..a9d3f12bc 100644 +index 46670c3466..a9d3f12bc6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -0,0 +0,0 @@ public class CraftBlock implements Block { @@ -79,7 +79,7 @@ index 46670c346..a9d3f12bc 100644 switch (material) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 266f87d7f..fe112812d 100644 +index 266f87d7f1..fe112812d1 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 CraftBlockState @@ -129,7 +129,7 @@ index 266f87d7f..fe112812d 100644 private T createSnapshot(T tileEntity) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java -index 7a8d44529..97b4e6910 100644 +index 7a8d445299..97b4e6910d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java @@ -0,0 +0,0 @@ public class CraftSign extends CraftBlockEntityState implements diff --git a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch index 9c3751abc8..3ab482c70e 100644 --- a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add MinecraftKey Information to Objects Stores the reference to the objects respective MinecraftKey diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ed39b122e..3a8902bf1 100644 +index ed39b122ec..06c72b95f3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityPortalEvent; @@ -23,16 +23,21 @@ index ed39b122e..3a8902bf1 100644 } + // Paper start -+ public final MinecraftKey entityKey = EntityTypes.getKey(this); -+ public final String entityKeyString = entityKey != null ? entityKey.toString() : null; ++ private String entityKeyString = null; ++ private MinecraftKey entityKey = getMinecraftKey(); + + @Override + public MinecraftKey getMinecraftKey() { ++ if (entityKey == null) { ++ entityKey = EntityTypes.getKey(this); ++ entityKeyString = entityKey != null ? entityKey.toString() : null; ++ } + return entityKey; + } + + @Override + public String getMinecraftKeyString() { ++ getMinecraftKey(); // Try to load if it doesn't exists. see: https://github.com/PaperMC/Paper/issues/1280 + return entityKeyString; + } @Nullable @@ -40,14 +45,14 @@ index ed39b122e..3a8902bf1 100644 - MinecraftKey minecraftkey = EntityTypes.a(this); - - return minecraftkey == null ? null : minecraftkey.toString(); -+ return entityKeyString; ++ return getMinecraftKeyString(); + // Paper end } protected abstract void a(NBTTagCompound nbttagcompound); diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java new file mode 100644 -index 000000000..61c2b993c +index 0000000000..61c2b993c9 --- /dev/null +++ b/src/main/java/net/minecraft/server/KeyedObject.java @@ -0,0 +0,0 @@ @@ -60,7 +65,7 @@ index 000000000..61c2b993c + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 5a5a588e7..672ba3134 100644 +index 5a5a588e7c..0176ca530c 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -79,16 +84,21 @@ index 5a5a588e7..672ba3134 100644 - @Nullable - public static MinecraftKey a(Class oclass) { + // Paper start -+ public final MinecraftKey tileEntityKey = getKey(this.getClass()); -+ public final String tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null; ++ private String tileEntityKeyString = null; ++ private MinecraftKey tileEntityKey = getMinecraftKey(); + + @Override + public MinecraftKey getMinecraftKey() { ++ if (tileEntityKey == null) { ++ tileEntityKey = getKey(this.getClass()); ++ tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null; ++ } + return tileEntityKey; + } + + @Override + public String getMinecraftKeyString() { ++ getMinecraftKey(); // Try to load if it doesn't exists. + return tileEntityKeyString; + } + @Nullable public static MinecraftKey getKey(Class oclass) { return a(oclass); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch index c3e856e8fe..156a31beda 100644 --- a/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/Add-some-Debug-to-Chunk-Entity-slices.patch @@ -9,7 +9,7 @@ This should hopefully avoid duplicate entities ever being created if the entity was to end up in 2 different chunk slices diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6de053781..be0b411e5 100644 +index eaee492010..1787607622 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -46,7 +46,7 @@ index 6de053781..be0b411e5 100644 + this.markDirty(); entity.setCurrentChunk(this); - entityCounts.increment(entity.entityKeyString); + entityCounts.increment(entity.getMinecraftKeyString()); @@ -0,0 +0,0 @@ public class Chunk { // Paper start @@ -59,9 +59,9 @@ index 6de053781..be0b411e5 100644 + } this.markDirty(); entity.setCurrentChunk(null); - entityCounts.decrement(entity.entityKeyString); + entityCounts.decrement(entity.getMinecraftKeyString()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7188d0c99..b3120d7cc 100644 +index fdabb1e369..89f9bd347b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch index 013d2b3811..ddbf1e4693 100644 --- a/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch @@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index d6f6cfef2..08d6ef09a 100644 +index 42d27e0362..be386716be 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -34,7 +34,7 @@ index d6f6cfef2..08d6ef09a 100644 @@ -0,0 +0,0 @@ public class Chunk { // Paper start entity.setCurrentChunk(this); - entityCounts.increment(entity.entityKeyString); + entityCounts.increment(entity.getMinecraftKeyString()); + if (entity instanceof EntityItem) { + itemCounts[k]++; + } else if (entity instanceof IInventory) { @@ -46,7 +46,7 @@ index d6f6cfef2..08d6ef09a 100644 @@ -0,0 +0,0 @@ public class Chunk { // Paper start entity.setCurrentChunk(null); - entityCounts.decrement(entity.entityKeyString); + entityCounts.decrement(entity.getMinecraftKeyString()); + if (entity instanceof EntityItem) { + itemCounts[i]--; + } else if (entity instanceof IInventory) { diff --git a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch index ab101e5b52..34deccd67d 100644 --- a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch @@ -11,7 +11,7 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b241c0380..a4c94845b 100644 +index b241c0380d..a4c94845b8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -25,7 +25,7 @@ index b241c0380..a4c94845b 100644 + } } diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java -index ec9a87239..b08274d93 100644 +index ec9a87239a..b08274d933 100644 --- a/src/main/java/net/minecraft/server/CommandScoreboard.java +++ b/src/main/java/net/minecraft/server/CommandScoreboard.java @@ -0,0 +0,0 @@ public class CommandScoreboard extends CommandAbstract { @@ -37,7 +37,7 @@ index ec9a87239..b08274d93 100644 if (scoreboard.addPlayerToTeam(s2, s)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 804104818..f547dbfd0 100644 +index 9d6e684d26..a03a809d61 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index 6c26b4e26b..7b823abdbc 100644 --- a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6d1e61e23..92b2bcb86 100644 +index 26a76ec972..d156563b08 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch index 01e4686f72..de23cd6dc7 100644 --- a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch @@ -7,7 +7,7 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index daf97bce3..87b82f908 100644 +index ff854e1ab9..fd193bbece 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch index 20afcfa27b..0c3240bfdc 100644 --- a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0094d1a87..4da846719 100644 +index 0094d1a87d..4da846719d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -24,7 +24,7 @@ index 0094d1a87..4da846719 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4540bf9f9..d358ab26a 100644 +index 459bdbd6ec..335d2ce4cb 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -36,7 +36,7 @@ index 4540bf9f9..d358ab26a 100644 public EntityItem a(ItemStack itemstack, float f) { if (itemstack.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 579e51a0a..2ba5d51a5 100644 +index 579e51a0aa..2ba5d51a5f 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { @@ -58,7 +58,7 @@ index 579e51a0a..2ba5d51a5 100644 blockposition = new BlockPosition(this); boolean flag = this.block.getBlock() == Blocks.dS; diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 44b2d4735..0d70dd1d2 100644 +index 44b2d47351..0d70dd1d22 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index 00494ddb1b..e5aafafc26 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 14c8edeff..e3f6557e1 100644 +index 14c8edeffc..e3f6557e1f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -78,7 +78,7 @@ index 14c8edeff..e3f6557e1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 04adf4e3c..b31c301ec 100644 +index f1815d3766..7a62fae332 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -145,7 +145,7 @@ index 04adf4e3c..b31c301ec 100644 this.world.a((Collection) entityslice); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0d3af8cb7..7188d0c99 100644 +index 93ab050fa6..fdabb1e369 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -157,7 +157,7 @@ index 0d3af8cb7..7188d0c99 100644 this.uniqueID = uuid; this.ar = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 994d4bbb8..1244baf45 100644 +index 994d4bbb84..1244baf45a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Entity-Origin-API.patch b/Spigot-Server-Patches/Entity-Origin-API.patch index e83479c99d..e428d72499 100644 --- a/Spigot-Server-Patches/Entity-Origin-API.patch +++ b/Spigot-Server-Patches/Entity-Origin-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d358ab26a..011cf59c0 100644 +index 335d2ce4cb..cea987f33e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -51,7 +51,7 @@ index d358ab26a..011cf59c0 100644 NBTTagList nbttaglist = new NBTTagList(); double[] adouble1 = adouble; diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 2ba5d51a5..abdc2dea9 100644 +index 2ba5d51a5f..abdc2dea9b 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { @@ -70,7 +70,7 @@ index 2ba5d51a5..abdc2dea9 100644 public void a(boolean flag) { diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 0d70dd1d2..bb0904f86 100644 +index 0d70dd1d22..bb0904f865 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { @@ -89,7 +89,7 @@ index 0d70dd1d2..bb0904f86 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index bc6383669..ca9eb2f3b 100644 +index bc6383669e..ca9eb2f3b2 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -0,0 +0,0 @@ public class NBTTagList extends NBTBase { @@ -101,7 +101,7 @@ index bc6383669..ca9eb2f3b 100644 if (i >= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 26d4bd690..31b765dea 100644 +index 26d4bd690b..31b765deaf 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -118,7 +118,7 @@ index 26d4bd690..31b765dea 100644 flag = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 833e3111d..6c23e88a5 100644 +index 833e3111de..6c23e88a54 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch b/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch index 451d8c0d2f..19faabec7b 100644 --- a/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch +++ b/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch @@ -14,7 +14,7 @@ Specially with servers using smaller mob spawn ranges than view distance, as wel This patch returns mob counting to use all loaded chunks, and 17x17 division. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index da7b59434..1157bc7eb 100644 +index e9a44098d9..6c86d3b6bc 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -25,10 +25,10 @@ index da7b59434..1157bc7eb 100644 // Paper start + if (!this.entitySlices[i].remove(entity)) { return; } entity.setCurrentChunk(null); - entityCounts.decrement(entity.entityKeyString); + entityCounts.decrement(entity.getMinecraftKeyString()); if (entity instanceof EntityItem) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 45a83ae99..ed22607d9 100644 +index 45a83ae995..ed22607d91 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { diff --git a/Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch index 907f333677..dd7de7ea22 100644 --- a/Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch +++ b/Spigot-Server-Patches/Mark-chunk-dirty-anytime-entities-change-to-guarante.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b31c301ec..6de053781 100644 +index 7a62fae332..eaee492010 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -15,7 +15,7 @@ index b31c301ec..6de053781 100644 // Paper start + this.markDirty(); entity.setCurrentChunk(this); - entityCounts.increment(entity.entityKeyString); + entityCounts.increment(entity.getMinecraftKeyString()); if (entity instanceof EntityItem) { @@ -0,0 +0,0 @@ public class Chunk { @@ -23,6 +23,6 @@ index b31c301ec..6de053781 100644 if (!this.entitySlices[i].remove(entity)) { return; } + this.markDirty(); entity.setCurrentChunk(null); - entityCounts.decrement(entity.entityKeyString); + entityCounts.decrement(entity.getMinecraftKeyString()); if (entity instanceof EntityItem) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-Hoppers.patch b/Spigot-Server-Patches/Optimize-Hoppers.patch index 2c4f1253f0..19a5f830ec 100644 --- a/Spigot-Server-Patches/Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/Optimize-Hoppers.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Optimize Hoppers * Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9fd76dcc9..363e03b65 100644 +index 9fd76dcc90..363e03b65d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -28,7 +28,7 @@ index 9fd76dcc9..363e03b65 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fcf6bac08..3092913f5 100644 +index fcf6bac08f..3092913f5b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -40,7 +40,7 @@ index fcf6bac08..3092913f5 100644 this.methodProfiler.a(() -> { return worldserver.getWorldData().getName(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 5b5f102e2..3f6b34489 100644 +index 30d3e19de8..54bfbfc6bc 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -60,7 +60,7 @@ index 5b5f102e2..3f6b34489 100644 this.g = iblockdata.getBlock().toLegacyData(iblockdata); diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index e9315f2d5..5198a590a 100644 +index e9315f2d5c..5198a590a7 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index de115b9a2c..abdefde5ce 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index abc1aabdd..6ea608ba9 100644 +index abc1aabdd8..6ea608ba9a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index abc1aabdd..6ea608ba9 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 87b82f908..fa9319aff 100644 +index fd193bbece..89e42c0a46 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -31,7 +31,7 @@ index 87b82f908..fa9319aff 100644 public ScoreboardTeamBase aY() { if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ba1cc267e..2b8162917 100644 +index ba1cc267e6..2b81629170 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index 60336912ac..ea2c251274 100644 --- a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optional TNT doesn't move in water diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 067cb233e..06acdaaf0 100644 +index 067cb233e4..06acdaaf04 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ package com.destroystokyo.paper; @@ -32,7 +32,7 @@ index 067cb233e..06acdaaf0 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9b01c23e0..0a62ebf4a 100644 +index 0456cda937..2fbe17ce9d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -60,7 +60,7 @@ index 9b01c23e0..0a62ebf4a 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index bb0904f86..50811852a 100644 +index bb0904f865..50811852a3 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch index 50b30e3402..24a65a5cad 100644 --- a/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 15f18ba1d..33e245e4c 100644 +index 081e56f481..f191225c62 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -23,7 +23,7 @@ index 15f18ba1d..33e245e4c 100644 public String a() throws Exception { int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 31b765dea..fd5f8102a 100644 +index 31b765deaf..fd5f8102af 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch index 62247100bb..33fe560291 100644 --- a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch +++ b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch @@ -22,7 +22,7 @@ requirement, but plugins (such as my own) use this method to trigger a "reload" of the entity on the client. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2dbb88f2d..80ecdb282 100644 +index ea2502409d..71da8e1e7d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -35,7 +35,7 @@ index 2dbb88f2d..80ecdb282 100644 this.world.methodProfiler.a("reposition"); /* CraftBukkit start - Handled in calculateTarget diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 49019d54d..bba2e164f 100644 +index 49019d54d5..bba2e164f2 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch b/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch index 29e4e1bea3..e756b1db4c 100644 --- a/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch +++ b/Spigot-Server-Patches/Store-counts-for-each-Entity-Block-Entity-Type.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type Opens door for future patches to optimize performance diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ea167a17b..77fdb3c4a 100644 +index ea167a17bb..efcece7857 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -21,11 +21,11 @@ index ea167a17b..77fdb3c4a 100644 TileEntity replaced = super.put(key, value); if (replaced != null) { replaced.setCurrentChunk(null); -+ tileEntityCounts.decrement(replaced.tileEntityKeyString); ++ tileEntityCounts.decrement(replaced.getMinecraftKeyString()); } if (value != null) { value.setCurrentChunk(Chunk.this); -+ tileEntityCounts.increment(value.tileEntityKeyString); ++ tileEntityCounts.increment(value.getMinecraftKeyString()); } return replaced; } @@ -33,7 +33,7 @@ index ea167a17b..77fdb3c4a 100644 TileEntity removed = super.remove(key); if (removed != null) { removed.setCurrentChunk(null); -+ tileEntityCounts.decrement(removed.tileEntityKeyString); ++ tileEntityCounts.decrement(removed.getMinecraftKeyString()); } return removed; } @@ -41,7 +41,7 @@ index ea167a17b..77fdb3c4a 100644 this.entitySlices[k].add(entity); // Paper start entity.setCurrentChunk(this); -+ entityCounts.increment(entity.entityKeyString); ++ entityCounts.increment(entity.getMinecraftKeyString()); // Paper end // Spigot start - increment creature type count // Keep this synced up with World.a(Class) @@ -49,7 +49,7 @@ index ea167a17b..77fdb3c4a 100644 this.entitySlices[i].remove(entity); // Paper start entity.setCurrentChunk(null); -+ entityCounts.decrement(entity.entityKeyString); ++ entityCounts.decrement(entity.getMinecraftKeyString()); // Paper end // Spigot start - decrement creature type count // Keep this synced up with World.a(Class) diff --git a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index e2f83fe2b3..d9e3cac4ed 100644 --- a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 4bbebb25a..ea167a17b 100644 +index 4bbebb25af..ea167a17bb 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -81,7 +81,7 @@ index 4bbebb25a..ea167a17b 100644 // Keep this synced up with World.a(Class) if (entity instanceof EntityInsentient) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3a8902bf1..4af566b36 100644 +index 06c72b95f3..c107bd767f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper @@ -120,11 +120,11 @@ index 3a8902bf1..4af566b36 100644 + public Chunk getChunkAtLocation() { + return getCurrentChunkAt((int)Math.floor(locX) >> 4, (int)Math.floor(locZ) >> 4); + } - public final MinecraftKey entityKey = EntityTypes.getKey(this); - public final String entityKeyString = entityKey != null ? entityKey.toString() : null; + private String entityKeyString = null; + private MinecraftKey entityKey = getMinecraftKey(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 672ba3134..d7132c3c0 100644 +index 0176ca530c..29069b753e 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { @@ -139,11 +139,11 @@ index 672ba3134..d7132c3c0 100644 + public void setCurrentChunk(Chunk chunk) { + this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null; + } - public final MinecraftKey tileEntityKey = getKey(this.getClass()); - public final String tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null; + private String tileEntityKeyString = null; + private MinecraftKey tileEntityKey = getMinecraftKey(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index c5a194ffe..833e3111d 100644 +index c5a194ffea..833e3111de 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ import java.util.UUID; diff --git a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch index 1b392eecc5..ea698d704e 100644 --- a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch +++ b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vehicle Event Cancellation Changes diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fa9319aff..a3e9ee052 100644 +index 89e42c0a46..86b783e73b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index 188e517b86..4452b53b54 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 80ecdb282..99dac412f 100644 +index 71da8e1e7d..28713f045d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper From 8d4ed37c3b1b1f338a99f520340c8fd80d84a941 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Fri, 27 Jul 2018 13:10:30 -0500 Subject: [PATCH 64/67] Update upstream B/CB --- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/work/Bukkit b/work/Bukkit index c520a96024..47e3d2954d 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit c520a96024beeb557ebccbc0f18a938a232635a1 +Subproject commit 47e3d2954d0dd279c93524baec241b76acaef7c7 diff --git a/work/CraftBukkit b/work/CraftBukkit index e70d864f00..4b00823222 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit e70d864f0063ccc5939ead10db5cc1fb6991fdf8 +Subproject commit 4b00823222b633f1776cdc12da55b2e0f88371e2 From 5abfd8100e4278a7cdc4c27a6d9ce31a87898a13 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 28 Jul 2018 03:38:13 +0100 Subject: [PATCH 65/67] Update CB/S --- ...working-with-arrows-stuck-in-living-.patch | 2 +- ...e-informative-in-maxHealth-exception.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 6 +-- .../Don-t-teleport-dead-entities.patch | 2 +- .../Duplicate-UUID-Resolve-Option.patch | 8 ++-- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 2 +- .../LivingEntity-setKiller.patch | 2 +- ...e-shield-blocking-delay-configurable.patch | 6 +-- ...nilla-per-world-scoreboard-coloring-.patch | 2 +- .../Optional-TNT-doesn-t-move-in-water.patch | 2 +- ...emove-entities-on-dimension-teleport.patch | 2 +- .../Vehicle-Event-Cancellation-Changes.patch | 37 ------------------- ...-more-information-to-Entity.toString.patch | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 15 files changed, 21 insertions(+), 58 deletions(-) delete mode 100644 Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch diff --git a/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch index 855466010a..32c09d81c8 100644 --- a/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 1620d9a74e..506d0d4e48 100644 +index 9079f5e903..b25ce0c58f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Be-a-bit-more-informative-in-maxHealth-exception.patch b/Spigot-Server-Patches/Be-a-bit-more-informative-in-maxHealth-exception.patch index 3ff49055dd..abda4446e0 100644 --- a/Spigot-Server-Patches/Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/Spigot-Server-Patches/Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 13100e5d21..1620d9a74e 100644 +index ae402a2bf4..9079f5e903 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch index 052031062f..e85e1b2e8a 100644 --- a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch @@ -11,7 +11,7 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4a2d29674..2b25da046 100644 +index 4a2d296746..2b25da0465 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -25,7 +25,7 @@ index 4a2d29674..2b25da046 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1870930f6..085f95dfe 100644 +index b2f6bca8aa..22cd9c7d82 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -37,7 +37,7 @@ index 1870930f6..085f95dfe 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 574883462..dd48c6af0 100644 +index 574883462d..dd48c6af0c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch index a3d379929b..4d95f1b180 100644 --- a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch @@ -7,7 +7,7 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index dd47797724..a465f1cf79 100644 +index 063750cd5f..f69d544a51 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index 5247af55c2..6bb1de434a 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7bd7aa0d9..ba6d5b7ff 100644 +index 7bd7aa0d94..ba6d5b7ff5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -78,7 +78,7 @@ index 7bd7aa0d9..ba6d5b7ff 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b37fa3829..95c6812d7 100644 +index 3ac115ff65..4728ded917 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -145,7 +145,7 @@ index b37fa3829..95c6812d7 100644 this.world.a((Collection) entityslice); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b308f4416..b6d6d4f37 100644 +index 4ea52f9c59..2217ca9737 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -157,7 +157,7 @@ index b308f4416..b6d6d4f37 100644 this.uniqueID = uuid; this.au = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 747d99dbe..7a9f28421 100644 +index 747d99dbe6..7a9f28421b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch index c484912db4..f0d04ce8de 100644 --- a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch @@ -32,7 +32,7 @@ index 4455dc4891..8be1ba5269 100644 return this.isHandRaised() ? this.activeItem.k() - this.cX() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a6f847e313..768bce1411 100644 +index d7344809ec..e199d08377 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/LivingEntity-setKiller.patch b/Spigot-Server-Patches/LivingEntity-setKiller.patch index 8d06989576..ee0b364702 100644 --- a/Spigot-Server-Patches/LivingEntity-setKiller.patch +++ b/Spigot-Server-Patches/LivingEntity-setKiller.patch @@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index bd2d90349e..524cfd99b7 100644 +index b25ce0c58f..71b9b45f10 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch index a68e308ef3..eaf4b56df0 100644 --- a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3467da7c8..ddb5ced79 100644 +index 3467da7c8e..ddb5ced79d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 3467da7c8..ddb5ced79 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 999a02cad..eaab10a14 100644 +index 999a02cad3..eaab10a146 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -49,7 +49,7 @@ index 999a02cad..eaab10a14 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 524cfd99b..a6f847e31 100644 +index 71b9b45f10..d7344809ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 6bd0bcd6b2..dd13933f02 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -19,7 +19,7 @@ index 667a0dde8c..b6ef1d4378 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a465f1cf79..76934f81a8 100644 +index f69d544a51..c11e9a1bf1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index 7743e6a764..01746e5545 100644 --- a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -32,7 +32,7 @@ index a3823408ca..41e73b3409 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1f41c1ded1..d35c0437f3 100644 +index 7768698ec6..f8eda1c3e0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch index 0456c3f742..06f3de55ad 100644 --- a/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch +++ b/Spigot-Server-Patches/Properly-remove-entities-on-dimension-teleport.patch @@ -22,7 +22,7 @@ requirement, but plugins (such as my own) use this method to trigger a "reload" of the entity on the client. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index bd232b31e4..af7b91b479 100644 +index 472c48bef7..efcc215ed3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch deleted file mode 100644 index f0e26eacab..0000000000 --- a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Fri, 22 Apr 2016 18:20:05 -0500 -Subject: [PATCH] Vehicle Event Cancellation Changes - - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 85358902ff..98d67d9a17 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - public boolean j; public boolean blocksEntitySpawning() { return j; } // Paper - OBFHELPER - public final List passengers; - protected int k; -- private Entity ax; -+ private Entity ax;public void setVehicle(Entity entity) { this.ax = entity; } // Paper - OBFHELPER - public boolean attachedToPlayer; - public World world; - public double lastX; -@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); - } else { - // CraftBukkit start -+ entity.setVehicle(this); // Paper - Set the vehicle back for the event - CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); - Entity orig = craft == null ? null : craft.getHandle(); - if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { -@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return; - } - // Spigot end -+ -+ entity.setVehicle(null); // Paper - fix EntityDismountEvent cancellable - this.passengers.remove(entity); - entity.k = 60; - } --- \ No newline at end of file diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index e26e844529..6c37282aca 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index af7b91b47..a2101d44f 100644 +index efcc215ed3..5a003c8203 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/work/CraftBukkit b/work/CraftBukkit index 4b00823222..e3c21decb0 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 4b00823222b633f1776cdc12da55b2e0f88371e2 +Subproject commit e3c21decb0bff39ec2e4bb3c95a6554ea3755609 diff --git a/work/Spigot b/work/Spigot index f68f5a8253..69774b3e44 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit f68f5a82539faf7fb36f64bd72731e35d3e57cc3 +Subproject commit 69774b3e4419d3213023b46dc791214bd39f48d6 From 6cd0bd29abe7aef2a2ee1172e143e13d282f70cc Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Jul 2018 01:20:06 -0400 Subject: [PATCH 66/67] Fix Dupe UUID logic triggering when the duplicate is pending unload Vanilla logic checks unload queue and overwrites if its in it. we're triggering this if a chunk unloads, and reloads immediately in same tick. Added check for unload queue to not treat as duplicate Also fixed the config setting not even loading --- .../Duplicate-UUID-Resolve-Option.patch | 29 +++++++++++++++---- ...revent-Saving-Bad-entities-to-chunks.patch | 20 +------------ 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index e5aafafc26..5377509981 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 14c8edeffc..e3f6557e1f 100644 +index 14c8edeffc..1f4e438c1f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -45,7 +45,7 @@ index 14c8edeffc..e3f6557e1f 100644 + REGEN, DELETE, NOTHING, WARN + } + public DuplicateUUIDMode duplicateUUIDMode = DuplicateUUIDMode.REGEN; -+ public void repairDuplicateUUID() { ++ private void repairDuplicateUUID() { + String desiredMode = getString("duplicate-uuid-resolver", "regenerate").toLowerCase().trim(); + switch (desiredMode.toLowerCase()) { + case "regen": @@ -78,7 +78,7 @@ index 14c8edeffc..e3f6557e1f 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index f1815d3766..7a62fae332 100644 +index f1815d3766..74612a3924 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -114,15 +114,16 @@ index f1815d3766..7a62fae332 100644 List entityslice = aentityslice[j]; // Spigot + // Paper start + DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode; -+ if (mode == DuplicateUUIDMode.DELETE || mode == DuplicateUUIDMode.REGEN) { ++ if (mode == DuplicateUUIDMode.WARN | mode == DuplicateUUIDMode.DELETE || mode == DuplicateUUIDMode.REGEN) { + Map thisChunk = new HashMap<>(); + for (Iterator iterator = ((List) entityslice).iterator(); iterator.hasNext(); ) { + Entity entity = iterator.next(); ++ if (entity.dead) continue; + Entity other = ((WorldServer) world).entitiesByUUID.get(entity.uniqueID); -+ if (other == null) { ++ if (other == null || other.dead || world.getEntityUnloadQueue().contains(other)) { + other = thisChunk.get(entity.uniqueID); + } -+ if (other != null) { ++ if (other != null && !other.dead) { + switch (mode) { + case REGEN: { + entity.setUUID(UUID.randomUUID()); @@ -135,6 +136,9 @@ index f1815d3766..7a62fae332 100644 + iterator.remove(); + break; + } ++ default: ++ logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", doing nothing to " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about."); ++ break; + } + } + thisChunk.put(entity.uniqueID, entity); @@ -156,6 +160,19 @@ index 93ab050fa6..fdabb1e369 100644 public void a(UUID uuid) { this.uniqueID = uuid; this.ar = this.uniqueID.toString(); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 52adee8806..b4de3b515a 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { + } + }; + // Spigot end +- protected final Set f = Sets.newHashSet(); // Paper ++ protected final Set f = Sets.newHashSet(); public Set getEntityUnloadQueue() { return f; };// Paper - OBFHELPER + //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list + public final List tileEntityListTick = Lists.newArrayList(); + private final List b = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index 994d4bbb84..1244baf45a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java diff --git a/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch index 97407ad8fb..9013fb129e 100644 --- a/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch @@ -17,24 +17,6 @@ an invalid entity. This should reduce log occurrences of dupe uuid messages. -diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index be0b411e5c..e5a5217429 100644 ---- a/src/main/java/net/minecraft/server/Chunk.java -+++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -0,0 +0,0 @@ public class Chunk { - Map thisChunk = new HashMap<>(); - for (Iterator iterator = ((List) entityslice).iterator(); iterator.hasNext(); ) { - Entity entity = iterator.next(); -+ if (entity.dead) continue; - Entity other = ((WorldServer) world).entitiesByUUID.get(entity.uniqueID); - if (other == null) { - other = thisChunk.get(entity.uniqueID); - } -- if (other != null) { -+ if (other != null && !other.dead) { - switch (mode) { - case REGEN: { - entity.setUUID(UUID.randomUUID()); diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java index bcce5e8b7e..bad287fca4 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -75,7 +57,7 @@ index bcce5e8b7e..bad287fca4 100644 nbttagcompound.set("Entities", nbttaglist1); NBTTagList nbttaglist2 = new NBTTagList(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 52adee8806..c2b92ad3a5 100644 +index b4de3b515a..d2d2ab794b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { From 28d01d85cc87652d19d5716a2af6d93d031c24a5 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 28 Jul 2018 01:03:10 -0500 Subject: [PATCH 67/67] 1.13: EnderDragon Events (#1247) Replaces PR #1185 for 1.13 Add some new cancellable enderdragon events dealing with its fireball shooting and the areaeffectcloud it spawns. Based on [talking with someone with a specific use-case](https://www.spigotmc.org/threads/cancel-projectilehitevent.326466/) this was [confirmed to work](http://i.imgur.com/ezlfpKC.png) for them in PM. --- Spigot-API-Patches/EnderDragon-Events.patch | 207 ++++++++++++++++++ .../EnderDragon-Events.patch | 58 +++++ 2 files changed, 265 insertions(+) create mode 100644 Spigot-API-Patches/EnderDragon-Events.patch create mode 100644 Spigot-Server-Patches/EnderDragon-Events.patch diff --git a/Spigot-API-Patches/EnderDragon-Events.patch b/Spigot-API-Patches/EnderDragon-Events.patch new file mode 100644 index 0000000000..b515af425b --- /dev/null +++ b/Spigot-API-Patches/EnderDragon-Events.patch @@ -0,0 +1,207 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:51:05 -0500 +Subject: [PATCH] EnderDragon Events + + +diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java +new file mode 100644 +index 00000000..2ac57af3 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java +@@ -0,0 +0,0 @@ ++package com.destroystokyo.paper.event.entity; ++ ++import org.bukkit.entity.AreaEffectCloud; ++import org.bukkit.entity.DragonFireball; ++import org.bukkit.entity.LivingEntity; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.entity.EntityEvent; ++ ++import java.util.Collection; ++ ++/** ++ * Fired when a DragonFireball collides with a block/entity and spawns an AreaEffectCloud ++ */ ++public class EnderDragonFireballHitEvent extends EntityEvent implements Cancellable { ++ private final Collection targets; ++ private final AreaEffectCloud areaEffectCloud; ++ ++ public EnderDragonFireballHitEvent(DragonFireball fireball, Collection targets, AreaEffectCloud areaEffectCloud) { ++ super(fireball); ++ this.targets = targets; ++ this.areaEffectCloud = areaEffectCloud; ++ } ++ ++ /** ++ * The fireball involved in this event ++ */ ++ @Override ++ public DragonFireball getEntity() { ++ return (DragonFireball) super.getEntity(); ++ } ++ ++ /** ++ * The living entities hit by fireball ++ *

++ * May be null if no entities were hit ++ */ ++ public Collection getTargets() { ++ return targets; ++ } ++ ++ /** ++ * The area effect cloud spawned in this collision ++ */ ++ public AreaEffectCloud getAreaEffectCloud() { ++ return areaEffectCloud; ++ } ++ ++ private static final HandlerList handlers = new HandlerList(); ++ ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ private boolean cancelled = false; ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java +new file mode 100644 +index 00000000..59f87633 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java +@@ -0,0 +0,0 @@ ++package com.destroystokyo.paper.event.entity; ++ ++import org.bukkit.entity.AreaEffectCloud; ++import org.bukkit.entity.EnderDragon; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.entity.EntityEvent; ++ ++/** ++ * Fired when an EnderDragon spawns an AreaEffectCloud by shooting flames ++ */ ++public class EnderDragonFlameEvent extends EntityEvent implements Cancellable { ++ private final AreaEffectCloud areaEffectCloud; ++ ++ public EnderDragonFlameEvent(EnderDragon enderDragon, AreaEffectCloud areaEffectCloud) { ++ super(enderDragon); ++ this.areaEffectCloud = areaEffectCloud; ++ } ++ ++ /** ++ * The enderdragon involved in this event ++ */ ++ @Override ++ public EnderDragon getEntity() { ++ return (EnderDragon) super.getEntity(); ++ } ++ ++ /** ++ * The area effect cloud spawned in this collision ++ */ ++ public AreaEffectCloud getAreaEffectCloud() { ++ return areaEffectCloud; ++ } ++ ++ private static final HandlerList handlers = new HandlerList(); ++ ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ private boolean cancelled = false; ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java +new file mode 100644 +index 00000000..296ae244 +--- /dev/null ++++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java +@@ -0,0 +0,0 @@ ++package com.destroystokyo.paper.event.entity; ++ ++import org.bukkit.entity.DragonFireball; ++import org.bukkit.entity.EnderDragon; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.entity.EntityEvent; ++ ++/** ++ * Fired when an EnderDragon shoots a fireball ++ */ ++public class EnderDragonShootFireballEvent extends EntityEvent implements Cancellable { ++ private final DragonFireball fireball; ++ ++ public EnderDragonShootFireballEvent(EnderDragon entity, DragonFireball fireball) { ++ super(entity); ++ this.fireball = fireball; ++ } ++ ++ /** ++ * The enderdragon shooting the fireball ++ */ ++ @Override ++ public EnderDragon getEntity() { ++ return (EnderDragon) super.getEntity(); ++ } ++ ++ /** ++ * The fireball being shot ++ */ ++ public DragonFireball getFireball() { ++ return fireball; ++ } ++ ++ private static final HandlerList handlers = new HandlerList(); ++ ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++ ++ private boolean cancelled = false; ++ ++ @Override ++ public boolean isCancelled() { ++ return cancelled; ++ } ++ ++ @Override ++ public void setCancelled(boolean cancel) { ++ cancelled = cancel; ++ } ++} +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/EnderDragon-Events.patch b/Spigot-Server-Patches/EnderDragon-Events.patch new file mode 100644 index 0000000000..4aabd99d58 --- /dev/null +++ b/Spigot-Server-Patches/EnderDragon-Events.patch @@ -0,0 +1,58 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sat, 21 Jul 2018 01:51:27 -0500 +Subject: [PATCH] EnderDragon Events + + +diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +index b78d3fe50..ef8b0e765 100644 +--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java ++++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +@@ -0,0 +0,0 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded + this.d.setDuration(200); + this.d.setParticle(Particles.j); + this.d.a(new MobEffect(MobEffects.HARM)); ++ if (new com.destroystokyo.paper.event.entity.EnderDragonFlameEvent((org.bukkit.entity.EnderDragon) this.a.getBukkitEntity(), (org.bukkit.entity.AreaEffectCloud) this.d.getBukkitEntity()).callEvent()) // Paper + this.a.world.addEntity(this.d); ++ else this.removeAreaEffect(); // Paper + } + + } +@@ -0,0 +0,0 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded + ++this.c; + } + ++ public void removeAreaEffect() { this.e(); } // Paper - OBFHELPER + public void e() { + if (this.d != null) { + this.d.die(); +diff --git a/src/main/java/net/minecraft/server/DragonControllerStrafe.java b/src/main/java/net/minecraft/server/DragonControllerStrafe.java +index 9c158fd58..b4887d658 100644 +--- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java ++++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java +@@ -0,0 +0,0 @@ public class DragonControllerStrafe extends AbstractDragonController { + EntityDragonFireball entitydragonfireball = new EntityDragonFireball(this.a.world, this.a, d9, d10, d11); + + entitydragonfireball.setPositionRotation(d6, d7, d8, 0.0F, 0.0F); ++ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) a.getBukkitEntity(), (org.bukkit.entity.DragonFireball) entitydragonfireball.getBukkitEntity()).callEvent()) // Paper + this.a.world.addEntity(entitydragonfireball); ++ else entitydragonfireball.die(); // Paper + this.c = 0; + if (this.d != null) { + while (!this.d.b()) { +diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java +index 862ffc954..2b55cc68b 100644 +--- a/src/main/java/net/minecraft/server/EntityDragonFireball.java ++++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java +@@ -0,0 +0,0 @@ public class EntityDragonFireball extends EntityFireball { + } + } + ++ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list, (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper + this.world.triggerEffect(2006, new BlockPosition(this.locX, this.locY, this.locZ), 0); + this.world.addEntity(entityareaeffectcloud); ++ } else entityareaeffectcloud.die(); // Paper + this.die(); + } + +-- \ No newline at end of file