diff --git a/Spigot-API-Patches/Add-BaseComponent-sendMessage-methods-to-CommandSend.patch b/Spigot-API-Patches/Add-BaseComponent-sendMessage-methods-to-CommandSend.patch index dd236d26c6..18c1bfcb81 100644 --- a/Spigot-API-Patches/Add-BaseComponent-sendMessage-methods-to-CommandSend.patch +++ b/Spigot-API-Patches/Add-BaseComponent-sendMessage-methods-to-CommandSend.patch @@ -48,15 +48,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param component the components to send */ + @Override - public void sendMessage(net.md_5.bungee.api.chat.BaseComponent component); - - /** + public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent component) { + spigot().sendMessage(component); + } @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param components the components to send */ + @Override - public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components); - - /** + public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components) { + spigot().sendMessage(components); + } -- \ No newline at end of file diff --git a/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch index 9945473466..3400015dc0 100644 --- a/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch +++ b/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add String based Action Bar API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index bf4c31ba..5c38b3f3 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline diff --git a/Spigot-API-Patches/Add-debug-logging-to-Timings-enable-setter.patch b/Spigot-API-Patches/Add-debug-logging-to-Timings-enable-setter.patch deleted file mode 100644 index 4aa6d09971..0000000000 --- a/Spigot-API-Patches/Add-debug-logging-to-Timings-enable-setter.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Wed, 26 Oct 2016 15:49:28 -0500 -Subject: [PATCH] Add debug logging to Timings enable setter - -Potentially temporary, will be merged back into main Timings patch if not. -`java -Dtimings.throwOnChange=true -jar paperclip.jar` - -diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/co/aikar/timings/Timings.java -+++ b/src/main/java/co/aikar/timings/Timings.java -@@ -0,0 +0,0 @@ public final class Timings { - public static void setTimingsEnabled(boolean enabled) { - timingsEnabled = enabled; - reset(); -+ if (Boolean.getBoolean("timings.throwOnChange")) { -+ new RuntimeException("The enable state of timings has been changed to: " + enabled).printStackTrace(); -+ } - } - - /** --- \ No newline at end of file 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 e84d32a193..688d2fc7b8 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 @@ -50,14 +50,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * + * @param component the component to send + */ -+ public void broadcast(net.md_5.bungee.api.chat.BaseComponent component); ++ public default void broadcast(net.md_5.bungee.api.chat.BaseComponent component) { ++ spigot().broadcast(component); ++ } + + /** + * Sends an array of components as a single message to all online players. + * + * @param components the components to send + */ -+ public void broadcast(net.md_5.bungee.api.chat.BaseComponent... components); ++ public default void broadcast(net.md_5.bungee.api.chat.BaseComponent... components) { ++ spigot().broadcast(components); ++ } + // Paper end + /** @@ -77,14 +81,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * + * @param component the components to send + */ -+ public void sendMessage(net.md_5.bungee.api.chat.BaseComponent component); ++ public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent component) { ++ spigot().sendMessage(component); ++ } + + /** + * Sends an array of components as a single message to the player + * + * @param components the components to send + */ -+ public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components); ++ public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components) { ++ spigot().sendMessage(components); ++ } + + /** + * Sends an array of components as a single message to the specified screen position of this player @@ -92,7 +100,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param position the screen position + * @param components the components to send + */ -+ public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components); ++ public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { ++ spigot().sendMessage(position, components); ++ } + // Paper end + /** diff --git a/Spigot-API-Patches/POM-changes.patch b/Spigot-API-Patches/POM-changes.patch index 9cad69d4ba..bf0d81578c 100644 --- a/Spigot-API-Patches/POM-changes.patch +++ b/Spigot-API-Patches/POM-changes.patch @@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - spigot-api + com.destroystokyo.paper + paper-api - 1.11-R0.1-SNAPSHOT + 1.11.1-R0.1-SNAPSHOT jar - Spigot-API 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 087aa12ba0..e62da9714c 100644 --- a/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch @@ -381,9 +381,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import org.bukkit.ChatColor; import org.bukkit.Effect; @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline - * @param components the components to send - */ - public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components); + public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { + spigot().sendMessage(position, components); + } + + /** + * Set the text displayed in the player list header and footer for this player 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 9d42065426..d0107ef7b5 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 9c1605b14..b566d5eee 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 extends WorldGenBase { @@ -25,7 +25,7 @@ index 9c1605b14..b566d5eee 100644 if (!flag1 || !world.b(l2, i3)) { return new BlockPosition((l2 << 4) + 8, 64, (i3 << 4) + 8); diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 632eb1c9d..1bb172bbf 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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/Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch index 14ad758340..4b530fd420 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 73bf74422..a655b3310 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -28,7 +28,7 @@ index 73bf74422..a655b3310 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 4a6b3da1b..35675d9a5 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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-fishing-time-ranges.patch b/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch index 788e521c31..c3b167708c 100644 --- a/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch +++ b/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch @@ -30,8 +30,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } else { - this.h = MathHelper.nextInt(this.random, 100, 600); -+ this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range - this.h -= EnchantmentManager.g(this.owner) * 20 * 5; ++ this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper + this.h -= this.ax * 20 * 5; } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch b/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch index d9f7935023..e4987e3070 100644 --- a/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch +++ b/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch @@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + // OBFHELPER + private void addCollisions(IBlockData blockData, World world, BlockPosition where, AxisAlignedBB collider, List list, Entity entity) { -+ blockData.a(world, where, collider, list, entity); ++ blockData.a(world, where, collider, list, entity, false); + } + // Paper end + diff --git a/Spigot-Server-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-Server-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch deleted file mode 100644 index 1b584c2972..0000000000 --- a/Spigot-Server-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Thu, 3 Mar 2016 02:21:58 -0600 -Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses - - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -0,0 +0,0 @@ public final class CraftServer implements Server { - return count; - } - -+ // Paper start -+ @Override -+ public void broadcast(BaseComponent component) { -+ this.spigot.broadcast(component); -+ } -+ -+ @Override -+ public void broadcast(BaseComponent... components) { -+ this.spigot.broadcast(components); -+ } -+ // Paper end -+ - @Override - @Deprecated - public OfflinePlayer getOfflinePlayer(String name) { -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - } - } - -+ // Paper start -+ @Override -+ public void sendMessage(BaseComponent component) { -+ this.spigot.sendMessage(component); -+ } -+ -+ @Override -+ public void sendMessage(BaseComponent... components) { -+ this.spigot.sendMessage(components); -+ } -+ -+ @Override -+ public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) { -+ this.spigot.sendMessage(position, components); -+ } -+ // Paper end -+ - @Override - public String getDisplayName() { - return getHandle().displayName; --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Ignore-invalid-Marker-Icon-ID-s-in-maps.patch b/Spigot-Server-Patches/Ignore-invalid-Marker-Icon-ID-s-in-maps.patch index 968cb1862c..1b65bf23a6 100644 --- a/Spigot-Server-Patches/Ignore-invalid-Marker-Icon-ID-s-in-maps.patch +++ b/Spigot-Server-Patches/Ignore-invalid-Marker-Icon-ID-s-in-maps.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ignore invalid Marker Icon ID's in maps Replace with the red marker. Should of only happened by creative abuse. diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index dbe6a80f2..dfd8e4d84 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 { diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 447f533d15..786ec84a8c 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -225,10 +225,10 @@ diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/j index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -0,0 +0,0 @@ import javax.annotation.Nullable; - +@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; public class NBTTagCompound extends NBTBase { + private static final Logger b = LogManager.getLogger(); - private final Map map = Maps.newHashMap(); + public final Map map = Maps.newHashMap(); // Paper diff --git a/Spigot-Server-Patches/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index 01cf4c9b8f..cf4d99be74 100644 --- a/Spigot-Server-Patches/POM-Changes.patch +++ b/Spigot-Server-Patches/POM-Changes.patch @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + com.destroystokyo.paper + paper jar - 1.11-R0.1-SNAPSHOT + 1.11.1-R0.1-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper diff --git a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch index 1021e9a67b..53568efbf2 100644 --- a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch @@ -89,10 +89,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import com.google.common.collect.ImmutableSet; import com.mojang.authlib.GameProfile; @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) { - this.spigot.sendMessage(position, components); + } } -+ + ++ // Paper start + @Override + public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) { + PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter(); @@ -169,7 +169,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public void hideTitle() { + getHandle().playerConnection.sendPacket(new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.CLEAR, (BaseComponent[]) null, 0, 0, 0)); + } - // Paper end - ++ // Paper end ++ @Override + public String getDisplayName() { + return getHandle().displayName; -- \ No newline at end of file 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 60273f9629..cf1e293db1 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 c0ef2400b..74d1fd6b2 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 c0ef2400b..74d1fd6b2 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 9038d52eb..632eb1c9d 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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-possible-infinite-loop-in-BlockPosition-iter.patch b/Spigot-Server-Patches/Prevent-possible-infinite-loop-in-BlockPosition-iter.patch deleted file mode 100644 index 9cd41edbb0..0000000000 --- a/Spigot-Server-Patches/Prevent-possible-infinite-loop-in-BlockPosition-iter.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: DemonWav -Date: Sat, 26 Mar 2016 21:36:05 -0500 -Subject: [PATCH] Prevent possible infinite loop in BlockPosition iterator - - -diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 { - - protected BlockPosition a() { - if (this.b == null) { -- this.b = blockposition; -+ this.b = blockposition2; // Paper - use blockposition2 instead of blockposition to prevent infinite loops - return this.b; -- } else if (this.b.equals(blockposition1)) { -+ } else if (this.b.equals(blockposition3)) { // Paper - use blockposition3 instead of blockposition1 to prevent infinite loops - return (BlockPosition) this.endOfData(); - } else { - int i = this.b.getX(); - int j = this.b.getY(); - int k = this.b.getZ(); - -+ // Paper start - use blockposition2 and blockposition3 to prevent infinite loops -+ /* - if (i < blockposition1.getX()) { - ++i; - } else if (j < blockposition1.getY()) { -@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { - j = blockposition.getY(); - ++k; - } -+ */ -+ if (i < blockposition3.getX()) { -+ ++i; -+ } else if (j < blockposition3.getY()) { -+ i = blockposition2.getX(); -+ ++j; -+ } else if (k < blockposition3.getZ()) { -+ i = blockposition2.getX(); -+ j = blockposition2.getY(); -+ ++k; -+ } -+ // Paper end - - this.b = new BlockPosition(i, j, k); - return this.b; -@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { - - protected BlockPosition.MutableBlockPosition a() { - if (this.b == null) { -- this.b = new BlockPosition.MutableBlockPosition(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -+ this.b = new BlockPosition.MutableBlockPosition(blockposition2.getX(), blockposition2.getY(), blockposition2.getZ()); // Paper - use blockposition2 instead of blockposition to prevent infinite loops - return this.b; -- } else if (this.b.equals(blockposition1)) { -+ } else if (this.b.equals(blockposition3)) { // Paper - use blockposition3 instead of blockposition1 to prevent infinite loops - return (BlockPosition.MutableBlockPosition) this.endOfData(); - } else { - int i = this.b.getX(); - int j = this.b.getY(); - int k = this.b.getZ(); - -+ // Paper start - use blockposition2 and blockposition3 to prevent infinite loops -+ /* - if (i < blockposition1.getX()) { - ++i; - } else if (j < blockposition1.getY()) { -@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { - j = blockposition.getY(); - ++k; - } -+ */ -+ if (i < blockposition3.getX()) { -+ ++i; -+ } else if (j < blockposition3.getY()) { -+ i = blockposition2.getX(); -+ ++j; -+ } else if (k < blockposition3.getZ()) { -+ i = blockposition2.getX(); -+ j = blockposition2.getY(); -+ ++k; -+ } -+ // Paper end - - this.b.b = i; - this.b.c = j; --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch index f55d324b27..ad46cb8634 100644 --- a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch @@ -33,52 +33,33 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - private final int c; - // Paper start - public boolean isValidLocation() { -- return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256; + // Paper start - Make mutable and protected for MutableBlockPos and PooledBlockPos -+ protected int x; -+ protected int y; -+ protected int z; ++ protected int a; ++ protected int b; ++ protected int c; + + public final boolean isValidLocation() { -+ return x >= -30000000 && z >= -30000000 && x < 30000000 && z < 30000000 && y >= 0 && y < 256; + return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 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 - Only allow a single implementation + public final int getX() { -+ return this.x; + return this.a; } - public int getY() { -- return this.b; + public final int getY() { -+ return this.y; + return this.b; } - public int getZ() { -- return this.c; + public final int getZ() { -+ return this.z; + return this.c; } + // Paper end @@ -89,18 +70,37 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- 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.b == null) { + this.b = new BlockPosition.MutableBlockPosition(i, j, k); + return this.b; +- } else if (this.b.b == l && this.b.c == i1 && this.b.d == j1) { ++ // Paper start - b, c, d, refer to x, y, z, and as such, a, b, c of BaseBlockPosition ++ } else if (((BaseBlockPosition)this.b).a == l && ((BaseBlockPosition)this.b).b == i1 && ((BaseBlockPosition)this.b).c == j1) { + return (BlockPosition.MutableBlockPosition) this.endOfData(); + } else { +- if (this.b.b < l) { +- ++this.b.b; +- } else if (this.b.c < i1) { +- this.b.b = i; +- ++this.b.c; +- } else if (this.b.d < j1) { +- this.b.b = i; +- this.b.c = j; +- ++this.b.d; ++ if (((BaseBlockPosition)this.b).a < l) { ++ ++((BaseBlockPosition)this.b).a; ++ } else if (((BaseBlockPosition)this.b).b < i1) { ++ ((BaseBlockPosition)this.b).a = i; ++ ++((BaseBlockPosition)this.b).b; ++ } else if (((BaseBlockPosition)this.b).c < j1) { ++ ((BaseBlockPosition) this.b).a = i; ++ ((BaseBlockPosition) this.b).b = j; ++ ++((BaseBlockPosition) this.b).c; } - // Paper end ++ // Paper end -- this.b.b = i; -- this.b.c = j; -- this.b.d = k; -+ ((BaseBlockPosition) this.b).x = i; -+ ((BaseBlockPosition) this.b).y = j; -+ ((BaseBlockPosition) this.b).z = k; return this.b; } - } @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { public static class MutableBlockPosition extends BlockPosition { @@ -126,9 +126,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.c = j; - this.d = k; + // Paper start - Modify base position variables -+ ((BaseBlockPosition) this).x = i; -+ ((BaseBlockPosition) this).y = j; -+ ((BaseBlockPosition) this).z = k; ++ ((BaseBlockPosition) this).a = i; ++ ((BaseBlockPosition) this).b = j; ++ ((BaseBlockPosition) this).c = k; + // Paper end } @@ -155,9 +155,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.c = j; - this.d = k; + // Paper start - Modify base position variables -+ ((BaseBlockPosition) this).x = i; -+ ((BaseBlockPosition) this).y = j; -+ ((BaseBlockPosition) this).z = k; ++ ((BaseBlockPosition) this).a = i; ++ ((BaseBlockPosition) this).b = j; ++ ((BaseBlockPosition) this).c = k; + // Paper end return this; } @@ -172,7 +172,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void p(int i) { - this.c = i; -+ ((BaseBlockPosition) this).y = i; // Paper - Modify base variable ++ ((BaseBlockPosition) this).b = i; // Paper - Modify base variable } public BlockPosition h() { diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index e135a1ea18..5207e5d4c5 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -1167,8 +1167,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 try { - SpigotTimings.tickEntityTimer.startTiming(); // Spigot + entity.tickTimer.startTiming(); // Paper - this.g(entity); + this.h(entity); - SpigotTimings.tickEntityTimer.stopTiming(); // Spigot ++ entity.tickTimer.stopTiming(); // Paper ++ entity.tickTimer.startTiming(); // Paper ++ this.g(entity); + entity.tickTimer.stopTiming(); // Paper } catch (Throwable throwable1) { + entity.tickTimer.stopTiming(); diff --git a/work/BuildData b/work/BuildData index 77931c01e7..bc05720eba 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 77931c01e72ff84c004a310b121a72b52f0efdd5 +Subproject commit bc05720eba5ca92c3f0da3b21314876c509111a1 diff --git a/work/Bukkit b/work/Bukkit index 55fa63e8b9..506e941126 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 55fa63e8b9c8f5f315f3d631fad2096a008074df +Subproject commit 506e9411267240a81a016a47b2c093bedad50a81 diff --git a/work/CraftBukkit b/work/CraftBukkit index c8ff65136f..8ea0c87f51 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit c8ff65136f23a3c2770b8d9ca508f61927f8acba +Subproject commit 8ea0c87f515290c35baf0029f7b2e046c1ff49cb diff --git a/work/Spigot b/work/Spigot index 6f7aabf0f7..9deaa4c15e 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 6f7aabf0f73188de2433ec4570412235772f8fba +Subproject commit 9deaa4c15ed177075d5b3906878a888571ab1a5e