diff --git a/Spigot-API-Patches/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-API-Patches/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index 65accef4f7..72377fc9bb 100644 --- a/Spigot-API-Patches/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/Spigot-API-Patches/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index b347a3ccf..8a8043351 100644 +index 33cd0ea0..35407d5e 100644 --- a/src/main/java/org/bukkit/Chunk.java +++ b/src/main/java/org/bukkit/Chunk.java @@ -0,0 +0,0 @@ public interface Chunk { diff --git a/Spigot-API-Patches/Add-Force-Loaded-Chunk-API.patch b/Spigot-API-Patches/Add-Force-Loaded-Chunk-API.patch deleted file mode 100644 index 98a6aff02c..0000000000 --- a/Spigot-API-Patches/Add-Force-Loaded-Chunk-API.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: willies952002 -Date: Wed, 29 Aug 2018 00:37:30 -0400 -Subject: [PATCH] Add Force-Loaded Chunk API - - -diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index 8a804335..4b9e0ca4 100644 ---- a/src/main/java/org/bukkit/Chunk.java -+++ b/src/main/java/org/bukkit/Chunk.java -@@ -0,0 +0,0 @@ public interface Chunk { - * @return true if slimes are able to spawn in this chunk - */ - boolean isSlimeChunk(); -+ -+ // Paper start - Force-Loaded Chunk API -+ /** -+ * Checks if the chunk is currently force-loaded -+ * -+ * @return true if the chunk is force-loaded, otherwise false -+ */ -+ boolean isForceLoaded(); -+ -+ /** -+ * Set's whether a chunk is force-loaded or not -+ * -+ * @param force whether or not to force load this chunk -+ */ -+ void setForceLoaded(boolean force); -+ // Paper end - } -diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index de89122e..aa28c452 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 { - return isChunkGenerated((int) chunkKey, (int) (chunkKey >> 32)); - } - -+ /** -+ * Checks if a chunk is force-loaded. -+ * Note: This will only return true if the chunk is also generated -+ * -+ * @param x X-coordinate of the chunk -+ * @param z Z-coordinate of the chunk -+ * @return true if the chunk is force-loaded. otherwise false -+ */ -+ public boolean isChunkForceLoaded(int x, int z); -+ - /** - * This is the Legacy API before Java 8 was supported. Java 8 Consumer is provided, - * as well as future support --- \ No newline at end of file diff --git a/Spigot-API-Patches/Add-ItemStackRecipeChoice-Draft-API.patch b/Spigot-API-Patches/Add-ItemStackRecipeChoice-Draft-API.patch index 6001f94448..3e2d518f36 100644 --- a/Spigot-API-Patches/Add-ItemStackRecipeChoice-Draft-API.patch +++ b/Spigot-API-Patches/Add-ItemStackRecipeChoice-Draft-API.patch @@ -9,7 +9,7 @@ Allows creating recipes that must match isSimilar to full item stack. diff --git a/src/main/java/com/destroystokyo/paper/inventory/ItemStackRecipeChoice.java b/src/main/java/com/destroystokyo/paper/inventory/ItemStackRecipeChoice.java new file mode 100644 -index 000000000..43e6576b1 +index 00000000..43e6576b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/inventory/ItemStackRecipeChoice.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Add-LivingEntity-getTargetEntity.patch b/Spigot-API-Patches/Add-LivingEntity-getTargetEntity.patch index f77d48f8c2..9f411c3699 100644 --- a/Spigot-API-Patches/Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-API-Patches/Add-LivingEntity-getTargetEntity.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java new file mode 100644 -index 000000000..5df8eed23 +index 00000000..5df8eed2 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java @@ -0,0 +0,0 @@ @@ -46,7 +46,7 @@ index 000000000..5df8eed23 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index bd47e7209..34a8fe3f7 100644 +index bd47e720..34a8fe3f 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource diff --git a/Spigot-API-Patches/Add-Material-Tags.patch b/Spigot-API-Patches/Add-Material-Tags.patch index e20bd5c0fb..80e3c83f2e 100644 --- a/Spigot-API-Patches/Add-Material-Tags.patch +++ b/Spigot-API-Patches/Add-Material-Tags.patch @@ -8,7 +8,7 @@ are related to each other by a trait. diff --git a/src/main/java/com/destroystokyo/paper/MaterialSetTag.java b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java new file mode 100644 -index 000000000..b4f78e075 +index 00000000..b4f78e07 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java @@ -0,0 +0,0 @@ @@ -153,7 +153,7 @@ index 000000000..b4f78e075 +} diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java new file mode 100644 -index 000000000..7a48445da +index 00000000..7a48445d --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java @@ -0,0 +0,0 @@ @@ -536,7 +536,7 @@ index 000000000..7a48445da +} diff --git a/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java new file mode 100644 -index 000000000..328c51471 +index 00000000..328c5147 --- /dev/null +++ b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java @@ -0,0 +0,0 @@ @@ -566,7 +566,7 @@ index 000000000..328c51471 + } +} diff --git a/src/test/java/org/bukkit/TestServer.java b/src/test/java/org/bukkit/TestServer.java -index 2d8403206..613675c3b 100644 +index 2d840320..613675c3 100644 --- a/src/test/java/org/bukkit/TestServer.java +++ b/src/test/java/org/bukkit/TestServer.java @@ -0,0 +0,0 @@ public class TestServer implements InvocationHandler { diff --git a/Spigot-API-Patches/Add-TNTPrimeEvent.patch b/Spigot-API-Patches/Add-TNTPrimeEvent.patch index e77176f7ed..e7ec2b09ff 100644 --- a/Spigot-API-Patches/Add-TNTPrimeEvent.patch +++ b/Spigot-API-Patches/Add-TNTPrimeEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java new file mode 100644 -index 000000000..2ae8826bb +index 00000000..2ae8826b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Add-World.getEntity-UUID-API.patch b/Spigot-API-Patches/Add-World.getEntity-UUID-API.patch index b1921ff5bc..d63add3943 100644 --- a/Spigot-API-Patches/Add-World.getEntity-UUID-API.patch +++ b/Spigot-API-Patches/Add-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index e83b2ac7..7c700cc2 100644 +index 70e7c9e3..301d9418 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 { diff --git a/Spigot-API-Patches/Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/Spigot-API-Patches/Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch index e59526de9f..ab8f65f071 100644 --- a/Spigot-API-Patches/Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch +++ b/Spigot-API-Patches/Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch @@ -217,7 +217,7 @@ index fe8d3468..074769c1 100644 return key; } diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index df51f3ca..e9f640fb 100644 +index 4d0351c4..03e3cfd4 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { diff --git a/Spigot-API-Patches/Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/Add-an-asterisk-to-legacy-API-plugins.patch index e55d2d4bb1..9cee698a79 100644 --- a/Spigot-API-Patches/Add-an-asterisk-to-legacy-API-plugins.patch +++ b/Spigot-API-Patches/Add-an-asterisk-to-legacy-API-plugins.patch @@ -7,7 +7,7 @@ Not here to name and shame, only so server admins can be aware of which plugins have and haven't been updated. diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index a4aabfe7f..f462b631b 100644 +index a4aabfe7..f462b631 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -0,0 +0,0 @@ public interface UnsafeValues { @@ -22,7 +22,7 @@ index a4aabfe7f..f462b631b 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index b1d384e82..72c0c0bc6 100644 +index b1d384e8..72c0c0bc 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -0,0 +0,0 @@ public class PluginsCommand extends BukkitCommand { @@ -42,7 +42,7 @@ index b1d384e82..72c0c0bc6 100644 StringBuilder pluginList = new StringBuilder(); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 3cff01b6b..2b9aad0a7 100644 +index c7782e7d..39f92d88 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/Add-hand-to-bucket-events.patch b/Spigot-API-Patches/Add-hand-to-bucket-events.patch index 7a76b8fb74..d402920ad1 100644 --- a/Spigot-API-Patches/Add-hand-to-bucket-events.patch +++ b/Spigot-API-Patches/Add-hand-to-bucket-events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add hand to bucket events diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java -index 8fb121a91..7b9596f30 100644 +index 8fb121a9..7b9596f3 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java @@ -0,0 +0,0 @@ import org.bukkit.block.Block; @@ -30,7 +30,7 @@ index 8fb121a91..7b9596f30 100644 public HandlerList getHandlers() { return handlers; diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java -index 56584687f..3dbe428ba 100644 +index 56584687..3dbe428b 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java @@ -0,0 +0,0 @@ import org.bukkit.block.Block; @@ -82,7 +82,7 @@ index 56584687f..3dbe428ba 100644 return cancelled; } diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java -index 94e042a36..884b9240b 100644 +index 94e042a3..884b9240 100644 --- a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java @@ -0,0 +0,0 @@ import org.bukkit.block.Block; diff --git a/Spigot-API-Patches/Add-more-Witch-API.patch b/Spigot-API-Patches/Add-more-Witch-API.patch index 0fd3f7fab9..5971ceafd3 100644 --- a/Spigot-API-Patches/Add-more-Witch-API.patch +++ b/Spigot-API-Patches/Add-more-Witch-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Witch API diff --git a/src/main/java/org/bukkit/entity/Witch.java b/src/main/java/org/bukkit/entity/Witch.java -index 7ac07ac07ac0..7ac07ac07ac0 100644 +index 4b27f689..64ec8409 100644 --- a/src/main/java/org/bukkit/entity/Witch.java +++ b/src/main/java/org/bukkit/entity/Witch.java @@ -0,0 +0,0 @@ package org.bukkit.entity; diff --git a/Spigot-API-Patches/Add-player-view-distance-API.patch b/Spigot-API-Patches/Add-player-view-distance-API.patch index 62adc81f78..d304bde044 100644 --- a/Spigot-API-Patches/Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/Add-player-view-distance-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add player view distance API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index a631529df..4208b0d2c 100644 +index a631529d..4208b0d2 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, OfflinePlayer, PluginM diff --git a/Spigot-API-Patches/Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-API-Patches/Add-ray-tracing-methods-to-LivingEntity.patch index 3918c4d9aa..369cf36bb8 100644 --- a/Spigot-API-Patches/Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-API-Patches/Add-ray-tracing-methods-to-LivingEntity.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java new file mode 100644 -index 000000000..fe43d9557 +index 00000000..fe43d955 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java @@ -0,0 +0,0 @@ @@ -61,7 +61,7 @@ index 000000000..fe43d9557 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index e3bc04e1c..bd47e7209 100644 +index e3bc04e1..bd47e720 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource diff --git a/Spigot-API-Patches/Add-sun-related-API.patch b/Spigot-API-Patches/Add-sun-related-API.patch index 5cd71c0fc4..97bcb06b22 100644 --- a/Spigot-API-Patches/Add-sun-related-API.patch +++ b/Spigot-API-Patches/Add-sun-related-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index aa28c452..27e58136 100644 +index 668c9b7a..67e062b8 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 { diff --git a/Spigot-API-Patches/Add-workaround-for-plugins-modifying-the-parent-of-t.patch b/Spigot-API-Patches/Add-workaround-for-plugins-modifying-the-parent-of-t.patch index fa89831292..7c0a692bea 100644 --- a/Spigot-API-Patches/Add-workaround-for-plugins-modifying-the-parent-of-t.patch +++ b/Spigot-API-Patches/Add-workaround-for-plugins-modifying-the-parent-of-t.patch @@ -14,7 +14,7 @@ parent of the plugin logger to avoid this. diff --git a/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java b/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java new file mode 100644 -index 000000000..d052b2f55 +index 00000000..d052b2f5 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java @@ -0,0 +0,0 @@ @@ -58,7 +58,7 @@ index 000000000..d052b2f55 + +} diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -index a81dae439..15f22ade2 100644 +index a81dae43..15f22ade 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -0,0 +0,0 @@ public abstract class JavaPlugin extends PluginBase { @@ -85,7 +85,7 @@ index a81dae439..15f22ade2 100644 /** diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 44093af29..ab79b71bf 100644 +index bc33ff33..213f6234 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -0,0 +0,0 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot @@ -94,8 +94,8 @@ index 44093af29..ab79b71bf 100644 private IllegalStateException pluginState; + private java.util.logging.Logger logger; // Paper - add field - // Spigot Start - static + static { + ClassLoader.registerAsParallelCapable(); @@ -0,0 +0,0 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot this.manifest = jar.getManifest(); this.url = file.toURI().toURL(); diff --git a/Spigot-API-Patches/Additional-world.getNearbyEntities-API-s.patch b/Spigot-API-Patches/Additional-world.getNearbyEntities-API-s.patch index 7921db8a85..870e3a4025 100644 --- a/Spigot-API-Patches/Additional-world.getNearbyEntities-API-s.patch +++ b/Spigot-API-Patches/Additional-world.getNearbyEntities-API-s.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 849ad2cb..99fbf327 100644 +index e66caa41..d9010176 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -0,0 +0,0 @@ package org.bukkit; diff --git a/Spigot-API-Patches/Allow-Blocks-to-be-accessed-via-a-long-key.patch b/Spigot-API-Patches/Allow-Blocks-to-be-accessed-via-a-long-key.patch index 2f47b6e195..acceff5207 100644 --- a/Spigot-API-Patches/Allow-Blocks-to-be-accessed-via-a-long-key.patch +++ b/Spigot-API-Patches/Allow-Blocks-to-be-accessed-via-a-long-key.patch @@ -49,7 +49,7 @@ index 8dcb15fb..7e1ee875 100644 * @return A new location where X/Y/Z are the center of the block */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 6635285f..071a8490 100644 +index 92688252..1467debe 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 { diff --git a/Spigot-API-Patches/Allow-disabling-armour-stand-ticking.patch b/Spigot-API-Patches/Allow-disabling-armour-stand-ticking.patch index 27c13d816d..67092293db 100644 --- a/Spigot-API-Patches/Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-API-Patches/Allow-disabling-armour-stand-ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling armour stand ticking diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java -index 099da6ce1..859f166fb 100644 +index 099da6ce..859f166f 100644 --- a/src/main/java/org/bukkit/entity/ArmorStand.java +++ b/src/main/java/org/bukkit/entity/ArmorStand.java @@ -0,0 +0,0 @@ public interface ArmorStand extends LivingEntity { diff --git a/Spigot-API-Patches/AnvilDamageEvent.patch b/Spigot-API-Patches/AnvilDamageEvent.patch index 76879f6245..d6d5ec79e7 100644 --- a/Spigot-API-Patches/AnvilDamageEvent.patch +++ b/Spigot-API-Patches/AnvilDamageEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java new file mode 100644 -index 000000000..fd3c5c02e +index 00000000..fd3c5c02 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Arrow-pickup-rule-API.patch b/Spigot-API-Patches/Arrow-pickup-rule-API.patch index 22a0339298..ad886dbbd8 100644 --- a/Spigot-API-Patches/Arrow-pickup-rule-API.patch +++ b/Spigot-API-Patches/Arrow-pickup-rule-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Arrow pickup rule API diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java -index 99814eee..34dde443 100644 +index b74d5f9d..99a44006 100644 --- a/src/main/java/org/bukkit/entity/Arrow.java +++ b/src/main/java/org/bukkit/entity/Arrow.java @@ -0,0 +0,0 @@ public interface Arrow extends Projectile { diff --git a/Spigot-API-Patches/Async-Chunks-API.patch b/Spigot-API-Patches/Async-Chunks-API.patch index b961ce7e9b..dd3f964473 100644 --- a/Spigot-API-Patches/Async-Chunks-API.patch +++ b/Spigot-API-Patches/Async-Chunks-API.patch @@ -8,7 +8,7 @@ Adds API's to load or generate chunks asynchronously. Also adds utility methods to Entity to teleport asynchronously. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 00d72565..8e322cab 100644 +index deabd400..92688252 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 { @@ -365,7 +365,7 @@ index 00d72565..8e322cab 100644 /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index f94160bf..5ee57656 100644 +index 2dd7a03c..59787c47 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -0,0 +0,0 @@ public interface Entity extends Metadatable, CommandSender, Nameable { diff --git a/Spigot-API-Patches/Automatically-disable-plugins-that-fail-to-load.patch b/Spigot-API-Patches/Automatically-disable-plugins-that-fail-to-load.patch index b6b6b24e6d..a0a81ec118 100644 --- a/Spigot-API-Patches/Automatically-disable-plugins-that-fail-to-load.patch +++ b/Spigot-API-Patches/Automatically-disable-plugins-that-fail-to-load.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Automatically disable plugins that fail to load diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 81b42822..3af99b5b 100644 +index 54594546..bf972302 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/Close-Plugin-Class-Loaders-on-Disable.patch b/Spigot-API-Patches/Close-Plugin-Class-Loaders-on-Disable.patch index f24b3dcd77..d248a8ec63 100644 --- a/Spigot-API-Patches/Close-Plugin-Class-Loaders-on-Disable.patch +++ b/Spigot-API-Patches/Close-Plugin-Class-Loaders-on-Disable.patch @@ -7,7 +7,7 @@ This should close more memory leaks from /reload and disabling plugins, by closing the class loader and the jar file. diff --git a/src/main/java/org/bukkit/plugin/PluginLoader.java b/src/main/java/org/bukkit/plugin/PluginLoader.java -index e7981a1d9..d34756f15 100644 +index e7981a1d..d34756f1 100644 --- a/src/main/java/org/bukkit/plugin/PluginLoader.java +++ b/src/main/java/org/bukkit/plugin/PluginLoader.java @@ -0,0 +0,0 @@ public interface PluginLoader { @@ -31,7 +31,7 @@ index e7981a1d9..d34756f15 100644 + // Paper end - close Classloader on disable } diff --git a/src/main/java/org/bukkit/plugin/PluginManager.java b/src/main/java/org/bukkit/plugin/PluginManager.java -index e5638d560..b72d5a9bc 100644 +index e5638d56..b72d5a9b 100644 --- a/src/main/java/org/bukkit/plugin/PluginManager.java +++ b/src/main/java/org/bukkit/plugin/PluginManager.java @@ -0,0 +0,0 @@ public interface PluginManager { @@ -54,7 +54,7 @@ index e5638d560..b72d5a9bc 100644 * Gets a {@link Permission} from its fully qualified name * diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index bd0588a20..cb2b0b9cb 100644 +index bd0588a2..cb2b0b9c 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager { @@ -100,7 +100,7 @@ index bd0588a20..cb2b0b9cb 100644 lookupNames.clear(); HandlerList.unregisterAll(); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 72d506d1f..3411a365c 100644 +index 77207f14..c7782e7d 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch b/Spigot-API-Patches/Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch index 0b94382126..33668a50d6 100644 --- a/Spigot-API-Patches/Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch +++ b/Spigot-API-Patches/Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't use snapshots for Timings Tile Entity reports diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java -index c2c2fb83..769facd8 100644 +index 28d0954a..7ad9400a 100644 --- a/src/main/java/co/aikar/timings/TimingHistory.java +++ b/src/main/java/co/aikar/timings/TimingHistory.java @@ -0,0 +0,0 @@ public class TimingHistory { diff --git a/Spigot-API-Patches/EnderDragon-Events.patch b/Spigot-API-Patches/EnderDragon-Events.patch index 891cdfd29a..62125a9d5a 100644 --- a/Spigot-API-Patches/EnderDragon-Events.patch +++ b/Spigot-API-Patches/EnderDragon-Events.patch @@ -6,7 +6,7 @@ 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 000000000..ef2a8dab9 +index 00000000..ef2a8dab --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java @@ -0,0 +0,0 @@ @@ -84,7 +84,7 @@ index 000000000..ef2a8dab9 +} 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 000000000..d8c3ab330 +index 00000000..d8c3ab33 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java @@ -0,0 +0,0 @@ @@ -146,7 +146,7 @@ index 000000000..d8c3ab330 +} 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 000000000..aa70dda10 +index 00000000..aa70dda1 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Expand-ArmorStand-API.patch b/Spigot-API-Patches/Expand-ArmorStand-API.patch index de79323a33..8f4cc2b8e7 100644 --- a/Spigot-API-Patches/Expand-ArmorStand-API.patch +++ b/Spigot-API-Patches/Expand-ArmorStand-API.patch @@ -8,7 +8,7 @@ Add the following: - Enable/Disable slot interactions diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java -index 859f166fb..eda4873d5 100644 +index 859f166f..eda4873d 100644 --- a/src/main/java/org/bukkit/entity/ArmorStand.java +++ b/src/main/java/org/bukkit/entity/ArmorStand.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Expand-Explosions-API.patch b/Spigot-API-Patches/Expand-Explosions-API.patch index 623a74e199..07ddd69717 100644 --- a/Spigot-API-Patches/Expand-Explosions-API.patch +++ b/Spigot-API-Patches/Expand-Explosions-API.patch @@ -98,7 +98,7 @@ index 162a76e8..056a4d6b 100644 @Override public boolean equals(Object obj) { diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 1f63eba8..e83b2ac7 100644 +index 379fd2fa..70e7c9e3 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 { diff --git a/Spigot-API-Patches/Expand-Location-Manipulation-API.patch b/Spigot-API-Patches/Expand-Location-Manipulation-API.patch index d6fc5e59de..871d24565d 100644 --- a/Spigot-API-Patches/Expand-Location-Manipulation-API.patch +++ b/Spigot-API-Patches/Expand-Location-Manipulation-API.patch @@ -6,7 +6,7 @@ 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 056a4d6bb..8dcb15fb8 100644 +index 056a4d6b..8dcb15fb 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 { diff --git a/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch index 48c9fa7693..dbb7f0775b 100644 --- a/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch @@ -452,7 +452,7 @@ index 4d0acaf5..827aa00c 100644 * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 3cc161de..c9b3ff76 100644 +index d9010176..379fd2fa 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 { diff --git a/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch b/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch index d33887f26c..bacbe417c0 100644 --- a/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index c9f027f99..7f6ae5d16 100644 +index c9f027f9..7f6ae5d1 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, OfflinePlayer, PluginM 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 19f20f5375..4b45157527 100644 --- a/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch @@ -21,7 +21,7 @@ index 43239f84..fe8d3468 100644 */ @Deprecated diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 04573ec2..0750d64c 100644 +index 6ce38e03..e66caa41 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 { diff --git a/Spigot-API-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-API-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch deleted file mode 100644 index 0e9260db4f..0000000000 --- a/Spigot-API-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Brokkonaut -Date: Sat, 30 Jun 2018 05:45:04 +0200 -Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the - projectile has hit - - -diff --git a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java -index 35f4148bb..db105e764 100644 ---- a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java -+++ b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java -@@ -0,0 +0,0 @@ public class ProjectileHitEvent extends EntityEvent { - private static final HandlerList handlers = new HandlerList(); - private final Entity hitEntity; - private final Block hitBlock; -+ private final org.bukkit.block.BlockFace hitBlockFace; // Paper - - public ProjectileHitEvent(final Projectile projectile) { - this(projectile, null, null); -@@ -0,0 +0,0 @@ public class ProjectileHitEvent extends EntityEvent { - } - - public ProjectileHitEvent(final Projectile projectile, Entity hitEntity, Block hitBlock) { -+ // Paper Start - Add a constructor that includes a BlockFace parameter -+ this(projectile, hitEntity, hitBlock, null); -+ } -+ -+ public ProjectileHitEvent(final Projectile projectile, Entity hitEntity, Block hitBlock, org.bukkit.block.BlockFace hitBlockFace) { -+ // Paper End - super(projectile); - this.hitEntity = hitEntity; - this.hitBlock = hitBlock; -+ this.hitBlockFace = hitBlockFace; // Paper - } - - @Override -@@ -0,0 +0,0 @@ public class ProjectileHitEvent extends EntityEvent { - return hitBlock; - } - -+ // Paper Start -+ /** -+ * Gets the face of the block that the projectile has hit. -+ * -+ * @return hit block face or else null -+ */ -+ public org.bukkit.block.BlockFace getHitBlockFace() { -+ return hitBlockFace; -+ } -+ // Paper End -+ - /** - * Gets the entity that was hit, if it was an entity that was hit. - * --- \ No newline at end of file diff --git a/Spigot-API-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-API-Patches/InventoryCloseEvent-Reason-API.patch index a560788c66..92dfd2741b 100644 --- a/Spigot-API-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-API-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/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index ca789867d..d4b3caebd 100644 +index ca789867..d4b3caeb 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -0,0 +0,0 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -27,7 +27,7 @@ index ca789867d..d4b3caebd 100644 * Returns the ItemStack currently in your hand, can be empty. * diff --git a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java -index 19889b278..e6e45b936 100644 +index 19889b27..e6e45b93 100644 --- a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java +++ b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryView; diff --git a/Spigot-API-Patches/Make-the-default-permission-message-configurable.patch b/Spigot-API-Patches/Make-the-default-permission-message-configurable.patch index 3ba69e7609..1dddbb03d2 100644 --- a/Spigot-API-Patches/Make-the-default-permission-message-configurable.patch +++ b/Spigot-API-Patches/Make-the-default-permission-message-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 233a71540..22ca2900c 100644 +index 233a7154..22ca2900 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 233a71540..22ca2900c 100644 * Creates a PlayerProfile for the specified uuid, with name as null * @param uuid UUID to create profile for diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b8076fc3f..9c78f18f6 100644 +index b8076fc3..9c78f18f 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 { @@ -41,7 +41,7 @@ index b8076fc3f..9c78f18f6 100644 * Creates a PlayerProfile for the specified uuid, with name as null * @param uuid UUID to create profile for diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index 4a479627d..77171cd17 100644 +index 4a479627..77171cd1 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -0,0 +0,0 @@ public abstract class Command { diff --git a/Spigot-API-Patches/Material-API-additions.patch b/Spigot-API-Patches/Material-API-additions.patch index ac4d9c4240..b478898136 100644 --- a/Spigot-API-Patches/Material-API-additions.patch +++ b/Spigot-API-Patches/Material-API-additions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Material API additions diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 14cae61fb..393024343 100644 +index 14cae61f..39302434 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -0,0 +0,0 @@ import org.bukkit.material.MaterialData; diff --git a/Spigot-API-Patches/Mob-Pathfinding-API.patch b/Spigot-API-Patches/Mob-Pathfinding-API.patch index d5da6453b7..7013840e1c 100644 --- a/Spigot-API-Patches/Mob-Pathfinding-API.patch +++ b/Spigot-API-Patches/Mob-Pathfinding-API.patch @@ -13,7 +13,7 @@ You can use EntityPathfindEvent to cancel new pathfinds from overriding your cur diff --git a/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java new file mode 100644 -index 000000000..d6953b390 +index 00000000..d6953b39 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java @@ -0,0 +0,0 @@ @@ -185,7 +185,7 @@ index 000000000..d6953b390 + } +} diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java -index d029d34ea..48eddcd30 100644 +index d029d34e..48eddcd3 100644 --- a/src/main/java/org/bukkit/entity/Mob.java +++ b/src/main/java/org/bukkit/entity/Mob.java @@ -0,0 +0,0 @@ import org.bukkit.loot.Lootable; diff --git a/Spigot-API-Patches/Performance-Concurrency-Improvements-to-Permissions.patch b/Spigot-API-Patches/Performance-Concurrency-Improvements-to-Permissions.patch index cdabac1430..09c572f36d 100644 --- a/Spigot-API-Patches/Performance-Concurrency-Improvements-to-Permissions.patch +++ b/Spigot-API-Patches/Performance-Concurrency-Improvements-to-Permissions.patch @@ -18,7 +18,7 @@ Optimized it to simply be a single get call cutting permission map lookups in half. diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java -index d4cb00a82..486f69f86 100644 +index d4cb00a8..486f69f8 100644 --- a/src/main/java/org/bukkit/permissions/PermissibleBase.java +++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java @@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible { diff --git a/Spigot-API-Patches/Player.setPlayerProfile-API.patch b/Spigot-API-Patches/Player.setPlayerProfile-API.patch index 105ef56a00..66c25a3e37 100644 --- a/Spigot-API-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-API-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/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 5f3e085e3..1e349066d 100644 +index 5f3e085e..1e349066 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ package org.bukkit.entity; diff --git a/Spigot-API-Patches/PlayerElytraBoostEvent.patch b/Spigot-API-Patches/PlayerElytraBoostEvent.patch index b55b338c3b..a0079e2839 100644 --- a/Spigot-API-Patches/PlayerElytraBoostEvent.patch +++ b/Spigot-API-Patches/PlayerElytraBoostEvent.patch @@ -6,7 +6,7 @@ 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 000000000..cecb2182c +index 00000000..cecb2182 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/PlayerLaunchProjectileEvent.patch b/Spigot-API-Patches/PlayerLaunchProjectileEvent.patch index 8e9ed08bab..2fc6099b14 100644 --- a/Spigot-API-Patches/PlayerLaunchProjectileEvent.patch +++ b/Spigot-API-Patches/PlayerLaunchProjectileEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java new file mode 100644 -index 000000000..d2b244a41 +index 00000000..d2b244a4 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/PreSpawnerSpawnEvent.patch b/Spigot-API-Patches/PreSpawnerSpawnEvent.patch index abe3265af7..7619c3d308 100644 --- a/Spigot-API-Patches/PreSpawnerSpawnEvent.patch +++ b/Spigot-API-Patches/PreSpawnerSpawnEvent.patch @@ -10,7 +10,7 @@ spawners. diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PreSpawnerSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PreSpawnerSpawnEvent.java new file mode 100644 -index 000000000..d72212105 +index 00000000..d7221210 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/PreSpawnerSpawnEvent.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Provide-Chunk-Coordinates-as-a-Long-API.patch b/Spigot-API-Patches/Provide-Chunk-Coordinates-as-a-Long-API.patch index 50019051c1..ae49f261a3 100644 --- a/Spigot-API-Patches/Provide-Chunk-Coordinates-as-a-Long-API.patch +++ b/Spigot-API-Patches/Provide-Chunk-Coordinates-as-a-Long-API.patch @@ -7,7 +7,7 @@ Allows you to easily access the chunks X/z as a long, and a method to look up by the long key too. diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java -index 079b9feb..b347a3cc 100644 +index 441ed7ad..33cd0ea0 100644 --- a/src/main/java/org/bukkit/Chunk.java +++ b/src/main/java/org/bukkit/Chunk.java @@ -0,0 +0,0 @@ public interface Chunk { @@ -44,7 +44,7 @@ index 079b9feb..b347a3cc 100644 * Gets the world containing this chunk * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 7c700cc2..00d72565 100644 +index 301d9418..deabd400 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 { diff --git a/Spigot-API-Patches/Remove-Precondition-on-name-for-AttributeModifier.patch b/Spigot-API-Patches/Remove-Precondition-on-name-for-AttributeModifier.patch index eabb2f8b09..13afe60486 100644 --- a/Spigot-API-Patches/Remove-Precondition-on-name-for-AttributeModifier.patch +++ b/Spigot-API-Patches/Remove-Precondition-on-name-for-AttributeModifier.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove Precondition on name for AttributeModifier Vanilla allows empty names diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java -index 2bc9878ff..0943eee46 100644 +index 2bc9878f..0943eee4 100644 --- a/src/main/java/org/bukkit/attribute/AttributeModifier.java +++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java @@ -0,0 +0,0 @@ public class AttributeModifier implements ConfigurationSerializable { diff --git a/Spigot-API-Patches/Remove-deadlock-risk-in-firing-async-events.patch b/Spigot-API-Patches/Remove-deadlock-risk-in-firing-async-events.patch index ada45a3bee..b52582cd9e 100644 --- a/Spigot-API-Patches/Remove-deadlock-risk-in-firing-async-events.patch +++ b/Spigot-API-Patches/Remove-deadlock-risk-in-firing-async-events.patch @@ -16,7 +16,7 @@ which results in a hard crash. This change removes the synchronize and adds some protection around enable/disable diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index cb2b0b9cb..a7dd902fb 100644 +index cb2b0b9c..a7dd902f 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager { @@ -79,7 +79,7 @@ index cb2b0b9cb..a7dd902fb 100644 RegisteredListener[] listeners = handlers.getRegisteredListeners(); diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java -index 6b86128e1..56308c0c6 100644 +index 6b86128e..56308c0c 100644 --- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java +++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java @@ -0,0 +0,0 @@ public class PluginManagerTest { diff --git a/Spigot-API-Patches/SkeletonHorse-Additions.patch b/Spigot-API-Patches/SkeletonHorse-Additions.patch index 58c1e84788..718d5499b6 100644 --- a/Spigot-API-Patches/SkeletonHorse-Additions.patch +++ b/Spigot-API-Patches/SkeletonHorse-Additions.patch @@ -6,7 +6,7 @@ Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java new file mode 100644 -index 000000000..55bae018e +index 00000000..55bae018 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java @@ -0,0 +0,0 @@ @@ -54,7 +54,7 @@ index 000000000..55bae018e +} + diff --git a/src/main/java/org/bukkit/entity/SkeletonHorse.java b/src/main/java/org/bukkit/entity/SkeletonHorse.java -index b2c6b6a86..ba9983463 100644 +index b2c6b6a8..ba998346 100644 --- a/src/main/java/org/bukkit/entity/SkeletonHorse.java +++ b/src/main/java/org/bukkit/entity/SkeletonHorse.java @@ -0,0 +0,0 @@ package org.bukkit.entity; diff --git a/Spigot-API-Patches/Timings-v2.patch b/Spigot-API-Patches/Timings-v2.patch index bfab0e20fc..9d16c047a8 100644 --- a/Spigot-API-Patches/Timings-v2.patch +++ b/Spigot-API-Patches/Timings-v2.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java new file mode 100644 -index 000000000..98079dc0c +index 00000000..98079dc0 --- /dev/null +++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java @@ -0,0 +0,0 @@ @@ -94,7 +94,7 @@ index 000000000..98079dc0c +} diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java new file mode 100644 -index 000000000..8c43e2061 +index 00000000..8c43e206 --- /dev/null +++ b/src/main/java/co/aikar/timings/NullTimingHandler.java @@ -0,0 +0,0 @@ @@ -161,7 +161,7 @@ index 000000000..8c43e2061 +} diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java new file mode 100644 -index 000000000..feddcdbd4 +index 00000000..feddcdbd --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java @@ -0,0 +0,0 @@ @@ -248,7 +248,7 @@ index 000000000..feddcdbd4 +} diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java new file mode 100644 -index 000000000..b2260104c +index 00000000..b2260104 --- /dev/null +++ b/src/main/java/co/aikar/timings/Timing.java @@ -0,0 +0,0 @@ @@ -330,7 +330,7 @@ index 000000000..b2260104c +} diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java new file mode 100644 -index 000000000..f222d6b7d +index 00000000..f222d6b7 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingData.java @@ -0,0 +0,0 @@ @@ -456,7 +456,7 @@ index 000000000..f222d6b7d +} diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java new file mode 100644 -index 000000000..521c985e6 +index 00000000..521c985e --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHandler.java @@ -0,0 +0,0 @@ @@ -662,7 +662,7 @@ index 000000000..521c985e6 +} diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java new file mode 100644 -index 000000000..28d0954a3 +index 00000000..28d0954a --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistory.java @@ -0,0 +0,0 @@ @@ -1013,7 +1013,7 @@ index 000000000..28d0954a3 +} diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java new file mode 100644 -index 000000000..0e114eb32 +index 00000000..0e114eb3 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java @@ -0,0 +0,0 @@ @@ -1074,7 +1074,7 @@ index 000000000..0e114eb32 +} diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java new file mode 100644 -index 000000000..a7f1f44d7 +index 00000000..a7f1f44d --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingIdentifier.java @@ -0,0 +0,0 @@ @@ -1186,7 +1186,7 @@ index 000000000..a7f1f44d7 +} diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java new file mode 100644 -index 000000000..f907649ba +index 00000000..f907649b --- /dev/null +++ b/src/main/java/co/aikar/timings/Timings.java @@ -0,0 +0,0 @@ @@ -1476,7 +1476,7 @@ index 000000000..f907649ba +} diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java new file mode 100644 -index 000000000..56b10e898 +index 00000000..56b10e89 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsCommand.java @@ -0,0 +0,0 @@ @@ -1601,7 +1601,7 @@ index 000000000..56b10e898 +} diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java new file mode 100644 -index 000000000..df7f42595 +index 00000000..df7f4259 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsExport.java @@ -0,0 +0,0 @@ @@ -1949,7 +1949,7 @@ index 000000000..df7f42595 +} diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java new file mode 100644 -index 000000000..f63e7033c +index 00000000..f63e7033 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsManager.java @@ -0,0 +0,0 @@ @@ -2142,7 +2142,7 @@ index 000000000..f63e7033c +} diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java new file mode 100644 -index 000000000..e7c389c05 +index 00000000..e7c389c0 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsReportListener.java @@ -0,0 +0,0 @@ @@ -2220,7 +2220,7 @@ index 000000000..e7c389c05 +} diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java new file mode 100644 -index 000000000..5edaba128 +index 00000000..5edaba12 --- /dev/null +++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java @@ -0,0 +0,0 @@ @@ -2277,7 +2277,7 @@ index 000000000..5edaba128 +} diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java new file mode 100644 -index 000000000..23ac07f2c +index 00000000..23ac07f2 --- /dev/null +++ b/src/main/java/co/aikar/util/Counter.java @@ -0,0 +0,0 @@ @@ -2318,7 +2318,7 @@ index 000000000..23ac07f2c +} diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java new file mode 100644 -index 000000000..962749750 +index 00000000..96274975 --- /dev/null +++ b/src/main/java/co/aikar/util/JSONUtil.java @@ -0,0 +0,0 @@ @@ -2453,7 +2453,7 @@ index 000000000..962749750 +} diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java new file mode 100644 -index 000000000..24eae4bea +index 00000000..24eae4be --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingIntMap.java @@ -0,0 +0,0 @@ @@ -2530,7 +2530,7 @@ index 000000000..24eae4bea +} diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java new file mode 100644 -index 000000000..9a4f9dca8 +index 00000000..9a4f9dca --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingMap.java @@ -0,0 +0,0 @@ @@ -2875,7 +2875,7 @@ index 000000000..9a4f9dca8 +} diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java new file mode 100644 -index 000000000..df592d855 +index 00000000..df592d85 --- /dev/null +++ b/src/main/java/co/aikar/util/MRUMapCache.java @@ -0,0 +0,0 @@ @@ -2982,7 +2982,7 @@ index 000000000..df592d855 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 2ce174401..7fdd1a084 100644 +index 2ce17440..7fdd1a08 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 { @@ -2994,7 +2994,7 @@ index 2ce174401..7fdd1a084 100644 /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 63392d5e7..0e7a81c88 100644 +index 63392d5e..0e7a81c8 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 { @@ -3028,7 +3028,7 @@ index 63392d5e7..0e7a81c88 100644 * diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java new file mode 100644 -index 000000000..fd452bce4 +index 00000000..fd452bce --- /dev/null +++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java @@ -0,0 +0,0 @@ @@ -3051,7 +3051,7 @@ index 000000000..fd452bce4 + } +} diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index 4c931f186..4a479627d 100644 +index 4c931f18..4a479627 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -0,0 +0,0 @@ public abstract class Command { @@ -3081,7 +3081,7 @@ index 4c931f186..4a479627d 100644 return true; } diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java -index 502578837..9c80f4640 100644 +index 50257883..9c80f464 100644 --- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java +++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java @@ -0,0 +0,0 @@ public class FormattedCommandAlias extends Command { @@ -3104,7 +3104,7 @@ index 502578837..9c80f4640 100644 } diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java new file mode 100644 -index 000000000..5527e7c86 +index 00000000..5527e7c8 --- /dev/null +++ b/src/main/java/org/bukkit/command/MessageCommandSender.java @@ -0,0 +0,0 @@ @@ -3214,7 +3214,7 @@ index 000000000..5527e7c86 + +} diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index d9183db2f..43e52a77a 100644 +index d9183db2..43e52a77 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -0,0 +0,0 @@ public class SimpleCommandMap implements CommandMap { @@ -3249,7 +3249,7 @@ index d9183db2f..43e52a77a 100644 // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java deleted file mode 100644 -index bba914d7f..000000000 +index bba914d7..00000000 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -3507,7 +3507,7 @@ index bba914d7f..000000000 - // Spigot end -} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 5054276ff..0993f31b1 100644 +index 5054276f..0993f31b 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, OfflinePlayer, PluginM @@ -3523,7 +3523,7 @@ index 5054276ff..0993f31b1 100644 @Override diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 8b130abb7..80c152ba9 100644 +index 8b130abb..80c152ba 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager { @@ -3580,7 +3580,7 @@ index 8b130abb7..80c152ba9 100644 } } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 113b899cc..81b428222 100644 +index 2d4c75ab..54594546 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -0,0 +0,0 @@ import org.bukkit.plugin.PluginLoader; @@ -3593,7 +3593,7 @@ index 113b899cc..81b428222 100644 /** @@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader { private final Pattern[] fileFilters = new Pattern[] { Pattern.compile("\\.jar$"), }; - private final Map> classes = new java.util.concurrent.ConcurrentHashMap>(); // Spigot + private final Map> classes = new ConcurrentHashMap>(); private final List loaders = new CopyOnWriteArrayList(); - public static final CustomTimingsHandler pluginParentTimer = new CustomTimingsHandler("** Plugins"); // Spigot @@ -3629,7 +3629,7 @@ index 113b899cc..81b428222 100644 eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); } else { diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index af8af8ef0..44093af29 100644 +index 7a8abe75..bc33ff33 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -0,0 +0,0 @@ import org.bukkit.plugin.PluginDescriptionFile; @@ -3640,10 +3640,10 @@ index af8af8ef0..44093af29 100644 +public final class PluginClassLoader extends URLClassLoader { // Spigot + public JavaPlugin getPlugin() { return plugin; } // Spigot private final JavaPluginLoader loader; - private final Map> classes = new java.util.concurrent.ConcurrentHashMap>(); // Spigot + private final Map> classes = new ConcurrentHashMap>(); private final PluginDescriptionFile description; diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java -index 5ca863b36..048047067 100644 +index 5ca863b3..04804706 100644 --- a/src/main/java/org/bukkit/util/CachedServerIcon.java +++ b/src/main/java/org/bukkit/util/CachedServerIcon.java @@ -0,0 +0,0 @@ import org.bukkit.event.server.ServerListPingEvent; @@ -3655,7 +3655,7 @@ index 5ca863b36..048047067 100644 + public String getData(); // Spigot +} diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java -index 8d982974e..e9f76006e 100644 +index 8d982974..e9f76006 100644 --- a/src/main/java/org/spigotmc/CustomTimingsHandler.java +++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Turtle-API.patch b/Spigot-API-Patches/Turtle-API.patch index 151f2bd3d3..e67e730649 100644 --- a/Spigot-API-Patches/Turtle-API.patch +++ b/Spigot-API-Patches/Turtle-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Turtle API diff --git a/src/main/java/com/destroystokyo/paper/event/entity/TurtleGoHomeEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/TurtleGoHomeEvent.java new file mode 100644 -index 000000000..11248ee93 +index 00000000..11248ee9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/TurtleGoHomeEvent.java @@ -0,0 +0,0 @@ @@ -57,7 +57,7 @@ index 000000000..11248ee93 +} diff --git a/src/main/java/com/destroystokyo/paper/event/entity/TurtleLayEggEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/TurtleLayEggEvent.java new file mode 100644 -index 000000000..7cb00f78d +index 00000000..7cb00f78 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/TurtleLayEggEvent.java @@ -0,0 +0,0 @@ @@ -144,7 +144,7 @@ index 000000000..7cb00f78d +} diff --git a/src/main/java/com/destroystokyo/paper/event/entity/TurtleStartDiggingEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/TurtleStartDiggingEvent.java new file mode 100644 -index 000000000..5d53ee08b +index 00000000..5d53ee08 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/TurtleStartDiggingEvent.java @@ -0,0 +0,0 @@ @@ -206,7 +206,7 @@ index 000000000..5d53ee08b + } +} diff --git a/src/main/java/org/bukkit/entity/Turtle.java b/src/main/java/org/bukkit/entity/Turtle.java -index 0a4cd2993..e547eead4 100644 +index 0a4cd299..e547eead 100644 --- a/src/main/java/org/bukkit/entity/Turtle.java +++ b/src/main/java/org/bukkit/entity/Turtle.java @@ -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 55dc3323d5..8d71a31821 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 b5cc156cd..310c30bb6 100644 +index f9fbc40a..1d42d42a 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -29,7 +29,7 @@ index b5cc156cd..310c30bb6 100644 diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java new file mode 100644 -index 000000000..9ff99e3b3 +index 00000000..9ff99e3b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java @@ -0,0 +0,0 @@ @@ -75,7 +75,7 @@ index 000000000..9ff99e3b3 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java new file mode 100644 -index 000000000..f60f01005 +index 00000000..f60f0100 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java @@ -0,0 +0,0 @@ @@ -120,7 +120,7 @@ index 000000000..f60f01005 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java new file mode 100644 -index 000000000..140cf0ad3 +index 00000000..140cf0ad --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java @@ -0,0 +0,0 @@ @@ -170,7 +170,7 @@ index 000000000..140cf0ad3 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java new file mode 100644 -index 000000000..6941d9fbf +index 00000000..6941d9fb --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java @@ -0,0 +0,0 @@ @@ -208,7 +208,7 @@ index 000000000..6941d9fbf +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java new file mode 100644 -index 000000000..1473ff8cd +index 00000000..1473ff8c --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java @@ -0,0 +0,0 @@ @@ -277,7 +277,7 @@ index 000000000..1473ff8cd +} diff --git a/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java new file mode 100644 -index 000000000..62acbf821 +index 00000000..62acbf82 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java @@ -0,0 +0,0 @@ @@ -315,7 +315,7 @@ index 000000000..62acbf821 + } +} diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java -index 3b2c99ea7..b45b6c1c3 100644 +index 3b2c99ea..b45b6c1c 100644 --- a/src/main/java/org/bukkit/plugin/EventExecutor.java +++ b/src/main/java/org/bukkit/plugin/EventExecutor.java @@ -0,0 +0,0 @@ import org.bukkit.event.Event; @@ -401,7 +401,7 @@ index 3b2c99ea7..b45b6c1c3 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 3af99b5bd..72d506d1f 100644 +index bf972302..77207f14 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/Vex-getSummoner-API.patch b/Spigot-API-Patches/Vex-getSummoner-API.patch index 5227288abf..f3f24bb2de 100644 --- a/Spigot-API-Patches/Vex-getSummoner-API.patch +++ b/Spigot-API-Patches/Vex-getSummoner-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Vex#getSummoner API Get's the Mob that summoned this Vex diff --git a/src/main/java/org/bukkit/entity/Vex.java b/src/main/java/org/bukkit/entity/Vex.java -index a2f2fcaec..d395e405d 100644 +index a2f2fcae..d395e405 100644 --- a/src/main/java/org/bukkit/entity/Vex.java +++ b/src/main/java/org/bukkit/entity/Vex.java @@ -0,0 +0,0 @@ package org.bukkit.entity; diff --git a/Spigot-API-Patches/isChunkGenerated-API.patch b/Spigot-API-Patches/isChunkGenerated-API.patch index 92376e788b..da491e4358 100644 --- a/Spigot-API-Patches/isChunkGenerated-API.patch +++ b/Spigot-API-Patches/isChunkGenerated-API.patch @@ -33,7 +33,7 @@ index 7e1ee875..9457832b 100644 /** * Sets the position of this Location and returns itself diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index adace47c..de89122e 100644 +index 1467debe..668c9b7a 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 { 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 aeda380f07..39ed508033 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 e1ea8da88..f1921e151 100644 +index 108ec49aa..72f0bec4e 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 { @@ -19,8 +19,8 @@ index e1ea8da88..f1921e151 100644 + public static ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) { return b(enchantment, entityliving); } // Paper - OBFHELPER public static ItemStack b(Enchantment enchantment, EntityLiving entityliving) { - List list = enchantment.a(entityliving);// Paper - decompile fix - if (list.isEmpty()) { + List list = enchantment.a(entityliving); + diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java index 4bcae2c21..09d85764b 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -39,7 +39,7 @@ index 4bcae2c21..09d85764b 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 8046a2a5f..45f7a4143 100644 +index eb0330ee1..5a01466e2 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 f4cfe9111e..f5b53a4101 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 30be39b0c..ca3a211a5 100644 +index 15c01333e..da5a7b3e9 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/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-Server-Patches/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index 1aaab3558f..49bb87f154 100644 --- a/Spigot-Server-Patches/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/Spigot-Server-Patches/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 76d395c4e..12c6d850d 100644 +index e65768499..9ba2fa5de 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -0,0 +0,0 @@ public class CraftChunk implements Chunk { diff --git a/Spigot-Server-Patches/Activation-Range-Improvements.patch b/Spigot-Server-Patches/Activation-Range-Improvements.patch index 6b477640a5..914fd02b17 100644 --- a/Spigot-Server-Patches/Activation-Range-Improvements.patch +++ b/Spigot-Server-Patches/Activation-Range-Improvements.patch @@ -10,7 +10,7 @@ Fixes and adds new Immunities to improve gameplay behavior Adds water Mobs to activation range config and nerfs fish diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index c9019260b..e980e31fc 100644 +index 507c93804..a4c282220 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 { @@ -22,7 +22,7 @@ index c9019260b..e980e31fc 100644 return new BlockPosition(this); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 69645d517..9682b0a01 100644 +index 583cee415..192f0aedd 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 @@ -46,7 +46,7 @@ index 20b7c2c6d..d659c57db 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index ac250182b..06bb8cf1f 100644 +index 4809af8f0..7401bafa9 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 { @@ -68,7 +68,7 @@ index ac250182b..06bb8cf1f 100644 return this.moveController; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 95af2d529..162de836e 100644 +index fe1c5a49b..f58ebe3c2 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 { @@ -81,7 +81,7 @@ index 95af2d529..162de836e 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 9c48bb3c9..22cea8552 100644 +index b19bd2b99..5e1976871 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 @@ -93,29 +93,31 @@ index 9c48bb3c9..22cea8552 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 acc099e95..339c78eec 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 { - } - public void d() { + public void c() {} + +- public void d() {} ++ public void d() { + onTaskReset(); // Paper - } ++ } + public void onTaskReset() {} // Paper - public void e() { - } + public void e() {} + diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java -index 9a75cb63b..cf10605aa 100644 +index d5c08aa7c..756d63239 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; +@@ -0,0 +0,0 @@ package net.minecraft.server; public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { + - private final EntityCreature f; -+ private final EntityCreature f; public EntityCreature getEntity() { return f; } // Paper - OBFHELPER ++ private final EntityCreature f;public EntityCreature getEntity() { return f; } // Paper - OBFHELPER public double a; protected int b; protected int c; @@ -126,8 +128,8 @@ index 9a75cb63b..cf10605aa 100644 private final int i; private final int j; @@ -0,0 +0,0 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { - public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int ix) { - this(entitycreature, d0, ix, 1); + public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int i) { + this(entitycreature, d0, i, 1); } + // Paper start - activation range improvements + @Override @@ -137,22 +139,22 @@ index 9a75cb63b..cf10605aa 100644 + } + // Paper end - public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int ix, int jx) { + public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int i, int j) { this.d = BlockPosition.ZERO; @@ -0,0 +0,0 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { - blockposition$mutableblockposition.g(blockposition).d(i1, k - 1, j1); - if (this.f.f(blockposition$mutableblockposition) && this.a(this.f.world, blockposition$mutableblockposition)) { - this.d = blockposition$mutableblockposition; -+ setTarget(blockposition$mutableblockposition.toBlockPosition()); // Paper + blockposition_mutableblockposition.g(blockposition).d(i1, k - 1, j1); + if (this.f.f((BlockPosition) blockposition_mutableblockposition) && this.a(this.f.world, blockposition_mutableblockposition)) { + this.d = blockposition_mutableblockposition; ++ setTarget(blockposition_mutableblockposition.toBlockPosition()); // Paper return true; } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -index ae21eb84d..8f35f71f8 100644 +index f3df91181..3e2f9c749 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - public class PathfinderGoalSelector { +@@ -0,0 +0,0 @@ public class PathfinderGoalSelector { + private static final Logger a = LogManager.getLogger(); private final Set b = Sets.newLinkedHashSet(); - private final Set c = Sets.newLinkedHashSet(); @@ -385,7 +387,7 @@ index 09df00e94..d08ef3fe1 100644 { isActive = false; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 87bc8e2d9..06d84a0b6 100644 +index d3c2abc39..1d222eaff 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/Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch index 2dccc217b7..274daaa4ca 100644 --- a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch @@ -40,7 +40,7 @@ index d1a546c8f..284630f74 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..0e8acf12e +index 000000000..c00b89c8d --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +0,0 @@ @@ -55,6 +55,8 @@ index 000000000..0e8acf12e +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.NBTBase; +import net.minecraft.server.NBTTagCompound; ++ ++import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.configuration.serialization.DelegateDeserialization; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; @@ -224,7 +226,7 @@ index 000000000..0e8acf12e + + if (tag.hasKey(ENTITY_TAG.NBT)) { + entityTag = tag.getCompound(ENTITY_TAG.NBT); -+ MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ENTITY, new Dynamic(DynamicOpsNBT.a, entityTag), -1, CraftMagicNumbers.DATA_VERSION); ++ MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ENTITY, new Dynamic(DynamicOpsNBT.a, entityTag), -1, Bukkit.getUnsafe().getDataVersion()); + + if (entityTag.hasKey(INVISIBLE.NBT)) { + invisible = entityTag.getBoolean(INVISIBLE.NBT); @@ -354,7 +356,7 @@ index 000000000..0e8acf12e + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c00ced8e8..197563552 100644 +index 1c94fd908..05d3ff969 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-BeaconEffectEvent.patch b/Spigot-Server-Patches/Add-BeaconEffectEvent.patch index 5a4ccbe949..a5e35143fe 100644 --- a/Spigot-Server-Patches/Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/Add-BeaconEffectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BeaconEffectEvent diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java -index 7bd27ad7f9..eafd207467 100644 +index fecd65ddb..c6bd54a2c 100644 --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java @@ -0,0 +0,0 @@ import org.bukkit.entity.HumanEntity; 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 da953f8fc3..db89d9a5be 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 9f1610326..1581edc4a 100644 +index 969e43ed1..8bab03bd0 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 9f1610326..1581edc4a 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7711b2eff..67ef109a5 100644 +index 84efc1cc3..601fe77c5 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -30,7 +30,7 @@ index 7711b2eff..67ef109a5 100644 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 45851cd0c..f37e85eb0 100644 +index 702a5d9d6..be475288e 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-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch index 95236d23f6..73ba602fa6 100644 --- a/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,7 +36,7 @@ index a92914576..f3f2a0b69 100644 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c3efb5e1b..ca72e6ad1 100644 +index a55ab0fd9..5a0dbcb42 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 @@ -48,7 +48,7 @@ index c3efb5e1b..ca72e6ad1 100644 long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop lastTick = start - TICK_TIME; // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 71d1929c1..93a8f4cdf 100644 +index ec197ef51..392cd0e3d 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 { @@ -68,7 +68,7 @@ index 71d1929c1..93a8f4cdf 100644 @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index eed96c60c..496c5cbdf 100644 +index 9c442dee2..fb09fb097 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/Add-EntityZapEvent.patch b/Spigot-Server-Patches/Add-EntityZapEvent.patch index aaf39ffdaf..e101f32eae 100644 --- a/Spigot-Server-Patches/Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/Add-EntityZapEvent.patch @@ -22,7 +22,7 @@ index 7ef67350a..9dc2d8be2 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 d2572b3e1..ddf170180 100644 +index f8e05b75d..213d0b18c 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 { @@ -39,7 +39,7 @@ index d2572b3e1..ddf170180 100644 entitywitch.prepare(this.world.getDamageScaler(new BlockPosition(entitywitch)), (GroupDataEntity) null, (NBTTagCompound) null); entitywitch.setNoAI(this.isNoAI()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 35992c4ba..075e6f04e 100644 +index 4d3bfd69e..b8bf1fbef 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/Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch index 41d9053134..ef5af8a751 100644 --- a/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index 19819b134..49228a884 100644 +index c5e541985..d6a5c7407 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java @@ -0,0 +0,0 @@ public class AxisAlignedBB { @@ -44,9 +44,9 @@ index 19819b134..49228a884 100644 + public MovingObjectPosition calculateIntercept(Vec3D vec3d, Vec3D vec3d1) { return b(vec3d, vec3d1); } // Paper - OBFHELPER @Nullable public MovingObjectPosition b(Vec3D vec3d, Vec3D vec3d1) { - return this.a(vec3d, vec3d1, (BlockPosition)null); + return this.a(vec3d, vec3d1, (BlockPosition) null); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0f646ac7e..23e6f45bf 100644 +index f26056dd5..35715e434 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 @@ -71,7 +71,7 @@ index 0f646ac7e..23e6f45bf 100644 return this.d(this.pitch, this.yaw); } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 46a4e37a2..34b649dad 100644 +index 60aaf0547..710ad8b17 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -130,16 +130,16 @@ index 46a4e37a2..34b649dad 100644 public int getShieldBlockingDelay() { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 42b3d3fc5..61806bbc4 100644 +index f6916fd45..71f08d53c 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -0,0 +0,0 @@ public final class IEntitySelector { public static final Predicate e = (entity) -> { - return !(entity instanceof EntityHuman) || !((EntityHuman)entity).isSpectator() && !((EntityHuman)entity).u(); + return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator() && !((EntityHuman) entity).u(); }; + public static Predicate notSpectator() { return f; } // Paper - OBFHELPER public static final Predicate f = (entity) -> { - return !(entity instanceof EntityHuman) || !((EntityHuman)entity).isSpectator(); + return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator(); }; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index eeab59379..d6a4bc64a 100644 diff --git a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch index 47065ae07c..8c2f3928cb 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/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index 961966e169..56700fc596 100644 +index 961966e16..56700fc59 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 { @@ -19,7 +19,7 @@ index 961966e169..56700fc596 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ffaa425ec8..19a3ba79f2 100644 +index b1a4a6d70..e72ccefc2 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; @@ -64,7 +64,7 @@ index ffaa425ec8..19a3ba79f2 100644 + } @Nullable public final String getSaveID() { -- EntityTypes entitytypes = this.P(); +- EntityTypes entitytypes = this.P(); - MinecraftKey minecraftkey = EntityTypes.getName(entitytypes); - - return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null; @@ -75,7 +75,7 @@ index ffaa425ec8..19a3ba79f2 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 5c1ab6a0b6..cd411a1423 100644 +index a07ee150c..d74bfa120 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 { @@ -88,7 +88,7 @@ index 5c1ab6a0b6..cd411a1423 100644 } 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 0000000000..743142d030 +index 000000000..743142d03 --- /dev/null +++ b/src/main/java/net/minecraft/server/KeyedObject.java @@ -0,0 +0,0 @@ @@ -102,7 +102,7 @@ index 0000000000..743142d030 + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 62b6e6eb38..7390061bf0 100644 +index 62b6e6eb3..7390061bf 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/Add-More-Creeper-API.patch b/Spigot-Server-Patches/Add-More-Creeper-API.patch index 2cdc4fb76b..58f59496bb 100644 --- a/Spigot-Server-Patches/Add-More-Creeper-API.patch +++ b/Spigot-Server-Patches/Add-More-Creeper-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add More Creeper API diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 569248abb..b1752d66f 100644 +index a07337ae4..945a75dd6 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/Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/Add-PhantomPreSpawnEvent.patch index 3e54eec143..841a517271 100644 --- a/Spigot-Server-Patches/Add-PhantomPreSpawnEvent.patch +++ b/Spigot-Server-Patches/Add-PhantomPreSpawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PhantomPreSpawnEvent diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 60cb6f583..7a48719c9 100644 +index a99d90efc..f576264a8 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java @@ -0,0 +0,0 @@ public class EntityPhantom extends EntityFlying implements IMonster { diff --git a/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch index f532593b15..acbc586e56 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 a6457e870..fadf1df28 100644 +index 6e96cea08..ffff7390e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ @@ -30,11 +30,11 @@ index a6457e870..fadf1df28 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 a13515a7f..bad1020c0 100644 +index a9a133993..8f4b5dca9 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 { - this.j = s1; + this.j = s; } + public EnumItemSlot.Function getType() { return this.a(); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/Add-PlayerConnectionCloseEvent.patch index cdce5df4d3..b9ca0c67a0 100644 --- a/Spigot-Server-Patches/Add-PlayerConnectionCloseEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerConnectionCloseEvent.patch @@ -34,7 +34,7 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent is undefined. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 95d34fbfe..d20545bad 100644 +index ca76f2a38..dfe7a029f 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 { @@ -50,7 +50,7 @@ index 95d34fbfe..d20545bad 100644 private SecretKey loginKey; private EntityPlayer l; diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 065bede4c..21e92b921 100644 +index 0b8796d0a..553637239 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -0,0 +0,0 @@ import io.netty.handler.timeout.TimeoutException; diff --git a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch index 21d4a3dc29..ff703d86f8 100644 --- a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent For modifying a player's initial spawn location as they join the server diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 26df2ff32f..4320efaef5 100644 +index c2bb79fe8..4f9c97a08 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/Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch index 22c39b44bc..284b628f6f 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 d6333d9bb..96e3d20e3 100644 +index ca6b9063b..7343eb25c 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 d6333d9bb..96e3d20e3 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 c8b251e69..00751a9d9 100644 +index 691c16271..067de3b5f 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-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/Add-PlayerUseUnknownEntityEvent.patch index e7b89bd1ff..f684c61b1d 100644 --- a/Spigot-Server-Patches/Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerUseUnknownEntityEvent.patch @@ -5,20 +5,20 @@ Subject: [PATCH] Add PlayerUseUnknownEntityEvent diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java -index a4b98c81f..53d38ea40 100644 +index 77440ac81..8711462e1 100644 --- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java +++ b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java -@@ -0,0 +0,0 @@ import java.io.IOException; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public class PacketPlayInUseEntity implements Packet { + - private int a; + private int a; public int getEntityId() { return this.a; } // Paper - add accessor private PacketPlayInUseEntity.EnumEntityUseAction action; private Vec3D c; private EnumHand d; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b67861519..dc2c143c8 100644 +index 91eb73b73..f35714fa1 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-ProjectileCollideEvent.patch b/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch index 728698e970..ad87b31ad4 100644 --- a/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ProjectileCollideEvent diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index cc38cfb04..46606ed5c 100644 +index 6dee9e169..2aaa27789 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -0,0 +0,0 @@ public abstract class EntityArrow extends Entity implements IProjectile { @@ -46,7 +46,7 @@ index 3e3619d79..58cc4824c 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 cffb40efb..45a326779 100644 +index 16aa2b5f2..23f7d36b5 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 { @@ -67,7 +67,7 @@ index cffb40efb..45a326779 100644 vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z); } diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 11638221b..431afaf2f 100644 +index 751ea456b..bab5b89fe 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 { @@ -87,7 +87,7 @@ index 11638221b..431afaf2f 100644 if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.getBlockPosition()).getBlock() == Blocks.NETHER_PORTAL) { this.e(movingobjectposition.getBlockPosition()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2a06cbf85..464c5cfc9 100644 +index 717cd0f42..943963047 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/Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/Add-TNTPrimeEvent.patch index 5c6370bddd..a9c06f4e16 100644 --- a/Spigot-Server-Patches/Add-TNTPrimeEvent.patch +++ b/Spigot-Server-Patches/Add-TNTPrimeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 35a265fa2..3bacd8958 100644 +index 3f421d46a..0fbcd352c 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -112,7 +112,7 @@ index f97fccf56..c821e6b3b 100644 world.setAir(blockposition); } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 473773724..a49f1208b 100644 +index 79d8be8d4..fcc82d8eb 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; diff --git a/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch index 7a4f5866e1..1dfc7ec888 100644 --- a/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch @@ -127,7 +127,7 @@ index 000000000..fdd8708f9 + } +} diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 64d2b8aec..95d34fbfe 100644 +index c5801122d..ca76f2a38 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 { @@ -203,7 +203,7 @@ index 64d2b8aec..95d34fbfe 100644 } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index e5cc77c6d..120416b30 100644 +index 4c1110479..c53697914 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> { @@ -244,27 +244,27 @@ index b95836d44..621aad150 100644 int j = this.g(); diff --git a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java -index e3c0094f7..edfd4a506 100644 +index bdac03da4..430445cc6 100644 --- a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - import java.io.IOException; +@@ -0,0 +0,0 @@ import java.io.IOException; public class PacketLoginInCustomPayload implements Packet { + - private int a; - private PacketDataSerializer b; + private int a; public int getId() { return a; } // Paper - OBFHELPER + private PacketDataSerializer b; public PacketDataSerializer getBuf() { return b; } // Paper - OBFHELPER - public PacketLoginInCustomPayload() { - } + public PacketLoginInCustomPayload() {} + diff --git a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java -index 9c5559ece..9de0421bb 100644 +index 345843a7f..23c96f44b 100644 --- a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java @@ -0,0 +0,0 @@ public class PacketLoginOutCustomPayload implements Packet { -+ Predicate predicate = (voxelshape3) -> { // Paper - decompile fix - return !voxelshape3.isEmpty() && VoxelShapes.c(voxelshape, voxelshape3, OperatorBoolean.AND); - }; - Stream stream = StreamSupport.stream(BlockPosition.MutableBlockPosition.b(i, k, i1, j - 1, l - 1, j1 - 1).spliterator(), false).map((blockposition$mutableblockposition) -> { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0e70a3d68..4093d3486 100644 +index ae7e4a7fa..96442ad7d 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 IEntityAccess, GeneratorAccess, IIBlockAc public final List k = Lists.newArrayList(); - protected final IntHashMap entitiesById = new IntHashMap(); + protected final IntHashMap entitiesById = new IntHashMap<>(); private final long F = 16777215L; - private int G; + private int G; public int getSkylightSubtracted() { return this.G; } public void setSkylightSubtracted(int value) { this.G = value;} // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/Add-ability-to-configure-frosted_ice-properties.patch b/Spigot-Server-Patches/Add-ability-to-configure-frosted_ice-properties.patch index ba2b0a0742..1a564958e9 100644 --- a/Spigot-Server-Patches/Add-ability-to-configure-frosted_ice-properties.patch +++ b/Spigot-Server-Patches/Add-ability-to-configure-frosted_ice-properties.patch @@ -24,7 +24,7 @@ index 973ea8bca..7c7d5595a 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index 1100073f3..598621fbb 100644 +index 7cac7cc90..792a69ad5 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 { @@ -32,16 +32,19 @@ index 1100073f3..598621fbb 100644 public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) { + if (!world.paperConfig.frostedIceEnabled) return; // Paper - add ability to disable frosted ice - if ((random.nextInt(3) == 0 || this.a(world, blockposition, 4)) && world.getLightLevel(blockposition) > 11 - iblockdata.get(a) - iblockdata.b(world, blockposition) && this.c(iblockdata, world, blockposition)) { - try (BlockPosition.b blockposition$b = BlockPosition.b.r()) { - for(EnumDirection enumdirection : EnumDirection.values()) { - blockposition$b.g(blockposition).c(enumdirection); - IBlockData iblockdata1 = world.getType(blockposition$b); - if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition$b)) { -- world.getBlockTickList().a(blockposition$b, this, MathHelper.nextInt(random, 20, 40)); -+ world.getBlockTickList().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + if ((random.nextInt(3) == 0 || this.a(world, blockposition, 4)) && world.getLightLevel(blockposition) > 11 - (Integer) iblockdata.get(BlockIceFrost.a) - iblockdata.b(world, blockposition) && this.c(iblockdata, world, blockposition)) { + BlockPosition.b blockposition_b = BlockPosition.b.r(); + Throwable throwable = null; +@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { + IBlockData iblockdata1 = world.getType(blockposition_b); + + if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) { +- world.getBlockTickList().a(blockposition_b, this, MathHelper.nextInt(random, 20, 40)); ++ world.getBlockTickList().a(blockposition_b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay } } + } catch (Throwable throwable1) { +@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { } } else { 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 e3b88edfd2..5a1fd604d2 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 @@ -19,25 +19,26 @@ index 875650b8d..74185b31f 100644 + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 1e22aa531..e6da1c30f 100644 +index a6259d9e6..aad7ce93f 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 { private int h; private int i; private int j; -+ private void setDragonKilled(boolean dragonKilled) { this.k = dragonKilled; } // Paper - OBFHELPER - private boolean k; +- private boolean k; ++ private boolean k; private void setDragonKilled(boolean dragonKilled) { this.k = dragonKilled; } // Paper - OBFHELPER private boolean l; private UUID m; -- private boolean n = true; -+ private boolean n = true; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER +- private boolean n; ++ private boolean n; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER private BlockPosition o; private EnumDragonRespawn p; private int q; - private List r; - - public EnderDragonBattle(WorldServer worldserver, NBTTagCompound nbttagcompound) { +@@ -0,0 +0,0 @@ public class EnderDragonBattle { + this.bossBattle = (BossBattleServer) (new BossBattleServer(new ChatMessage("entity.minecraft.ender_dragon", new Object[0]), BossBattle.BarColor.PINK, BossBattle.BarStyle.PROGRESS)).setPlayMusic(true).c(true); + this.e = Lists.newArrayList(); + this.n = true; + // Paper start + setScanForLegacyFight(worldserver.paperConfig.scanForLegacyEnderDragon); + if (!scanForLegacyFight()) setDragonKilled(true); @@ -45,13 +46,4 @@ index 1e22aa531..e6da1c30f 100644 this.d = worldserver; if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) { if (nbttagcompound.b("DragonUUID")) { -@@ -0,0 +0,0 @@ public class EnderDragonBattle { - hashset.add(entityplayer); - } - -- HashSet hashset1 = Sets.newHashSet(this.bossBattle.getPlayers()); -+ HashSet hashset1 = Sets.newHashSet(this.bossBattle.getPlayers()); // Paper - decomp fix - hashset1.removeAll(hashset); - - for(EntityPlayer entityplayer1 : hashset1) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch index ccc19e580b..ff50f3e10e 100644 --- a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch @@ -30,7 +30,7 @@ index 341038fc4..3e1f4be10 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9d4d8c697..8f4319c80 100644 +index f31f31c37..42a073d70 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/Add-exception-reporting-event.patch b/Spigot-Server-Patches/Add-exception-reporting-event.patch index 10737e2eda..deecff2ef5 100644 --- a/Spigot-Server-Patches/Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/Add-exception-reporting-event.patch @@ -49,7 +49,7 @@ index 000000000..f699ce18c + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index c5d562dca..37bea8dbe 100644 +index d1b6344ce..446e464b7 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -88,12 +88,12 @@ index c5d562dca..37bea8dbe 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 6a9b9fa2a..557aa5180 100644 +index fe189a841..9a8894238 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.function.BooleanSupplier; +@@ -0,0 +0,0 @@ import java.util.concurrent.CompletableFuture; + import java.util.function.BooleanSupplier; import java.util.function.Consumer; - import java.util.function.Function; import javax.annotation.Nullable; +import com.destroystokyo.paper.exception.ServerInternalException; import org.apache.logging.log4j.LogManager; @@ -119,7 +119,7 @@ index 6a9b9fa2a..557aa5180 100644 } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 95120be5d..5977d3b48 100644 +index 09ef8729d..bf67dbf54 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -0,0 +0,0 @@ @@ -130,7 +130,7 @@ index 95120be5d..5977d3b48 100644 import com.google.common.collect.Maps; import com.google.common.io.Files; @@ -0,0 +0,0 @@ public class NameReferencingFileConverter { - root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1)); + root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file5)); } catch (Exception exception) { exception.printStackTrace(); + ServerInternalException.reportInternalException(exception); // Paper @@ -146,7 +146,7 @@ index 95120be5d..5977d3b48 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 66fe6ff86..06417b9ec 100644 +index e8d9f33c8..5b48bb0b7 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -0,0 +0,0 @@ @@ -165,7 +165,7 @@ index 66fe6ff86..06417b9ec 100644 } @@ -0,0 +0,0 @@ public class RegionFile { - this.b(i, j, (int)(SystemUtils.getTimeMillis() / 1000L)); + this.b(i, j, (int) (SystemUtils.getTimeMillis() / 1000L)); } catch (IOException ioexception) { ioexception.printStackTrace(); + ServerInternalException.reportInternalException(ioexception); // Paper @@ -192,7 +192,7 @@ index c5ca89691..e507a996f 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 4233b94a1..1ff5dcd85 100644 +index 6720a9648..2aa0db5c2 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; @@ -220,7 +220,7 @@ index 4233b94a1..1ff5dcd85 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index e649d662a..560edb523 100644 +index 58122b18e..0ac1fb53a 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -0,0 +0,0 @@ @@ -240,7 +240,7 @@ index e649d662a..560edb523 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a9239ee7b..0e70a3d68 100644 +index ae14fb182..ae7e4a7fa 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -277,16 +277,16 @@ index a9239ee7b..0e70a3d68 100644 this.tileEntityListTick.remove(tileTickPosition--); continue; diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index f0a826cd1..2dee02669 100644 +index 478bf4997..8d51af286 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -0,0 +0,0 @@ public class WorldPersistentData { - int j = nbttagcompound.hasKeyOfType("DataVersion", 99) ? nbttagcompound.getInt("DataVersion") : 1343; - nbttagcompound1 = GameProfileSerializer.a(idatamanager.i(), DataFixTypes.SAVED_DATA, nbttagcompound, j, i); - } catch (Throwable throwable2) { -+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(throwable2); // Paper - throwable = throwable2; - throw throwable2; + + nbttagcompound = GameProfileSerializer.a(idatamanager.i(), DataFixTypes.SAVED_DATA, nbttagcompound1, j, i); + } catch (Throwable throwable1) { ++ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(throwable1); // Paper + throwable = throwable1; + throw throwable1; } finally { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java index 311c4f5ca..e76882b8e 100644 diff --git a/Spigot-Server-Patches/Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/Add-hand-to-bucket-events.patch index cb22f1223c..efcf78ed23 100644 --- a/Spigot-Server-Patches/Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/Add-hand-to-bucket-events.patch @@ -18,13 +18,13 @@ index 5ac88166f..5874d2993 100644 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java -index 6e12bf84f..5d8568a1c 100644 +index 6f5dda880..a064897fc 100644 --- a/src/main/java/net/minecraft/server/ItemBucket.java +++ b/src/main/java/net/minecraft/server/ItemBucket.java @@ -0,0 +0,0 @@ public class ItemBucket extends Item { if (iblockdata.getBlock() instanceof IFluidSource) { // CraftBukkit start - FluidType dummyFluid = ((IFluidSource) iblockdata.getBlock()).a(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); + FluidType dummyFluid = ((IFluidSource) iblockdata.getBlock()).removeFluid(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); - PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), null, itemstack, dummyFluid.b()); + PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), null, itemstack, dummyFluid.b(), enumhand); // Paper - add enumHand @@ -67,7 +67,7 @@ index 6e12bf84f..5d8568a1c 100644 ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 41b05f231..c6cd2f3be 100644 +index fa3bb1047..a2841ee53 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/Add-missing-coverages-for-getTileEntity-in-order-to-.patch b/Spigot-Server-Patches/Add-missing-coverages-for-getTileEntity-in-order-to-.patch index 430c07189d..94bc7f81e0 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 b5b1a2637..b80315bc5 100644 +index b17069e41..44b003325 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-more-Witch-API.patch b/Spigot-Server-Patches/Add-more-Witch-API.patch index 3cae0ee355..2dd60054c6 100644 --- a/Spigot-Server-Patches/Add-more-Witch-API.patch +++ b/Spigot-Server-Patches/Add-more-Witch-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Witch API diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index f334ad88d..e3c77839b 100644 +index feedfc9d9..955e0e19b 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Add-more-Zombie-API.patch b/Spigot-Server-Patches/Add-more-Zombie-API.patch index 440f26a593..f32a3038bd 100644 --- a/Spigot-Server-Patches/Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/Add-more-Zombie-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index f25bcfd8f..72ea3ba76 100644 +index 92ad1ad15..85465879d 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 { @@ -13,9 +13,9 @@ index f25bcfd8f..72ea3ba76 100644 private static final DataWatcherObject bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); - private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); -- public static final DataWatcherObject bF = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); // PAIL -+ private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject armsRaised = bE; // Paper - OBFHELPER -+ public static final DataWatcherObject bF = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject drowning = bF; // Paper - OBFHELPER +- public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); ++ private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject armsRaised = bE; // Paper - OBFHELPER ++ public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject drowning = DROWN_CONVERTING; // Paper - OBFHELPER private final PathfinderGoalBreakDoor bG; private boolean bH; private int bI; @@ -28,12 +28,12 @@ index f25bcfd8f..72ea3ba76 100644 public EntityZombie(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { - this.getDataWatcher().register(EntityZombie.bF, false); + this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false); } + public boolean isDrowning() { return isDrownConverting(); } // Paper - OBFHELPER public boolean isDrownConverting() { - return (Boolean) this.getDataWatcher().get(EntityZombie.bF); + return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING); } + public void setArmsRaised(boolean raised) { s(raised); } // Paper - OBFHELPER @@ -51,13 +51,7 @@ index f25bcfd8f..72ea3ba76 100644 return this.bH; } @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { - super.movementTick(); - } - -+ public void startDrowning(int drownedConversionTime) { a(drownedConversionTime); } // Paper - OBFHELPER - public void a(int i) { // PAIL - this.drownedConversionTime = i; - this.getDataWatcher().set(EntityZombie.bF, true); + this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); } + // Paper start @@ -99,7 +93,7 @@ index f25bcfd8f..72ea3ba76 100644 public void a(NBTTagCompound nbttagcompound) { @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) { - this.a(nbttagcompound.getInt("DrownedConversionTime")); + this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime")); } - + // Paper start @@ -111,11 +105,11 @@ index f25bcfd8f..72ea3ba76 100644 public void b(EntityLiving entityliving) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java -index 7af4ea9f8..4d4c50212 100644 +index e93ecb076..c516d3475 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java @@ -0,0 +0,0 @@ public class CraftZombie extends CraftMonster implements Zombie { - getHandle().a(time); + getHandle().startDrownedConversion(time); } } + @@ -125,7 +119,7 @@ index 7af4ea9f8..4d4c50212 100644 + } + + public void startDrowning(int drownedConversionTime) { -+ getHandle().startDrowning(drownedConversionTime); ++ getHandle().startDrownedConversion(drownedConversionTime); + } + + public void stopDrowning() { 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 b0bf486c11..afdf71fc3e 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 @@ -26,7 +26,7 @@ index e49eb0caf..aefb0ce97 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 16a8cee3e..86c6beefe 100644 +index f1314831f..651133eb9 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 16a8cee3e..86c6beefe 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 03b986bfa..c8b251e69 100644 +index 1491de7e7..877598a54 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-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/Add-option-to-prevent-players-from-moving-into-unloa.patch index 94dd444a1f..5a2fa6b250 100644 --- a/Spigot-Server-Patches/Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -20,7 +20,7 @@ index 48920b045..77368b17a 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f2f977fff..96db9121b 100644 +index 8899ad0f6..f78c6e991 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-player-view-distance-API.patch b/Spigot-Server-Patches/Add-player-view-distance-API.patch index 8cd10b2695..7884391a9e 100644 --- a/Spigot-Server-Patches/Add-player-view-distance-API.patch +++ b/Spigot-Server-Patches/Add-player-view-distance-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add player view distance API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1aec6d7c3..1185769ca 100644 +index 70d5a69f8..f28ca6bb4 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 { @@ -25,7 +25,7 @@ index 1aec6d7c3..1185769ca 100644 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index d7f33bd53..63e22bd9a 100644 +index 45ab33d1a..3854ae976 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 { @@ -37,7 +37,7 @@ index d7f33bd53..63e22bd9a 100644 Iterator iterator = this.c.iterator(); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 6a622f72e..4272d2036 100644 +index d00401ce1..dd6c84b4a 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 { @@ -50,7 +50,7 @@ index 6a622f72e..4272d2036 100644 return d0 >= (double) (-i) && d0 <= (double) i && d1 >= (double) (-i) && d1 <= (double) i && this.tracker.a(entityplayer); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 29e24940f..653031af4 100644 +index e01222ad2..55161af9c 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 { @@ -221,7 +221,7 @@ index 29e24940f..653031af4 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index ff564508f..4233b94a1 100644 +index 4eaa5d93b..6720a9648 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 { @@ -234,7 +234,7 @@ index ff564508f..4233b94a1 100644 for (int i1 = -b0; i1 <= b0; ++i1) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6635f1a4a..d2ff18cf7 100644 +index 31140ed18..1a4527f30 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/Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/Add-ray-tracing-methods-to-LivingEntity.patch index d890c0eaa9..3a41c5d718 100644 --- a/Spigot-Server-Patches/Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1dcb9a7e9..5ea5d4b78 100644 +index 8f5ff37c2..b4dcdda0c 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/Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch index 375b7ee0ee..f9f9bda1d7 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 @@ -31,7 +31,7 @@ index e10055b7d..2ae623e7d 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 5977d3b48..c3f3ae03a 100644 +index bf67dbf54..dcaba3c40 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 { 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 5511de0ec8..6b485ca325 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 f7990fbdb..4f01140e7 100644 +index 42b76b212..ca236a315 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 { @@ -73,7 +73,7 @@ index f7990fbdb..4f01140e7 100644 // Do not pass along players, as doing so can get them stuck outside of time. // (which for example disables inventory icon updates and prevents block breaking) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fe0590dea..469dce5df 100644 +index 12ab5def2..50e616179 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-source-block-to-BlockPhysicsEvent.patch b/Spigot-Server-Patches/Add-source-block-to-BlockPhysicsEvent.patch index 0eb8173c4f..b8a3eb79da 100644 --- a/Spigot-Server-Patches/Add-source-block-to-BlockPhysicsEvent.patch +++ b/Spigot-Server-Patches/Add-source-block-to-BlockPhysicsEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add source block to BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e8891d078..0d401bf1d 100644 +index 823c3900b..b4c9df025 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch index 36787bb55a..de7d84f02f 100644 --- a/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch @@ -18,7 +18,7 @@ index 808d1a120..3030dd9c3 100644 this.die(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 075e6f04e..2a06cbf85 100644 +index b8bf1fbef..717cd0f42 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 @@ import org.bukkit.entity.Player; diff --git a/Spigot-Server-Patches/Add-sun-related-API.patch b/Spigot-Server-Patches/Add-sun-related-API.patch index d83b751ac5..2587471318 100644 --- a/Spigot-Server-Patches/Add-sun-related-API.patch +++ b/Spigot-Server-Patches/Add-sun-related-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 877337eed..48c1ae624 100644 +index 8317ecea8..2aa49aaee 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 { @@ -17,7 +17,7 @@ index 877337eed..48c1ae624 100644 if (this.world.L() && !this.world.isClientSide) { float f = this.az(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9fc0d7576..c8a7f5e59 100644 +index 55cd98ae2..a186637f5 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -29,7 +29,7 @@ index 9fc0d7576..c8a7f5e59 100644 return this.G < 4; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 162ff3414..86e70f236 100644 +index b5a87cfaf..e33135ada 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-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/Allow-chests-to-be-placed-with-NBT-data.patch index e27b0d9d74..e44e728a68 100644 --- a/Spigot-Server-Patches/Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/Allow-chests-to-be-placed-with-NBT-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index d32ea9c92..d1000805a 100644 +index 99dab7a47..5a67e1f92 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 { @@ -25,7 +25,7 @@ index d32ea9c92..d1000805a 100644 for (BlockState blockstate : blocks) { blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index f00c7dade..961e9d62c 100644 +index c46b761cc..2e0f782f6 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic diff --git a/Spigot-Server-Patches/Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/Allow-disabling-armour-stand-ticking.patch index c5404c4f18..bf97073d0a 100644 --- a/Spigot-Server-Patches/Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-Server-Patches/Allow-disabling-armour-stand-ticking.patch @@ -20,7 +20,7 @@ index 4059c7a72..10efe6b3d 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 1dcc482c0..c5bddb1da 100644 +index c604182dd..2c54e3e34 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 { @@ -141,7 +141,7 @@ index 1dcc482c0..c5bddb1da 100644 public Vector3f r() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3e9af4481..1dcb9a7e9 100644 +index 87715c302..8f5ff37c2 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/Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/Allow-for-toggling-of-spawn-chunks.patch index 375cb378d5..095c1414c6 100644 --- a/Spigot-Server-Patches/Allow-for-toggling-of-spawn-chunks.patch +++ b/Spigot-Server-Patches/Allow-for-toggling-of-spawn-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow for toggling of spawn chunks diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 02f7e506e3..cef0c47ac7 100644 +index 3e1f4be10..3f734327c 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 02f7e506e3..cef0c47ac7 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c3c435cab9..30a46a50fb 100644 +index 209091a9c..ed227d8e8 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch index bd76aa371a..910a25cc37 100644 --- a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch @@ -19,7 +19,7 @@ index a55163a45..341038fc4 100644 + } } diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java -index 74a40671e..5d6260ded 100644 +index 4ed5192c6..489beed26 100644 --- a/src/main/java/net/minecraft/server/ControllerJump.java +++ b/src/main/java/net/minecraft/server/ControllerJump.java @@ -0,0 +0,0 @@ public class ControllerJump { @@ -31,7 +31,7 @@ index 74a40671e..5d6260ded 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 7cf459d26..9d4d8c697 100644 +index cca047b04..f31f31c37 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 7cf459d26..9d4d8c697 100644 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index 15c04f890..7db180fa9 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 { diff --git a/Spigot-Server-Patches/Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/Allow-setting-the-vex-s-summoner.patch index 179a18c21a..cc48c7904c 100644 --- a/Spigot-Server-Patches/Allow-setting-the-vex-s-summoner.patch +++ b/Spigot-Server-Patches/Allow-setting-the-vex-s-summoner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow setting the vex's summoner diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index 90028c802..6915e5d11 100644 +index c3864b869..589b13f4e 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 { 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 489cb114ae..89d998d48b 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 d3be0211f..b50785aa0 100644 +index d06496762..a436ded60 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 0890b4872b..f13f76c695 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 @@ -27,7 +27,7 @@ index 3f59e060b..305a1258f 100644 + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 90d1096e5..b682b3a43 100644 +index 852dc7162..74bc08f85 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/Always-process-chunk-removal-in-removeEntity.patch b/Spigot-Server-Patches/Always-process-chunk-removal-in-removeEntity.patch index d7be4b2c64..b8f0245074 100644 --- a/Spigot-Server-Patches/Always-process-chunk-removal-in-removeEntity.patch +++ b/Spigot-Server-Patches/Always-process-chunk-removal-in-removeEntity.patch @@ -8,7 +8,7 @@ which can keep them in the chunk when they shouldnt be if done during entity ticking. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 78e85aacf..f5f1452b7 100644 +index 93b0544e0..2dd617de9 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Anti-Xray.patch b/Spigot-Server-Patches/Anti-Xray.patch index 46aac6c30c..eb0e55c932 100644 --- a/Spigot-Server-Patches/Anti-Xray.patch +++ b/Spigot-Server-Patches/Anti-Xray.patch @@ -1049,7 +1049,7 @@ index 000000000..37093419c + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 414c27516..c3a54576f 100644 +index edf4d9130..71d865b76 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 { @@ -1071,7 +1071,7 @@ index 414c27516..c3a54576f 100644 this.initLighting(); } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 41a7103ef..c12db3cfa 100644 +index 450c9e79b..f3e766967 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 { @@ -1093,7 +1093,7 @@ index 41a7103ef..c12db3cfa 100644 chunksection.getBlocks().a(nbttagcompound, "Palette", "BlockStates"); chunksection.a(new NibbleArray(nbttagcompound.getByteArray("BlockLight"))); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 7e4c79a1c..bdfc7d81f 100644 +index 621ed1fc5..2af07ae59 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java @@ -0,0 +0,0 @@ public class ChunkSection { @@ -1108,13 +1108,13 @@ index 7e4c79a1c..bdfc7d81f 100644 + + public ChunkSection(int i, boolean flag, IChunkAccess chunk, IWorldReader world, boolean initializeBlocks) { // Paper - Anti-Xray this.yPos = i; -- this.blockIds = new DataPaletteBlock(GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); -+ this.blockIds = new DataPaletteBlock(GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world instanceof GeneratorAccess ? ((GeneratorAccess) world).getMinecraftWorld().chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, flag, initializeBlocks) : null, initializeBlocks); // Paper - Anti-Xray - Add predefined block data +- this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); ++ this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world instanceof GeneratorAccess ? ((GeneratorAccess) world).getMinecraftWorld().chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, flag, initializeBlocks) : null, initializeBlocks); // Paper - Anti-Xray - Add predefined block data this.emittedLight = new NibbleArray(); if (flag) { this.skyLight = new NibbleArray(); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 9deab61fc..ad7e4a036 100644 +index 56958a5ce..d3898599f 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 implements DataPaletteExpandable { } - public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T object) { + public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T t0) { + // Paper start - Anti-Xray - Support default constructor -+ this(datapalette, registryblockid, function, function1, object, null, true); ++ this(datapalette, registryblockid, function, function1, t0, null, true); + } + -+ public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T object, T[] predefinedObjects, boolean initialize) { ++ public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T t0, T[] predefinedObjects, boolean initialize) { + // Paper end - Anti-Xray - Add predefined objects this.b = datapalette; this.d = registryblockid; this.e = function; this.f = function1; - this.g = (T)object; + this.g = t0; - this.b(4); + // Paper start - Anti-Xray - Add predefined objects + this.predefinedObjects = predefinedObjects; @@ -1198,7 +1198,7 @@ index 6e7454b13..71a3636be 100644 + // Paper end } - private static int b(int ix, int jx, int k) { + private static int b(int i, int j, int k) { @@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { } } @@ -1212,18 +1212,20 @@ index 6e7454b13..71a3636be 100644 + } + } + // Paper end - public int onResize(int ix, T object) { ++ + public int onResize(int i, T t0) { this.b(); DataBits databits = this.a; - DataPalette datapalette = this.h; // Paper - decompile fix - this.b(ix); +@@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { + + int j; + this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects - for(int jx = 0; jx < databits.b(); ++jx) { - T object1 = datapalette.a(databits.a(jx)); // Paper - decompile fix - if (object1 != null) { + for (j = 0; j < databits.b(); ++j) { + T t1 = datapalette.a(databits.a(j)); + @@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { - return (T)(object == null ? this.g : object); + return t0 == null ? this.g : t0; } - public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER @@ -1256,22 +1258,22 @@ index 6e7454b13..71a3636be 100644 public void a(NBTTagCompound nbttagcompound, String s, String s1) { this.b(); NBTTagList nbttaglist = nbttagcompound.getList(s, 10); -- int ix = Math.max(4, MathHelper.d(nbttaglist.size())); -- if (ix != this.i) { +- int i = Math.max(4, MathHelper.d(nbttaglist.size())); + // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)? -+ int ix = Math.max(4, MathHelper.d(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects -+ -+ if (true || ix != this.i) { // Paper - Anti-Xray - Not initialized yet - this.b(ix); ++ int i = Math.max(4, MathHelper.d(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects + +- if (i != this.i) { ++ if (true || i != this.i) { // Paper - Anti-Xray - Not initialized yet + this.b(i); } this.h.a(nbttaglist); + this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects long[] along = nbttagcompound.o(s1); - int jx = along.length * 64 / 4096; - if (this.h == this.b) { + int j = along.length * 64 / 4096; + diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index e75b1a76e..e5cc77c6d 100644 +index 4a50aab51..4c1110479 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> { @@ -1332,7 +1334,7 @@ index e75b1a76e..e5cc77c6d 100644 public void a() { this.o(); diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 22a262bb6..40ec398ee 100644 +index 18ef7232e..8e35d14f9 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -0,0 +0,0 @@ @@ -1348,9 +1350,10 @@ index 22a262bb6..40ec398ee 100644 private boolean f; + private volatile boolean ready = false; // Paper - Async-Anti-Xray - Ready flag for the network manager - public PacketPlayOutMapChunk() { +- public PacketPlayOutMapChunk() {} ++ public PacketPlayOutMapChunk() { + this.ready = true; // Paper - Async-Anti-Xray - Set the ready flag to true - } ++ } public PacketPlayOutMapChunk(Chunk chunk, int i) { + ChunkPacketInfo chunkPacketInfo = chunk.world.chunkPacketBlockController.getChunkPacketInfo(this, chunk, i); // Paper - Anti-Xray - Add chunk packet info @@ -1358,6 +1361,7 @@ index 22a262bb6..40ec398ee 100644 this.b = chunk.locZ; this.f = i == 65535; boolean flag = chunk.getWorld().worldProvider.g(); + this.d = new byte[this.a(chunk, flag, i)]; - this.c = this.a(new PacketDataSerializer(this.h()), chunk, flag, i); + @@ -1369,8 +1373,8 @@ index 22a262bb6..40ec398ee 100644 + + this.c = this.writeChunk(new PacketDataSerializer(this.h()), chunk, flag, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info this.e = Lists.newArrayList(); + Iterator iterator = chunk.getTileEntities().entrySet().iterator(); - for(Entry entry : chunk.getTileEntities().entrySet()) { @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet { } } @@ -1381,16 +1385,15 @@ index 22a262bb6..40ec398ee 100644 + // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag + public boolean isReady() { + return this.ready; - } - ++ } ++ + public void setReady(boolean ready) { + this.ready = ready; -+ } + } + // Paper end -+ + public void a(PacketDataSerializer packetdataserializer) throws IOException { this.a = packetdataserializer.readInt(); - this.b = packetdataserializer.readInt(); @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet { return bytebuf; } @@ -1409,7 +1412,7 @@ index 22a262bb6..40ec398ee 100644 ChunkSection[] achunksection = chunk.getSections(); int k = 0; @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet { - ChunkSection chunksection = achunksection[k]; + if (chunksection != Chunk.a && (!this.f() || !chunksection.a()) && (i & 1 << k) != 0) { j |= 1 << k; - chunksection.getBlocks().b(packetdataserializer); @@ -1418,7 +1421,7 @@ index 22a262bb6..40ec398ee 100644 if (flag) { packetdataserializer.writeBytes(chunksection.getSkyLightArray().asBytes()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index db43a8a9a..b58683e6f 100644 +index 7d3f846a1..240f59066 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 { @@ -1445,11 +1448,11 @@ index db43a8a9a..b58683e6f 100644 + // Paper - Anti-Xray - Loading chunks here could cause a ConcurrentModificationException #1104 + // Paper - Anti-Xray - TODO: Check if this is still the case for 1.13 + //this.chunk.world.chunkPacketBlockController.onChunkPacketCreate(this.chunk, this.h, true); // Paper - Anti-Xray - Load nearby chunks if necessary - this.a(new PacketPlayOutMapChunk(this.chunk, this.h)); + this.a((Packet) (new PacketPlayOutMapChunk(this.chunk, this.h))); } else { - this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk)); + this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk))); diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 23223e89d..23fc4d8e1 100644 +index c884fcd34..1d76c4c99 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 { @@ -1462,7 +1465,7 @@ index 23223e89d..23fc4d8e1 100644 public void a(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index faaad0f41..9fd966dfb 100644 +index 16e3469d0..e4c0cc6a3 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java @@ -0,0 +0,0 @@ public class ProtoChunk implements IChunkAccess { @@ -1472,9 +1475,9 @@ index faaad0f41..9fd966dfb 100644 + private GeneratorAccess world; // Paper - Anti-Xray + // Paper start - Anti-Xray - Support default constructors - public ProtoChunk(int ix, int jx, ChunkConverter chunkconverter) { -- this(new ChunkCoordIntPair(ix, jx), chunkconverter); -+ this(new ChunkCoordIntPair(ix, jx), chunkconverter, null); + public ProtoChunk(int i, int j, ChunkConverter chunkconverter) { +- this(new ChunkCoordIntPair(i, j), chunkconverter); ++ this(new ChunkCoordIntPair(i, j), chunkconverter, null); } public ProtoChunk(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter) { @@ -1495,11 +1498,11 @@ index faaad0f41..9fd966dfb 100644 return iblockdata; } -- this.j[jx >> 4] = new ChunkSection(jx >> 4 << 4, this.x()); -+ this.j[jx >> 4] = new ChunkSection(jx >> 4 << 4, this.x(), this, this.world, true); // Paper - Anti-Xray +- this.j[j >> 4] = new ChunkSection(j >> 4 << 4, this.x()); ++ this.j[j >> 4] = new ChunkSection(j >> 4 << 4, this.x(), this, this.world, true); // Paper - Anti-Xray } - IBlockData iblockdata1 = this.j[jx >> 4].getType(ix & 15, jx & 15, kx & 15); + IBlockData iblockdata1 = this.j[j >> 4].getType(i & 15, j & 15, k & 15); @@ -0,0 +0,0 @@ public class ProtoChunk implements IChunkAccess { return; } @@ -1510,7 +1513,7 @@ index faaad0f41..9fd966dfb 100644 if (enumskyblock == EnumSkyBlock.SKY) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 780c0a7e8..67b20c056 100644 +index b4c9df025..a95c8df4b 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/AnvilDamageEvent.patch b/Spigot-Server-Patches/AnvilDamageEvent.patch index ffd0e2914f..758915c4dc 100644 --- a/Spigot-Server-Patches/AnvilDamageEvent.patch +++ b/Spigot-Server-Patches/AnvilDamageEvent.patch @@ -5,12 +5,12 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java -index a7b04a967..c8f988c2c 100644 +index 1560dd382..d206e0465 100644 --- a/src/main/java/net/minecraft/server/ContainerAnvil.java +++ b/src/main/java/net/minecraft/server/ContainerAnvil.java @@ -0,0 +0,0 @@ public class ContainerAnvil extends Container { if (!world.isClientSide) { - if (!entityhuman.abilities.canInstantlyBuild && iblockdata.a(TagsBlock.ANVIL) && entityhuman.getRandom().nextFloat() < 0.12F) { + if (!entityhuman1.abilities.canInstantlyBuild && iblockdata.a(TagsBlock.ANVIL) && entityhuman1.getRandom().nextFloat() < 0.12F) { IBlockData iblockdata1 = BlockAnvil.a_(iblockdata); + // Paper start + com.destroystokyo.paper.event.block.AnvilDamagedEvent event = new com.destroystokyo.paper.event.block.AnvilDamagedEvent(getBukkitView(), iblockdata1 != null ? org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(iblockdata1) : null); diff --git a/Spigot-Server-Patches/Async-Chunk-Loading-and-Generation.patch b/Spigot-Server-Patches/Async-Chunk-Loading-and-Generation.patch index e9d6cf89f3..b77ccb4247 100644 --- a/Spigot-Server-Patches/Async-Chunk-Loading-and-Generation.patch +++ b/Spigot-Server-Patches/Async-Chunk-Loading-and-Generation.patch @@ -458,7 +458,7 @@ index 000000000..8f18c2869 + +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 25e49de19..8246194df 100644 +index 71d865b76..6d3f5b651 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 { @@ -562,7 +562,7 @@ index 2021c0d02..154ab09e0 100644 public void putAll(Map map) { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index b9f8a86aa..4fe173cfb 100644 +index fce3f673d..7b460d7dd 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 { @@ -712,7 +712,7 @@ index b9f8a86aa..4fe173cfb 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index c12db3cfa..6cacacb0b 100644 +index f3e766967..c70308198 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 { @@ -739,7 +739,7 @@ index c12db3cfa..6cacacb0b 100644 completion = new Supplier() { public NBTTagCompound get() { diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index bdfc7d81f..a5c4564d6 100644 +index 2af07ae59..9c6844d44 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java @@ -0,0 +0,0 @@ public class ChunkSection { @@ -759,18 +759,18 @@ index bdfc7d81f..a5c4564d6 100644 + // Paper end public IBlockData getType(int i, int j, int k) { - return this.blockIds.a(i, j, k); + return (IBlockData) this.blockIds.a(i, j, k); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index ad7e4a036..f10f235ed 100644 +index d3898599f..8f061f5ca 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 d; private final IChunkLoader e; private final IAsyncTaskHandler f; -- private final Long2ObjectMap progressCache = new ExpiringMap(8192, 5000) { // CraftBukkit - decompile error -+ final Long2ObjectMap progressCache = new ExpiringMap(8192, 5000) { // CraftBukkit - decompile error // Paper - protected - protected boolean a(Scheduler.a scheduler_a) { +- private final Long2ObjectMap.a> progressCache = new ExpiringMap.a>(8192, 5000) { ++ protected final Long2ObjectMap.a> progressCache = new ExpiringMap.a>(8192, 5000) { // Paper - protected + protected boolean a(Scheduler.a scheduler_a) { ProtoChunk protochunk = (ProtoChunk) scheduler_a.a(); return !protochunk.ab_() /*&& !protochunk.h()*/; // Paper @@ -781,7 +781,7 @@ index ad7e4a036..f10f235ed 100644 public ChunkTaskScheduler(int i, World world, ChunkGenerator chunkgenerator, IChunkLoader ichunkloader, IAsyncTaskHandler iasynctaskhandler) { super("WorldGen", i, ChunkStatus.FINALIZED, () -> { @@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler.a a(ChunkCoordIntPair chunkcoordintpair, boolean flag) { IChunkLoader ichunkloader = this.e; - synchronized (this.e) { @@ -832,7 +832,7 @@ index ad7e4a036..f10f235ed 100644 protected ProtoChunk a(ChunkCoordIntPair chunkcoordintpair, ChunkStatus chunkstatus, Map map) { diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 71a3636be..ff0fe2541 100644 +index 454903a0e..dcbcb655c 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -868,12 +868,13 @@ index 71a3636be..ff0fe2541 100644 - private void b() { - if (this.j.isLocked() && !this.j.isHeldByCurrentThread()) { -- String s = (String)Thread.getAllStackTraces().keySet().stream().filter(Objects::nonNull).map((thread) -> { -- return thread.getName() + ": \n\tat " + (String)Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n\tat ")); +- String s = (String) Thread.getAllStackTraces().keySet().stream().filter(Objects::nonNull).map((thread) -> { +- return thread.getName() + ": \n\tat " + (String) Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n\tat ")); - }).collect(Collectors.joining("\n")); - CrashReport crashreport = new CrashReport("Writing into PalettedContainer from multiple threads", new IllegalStateException()); - CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Thread dumps"); -- crashreportsystemdetails.a("Thread dumps", s); +- +- crashreportsystemdetails.a("Thread dumps", (Object) s); - throw new ReportedException(crashreport); - } else { - this.j.lock(); @@ -889,6 +890,7 @@ index 71a3636be..ff0fe2541 100644 + readLock = NOOP_LOCK; + writeLock = NOOP_LOCK; + } ++ + private void b() { + writeLock.lock(); + } @@ -898,17 +900,18 @@ index 71a3636be..ff0fe2541 100644 } + // Paper end - public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T object) { + public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T t0) { // Paper start - Anti-Xray - Support default constructor @@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { } - protected T a(int ix) { -- T object = this.h.a(this.a.a(ix)); // Paper - decompile fix -- return (T)(object == null ? this.g : object); + protected T a(int i) { +- T t0 = this.h.a(this.a.a(i)); +- +- return t0 == null ? this.g : t0; + try { // Paper start - read lock + readLock.lock(); -+ T object = this.h.a(this.a.a(ix)); // Paper - decompile fix ++ T object = this.h.a(this.a.a(i)); // Paper - decompile fix + return (T)(object == null ? this.g : object); + } finally { + readLock.unlock(); @@ -917,12 +920,12 @@ index 71a3636be..ff0fe2541 100644 // Paper start - Anti-Xray - Support default methods diff --git a/src/main/java/net/minecraft/server/DefinedStructureManager.java b/src/main/java/net/minecraft/server/DefinedStructureManager.java -index 271dc41d4..bd15534c2 100644 +index f5a6387f2..f45685099 100644 --- a/src/main/java/net/minecraft/server/DefinedStructureManager.java +++ b/src/main/java/net/minecraft/server/DefinedStructureManager.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - public class DefinedStructureManager implements IResourcePackListener { + private static final Logger a = LogManager.getLogger(); - private final Map b = Maps.newHashMap(); + private final Map b = Maps.newConcurrentMap(); // Paper @@ -930,7 +933,7 @@ index 271dc41d4..bd15534c2 100644 private final MinecraftServer d; private final java.nio.file.Path e; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ef5a21505..93171edb4 100644 +index 11d5c2655..80e395b1a 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 @@ -956,19 +959,28 @@ index 4698ee99f..dfb45cc4e 100644 Chunk a(GeneratorAccess generatoraccess, int i, int j, Consumer consumer) throws IOException; diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java -index 49fba0979..9ad646f8d 100644 +index 8bb2593aa..67bb28954 100644 --- a/src/main/java/net/minecraft/server/MathHelper.java +++ b/src/main/java/net/minecraft/server/MathHelper.java +@@ -0,0 +0,0 @@ import java.util.function.IntPredicate; + public class MathHelper { + + public static final float a = c(2.0F); +- private static final float[] b = (float[]) SystemUtils.a((Object) (new float[65536]), (afloat) -> { ++ private static final float[] b = (float[]) SystemUtils.a((new float[65536]), (afloat) -> { // Paper - Decompile fix + for (int i = 0; i < afloat.length; ++i) { + afloat[i] = (float) Math.sin((double) i * 3.141592653589793D * 2.0D / 65536.0D); + } @@ -0,0 +0,0 @@ public class MathHelper { return Math.floorMod(i, j); } + public static float normalizeYaw(float fx) { return g(fx); } // Paper - OBFHELPER - public static float g(float fx) { - fx = fx % 360.0F; - if (fx >= 180.0F) { + public static float g(float f) { + f %= 360.0F; + if (f >= 180.0F) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 63b5cdd41..32aee07d1 100644 +index d0be8d2fb..84d588122 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 @@ -983,25 +995,25 @@ index 63b5cdd41..32aee07d1 100644 } BlockPosition blockposition = worldserver.getSpawn(); -- ArrayList arraylist = Lists.newArrayList(); -+ List arraylist = worldserver.getChunkProvider().getSpiralOutChunks(blockposition, worldserver.paperConfig.keepLoadedRange >> 4); // Paper - Set set = Sets.newConcurrentHashSet(); +- List list = Lists.newArrayList(); ++ List list = worldserver.getChunkProvider().getSpiralOutChunks(blockposition, worldserver.paperConfig.keepLoadedRange >> 4); // Paper + Set set = Sets.newConcurrentHashSet(); - // Paper start - short radius = worldserver.paperConfig.keepLoadedRange; - for (int i = -radius; i <= radius && this.isRunning(); i += 16) { - for (int j = -radius; j <= radius && this.isRunning(); j += 16) { - // Paper end -- arraylist.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); +- list.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); - } - } // Paper + // Paper - remove arraylist creation, call spiral above if (this.isRunning()) { // Paper - int expected = arraylist.size(); // Paper + int expected = list.size(); // Paper - -- CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) arraylist, (chunk) -> { -+ CompletableFuture completablefuture = worldserver.getChunkProvider().loadAllChunks((Iterable) arraylist, (chunk) -> { // Paper +- +- CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) list, (chunk) -> { ++ CompletableFuture completablefuture = worldserver.getChunkProvider().loadAllChunks(list, (chunk) -> { // Paper 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 + if (waitForChunks && (set.size() == expected || (set.size() < expected && set.size() % (set.size() / 10) == 0))) { @@ -1718,7 +1730,7 @@ index 000000000..e9a38f9d9 + +} diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index b58683e6f..e61538b3c 100644 +index 240f59066..e4cf8548d 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 { @@ -1772,15 +1784,16 @@ index b58683e6f..e61538b3c 100644 + return Math.sqrt((x * x) + (z * z)); + } - public PlayerChunk(PlayerChunkMap playerchunkmap, int ix, int j) { + public PlayerChunk(PlayerChunkMap playerchunkmap, int i, int j) { this.playerChunkMap = playerchunkmap; - this.location = new ChunkCoordIntPair(ix, j); +@@ -0,0 +0,0 @@ public class PlayerChunk { ChunkProviderServer chunkproviderserver = playerchunkmap.getWorld().getChunkProvider(); - chunkproviderserver.a(ix, j); -- this.chunk = chunkproviderserver.getChunkAt(ix, j, true, false); -- this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), ix, j); // Paper -+ this.chunk = chunkproviderserver.getChunkAt(ix, j, false, false); // Paper -+ this.chunkExists = this.chunk != null || chunkproviderserver.chunkGoingToExists(ix, j); // Paper + + chunkproviderserver.a(i, j); +- this.chunk = chunkproviderserver.getChunkAt(i, j, true, false); +- this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), i, j); // Paper ++ this.chunk = chunkproviderserver.getChunkAt(i, j, false, false); // Paper ++ this.chunkExists = this.chunk != null || chunkproviderserver.chunkGoingToExists(i, j); // Paper markChunkUsed(); // Paper - delay chunk unloads } @@ -1815,7 +1828,7 @@ index b58683e6f..e61538b3c 100644 } } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 27343174d..77b36ff89 100644 +index 679488a3c..b7dda8e28 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 { @@ -1875,7 +1888,7 @@ index 27343174d..77b36ff89 100644 private void e() { diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -index d0b3e43c0..eb7f03898 100644 +index de6dd4fed..da6df06d8 100644 --- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java +++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java @@ -0,0 +0,0 @@ public class RegionLimitedWorldAccess implements GeneratorAccess { @@ -1888,7 +1901,7 @@ index d0b3e43c0..eb7f03898 100644 this.m = world.getChunkProvider().getChunkGenerator().getSettings(); this.i = world.getSeaLevel(); diff --git a/src/main/java/net/minecraft/server/SchedulerBatch.java b/src/main/java/net/minecraft/server/SchedulerBatch.java -index d868149d1..0d45d933e 100644 +index 8e909d9ca..f214a74a2 100644 --- a/src/main/java/net/minecraft/server/SchedulerBatch.java +++ b/src/main/java/net/minecraft/server/SchedulerBatch.java @@ -0,0 +0,0 @@ public class SchedulerBatch, R> { @@ -1916,7 +1929,7 @@ index d868149d1..0d45d933e 100644 } + public CompletableFuture add(K k0) { return a(k0); } // Paper - OBFHELPER - public CompletableFuture a(K object) { + public CompletableFuture a(K k0) { if (!this.c) { throw new RuntimeException("Batch not properly started. Please use startBatch to create a new batch."); @@ -0,0 +0,0 @@ public class SchedulerBatch, R> { @@ -1943,7 +1956,7 @@ index d868149d1..0d45d933e 100644 } } diff --git a/src/main/java/net/minecraft/server/StructurePiece.java b/src/main/java/net/minecraft/server/StructurePiece.java -index 510543db4..ce9e5d4e0 100644 +index d9def7135..945a005e9 100644 --- a/src/main/java/net/minecraft/server/StructurePiece.java +++ b/src/main/java/net/minecraft/server/StructurePiece.java @@ -0,0 +0,0 @@ public abstract class StructurePiece { @@ -1953,41 +1966,53 @@ index 510543db4..ce9e5d4e0 100644 - private static final Set d = ImmutableSet.builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build(); + private static final Set d = ImmutableSet.builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build(); // Paper - decompile error - public StructurePiece() { - } + public StructurePiece() {} + @@ -0,0 +0,0 @@ public abstract class StructurePiece { } public static StructurePiece a(List list, StructureBoundingBox structureboundingbox) { -- for(StructurePiece structurepiece : list) { -+ synchronized (list) { for(StructurePiece structurepiece : list) { // Paper - synchronize main structure list - if (structurepiece.d() != null && structurepiece.d().a(structureboundingbox)) { - return structurepiece; - } -- } -+ }} // Paper ++ StructurePiece structurepiece; // Paper ++ synchronized (list) { // Paper - synchronize main structure list + Iterator iterator = list.iterator(); - return null; +- StructurePiece structurepiece; ++ //StructurePiece structurepiece; // Paper - move up + + do { + if (!iterator.hasNext()) { +@@ -0,0 +0,0 @@ public abstract class StructurePiece { + + structurepiece = (StructurePiece) iterator.next(); + } while (structurepiece.d() == null || !structurepiece.d().a(structureboundingbox)); +- ++ } // Paper + return structurepiece; } + diff --git a/src/main/java/net/minecraft/server/StructureStart.java b/src/main/java/net/minecraft/server/StructureStart.java -index 1926c902a..1117e4ae2 100644 +index 284e96710..8b08efe1f 100644 --- a/src/main/java/net/minecraft/server/StructureStart.java +++ b/src/main/java/net/minecraft/server/StructureStart.java -@@ -0,0 +0,0 @@ import java.util.List; - import java.util.Random; +@@ -0,0 +0,0 @@ import java.util.Random; public abstract class StructureStart { + - protected final List a = Lists.newArrayList(); + protected final List a = java.util.Collections.synchronizedList(Lists.newArrayList()); // Paper protected StructureBoundingBox b; protected int c; protected int d; @@ -0,0 +0,0 @@ public abstract class StructureStart { - protected void a(IBlockAccess var1) { - this.b = StructureBoundingBox.a(); -- for(StructurePiece structurepiece : this.a) { -+ synchronized (this.a) {for(StructurePiece structurepiece : this.a) { // Paper - synchronize + protected void a(IBlockAccess iblockaccess) { + this.b = StructureBoundingBox.a(); ++ synchronized (this.a) { // Paper - synchronize + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructurePiece structurepiece = (StructurePiece) iterator.next(); + this.b.b(structurepiece.d()); - } + }} // Paper @@ -1996,10 +2021,14 @@ index 1926c902a..1117e4ae2 100644 @@ -0,0 +0,0 @@ public abstract class StructureStart { int l = k - this.b.e; - this.b.a(0, l, 0); -- for(StructurePiece structurepiece : this.a) { -+ synchronized (this.a) {for(StructurePiece structurepiece : this.a) { // Paper - synchronize + this.b.a(0, l, 0); ++ synchronized (this.a) { // Paper - synchronize + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructurePiece structurepiece = (StructurePiece) iterator.next(); + structurepiece.a(0, l, 0); - } + }} // Paper @@ -2008,10 +2037,14 @@ index 1926c902a..1117e4ae2 100644 @@ -0,0 +0,0 @@ public abstract class StructureStart { int i1 = l - this.b.b; - this.b.a(0, i1, 0); -- for(StructurePiece structurepiece : this.a) { -+ synchronized (this.a) {for(StructurePiece structurepiece : this.a) { // Paper - synchronize + this.b.a(0, i1, 0); ++ synchronized (this.a) { + Iterator iterator = this.a.iterator(); + + while (iterator.hasNext()) { + StructurePiece structurepiece = (StructurePiece) iterator.next(); + structurepiece.a(0, i1, 0); - } + }} // Paper @@ -2019,7 +2052,7 @@ index 1926c902a..1117e4ae2 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cb09e1052..cd31792b7 100644 +index f48d5d9f7..b5b0fcf8c 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.event.entity.CreatureSpawnEvent.SpawnReason; @@ -2116,13 +2149,13 @@ index cb09e1052..cd31792b7 100644 if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper if (!CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) { diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java -index fa99fe014..4f49786aa 100644 +index 69d8a25bd..d0eaa9e9f 100644 --- a/src/main/java/net/minecraft/server/WorldGenStronghold.java +++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java -@@ -0,0 +0,0 @@ import java.util.Random; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public class WorldGenStronghold extends StructureGenerator { + - private boolean b; - private ChunkCoordIntPair[] c; - private long d; @@ -2132,10 +2165,9 @@ index fa99fe014..4f49786aa 100644 + //private long d; + // Paper end - public WorldGenStronghold() { - } + public WorldGenStronghold() {} - protected boolean a(ChunkGenerator chunkgenerator, Random var2, int i, int j) { + protected boolean a(ChunkGenerator chunkgenerator, Random random, int i, int j) { - if (this.d != chunkgenerator.getSeed()) { + // Paper start + /*if (this.d != chunkgenerator.getSeed()) { @@ -2153,11 +2185,11 @@ index fa99fe014..4f49786aa 100644 + }} // Paper + // Paper end -- for(ChunkCoordIntPair chunkcoordintpair : this.c) { -+ for(ChunkCoordIntPair chunkcoordintpair : chunkgenerator.getWorld().strongholdCoords) { // Paper - if (i == chunkcoordintpair.x && j == chunkcoordintpair.z) { - return true; - } +- ChunkCoordIntPair[] achunkcoordintpair = this.c; ++ ChunkCoordIntPair[] achunkcoordintpair = chunkgenerator.getWorld().strongholdCoords; // Paper + int k = achunkcoordintpair.length; + + for (int l = 0; l < k; ++l) { @@ -0,0 +0,0 @@ public class WorldGenStronghold extends StructureGenerator chunkgenerator) { - this.d = chunkgenerator.getSeed(); + //this.d = chunkgenerator.getSeed(); // Paper - ArrayList arraylist = Lists.newArrayList(); + List list = Lists.newArrayList(); + Iterator iterator = IRegistry.BIOME.iterator(); - for(BiomeBase biomebase : IRegistry.BIOME) { -@@ -0,0 +0,0 @@ public class WorldGenStronghold extends StructureGenerator long2objectmap = chunkgenerator.getStructureStartCache(this); + +@@ -0,0 +0,0 @@ public class WorldGenStronghold extends StructureGenerator= k) { -- this.c[j1] = new ChunkCoordIntPair(k1, l1); -+ strongholdCoords[j1] = new ChunkCoordIntPair(k1, l1); // Paper + if (l1 >= i1) { +- this.c[l1] = new ChunkCoordIntPair(i2, j2); ++ strongholdCoords[l1] = new ChunkCoordIntPair(i2, j2); // Paper } - d1 += (Math.PI * 2D) / (double)i; + d0 += 6.283185307179586D / (double) k; @@ -0,0 +0,0 @@ public class WorldGenStronghold extends StructureGenerator parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); + // Paper start - async tab completion + com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event; + java.util.List completions = new java.util.ArrayList<>(); @@ -46,7 +47,7 @@ index 921e1ec9e..f74e642b8 100644 + if (!event.isHandled()) { + if (!event.isCancelled()) { + // Paper end - async tab completion - ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); ++ ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { if (((Suggestions) suggestions).isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index 708042e393..23da7727a1 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -64,7 +64,7 @@ index d8f258105..47bfb5b62 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 86bdd6e7f..1a8317256 100644 +index ddccdc939..0d70ce797 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 86bdd6e7f..1a8317256 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 516a583a8..27bed54d2 100644 +index ff6f7596c..91533f8ac 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 { @@ -109,7 +109,7 @@ index 516a583a8..27bed54d2 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 77c23884f..52dc6d83b 100644 +index 749e41aed..97714be6d 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 { @@ -121,7 +121,7 @@ index 77c23884f..52dc6d83b 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 edf72fbec..dacb372a5 100644 +index 7710962ce..f09d358e2 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 @@ -168,7 +168,7 @@ index edf72fbec..dacb372a5 100644 this.methodProfiler.enter("snooper"); if (getSnooperEnabled() && !this.snooper.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 3e4ca288d..e28485f18 100644 +index 86aa0c57a..2c3ed3723 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 { @@ -207,7 +207,7 @@ index 3e4ca288d..e28485f18 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 b5983957b..7a765cb7b 100644 +index fa7466d64..48d70624c 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 63d791c5e4..7317edaa40 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 8f4a1626a1..c33c6f480c 100644 +index 97714be6d..742385ad1 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 4977fc53f7..a58fdc3c45 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 9b88a4190..6c9d7df20 100644 +index 3ca579e38..1c1f39524 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 9b88a4190..6c9d7df20 100644 this.a(entity, entity.chunkY); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0ca1816cb..7711b2eff 100644 +index f637aed77..84efc1cc3 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 IEntityAccess, GeneratorAccess, IIBlockAc 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 2f1ea57b6a..02adf5b039 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 9cff011dac..f04ce2fb03 100644 +index 41ff55e9e..baabcd19c 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-dimension-id-collisions.patch b/Spigot-Server-Patches/Avoid-dimension-id-collisions.patch index d61503a5de..c2973419f9 100644 --- a/Spigot-Server-Patches/Avoid-dimension-id-collisions.patch +++ b/Spigot-Server-Patches/Avoid-dimension-id-collisions.patch @@ -8,7 +8,7 @@ we would reuse an existing dimension id, if some other dimension was unloaded before. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d43f8ce9a..07f6580fd 100644 +index 62903f374..a0f255ff1 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/Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/Avoid-hopper-searches-if-there-are-no-items.patch index 0443faa2ce..0be29861fb 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 87ec4d1a2..c5d562dca 100644 +index 2afd6befa..d1b6344ce 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 { @@ -88,7 +88,7 @@ index 87ec4d1a2..c5d562dca 100644 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 7b7fd6b9b..eb08a1caa 100644 +index bbcbb6232..f6916fd45 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -0,0 +0,0 @@ public final class IEntitySelector { 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 85a86dc486..a01ea023cd 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 0b4cab0af..7264773ef 100644 +index 2b67fa834..d11e4d3d8 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 f952d7e015..1c5cb1b4aa 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -429,7 +429,7 @@ index e1af5c488..0ef5ad116 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 9c95661a7..906bd973d 100644 +index 3b918da4d..d8e82a83c 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 9c95661a7..906bd973d 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 7d9edb9a6..355875a98 100644 +index 9bf2521be..059665836 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/Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/Block-player-logins-during-server-shutdown.patch index c0cbf7ea1a..5c457fc406 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 9f6b73d80..af5c699fe 100644 +index e901c066a..852dc7162 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/Book-Size-Limits.patch b/Spigot-Server-Patches/Book-Size-Limits.patch index d673ba1ac7..e07f2c5877 100644 --- a/Spigot-Server-Patches/Book-Size-Limits.patch +++ b/Spigot-Server-Patches/Book-Size-Limits.patch @@ -22,7 +22,7 @@ index fef899ae0..468aff713 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 44fabe240..6a99fb6b7 100644 +index 7ae374085..bbdf729c3 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/Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch index 59223c0214..cd94b33b53 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 aa640e27d4..44c742e643 100644 +index 7194c048c..2ea5ac316 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 aa640e27d4..44c742e643 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 1a87480f09..057ea1c5ac 100644 +index 86ada40a1..a2e856952 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/Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/Break-up-and-make-tab-spam-limits-configurable.patch index 7f6e05dc0d..71fdea8b3e 100644 --- a/Spigot-Server-Patches/Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,7 +45,7 @@ index f0b87972d..a92914576 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 16d8a56b1..f2f977fff 100644 +index efcb82877..8899ad0f6 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 { @@ -55,7 +55,7 @@ index 16d8a56b1..f2f977fff 100644 + private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits // CraftBukkit end private int j; - private final IntHashMap k = new IntHashMap(); + private final IntHashMap k = new IntHashMap<>(); @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.minecraftServer.methodProfiler.exit(); // CraftBukkit start diff --git a/Spigot-Server-Patches/Cache-World-Entity-Type-counts.patch b/Spigot-Server-Patches/Cache-World-Entity-Type-counts.patch index c317472971..f0c4ec9e26 100644 --- a/Spigot-Server-Patches/Cache-World-Entity-Type-counts.patch +++ b/Spigot-Server-Patches/Cache-World-Entity-Type-counts.patch @@ -133,7 +133,7 @@ index 000000000..a10a5bc13 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e9543c06c..c083b2dd3 100644 +index a9b0f8497..3311e2b24 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 @@ -145,7 +145,7 @@ index e9543c06c..c083b2dd3 100644 public float length; public float J; diff --git a/src/main/java/net/minecraft/server/EnumCreatureType.java b/src/main/java/net/minecraft/server/EnumCreatureType.java -index 8874a05be..0af387c05 100644 +index 79e52f7ba..42f6a6a93 100644 --- a/src/main/java/net/minecraft/server/EnumCreatureType.java +++ b/src/main/java/net/minecraft/server/EnumCreatureType.java @@ -0,0 +0,0 @@ public enum EnumCreatureType { @@ -158,7 +158,7 @@ index 8874a05be..0af387c05 100644 return this.e; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 72cd9ba58..35205561b 100644 +index e62616552..bfbe4d3e3 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 { @@ -171,7 +171,7 @@ index 72cd9ba58..35205561b 100644 if (l1 <= k) { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index bd6f64e52..67a903a62 100644 +index 187506b57..823c3900b 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/Cache-user-authenticator-threads.patch index 99e5a09e37..2dcc1f2bfd 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 dea401c924..19ac21e385 100644 +index 0f6ac493f..e901c066a 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 a62ffe38a2..cc671961cf 100644 --- a/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch +++ b/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch @@ -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 976888b66..48e7ae2d5 100644 +index 2a99f34df..2a30af7de 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -0,0 +0,0 @@ @@ -106,7 +106,7 @@ index 976888b66..48e7ae2d5 100644 switch (i) { case 0: LegacyPingHandler.a.debug("Ping: (<1.3.x) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort()); -- s = String.format("%s\u00a7%d\u00a7%d", new Object[] { event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()}); // CraftBukkit +- s = String.format("%s\u00a7%d\u00a7%d", event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()); // CraftBukkit + // Paper start - Call PaperServerListPingEvent and use results + event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 39, null); + if (event == null) { @@ -121,7 +121,7 @@ index 976888b66..48e7ae2d5 100644 } LegacyPingHandler.a.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort()); -- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", new Object[] { 127, minecraftserver.getVersion(), event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()}); // CraftBukkit +- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", 127, minecraftserver.getVersion(), event.getMotd(), event.getNumPlayers(), event.getMaxPlayers()); // CraftBukkit + // Paper start - Call PaperServerListPingEvent and use results + event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 127, null); // Paper + if (event == null) { diff --git a/Spigot-Server-Patches/Call-player-spectator-target-events.patch b/Spigot-Server-Patches/Call-player-spectator-target-events.patch index e5ea87d1f1..b76ef995ba 100644 --- a/Spigot-Server-Patches/Call-player-spectator-target-events.patch +++ b/Spigot-Server-Patches/Call-player-spectator-target-events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call player spectator target events diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b5d48e7bf..2679c2358 100644 +index 00c2072d7..bd768e170 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/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch index 217fce514f..8a10d938c0 100644 --- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index 5c50c62e5..e49eb0caf 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 04cd6350c..e26c9ee28 100644 +index e1944774c..b613d3d15 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 04cd6350c..e26c9ee28 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 83605e7c7..be0a3f38e 100644 +index f2e38b9f3..b7923a1a5 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/Catch-Async-PlayerChunkMap-operations.patch b/Spigot-Server-Patches/Catch-Async-PlayerChunkMap-operations.patch index b951e6dc4b..b9f289071c 100644 --- a/Spigot-Server-Patches/Catch-Async-PlayerChunkMap-operations.patch +++ b/Spigot-Server-Patches/Catch-Async-PlayerChunkMap-operations.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Catch Async PlayerChunkMap operations diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 653031af4..3d17ad646 100644 +index 55161af9c..206457650 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/Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/Catch-JsonParseException-in-Entity-and-TE-names.patch index 2f79ee469e..56cda65e1e 100644 --- a/Spigot-Server-Patches/Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/Spigot-Server-Patches/Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -13,7 +13,7 @@ Shulkers) may need to be changed in order for it to re-save properly No more crashing though. diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -index 729859d13..2a1dffbf4 100644 +index e38a0d488..a245df1dc 100644 --- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java @@ -0,0 +0,0 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { @@ -26,7 +26,7 @@ index 729859d13..2a1dffbf4 100644 if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ab8490ff9..522af3d53 100644 +index e068f19ad..11d5c2655 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 @@ -63,7 +63,7 @@ index 0ef5ad116..f70f5899f 100644 + } } diff --git a/src/main/java/net/minecraft/server/TileEntityBanner.java b/src/main/java/net/minecraft/server/TileEntityBanner.java -index b4fae0d30..364a9fa7a 100644 +index 7d9e0837d..dfee7332e 100644 --- a/src/main/java/net/minecraft/server/TileEntityBanner.java +++ b/src/main/java/net/minecraft/server/TileEntityBanner.java @@ -0,0 +0,0 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity { @@ -76,7 +76,7 @@ index b4fae0d30..364a9fa7a 100644 if (this.hasWorld()) { diff --git a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java -index 22dcdc126..1467b540f 100644 +index a106a783e..ff8a5926e 100644 --- a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java +++ b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java @@ -0,0 +0,0 @@ public class TileEntityBrewingStand extends TileEntityContainer implements IWorl @@ -89,7 +89,7 @@ index 22dcdc126..1467b540f 100644 this.fuelLevel = nbttagcompound.getByte("Fuel"); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 7594c16e9..803793072 100644 +index 2e0f782f6..77c012946 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic @@ -115,7 +115,7 @@ index ddd2e0eb0..21bd156e9 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 324a8431c..49e7fd064 100644 +index bfbd35bbe..538ca9bbb 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 @@ -128,7 +128,7 @@ index 324a8431c..49e7fd064 100644 // Paper start - cook speed API diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index cdc576058..2dae75f45 100644 +index 7303a6fdd..544dde428 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 @@ -141,7 +141,7 @@ index cdc576058..2dae75f45 100644 this.f = nbttagcompound.getInt("TransferCooldown"); diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java -index d4f379db9..59a0f4b2c 100644 +index fedba2e1f..296b8dd56 100644 --- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java +++ b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java @@ -0,0 +0,0 @@ public class TileEntityShulkerBox extends TileEntityLootable implements IWorldIn diff --git a/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch index cf754d117e..d0f592678a 100644 --- a/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Change implementation of (tile)entity removal list diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 214adec9b..a9239ee7b 100644 +index ac23ae323..ae14fb182 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -21,7 +21,7 @@ index 214adec9b..a9239ee7b 100644 + private final Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper public final List players = Lists.newArrayList(); public final List k = Lists.newArrayList(); - protected final IntHashMap entitiesById = new IntHashMap(); + protected final IntHashMap entitiesById = new IntHashMap<>(); @@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc this.entityList.removeAll(this.g); diff --git a/Spigot-Server-Patches/Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/Check-Drowned-for-Villager-Aggression-Config.patch index a5a65b64e1..565fd1dc24 100644 --- a/Spigot-Server-Patches/Check-Drowned-for-Villager-Aggression-Config.patch +++ b/Spigot-Server-Patches/Check-Drowned-for-Villager-Aggression-Config.patch @@ -5,27 +5,16 @@ Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java -index 852b9e184..e34b54dc0 100644 +index b861c623c..0e2b5ee74 100644 --- a/src/main/java/net/minecraft/server/EntityDrowned.java +++ b/src/main/java/net/minecraft/server/EntityDrowned.java @@ -0,0 +0,0 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D)); - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true, new Class[]{EntityDrowned.class})); - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 10, true, false, new EntityDrowned.b(this))); -- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false)); -+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false)); // Paper - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityIronGolem.class, true)); - this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget(this, EntityTurtle.class, 10, true, false, EntityTurtle.bC)); + this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true, new Class[] { EntityDrowned.class})); + this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, new EntityDrowned.b(this))); +- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillager.class, false)); ++ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillager.class, false)); + this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); + this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bC)); } -@@ -0,0 +0,0 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - return this.a.f(entityhuman); - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((EntityHuman)object); -- } - } - - static class c extends PathfinderGoalGotoTarget { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/Chunk-Save-Reattempt.patch index 97d0597fea..dc95786756 100644 --- a/Spigot-Server-Patches/Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/Chunk-Save-Reattempt.patch @@ -6,12 +6,12 @@ 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/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 06417b9ec..e1c0921ea 100644 +index 5b48bb0b7..9299ab56a 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 { - this.b(i, j, (int)(SystemUtils.getTimeMillis() / 1000L)); + this.b(i, j, (int) (SystemUtils.getTimeMillis() / 1000L)); } catch (IOException ioexception) { - ioexception.printStackTrace(); - ServerInternalException.reportInternalException(ioexception); // Paper diff --git a/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch b/Spigot-Server-Patches/Chunk-Save-Stats-Debug-Option.patch index f910109a8c..2546d65f2d 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 9990cdbcd..b1c4eb4ae 100644 +index 8e4c1b39a..ed747bc3c 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 { @@ -54,7 +54,7 @@ index 9990cdbcd..b1c4eb4ae 100644 return false; } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index f17869d4d..8eecdbd33 100644 +index 6909b9e45..48230251d 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 95582979df..fa219266e4 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 0d04b14cf..b17a8d60c 100644 +index 3d43f2937..b07229875 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/Chunk-save-queue-improvements.patch index 30ec998ac6..7a89a3a567 100644 --- a/Spigot-Server-Patches/Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/Chunk-save-queue-improvements.patch @@ -26,7 +26,7 @@ Then finally, Sleeping will by default be removed, but due to known issues with But if sleeps are to remain enabled, we at least lower the sleep interval so it doesn't have as much negative impact. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index aa920c469..4aad68a57 100644 +index cc69ff3a4..f80b385ff 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 { @@ -41,11 +41,11 @@ index aa920c469..4aad68a57 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index d9608121b..d7a670093 100644 +index b0c004b1f..d2cece265 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 { - this.z = (int)(i >> 32); + this.z = (int) (i >> 32); } + public long asLong() { return a(); } // Paper @@ -53,12 +53,12 @@ index d9608121b..d7a670093 100644 return a(this.x, this.z); } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 43f77a398..4a0f3989e 100644 +index 63533d237..c0785eea0 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; +@@ -0,0 +0,0 @@ import java.util.Map.Entry; + import java.util.function.Consumer; import java.util.function.Function; - import java.util.function.Predicate; import javax.annotation.Nullable; +import java.util.concurrent.ConcurrentLinkedQueue; // Paper import org.apache.logging.log4j.LogManager; @@ -126,7 +126,8 @@ index 43f77a398..4a0f3989e 100644 } private boolean processSaveQueueEntry(boolean logCompletion) { -- Iterator iterator = this.b.entrySet().iterator(); +- Iterator>> iterator = this.b.entrySet().iterator(); // Spigot +- - if (!iterator.hasNext()) { + // Paper start - Chunk queue improvements + QueuedChunk chunk = queue.poll(); @@ -138,7 +139,7 @@ index 43f77a398..4a0f3989e 100644 return false; } else { -- Entry entry = (Entry) iterator.next(); +- Entry entry = (Entry) iterator.next(); - - iterator.remove(); - ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) entry.getKey(); @@ -171,15 +172,15 @@ index 43f77a398..4a0f3989e 100644 NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream); dataoutputstream.close(); diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java -index a3aba244a..97917551a 100644 +index 8c3537ab8..3c688f546 100644 --- a/src/main/java/net/minecraft/server/FileIOThread.java +++ b/src/main/java/net/minecraft/server/FileIOThread.java @@ -0,0 +0,0 @@ public class FileIOThread implements Runnable { - for(int i = 0; i < this.c.size(); ++i) { - IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver)this.c.get(i); + IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver) this.c.get(i); boolean flag; -- synchronized(iasyncchunksaver) { -+ //synchronized(iasyncchunksaver) { // Paper - remove synchronized + +- synchronized (iasyncchunksaver) { ++ //synchronized (iasyncchunksaver) { // Paper - remove synchronized flag = iasyncchunksaver.a(); - } + //} // Paper @@ -193,8 +194,8 @@ index a3aba244a..97917551a 100644 try { - Thread.sleep(this.f ? 0L : 10L); + Thread.sleep(this.f ? 0L : 1L); // Paper - } catch (InterruptedException interruptedexception1) { - interruptedexception1.printStackTrace(); + } catch (InterruptedException interruptedexception) { + interruptedexception.printStackTrace(); - } + }} // Paper } diff --git a/Spigot-Server-Patches/Complete-resource-pack-API.patch b/Spigot-Server-Patches/Complete-resource-pack-API.patch index f013925d63..28c3d51083 100644 --- a/Spigot-Server-Patches/Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/Complete-resource-pack-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a5bd908fd..b67861519 100644 +index f543532f8..91eb73b73 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 { @@ -22,7 +22,7 @@ index a5bd908fd..b67861519 100644 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0c35c94b3..73abc95e4 100644 +index 976760e54..991787392 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/Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch index 9b8e5f8e12..0b789eea4e 100644 --- a/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch @@ -53,13 +53,13 @@ index 5c18e5770..48b0a742a 100644 + } } diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java -index 8daccdd6e..c2a4ed6cf 100644 +index 3e313bba7..80f9f9a25 100644 --- a/src/main/java/net/minecraft/server/LootSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java -@@ -0,0 +0,0 @@ import java.util.Collection; - import java.util.Random; +@@ -0,0 +0,0 @@ import java.util.Random; public abstract class LootSelectorEntry { + - protected final int c; - protected final int d; + protected final int c; public int getWeight() { return c; } // Paper - OBFHELPER @@ -71,7 +71,7 @@ index 8daccdd6e..c2a4ed6cf 100644 } public int a(float f) { -- return Math.max(MathHelper.d((float)this.c + (float)this.d * f), 0); +- return Math.max(MathHelper.d((float) this.c + (float) this.d * f), 0); + // Paper start - Offer an alternative loot formula to refactor how luck bonus applies + // SEE: https://luckformula.emc.gs for details and data + if (lastLuck != null && lastLuck == f) { @@ -101,6 +101,6 @@ index 8daccdd6e..c2a4ed6cf 100644 + private int lastWeight = 0; + // Paper end - public abstract void a(Collection var1, Random var2, LootTableInfo var3); + public abstract void a(Collection collection, Random random, LootTableInfo loottableinfo); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch index 1918d969eb..3c50678c42 100644 --- a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch @@ -28,7 +28,7 @@ index 03b7410f5..5c50c62e5 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index ddf170180..bd799d0c6 100644 +index 213d0b18c..ebe397b15 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-Chunk-Inhabited-Time.patch b/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Time.patch index 9d55c2851c..a582b89979 100644 --- a/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Time.patch +++ b/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Time.patch @@ -30,7 +30,7 @@ index deb4ec254..d2559f7c4 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 66520842d..f470eba29 100644 +index 182a637ad..0421f8f95 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-Chunks-Sends-per-Tick-setting.patch b/Spigot-Server-Patches/Configurable-Chunks-Sends-per-Tick-setting.patch index d8922be200..7497bb10ec 100644 --- a/Spigot-Server-Patches/Configurable-Chunks-Sends-per-Tick-setting.patch +++ b/Spigot-Server-Patches/Configurable-Chunks-Sends-per-Tick-setting.patch @@ -26,7 +26,7 @@ index b6764c7ec..29cb718fb 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 5935bae58..b1ece38b2 100644 +index e428d4485..f481e5a4f 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-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch index 9e1a6ef427..9faa1c853b 100644 --- a/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch +++ b/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch @@ -6,7 +6,7 @@ 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 71af3fcfed..e28d5b19a3 100644 +index 71af3fcfe..e28d5b19a 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 71af3fcfed..e28d5b19a3 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 5401f7d754..27e6d2b5f2 100644 +index 5e1a3df2b..e94786138 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 @@ -32,7 +32,7 @@ index 5401f7d754..27e6d2b5f2 100644 + return false; + } + // Paper end - List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); // Paper - decompile fix + List list = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))); + if (!list.isEmpty()) { - for(EntityOcelot entityocelot : list) { -- \ No newline at end of file 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 3efdfd8f90..f9b4aa50cc 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,12 +21,12 @@ index 058cd8cc8..276dd98fd 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eef8d2b5a..cc98b745b 100644 +index 7a2f128d3..c21ebd466 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 - ArrayList arraylist = Lists.newArrayList(); - Set set = Sets.newConcurrentHashSet(); + List list = Lists.newArrayList(); + Set set = Sets.newConcurrentHashSet(); - for (int i = -192; i <= 192 && this.isRunning(); i += 16) { - for (int j = -192; j <= 192 && this.isRunning(); j += 16) { @@ -35,14 +35,14 @@ index eef8d2b5a..cc98b745b 100644 + for (int i = -radius; i <= radius && this.isRunning(); i += 16) { + for (int j = -radius; j <= radius && this.isRunning(); j += 16) { + // Paper end - arraylist.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); + list.add(new ChunkCoordIntPair(blockposition.getX() + i >> 4, blockposition.getZ() + j >> 4)); } + } // Paper + if (this.isRunning()) { // Paper -+ int expected = arraylist.size(); // Paper ++ int expected = list.size(); // Paper + - CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) arraylist, (chunk) -> { + CompletableFuture completablefuture = worldserver.getChunkProvider().a((Iterable) list, (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 }); @@ -63,7 +63,7 @@ index eef8d2b5a..cc98b745b 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 520235d1b..7953d7f99 100644 +index 907681cdf..5aea44cd8 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -91,7 +91,7 @@ index acd54067e..c655d51ac 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 889f99d66..ff1ccbd64 100644 +index f118d382c..274e8626d 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/Configurable-Max-Chunk-Gens-per-Tick.patch b/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch index 9dc0853f1a..a0bcab7958 100644 --- a/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch +++ b/Spigot-Server-Patches/Configurable-Max-Chunk-Gens-per-Tick.patch @@ -33,7 +33,7 @@ index 29cb718fb..695bdf2e6 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 5497a458d..db43a8a9a 100644 +index b9d90c4fb..7d3f846a1 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 { @@ -42,18 +42,18 @@ index 5497a458d..db43a8a9a 100644 private boolean done; + boolean chunkExists; // Paper - public PlayerChunk(PlayerChunkMap playerchunkmap, int ix, int j) { + public PlayerChunk(PlayerChunkMap playerchunkmap, int i, int j) { this.playerChunkMap = playerchunkmap; @@ -0,0 +0,0 @@ public class PlayerChunk { - ChunkProviderServer chunkproviderserver = playerchunkmap.getWorld().getChunkProvider(); - chunkproviderserver.a(ix, j); - this.chunk = chunkproviderserver.getChunkAt(ix, j, true, false); -+ this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.hasQueuedChunkLoad(playerChunkMap.getWorld(), ix, j); // Paper + + chunkproviderserver.a(i, j); + this.chunk = chunkproviderserver.getChunkAt(i, j, true, false); ++ this.chunkExists = this.chunk != null || org.bukkit.craftbukkit.chunkio.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 b1ece38b2..27343174d 100644 +index f481e5a4f..679488a3c 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-Player-Collision.patch b/Spigot-Server-Patches/Configurable-Player-Collision.patch index 1d6cabf047..16956adefe 100644 --- a/Spigot-Server-Patches/Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/Configurable-Player-Collision.patch @@ -19,7 +19,7 @@ index 0778f53e2..30fcf4a72 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cc98b745b..d146cc79c 100644 +index c21ebd466..862c5d66b 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 cc98b745b..d146cc79c 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 f7a9b9d88..7befd80cf 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 playersByName = new org.spigotmc.CaseInsensitiveMap(); + private final Map playersByName = new java.util.HashMap<>(); + @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule public PlayerList(MinecraftServer minecraftserver) { diff --git a/Spigot-Server-Patches/Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/Configurable-RCON-IP-address.patch index cef367ea0d..562cae6821 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 32244b55a2..4bfd41af18 100644 +index 81a6a8fc9..7b82c4dea 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 { diff --git a/Spigot-Server-Patches/Configurable-Villages-loading-chunks-for-door-checks.patch b/Spigot-Server-Patches/Configurable-Villages-loading-chunks-for-door-checks.patch index f8629bb244..10d3104313 100644 --- a/Spigot-Server-Patches/Configurable-Villages-loading-chunks-for-door-checks.patch +++ b/Spigot-Server-Patches/Configurable-Villages-loading-chunks-for-door-checks.patch @@ -23,18 +23,18 @@ index 9aba755a4..2033ace4f 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java -index d14a9e3a3..0be1bf0d9 100644 +index 7a9fb9753..e40cd4186 100644 --- a/src/main/java/net/minecraft/server/PersistentVillage.java +++ b/src/main/java/net/minecraft/server/PersistentVillage.java @@ -0,0 +0,0 @@ public class PersistentVillage extends PersistentBase { - for(int j = -4; j < 4; ++j) { - for(int k = -16; k < 16; ++k) { - blockposition$mutableblockposition.g(blockposition).d(i, j, k); -- IBlockData iblockdata = this.world.getType(blockposition$mutableblockposition); -+ IBlockData iblockdata = this.world.paperConfig.villagesLoadChunks ? this.world.getType(blockposition$mutableblockposition) : this.world.getTypeIfLoaded(blockposition$mutableblockposition); // Paper + for (int j = -4; j < 4; ++j) { + for (int k = -16; k < 16; ++k) { + blockposition_mutableblockposition.g(blockposition).d(i, j, k); +- IBlockData iblockdata = this.world.getType(blockposition_mutableblockposition); ++ IBlockData iblockdata = this.world.paperConfig.villagesLoadChunks ? this.world.getType(blockposition_mutableblockposition) : this.world.getTypeIfLoaded(blockposition_mutableblockposition); // Paper + if (this.a(iblockdata)) { - VillageDoor villagedoor = this.c(blockposition$mutableblockposition); - if (villagedoor == null) { + VillageDoor villagedoor = this.c(blockposition_mutableblockposition); @@ -0,0 +0,0 @@ public class PersistentVillage extends PersistentBase { } @@ -45,7 +45,7 @@ index d14a9e3a3..0be1bf0d9 100644 public void a(NBTTagCompound nbttagcompound) { diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index a8ca29d37..02d8d9749 100644 +index c99d4debc..c63f70b1f 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -99,7 +99,7 @@ index a8ca29d37..02d8d9749 100644 return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false; diff --git a/src/main/java/net/minecraft/server/VillageDoor.java b/src/main/java/net/minecraft/server/VillageDoor.java -index 62771547f..74ac3c1ba 100644 +index 33ad5faa3..1edffc462 100644 --- a/src/main/java/net/minecraft/server/VillageDoor.java +++ b/src/main/java/net/minecraft/server/VillageDoor.java @@ -0,0 +0,0 @@ public class VillageDoor { diff --git a/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch index 2163e1d6d9..f6e6d3321e 100644 --- a/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch @@ -21,7 +21,7 @@ index e8b03795f..5663a6517 100644 private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 25049a351..f923272a4 100644 +index e732d55f9..2c594b437 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -0,0 +0,0 @@ public class HandshakeListener implements PacketHandshakingInListener { diff --git a/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch index e1f3ed4aa8..3424f3b888 100644 --- a/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable container update tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 40766d81c7..71af3fcfed 100644 +index 40766d81c..71af3fcfe 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 40766d81c7..71af3fcfed 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index cdf89cfed3..1f98be261a 100644 +index 301119d3e..98a8ce962 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/Configurable-end-credits.patch b/Spigot-Server-Patches/Configurable-end-credits.patch index 9754a25377..6d66a0474a 100644 --- a/Spigot-Server-Patches/Configurable-end-credits.patch +++ b/Spigot-Server-Patches/Configurable-end-credits.patch @@ -20,7 +20,7 @@ index 8f6f0288b..5aee23dce 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d0d93b1eb..2804bfc0a 100644 +index 5e60bdb40..301119d3e 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/Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/Configurable-flying-kick-messages.patch index 12737b4a0f..a9ea433260 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 4c0a9f18c..c278ac98d 100644 +index f5bd2245a..51b0dd972 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 4c0a9f18c..c278ac98d 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 598b747ec..552f1355c 100644 +index c31f84a84..f2686f7cb 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 ae985caf5a..105b385ed7 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 1c1ef2dc2..4c0a9f18c 100644 +index 2ae623e7d..f5bd2245a 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 1c1ef2dc2..4c0a9f18c 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1c881e7a7..a1a6703f6 100644 +index 5715d7ba8..c31f84a84 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-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/Configurable-spawn-chances-for-skeleton-horses.patch index ed16848a90..b9f1c802d1 100644 --- a/Spigot-Server-Patches/Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 795545245a..0faef7cf28 100644 +index 795545245..0faef7cf2 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 { @@ -22,7 +22,7 @@ index 795545245a..0faef7cf28 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2341ce3f93..a7cc053dc8 100644 +index 7bece8558..4a8cc0ff1 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/Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch index d265963231..ca346b7f6c 100644 --- a/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch @@ -22,7 +22,7 @@ index 2220a18d9..94c544714 100644 SAFE_REGEN, DELETE, NOTHING, WARN } diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java -index 80a49900e..f0d5316b6 100644 +index e67238582..b53a88c33 100644 --- a/src/main/java/net/minecraft/server/BlockFluids.java +++ b/src/main/java/net/minecraft/server/BlockFluids.java @@ -0,0 +0,0 @@ public class BlockFluids extends Block implements IFluidSource { diff --git a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch index 8ed05981d5..360765aa9c 100644 --- a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch @@ -20,7 +20,7 @@ index 56226bc86..6bb54fcbd 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 507641fc6..2bab2ab92 100644 +index cae5d323e..260478166 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/Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch index 2c14c6e3ea..258c1bbafd 100644 --- a/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch @@ -20,7 +20,7 @@ index 1ed58f4bb..39d565db1 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cc6ae6634..99716419e 100644 +index ca5212f20..f57c5b6a4 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 @@ -63,7 +63,7 @@ index cc6ae6634..99716419e 100644 this.die(); } diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index a2f334968..e741c7f83 100644 +index 9000d2d7b..a8a64d054 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -0,0 +0,0 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT 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 b708b7010d..bebe67a7c6 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 @@ -43,7 +43,7 @@ index 42d951554..d8f258105 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index f6bfd6ece..7380c4386 100644 +index 0421f8f95..ddccdc939 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 { @@ -75,7 +75,7 @@ index 8b3738c8f..2021c0d02 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1d08ec37f..516a583a8 100644 +index fd68f06fe..ff6f7596c 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 { @@ -99,13 +99,13 @@ index 1d08ec37f..516a583a8 100644 this.chunkScheduler.a(booleansupplier); } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 1d672eaa1..5497a458d 100644 +index e47aae2f8..b9d90c4fb 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 { - ChunkProviderServer chunkproviderserver = playerchunkmap.getWorld().getChunkProvider(); - chunkproviderserver.a(ix, j); - this.chunk = chunkproviderserver.getChunkAt(ix, j, true, false); + + chunkproviderserver.a(i, j); + this.chunk = chunkproviderserver.getChunkAt(i, j, true, false); + markChunkUsed(); // Paper - delay chunk unloads } @@ -153,7 +153,7 @@ index 1d672eaa1..5497a458d 100644 } } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 3d17ad646..c3ac66d35 100644 +index 206457650..ab4f3b722 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 { @@ -172,7 +172,7 @@ index 3d17ad646..c3ac66d35 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c484493b0..9a0e5342d 100644 +index b51415e9b..1ffa3f0aa 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -191,7 +191,7 @@ index c484493b0..9a0e5342d 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 ff1ccbd64..3e71cdcdc 100644 +index 274e8626d..cecdc5388 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/Detect-and-repair-corrupt-Region-Files.patch b/Spigot-Server-Patches/Detect-and-repair-corrupt-Region-Files.patch index e18fc6424e..26be830c1b 100644 --- a/Spigot-Server-Patches/Detect-and-repair-corrupt-Region-Files.patch +++ b/Spigot-Server-Patches/Detect-and-repair-corrupt-Region-Files.patch @@ -11,12 +11,12 @@ I don't know why mojang only checks for 4096, when anything less than 8192 is a But to be safe, it will attempt to back up the file. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 5d2853b9c..6a2edfd1e 100644 +index 407ac75aa..d3e6d755e 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; - public class RegionFile { + private static final byte[] a = new byte[4096]; - private final File b; - private RandomAccessFile c; @@ -32,11 +32,11 @@ index 5d2853b9c..6a2edfd1e 100644 @@ -0,0 +0,0 @@ public class RegionFile { } - this.c = new RandomAccessFile(file1, "rw"); + this.c = new RandomAccessFile(file, "rw"); - if (this.c.length() < 4096L) { + if (this.c.length() < 8192L) { // Paper - headers should be 8192 - this.c.write(a); - this.c.write(a); + this.c.write(RegionFile.a); + this.c.write(RegionFile.a); this.g += 8192; @@ -0,0 +0,0 @@ public class RegionFile { for(int j1 = 0; j1 < 1024; ++j1) { @@ -44,17 +44,17 @@ index 5d2853b9c..6a2edfd1e 100644 this.d[j1] = k; - if (k != 0 && (k >> 8) + (k & 255) <= this.f.size()) { + if (k > 0 && (k >> 8) > 1 && (k >> 8) + (k & 255) <= this.f.size()) { // Paper >= 1 as 0/1 are the headers, and negative isnt valid - for(int l = 0; l < (k & 255); ++l) { + for (int l = 0; l < (k & 255); ++l) { this.f.set((k >> 8) + l, false); } - } + } else if (k != 0) deleteChunk(j1); // Paper } - for(int k1 = 0; k1 < 1024; ++k1) { - int l1 = headerAsInts.get(); // Paper -- this.e[k1] = l1; -+ if (offsets[k1] != 0) this.timestamps[k1] = l1; // Paper - don't set timestamp if it got 0'd above due to corruption + for (j = 0; j < 1024; ++j) { + int k = headerAsInts.get(); // Paper +- this.e[j] = k; ++ if (offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption } } catch (IOException ioexception) { ioexception.printStackTrace(); @@ -112,6 +112,6 @@ index 5d2853b9c..6a2edfd1e 100644 + // Paper end + class ChunkBuffer extends ByteArrayOutputStream { + private final int b; - private final int c; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch index 7a6ac83fb5..57820920a6 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 4f3f88ff6..f8facddb4 100644 +index 2ff2549d0..4a50aab51 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 5bfc764b73..61f46256f9 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 50837d767..898068a81 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 99716419e..caeb5eae0 100644 +index f57c5b6a4..dfb7d544f 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 99716419e..caeb5eae0 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index da105b41c..6f8ac61d8 100644 +index 25982848a..8b8805017 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 606a3e00ed..8080123244 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 7a765cb7b..a8675b8c6 100644 +index 48d70624c..b17069e41 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 { @@ -14,8 +14,8 @@ index 7a765cb7b..a8675b8c6 100644 timings.worldSaveChunks.stopTiming(); // Paper // CraftBukkit - ArrayList -> Collection + /* //Paper start - disable vanilla chunk GC - java.util.Collection arraylist = chunkproviderserver.a(); - Iterator iterator = arraylist.iterator(); + java.util.Collection list = chunkproviderserver.a(); + Iterator iterator = list.iterator(); @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) { diff --git a/Spigot-Server-Patches/Disable-ice-and-snow.patch b/Spigot-Server-Patches/Disable-ice-and-snow.patch index e44e9ac1a3..49ab1d7bfd 100644 --- a/Spigot-Server-Patches/Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/Disable-ice-and-snow.patch @@ -19,7 +19,7 @@ index 13253f6e9..cde9c11f4 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 73e9ff1b3..2558a20f6 100644 +index 54c1b484a..7bece8558 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-spigot-tick-limiters.patch b/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch index d34971e03d..5232788f27 100644 --- a/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 00880d54f..214adec9b 100644 +index ac602abc0..ac23ae323 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Disable-thunder.patch b/Spigot-Server-Patches/Disable-thunder.patch index 903230c6ed..52207f1011 100644 --- a/Spigot-Server-Patches/Disable-thunder.patch +++ b/Spigot-Server-Patches/Disable-thunder.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable thunder diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4679246662..13253f6e9c 100644 +index 467924666..13253f6e9 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 4679246662..13253f6e9c 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e4d03b6779..f39ce330f6 100644 +index 60939cc33..54c1b484a 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/Do-not-load-chunks-for-Pathfinding.patch b/Spigot-Server-Patches/Do-not-load-chunks-for-Pathfinding.patch index 12402aad11..78b3472af8 100644 --- a/Spigot-Server-Patches/Do-not-load-chunks-for-Pathfinding.patch +++ b/Spigot-Server-Patches/Do-not-load-chunks-for-Pathfinding.patch @@ -5,20 +5,20 @@ 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 546c79cd8..25caf7ef9 100644 +index 49533ac33..eef3ab73f 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 { - for(int l = this.a; l <= j; ++l) { - for(int i1 = this.b; i1 <= k; ++i1) { + for (l = this.a; l <= j; ++l) { + for (i1 = this.b; i1 <= k; ++i1) { - this.c[l - this.a][i1 - this.b] = world.getChunkAt(l, i1); + this.c[l - this.a][i1 - this.b] = world.getChunkIfLoaded(l, i1); // Paper } } diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 53f1c25d2..26156d6cf 100644 +index 604049b08..716d00afb 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 { @@ -30,7 +30,9 @@ index 53f1c25d2..26156d6cf 100644 + private void setWorld() { if (getPathfinder() != null && getPathfinder().getPathfinder() != null) getPathfinder().getPathfinder().world = getEntity().world; } // Paper public NavigationAbstract(EntityInsentient entityinsentient, World world) { - this.a = entityinsentient; + this.g = Vec3D.a; + this.h = Vec3D.a; +@@ -0,0 +0,0 @@ public abstract class NavigationAbstract { this.b = world; this.p = entityinsentient.getAttributeInstance(GenericAttributes.FOLLOW_RANGE); this.r = this.a(); @@ -47,7 +49,7 @@ index 53f1c25d2..26156d6cf 100644 if (this.m) { this.l(); diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java -index a12fdceac..1881dea66 100644 +index 3085338f0..89d51d471 100644 --- a/src/main/java/net/minecraft/server/Pathfinder.java +++ b/src/main/java/net/minecraft/server/Pathfinder.java @@ -0,0 +0,0 @@ public class Pathfinder { @@ -60,15 +62,15 @@ index a12fdceac..1881dea66 100644 public Pathfinder(PathfinderAbstract pathfinderabstract) { this.d = pathfinderabstract; diff --git a/src/main/java/net/minecraft/server/PathfinderAbstract.java b/src/main/java/net/minecraft/server/PathfinderAbstract.java -index ba7fe359f..671628014 100644 +index 36d7e1d96..d722c8513 100644 --- a/src/main/java/net/minecraft/server/PathfinderAbstract.java +++ b/src/main/java/net/minecraft/server/PathfinderAbstract.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - public abstract class PathfinderAbstract { +@@ -0,0 +0,0 @@ public abstract class PathfinderAbstract { + protected IBlockAccess a; protected EntityInsentient b; + public World world; // Paper - protected final IntHashMap c = new IntHashMap(); + protected final IntHashMap c = new IntHashMap<>(); protected int d; protected int e; @@ -0,0 +0,0 @@ public abstract class PathfinderAbstract { @@ -80,44 +82,27 @@ index ba7fe359f..671628014 100644 this.c.c(); this.d = MathHelper.d(entityinsentient.width + 1.0F); diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java -index 2e82c7c48..34b29652b 100644 +index d4eb7f862..3b5ace88d 100644 --- a/src/main/java/net/minecraft/server/PathfinderNormal.java +++ b/src/main/java/net/minecraft/server/PathfinderNormal.java @@ -0,0 +0,0 @@ public class PathfinderNormal extends PathfinderAbstract { - BlockPosition blockposition2 = new BlockPosition(this.b); - PathType pathtype1 = this.a(this.b, blockposition2.getX(), i, blockposition2.getZ()); - if (this.b.a(pathtype1) < 0.0F) { -- HashSet hashset = Sets.newHashSet(); -+ HashSet hashset = Sets.newHashSet(); // Paper - decompile fix - hashset.add(new BlockPosition(this.b.getBoundingBox().minX, (double)i, this.b.getBoundingBox().minZ)); - hashset.add(new BlockPosition(this.b.getBoundingBox().minX, (double)i, this.b.getBoundingBox().maxZ)); - hashset.add(new BlockPosition(this.b.getBoundingBox().maxX, (double)i, this.b.getBoundingBox().minZ)); -@@ -0,0 +0,0 @@ public class PathfinderNormal extends PathfinderAbstract { - } + PathType pathtype = this.b(iblockaccess, i, j, k); - public PathType a(IBlockAccess iblockaccess, int i, int jx, int k, EntityInsentient entityinsentient, int l, int i1, int j1, boolean flag, boolean flag1) { -- EnumSet enumset = EnumSet.noneOf(PathType.class); -+ EnumSet enumset = EnumSet.noneOf(PathType.class); // Paper - decompile fix - PathType pathtype = PathType.BLOCKED; - double d0 = (double)entityinsentient.width / 2.0D; - BlockPosition blockposition = new BlockPosition(entityinsentient); -@@ -0,0 +0,0 @@ public class PathfinderNormal extends PathfinderAbstract { - public PathType a(IBlockAccess iblockaccess, int i, int jx, int k) { - PathType pathtype = this.b(iblockaccess, i, jx, k); - if (pathtype == PathType.OPEN && jx >= 1) { -- Block block = iblockaccess.getType(new BlockPosition(i, jx - 1, k)).getBlock(); -+ Block block = world.getBlockIfLoaded(new BlockPosition(i, jx - 1, k)); // Paper + if (pathtype == PathType.OPEN && j >= 1) { +- Block block = iblockaccess.getType(new BlockPosition(i, j - 1, k)).getBlock(); ++ Block block = world.getBlockIfLoaded(new BlockPosition(i, j - 1, k)); // Paper + if (block == null) return PathType.BLOCKED; // Paper - PathType pathtype1 = this.b(iblockaccess, i, jx - 1, k); + PathType pathtype1 = this.b(iblockaccess, i, j - 1, k); + pathtype = pathtype1 != PathType.WALKABLE && pathtype1 != PathType.OPEN && pathtype1 != PathType.WATER && pathtype1 != PathType.LAVA ? PathType.WALKABLE : PathType.OPEN; - if (pathtype1 == PathType.DAMAGE_FIRE || block == Blocks.MAGMA_BLOCK) { @@ -0,0 +0,0 @@ public class PathfinderNormal extends PathfinderAbstract { - for(int l = -1; l <= 1; ++l) { - for(int i1 = -1; i1 <= 1; ++i1) { + for (int l = -1; l <= 1; ++l) { + for (int i1 = -1; i1 <= 1; ++i1) { if (l != 0 || i1 != 0) { -- Block block = iblockaccess.getType(blockposition$b.c(l + i, jx, i1 + k)).getBlock(); +- Block block = iblockaccess.getType(blockposition_b.c(l + i, j, i1 + k)).getBlock(); ++ Block block = world.getBlockIfLoaded(blockposition_b.c(l + i, j, i1 + k)); // Paper + - if (block == Blocks.CACTUS) { -+ Block block = world.getBlockIfLoaded(blockposition$b.c(l + i, jx, i1 + k)); // Paper + if (block == null) pathtype = PathType.BLOCKED; // Paper + else if (block == Blocks.CACTUS) { // Paper pathtype = PathType.DANGER_CACTUS; @@ -125,12 +110,12 @@ index 2e82c7c48..34b29652b 100644 pathtype = PathType.DANGER_FIRE; @@ -0,0 +0,0 @@ public class PathfinderNormal extends PathfinderAbstract { - protected PathType b(IBlockAccess iblockaccess, int i, int jx, int k) { - BlockPosition blockposition = new BlockPosition(i, jx, k); + protected PathType b(IBlockAccess iblockaccess, int i, int j, int k) { + BlockPosition blockposition = new BlockPosition(i, j, k); - IBlockData iblockdata = iblockaccess.getType(blockposition); + IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper + if (iblockdata == null) return PathType.BLOCKED; // Paper Block block = iblockdata.getBlock(); Material material = iblockdata.getMaterial(); - if (iblockdata.isAir()) { + -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch b/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch index eb8c5c40d3..f3bf64c093 100644 --- a/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch +++ b/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch @@ -7,7 +7,7 @@ Should only happen for blocks on the edge that uses neighbors light level (certain blocks). In that case, there will be 3-4 other neighbors to get a light level from. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 207f53a9c3..b8fcfb6092 100644 +index 1450a4c6e..907681cdf 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch index 59e02b01c7..ba09cc63a1 100644 --- a/Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch +++ b/Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 96db9121b..44fabe240 100644 +index f78c6e991..7ae374085 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/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index 5714cc5dd8..342e1b6db8 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 3c07995a1..04cd6350c 100644 +index 40704664b..e1944774c 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 1690a78de0..7841005f0d 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 a5edc5bc2..12aaab90a 100644 +index b9c76325d..ab79317a2 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-double-add-golems-to-world.patch b/Spigot-Server-Patches/Don-t-double-add-golems-to-world.patch index f60e3351fe..8e04be14c4 100644 --- a/Spigot-Server-Patches/Don-t-double-add-golems-to-world.patch +++ b/Spigot-Server-Patches/Don-t-double-add-golems-to-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't double add golems to world spawnCreature adds to world now diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index 02d8d9749..482b97d55 100644 +index c63f70b1f..057a3b475 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-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch index 27dd370820..76d618de1f 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 c17e41f128..a41dfb6e50 100644 +index 0004c134a..40704664b 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 c17e41f128..a41dfb6e50 100644 public DimensionManager 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 b52aaa57e3..62e8f27aa7 100644 +index aa8a14b39..16aa2b5f2 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 a0635a5a35..f59b34ea9b 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,11 +13,11 @@ 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 27e6d2b5f2..b3882930ea 100644 +index e94786138..c61721bc3 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 - return (ITileInventory)object; + return (ITileInventory) object; } else { BlockPosition blockposition1 = blockposition.shift(k(iblockdata)); - IBlockData iblockdata1 = world.getType(blockposition1); @@ -27,7 +27,7 @@ index 27e6d2b5f2..b3882930ea 100644 + return null; + } + // Paper end + if (iblockdata1.getBlock() == this) { - BlockPropertyChestType blockpropertychesttype1 = (BlockPropertyChestType)iblockdata1.get(b); - if (blockpropertychesttype1 != BlockPropertyChestType.SINGLE && blockpropertychesttype != blockpropertychesttype1 && iblockdata1.get(FACING) == iblockdata.get(FACING)) { + BlockPropertyChestType blockpropertychesttype1 = (BlockPropertyChestType) iblockdata1.get(BlockChest.b); -- \ No newline at end of file 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 8f99825753..a46c1fb8a9 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 f8b7d695c6..a47a51a412 100644 +index 65d230d45..9bf2521be 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 1cb491be4b..bee123598d 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 a28aa016c..d92b6a6ea 100644 +index d670b6ba4..8317ecea8 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-recheck-type-after-setting-a-block.patch b/Spigot-Server-Patches/Don-t-recheck-type-after-setting-a-block.patch index 9e334dc3f2..50b47b96af 100644 --- a/Spigot-Server-Patches/Don-t-recheck-type-after-setting-a-block.patch +++ b/Spigot-Server-Patches/Don-t-recheck-type-after-setting-a-block.patch @@ -16,7 +16,7 @@ be having data corruption issues anyways. This provides a small boost to all setType calls. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9695af028..ccdc171d4 100644 +index 9ac594dcb..d9eb3e51b 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/Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/Don-t-save-Proto-Chunks.patch index 0cb40d2634..b55cd02732 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 34ddf655e..3b36a32c6 100644 +index 48230251d..4d619eb4c 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,11 +20,11 @@ index 34ddf655e..3b36a32c6 100644 world.checkSession(); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 772382144..9deab61fc 100644 +index 70a95c263..56958a5ce 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.a scheduler_a) { ProtoChunk protochunk = (ProtoChunk) scheduler_a.a(); - return !protochunk.ab_() && !protochunk.h(); 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 768f21bf03..dd33bb9281 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 1d32b93c8..c4d12c315 100644 +index 30fcf4a72..e10055b7d 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,15 +19,15 @@ index 1d32b93c8..c4d12c315 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java -index f2e8eface..895ea0eb4 100644 +index 1a9391a38..3a9dfb979 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 { - NBTTagList nbttaglist = new NBTTagList(); - for(ScoreboardTeam scoreboardteam : this.b.getTeams()) { + while (iterator.hasNext()) { + ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next(); + if (!com.destroystokyo.paper.PaperConfig.saveEmptyScoreboardTeams && scoreboardteam.getPlayerNameSet().isEmpty()) continue; // Paper NBTTagCompound nbttagcompound = new NBTTagCompound(); + nbttagcompound.setString("Name", scoreboardteam.getName()); - nbttagcompound.setString("DisplayName", IChatBaseComponent.ChatSerializer.a(scoreboardteam.getDisplayName())); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch b/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch index 7c3574036b..1e6d15108b 100644 --- a/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch +++ b/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't spam reload spawn chunks in nether/end diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 64482393d..1a1b40ac0 100644 +index a7342da04..11c77ade1 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -17,11 +17,11 @@ index 64482393d..1a1b40ac0 100644 BlockPosition blockposition = this.getSpawn(); int k = i * 16 + 8 - blockposition.getX(); diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java -index bd9c76ee8..ef5c7b1f6 100644 +index 5e87e537e..3911e4947 100644 --- a/src/main/java/net/minecraft/server/WorldProvider.java +++ b/src/main/java/net/minecraft/server/WorldProvider.java @@ -0,0 +0,0 @@ public abstract class WorldProvider { - } + public void l() {} public boolean a(int i, int j) { - return !this.b.isForceLoaded(i, j); diff --git a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch index 0ef1a76814..1d7f5b5aaa 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 e31c97fb72..7275c4d21a 100644 +index ab46ae8c3..f7a7ba412 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-update-snapshot-blockstates.patch b/Spigot-Server-Patches/Don-t-update-snapshot-blockstates.patch index 39a39ea6a7..14ee68cfc0 100644 --- a/Spigot-Server-Patches/Don-t-update-snapshot-blockstates.patch +++ b/Spigot-Server-Patches/Don-t-update-snapshot-blockstates.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't update snapshot blockstates diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index d4d9c5fc5..f5c6dbd85 100644 +index 082a1b6e2..2b78fff9f 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 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 dc96b487d8..c47eb855d8 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 3f734327c0..1ed58f4bba 100644 +index 3f734327c..1ed58f4bb 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 3f734327c0..1ed58f4bba 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 320146783b..06b7182a45 100644 +index f36ab639f..4baf5750e 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 @@ -36,7 +36,7 @@ index 320146783b..06b7182a45 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 01045058ce..25960cff2a 100644 +index 4e4c8cc50..a6eae266d 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 01045058ce..25960cff2a 100644 blockposition = new BlockPosition(this); boolean flag = this.block.getBlock() instanceof BlockConcretePowder; diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 7edc028527..5ceb3f2068 100644 +index 3977498c4..5dc52b6b8 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 b8ea6a26b0..5b3c6a17f0 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -81,7 +81,7 @@ index 92acfa6fb..05509e4fd 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6c9d7df20..55cb7b88e 100644 +index 1c1f39524..edae53b82 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -112,8 +112,8 @@ index 6c9d7df20..55cb7b88e 100644 int k = MathHelper.floor(entity.locY / 16.0D); @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { + for (int j = 0; j < i; ++j) { - // CraftBukkit start List entityslice = aentityslice[j]; // Spigot + // Paper start + DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode; @@ -160,10 +160,10 @@ index 6c9d7df20..55cb7b88e 100644 + } + // Paper end + // CraftBukkit start List toRemove = new LinkedList<>(); - this.world.a(entityslice.stream().filter((entity) -> { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1581edc4a..07cd5aa28 100644 +index 8bab03bd0..3e6a36af6 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 @@ -175,7 +175,7 @@ index 1581edc4a..07cd5aa28 100644 this.uniqueID = uuid; this.au = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 67ef109a5..66d2026d0 100644 +index 601fe77c5..4df291f0d 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -188,7 +188,7 @@ index 67ef109a5..66d2026d0 100644 public final List tileEntityListTick = Lists.newArrayList(); private final List c = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f37e85eb0..af9cdd9dc 100644 +index be475288e..e7dbd730c 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/EnderDragon-Events.patch b/Spigot-Server-Patches/EnderDragon-Events.patch index 881b4a5cff..b5c9b71e88 100644 --- a/Spigot-Server-Patches/EnderDragon-Events.patch +++ b/Spigot-Server-Patches/EnderDragon-Events.patch @@ -5,7 +5,7 @@ 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 45f96078c..fed3e9daf 100644 +index 1906bcfc9..50d291139 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 @@ -27,21 +27,21 @@ index 45f96078c..fed3e9daf 100644 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 8dd378826..ddbd90032 100644 +index e74258676..141ba1e5e 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 { - this.a.world.a((EntityHuman)null, 1017, new BlockPosition(this.a), 0); 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()) { + 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 e746a6a0d..366ebb8d2 100644 +index 7df8fd4d7..c0d66a023 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 { diff --git a/Spigot-Server-Patches/Enderman.teleportRandomly.patch b/Spigot-Server-Patches/Enderman.teleportRandomly.patch index cd94489368..e69c694083 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 5d5c21bba..d4f7805bb 100644 +index 8949529e6..233568cc1 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/EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch index 367c96a935..118eef90e0 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 d4f7805bb..d5c55d50e 100644 +index 233568cc1..139a70ca3 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 8945077931..d2c7991a27 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 db618ae68..5d5c21bba 100644 +index d5d1be8b6..8949529e6 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 f3069224ae..87b5c967eb 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 f1a162420..5d0e81731 100644 +index 864151444..0f3bf13ef 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 ac7e1a1c57..040c8364e8 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 1259ec9d6..b10ac733f 100644 +index 2c3ed3723..0bc27d914 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-commands-are-not-ran-async.patch b/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch index db82499b15..0bf866be86 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 67c993795..a5bd908fd 100644 +index 723fce204..f543532f8 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 67c993795..a5bd908fd 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 4858265a8..4c177a674 100644 +index 212e3cd4a..6700ce84c 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 { @@ -106,15 +106,15 @@ 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 f4e088c13..944151d14 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 - public static void restart(final File script) + private static void restart(final String restartScript) { AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us + org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper try { - if ( script.isFile() ) + String[] split = restartScript.split( " " ); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch index f285d527ef..f4e3adfca8 100644 --- a/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e614ac33a..608f72f0f 100644 +index 05d988ed6..1450a4c6e 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Entity-Origin-API.patch b/Spigot-Server-Patches/Entity-Origin-API.patch index 4e230857d7..d065237af0 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 7c2a8c5c8..cc6ae6634 100644 +index 4baf5750e..ca5212f20 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 @@ -51,7 +51,7 @@ index 7c2a8c5c8..cc6ae6634 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 dc173e14f..596ac18a7 100644 +index a6eae266d..489dd861d 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 { @@ -89,7 +89,7 @@ index 5dc52b6b8..2c28633c4 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index 1b72df8cd..ae8be435c 100644 +index 27debcfca..22027321b 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 NBTList { @@ -99,9 +99,9 @@ index 1b72df8cd..ae8be435c 100644 + public final double getDoubleAt(int i) { return this.k(i); } // Paper - OBFHELPER public double k(int i) { if (i >= 0 && i < this.list.size()) { - NBTBase nbtbase = (NBTBase)this.list.get(i); + 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 73c47c517..ab74b1add 100644 +index dab1be9b6..59b1f9043 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Entity-Tracking-Improvements.patch b/Spigot-Server-Patches/Entity-Tracking-Improvements.patch index e22bcb7865..6c52308648 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 1474209a1e..5e5c241669 100644 +index b6356966a..583cee415 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 @@ -19,7 +19,7 @@ index 1474209a1e..5e5c241669 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 69d3b4f8e4..0b00ed3d00 100644 +index 638b54c1e..28a0ea034 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 { diff --git a/Spigot-Server-Patches/Entity-add-to-world-fixes.patch b/Spigot-Server-Patches/Entity-add-to-world-fixes.patch index 515c24cce4..c00cf8e604 100644 --- a/Spigot-Server-Patches/Entity-add-to-world-fixes.patch +++ b/Spigot-Server-Patches/Entity-add-to-world-fixes.patch @@ -14,7 +14,7 @@ Fix this by differing entity add to world for all entities at the same time the original entity is dead, overwrite it as the logic does for unloaod queued entities. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 37bb6f40c..55104d00f 100644 +index ca236a315..edf4d9130 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; @@ -27,10 +27,9 @@ index 37bb6f40c..55104d00f 100644 import java.util.UUID; // Paper end @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { - } - } // Paper end -- + + // CraftBukkit start - List toRemove = new LinkedList<>(); - this.world.a(entityslice.stream().filter((entity) -> { - if (this.needsDecoration && !CraftEventFactory.doEntityAddEventCalling(this.world, entity, CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { // Only call for new chunks @@ -54,7 +53,7 @@ index 37bb6f40c..55104d00f 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5e61826f6..bd6f64e52 100644 +index 0d112016f..187506b57 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -80,7 +79,7 @@ index 5e61826f6..bd6f64e52 100644 this.b(entity); }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index af9cdd9dc..10630ac96 100644 +index e7dbd730c..bd17e4cec 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-fromMobSpawner.patch b/Spigot-Server-Patches/Entity-fromMobSpawner.patch index 8756924953..41b62b4c56 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 e26c9ee28..07a64966e 100644 +index b613d3d15..139207f33 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/EntityPathfindEvent.patch b/Spigot-Server-Patches/EntityPathfindEvent.patch index 5a3d17365c..a90da18ed2 100644 --- a/Spigot-Server-Patches/EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/EntityPathfindEvent.patch @@ -6,13 +6,13 @@ 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 0600fe23a..53f1c25d2 100644 +index 60b5068e3..604049b08 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public abstract class NavigationAbstract { + - protected EntityInsentient a; + protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER protected World b; @@ -24,14 +24,14 @@ index 0600fe23a..53f1c25d2 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 fx = this.j(); - this.b.methodProfiler.enter("pathfind"); + float f = this.j(); + @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { return this.c; } 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 fx = this.j(); - this.b.methodProfiler.enter("pathfind"); + float f = this.j(); + -- \ No newline at end of file diff --git a/Spigot-Server-Patches/EntityTransformedEvent.patch b/Spigot-Server-Patches/EntityTransformedEvent.patch index 7cdf423f28..4c9377f0ae 100644 --- a/Spigot-Server-Patches/EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/EntityTransformedEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EntityTransformedEvent diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java -index 175235a75..dab644930 100644 +index 141c17bf8..dde9f1e61 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java +++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java @@ -0,0 +0,0 @@ public class EntityMushroomCow extends EntityCow { @@ -17,7 +17,7 @@ index 175235a75..dab644930 100644 this.die(); // CraftBukkit - from above diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index a11e66262..e4a570e01 100644 +index 78acac4ca..f01e776fe 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 { @@ -29,7 +29,7 @@ index a11e66262..e4a570e01 100644 // CraftBukkit end this.die(); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index dc00725f9..823d4be7f 100644 +index 5bba50461..33b343c14 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 { @@ -49,7 +49,7 @@ index dc00725f9..823d4be7f 100644 this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java -index d2b2cc2fd..ab1b3ab5e 100644 +index c6198626a..86e5fbcda 100644 --- a/src/main/java/net/minecraft/server/EntityZombieVillager.java +++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java @@ -0,0 +0,0 @@ public class EntityZombieVillager extends EntityZombie { diff --git a/Spigot-Server-Patches/Expand-Explosions-API.patch b/Spigot-Server-Patches/Expand-Explosions-API.patch index 422a50484f..8832828723 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 b50785aa0..142ba2c0a 100644 +index a436ded60..35f8f93c6 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 15e4b59f90..387f64e4c4 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 @@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle. 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 5f386ff04..55e45dbb1 100644 +index 44b003325..ed833ffd6 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 { @@ -34,7 +34,7 @@ index 5f386ff04..55e45dbb1 100644 if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b4f908164..d3be0211f 100644 +index 36d27c2a3..d06496762 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/ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/ExperienceOrbMergeEvent.patch index a0679dd3d8..91612e8513 100644 --- a/Spigot-Server-Patches/ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/ExperienceOrbMergeEvent.patch @@ -8,7 +8,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 14df8e80b..9578e9d2e 100644 +index ea4262154..a7c0f8dd8 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/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 97fd71b929..ff6e1e0ede 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 8aa6ed8d8..b8684f6a2 100644 +index dbf1089ba..66643be2b 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 8aa6ed8d8..b8684f6a2 100644 } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 61b18ca8a..32fd5adc6 100644 +index b3fbc8249..79d8be8d4 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 @@ -120,7 +120,7 @@ index 3030dd9c3..404a222b4 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 45a326779..cccb19589 100644 +index 23f7d36b5..e1c685eed 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 { @@ -133,7 +133,7 @@ index 45a326779..cccb19589 100644 // CraftBukkit end if (itemstack1.getItem().a(TagsItem.FISHES)) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 162de836e..284e22bbd 100644 +index f58ebe3c2..f2e38b9f3 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 { @@ -160,7 +160,7 @@ index a5e1939e0..e73dba09a 100644 this.die(); diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index bd799d0c6..f80634d54 100644 +index ebe397b15..78acac4ca 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 bd799d0c6..f80634d54 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 4a128f707..b87096467 100644 +index bf061cf06..55f978768 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 4a128f707..b87096467 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index c8cfa3abe..aa7780eff 100644 +index 32b0e7965..5b8ddc76e 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 c8cfa3abe..aa7780eff 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java -index bbb4ee3ec..839cccbe3 100644 +index 5ac554d65..d70c4dda5 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 bbb4ee3ec..839cccbe3 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index bbe9c5e89..b4f908164 100644 +index 0f3bf13ef..36d27c2a3 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-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch index 07af05d593..06951fb1e9 100644 --- a/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 20a46e2af..6aa3a462f 100644 +index 9b8833fed..7d096efa2 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 { @@ -27,7 +27,7 @@ index 20a46e2af..6aa3a462f 100644 this.aH = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a0ea301d..8be0a47ba 100644 +index c4b00acfb..611833592 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/Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch index c54b4b19b6..908e6914cb 100644 --- a/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch @@ -61,7 +61,7 @@ index 000000000..5caca6439 + +} diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index b4917c91b..25049a351 100644 +index 93ca93b64..e732d55f9 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -0,0 +0,0 @@ public class HandshakeListener implements PacketHandshakingInListener { @@ -84,7 +84,7 @@ index b4917c91b..25049a351 100644 public void a(IChatBaseComponent ichatbasecomponent) {} diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 26da89724..4f3f88ff6 100644 +index e2fc41d6d..2ff2549d0 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> { @@ -111,7 +111,7 @@ index 7acdac55e..f1a3be69d 100644 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0df834fc1..8046a2a5f 100644 +index d6fa84a72..eb0330ee1 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/Fire-EntityCombustEvent-for-phantoms.patch b/Spigot-Server-Patches/Fire-EntityCombustEvent-for-phantoms.patch index e59e3eeba7..86ab867e02 100644 --- a/Spigot-Server-Patches/Fire-EntityCombustEvent-for-phantoms.patch +++ b/Spigot-Server-Patches/Fire-EntityCombustEvent-for-phantoms.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fire EntityCombustEvent for phantoms diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 7a48719c9..d7be396ee 100644 +index f576264a8..7db0d62df 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java @@ -0,0 +0,0 @@ public class EntityPhantom extends EntityFlying implements IMonster { diff --git a/Spigot-Server-Patches/Firework-API-s.patch b/Spigot-Server-Patches/Firework-API-s.patch index 557399c0eb..2ce9935be7 100644 --- a/Spigot-Server-Patches/Firework-API-s.patch +++ b/Spigot-Server-Patches/Firework-API-s.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java -index 1fa527fe4..3d9dd50d7 100644 +index 9b6d217df..9764c76fb 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -54,27 +54,27 @@ index 1fa527fe4..3d9dd50d7 100644 public boolean bk() { diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index 936faccbf..d971bbc76 100644 +index 68bd2af26..dbb422e9d 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 { BlockPosition blockposition = itemactioncontext.getClickPosition(); ItemStack itemstack = itemactioncontext.getItemStack(); - EntityFireworks entityfireworks = new EntityFireworks(world, (double)((float)blockposition.getX() + itemactioncontext.m()), (double)((float)blockposition.getY() + itemactioncontext.n()), (double)((float)blockposition.getZ() + itemactioncontext.o()), itemstack); + EntityFireworks entityfireworks = new EntityFireworks(world, (double) ((float) blockposition.getX() + itemactioncontext.m()), (double) ((float) blockposition.getY() + itemactioncontext.n()), (double) ((float) blockposition.getZ() + itemactioncontext.o()), itemstack); + entityfireworks.spawningEntity = itemactioncontext.b.getUniqueID(); // Paper + world.addEntity(entityfireworks); itemstack.subtract(1); - } @@ -0,0 +0,0 @@ public class ItemFireworks extends Item { - ItemStack itemstack = entityhuman.b(enumhand); + if (!world.isClientSide) { EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman); + entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper + world.addEntity(entityfireworks); if (!entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index db4e4b859..49280bd60 100644 +index 8c5d6c1d3..d4165f7e4 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 { diff --git a/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch index 924531bb1a..63aebe0cce 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 3ff82f71b..1c881e7a7 100644 +index 6c0d105db..5874098c9 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-Anvil-Level-sync-to-client.patch b/Spigot-Server-Patches/Fix-Anvil-Level-sync-to-client.patch index d4e4d8ab05..b56b9fe433 100644 --- a/Spigot-Server-Patches/Fix-Anvil-Level-sync-to-client.patch +++ b/Spigot-Server-Patches/Fix-Anvil-Level-sync-to-client.patch @@ -10,7 +10,7 @@ Was done incorrectly and is now causing level desyncs to client. Always send current level to the client, and instead make setWindowProperty set the level. diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java -index a5ac893c4..a7b04a967 100644 +index a6ac51614..1560dd382 100644 --- a/src/main/java/net/minecraft/server/ContainerAnvil.java +++ b/src/main/java/net/minecraft/server/ContainerAnvil.java @@ -0,0 +0,0 @@ public class ContainerAnvil extends Container { @@ -26,7 +26,7 @@ index a5ac893c4..a7b04a967 100644 this.lastLevelCost = this.levelCost; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 05070285b..0df834fc1 100644 +index 0575e31f6..d6fa84a72 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/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index 205ad4074f..f4c22febe8 100644 --- a/Spigot-Server-Patches/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 411cfedd25..b4274cf0ec 100644 +index 5aea44cd8..a7342da04 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch index e03cc4742f..db043884fd 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 3b39b5472..6093ae408 100644 +index c0785eea0..030461026 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 3b39b5472..6093ae408 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 6f672aa22..0d04b14cf 100644 +index 1ffa3f0aa..3d43f2937 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch b/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch index 295d2a9bbc..766851bbdc 100644 --- a/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch +++ b/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch @@ -7,16 +7,16 @@ If the dragon tries to find "ground" and hits a hole, or off edge, it will infinitely keep looking for non air and eventually crash. diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -index da89a69ed..45f96078c 100644 +index 1180e7bc1..1906bcfc9 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 - double d2 = this.a.bD.locY + (double)(this.a.bD.length / 2.0F); - BlockPosition.MutableBlockPosition blockposition$mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); + double d2 = this.a.bD.locY + (double) (this.a.bD.length / 2.0F); + BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); -- while(this.a.world.isEmpty(blockposition$mutableblockposition)) { -+ while(this.a.world.isEmpty(blockposition$mutableblockposition) && d2 > 0) { // Paper +- while (this.a.world.isEmpty(blockposition_mutableblockposition)) { ++ while (this.a.world.isEmpty(blockposition_mutableblockposition ) && d2 > 0) { // Paper --d2; - blockposition$mutableblockposition.c(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); + blockposition_mutableblockposition.c(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Fix-FileIOThread-concurrency-issues.patch b/Spigot-Server-Patches/Fix-FileIOThread-concurrency-issues.patch index a8d9f77f8e..3e14b31951 100644 --- a/Spigot-Server-Patches/Fix-FileIOThread-concurrency-issues.patch +++ b/Spigot-Server-Patches/Fix-FileIOThread-concurrency-issues.patch @@ -9,11 +9,11 @@ issues when this counter is updated from multiple threads, potentially causing these counters to desync due to the unsafe volatile update diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java -index 97917551a..1959bc066 100644 +index 3c688f546..570624600 100644 --- a/src/main/java/net/minecraft/server/FileIOThread.java +++ b/src/main/java/net/minecraft/server/FileIOThread.java -@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - public class FileIOThread implements Runnable { +@@ -0,0 +0,0 @@ public class FileIOThread implements Runnable { + private static final Logger a = LogManager.getLogger(); private static final FileIOThread b = new FileIOThread(); - private final List c = Collections.synchronizedList(Lists.newArrayList()); @@ -25,7 +25,7 @@ index 97917551a..1959bc066 100644 public void b() throws InterruptedException { this.f = true; -- while(this.d != this.e) { +- while (this.d != this.e) { + while(!this.getThreadedIOQueue().isEmpty()) { // Paper - check actual list size Thread.sleep(10L); } diff --git a/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch index 73073277ec..b562724eae 100644 --- a/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 65973edfc..cb62af425 100644 +index fdfa5a8a1..4f261554c 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Fix-MC-124320.patch b/Spigot-Server-Patches/Fix-MC-124320.patch index 5b5a95291c..f5c9cd0c34 100644 --- a/Spigot-Server-Patches/Fix-MC-124320.patch +++ b/Spigot-Server-Patches/Fix-MC-124320.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-124320 diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 1bf01000e..f8ef58dca 100644 +index 66643be2b..28efb4d4f 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 { @@ -17,7 +17,7 @@ index 1bf01000e..f8ef58dca 100644 IBlockData iblockdata1 = iblockdata; BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index d5c55d50e..f9d5a2499 100644 +index 139a70ca3..e4aba0e0a 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/Fix-MC-93764.patch b/Spigot-Server-Patches/Fix-MC-93764.patch index 97a841e6ff..12da0b9800 100644 --- a/Spigot-Server-Patches/Fix-MC-93764.patch +++ b/Spigot-Server-Patches/Fix-MC-93764.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Fix MC-93764 diff --git a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java -index 54ca83286..0c854170c 100644 +index 99191f09f..4d692b7e0 100644 --- a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java +++ b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java @@ -0,0 +0,0 @@ public class WorldProviderTheEnd extends WorldProvider { } - public float a(long var1, float var3) { + public float a(long i, float f) { - return 0.0F; + return 0.5F; // Paper - fix MC-93764 } diff --git a/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch index 694bad1a71..f1b1fc79f3 100644 --- a/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch @@ -9,23 +9,23 @@ Subject: [PATCH] Fix Old Sign Conversion This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 987d944dbd..5f6fb44ffa 100644 +index 83db94c4a..dd635292e 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 { - definedstructure$blockinfo1.c.setInt("x", blockposition1.getX()); - definedstructure$blockinfo1.c.setInt("y", blockposition1.getY()); - definedstructure$blockinfo1.c.setInt("z", blockposition1.getZ()); -+ tileentity2.isLoadingStructure = true; // Paper - tileentity2.load(definedstructure$blockinfo1.c); - tileentity2.a(definedstructureinfo.b()); - tileentity2.a(definedstructureinfo.c()); -+ tileentity2.isLoadingStructure = false; // Paper + definedstructure_blockinfo1.c.setInt("x", blockposition1.getX()); + definedstructure_blockinfo1.c.setInt("y", blockposition1.getY()); + definedstructure_blockinfo1.c.setInt("z", blockposition1.getZ()); ++ tileentity.isLoadingStructure = true; // Paper + tileentity.load(definedstructure_blockinfo1.c); + tileentity.a(definedstructureinfo.b()); + tileentity.a(definedstructureinfo.c()); ++ tileentity.isLoadingStructure = false; // Paper } } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index c5212417c6..b3c5766a27 100644 +index c5212417c..b3c5766a2 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.bukkit.inventory.InventoryHolder; // CraftBukkit @@ -37,7 +37,7 @@ index c5212417c6..b3c5766a27 100644 private final TileEntityTypes 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 00b6a3c16d..20dc3f272c 100644 +index 31a9d4572..458d1561d 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-Sending-Chunks-to-Client.patch b/Spigot-Server-Patches/Fix-Sending-Chunks-to-Client.patch index 5208ff165f..05e090b2f9 100644 --- a/Spigot-Server-Patches/Fix-Sending-Chunks-to-Client.patch +++ b/Spigot-Server-Patches/Fix-Sending-Chunks-to-Client.patch @@ -14,7 +14,7 @@ This fix always sends chunks to the client, and simply updates the client anytime post processing is triggered with the new chunk data. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2253092a9..811a63e04 100644 +index d9eb3e51b..e73149d4d 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 { @@ -41,7 +41,7 @@ index 2253092a9..811a63e04 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index e61538b3c..f5d971bbe 100644 +index e4cf8548d..ac5d15809 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 { diff --git a/Spigot-Server-Patches/Fix-SpongeAbsortEvent-handling.patch b/Spigot-Server-Patches/Fix-SpongeAbsortEvent-handling.patch index 3f614cd244..f6f5a06bdf 100644 --- a/Spigot-Server-Patches/Fix-SpongeAbsortEvent-handling.patch +++ b/Spigot-Server-Patches/Fix-SpongeAbsortEvent-handling.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling Only process drops when the block is actually going to be removed diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java -index ab1ee37a2..852d98a6b 100644 +index cbc8e8d13..cda6f2b73 100644 --- a/src/main/java/net/minecraft/server/BlockSponge.java +++ b/src/main/java/net/minecraft/server/BlockSponge.java @@ -0,0 +0,0 @@ public class BlockSponge extends Block { @@ -28,7 +28,7 @@ index ab1ee37a2..852d98a6b 100644 } + diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 2d855aae6..bc345a2c3 100644 +index 08a5acb0a..aa3547690 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 { diff --git a/Spigot-Server-Patches/Fix-block-break-desync.patch b/Spigot-Server-Patches/Fix-block-break-desync.patch index e7edfd4ebe..9027e4a156 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 553f76b81..03b986bfa 100644 +index dbdd08d17..46608118e 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-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/Fix-client-rendering-skulls-from-same-user.patch index c656b1899d..a2840977d9 100644 --- a/Spigot-Server-Patches/Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/Fix-client-rendering-skulls-from-same-user.patch @@ -12,7 +12,7 @@ This allows the client to render multiple skull textures from the same user, for when different skins were used when skull was made. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index a1ec3879b..36c8644e2 100644 +index 8f2b0742d..e0091358a 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 { @@ -62,19 +62,28 @@ index d05f1e02c..b95836d44 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index af382815f..22a262bb6 100644 +index f2159bc2d..18ef7232e 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet { - int j = blockposition.getY() >> 4; + if (this.f() || (i & 1 << j) != 0) { NBTTagCompound nbttagcompound = tileentity.aa_(); + if (tileentity instanceof TileEntitySkull) { TileEntitySkull.sanitizeTileEntityUUID(nbttagcompound); } // Paper + this.e.add(nbttagcompound); } +@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet { + BiomeBase[] abiomebase = chunk.getBiomeIndex(); + + for (l = 0; l < abiomebase.length; ++l) { +- packetdataserializer.writeInt(IRegistry.BIOME.a((Object) abiomebase[l])); ++ packetdataserializer.writeInt(IRegistry.BIOME.a(abiomebase[l])); // Paper - Decompile fix + } } + diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index e59f3c21d..05fca47f3 100644 +index 79c24cdc4..6511bfda8 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java @@ -0,0 +0,0 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa 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 74a3633980..7a0a2c8146 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 371513042..871dea68f 100644 +index 21570ceb7..dfd64d1f5 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-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch index ac4a9e471a..a71f78cf60 100644 --- a/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch +++ b/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch @@ -18,7 +18,7 @@ This change ensures the chunks are always loaded when entities are added to the world, or a valid entity moves between chunks. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4421be836..d084787f1 100644 +index 88f8145c4..55cd98ae2 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Fix-lag-from-explosions-processing-dead-entities.patch b/Spigot-Server-Patches/Fix-lag-from-explosions-processing-dead-entities.patch index 2150d13987..908971fe52 100644 --- a/Spigot-Server-Patches/Fix-lag-from-explosions-processing-dead-entities.patch +++ b/Spigot-Server-Patches/Fix-lag-from-explosions-processing-dead-entities.patch @@ -5,16 +5,16 @@ Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index d564aaf60..92e3a49e2 100644 +index 33809baf2..c4db6367e 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 { int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D); int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D); int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D); -- List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1)); +- List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1)); + // Paper start - Fix lag from explosions processing dead entities -+ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { ++ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { + @Override + public boolean apply(Entity entity) { + return IEntitySelector.canAITarget().test(entity) && !entity.dead; @@ -25,7 +25,7 @@ index d564aaf60..92e3a49e2 100644 for (int l1 = 0; l1 < list.size(); ++l1) { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 2e2fb85cf..7b7fd6b9b 100644 +index 8225a8258..bbcbb6232 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -0,0 +0,0 @@ public final class IEntitySelector { @@ -34,16 +34,6 @@ index 2e2fb85cf..7b7fd6b9b 100644 }; + public static Predicate canAITarget() { return e; } // Paper - OBFHELPER public static final Predicate e = (entity) -> { - return !(entity instanceof EntityHuman) || !((EntityHuman)entity).isSpectator() && !((EntityHuman)entity).u(); + return !(entity instanceof EntityHuman) || !((EntityHuman) entity).isSpectator() && !((EntityHuman) entity).u(); }; -@@ -0,0 +0,0 @@ public final class IEntitySelector { - } - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((Entity)object); -- } - } - } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch index d12daf4759..12f66e4b29 100644 --- a/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7dfb2bee49..2154c0516c 100644 +index 4f9c97a08..13d55343e 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/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index 9bce99e3af..563652f715 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 ffda9d793..4acb908ec 100644 +index b5f30b2b2..b12d9fbe8 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/GH-806-Respect-saving-disabled-before-unloading-all-.patch b/Spigot-Server-Patches/GH-806-Respect-saving-disabled-before-unloading-all-.patch index cf7a027ca1..363d523cdc 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 c3ac66d35..5935bae58 100644 +index ab4f3b722..e428d4485 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 a7c34f27c8..676b573900 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 92f8d0633..dbc9fbd66 100644 +index 27705106b..da722ec7e 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; @@ -201,7 +201,7 @@ index 2ef4ac64b..d1a546c8f 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 0764a6835..407adbdae 100644 +index 9b31e2d72..1c94fd908 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/Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/Handle-Large-Packets-disconnecting-client.patch index 203c8ead4c..ac363db29c 100644 --- a/Spigot-Server-Patches/Handle-Large-Packets-disconnecting-client.patch +++ b/Spigot-Server-Patches/Handle-Large-Packets-disconnecting-client.patch @@ -7,7 +7,7 @@ If a players inventory is too big to send in a single packet, split the inventory set into multiple packets instead. diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 120416b30..065bede4c 100644 +index c53697914..0b8796d0a 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> { @@ -27,12 +27,12 @@ index 120416b30..065bede4c 100644 NetworkManager.g.debug("Skipping packet due to errors", throwable.getCause()); } else { diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java -index 2e42c268b..0a9bfb07a 100644 +index 601d4d0fa..2d8e6a2f4 100644 --- a/src/main/java/net/minecraft/server/Packet.java +++ b/src/main/java/net/minecraft/server/Packet.java @@ -0,0 +0,0 @@ public interface Packet { - void a(T var1); + void a(T t0); + // Paper start + default boolean packetTooLarge(NetworkManager manager) { @@ -44,7 +44,7 @@ index 2e42c268b..0a9bfb07a 100644 return false; } diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index 3448f6c53..484131e65 100644 +index 2aa805eef..4f7bc186a 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java @@ -0,0 +0,0 @@ public class PacketEncoder extends MessageToByteEncoder> { @@ -61,7 +61,7 @@ index 3448f6c53..484131e65 100644 } } } - ++ + // Paper start + private static int MAX_PACKET_SIZE = 2097152; + @@ -80,20 +80,20 @@ index 3448f6c53..484131e65 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 40ec398ee..ca6bcd22f 100644 +index 8e35d14f9..4a57e8a3e 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet { - this.f = packetdataserializer.readBoolean(); this.c = packetdataserializer.g(); int i = packetdataserializer.g(); + - if (i > 2097152) { + if (i > 2097152) { // Paper - if this changes, update PacketEncoder throw new RuntimeException("Chunk Packet trying to allocate too much memory on read."); } else { this.d = new byte[i]; diff --git a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -index 4d4835353..abdb21f6b 100644 +index 706d84385..c0d8f8b42 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java @@ -0,0 +0,0 @@ public class PacketPlayOutWindowItems implements Packet { @@ -109,8 +109,7 @@ index 4d4835353..abdb21f6b 100644 + return true; + } + // Paper end -+ - public PacketPlayOutWindowItems() { - } + public PacketPlayOutWindowItems() {} + public PacketPlayOutWindowItems(int i, NonNullList nonnulllist) { -- \ No newline at end of file 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 8e6c4d1675..ec38563539 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 f34ca2285..70966a76a 100644 +index 73237ae8e..33ccbaea7 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -28,7 +28,7 @@ index f34ca2285..70966a76a 100644 org.apache.logging.log4j diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9dca5aeda..9584950c6 100644 +index fe3bad583..56f135f24 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/Here-s-Johnny.patch b/Spigot-Server-Patches/Here-s-Johnny.patch index d91a8c9da4..b3f73fbbed 100644 --- a/Spigot-Server-Patches/Here-s-Johnny.patch +++ b/Spigot-Server-Patches/Here-s-Johnny.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Here's Johnny! diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java -index 597878e2c..4e59df891 100644 +index 96d0651e9..4bbb4817b 100644 --- a/src/main/java/net/minecraft/server/EntityVindicator.java +++ b/src/main/java/net/minecraft/server/EntityVindicator.java -@@ -0,0 +0,0 @@ import java.util.function.Predicate; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public class EntityVindicator extends EntityIllagerAbstract { + - private boolean b; + private boolean b; public boolean isJohnny() { return b; } public void setJohnny(boolean johnny) { b = johnny; } // Paper - OBFHELPER private static final Predicate c = (entity) -> { - return entity instanceof EntityLiving && ((EntityLiving)entity).df(); + return entity instanceof EntityLiving && ((EntityLiving) entity).df(); }; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java index 951d47929..5ff957ced 100644 diff --git a/Spigot-Server-Patches/Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/Honor-EntityAgeable.ageLock.patch index a3400d9e05..2fa0657751 100644 --- a/Spigot-Server-Patches/Honor-EntityAgeable.ageLock.patch +++ b/Spigot-Server-Patches/Honor-EntityAgeable.ageLock.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Honor EntityAgeable.ageLock diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java -index 652b178f1..b0c07560b 100644 +index 2af1ac702..aa54e380e 100644 --- a/src/main/java/net/minecraft/server/EntityAgeable.java +++ b/src/main/java/net/minecraft/server/EntityAgeable.java @@ -0,0 +0,0 @@ public abstract class EntityAgeable extends EntityCreature { diff --git a/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch index 356591a26e..e1f758d841 100644 --- a/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/Ignore-Dead-Entities-in-entityList-iteration.patch @@ -23,7 +23,7 @@ index 56700fc59..9b9c8361e 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 469dce5df..f1abcadcc 100644 +index 50e616179..cc30f19f0 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 469dce5df..f1abcadcc 100644 public float length; public float J; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 31bc34239..6958f00d7 100644 +index 2dd617de9..2e6b00541 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -60,8 +60,8 @@ index 31bc34239..6958f00d7 100644 Entity entity = (Entity) iterator.next(); + if (entity.shouldBeRemoved) continue; // Paper - if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) { - arraylist.add(entity); + if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) { // CraftBukkit - decompile error + list.add((T) entity); // CraftBukkit - decompile error @@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc while (iterator.hasNext()) { @@ -71,7 +71,7 @@ index 31bc34239..6958f00d7 100644 if (entity instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) entity; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d9385aa7a..ee2b443dd 100644 +index 2fca59f8f..3fdd12ec0 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/Ignore-Dimension-NBT-field-in-Entity-data.patch b/Spigot-Server-Patches/Ignore-Dimension-NBT-field-in-Entity-data.patch index 2538aa2a18..0e7c8b7089 100644 --- a/Spigot-Server-Patches/Ignore-Dimension-NBT-field-in-Entity-data.patch +++ b/Spigot-Server-Patches/Ignore-Dimension-NBT-field-in-Entity-data.patch @@ -14,7 +14,7 @@ DimensionManager set to the world it is being placed into. This fixes corrupt entities breaking chunk saving in custom worlds. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ee878191a..0f646ac7e 100644 +index 80e395b1a..f26056dd5 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/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 929bbc5c24..f093c459a8 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 1a1619260..c8cdd990e 100644 +index 5a21aed43..4d9f3d369 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-Expanded-ArmorStand-API.patch b/Spigot-Server-Patches/Implement-Expanded-ArmorStand-API.patch index 4e8168cce7..591d1722a8 100644 --- a/Spigot-Server-Patches/Implement-Expanded-ArmorStand-API.patch +++ b/Spigot-Server-Patches/Implement-Expanded-ArmorStand-API.patch @@ -8,7 +8,7 @@ Add the following: - Enable/Disable slot interactions diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 4ecf34a40..1dcc482c0 100644 +index 694df9e18..c604182dd 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 { diff --git a/Spigot-Server-Patches/Implement-Force-Loaded-Chunk-API.patch b/Spigot-Server-Patches/Implement-Force-Loaded-Chunk-API.patch deleted file mode 100644 index 3d87a28328..0000000000 --- a/Spigot-Server-Patches/Implement-Force-Loaded-Chunk-API.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: willies952002 -Date: Wed, 29 Aug 2018 00:37:42 -0400 -Subject: [PATCH] Implement Force-Loaded Chunk API - - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 12c6d850d..b9371e3ae 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -0,0 +0,0 @@ public class CraftChunk implements Chunk { - Preconditions.checkArgument(0 <= z && z <= 15, "z out of range (expected 0-15, got %s)", z); - } - -+ // Paper start - Force-Loaded Chunk API -+ @Override -+ public boolean isForceLoaded() { -+ return getHandle().getWorld().isForceLoaded(this.x, this.z); -+ } -+ -+ @Override -+ public void setForceLoaded(boolean force) { -+ getHandle().getWorld().setForceLoaded(this.x, this.z, force); -+ } -+ // Paper end -+ - static { - Arrays.fill(emptySkyLight, (byte) 0xFF); - } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5a7857e25..48831e45b 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 { - return getChunkAt(location.getBlockX() >> 4, location.getBlockZ() >> 4); - } - -+ // Paper start -+ public boolean isChunkForceLoaded(int x, int z) { -+ return this.isChunkGenerated(x, z) && this.getHandle().isForceLoaded(x, z); -+ } -+ // Paper end -+ - public ChunkGenerator getGenerator() { - return generator; - } --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch index 79288d26df..b23497ee31 100644 --- a/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index aacf411dc..623e7ec5f 100644 +index 98a8ce962..aad5a3527 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.MainHand; @@ -40,7 +40,7 @@ index aacf411dc..623e7ec5f 100644 this.ct = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bx, (byte) packetplayinsettings.f()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1b2e7ed72..1f21e54ab 100644 +index a12c30857..cceaba875 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/Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch index e5ef1151e8..803242def1 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 142ba2c0a..d9385aa7a 100644 +index 35f8f93c6..2fca59f8f 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-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index 2ea9d6a91b..9f29cfd3a0 100644 --- a/Spigot-Server-Patches/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java -index 00026eef7..207f95dcf 100644 +index 8e8390282..f52936581 100644 --- a/src/main/java/net/minecraft/server/ArgumentBlock.java +++ b/src/main/java/net/minecraft/server/ArgumentBlock.java @@ -0,0 +0,0 @@ public class ArgumentBlock { @@ -30,9 +30,9 @@ index 00026eef7..207f95dcf 100644 + public ArgumentBlock parse(boolean parseTile) throws CommandSyntaxException { return this.a(parseTile); } // Paper - OBFHELPER public ArgumentBlock a(boolean flag) throws CommandSyntaxException { this.s = this::l; - if (this.i.canRead() && this.i.peek() == 35) { + if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 2446badd8..356390db7 100644 +index 05d3ff969..1a0c0efdc 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 javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index 026983bd34..babe58ac99 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 000000000..26e3031d2 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 906bd973d..9b823d4ca 100644 +index d8e82a83c..a55ab0fd9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ @@ -221,7 +221,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 c338d09bf..087f5fe0d 100644 +index aa125a52d..ea52e89bd 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 { @@ -246,7 +246,7 @@ index c338d09bf..087f5fe0d 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9584950c6..eed96c60c 100644 +index 56f135f24..9c442dee2 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-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/Implement-furnace-cook-speed-multiplier-API.patch index a8028bf83a..c90ea4cc0c 100644 --- a/Spigot-Server-Patches/Implement-furnace-cook-speed-multiplier-API.patch +++ b/Spigot-Server-Patches/Implement-furnace-cook-speed-multiplier-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement furnace cook speed multiplier API Signed-off-by: Tassu diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 7ec656ebe..c3c230c21 100644 +index 5b6ccfa9f..bfbd35bbe 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java @@ -0,0 +0,0 @@ import java.util.Map.Entry; diff --git a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch index 3a781d4ac0..ce8cf3c9ea 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/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java -index 0648c76a0..bea146630 100644 +index 747b8ad4d..4c5556a09 100644 --- a/src/main/java/net/minecraft/server/LocaleLanguage.java +++ b/src/main/java/net/minecraft/server/LocaleLanguage.java @@ -0,0 +0,0 @@ public class LocaleLanguage { @@ -17,7 +17,7 @@ index 0648c76a0..bea146630 100644 + public static LocaleLanguage getInstance() { return a(); } // Paper - OBFHELPER public static LocaleLanguage a() { - return c; + return LocaleLanguage.c; } + public synchronized String translateKey(String key) { return a(key); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch index 82b2c36f02..e9370d1b41 100644 --- a/Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch +++ b/Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement getters and setters for EntityItem owner and diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 7264773ef..890342baa 100644 +index d11e4d3d8..dc0f38ddf 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 { @@ -37,7 +37,7 @@ index 7264773ef..890342baa 100644 this.f = uuid; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index 1df17f09b..25666792e 100644 +index 6036592f7..4128ba4c0 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 @@ import org.bukkit.inventory.ItemStack; 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 3ab1b0319a..38e785aa11 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 1185769ca..443a089d8 100644 +index f28ca6bb4..f1314831f 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 1185769ca..443a089d8 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 08d923563..6d9c80489 100644 +index a12a42c32..638b54c1e 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 08d923563..6d9c80489 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 9c5f520f1..5d7370029 100644 +index 600b0ec8b..b51415e9b 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch b/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch deleted file mode 100644 index 07ccfbf268..0000000000 --- a/Spigot-Server-Patches/Improve-ProjectileHitEvent-to-include-the-BlockFace-.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Brokkonaut -Date: Sat, 30 Jun 2018 05:45:39 +0200 -Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the - projectile has hit - - -diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 7061075b5..0dd52f859 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 { - hitBlock = entity.getBukkitEntity().getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); - } - -- ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), position.entity == null ? null : position.entity.getBukkitEntity(), hitBlock); -+ ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), position.entity == null ? null : position.entity.getBukkitEntity(), hitBlock, position.direction == null ? null : CraftBlock.notchToBlockFace(position.direction)); // Paper - add BlockFace parameter - entity.world.getServer().getPluginManager().callEvent(event); - return event; - } --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Improve-death-events.patch b/Spigot-Server-Patches/Improve-death-events.patch index 0282f9e35c..44e0698ebf 100644 --- a/Spigot-Server-Patches/Improve-death-events.patch +++ b/Spigot-Server-Patches/Improve-death-events.patch @@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java -index 9a74601b0..6e60d15cc 100644 +index bbd5e2b2a..19750ceed 100644 --- a/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java @@ -0,0 +0,0 @@ public class CombatTracker { @@ -25,9 +25,9 @@ index 9a74601b0..6e60d15cc 100644 + public void reset() { this.g(); } // Paper - OBFHELPER public void g() { int i = this.f ? 300 : 100; - if (this.g && (!this.b.isAlive() || this.b.ticksLived - this.c > i)) { + diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 67ea54987..7fc56cadc 100644 +index 2e2d14d93..e068f19ad 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 @@ -55,7 +55,7 @@ index 67ea54987..7fc56cadc 100644 return SoundCategory.NEUTRAL; } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index c5bddb1da..0a9666541 100644 +index 2c54e3e34..a5cc5e284 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 { @@ -69,7 +69,7 @@ index c5bddb1da..0a9666541 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3ef68fec7..716f0e67f 100644 +index b4dcdda0c..60aaf0547 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 { @@ -206,7 +206,7 @@ index 3ef68fec7..716f0e67f 100644 return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index bf842a0a9..b5d48e7bf 100644 +index 1054367d0..00c2072d7 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 { @@ -234,8 +234,8 @@ index bf842a0a9..b5d48e7bf 100644 + } + // Paper end - String deathMessage = event.getDeathMessage(); - + // SPIGOT-943 - only call if they have an inventory open + if (this.activeContainer != this.defaultContainer) { @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } @@ -284,7 +284,7 @@ index 17fab031b..ee8219e3b 100644 this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8be0a47ba..f56ef6f71 100644 +index 611833592..1c9cc1250 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 { @@ -305,7 +305,7 @@ index 8be0a47ba..f56ef6f71 100644 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c6cd2f3be..f87d2bed7 100644 +index a2841ee53..fdab6734f 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 46cf20fe41..086fc6101c 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 9d3234c1c..9b88a4190 100644 +index 6150b56e0..3ca579e38 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 9d3234c1c..9b88a4190 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 82e85a035..752848323 100644 +index 260478166..9b8833fed 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 82e85a035..752848323 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 5bd65ddbb..bf842a0a9 100644 +index cd488d37f..1054367d0 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 { @@ -69,10 +69,10 @@ index 5bd65ddbb..bf842a0a9 100644 } @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + if (!event.getKeepInventory()) { this.inventory.clear(); } - -- this.closeInventory(); +- + this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DEATH); // Paper this.setSpectatorTarget(this); // Remove spectated target // CraftBukkit end @@ -110,7 +110,7 @@ index 5bd65ddbb..bf842a0a9 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 159a30e0e..a66f8ab2c 100644 +index dfd64d1f5..3c9cfad9c 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 159a30e0e..a66f8ab2c 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 08bbd86d1..6311c9f87 100644 +index 8131ad08f..fac8f83af 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 707091754..c9cbf6979 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 8699cc72f..0f1d700c7 100644 +index 1ddb6f99f..5792a7538 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 8699cc72f..0f1d700c7 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 0dd52f859..dcd628104 100644 +index 6c105ef74..83f7116f4 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 bb1623fca0..386620161d 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 4ec79ccdb..a28aa016c 100644 +index 7401bafa9..d670b6ba4 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,23 +21,23 @@ index 4ec79ccdb..a28aa016c 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 3c30cd5b3..ac0f38e12 100644 +index cad1c1a17..e343b39b5 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 { private static final DataWatcherObject b = DataWatcher.a(EntityItem.class, DataWatcherRegistry.g); - private int age; + public int age; // PAIL public int pickupDelay; + public boolean canMobPickup = true; // Paper private int e; 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 55d6bacf7..6036592f7 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 { - item.pickupDelay = Math.min(delay, Short.MAX_VALUE); + item.age = value; } + // Paper Start diff --git a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch index 4059d9dddb..c3ccc3ec9c 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 f7ac69456..16d0c2662 100644 +index c08c1e8e4..8f2b0742d 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/Lighting-Queue.patch b/Spigot-Server-Patches/Lighting-Queue.patch index 76f5ddb3ba..ad4c000ea2 100644 --- a/Spigot-Server-Patches/Lighting-Queue.patch +++ b/Spigot-Server-Patches/Lighting-Queue.patch @@ -63,7 +63,7 @@ index 39d565db1..8f6f0288b 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index da2548603..87ec4d1a2 100644 +index 0a436133a..2afd6befa 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 { @@ -126,7 +126,7 @@ index da2548603..87ec4d1a2 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 60abc5f28..6a9b9fa2a 100644 +index 44c1dfe92..fe189a841 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 { @@ -138,7 +138,7 @@ index 60abc5f28..6a9b9fa2a 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 4acb908ec..194f8441e 100644 +index b12d9fbe8..f547a6ad7 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 @@ -263,7 +263,7 @@ index 000000000..9783f3a0d + } +} diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5d5a9f0bb..69f55d0dd 100644 +index 086d64628..bf05c47a1 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch index 5a27bf7efc..2a73bb8950 100644 --- a/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch @@ -38,7 +38,7 @@ index 94c544714..48920b045 100644 public boolean firePhysicsEventForRedstone = false; private void firePhysicsEventForRedstone() { diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index afbe43dd3..d732be52e 100644 +index 7781babf5..50f620009 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -0,0 +0,0 @@ public class EntityLightning extends EntityWeather { @@ -69,7 +69,7 @@ index afbe43dd3..d732be52e 100644 --this.lifeTicks; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 27c8a97be..63c802d02 100644 +index 82cfd694a..078399aa0 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/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index ef750c70e4..8992291d84 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -520,7 +520,7 @@ index 000000000..d50410532 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b39e3ef13..1338eff40 100644 +index f7a7ba412..b6356966a 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 @@ -591,13 +591,13 @@ index 520cca48c..e228fc853 100644 if (this.lootTableSeed == 0L) { diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index 7d066a18d..c9c29528a 100644 +index 961d9a5f9..60f0b5046 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java -@@ -0,0 +0,0 @@ import java.util.Random; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public abstract class TileEntityLootable extends TileEntityContainer implements ILootable { + - protected MinecraftKey g; - protected long h; + protected MinecraftKey g; public MinecraftKey getLootTableKey() { return g; } public void setLootTable(MinecraftKey key) { g = key; } // Paper - OBFHELPER @@ -640,11 +640,12 @@ index 7d066a18d..c9c29528a 100644 - if (this.g != null && this.world.getMinecraftServer() != null) { + if (lootableData.shouldReplenish(entityhuman) && this.world.getMinecraftServer() != null) { // Paper LootTable loottable = this.world.getMinecraftServer().getLootTableRegistry().getLootTable(this.g); + - this.g = null; + lootableData.processRefill(entityhuman); // Paper Random random; + if (this.h == 0L) { - random = new Random(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java index 8617fac6b..4f4121adc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java diff --git a/Spigot-Server-Patches/MC-111480-Start-Entity-ID-s-at-1.patch b/Spigot-Server-Patches/MC-111480-Start-Entity-ID-s-at-1.patch index d8b5b1a870..1648b01f7d 100644 --- a/Spigot-Server-Patches/MC-111480-Start-Entity-ID-s-at-1.patch +++ b/Spigot-Server-Patches/MC-111480-Start-Entity-ID-s-at-1.patch @@ -7,7 +7,7 @@ DataWatchers that store Entity ID's treat 0 as special, and can break things such as Elytra Fireworks. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index df23b5c4f..b284524be 100644 +index cc30f19f0..a9b0f8497 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/MC-135506-Experience-should-save-as-Integers.patch b/Spigot-Server-Patches/MC-135506-Experience-should-save-as-Integers.patch index e90007a17a..ce6425620d 100644 --- a/Spigot-Server-Patches/MC-135506-Experience-should-save-as-Integers.patch +++ b/Spigot-Server-Patches/MC-135506-Experience-should-save-as-Integers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC-135506: Experience should save as Integers diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 69d4dc9ab..80edbf481 100644 +index 09d85764b..3606b1014 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/MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch b/Spigot-Server-Patches/MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch index 4d919152ea..78bdb3955a 100644 --- a/Spigot-Server-Patches/MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch +++ b/Spigot-Server-Patches/MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch @@ -13,7 +13,7 @@ keep the clone of the item used to a non empty value so it represents the item used. diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 23fc4d8e1..0b6c25936 100644 +index 1d76c4c99..be6cd6adf 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/MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch b/Spigot-Server-Patches/MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch index 7fe5b4997b..ece10e68b8 100644 --- a/Spigot-Server-Patches/MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch +++ b/Spigot-Server-Patches/MC-2025-Save-and-load-entity-AABB-to-prevent-wobble.patch @@ -23,13 +23,13 @@ This reasoning leads us to one clear conclusion: The simplest, least invasive, a store the AABB in NBT data on chunk save and restore the AABB exactly as it was saved upon reload. diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index bf538684a..19819b134 100644 +index 1c0b783e8..c5e541985 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public class AxisAlignedBB { + - public final double minX; - public final double minY; - public final double minZ; @@ -46,7 +46,7 @@ index bf538684a..19819b134 100644 public AxisAlignedBB(double d0, double d1, double d2, double d3, double d4, double d5) { this.minX = Math.min(d0, d3); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c083b2dd3..67ea54987 100644 +index 3311e2b24..2e2d14d93 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/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index 1243335695..3d00edfdab 100644 --- a/Spigot-Server-Patches/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/Spigot-Server-Patches/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -11,7 +11,7 @@ If the projectile fails to find the shooter in the current world, check other worlds. diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 8d41efe8f..0e6dae8cd 100644 +index 62b5b6ece..60ab1c751 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/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index 6d94e8052e..c43ede5fd4 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -4,387 +4,150 @@ Date: Wed, 30 Mar 2016 19:36:20 -0400 Subject: [PATCH] MC Dev fixes -diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 25a1edc45..f1ad18511 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 { - return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString(); +diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java +index bcb4b5e5c..c399bdecc 100644 +--- a/src/main/java/net/minecraft/server/BiomeBase.java ++++ b/src/main/java/net/minecraft/server/BiomeBase.java +@@ -0,0 +0,0 @@ public abstract class BiomeBase { + + @Nullable + public static BiomeBase a(BiomeBase biomebase) { +- return (BiomeBase) BiomeBase.aH.fromId(IRegistry.BIOME.a((Object) biomebase)); ++ return (BiomeBase) BiomeBase.aH.fromId(IRegistry.BIOME.a(biomebase)); // Paper - decompile fix } -- // $FF: synthetic method -- public int compareTo(Object object) { -- return this.compareTo((BaseBlockPosition)object); -- } - } + public static WorldGenCarverWrapper a(WorldGenCarver worldgencarver, C c0) { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 66c38df1f..50e29464b 100644 +index bd2a67cfc..330f5d0c1 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 { - } - } +@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; + @Immutable + public class BlockPosition extends BaseBlockPosition { -- // $FF: synthetic method -- protected Object computeNext() { -- return this.computeNext(); -- } - }; - }; +- private static final Logger b = LogManager.getLogger(); ++ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used + 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; +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + return a(Math.min(blockposition.getX(), blockposition1.getX()), Math.min(blockposition.getY(), blockposition1.getY()), Math.min(blockposition.getZ(), blockposition1.getZ()), Math.max(blockposition.getX(), blockposition1.getX()), Math.max(blockposition.getY(), blockposition1.getY()), Math.max(blockposition.getZ(), blockposition1.getZ())); } + +- public static Iterable a(int i, int j, int k, int l, int i1, int j1) { ++ public static Iterable a(int ix, int jx, int kx, int l, int i1, int j1) { // Paper - decompile fix + return () -> { + return new AbstractIterator() { + private boolean g = true; +@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { + protected BlockPosition computeNext() { + if (this.g) { + this.g = false; +- this.h = i; +- this.i = j; +- this.j = k; +- return new BlockPosition(i, j, k); ++ this.h = ix; // Paper - decompile fix ++ this.i = jx; // Paper - decompile fix ++ this.j = kx; // Paper - decompile fix ++ return new BlockPosition(ix, jx, kx); + } else if (this.h == l && this.i == i1 && this.j == j1) { + return (BlockPosition) this.endOfData(); + } else { + if (this.h < l) { + ++this.h; + } else if (this.i < i1) { +- this.h = i; ++ this.h = ix; // Paper - decompile fix + ++this.i; + } else if (this.j < j1) { +- this.h = i; +- this.i = j; ++ this.h = ix; // Paper - decompile fix ++ this.i = jx; // Paper - decompile fix + ++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 = ix; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler ++this.g.c; } else if (this.g.d < j1) { -+ this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler -+ this.g.c = jx; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.c = j; // Paper - decompile fix Readd line removed by the decompiler ++this.g.d; } -@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { - } - } +diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java +index 401b6d970..986b9ccea 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 + protected BlockStateEnum(String s, Class oclass, Collection collection) { + super(s, oclass); + this.a = ImmutableSet.copyOf(collection); +- Iterator iterator = collection.iterator(); ++ Iterator iterator = collection.iterator(); // Paper - decompile fix -- // $FF: synthetic method -- protected Object computeNext() { -- return this.computeNext(); -- } - }; - }; - } + while (iterator.hasNext()) { +- T t0 = (Enum) iterator.next(); ++ T t0 = iterator.next(); // Paper - Decompile fix + String s1 = ((INamable) t0).getName(); -- // $FF: synthetic method -- public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -- return this.d(baseblockposition); -- } - - public static class MutableBlockPosition extends BlockPosition { - protected int b; -@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { - return new BlockPosition(this); - } - -- // $FF: synthetic method -- public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -- return super.d(baseblockposition); -- } - } - - public static final class b extends BlockPosition.MutableBlockPosition implements AutoCloseable { -@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { - } - } - -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition d(int i, int j, int k) { -- return this.d(i, j, k); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { -- return this.c(enumdirection, i); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection) { -- return this.c(enumdirection); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition g(BaseBlockPosition baseblockposition) { -- return this.g(baseblockposition); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(double d0, double d1, double d2) { -- return this.c(d0, d1, d2); -- } -- -- // $FF: synthetic method -- public BlockPosition.MutableBlockPosition c(int i, int j, int k) { -- return this.c(i, j, k); -- } - } - } -diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 3bd0c56d4..304e47bf2 100644 ---- a/src/main/java/net/minecraft/server/DataPaletteBlock.java -+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { - public int onResize(int ix, T object) { - this.b(); - DataBits databits = this.a; -- DataPalette datapalette = this.h; -+ DataPalette datapalette = this.h; // Paper - decompile fix - this.b(ix); - - for(int jx = 0; jx < databits.b(); ++jx) { -- Object object1 = datapalette.a(databits.a(jx)); -+ T object1 = datapalette.a(databits.a(jx)); // Paper - decompile fix - if (object1 != null) { - this.setBlockIndex(jx, object1); - } -@@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { - } - - protected T a(int ix) { -- Object object = this.h.a(this.a.a(ix)); -+ T object = this.h.a(this.a.a(ix)); // Paper - decompile fix - return (T)(object == null ? this.g : object); - } - -@@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { - long[] along = nbttagcompound.o(s1); - int jx = along.length * 64 / 4096; - if (this.h == this.b) { -- DataPaletteHash datapalettehash = new DataPaletteHash(this.d, ix, this.c, this.e, this.f); -+ DataPaletteHash datapalettehash = new DataPaletteHash(this.d, ix, this.c, this.e, this.f); // Paper - decompile fix - datapalettehash.a(nbttaglist); - DataBits databits = new DataBits(ix, 4096, along); - -diff --git a/src/main/java/net/minecraft/server/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/DedicatedPlayerList.java -index 5eded6dc2..11f9642e6 100644 ---- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java -+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java -@@ -0,0 +0,0 @@ public class DedicatedPlayerList extends PlayerList { - } - - // $FF: synthetic method -- public MinecraftServer getServer() { -+ public MinecraftServer getMinecraftServer() { // Paper - decompile fix - return this.getServer(); - } - } + if (this.b.containsKey(s1)) { diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 8bfa218a6..e2e60d3ed 100644 +index 66b168396..83db94c4a 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 { } private void a(World world, BlockPosition blockposition, BlockPosition blockposition1) { -- List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity1) -> { -+ List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1),(java.util.function.Predicate) (entity1) -> { // Paper - decompile fix - return !(entity1 instanceof EntityHuman); +- List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity) -> { ++ List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (java.util.function.Predicate) (entity) -> { // Paper - decompile fix + return !(entity instanceof EntityHuman); }); - this.b.clear(); + @@ -0,0 +0,0 @@ public class DefinedStructure { - if (this.a.isEmpty()) { - return false; - } else { -- List list = definedstructureinfo.a(this.a, blockposition); -+ List list = definedstructureinfo.a(this.a, blockposition); // Paper - decompile fix - if ((!list.isEmpty() || !definedstructureinfo.h() && !this.b.isEmpty()) && this.c.getX() >= 1 && this.c.getY() >= 1 && this.c.getZ() >= 1) { - Block block = definedstructureinfo.i(); - StructureBoundingBox structureboundingbox = definedstructureinfo.j(); -- ArrayList arraylist = Lists.newArrayListWithCapacity(definedstructureinfo.m() ? list.size() : 0); -- ArrayList arraylist1 = Lists.newArrayListWithCapacity(list.size()); -+ ArrayList arraylist = Lists.newArrayListWithCapacity(definedstructureinfo.m() ? list.size() : 0); // Paper - decompile fix -+ ArrayList arraylist1 = Lists.newArrayListWithCapacity(list.size()); // Paper - decompile fix - int j = Integer.MAX_VALUE; - int k = Integer.MAX_VALUE; - int l = Integer.MAX_VALUE; + boolean flag = true; + EnumDirection[] aenumdirection = new EnumDirection[] { EnumDirection.UP, EnumDirection.NORTH, EnumDirection.EAST, EnumDirection.SOUTH, EnumDirection.WEST}; + +- int l1; ++ //int l1; // Paper - decompile fix + + while (flag && !list1.isEmpty()) { + flag = false; @@ -0,0 +0,0 @@ public class DefinedStructure { - nbttagcompound.set("blocks", new NBTTagList()); - nbttagcompound.set("palette", new NBTTagList()); - } else { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); // Paper - decompile fix - DefinedStructure.a definedstructure$a = new DefinedStructure.a(); - arraylist.add(definedstructure$a); + BlockPosition blockposition2 = (BlockPosition) iterator1.next(); + Fluid fluid1 = generatoraccess.getFluid(blockposition2); -diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java -index 6695f8d77..e1ea8da88 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 { - public static void a(Map map, ItemStack itemstack) { - NBTTagList nbttaglist = new NBTTagList(); +- for (l1 = 0; l1 < aenumdirection.length && !fluid1.d(); ++l1) { ++ for (int l1 = 0; l1 < aenumdirection.length && !fluid1.d(); ++l1) { // Paper - decompile fix + Fluid fluid2 = generatoraccess.getFluid(blockposition2.shift(aenumdirection[l1])); -- for(Entry entry : map.entrySet()) { -+ for(Entry entry : map.entrySet()) { // Paper - decompile fix - Enchantment enchantment = (Enchantment)entry.getKey(); - if (enchantment != null) { - int i = entry.getValue(); -@@ -0,0 +0,0 @@ public class EnchantmentManager { - } + if (fluid2.getHeight() > fluid1.getHeight() || fluid2.d() && !fluid1.d()) { +@@ -0,0 +0,0 @@ public class DefinedStructure { + int i2 = j; + int j2 = k; - public static int a(Enchantment enchantment, EntityLiving entityliving) { -- List list = enchantment.a(entityliving); -+ List list = enchantment.a(entityliving); // Paper - decompile fix - if (list == null) { - return 0; - } else { -@@ -0,0 +0,0 @@ public class EnchantmentManager { - } +- l1 = l; ++ int l1 = l; // Paper - decompile fix + Iterator iterator2 = list2.iterator(); - public static ItemStack b(Enchantment enchantment, EntityLiving entityliving) { -- List list = enchantment.a(entityliving); -+ List list = enchantment.a(entityliving);// Paper - decompile fix - if (list.isEmpty()) { - return ItemStack.a; - } else { -@@ -0,0 +0,0 @@ public class EnchantmentManager { - } + Pair pair; +@@ -0,0 +0,0 @@ public class DefinedStructure { + public IBlockData a(int i) { + IBlockData iblockdata = (IBlockData) this.b.fromId(i); - public static ItemStack a(Random random, ItemStack itemstack, int i, boolean flag) { -- List list = b(random, itemstack, i, flag); -+ List list = b(random, itemstack, i, flag); // Paper - decompile fix - boolean flag1 = itemstack.getItem() == Items.BOOK; - if (flag1) { - itemstack = new ItemStack(Items.ENCHANTED_BOOK); -@@ -0,0 +0,0 @@ public class EnchantmentManager { - } - - public static List a(int i, ItemStack itemstack, boolean flag) { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); - Item item = itemstack.getItem(); - boolean flag1 = itemstack.getItem() == Items.BOOK; - -diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java -index 04cff50cb..e746a6a0d 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 { - protected void a(MovingObjectPosition movingobjectposition) { - if (movingobjectposition.entity == null || !movingobjectposition.entity.s(this.shooter)) { - if (!this.world.isClientSide) { -- List list = this.world.a(EntityLiving.class, this.getBoundingBox().grow(4.0D, 2.0D, 4.0D)); -+ List list = this.world.a(EntityLiving.class, this.getBoundingBox().grow(4.0D, 2.0D, 4.0D)); // Paper - decompile fix - EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX, this.locY, this.locZ); - entityareaeffectcloud.setSource(this.shooter); - entityareaeffectcloud.setParticle(Particles.j); -diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 4dee04581..9c48bb3c9 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 - public void s(boolean var1) { - } - -- // $FF: synthetic method -- public EntityAgeable createChild(EntityAgeable entityageable) { -- return this.createChild(entityageable); -- } -- - static class a extends PathfinderGoalNearestAttackableTarget { - public a(EntityLlama entityllama) { - super(entityllama, EntityWolf.class, 16, false, true, (Predicate)null); -diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java -index 23ca6fc50..44c91ba26 100644 ---- a/src/main/java/net/minecraft/server/EnumDirection.java -+++ b/src/main/java/net/minecraft/server/EnumDirection.java -@@ -0,0 +0,0 @@ public enum EnumDirection implements INamable { - return d0; - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return super.test((EnumDirection)object); -- } - }, - Y("y") { - public int a(int var1, int i, int var3) { -@@ -0,0 +0,0 @@ public enum EnumDirection implements INamable { - return d0; - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return super.test((EnumDirection)object); -- } - }, - Z("z") { - public int a(int var1, int var2, int i) { -@@ -0,0 +0,0 @@ public enum EnumDirection implements INamable { - return d0; - } - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return super.test((EnumDirection)object); -- } - }; - - private static final Map d = (Map)Arrays.stream(values()).collect(Collectors.toMap(EnumDirection.EnumAxis::a, (enumdirection$enumaxis) -> { -@@ -0,0 +0,0 @@ public enum EnumDirection implements INamable { - - public abstract double a(double var1, double var3, double var5); - -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((EnumDirection)object); -- } - } - - public static enum EnumAxisDirection { -@@ -0,0 +0,0 @@ public enum EnumDirection implements INamable { - return Iterators.forArray(this.c); +- return iblockdata == null ? DefinedStructure.a.a : iblockdata; ++ return iblockdata == null ? a : iblockdata; // Paper - decompile fix } -- // $FF: synthetic method -- public boolean test(@Nullable Object object) { -- return this.test((EnumDirection)object); -- } - } - } -diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index 0e0571a6c..8fc45c697 100644 ---- a/src/main/java/net/minecraft/server/IChatBaseComponent.java -+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java -@@ -0,0 +0,0 @@ public interface IChatBaseComponent extends Message, Iterable entry : jsonobject.entrySet()) {// Paper - Decompile fix - String s = b.matcher(ChatDeserializer.a((JsonElement)entry.getValue(), (String)entry.getKey())).replaceAll("%$1s"); - this.d.put(entry.getKey(), s); - } -diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java -index 252b0f3ed..86df2b969 100644 ---- a/src/main/java/net/minecraft/server/LootSelectorEntry.java -+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java -@@ -0,0 +0,0 @@ public abstract class LootSelectorEntry { - return jsonobject; - } - -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((LootSelectorEntry)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } - } - } + public Iterator iterator() { diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java -index 48d04b540..de9168a9c 100644 +index 1425584ed..b2757aad8 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 { @@ -396,31 +159,8 @@ index 48d04b540..de9168a9c 100644 default String asString() { return this.toString(); -diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java -index 456b5f492..54f2935c0 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 - public abstract void b(int var1); - - // $FF: synthetic method -+ /* // Paper start- Decompile fix - public Object set(int i, Object object) { - return this.set(i, (NBTBase)object); - } -@@ -0,0 +0,0 @@ public abstract class NBTList extends AbstractList impleme - // $FF: synthetic method - public Object get(int i) { - return this.get(i); -- } -+ }*/ -+ -+ @Override -+ public abstract NBTBase clone(); -+ // Paper end- Decompile fix - } diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java -index 973f28cc5..21a6f488a 100644 +index 767013cae..e0fb6fb49 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 { @@ -434,195 +174,92 @@ index 973f28cc5..21a6f488a 100644 System.arraycopy(this.data, 0, abyte, 0, this.data.length); diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index 8e6cce15f..1b72df8cd 100644 +index 2b7b8be8a..27debcfca 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; - public class NBTTagList extends NBTList { + private static final Logger f = LogManager.getLogger(); - private List list = Lists.newArrayList(); + public List list = Lists.newArrayList(); // Paper private byte type = 0; - public NBTTagList() { -@@ -0,0 +0,0 @@ public class NBTTagList extends NBTList { - return this.type; - } - -- // $FF: synthetic method -- public NBTBase clone() { -- return this.clone(); -- } -- -+ /* // Paper start - Decompile fix - // $FF: synthetic method - public Object remove(int i) { - return this.remove(i); -@@ -0,0 +0,0 @@ public class NBTTagList extends NBTList { - public boolean add(Object object) { - return this.add((NBTBase)object); - } -+ */ // Paper end - Decompile fix - } -diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index a717ad95f..ff7e20dfc 100644 ---- a/src/main/java/net/minecraft/server/PacketEncoder.java -+++ b/src/main/java/net/minecraft/server/PacketEncoder.java -@@ -0,0 +0,0 @@ public class PacketEncoder extends MessageToByteEncoder> { - } - } - -- // $FF: synthetic method -- protected void encode(ChannelHandlerContext channelhandlercontext, Object object, ByteBuf bytebuf) throws Exception { -- this.encode(channelhandlercontext, (Packet)object, bytebuf); -- } - } -diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 8bc7c0ccd..faaad0f41 100644 ---- a/src/main/java/net/minecraft/server/ProtoChunk.java -+++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -0,0 +0,0 @@ public class ProtoChunk implements IChunkAccess { - public void b(boolean flag) { - this.u = flag; - } -- -- // $FF: synthetic method -- public TickList l() { -- return this.l(); -- } -- -- // $FF: synthetic method -- public TickList k() { -- return this.k(); -- } - } + public NBTTagList() {} diff --git a/src/main/java/net/minecraft/server/Registry.java b/src/main/java/net/minecraft/server/Registry.java -index 5be9f0ff2..9efec49d6 100644 +index 723372f26..9efec49d6 100644 --- a/src/main/java/net/minecraft/server/Registry.java +++ b/src/main/java/net/minecraft/server/Registry.java @@ -0,0 +0,0 @@ package net.minecraft.server; --public interface Registry extends Iterable { +-public interface Registry extends Iterable {} +import java.util.Iterator; +public interface Registry extends Iterable { // Paper - decompile fix + + @Override + Iterator iterator(); // Paper - decompile fix - } ++} diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index 8d1f9237a..a21006290 100644 +index 50410264f..a894f7886 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -0,0 +0,0 @@ public class RegistryBlockID implements Registry { - this.b.put(object, i); + this.b.put(t0, i); - while(this.c.size() <= i) { -- this.c.add((Object)null); + while (this.c.size() <= i) { +- this.c.add((Object) null); + this.c.add(null); // Paper - decompile fix } - this.c.set(i, object); + this.c.set(i, t0); diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index 03c603362..d03ac0e70 100644 +index 9400a4369..5a5c464ea 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 { - } - private void d(int i) { -- Object[] aobject = this.b; -+ K[] aobject = this.b; // Paper - decompile fix - int[] aint = this.c; - this.b = (K[])(new Object[i]); + 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]; -diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index 364dadfbd..c338d09bf 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 { - return jsonobject; - } - -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((ServerPing)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } +- this.d = (Object[]) (new Object[i]); ++ this.d = (K[]) (new Object[i]); // Paper - decompile fix } - public static class ServerData { -@@ -0,0 +0,0 @@ public class ServerPing { - return jsonobject; - } + public int getId(@Nullable K k0) { +@@ -0,0 +0,0 @@ public class RegistryID implements Registry { + K[] ak = this.b; + int[] aint = this.c; -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((ServerPing.ServerData)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } - } - } +- 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; -@@ -0,0 +0,0 @@ public class ServerPing { - return jsonobject; - } - -- // $FF: synthetic method -- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { -- return this.serialize((ServerPing.ServerPingPlayerSample)object, type, jsonserializationcontext); -- } -- -- // $FF: synthetic method -- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { -- return this.deserialize(jsonelement, type, jsondeserializationcontext); -- } - } - } - } -diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java -index 475bf35fa..78234cbdd 100644 ---- a/src/main/java/net/minecraft/server/ShapeDetector.java -+++ b/src/main/java/net/minecraft/server/ShapeDetector.java -@@ -0,0 +0,0 @@ public class ShapeDetector { - return new ShapeDetectorBlock(this.a, blockposition, this.b); - } - -- // $FF: synthetic method -- public Object load(Object object) throws Exception { -- return this.load((BlockPosition)object); -- } - } - - public static class ShapeDetectorCollection { diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index c1bbacfc1..f0a826cd1 100644 +index c01a05b25..478bf4997 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java -@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; - import it.unimi.dsi.fastutil.objects.ObjectIterator; - import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry; - import java.io.DataInputStream; -+import java.io.DataOutput; - import java.io.DataOutputStream; - import java.io.File; - import java.io.FileInputStream; @@ -0,0 +0,0 @@ public class WorldPersistentData { - } - DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(file1)); -- NBTCompressedStreamTools.a(nbttagcompound, dataoutputstream); -+ NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream); // Paper - decompile fix - dataoutputstream.close(); + @Nullable + public T a(Function function, String s) { +- PersistentBase persistentbase = (PersistentBase) this.data.get(s); ++ T persistentbase = (T) this.data.get(s); // Paper - decompile fix + + if (persistentbase == null && this.e != null) { + try { + File file = this.e.getDataFile(this.b, s); + + if (file != null && file.exists()) { +- persistentbase = (PersistentBase) function.apply(s); ++ persistentbase = function.apply(s); // Paper - decompile fix + persistentbase.a(a(this.e, this.b, s, 1631).getCompound("data")); + this.data.put(s, persistentbase); } - } catch (Exception exception) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 3dbfff44b8..0e51bf00c0 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -5,40 +5,31 @@ Subject: [PATCH] MC Utils diff --git a/src/main/java/net/minecraft/server/AttributeInstance.java b/src/main/java/net/minecraft/server/AttributeInstance.java -index 1c1a6a37a..0929e0189 100644 +index be179ba21..c53bc8230 100644 --- a/src/main/java/net/minecraft/server/AttributeInstance.java +++ b/src/main/java/net/minecraft/server/AttributeInstance.java @@ -0,0 +0,0 @@ public interface AttributeInstance { @Nullable - AttributeModifier a(UUID var1); + AttributeModifier a(UUID uuid); + default void addModifier(AttributeModifier modifier) { b(modifier); } // Paper - OBFHELPER - void b(AttributeModifier var1); + void b(AttributeModifier attributemodifier); + default void removeModifier(AttributeModifier modifier) { c(modifier); } // Paper - OBFHELPER - void c(AttributeModifier var1); + void c(AttributeModifier attributemodifier); - void b(UUID var1); + void b(UUID uuid); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 50e29464b..880ce16b1 100644 +index 186fd5121..75a0f1386 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; - - @Immutable - public class BlockPosition extends BaseBlockPosition { -- private static final Logger b = LogManager.getLogger(); -+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used - 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 = c; @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { - return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double)this.getX() + d0, (double)this.getY() + d1, (double)this.getZ() + d2); + return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2); } + public BlockPosition add(int i, int j, int k) {return a(i, j, k);} // Paper - OBFHELPER - public BlockPosition a(int ix, int jx, int kx) { - return ix == 0 && jx == 0 && kx == 0 ? this : new BlockPosition(this.getX() + ix, this.getY() + jx, this.getZ() + kx); + public BlockPosition a(int i, int j, int k) { + return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k); } @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition { }; @@ -65,7 +56,7 @@ index 50e29464b..880ce16b1 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 40f892b24..22fec8697 100644 +index 1ff78eed4..417c015e5 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.CreatureSpawnEvent; @@ -86,7 +77,7 @@ index 40f892b24..22fec8697 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 744762b8b..d9608121b 100644 +index 34586bca6..b0c004b1f 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 { @@ -96,10 +87,10 @@ index 744762b8b..d9608121b 100644 + public static long asLong(final BlockPosition pos) { return a(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER + public static long asLong(int x, int z) { return a(x, z); } // Paper - OBFHELPER public static long a(int i, int j) { - return (long)i & 4294967295L | ((long)j & 4294967295L) << 32; + return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 3919c1fba..772382144 100644 +index cc9604749..70a95c263 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -112,7 +103,7 @@ index 3919c1fba..772382144 100644 private final IChunkLoader e; private final IAsyncTaskHandler f; diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index 95ca5f6d8..0dc948a37 100644 +index d24ec3d53..9e83610f1 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java @@ -0,0 +0,0 @@ public class DataBits { @@ -124,34 +115,31 @@ index 95ca5f6d8..0dc948a37 100644 return this.a; } diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java -index 7f905b1e0..fa5b9262b 100644 +index dae40b9cd..2ee879196 100644 --- a/src/main/java/net/minecraft/server/DataPalette.java +++ b/src/main/java/net/minecraft/server/DataPalette.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public interface DataPalette { + + default int getOrCreateIdFor(T object) { return this.a(object); } // Paper - OBFHELPER - int a(T var1); + int a(T t0); -- @Nullable -- T a(int var1); + @Nullable default T getObject(int dataBits) { return this.a(dataBits); } // Paper - OBFHELPER -+ @Nullable T a(int var1); - - void b(PacketDataSerializer var1); + @Nullable + T a(int i); diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 304e47bf2..6e7454b13 100644 +index 59cbbdcb3..6fcfc5ef7 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -0,0 +0,0 @@ import java.util.function.Function; - import java.util.stream.Collectors; +@@ -0,0 +0,0 @@ import java.util.stream.Collectors; public class DataPaletteBlock implements DataPaletteExpandable { + - private final DataPalette b; -+ private final DataPalette b;private final DataPalette getDataPaletteGlobal() { return this.b; } // Paper - OBFHELPER - private final DataPaletteExpandable c = (var0, var1) -> { ++ private final DataPalette b; private final DataPalette getDataPaletteGlobal() { return this.b; } // Paper - OBFHELPER + private final DataPaletteExpandable c = (i, object) -> { return 0; }; @@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { @@ -168,15 +156,15 @@ index 304e47bf2..6e7454b13 100644 private void b() { @@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { - return jx << 8 | k << 4 | ix; + return j << 8 | k << 4 | i; } + private void initialize(int bitsPerObject) { this.b(bitsPerObject); } // Paper - OBFHELPER - private void b(int ix) { - if (ix != this.i) { - this.i = ix; + private void b(int i) { + if (i != this.i) { + this.i = i; @@ -0,0 +0,0 @@ public class DataPaletteBlock implements DataPaletteExpandable { - return (T)(object == null ? this.g : object); + return t0 == null ? this.g : t0; } + public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER @@ -196,7 +184,7 @@ index 372afbe94..20b7c2c6d 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 550c7a355..b039ff1b5 100644 +index a3d088bbd..cca047b04 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 { @@ -208,7 +196,7 @@ index 550c7a355..b039ff1b5 100644 // CraftBukkit start - fire event setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 341af9c16..14c481220 100644 +index 892e1aca7..ed859ccf9 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 { @@ -220,14 +208,13 @@ index 341af9c16..14c481220 100644 @Override public float getBukkitYaw() { diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index c9e596367..70830bbf4 100644 +index 5f9255df1..5ea517043 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java -@@ -0,0 +0,0 @@ - package net.minecraft.server; +@@ -0,0 +0,0 @@ package net.minecraft.server; public abstract class EntityMonster extends EntityCreature implements IMonster { -+ + + public org.bukkit.craftbukkit.entity.CraftMonster getBukkitMonster() { return (org.bukkit.craftbukkit.entity.CraftMonster) super.getBukkitEntity(); } // Paper protected EntityMonster(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -239,7 +226,7 @@ index c9e596367..70830bbf4 100644 return SoundCategory.HOSTILE; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index bcdc790ba..339abdc01 100644 +index b8abd6363..a07ee150c 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; @@ -252,7 +239,7 @@ index bcdc790ba..339abdc01 100644 import java.util.function.Function; @@ -0,0 +0,0 @@ public class EntityTypes { public static EntityTypes a(String s, EntityTypes.a entitytypes_a) { - EntityTypes entitytypes = entitytypes_a.a(s); + EntityTypes entitytypes = entitytypes_a.a(s); + // Paper start + if (clsToKeyMap == null ) clsToKeyMap = new java.util.HashMap<>(); @@ -290,17 +277,9 @@ index bcdc790ba..339abdc01 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 7047b7c70..92f8d0633 100644 +index d55f52fe9..27705106b 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.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.block.BlockFertilizeEvent; @@ -0,0 +0,0 @@ public final class ItemStack { return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList(); } @@ -642,18 +621,18 @@ index 000000000..c97e116aa + } +} diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 447b56323..db4e4b859 100644 +index 434471215..8c5d6c1d3 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - public class NBTTagCompound implements NBTBase { +@@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { + private static final Logger f = LogManager.getLogger(); private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+"); - private final Map map = Maps.newHashMap(); + public final Map map = Maps.newHashMap(); // Paper - public NBTTagCompound() { - } + public NBTTagCompound() {} + @@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { this.map.put(s, new NBTTagLong(i)); } @@ -668,26 +647,8 @@ index 447b56323..db4e4b859 100644 @Nullable public UUID a(String s) { return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); -@@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { - - public String toString() { - StringBuilder stringbuilder = new StringBuilder("{"); -- Object object = this.map.keySet(); -+ Collection object = this.map.keySet(); // Paper - decompile fix - if (f.isDebugEnabled()) { - ArrayList arraylist = Lists.newArrayList(this.map.keySet()); - Collections.sort(arraylist); -@@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { - } - - // $FF: synthetic method -- public NBTBase clone() { -+ public NBTBase clone_bad() { // Paper - decompile fix - return this.clone(); - } - } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index db52ffad4..d5bbc5f8e 100644 +index d85bc522c..e2fc41d6d 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> { @@ -740,19 +701,19 @@ index 7582151ae..d05f1e02c 100644 for (int j = 1; j < 5; ++j) { if ((i & -1 << j * 7) == 0) { diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index ff7e20dfc..3448f6c53 100644 +index d54177bdc..2aa805eef 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java @@ -0,0 +0,0 @@ public class PacketEncoder extends MessageToByteEncoder> { packet.b(packetdataserializer); } catch (Throwable throwable) { - a.error(throwable); + PacketEncoder.a.error(throwable); + throwable.printStackTrace(); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE? if (packet.a()) { throw new SkipEncodeException(throwable); } else { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 12d6c99cf..af382815f 100644 +index 395215bbd..f2159bc2d 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet { @@ -773,7 +734,7 @@ index 12d6c99cf..af382815f 100644 int j = 0; ChunkSection[] achunksection = chunk.getSections(); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index bbc8c0007..2b6c797ce 100644 +index bb7ef0518..e35f17843 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 { @@ -790,7 +751,7 @@ index bbc8c0007..2b6c797ce 100644 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/PotionUtil.java b/src/main/java/net/minecraft/server/PotionUtil.java -index 8fce3b022..58ac6eafc 100644 +index 6740b396a..ea08c5a1c 100644 --- a/src/main/java/net/minecraft/server/PotionUtil.java +++ b/src/main/java/net/minecraft/server/PotionUtil.java @@ -0,0 +0,0 @@ public class PotionUtil { @@ -800,9 +761,9 @@ index 8fce3b022..58ac6eafc 100644 + public static ItemStack addPotionToItemStack(ItemStack itemstack, PotionRegistry potionregistry) { return a(itemstack, potionregistry); } // Paper - OBFHELPER public static ItemStack a(ItemStack itemstack, PotionRegistry potionregistry) { MinecraftKey minecraftkey = IRegistry.POTION.getKey(potionregistry); - if (potionregistry == Potions.EMPTY) { + diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index a21006290..6c6f006f3 100644 +index a894f7886..93935e7c7 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -0,0 +0,0 @@ public class RegistryBlockID implements Registry { @@ -814,7 +775,7 @@ index a21006290..6c6f006f3 100644 return this.b.size(); } diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 25d4907b3..1f6de76a7 100644 +index 8cb97b894..5e71d2ac2 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java @@ -0,0 +0,0 @@ public class SystemUtils { @@ -822,8 +783,8 @@ index 25d4907b3..1f6de76a7 100644 } - public static > String a(IBlockState iblockstate, Object object) { -- return iblockstate.a((Comparable)object); -+ public static > String a(IBlockState iblockstate, T object) { // Paper - decompile fix +- return iblockstate.a((Comparable) object); ++ public static > String a(IBlockState iblockstate, T object) { + return iblockstate.a(object); // Paper - decompile fix } @@ -832,20 +793,31 @@ index 25d4907b3..1f6de76a7 100644 } public static long getMonotonicNanos() { -- return a.getAsLong(); +- return SystemUtils.a.getAsLong(); + return System.nanoTime(); // Paper } public static long getTimeMillis() { @@ -0,0 +0,0 @@ public class SystemUtils { futuretask.run(); - return (V)futuretask.get(); + return futuretask.get(); } catch (ExecutionException executionexception) { - logger.fatal("Error executing task", executionexception); + logger.fatal("Error executing task", executionexception.getCause() != null ? executionexception.getCause() : executionexception); // Paper } catch (InterruptedException interruptedexception) { logger.fatal("Error executing task", interruptedexception); } +@@ -0,0 +0,0 @@ public class SystemUtils { + public static T b(Iterable iterable, @Nullable T t0) { + Iterator iterator = iterable.iterator(); + +- Object object; +- Object object1; ++ T object; // Paper - decompile fix ++ T object1; // Paper - decompile fix + + for (object1 = null; iterator.hasNext(); object1 = object) { + object = iterator.next(); @@ -0,0 +0,0 @@ public class SystemUtils { } diff --git a/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index bc2808b8f5..6b72291281 100644 --- a/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 91404cc5a..5552b64fb 100644 +index 2c4465fff..95fe3a91b 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/Make-portal-teleportation-adjustment-math-more-accur.patch b/Spigot-Server-Patches/Make-portal-teleportation-adjustment-math-more-accur.patch index 7c3f60161e..b1d7341f98 100644 --- a/Spigot-Server-Patches/Make-portal-teleportation-adjustment-math-more-accur.patch +++ b/Spigot-Server-Patches/Make-portal-teleportation-adjustment-math-more-accur.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make portal teleportation adjustment math more accurate diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java -index 44c91ba26..c6933c1a3 100644 +index 13f0fb0b6..ce7181127 100644 --- a/src/main/java/net/minecraft/server/EnumDirection.java +++ b/src/main/java/net/minecraft/server/EnumDirection.java @@ -0,0 +0,0 @@ public enum EnumDirection implements INamable { @@ -22,10 +22,10 @@ index 44c91ba26..c6933c1a3 100644 + public final EnumDirection rotateY() { return e(); } // Paper - OBFHELPER public EnumDirection e() { - switch(this) { + switch (this) { case NORTH: @@ -0,0 +0,0 @@ public enum EnumDirection implements INamable { - this.d = s1; + this.d = s; } + public final int getOffset() { return a(); } // Paper - OBFHELPER @@ -33,17 +33,17 @@ index 44c91ba26..c6933c1a3 100644 return this.c; } diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java -index d53d0c242..49fba0979 100644 +index 52918b971..8bb2593aa 100644 --- a/src/main/java/net/minecraft/server/MathHelper.java +++ b/src/main/java/net/minecraft/server/MathHelper.java @@ -0,0 +0,0 @@ public class MathHelper { - } + return f < f1 ? f1 : (f > f2 ? f2 : f); } + public static double clamp(double d0, double d1, double d2) { return a(d0, d1, d2); } // Paper - OBFHELPER public static double a(double d0, double d1, double d2) { - if (d0 < d1) { - return d1; + return d0 < d1 ? d1 : (d0 > d2 ? d2 : d0); + } diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java index a24bd02d5..d30a8a6bd 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java @@ -79,7 +79,7 @@ index a24bd02d5..d30a8a6bd 100644 float f1 = 0.0F; float f2 = 0.0F; diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java -index 78234cbdd..daeb3f83e 100644 +index 8ba4da0ea..8716f5fd9 100644 --- a/src/main/java/net/minecraft/server/ShapeDetector.java +++ b/src/main/java/net/minecraft/server/ShapeDetector.java @@ -0,0 +0,0 @@ public class ShapeDetector { 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 01a17941e2..6c7f63592e 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 570ddc1a8..3854464e8 100644 +index ed747bc3c..f7c433b94 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 { @@ -15,6 +15,6 @@ index 570ddc1a8..3854464e8 100644 - int targetSize = (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR); + int targetSize = Math.min(this.unloadQueue.size() - 100, (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive // Spigot end + Iterator iterator = this.unloadQueue.iterator(); - LongIterator longiterator = this.unloadQueue.iterator(); -- \ No newline at end of file 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 4ded7116d2..5fbff4c161 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 55cb7b88e..f7990fbdb 100644 +index edae53b82..42b76b212 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/Mob-Pathfinding-API.patch b/Spigot-Server-Patches/Mob-Pathfinding-API.patch index 202a25b7b3..c29bd7cf78 100644 --- a/Spigot-Server-Patches/Mob-Pathfinding-API.patch +++ b/Spigot-Server-Patches/Mob-Pathfinding-API.patch @@ -125,7 +125,7 @@ index 000000000..ed3d86ddd + } +} diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index efdfa7195..113fd9a50 100644 +index c55aadb53..cac0ce2a3 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 { @@ -173,13 +173,13 @@ index efdfa7195..113fd9a50 100644 this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java -index 5ffcda6d5..dae08cbbf 100644 +index 31fc1fbc6..5cf7f3bf1 100644 --- a/src/main/java/net/minecraft/server/PathEntity.java +++ b/src/main/java/net/minecraft/server/PathEntity.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - import javax.annotation.Nullable; +@@ -0,0 +0,0 @@ import javax.annotation.Nullable; public class PathEntity { + - private final PathPoint[] a; + private final PathPoint[] a; public PathPoint[] getPoints() { return a; } // Paper - OBFHELPER private PathPoint[] b = new PathPoint[0]; @@ -209,16 +209,16 @@ index 5ffcda6d5..dae08cbbf 100644 - public Vec3D f() { + public Vec3D getNext() { return f(); } public Vec3D f() { // Paper - OBFHELPER PathPoint pathpoint = this.a[this.e]; - return new Vec3D((double)pathpoint.a, (double)pathpoint.b, (double)pathpoint.c); - } + + return new Vec3D((double) pathpoint.a, (double) pathpoint.b, (double) pathpoint.c); diff --git a/src/main/java/net/minecraft/server/PathPoint.java b/src/main/java/net/minecraft/server/PathPoint.java -index 497f47223..7fd1eff0b 100644 +index 78ed00286..0dd6e46d1 100644 --- a/src/main/java/net/minecraft/server/PathPoint.java +++ b/src/main/java/net/minecraft/server/PathPoint.java -@@ -0,0 +0,0 @@ - package net.minecraft.server; +@@ -0,0 +0,0 @@ package net.minecraft.server; public class PathPoint { + - public final int a; - public final int b; - public final int c; 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 5884fc0dbe..957729dae9 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 ba690d5bd0..1dce60f8cc 100644 +index 51ba4a804..088c0147a 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/Optimise-BlockStateEnum-hashCode-and-equals.patch b/Spigot-Server-Patches/Optimise-BlockStateEnum-hashCode-and-equals.patch index 00c6b16dc9..fecd49cd20 100644 --- a/Spigot-Server-Patches/Optimise-BlockStateEnum-hashCode-and-equals.patch +++ b/Spigot-Server-Patches/Optimise-BlockStateEnum-hashCode-and-equals.patch @@ -5,11 +5,11 @@ 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 73623a21c5..9d8a03be8d 100644 +index 986b9ccea..259da0aa0 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java -@@ -0,0 +0,0 @@ import java.util.Arrays; - import java.util.Collection; +@@ -0,0 +0,0 @@ import java.util.Collection; + import java.util.Iterator; import java.util.Map; import java.util.Optional; +import java.util.concurrent.atomic.AtomicInteger; @@ -28,15 +28,8 @@ index 73623a21c5..9d8a03be8d 100644 protected BlockStateEnum(String s, Class oclass, Collection collection) { super(s, oclass); this.a = ImmutableSet.copyOf(collection); - -- for(Enum oenum : collection) { -+ this.hashCode = hashId.getAndIncrement() * 61; // Paper -+ for(T oenum : collection) { // Paper - decompile fix - String s1 = ((INamable)oenum).getName(); - if (this.b.containsKey(s1)) { - throw new IllegalArgumentException("Multiple values have the same name '" + s1 + "'"); @@ -0,0 +0,0 @@ public class BlockStateEnum & INamable> extends BlockState - return ((INamable)oenum).getName(); + return ((INamable) t0).getName(); } + @Override // Paper start - override equals as BlockStateEnum is a singleton @@ -44,17 +37,19 @@ index 73623a21c5..9d8a03be8d 100644 - if (this == object) { - return true; - } else if (object instanceof BlockStateEnum && super.equals(object)) { -- BlockStateEnum blockstateenum1 = (BlockStateEnum)object; -- return this.a.equals(blockstateenum1.a) && this.b.equals(blockstateenum1.b); +- BlockStateEnum blockstateenum = (BlockStateEnum) object; +- +- return this.a.equals(blockstateenum.a) && this.b.equals(blockstateenum.b); - } else { - return false; - } -+ return this == object; ++ return this == object; + // Paper end - override equals as BlockStateEnum is a singleton } public int c() { - int i = super.c(); +- - i = 31 * i + this.a.hashCode(); - i = 31 * i + this.b.hashCode(); - return i; diff --git a/Spigot-Server-Patches/Optimise-removeQueue.patch b/Spigot-Server-Patches/Optimise-removeQueue.patch index 3ea05fae57..5845858aa9 100644 --- a/Spigot-Server-Patches/Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/Optimise-removeQueue.patch @@ -5,15 +5,14 @@ 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 13c538043..c07332e1b 100644 +index 742385ad1..a37af03d2 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; +@@ -0,0 +0,0 @@ import com.google.common.collect.Lists; + import com.mojang.authlib.GameProfile; import io.netty.buffer.Unpooled; import io.netty.util.concurrent.Future; - import io.netty.util.concurrent.GenericFutureListener; +import java.util.ArrayDeque; // Paper - import java.util.ArrayList; import java.util.Collection; +import java.util.Deque; // Paper import java.util.Iterator; @@ -32,8 +31,8 @@ index 13c538043..c07332e1b 100644 while (!this.removeQueue.isEmpty()) { int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); int[] aint = new int[i]; -- Iterator iterator = this.removeQueue.iterator(); -+ //Iterator iterator = this.removeQueue.iterator(); // Paper +- Iterator iterator = this.removeQueue.iterator(); ++ //Iterator iterator = this.removeQueue.iterator(); // Paper int j = 0; - while (iterator.hasNext() && j < i) { diff --git a/Spigot-Server-Patches/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index 84f15a63e6..c4e68c7430 100644 --- a/Spigot-Server-Patches/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/Spigot-Server-Patches/Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Uses an EnumMap as well as a Set paired List for O(1) contains calls. diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 7703744d3..21843209d 100644 +index c399bdecc..3496d4236 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java @@ -0,0 +0,0 @@ public abstract class BiomeBase { @@ -19,24 +19,15 @@ index 7703744d3..21843209d 100644 @Nullable public static BiomeBase a(BiomeBase biomebase) { @@ -0,0 +0,0 @@ public abstract class BiomeBase { - } + for (j = 0; j < i; ++j) { + EnumCreatureType enumcreaturetype = aenumcreaturetype[j]; - for(EnumCreatureType enumcreaturetype : EnumCreatureType.values()) { - this.aZ.put(enumcreaturetype, Lists.newArrayList()); + this.aZ.put(enumcreaturetype, new MobList()); // Paper } } else { @@ -0,0 +0,0 @@ public abstract class BiomeBase { - public void a(WorldGenStage.Decoration worldgenstage$decoration, ChunkGenerator chunkgenerator, GeneratorAccess generatoraccess, long ix, SeededRandom seededrandom, BlockPosition blockposition) { - int jx = 0; - -- for(WorldGenFeatureComposite worldgenfeaturecomposite : (List)this.aW.get(worldgenstage$decoration)) { -+ for(WorldGenFeatureComposite worldgenfeaturecomposite : this.aW.get(worldgenstage$decoration)) { // Paper - decompile fix - seededrandom.b(ix, jx, worldgenstage$decoration.ordinal()); - worldgenfeaturecomposite.a(generatoraccess, chunkgenerator, seededrandom, blockposition, WorldGenFeatureConfiguration.e); - ++jx; -@@ -0,0 +0,0 @@ public abstract class BiomeBase { } @@ -72,7 +63,7 @@ index 7703744d3..21843209d 100644 + } + // Paper end + - public static class BiomeMeta extends WeightedRandom.WeightedRandomChoice { - public EntityTypes b; - public int c; + public static class a { + + @Nullable -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/Optimize-BlockPosition-helper-methods.patch index 942711e11d..1fee3344c1 100644 --- a/Spigot-Server-Patches/Optimize-BlockPosition-helper-methods.patch +++ b/Spigot-Server-Patches/Optimize-BlockPosition-helper-methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize BlockPosition helper methods Resolves #1338 diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 9ce3cd9c9..adf648dfd 100644 +index f260068c6..cf3cf1c25 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 { @@ -17,9 +17,9 @@ index 9ce3cd9c9..adf648dfd 100644 + return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); // Paper - Optimize BlockPosition } - public BlockPosition up(int ix) { -- return this.shift(EnumDirection.UP, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY() + ix, this.getZ()); // Paper - Optimize BlockPosition + public BlockPosition up(int i) { +- return this.shift(EnumDirection.UP, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY() + i, this.getZ()); // Paper - Optimize BlockPosition } public BlockPosition down() { @@ -27,9 +27,9 @@ index 9ce3cd9c9..adf648dfd 100644 + return new BlockPosition(this.getX(), this.getY() - 1, this.getZ()); // Paper - Optimize BlockPosition } - public BlockPosition down(int ix) { -- return this.shift(EnumDirection.DOWN, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY() - ix, this.getZ()); // Paper - Optimize BlockPosition + public BlockPosition down(int i) { +- return this.shift(EnumDirection.DOWN, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY() - i, this.getZ()); // Paper - Optimize BlockPosition } public BlockPosition north() { @@ -37,9 +37,9 @@ index 9ce3cd9c9..adf648dfd 100644 + return new BlockPosition(this.getX(), this.getY(), this.getZ() - 1); // Paper - Optimize BlockPosition } - public BlockPosition north(int ix) { -- return this.shift(EnumDirection.NORTH, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() - ix); // Paper - Optimize BlockPosition + public BlockPosition north(int i) { +- return this.shift(EnumDirection.NORTH, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() - i); // Paper - Optimize BlockPosition } public BlockPosition south() { @@ -47,9 +47,9 @@ index 9ce3cd9c9..adf648dfd 100644 + return new BlockPosition(this.getX(), this.getY(), this.getZ() + 1); // Paper - Optimize BlockPosition } - public BlockPosition south(int ix) { -- return this.shift(EnumDirection.SOUTH, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() + ix); // Paper - Optimize BlockPosition + public BlockPosition south(int i) { +- return this.shift(EnumDirection.SOUTH, i); ++ return i == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() + i); // Paper - Optimize BlockPosition } public BlockPosition west() { @@ -57,9 +57,9 @@ index 9ce3cd9c9..adf648dfd 100644 + return new BlockPosition(this.getX() - 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition } - public BlockPosition west(int ix) { -- return this.shift(EnumDirection.WEST, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX() - ix, this.getY(), this.getZ()); // Paper - Optimize BlockPosition + public BlockPosition west(int i) { +- return this.shift(EnumDirection.WEST, i); ++ return i == 0 ? this : new BlockPosition(this.getX() - i, this.getY(), this.getZ()); // Paper - Optimize BlockPosition } public BlockPosition east() { @@ -67,9 +67,9 @@ index 9ce3cd9c9..adf648dfd 100644 + return new BlockPosition(this.getX() + 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition } - public BlockPosition east(int ix) { -- return this.shift(EnumDirection.EAST, ix); -+ return ix == 0 ? this : new BlockPosition(this.getX() + ix, this.getY(), this.getZ()); // Paper - Optimize BlockPosition + public BlockPosition east(int i) { +- return this.shift(EnumDirection.EAST, i); ++ return i == 0 ? this : new BlockPosition(this.getX() + i, this.getY(), this.getZ()); // Paper - Optimize BlockPosition } public BlockPosition shift(EnumDirection enumdirection) { @@ -94,30 +94,5 @@ index 9ce3cd9c9..adf648dfd 100644 + // Paper End } - public BlockPosition shift(EnumDirection enumdirection, int ix) { -- return ix == 0 ? this : new BlockPosition(this.getX() + enumdirection.getAdjacentX() * ix, this.getY() + enumdirection.getAdjacentY() * ix, this.getZ() + enumdirection.getAdjacentZ() * ix); -+ // Paper Start - Optimize BlockPosition -+ if (ix == 0) { -+ return this; -+ } -+ switch(enumdirection) { -+ case UP: -+ return new BlockPosition(this.getX(), this.getY() + ix, this.getZ()); -+ case DOWN: -+ return new BlockPosition(this.getX(), this.getY() - ix, this.getZ()); -+ case NORTH: -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - ix); -+ case SOUTH: -+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + ix); -+ case WEST: -+ return new BlockPosition(this.getX() - ix, this.getY(), this.getZ()); -+ case EAST: -+ return new BlockPosition(this.getX() + ix, this.getY(), this.getZ()); -+ default: -+ return new BlockPosition(this.getX() + enumdirection.getAdjacentX() * ix, this.getY() + enumdirection.getAdjacentY() * ix, this.getZ() + enumdirection.getAdjacentZ() * ix); -+ } -+ // Paper End - } - - public BlockPosition a(EnumBlockRotation enumblockrotation) { + public BlockPosition shift(EnumDirection enumdirection, int i) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-Chunk-Access.patch b/Spigot-Server-Patches/Optimize-Chunk-Access.patch index 02c47ef238..d576c6c7a0 100644 --- a/Spigot-Server-Patches/Optimize-Chunk-Access.patch +++ b/Spigot-Server-Patches/Optimize-Chunk-Access.patch @@ -71,7 +71,7 @@ index 732c8793e..8b3738c8f 100644 public Chunk remove(Object object) { return this.remove((Long) object); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 557aa5180..1d08ec37f 100644 +index 9a8894238..fd68f06fe 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-CraftBlockData-Creation.patch b/Spigot-Server-Patches/Optimize-CraftBlockData-Creation.patch index aa7c262d90..6ca258e949 100644 --- a/Spigot-Server-Patches/Optimize-CraftBlockData-Creation.patch +++ b/Spigot-Server-Patches/Optimize-CraftBlockData-Creation.patch @@ -7,7 +7,7 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData and cloning it when one is needed. diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java -index fbe181c1f..bd86cd2e5 100644 +index 4dd6c3276..1b226a77e 100644 --- a/src/main/java/net/minecraft/server/BlockData.java +++ b/src/main/java/net/minecraft/server/BlockData.java @@ -0,0 +0,0 @@ @@ -17,10 +17,10 @@ index fbe181c1f..bd86cd2e5 100644 +import org.bukkit.craftbukkit.block.data.CraftBlockData; public class BlockData extends BlockDataAbstract implements IBlockData { - public BlockData(Block block, ImmutableMap, Comparable> immutablemap) { + @@ -0,0 +0,0 @@ public class BlockData extends BlockDataAbstract implements I public Block getBlock() { - return this.e_; + return (Block) this.e_; } + + // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time @@ -34,7 +34,7 @@ index fbe181c1f..bd86cd2e5 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 1423419b9..2d855aae6 100644 +index e4e4c5513..08a5acb0a 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 { @@ -47,7 +47,7 @@ index 1423419b9..2d855aae6 100644 return this.getBlock().n(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 57f483367..8ac8969e2 100644 +index 8c110c67d..808826588 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -0,0 +0,0 @@ public class CraftBlockData implements BlockData { diff --git a/Spigot-Server-Patches/Optimize-Hoppers.patch b/Spigot-Server-Patches/Optimize-Hoppers.patch index ef78dad8b6..0762f6b126 100644 --- a/Spigot-Server-Patches/Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/Optimize-Hoppers.patch @@ -31,7 +31,7 @@ index 10efe6b3d..6feea98b6 100644 private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 569f301a2..d32ea9c92 100644 +index e0091358a..99dab7a47 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 { @@ -47,7 +47,7 @@ index 569f301a2..d32ea9c92 100644 itemstack.d(this.B()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 928dbf032..aaefb98c0 100644 +index 5a0dbcb42..59a71e5b0 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 @@ -81,7 +81,7 @@ index 29fe031d8..d67fd92d9 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 15e4a37fb..5291c1836 100644 +index 559eedfa6..7303a6fdd 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-Light-Recalculations.patch b/Spigot-Server-Patches/Optimize-Light-Recalculations.patch index 2266f6893f..eed9d6ef3e 100644 --- a/Spigot-Server-Patches/Optimize-Light-Recalculations.patch +++ b/Spigot-Server-Patches/Optimize-Light-Recalculations.patch @@ -14,7 +14,7 @@ Also optimizes to not repeatedly look up the same chunk for light lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6255aa285..9695af028 100644 +index 6d3f5b651..9ac594dcb 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 { @@ -36,7 +36,7 @@ index 6255aa285..9695af028 100644 int i1 = iblockdata.b(this.world, blockposition); int j1 = iblockdata1.b(this.world, blockposition); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d736ac63d..4421be836 100644 +index b5b0fcf8c..88f8145c4 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Optimize-Pathfinding.patch b/Spigot-Server-Patches/Optimize-Pathfinding.patch index a57aaf545c..534a619d5b 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 d1d16b25d0..5d6f726d05 100644 +index 2d788ef66..60b5068e3 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 { @@ -20,8 +20,8 @@ index d1d16b25d0..5d6f726d05 100644 + } + PathEntity pathentity = this.a(entity); + - return pathentity != null && this.a(pathentity, d0); -+ + if (pathentity != null && this.a(pathentity, d0)) { + this.lastFailure = 0; + this.pathfindFailures = 0; diff --git a/Spigot-Server-Patches/Optimize-Region-File-Cache.patch b/Spigot-Server-Patches/Optimize-Region-File-Cache.patch index 9fdfe93baf..256377d4c7 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 c0ab543b9..15666325e 100644 +index 964996976..d07222239 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 d3bb662947..75336b7b4a 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 d03ac0e70..9242999f7 100644 +index 5a5c464ea..37641fa86 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 { @@ -16,21 +16,21 @@ index d03ac0e70..9242999f7 100644 + private java.util.BitSet usedIds; // Paper public RegistryID(int i) { - i = (int)((float)i / 0.8F); - this.b = (K[])(new Object[i]); + i = (int) ((float) i / 0.8F); + this.b = (K[]) (new Object[i]); // Paper - decompile fix this.c = new int[i]; - this.d = (K[])(new Object[i]); + this.d = (K[]) (new Object[i]); // Paper - decompile fix + this.usedIds = new java.util.BitSet(); // Paper } - public int getId(@Nullable K object) { + 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) { + while (this.e < this.d.length && this.d[this.e] != null) { ++this.e; } + */ @@ -40,23 +40,23 @@ index d03ac0e70..9242999f7 100644 return this.e; } @@ -0,0 +0,0 @@ public class RegistryID implements Registry { - this.d = (K[])(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) { + for (int j = 0; j < ak.length; ++j) { + if (ak[j] != null) { @@ -0,0 +0,0 @@ public class RegistryID implements Registry { - this.b[l] = object; - this.c[l] = i; - this.d[i] = object; + 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); + Arrays.fill(this.d, (Object) null); this.e = 0; this.f = 0; + this.usedIds.clear(); // Paper diff --git a/Spigot-Server-Patches/Optimize-RegistryMaterials.patch b/Spigot-Server-Patches/Optimize-RegistryMaterials.patch index e4bd9a733f..568884e362 100644 --- a/Spigot-Server-Patches/Optimize-RegistryMaterials.patch +++ b/Spigot-Server-Patches/Optimize-RegistryMaterials.patch @@ -8,18 +8,29 @@ Use larger initial sizes to increase bucket capacity on the BiMap BiMap.get was seen to be using a good bit of CPU time. diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java -index 83ce386e0..a47110bba 100644 +index 1521ed759..78de740ac 100644 --- a/src/main/java/net/minecraft/server/RegistryMaterials.java +++ b/src/main/java/net/minecraft/server/RegistryMaterials.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - public class RegistryMaterials implements IRegistry { + protected static final Logger a = LogManager.getLogger(); -- protected final RegistryID b = new RegistryID(256); +- protected final RegistryID b = new RegistryID<>(256); - protected final BiMap c = HashBiMap.create(); +- protected Object[] d; + protected final RegistryID b = new RegistryID(2048); // Paper - use bigger expected size to reduce collisions + protected final BiMap c = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions - protected Object[] d; ++ protected V[] d; // Paper - Decompile fix private int x; + public RegistryMaterials() {} +@@ -0,0 +0,0 @@ public class RegistryMaterials implements IRegistry { + return null; + } + +- this.d = collection.toArray(new Object[collection.size()]); ++ this.d = (V[]) collection.toArray(new Object[collection.size()]); // Paper - Decompile fix + } + + return this.d[random.nextInt(this.d.length)]; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-Server-World-Map.patch b/Spigot-Server-Patches/Optimize-Server-World-Map.patch index 1a91350e6b..2fa7c0e992 100644 --- a/Spigot-Server-Patches/Optimize-Server-World-Map.patch +++ b/Spigot-Server-Patches/Optimize-Server-World-Map.patch @@ -217,7 +217,7 @@ index 000000000..af9e4455c + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 175198818..63b5cdd41 100644 +index 11510640a..d0be8d2fb 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-TileEntity-Ticking.patch b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch index cd0c5db9ec..320b098689 100644 --- a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch @@ -4,21 +4,8 @@ Date: Sun, 8 Mar 2015 22:55:25 -0600 Subject: [PATCH] Optimize TileEntity Ticking -diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 9ffec378a9..5401f7d754 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 - } - - private boolean b(World world, BlockPosition blockposition) { -- List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); -+ List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); // Paper - decompile fix - if (!list.isEmpty()) { - for(EntityOcelot entityocelot : list) { - if (entityocelot.isSitting()) { diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index ad601a39d9..9573a4ecdf 100644 +index 2b03896e2..c46b761cc 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; @@ -47,7 +34,7 @@ index ad601a39d9..9573a4ecdf 100644 + // Paper end this.f = 0; f = 5.0F; - List list = this.world.a(EntityHuman.class, new AxisAlignedBB((double) ((float) i - 5.0F), (double) ((float) j - 5.0F), (double) ((float) k - 5.0F), (double) ((float) (i + 1) + 5.0F), (double) ((float) (j + 1) + 5.0F), (double) ((float) (k + 1) + 5.0F))); + List list = this.world.a(EntityHuman.class, new AxisAlignedBB((double) ((float) i - 5.0F), (double) ((float) j - 5.0F), (double) ((float) k - 5.0F), (double) ((float) (i + 1) + 5.0F), (double) ((float) (j + 1) + 5.0F), (double) ((float) (k + 1) + 5.0F))); @@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { } } @@ -104,7 +91,7 @@ index ad601a39d9..9573a4ecdf 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 05de26405e..bc851d2a04 100644 +index ee19595d3..f2df6f395 100644 --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java @@ -0,0 +0,0 @@ @@ -112,9 +99,9 @@ index 05de26405e..bc851d2a04 100644 -public class TileEntityEnderChest extends TileEntity implements ITickable { +public class TileEntityEnderChest extends TileEntity { // Paper - Remove ITickable + public float a; public float e; - public int f; @@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { } @@ -124,7 +111,9 @@ index 05de26405e..bc851d2a04 100644 int i = this.position.getX(); int j = this.position.getY(); int k = this.position.getZ(); - float fx = 0.1F; + float f = 0.1F; + double d0; + + */ + // Paper start + } @@ -134,9 +123,11 @@ index 05de26405e..bc851d2a04 100644 + int k = this.position.getZ(); + // Paper end if (this.f > 0 && this.a == 0.0F) { - double d0 = (double)i + 0.5D; - double d1 = (double)k + 0.5D; - this.world.a((EntityHuman)null, d0, (double)j + 0.5D, d1, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + double d1 = (double) i + 0.5D; + +- d0 = (double) k + 0.5D; ++ double d0 = (double) k + 0.5D; // Paper + this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); } - + // Paper start @@ -149,8 +140,8 @@ index 05de26405e..bc851d2a04 100644 + double d0; + // Paper end if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) { - float f2 = this.a; - if (this.f > 0) { + float f1 = this.a; + @@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { public void c() { ++this.f; diff --git a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch index 07743d1518..19de0a7f09 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 1c09dded9..edf72fbec 100644 +index 3ff271869..7710962ce 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 1c09dded9..edf72fbec 100644 // Spigot end } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index d1197b959..51c2c5dd7 100644 +index f782ecb82..65d230d45 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 { @@ -37,7 +37,7 @@ index d1197b959..51c2c5dd7 100644 if (date == null) { @@ -0,0 +0,0 @@ public class UserCache { - UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date); // CraftBukkit - decompile error + UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date); - if (this.e.containsKey(uuid)) { + //if (this.e.containsKey(uuid)) { // Paper diff --git a/Spigot-Server-Patches/Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/Optimize-World-Time-Updates.patch index f087133840..cab5b754d9 100644 --- a/Spigot-Server-Patches/Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/Optimize-World-Time-Updates.patch @@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 32aee07d1..55e7dfa17 100644 +index 84d588122..f3f7d2aa1 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-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch index a106c65731..57df438d9e 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 3740cdf95d..785611f0e2 100644 +index b07229875..fdfa5a8a1 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Optimize-and-Fix-ExpiringMap-Issues.patch b/Spigot-Server-Patches/Optimize-and-Fix-ExpiringMap-Issues.patch index 7221bc5024..92d72ba8d9 100644 --- a/Spigot-Server-Patches/Optimize-and-Fix-ExpiringMap-Issues.patch +++ b/Spigot-Server-Patches/Optimize-and-Fix-ExpiringMap-Issues.patch @@ -14,27 +14,27 @@ manipulation, and instead to run clean once per tick per active expiring map. diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -index 39a548881..37ea37de5 100644 +index a23768441..835a2aae4 100644 --- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java @@ -0,0 +0,0 @@ public abstract class ChunkGeneratorAbstract implem public Long2ObjectMap getStructureStartCache(StructureGenerator structuregenerator) { - return (Long2ObjectMap) this.d.computeIfAbsent(structuregenerator, (s) -> { -- return Long2ObjectMaps.synchronize(new ExpiringMap(8192, 10000)); -+ return new ExpiringMap(8192, 10000); // Paper - already synchronized + return (Long2ObjectMap) this.d.computeIfAbsent(structuregenerator, (structuregenerator1) -> { +- return Long2ObjectMaps.synchronize(new ExpiringMap<>(8192, 10000)); ++ return new ExpiringMap<>(8192, 10000); // Paper - already synchronized }); } public Long2ObjectMap getStructureCache(StructureGenerator structuregenerator) { - return (Long2ObjectMap) this.e.computeIfAbsent(structuregenerator, (s) -> { -- return Long2ObjectMaps.synchronize(new ExpiringMap(8192, 10000)); -+ return new ExpiringMap(8192, 10000); // Paper - already synchronized + return (Long2ObjectMap) this.e.computeIfAbsent(structuregenerator, (structuregenerator1) -> { +- return Long2ObjectMaps.synchronize(new ExpiringMap<>(8192, 10000)); ++ return new ExpiringMap<>(8192, 10000); // Paper - already synchronized }); } diff --git a/src/main/java/net/minecraft/server/ExpiringMap.java b/src/main/java/net/minecraft/server/ExpiringMap.java -index 9c0518d67..84a6dcb40 100644 +index bd3636479..bf6095137 100644 --- a/src/main/java/net/minecraft/server/ExpiringMap.java +++ b/src/main/java/net/minecraft/server/ExpiringMap.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -80,8 +80,8 @@ index 9c0518d67..84a6dcb40 100644 + } - this.b.put(i, j); -- cleanup(); - // CraftBukkit start +- cleanup(); + @Override + public T compute(long l, BiFunction biFunction) { + setAccess(l); @@ -90,7 +90,8 @@ index 9c0518d67..84a6dcb40 100644 - public void cleanup() { - long j = SystemUtils.getMonotonicMillis(); -- ObjectIterator objectiterator = this.b.long2LongEntrySet().iterator(); // CraftBukkit - decompile error +- // CraftBukkit end +- ObjectIterator objectiterator = this.b.long2LongEntrySet().iterator(); + @Override + public T putIfAbsent(long l, T t) { + setAccess(l); @@ -99,7 +100,7 @@ index 9c0518d67..84a6dcb40 100644 - while (objectiterator.hasNext()) { - Long2LongMap.Entry entry = (Long2LongMap.Entry) objectiterator.next(); // CraftBukkit - decompile error -- T object = super.get(entry.getLongKey()); // CraftBukkit - decompile error +- T t0 = super.get(entry.getLongKey()); + @Override + public T computeIfPresent(long l, BiFunction biFunction) { + setAccess(l); @@ -115,10 +116,11 @@ index 9c0518d67..84a6dcb40 100644 + return super.computeIfAbsent(l, longFunction); + } -- if (object != null && this.a(object)) { +- if (t0 != null && this.a(t0)) { - super.remove(entry.getLongKey()); - objectiterator.remove(); - } ++ + @Override + public boolean replace(long l, T t, T v1) { + setAccess(l); @@ -173,7 +175,6 @@ index 9c0518d67..84a6dcb40 100644 + ttl.clear(); + super.clear(); } -- // CraftBukkit end + } + private boolean registered = false; @@ -271,23 +272,25 @@ index 9c0518d67..84a6dcb40 100644 + public T remove(Object var1) { throw new RuntimeException("Not implemented"); } -- -- // CraftBukkit start -- @Override -- public T computeIfAbsent(long l, LongFunction lf) { + ++ // Paper start ++ /* + // CraftBukkit start + @Override + public T computeIfAbsent(long l, LongFunction lf) { - this.b.put(l, SystemUtils.getMonotonicMillis()); -- return super.computeIfAbsent(l, lf); -- } -- -- @Override -- public ObjectCollection values() { -- cleanup(); -- return super.values(); -- } -- // CraftBukkit end ++ this.ttl.put(l, SystemUtils.getMonotonicMillis()); // Paper + return super.computeIfAbsent(l, lf); + } + +@@ -0,0 +0,0 @@ public class ExpiringMap extends Long2ObjectOpenHashMap { + return super.values(); + } + // CraftBukkit end ++ */ // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aaefb98c0..0bc1c887a 100644 +index 59a71e5b0..7b24f6e24 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 9da2c7d73f..08f2a76827 100644 --- a/Spigot-Server-Patches/Optimize-explosions.patch +++ b/Spigot-Server-Patches/Optimize-explosions.patch @@ -25,7 +25,7 @@ index 5aee23dce..2ec3d9355 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 92e3a49e2..10c415b37 100644 +index c4db6367e..3e44b2d54 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 92e3a49e2..10c415b37 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 194f8441e..eef8d2b5a 100644 +index f547a6ad7..7a2f128d3 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,13 +136,13 @@ index 194f8441e..eef8d2b5a 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 69f55d0dd..00880d54f 100644 +index bf05c47a1..ac602abc0 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; - // CraftBukkit start import com.google.common.collect.Maps; + import java.util.ArrayList; +import java.util.HashMap; // Paper import java.util.Map; import org.bukkit.Bukkit; diff --git a/Spigot-Server-Patches/Optimize-getChunkIfLoaded-type-calls.patch b/Spigot-Server-Patches/Optimize-getChunkIfLoaded-type-calls.patch index 019c97aedd..902b45fd63 100644 --- a/Spigot-Server-Patches/Optimize-getChunkIfLoaded-type-calls.patch +++ b/Spigot-Server-Patches/Optimize-getChunkIfLoaded-type-calls.patch @@ -10,7 +10,7 @@ Will improve inlining across many hot methods. Improve getBrightness to not do double chunk map lookups. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 5462962c0..b9f8a86aa 100644 +index f7c433b94..fce3f673d 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 { @@ -23,7 +23,7 @@ index 5462962c0..b9f8a86aa 100644 neighbor.setNeighborUnloaded(-x, -z); chunk.setNeighborUnloaded(x, z); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 67b20c056..b1c181a50 100644 +index a95c8df4b..cd56ca04e 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -55,7 +55,7 @@ index 67b20c056..b1c181a50 100644 return chunk != null && !chunk.isEmpty(); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d42827d87..91404cc5a 100644 +index e0b466d0c..2c4465fff 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/Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch index d9af5aa4bb..6b15d134d6 100644 --- a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward. Optimize getType and getBlockData to manually inline and optimize the calls diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index f1ad18511..339e2da6b 100644 +index 5843ef65a..4c7793f86 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 { @@ -31,7 +31,7 @@ index f1ad18511..339e2da6b 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 880ce16b1..c9019260b 100644 +index 75a0f1386..507c93804 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 880ce16b1..c9019260b 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 eca041265..66520842d 100644 +index dcb036f31..182a637ad 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 { @@ -84,7 +84,7 @@ index eca041265..66520842d 100644 IBlockData iblockdata = null; diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 274c44948..7e4c79a1c 100644 +index 3c5f10ad4..621ed1fc5 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java @@ -0,0 +0,0 @@ public class ChunkSection { @@ -97,7 +97,7 @@ index 274c44948..7e4c79a1c 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 4093d3486..e109016b7 100644 +index 96442ad7d..502738b90 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -170,7 +170,7 @@ index 4093d3486..e109016b7 100644 public Fluid getFluid(BlockPosition blockposition) { - if (k(blockposition)) { + if (blockposition.isInvalidYLocation()) { // Paper - return FluidTypes.a.i(); + return FluidTypes.EMPTY.i(); } else { Chunk chunk = this.getChunkAtWorldCoords(blockposition); @@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Optimize-redstone-algorithm.patch b/Spigot-Server-Patches/Optimize-redstone-algorithm.patch index b62e87fb6a..7b558194f2 100644 --- a/Spigot-Server-Patches/Optimize-redstone-algorithm.patch +++ b/Spigot-Server-Patches/Optimize-redstone-algorithm.patch @@ -954,7 +954,7 @@ index 000000000..21d9d6d7e + } +} diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -index 0adea6a17..174e84760 100644 +index 48c79568f..a09aa6944 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java @@ -0,0 +0,0 @@ @@ -980,8 +980,6 @@ index 0adea6a17..174e84760 100644 return iblockdata1.q() || iblockdata1.getBlock() == Blocks.GLOWSTONE; } -- private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) { -- iblockdata = this.b(world, blockposition, iblockdata); + // Paper start - Optimize redstone + // The bulk of the new functionality is found in RedstoneWireTurbo.java + RedstoneWireTurbo turbo = new RedstoneWireTurbo(this); @@ -1093,25 +1091,9 @@ index 0adea6a17..174e84760 100644 + return state; + } + // Paper end -+ -+ private IBlockData a(World worldIn, BlockPosition pos, IBlockData state) { -+ state = this.b(worldIn, pos, state); - ArrayList arraylist = Lists.newArrayList(this.t); - - this.t.clear(); -@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block { - while (iterator.hasNext()) { - BlockPosition blockposition1 = (BlockPosition) iterator.next(); - -- world.applyPhysics(blockposition1, this); -+ worldIn.applyPhysics(blockposition1, this); - } - -- return iblockdata; -+ return state; - } - - private IBlockData b(World world, BlockPosition blockposition, IBlockData iblockdata) { + private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) { + iblockdata = this.b(world, blockposition, iblockdata); + List list = Lists.newArrayList(this.t); @@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block { public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1) { @@ -1140,7 +1122,7 @@ index 0adea6a17..174e84760 100644 iblockdata.a(world, blockposition, 0); world.setAir(blockposition); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c8a7f5e59..160ef3659 100644 +index a186637f5..589d3efa7 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch index e87714db15..842b3e7872 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 1506c9ed..6ae6fc3e 100644 +index fe0dde146..9d53f1118 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 @@ -21,7 +21,7 @@ index 1506c9ed..6ae6fc3e 100644 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 42478d1f..7426d14c 100644 +index 81ea9bcb4..291cc9a39 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -0,0 +0,0 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen @@ -34,7 +34,7 @@ index 42478d1f..7426d14c 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 dd309030..7cddfc38 100644 +index 53f091835..f8dda1b7a 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 dd309030..7cddfc38 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 2485b0fb..8781dea8 100644 +index 5ea517043..dc61263a3 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 { @@ -55,6 +55,7 @@ index 2485b0fb..8781dea8 100644 return false; } else { - int i = this.world.Y() ? this.world.d(blockposition, 10) : this.world.getLightLevel(blockposition); +- - return i <= this.random.nextInt(8); + // Paper start - optimized light check, returns faster + boolean passes; @@ -72,7 +73,7 @@ index 2485b0fb..8781dea8 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 03886a4f..02bebf72 100644 +index 4078a94de..5bba50461 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/Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch index b9a2475c3d..9e5ca4471b 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 @@ -20,7 +20,7 @@ index af31030dc..b6764c7ec 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 464c5cfc9..14df8e80b 100644 +index 943963047..ea4262154 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 { @@ -57,6 +57,6 @@ index 464c5cfc9..14df8e80b 100644 + + } // Paper end - End iteration skip check - All tweaking ends here } - } // Spigot end - + // Spigot end + } else { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch b/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch index 191abba4df..51b6d705d7 100644 --- a/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch +++ b/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch @@ -25,7 +25,7 @@ index 0faef7cf2..deb4ec254 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e109016b7..e614ac33a 100644 +index 502738b90..05d988ed6 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -38,7 +38,7 @@ index e109016b7..e614ac33a 100644 this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e98ba11dc..b5983957b 100644 +index 4a8cc0ff1..fa7466d64 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ import org.bukkit.event.weather.LightningStrikeEvent; 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 008f2e2217..dc40b6e402 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 @@ -21,7 +21,7 @@ index 05509e4fd..4059c7a72 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 66d2026d0..858cc1b97 100644 +index 4df291f0d..074d14b19 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 IEntityAccess, GeneratorAccess, IIBlockAc 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 c17616d443..2cb5b1eb99 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 47bfb5b62..e8417cb2e 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1a8317256..9d3234c1c 100644 +index 0d70ce797..6150b56e0 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 53ff8bf718..32b4ab3a26 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 @@ -26,7 +26,7 @@ index 276dd98fd..973ea8bca 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 8a65072fe..d162bd3d8 100644 +index f35714fa1..0ff0dff28 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 8a65072fe..d162bd3d8 100644 if (((LazyPlayerSet) event.getRecipients()).isLazy()) { for (Object recipient : minecraftServer.getPlayerList().players) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 80f595fea..7edca4284 100644 +index 452619f2f..194149eb6 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/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index e8dcf329a1..78f9dc78ca 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 00f0451ef..42d951554 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9682b0a01..876ae1639 100644 +index 192f0aedd..0004c134a 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/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index 3053396106..89b88da411 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 ccf92b011..f0fc37abf 100644 +index b423d5be5..713034015 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Paper-Metrics.patch b/Spigot-Server-Patches/Paper-Metrics.patch index 3b895062d0..f52b195b74 100644 --- a/Spigot-Server-Patches/Paper-Metrics.patch +++ b/Spigot-Server-Patches/Paper-Metrics.patch @@ -647,7 +647,7 @@ index 000000000..e257d6b36 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index cde8ec432..87a7b6980 100644 +index f0473d9bf..255b8bed0 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 { @@ -671,7 +671,7 @@ index cde8ec432..87a7b6980 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 9b40db46c..9dca5aeda 100644 +index 11c4d53df..fe3bad583 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/Paper-config-files.patch b/Spigot-Server-Patches/Paper-config-files.patch index 38a73be560..35eff7bc81 100644 --- a/Spigot-Server-Patches/Paper-config-files.patch +++ b/Spigot-Server-Patches/Paper-config-files.patch @@ -511,7 +511,7 @@ index 000000000..a73865739 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index cdfd9a8fb..b5e5c385d 100644 +index 229c25338..197d116c6 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 @@ -531,7 +531,7 @@ index cdfd9a8fb..b5e5c385d 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 f04e87c57..c93cab858 100644 +index 5289325a2..b1a4a6d70 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 { @@ -548,7 +548,7 @@ index f04e87c57..c93cab858 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 207bad41e..bcdc790ba 100644 +index ee16fac91..b8abd6363 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; @@ -561,7 +561,7 @@ index 207bad41e..bcdc790ba 100644 import java.util.function.Function; import java.util.stream.Stream; @@ -0,0 +0,0 @@ public class EntityTypes { - return new EntityTypes(this.a, this.b, this.c, this.d, type); + return new EntityTypes<>(this.a, this.b, this.c, this.d, type); } } + @@ -572,7 +572,7 @@ index 207bad41e..bcdc790ba 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 673764369..0920ef2d1 100644 +index 6ea9eaa1a..5531f5205 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -667,7 +667,7 @@ index 8b51997fc..e9ea75579 100644 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 95f7a9587..87bc8e2d9 100644 +index 2578c4957..d3c2abc39 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/Pass-world-to-Village-creation.patch b/Spigot-Server-Patches/Pass-world-to-Village-creation.patch index 4a7d93e228..533d4ae55d 100644 --- a/Spigot-Server-Patches/Pass-world-to-Village-creation.patch +++ b/Spigot-Server-Patches/Pass-world-to-Village-creation.patch @@ -6,20 +6,20 @@ Subject: [PATCH] Pass world to Village creation fixes NPE bug #95 diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java -index d58f6b2a86..d14a9e3a3e 100644 +index 98c6bbc18..7a9fb9753 100644 --- a/src/main/java/net/minecraft/server/PersistentVillage.java +++ b/src/main/java/net/minecraft/server/PersistentVillage.java @@ -0,0 +0,0 @@ public class PersistentVillage extends PersistentBase { - for(int i = 0; i < nbttaglist.size(); ++i) { + for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i); - Village village = new Village(); + Village village = new Village(world); // Paper + village.a(nbttagcompound1); this.villages.add(village); - } diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index f87e8e05af..bda67faefe 100644 +index 22b9cce4b..c99d4debc 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/Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch index 32dc4ebe2f..9a51a0e5a1 100644 --- a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch @@ -5,24 +5,24 @@ Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index 286c1b14..ff14b3e0 100644 +index 62fba42c3..48fecffdf 100644 --- a/src/main/java/net/minecraft/server/IChatBaseComponent.java +++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java @@ -0,0 +0,0 @@ public interface IChatBaseComponent extends Message, Iterable { + } - public PacketPlayOutTitle() { } + // Paper start + public net.md_5.bungee.api.chat.BaseComponent[] components; @@ -36,11 +36,8 @@ index 267b69de..29cbe15a 100644 + } + // Paper end - public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle$enumtitleaction, IChatBaseComponent ichatbasecomponent) { - this(packetplayouttitle$enumtitleaction, ichatbasecomponent, -1, -1, -1); -@@ -0,0 +0,0 @@ public class PacketPlayOutTitle implements Packet { public void b(PacketDataSerializer packetdataserializer) throws IOException { - packetdataserializer.a((Enum)this.a); + packetdataserializer.a((Enum) this.a); if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) { - packetdataserializer.a(this.b); + // Paper start @@ -54,7 +51,7 @@ index 267b69de..29cbe15a 100644 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2ab720d7..9e51bac8 100644 +index 1a4527f30..512019db4 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/Player-affects-spawning-API.patch b/Spigot-Server-Patches/Player-affects-spawning-API.patch index 7502d6b7f8..fd495ed08f 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 05360531c..1aec6d7c3 100644 +index 4308269d4..70d5a69f8 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 05360531c..1aec6d7c3 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 ef3c94221..ac250182b 100644 +index 42a073d70..4809af8f0 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 ef3c94221..ac250182b 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 850569f6b..f958bd5ba 100644 +index 3c566ebd0..ba40e03fc 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 850569f6b..f958bd5ba 100644 return false; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index afe039905..ff564508f 100644 +index 6ca0e19cb..4eaa5d93b 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,17 +58,17 @@ index afe039905..ff564508f 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 b116239f2..73c47c517 100644 +index ed227d8e8..dab1be9b6 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; +@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.block.CraftBlockState; + import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.craftbukkit.event.CraftEventFactory; - import org.bukkit.craftbukkit.util.CraftMagicNumbers; - import org.bukkit.craftbukkit.util.LongHashSet; // Paper -+import org.bukkit.entity.Player; - import org.bukkit.event.block.BlockCanBuildEvent; ++import org.bukkit.craftbukkit.util.LongHashSet; // Paper import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; + import org.bukkit.generator.ChunkGenerator; @@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman = (EntityHuman) this.players.get(i); @@ -79,7 +79,7 @@ index b116239f2..73c47c517 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 b5afd5d1c..47da00948 100644 +index 7993581c2..4a30435a0 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/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index 56b28e9654..cdffeef6f5 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 d5adc0a24..507641fc6 100644 +index 149731353..cae5d323e 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 d5adc0a24..507641fc6 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 ca3a211a5..58a2f3d28 100644 +index da5a7b3e9..c5801122d 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 ca3a211a5..58a2f3d28 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 45f7a4143..b1cba904e 100644 +index 5a01466e2..5945089fb 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 54c1443df6..7e8aa44ff4 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 9b5a4f469..5cb3a605d 100644 +index 519bccdad..c7ad71c5f 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/PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/PlayerElytraBoostEvent.patch index 29a9ec4456..dba6082767 100644 --- a/Spigot-Server-Patches/PlayerElytraBoostEvent.patch +++ b/Spigot-Server-Patches/PlayerElytraBoostEvent.patch @@ -5,13 +5,13 @@ Subject: [PATCH] PlayerElytraBoostEvent diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index d971bbc76..4ce9c6089 100644 +index dbb422e9d..13938775b 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 { - if (!world.isClientSide) { EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman); entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper + - world.addEntity(entityfireworks); - if (!entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); diff --git a/Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch index 707caabcaf..a1c58141bb 100644 --- a/Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch +++ b/Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch @@ -5,27 +5,23 @@ Subject: [PATCH] PlayerLaunchProjectileEvent diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java -index adc38763b..776c86f1f 100644 +index 18e8825c4..5f3926d83 100644 --- a/src/main/java/net/minecraft/server/ItemEgg.java +++ b/src/main/java/net/minecraft/server/ItemEgg.java @@ -0,0 +0,0 @@ public class ItemEgg extends Item { - public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- if (!entityhuman.abilities.canInstantlyBuild) { -- itemstack.subtract(1); -- } -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved down -+ //if (!entityhuman.abilities.canInstantlyBuild) { -+ // itemstack.subtract(1); -+ //} -+ // -+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end ++ /* // Paper start - moved down + if (!entityhuman.abilities.canInstantlyBuild) { + itemstack.subtract(1); + } + + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { EntityEgg entityegg = new EntityEgg(world, entityhuman); + entityegg.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F); - world.addEntity(entityegg); + // Paper start @@ -49,7 +45,7 @@ index adc38763b..776c86f1f 100644 entityhuman.b(StatisticList.ITEM_USED.b(this)); diff --git a/src/main/java/net/minecraft/server/ItemEnderPearl.java b/src/main/java/net/minecraft/server/ItemEnderPearl.java -index 876384f37..8b8bc8ec1 100644 +index 3672996c2..719210da1 100644 --- a/src/main/java/net/minecraft/server/ItemEnderPearl.java +++ b/src/main/java/net/minecraft/server/ItemEnderPearl.java @@ -0,0 +0,0 @@ public class ItemEnderPearl extends Item { @@ -95,29 +91,26 @@ index 876384f37..8b8bc8ec1 100644 + // Paper end entityhuman.b(StatisticList.ITEM_USED.b(this)); - return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack); + return new InteractionResultWrapper<>(EnumInteractionResult.SUCCESS, itemstack); diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java -index b167c5441..42a0329c2 100644 +index d26b42f71..23b06169e 100644 --- a/src/main/java/net/minecraft/server/ItemExpBottle.java +++ b/src/main/java/net/minecraft/server/ItemExpBottle.java @@ -0,0 +0,0 @@ public class ItemExpBottle extends Item { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- if (!entityhuman.abilities.canInstantlyBuild) { -- itemstack.subtract(1); -- } +- ++ /* // Paper start + if (!entityhuman.abilities.canInstantlyBuild) { + itemstack.subtract(1); + } -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved down -+ //if (!entityhuman.abilities.canInstantlyBuild) { -+ // itemstack.subtract(1); -+ //} -+ // -+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { EntityThrownExpBottle entitythrownexpbottle = new EntityThrownExpBottle(world, entityhuman); + entitythrownexpbottle.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.7F, 1.0F); - world.addEntity(entitythrownexpbottle); + // Paper start @@ -141,20 +134,18 @@ index b167c5441..42a0329c2 100644 entityhuman.b(StatisticList.ITEM_USED.b(this)); diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java -index ab7807d83..46c64c760 100644 +index a74c803e7..8d882b81b 100644 --- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java +++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java @@ -0,0 +0,0 @@ public class ItemLingeringPotion extends ItemPotion { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved down -+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -+ -+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end ++ /* // Paper start + ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); + + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { + // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet + ItemStack itemstack1 = itemstack.cloneItemStack(); @@ -163,6 +154,7 @@ index ab7807d83..46c64c760 100644 + } + // Paper end EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1); + entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F); - world.addEntity(entitypotion); + // Paper start @@ -186,7 +178,7 @@ index ab7807d83..46c64c760 100644 entityhuman.b(StatisticList.ITEM_USED.b(this)); diff --git a/src/main/java/net/minecraft/server/ItemSnowball.java b/src/main/java/net/minecraft/server/ItemSnowball.java -index 332145c32..5c23c9ae0 100644 +index d8879e084..95194ccdc 100644 --- a/src/main/java/net/minecraft/server/ItemSnowball.java +++ b/src/main/java/net/minecraft/server/ItemSnowball.java @@ -0,0 +0,0 @@ public class ItemSnowball extends Item { @@ -219,19 +211,18 @@ index 332145c32..5c23c9ae0 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java -index 426b42a12..a4e2f70c7 100644 +index 87e2825a8..2bddefb80 100644 --- a/src/main/java/net/minecraft/server/ItemSplashPotion.java +++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java @@ -0,0 +0,0 @@ public class ItemSplashPotion extends ItemPotion { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper start - moved sound down, clone handled diff -+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); -+ //world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F)); -+ // Paper end ++ /* // Paper start + ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); + + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F)); ++ */ // Paper end if (!world.isClientSide) { + // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet + ItemStack itemstack1 = itemstack.cloneItemStack(); @@ -240,6 +231,7 @@ index 426b42a12..a4e2f70c7 100644 + } + // Paper end EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1); + entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F); - world.addEntity(entitypotion); + // Paper start diff --git a/Spigot-Server-Patches/PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/PlayerReadyArrowEvent.patch index 1937dd33f6..0b616145ec 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 152b179ce..797e9ecf1 100644 +index 1eadc4371..80f112d99 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -0,0 +0,0 @@ @@ -73,5 +73,5 @@ index 152b179ce..797e9ecf1 100644 + boolean flag = !this.a(entityhuman, itemstack).isEmpty(); // Paper if (!entityhuman.abilities.canInstantlyBuild && !flag) { - return flag ? new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack) : new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); + return flag ? new InteractionResultWrapper<>(EnumInteractionResult.PASS, itemstack) : new InteractionResultWrapper<>(EnumInteractionResult.FAIL, itemstack); -- \ No newline at end of file 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 7915513241..5ea2e4c752 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 e8417cb2e..de59f4ce0 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 27bed54d2..9990cdbcd 100644 +index 91533f8ac..8e4c1b39a 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 { @@ -41,7 +41,7 @@ index 27bed54d2..9990cdbcd 100644 Chunk chunk = (Chunk) objectiterator.next(); diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 6093ae408..f17869d4d 100644 +index 030461026..6909b9e45 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-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/Prevent-Enderman-from-loading-chunks.patch index ec62a7e1d0..6557d0fadf 100644 --- a/Spigot-Server-Patches/Prevent-Enderman-from-loading-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Enderman-from-loading-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent Enderman from loading chunks diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 7ef46851e..1df974bc9 100644 +index e4aba0e0a..945040442 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/Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch index 039b9b6c9f..15768c3a28 100644 --- a/Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch @@ -7,7 +7,7 @@ This causes the nether to spam unload/reload chunks, plus overall bad behavior. diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index ebf9d3510c..24573b4704 100644 +index e09a58697..3f421d46a 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -0,0 +0,0 @@ public class BlockFire extends Block { 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 cbf6dfabbc..72dc459fc9 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,25 +5,25 @@ 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 598621fbb..5c5b3a531 100644 +index 792a69ad5..fa7407ba6 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 { - try (BlockPosition.b blockposition$b = BlockPosition.b.r()) { - for(EnumDirection enumdirection : EnumDirection.values()) { - blockposition$b.g(blockposition).c(enumdirection); -- IBlockData iblockdata1 = world.getType(blockposition$b); -+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition$b); // Paper - don't load chunks + EnumDirection enumdirection = aenumdirection[j]; + + blockposition_b.g(blockposition).c(enumdirection); +- IBlockData iblockdata1 = world.getType(blockposition_b); ++ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition_b); // Paper - don't load chunks + if (iblockdata1 == null) continue; // Paper - if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition$b)) { - world.getBlockTickList().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay - } + + if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) { + world.getBlockTickList().a(blockposition_b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay @@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { - try (BlockPosition.b blockposition$b = BlockPosition.b.r()) { - for(EnumDirection enumdirection : EnumDirection.values()) { - blockposition$b.g(blockposition).c(enumdirection); -- if (iblockaccess.getType(blockposition$b).getBlock() == this) { -+ if (((World) iblockaccess).getBlockIfLoaded(blockposition$b) == this) { // Paper - don't load chunks + EnumDirection enumdirection = aenumdirection[l]; + + blockposition_b.g(blockposition).c(enumdirection); +- if (iblockaccess.getType(blockposition_b).getBlock() == this) { ++ if (((World) iblockaccess).getBlockIfLoaded(blockposition_b) == this) { // Paper - don't load chunks ++j; if (j >= i) { boolean flag = false; diff --git a/Spigot-Server-Patches/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index e8be2441b8..2b235c15fc 100644 --- a/Spigot-Server-Patches/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -53,17 +53,17 @@ index 2b15aa6c9..3ca32123b 100644 return block == this.f && iworldreader.getType(blockposition.up()).isAir() && iworldreader.getType(blockposition.up(2)).isAir(); } diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -index f252ef243..bfa6c2eef 100644 +index e58fdee8b..f2c4048c2 100644 --- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java +++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java @@ -0,0 +0,0 @@ public class RandomPositionGenerator { } - BlockPosition blockposition2 = new BlockPosition((double)j1 + entitycreature.locX, (double)k1 + entitycreature.locY, (double)l1 + entitycreature.locZ); -+ if (!entitycreature.world.isLoaded(blockposition2)) continue; // Paper - if ((!flag1 || entitycreature.f(blockposition2)) && navigationabstract.a(blockposition2)) { + blockposition1 = new BlockPosition((double) k1 + entitycreature.locX, (double) l1 + entitycreature.locY, (double) i2 + entitycreature.locZ); ++ if (!entitycreature.world.isLoaded(blockposition1)) continue; // Paper + if ((!flag1 || entitycreature.f(blockposition1)) && navigationabstract.a(blockposition1)) { if (!flag) { - blockposition2 = a(blockposition2, entitycreature); + blockposition1 = a(blockposition1, entitycreature); @@ -0,0 +0,0 @@ public class RandomPositionGenerator { } @@ -74,7 +74,7 @@ index f252ef243..bfa6c2eef 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5fe4734e3..eabf50e24 100644 +index cd56ca04e..f48d5d9f7 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -94,5 +94,5 @@ index 5fe4734e3..eabf50e24 100644 + // Paper end public Fluid getFluid(BlockPosition blockposition) { if (blockposition.isInvalidYLocation()) { // Paper - return FluidTypes.a.i(); + return FluidTypes.EMPTY.i(); -- \ 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 7ae87d18a6..2c0c90e388 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 7a4bc0fcc3..efdfa7195c 100644 +index 716d00afb..c55aadb53 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 { @@ -21,12 +21,13 @@ index 7a4bc0fcc3..efdfa7195c 100644 return null; } else { BlockPosition blockposition = new BlockPosition(entity); +- + if (!getEntity().getWorld().getWorldBorder().isInBounds(blockposition)) return null; // Paper - don't path out of world border if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { return this.c; } else { diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index acd76e13bb..1a87480f09 100644 +index beac8ac0b..86ada40a1 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-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch index e652b3678a..1c1d0b5aad 100644 --- a/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch @@ -18,7 +18,7 @@ an invalid entity. This should reduce log occurrences of dupe uuid messages. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 3b36a32c6..7c77d384b 100644 +index 4d619eb4c..8d7309bb0 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-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/Prevent-chunk-loading-from-Fluid-Flowing.patch index e7bf7127ab..9d2707a48a 100644 --- a/Spigot-Server-Patches/Prevent-chunk-loading-from-Fluid-Flowing.patch +++ b/Spigot-Server-Patches/Prevent-chunk-loading-from-Fluid-Flowing.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent chunk loading from Fluid Flowing diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java -index 8a6f79908..c1ed05d9e 100644 +index 074cc366e..0014f7870 100644 --- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java +++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java @@ -0,0 +0,0 @@ public abstract class FluidTypeFlowing extends FluidType { @@ -29,11 +29,11 @@ index 8a6f79908..c1ed05d9e 100644 if (fluid.c().a((FluidType) this) && this.a(enumdirection, (IBlockAccess) iworldreader, blockposition, iblockdata, blockposition1, iblockdata1)) { @@ -0,0 +0,0 @@ public abstract class FluidTypeFlowing extends FluidType { + if (enumdirection1 != enumdirection) { BlockPosition blockposition2 = blockposition.shift(enumdirection1); short short0 = a(blockposition1, blockposition2); - // CraftBukkit start - decompile errors -- Pair pair = (Pair) short2objectmap.computeIfAbsent(short0, (ix) -> { -- IBlockData iblockdatax = iworldreader.getType(blockposition2); +- Pair pair = (Pair) short2objectmap.computeIfAbsent(short0, (k) -> { +- IBlockData iblockdata1 = iworldreader.getType(blockposition2); + // Paper start - avoid loading chunks + Pair pair = short2objectmap.get(short0); + if (pair == null) { @@ -41,37 +41,38 @@ index 8a6f79908..c1ed05d9e 100644 + if (iblockdatax == null) { + continue; + } - -- return Pair.of(iblockdatax, iblockdatax.s()); -- }); ++ + pair = Pair.of(iblockdatax, iblockdatax.s()); + short2objectmap.put(short0, pair); + + } + // Paper end - // CraftBukkit end + +- return Pair.of(iblockdata1, iblockdata1.s()); +- }); IBlockData iblockdata1 = (IBlockData) pair.getFirst(); Fluid fluid = (Fluid) pair.getSecond(); + @@ -0,0 +0,0 @@ public abstract class FluidTypeFlowing extends FluidType { + EnumDirection enumdirection = (EnumDirection) iterator.next(); BlockPosition blockposition1 = blockposition.shift(enumdirection); short short0 = a(blockposition, blockposition1); - // CraftBukkit start - decompile errors -- Pair pair = (Pair) short2objectopenhashmap.computeIfAbsent(short0, (ix) -> { -- IBlockData iblockdatax = iworldreader.getType(blockposition1); +- Pair pair = (Pair) short2objectmap.computeIfAbsent(short0, (j) -> { +- IBlockData iblockdata1 = iworldreader.getType(blockposition1); - -- return Pair.of(iblockdatax, iblockdatax.s()); +- return Pair.of(iblockdata1, iblockdata1.s()); - }); + // Paper start -+ Pair pair = (Pair) short2objectopenhashmap.get(short0); ++ Pair pair = (Pair) short2objectmap.get(short0); + if (pair == null) { + IBlockData iblockdatax = iworldreader.getTypeIfLoaded(blockposition1); + if (iblockdatax == null) continue; + + pair = Pair.of(iblockdatax, iblockdatax.s()); -+ short2objectopenhashmap.put(short0, pair); ++ short2objectmap.put(short0, pair); + } + // Paper end - // CraftBukkit end IBlockData iblockdata1 = (IBlockData) pair.getFirst(); Fluid fluid = (Fluid) pair.getSecond(); + Fluid fluid1 = this.a(iworldreader, blockposition1, iblockdata1); -- \ No newline at end of file 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 d23aee4545..8e558b9d74 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 b682b3a43..30be39b0c 100644 +index 74bc08f85..15c01333e 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/Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/Prevent-mob-spawning-from-loading-generating-chunks.patch index 30fc83fc52..5ae34669ea 100644 --- a/Spigot-Server-Patches/Prevent-mob-spawning-from-loading-generating-chunks.patch +++ b/Spigot-Server-Patches/Prevent-mob-spawning-from-loading-generating-chunks.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks also prevents if out of world border bounds diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 35205561b..0e578caf6 100644 +index bfbe4d3e3..e2bf17f44 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-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/Prevent-rayTrace-from-loading-chunks.patch index df508b8357..2dccb90715 100644 --- a/Spigot-Server-Patches/Prevent-rayTrace-from-loading-chunks.patch +++ b/Spigot-Server-Patches/Prevent-rayTrace-from-loading-chunks.patch @@ -7,7 +7,7 @@ ray tracing into an unloaded chunk should be treated as a miss this saves a ton of lag for when AI tries to raytrace near unloaded chunks. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c702b94ef..26327895b 100644 +index c5960cf4c..e11e22836 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 IEntityAccess, GeneratorAccess, IIBlockAc 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 0b0d875adc..17b0887fbc 100644 --- a/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch @@ -23,7 +23,7 @@ index 68ac014aa..c5212417c 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ab74b1add..5d5a9f0bb 100644 +index 59b1f9043..086d64628 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch index 16a3484379..97e8b81c41 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 fb9b0835b..64a86b699 100644 +index 52b90e12b..102b7f3b2 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 c8814cad51..276b862919 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 c2957ad2e..a615d7867 100644 +index a37af03d2..cd488d37f 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 c2957ad2e..a615d7867 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6530b6be8..553f76b81 100644 +index 0134fb871..d74b3c44b 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 d974cca290..7c51cc42db 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 dacb372a5..fd405281b 100644 +index f09d358e2..f2c172ff1 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 @@ -68,7 +68,7 @@ index dacb372a5..fd405281b 100644 private boolean canSleepForTick() { return System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 320c378e0..d8ed44fe2 100644 +index 0bc27d914..128fcaf25 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 { @@ -97,16 +97,17 @@ index 320c378e0..d8ed44fe2 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 944151d14..061cbe7fc 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 org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper try { -- if ( script.isFile() ) +- String[] split = restartScript.split( " " ); +- if ( split.length > 0 && new File( split[0] ).isFile() ) + // Paper - extract method and cleanup -+ boolean isRestarting = addShutdownHook(script); ++ boolean isRestarting = addShutdownHook(restartScript); + if (isRestarting) { + System.out.println("Attempting to restart with " + SpigotConfig.restartScript); + } else { @@ -130,7 +131,8 @@ index 947c43a5d..f15fd9f37 100644 + { + // Kick all players + for ( EntityPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) ) -+ { + { +- System.out.println( "Attempting to restart with " + restartScript ); + p.playerConnection.disconnect(SpigotConfig.restartMessage); + } + // Give the socket a chance to send the packets @@ -138,8 +140,7 @@ index 947c43a5d..f15fd9f37 100644 + { + Thread.sleep( 100 ); + } catch ( InterruptedException ex ) - { -- System.out.println( "Attempting to restart with " + SpigotConfig.restartScript ); ++ { + } - // Disable Watchdog @@ -201,13 +202,10 @@ index 947c43a5d..f15fd9f37 100644 - String os = System.getProperty( "os.name" ).toLowerCase(java.util.Locale.ENGLISH); - if ( os.contains( "win" ) ) - { -- Runtime.getRuntime().exec( "cmd /c start " + script.getPath() ); +- Runtime.getRuntime().exec( "cmd /c start " + restartScript ); - } else - { -- Runtime.getRuntime().exec( new String[] -- { -- "sh", script.getPath() -- } ); +- Runtime.getRuntime().exec( "sh " + restartScript ); - } - } catch ( Exception e ) - { @@ -219,15 +217,9 @@ index 947c43a5d..f15fd9f37 100644 - shutdownHook.setDaemon( true ); - Runtime.getRuntime().addShutdownHook( shutdownHook ); - } else -+ // wait 10 seconds to see if we're actually going to try shutdown -+ try -+ { -+ Thread.sleep(10000); -+ } -+ catch (InterruptedException ignored) - { +- { - System.out.println( "Startup script '" + SpigotConfig.restartScript + "' does not exist! Stopping server." ); -- + - // Actually shutdown - try - { @@ -235,6 +227,13 @@ index 947c43a5d..f15fd9f37 100644 - } catch ( Throwable t ) - { - } ++ // wait 10 seconds to see if we're actually going to try shutdown ++ try ++ { ++ Thread.sleep(10000); ++ } ++ catch (InterruptedException ignored) ++ { } + + // Check if we've actually hit a state where the server is going to safely shutdown @@ -265,21 +264,20 @@ index 947c43a5d..f15fd9f37 100644 + // Paper end + + // Paper - copied from above and modified to return if the hook registered -+ private static boolean addShutdownHook(final File script) { ++ private static boolean addShutdownHook(final String restartScript) { + -+ if (script.isFile()) { ++ String[] split = restartScript.split( " " ); ++ if ( split.length > 0 && new File( split[0] ).isFile() ) ++ { + Thread shutdownHook = new Thread() { + @Override + public void run() { + try { + String os = System.getProperty("os.name").toLowerCase(java.util.Locale.ENGLISH); + if (os.contains("win")) { -+ Runtime.getRuntime().exec("cmd /c start " + script.getPath()); ++ Runtime.getRuntime().exec("cmd /c start " + restartScript); + } else { -+ Runtime.getRuntime().exec(new String[] -+ { -+ "sh", script.getPath() -+ }); ++ Runtime.getRuntime().exec( "sh " + restartScript ); + } + } catch (Exception e) { + e.printStackTrace(); 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 08a437e571..2825cb8cdc 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 7c558c355..d033969cd 100644 +index 139207f33..df7a1a47e 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 7c558c355..d033969cd 100644 this.world.methodProfiler.enter("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 55e45dbb1..91850fded 100644 +index ed833ffd6..8082de88f 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 aef104dd9a..499a8f65d0 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 f1320f5ac..f1a162420 100644 +index cecdc5388..864151444 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/Provide-option-to-use-a-versioned-world-folder-for-t.patch b/Spigot-Server-Patches/Provide-option-to-use-a-versioned-world-folder-for-t.patch index 5ee986a4f9..f6b4184335 100644 --- a/Spigot-Server-Patches/Provide-option-to-use-a-versioned-world-folder-for-t.patch +++ b/Spigot-Server-Patches/Provide-option-to-use-a-versioned-world-folder-for-t.patch @@ -59,7 +59,7 @@ index 48b0a742a..f0b87972d 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index a2d65c6df..41a7103ef 100644 +index 8d7309bb0..450c9e79b 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/RangedEntity-API.patch b/Spigot-Server-Patches/RangedEntity-API.patch index d5010eda78..93fd4feca7 100644 --- a/Spigot-Server-Patches/RangedEntity-API.patch +++ b/Spigot-Server-Patches/RangedEntity-API.patch @@ -32,18 +32,18 @@ index 000000000..696660b08 + } +} diff --git a/src/main/java/net/minecraft/server/IRangedEntity.java b/src/main/java/net/minecraft/server/IRangedEntity.java -index 1b06ce853..94533d19a 100644 +index 4fd69850f..b763bd11d 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; +@@ -0,0 +0,0 @@ package net.minecraft.server; public interface IRangedEntity { -- void a(EntityLiving var1, float var2); -+ void a(EntityLiving var1, float var2);default void rangedAttack(EntityLiving entityliving, float f) { a(entityliving, f); } // Paper OBF HELPER -- void s(boolean var1); -+ void s(boolean var1); default void setChargingAttack(boolean flag) { s(flag); } // Paper OBF HELPER +- void a(EntityLiving entityliving, float f); ++ void a(EntityLiving entityliving, float f); default void rangedAttack(EntityLiving entityliving, float f) { a(entityliving, f); } // Paper - OBFHELPER + +- void s(boolean flag); ++ void s(boolean flag); default void setChargingAttack(boolean flag) { s(flag); } // Paper - OBFHELPER } 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 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 552bf26a57..dae921cffb 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 91850fded..45851cd0c 100644 +index 8082de88f..702a5d9d6 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 0455942d56..02519c1942 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 1cafad6bb6..de452e23ca 100644 +index aad5a3527..749e41aed 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/Reduce-IO-ops-opening-a-new-region-file.patch b/Spigot-Server-Patches/Reduce-IO-ops-opening-a-new-region-file.patch index 7bd359ad7f..bdb65d063c 100644 --- a/Spigot-Server-Patches/Reduce-IO-ops-opening-a-new-region-file.patch +++ b/Spigot-Server-Patches/Reduce-IO-ops-opening-a-new-region-file.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reduce IO ops opening a new region file. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index f4405be395..5d2853b9ce 100644 +index 9299ab56a..407ac75aa 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -0,0 +0,0 @@ import java.io.ByteArrayInputStream; @@ -25,6 +25,7 @@ index f4405be395..5d2853b9ce 100644 this.f.set(1, false); this.c.seek(0L); +- int k; + // Paper Start + ByteBuffer header = ByteBuffer.allocate(8192); + while (header.hasRemaining()) { @@ -33,19 +34,23 @@ index f4405be395..5d2853b9ce 100644 + header.clear(); + IntBuffer headerAsInts = header.asIntBuffer(); + // Paper End - for(int j1 = 0; j1 < 1024; ++j1) { -- int k = this.c.readInt(); + +- for (j = 0; j < 1024; ++j) { +- k = this.c.readInt(); +- this.d[j] = k; ++ for(int j1 = 0; j1 < 1024; ++j1) { + int k = headerAsInts.get(); // Paper - this.d[j1] = k; ++ this.d[j1] = k; if (k != 0 && (k >> 8) + (k & 255) <= this.f.size()) { - for(int l = 0; l < (k & 255); ++l) { + for (int l = 0; l < (k & 255); ++l) { + this.f.set((k >> 8) + l, false); @@ -0,0 +0,0 @@ public class RegionFile { } - for(int k1 = 0; k1 < 1024; ++k1) { -- int l1 = this.c.readInt(); -+ int l1 = headerAsInts.get(); // Paper - this.e[k1] = l1; + for (j = 0; j < 1024; ++j) { +- k = this.c.readInt(); ++ int k = headerAsInts.get(); // Paper + this.e[j] = k; } } catch (IOException ioexception) { -- \ No newline at end of file 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 bacca702dd..339db9f02f 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 30d5c1734..e204dbe21 100644 +index 3c9cfad9c..5aca8d1f2 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-Debug-checks-from-DataBits.patch b/Spigot-Server-Patches/Remove-Debug-checks-from-DataBits.patch index 99102adbd1..b1628b97cd 100644 --- a/Spigot-Server-Patches/Remove-Debug-checks-from-DataBits.patch +++ b/Spigot-Server-Patches/Remove-Debug-checks-from-DataBits.patch @@ -9,15 +9,15 @@ Before: http://i.imgur.com/nQsMzAE.png After: http://i.imgur.com/nJ46crB.png diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index 0dc948a375..f4de7fcf4b 100644 +index 9e83610f1..fe5947b6c 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java @@ -0,0 +0,0 @@ public class DataBits { } public DataBits(int i, int j, long[] along) { -- Validate.inclusiveBetween(1L, 32L, (long)i); -+ //Validate.inclusiveBetween(1L, 32L, (long)i); // Paper +- Validate.inclusiveBetween(1L, 32L, (long) i); ++ //Validate.inclusiveBetween(1L, 32L, (long) i); // Paper this.d = j; this.b = i; this.a = along; @@ -25,10 +25,10 @@ index 0dc948a375..f4de7fcf4b 100644 } public void a(int i, int j) { -- Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i); -- Validate.inclusiveBetween(0L, this.c, (long)j); -+ //Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i); // Paper -+ //Validate.inclusiveBetween(0L, this.c, (long)j); // Paper +- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); +- Validate.inclusiveBetween(0L, this.c, (long) j); ++ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper ++ //Validate.inclusiveBetween(0L, this.c, (long) j); // Paper int k = i * this.b; int l = k / 64; int i1 = ((i + 1) * this.b - 1) / 64; @@ -36,7 +36,7 @@ index 0dc948a375..f4de7fcf4b 100644 } public int a(int i) { -- Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i); +- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); + //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper int j = i * this.b; int k = j / 64; 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 6b4b727c29..6ffbe28756 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 9970a58ed..da2548603 100644 +index eca1284cc..0a436133a 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-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch index ca5b8a4fb5..72e7697461 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 1a1b40ac0..9c5f520f1 100644 +index 11c77ade1..600b0ec8b 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch index 64dfbfd7bd..d8eb6b6de0 100644 --- a/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4f6e67915..9eeb73d67 100644 +index 35715e434..9f9eaf25c 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 4f6e67915..9eeb73d67 100644 } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 2679c2358..d04570171 100644 +index bd768e170..71c4ed8fa 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/Restore-vanlla-default-mob-spawn-range.patch b/Spigot-Server-Patches/Restore-vanlla-default-mob-spawn-range.patch index 9e4640dade..d092f03b4d 100644 --- a/Spigot-Server-Patches/Restore-vanlla-default-mob-spawn-range.patch +++ b/Spigot-Server-Patches/Restore-vanlla-default-mob-spawn-range.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Restore vanlla default mob-spawn-range diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 06d84a0b6..15abde4f5 100644 +index 1d222eaff..809ce1d6a 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/Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/Send-absolute-position-the-first-time-an-entity-is-s.patch index c3405593cb..d406aa687b 100644 --- a/Spigot-Server-Patches/Send-absolute-position-the-first-time-an-entity-is-s.patch +++ b/Spigot-Server-Patches/Send-absolute-position-the-first-time-an-entity-is-s.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Send absolute position the first time an entity is seen diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 5dbd493f41..a049b8d68e 100644 +index dd6c84b4a..a12a42c32 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 { @@ -46,14 +46,13 @@ index 5dbd493f41..a049b8d68e 100644 if ((!flag1 || !flag2) && !(this.tracker instanceof EntityArrow)) { if (flag1) { @@ -0,0 +0,0 @@ public class EntityTrackerEntry { - } - if (object != null) { -- this.broadcast((Packet) object); + if (packet1 != null) { + this.broadcast((Packet) packet1); + // Paper start - ensure fresh viewers get an absolute position on their first update, + // since we can't be certain what position they received in the spawn packet. -+ if (object instanceof PacketPlayOutEntityTeleport) { -+ this.broadcast((Packet) object); ++ if (packet1 instanceof PacketPlayOutEntityTeleport) { ++ this.broadcast((Packet) packet1); + } else { + PacketPlayOutEntityTeleport teleportPacket = null; + @@ -65,7 +64,7 @@ index 5dbd493f41..a049b8d68e 100644 + } + sendPlayerPacket(viewer.getKey(), teleportPacket); + } else { -+ sendPlayerPacket(viewer.getKey(), (Packet) object); ++ sendPlayerPacket(viewer.getKey(), (Packet) packet1); + } + } + } @@ -79,7 +78,7 @@ index 5dbd493f41..a049b8d68e 100644 // CraftBukkit end - this.trackedPlayers.add(entityplayer); + this.trackedPlayerMap.put(entityplayer, true); // Paper - Packet packet = this.e(); + Packet packet = this.e(); entityplayer.playerConnection.sendPacket(packet); -- \ No newline at end of file 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 28561e4f83..e0e0bd54b5 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 96e3d20e3..4aa8e85ab 100644 +index 7343eb25c..610e76328 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 96e3d20e3..4aa8e85ab 100644 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 44ed34174..c1ede0651 100644 +index 4f261554c..88300e2e5 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/Send-nearby-packets-from-world-player-list-not-serve.patch b/Spigot-Server-Patches/Send-nearby-packets-from-world-player-list-not-serve.patch index a8a594b326..063d5258c2 100644 --- a/Spigot-Server-Patches/Send-nearby-packets-from-world-player-list-not-serve.patch +++ b/Spigot-Server-Patches/Send-nearby-packets-from-world-player-list-not-serve.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Send nearby packets from world player list not server list diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6311c9f87..50c91d12c 100644 +index a00ce829f..fee3b68d1 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 { @@ -95,7 +95,7 @@ index b4225b58e..0ba0eb661 100644 if (entityplayer != null && entityplayer.world == this.world && entityplayer.getId() != i) { double d0 = (double) blockposition.getX() - entityplayer.locX; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 10630ac96..b355c3f53 100644 +index bd17e4cec..0a1ffd009 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 { @@ -119,7 +119,7 @@ index 10630ac96..b355c3f53 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ee2b443dd..5a7857e25 100644 +index 3fdd12ec0..e0b466d0c 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/Shame-on-you-Mojang.patch b/Spigot-Server-Patches/Shame-on-you-Mojang.patch index a99b5db1da..5d607f14e5 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 7148ea369..6d4e82b40 100644 +index fb567f34c..e45ad95fb 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 { @@ -23,7 +23,7 @@ index 7148ea369..6d4e82b40 100644 + //HttpUtilities.a.submit(() -> { // Paper Chunk chunk = world.getChunkAtWorldCoords(blockposition); - for(int i = blockposition.getY() - 1; i >= 0; --i) { + for (int i = blockposition.getY() - 1; i >= 0; --i) { @@ -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 4d3dfd2180..ee176a30c9 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 86c6beefe..d6333d9bb 100644 +index 651133eb9..ca6b9063b 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/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 fb253c30f6..3cf19f0218 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,20 +6,20 @@ 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 b64cac252..526f3af51 100644 +index 220ca7bca..e13e17bdd 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 { - Properties properties = new Properties(); + fileoutputstream = new FileOutputStream(this.b); properties.setProperty("eula", "false"); - properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)."); + properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag); } catch (Exception exception) { - a.warn("Failed to save {}", this.b, exception); + EULA.a.warn("Failed to save {}", this.b, exception); } finally { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2d812b024..8a6589d95 100644 +index edb1748fd..b5f30b2b2 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 @@ -32,7 +32,7 @@ index 2d812b024..8a6589d95 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 174605b6e..29b016e17 100644 +index da57751f7..ed0221f0d 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; diff --git a/Spigot-Server-Patches/SkeletonHorse-Additions.patch b/Spigot-Server-Patches/SkeletonHorse-Additions.patch index ccab123ecb..55f37ee15a 100644 --- a/Spigot-Server-Patches/SkeletonHorse-Additions.patch +++ b/Spigot-Server-Patches/SkeletonHorse-Additions.patch @@ -5,11 +5,11 @@ Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index e3690db47..ba6c0e96a 100644 +index 06f37f28a..eae2b2665 100644 --- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java +++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -@@ -0,0 +0,0 @@ import javax.annotation.Nullable; - public class EntityHorseSkeleton extends EntityHorseAbstract { +@@ -0,0 +0,0 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { + private final PathfinderGoalHorseTrap bM = new PathfinderGoalHorseTrap(this); private boolean bN; - private int bO; diff --git a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch index 63ce651eed..9fec82baca 100644 --- a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch @@ -21,12 +21,12 @@ 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 339e2da6b..8dbb4864e 100644 +index 4c7793f86..cc17a414f 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; - @Immutable public class BaseBlockPosition implements Comparable { + public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0); - private final int a; - private final int b; @@ -56,7 +56,7 @@ index 339e2da6b..8dbb4864e 100644 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() { @@ -77,47 +77,46 @@ index 339e2da6b..8dbb4864e 100644 } + // Paper end - public BaseBlockPosition d(BaseBlockPosition baseblockposition1) { - return new BaseBlockPosition(this.getY() * baseblockposition1.getZ() - this.getZ() * baseblockposition1.getY(), this.getZ() * baseblockposition1.getX() - this.getX() * baseblockposition1.getZ(), this.getX() * baseblockposition1.getY() - this.getY() * baseblockposition1.getX()); + 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 e980e31fc..ae162f615 100644 +index a4c282220..f260068c6 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(ix, jx, kx); + 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 - use x/y/z - return (BlockPosition.MutableBlockPosition)this.endOfData(); ++ } else if (this.g.x == l && this.g.y == i1 && this.g.z == j1) { + return (BlockPosition.MutableBlockPosition) this.endOfData(); } else { - if (this.g.b < l) { - ++this.g.b; - } else if (this.g.c < i1) { -- this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler +- this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler - ++this.g.c; - } else if (this.g.d < j1) { -- this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler -- this.g.c = jx; // Paper - decompile fix Readd line removed by the decompiler +- this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler +- this.g.c = j; // Paper - decompile fix 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 = ix; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.x = i; // Paper - decompile fix Readd line removed by the decompiler + ++this.g.y; + } else if (this.g.z < j1) { -+ this.g.x = ix; // Paper - decompile fix Readd line removed by the decompiler -+ this.g.y = jx; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.x = i; // Paper - decompile fix Readd line removed by the decompiler ++ this.g.y = j; // Paper - decompile fix Readd line removed by the decompiler + ++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; 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 3efd3041ab..e307a427a0 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 d1d8c3be6..4d04fdda7 100644 +index b728a44f5..23dee9b56 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 f6e6a66a05..38bf77aa96 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 5dd08018c..d1d8c3be6 100644 +index 417c015e5..b728a44f5 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 { @@ -94,7 +94,7 @@ index 5dd08018c..d1d8c3be6 100644 // Do not pass along players, as doing so can get them stuck outside of time. // (which for example disables inventory icon updates and prevents block breaking) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a6eb8ab6c..50176b97b 100644 +index e72ccefc2..48ec5e047 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/Support-Overriding-World-Seeds.patch b/Spigot-Server-Patches/Support-Overriding-World-Seeds.patch index 18c4f9891a..d74b4fd1cf 100644 --- a/Spigot-Server-Patches/Support-Overriding-World-Seeds.patch +++ b/Spigot-Server-Patches/Support-Overriding-World-Seeds.patch @@ -59,7 +59,7 @@ index f3f2a0b69..6f76351b8 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9b2703fd2..ef49fc258 100644 +index 7b24f6e24..11510640a 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 @@ -72,7 +72,7 @@ index 9b2703fd2..ef49fc258 100644 if (j == 0) { diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java -index 33d878378..b9cc0e898 100644 +index 4e971d244..65eed2a90 100644 --- a/src/main/java/net/minecraft/server/WorldData.java +++ b/src/main/java/net/minecraft/server/WorldData.java @@ -0,0 +0,0 @@ public class WorldData { @@ -85,7 +85,7 @@ index 33d878378..b9cc0e898 100644 String s = nbttagcompound.getString("generatorName"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 93a8f4cdf..d43f8ce9a 100644 +index 392cd0e3d..62903f374 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/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index 311e0e5f8d..4248b9e20b 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -297,7 +297,7 @@ index 255b8bed0..fe148495b 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index a30b21ad2..83b1ef0fc 100644 +index c09961be9..dbf1089ba 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 { @@ -317,7 +317,7 @@ index a30b21ad2..83b1ef0fc 100644 private final float frictionFactor; protected final BlockStateList blockStateList; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 4d04fdda7..9970a58ed 100644 +index 23dee9b56..eca1284cc 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 { @@ -357,7 +357,7 @@ index df2711a5f..732c8793e 100644 return chunk1; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index b859a5b9e..60abc5f28 100644 +index 0397ce610..44c1dfe92 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 { @@ -366,9 +366,9 @@ index b859a5b9e..60abc5f28 100644 if (flag) { - try { + try (co.aikar.timings.Timing timing = world.timings.syncChunkLoadTimer.startTiming()) { // Paper - // CraftBukkit - decompile error chunk = this.chunkLoader.a(this.world, i, j, (chunk1) -> { chunk1.setLastSaved(this.world.getTime()); + this.chunks.put(ChunkCoordIntPair.a(i, j), chunk1); @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { this.asyncTaskHandler.postToMainThread(chunk::addEntities); return chunk; @@ -378,7 +378,7 @@ index b859a5b9e..60abc5f28 100644 + try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) { // Paper this.batchScheduler.b(); this.batchScheduler.a(new ChunkCoordIntPair(i, j)); - CompletableFuture completablefuture = this.batchScheduler.c(); // CraftBukkit - decompile error + CompletableFuture completablefuture = this.batchScheduler.c(); @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { } catch (RuntimeException runtimeexception) { throw this.a(i, j, (Throwable) runtimeexception); @@ -398,7 +398,7 @@ index b859a5b9e..60abc5f28 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 1b8c28096..62a63dfa8 100644 +index e7ed23453..63533d237 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ @@ -445,7 +445,7 @@ index 1b8c28096..62a63dfa8 100644 } diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java -index cc9e8465c..1bd3a0f77 100644 +index 65574eb2e..bc87cfc4b 100644 --- a/src/main/java/net/minecraft/server/CustomFunction.java +++ b/src/main/java/net/minecraft/server/CustomFunction.java @@ -0,0 +0,0 @@ public class CustomFunction { @@ -472,7 +472,7 @@ index cc9e8465c..1bd3a0f77 100644 return this.b; } diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java -index b8a626dd4..323b2e6dc 100644 +index f28f4f3cd..6b417be1d 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java @@ -0,0 +0,0 @@ public class CustomFunctionData implements ITickable, IResourcePackListener { @@ -485,7 +485,7 @@ index b8a626dd4..323b2e6dc 100644 int j = 0; CustomFunction.c[] acustomfunction_c = customfunction.b(); diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index b5e5c385d..7f4c76669 100644 +index 197d116c6..0ebada490 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; @@ -538,7 +538,7 @@ index b5e5c385d..7f4c76669 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 50176b97b..f960db23d 100644 +index 48ec5e047..f36ab639f 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; @@ -577,7 +577,7 @@ index 50176b97b..f960db23d 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 14c481220..92a55bdf6 100644 +index ed859ccf9..31bbbbd96 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; @@ -653,15 +653,15 @@ index 14c481220..92a55bdf6 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index 22db1fad1..d7f33bd53 100644 +index cd462f7df..45ab33d1a 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 { public void updatePlayers() { - ArrayList arraylist = Lists.newArrayList(); + List list = Lists.newArrayList(); Iterator iterator = this.c.iterator(); - -+ world.timings.tracker1.startTiming(); // Spigot ++ world.timings.tracker1.startTiming(); // Paper while (iterator.hasNext()) { EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry) iterator.next(); @@ -669,22 +669,22 @@ index 22db1fad1..d7f33bd53 100644 } } } -+ world.timings.tracker1.stopTiming(); // Spigot ++ world.timings.tracker1.stopTiming(); // Paper -+ world.timings.tracker2.startTiming(); // Spigot - for (int i = 0; i < arraylist.size(); ++i) { - EntityPlayer entityplayer = (EntityPlayer) arraylist.get(i); ++ world.timings.tracker2.startTiming(); // Paper + for (int i = 0; i < list.size(); ++i) { + EntityPlayer entityplayer = (EntityPlayer) list.get(i); Iterator iterator1 = this.c.iterator(); @@ -0,0 +0,0 @@ public class EntityTracker { } } } -+ world.timings.tracker2.stopTiming(); // Spigot ++ world.timings.tracker2.stopTiming(); // Paper } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 37211c33a..97690499f 100644 +index 963c7e777..edb1748fd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ @@ -837,7 +837,7 @@ index 37211c33a..97690499f 100644 this.methodProfiler.exit(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ceac52fe5..29e24940f 100644 +index c24f4a8fe..e01222ad2 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ @@ -877,9 +877,8 @@ index ceac52fe5..29e24940f 100644 if (this.l && i % 4L == 0L) { this.l = false; + try (Timing ignored = world.timings.doChunkMapSortMissing.startTiming()) { // Paper - // CraftBukkit start - Collections.sort(this.h, (playerchunkx, playerchunk1x) -> { - return ComparisonChain.start().compare(playerchunkx.g(), playerchunk1x.g()).result(); + Collections.sort(this.h, (playerchunk1, playerchunk2) -> { + return ComparisonChain.start().compare(playerchunk1.g(), playerchunk2.g()).result(); }); + } // Paper timing } @@ -887,11 +886,10 @@ index ceac52fe5..29e24940f 100644 if (this.m && i % 4L == 2L) { this.m = false; + try (Timing ignored = world.timings.doChunkMapSortSendToPlayers.startTiming()) { // Paper - Collections.sort(this.g, (playerchunkx, playerchunk1x) -> { - return ComparisonChain.start().compare(playerchunkx.g(), playerchunk1x.g()).result(); + Collections.sort(this.g, (playerchunk1, playerchunk2) -> { + return ComparisonChain.start().compare(playerchunk1.g(), playerchunk2.g()).result(); }); + } // Paper timing - // CraftBukkit end } if (!this.h.isEmpty()) { @@ -931,7 +929,7 @@ index ceac52fe5..29e24940f 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2b6c797ce..0a887789a 100644 +index f0e87416e..723fce204 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; @@ -986,7 +984,7 @@ index 2b6c797ce..0a887789a 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 616797dc6..3a5daf670 100644 +index 6c88d0c86..8bf94c1b9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -0,0 +0,0 @@ @@ -996,18 +994,19 @@ index 616797dc6..3a5daf670 100644 +import co.aikar.timings.Timing; // Paper + public class PlayerConnectionUtils { - public static void ensureMainThread(Packet packet, T packetlistener, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException { + + public static void ensureMainThread(Packet packet, T t0, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException { if (!iasynctaskhandler.isMainThread()) { + Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper iasynctaskhandler.postToMainThread(() -> { -+ try (Timing ignored = timing.startTiming()) { // Paper - packet.a(packetlistener); -+ } ++ try (Timing ignored = timing.startTiming()) { // Paper + packet.a(t0); ++ } // Paper - timings }); throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 9db7d7e30..aef650774 100644 +index 8d90b674a..aab49bf68 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ @@ -1031,7 +1030,7 @@ index 9db7d7e30..aef650774 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 0d0b4d873..774134103 100644 +index 0da57948a..6571fc595 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 { @@ -1105,7 +1104,7 @@ index c69209497..68ac014aa 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 0920ef2d1..230517907 100644 +index 5531f5205..209091a9c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -1115,7 +1114,7 @@ index 0920ef2d1..230517907 100644 import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; import it.unimi.dsi.fastutil.longs.LongSet; -@@ -0,0 +0,0 @@ import com.google.common.collect.Maps; +@@ -0,0 +0,0 @@ import java.util.ArrayList; import java.util.Map; import org.bukkit.Bukkit; import org.bukkit.block.BlockState; @@ -1123,13 +1122,6 @@ index 0920ef2d1..230517907 100644 import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.block.CraftBlockState; - import org.bukkit.craftbukkit.block.data.CraftBlockData; - import org.bukkit.craftbukkit.event.CraftEventFactory; - import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.craftbukkit.util.LongHashSet; // Paper - import org.bukkit.event.block.BlockCanBuildEvent; - import org.bukkit.event.block.BlockPhysicsEvent; - import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; @@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper @@ -1220,7 +1212,7 @@ index 0920ef2d1..230517907 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 23c80f80a..2450421d4 100644 +index 0a32a767e..60939cc33 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ @@ -1231,20 +1223,16 @@ index 23c80f80a..2450421d4 100644 import com.google.common.collect.Maps; import com.google.common.util.concurrent.ListenableFuture; @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - IRegistry iregistry1 = IRegistry.BLOCK; // CraftBukkit - decompile error - - IRegistry.BLOCK.getClass(); -- this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b); // CraftBukkit - decompile error -+ this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b, "Blocks"); // CraftBukkit - decompile error // Paper - Timings v2 - Predicate predicate2 = (fluidtype) -> { // CraftBukkit - decompile error - return fluidtype == null || fluidtype == FluidTypes.a; - }; -@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - function = iregistry::getKey; - IRegistry iregistry2 = IRegistry.FLUID; // CraftBukkit - decompile error - IRegistry.FLUID.getClass(); -- this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a); // CraftBukkit - decompile error -+ this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a, "Fluids"); // CraftBukkit - decompile error // Paper - Timings v2 + // CraftBukkit end + this.nextTickListBlock = new TickListServer<>(this, (block) -> { + return block == null || block.getBlockData().isAir(); +- }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::getOrDefault, this::b); ++ }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::getOrDefault, this::b, "Blocks"); // Paper - timings ++ + this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> { + return fluidtype == null || fluidtype == FluidTypes.EMPTY; +- }, IRegistry.FLUID::getKey, IRegistry.FLUID::getOrDefault, this::a); ++ }, IRegistry.FLUID::getKey, IRegistry.FLUID::getOrDefault, this::a, "Fluids"); // Paper - timings this.siegeManager = new VillageSiege(this); this.d = new ObjectLinkedOpenHashSet(); this.server = minecraftserver; @@ -1298,8 +1286,8 @@ index 23c80f80a..2450421d4 100644 chunkproviderserver.a(flag); + timings.worldSaveChunks.stopTiming(); // Paper // CraftBukkit - ArrayList -> Collection - java.util.Collection arraylist = chunkproviderserver.a(); - Iterator iterator = arraylist.iterator(); + java.util.Collection list = chunkproviderserver.a(); + Iterator iterator = list.iterator(); @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { chunkproviderserver.unload(chunk); } @@ -1577,7 +1565,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 b1a5937b1..b5afd5d1c 100644 +index ab944fc67..7993581c2 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/Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch index 1f5fc40553..8d9754df1f 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 @@ -21,7 +21,7 @@ index 313dd9891..56226bc86 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 4aa8e85ab..d5adc0a24 100644 +index 610e76328..149731353 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/Turtle-API.patch b/Spigot-Server-Patches/Turtle-API.patch index ea6141f343..ac33a7eaf4 100644 --- a/Spigot-Server-Patches/Turtle-API.patch +++ b/Spigot-Server-Patches/Turtle-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Turtle API diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 6c4ffbf8f..2484bd272 100644 +index b016e0ae7..a533e0eb5 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -0,0 +0,0 @@ public class EntityTurtle extends EntityAnimal { diff --git a/Spigot-Server-Patches/Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/Use-ConcurrentHashMap-in-JsonList.patch index 98fd5e0dca..5532354925 100644 --- a/Spigot-Server-Patches/Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/Use-ConcurrentHashMap-in-JsonList.patch @@ -25,7 +25,7 @@ The point of this is readability, but does have a side-benefit of a small microp Finally, added a couple obfhelpers for the modified code diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java -index 6700e68c0..a2815b91f 100644 +index 026ef7939..b7cde4d41 100644 --- a/src/main/java/net/minecraft/server/JsonList.java +++ b/src/main/java/net/minecraft/server/JsonList.java @@ -0,0 +0,0 @@ public class JsonList> { @@ -73,16 +73,15 @@ index 6700e68c0..a2815b91f 100644 + private void removeStaleEntries() { h(); } // Paper - OBFHELPER private void h() { -- ArrayList arraylist = Lists.newArrayList(); -+ // Paper start -+ /*ArrayList arraylist = Lists.newArrayList(); +- List list = Lists.newArrayList(); ++ /*List list = Lists.newArrayList(); Iterator iterator = this.d.values().iterator(); while (iterator.hasNext()) { @@ -0,0 +0,0 @@ public class JsonList> { - Object object = iterator.next(); + K k0 = (K) iterator.next(); // CraftBukkit - decompile error - this.d.remove(this.a((K) object)); // CraftBukkit - decompile error + this.d.remove(this.a(k0)); - } + }*/ @@ -96,8 +95,7 @@ index 6700e68c0..a2815b91f 100644 public void save() throws IOException { + this.removeStaleEntries(); // Paper - remove expired values before saving -+ - Collection collection = this.d.values(); + Collection collection = this.d.values(); String s = this.b.toJson(collection); BufferedWriter bufferedwriter = null; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Use-EntityTypes-for-living-entities.patch b/Spigot-Server-Patches/Use-EntityTypes-for-living-entities.patch index 3587dac419..6dd48b776f 100644 --- a/Spigot-Server-Patches/Use-EntityTypes-for-living-entities.patch +++ b/Spigot-Server-Patches/Use-EntityTypes-for-living-entities.patch @@ -66,7 +66,7 @@ index 93bf32dc1..e6063bb46 100644 entitywither.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.55D, (double) blockposition2.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F); diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 09ad5a3ca..41e599b26 100644 +index aad7ce93f..09eabf123 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 { @@ -75,9 +75,9 @@ index 09ad5a3ca..41e599b26 100644 this.d.getChunkAtWorldCoords(new BlockPosition(0, 128, 0)); - EntityEnderDragon entityenderdragon = new EntityEnderDragon(this.d); + EntityEnderDragon entityenderdragon = EntityTypes.ENDER_DRAGON.create(this.d); // Paper + entityenderdragon.getDragonControllerManager().setControllerPhase(DragonControllerPhase.HOLDING_PATTERN); entityenderdragon.setPositionRotation(0.0D, 128.0D, 0.0D, this.d.random.nextFloat() * 360.0F, 0.0F); - this.d.addEntity(entityenderdragon); diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java index ee159e0a8..070a9e7b1 100644 --- a/src/main/java/net/minecraft/server/EntityChicken.java @@ -118,37 +118,39 @@ index 961afa5c4..a372f6508 100644 entityendermite.setPlayerSpawned(true); entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch); diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java -index c2c4f97e2..f510696e1 100644 +index 963b6fbb9..fc20bbe27 100644 --- a/src/main/java/net/minecraft/server/EntityEvoker.java +++ b/src/main/java/net/minecraft/server/EntityEvoker.java @@ -0,0 +0,0 @@ public class EntityEvoker extends EntityIllagerWizard { protected void j() { - for(int i = 0; i < 3; ++i) { + for (int i = 0; i < 3; ++i) { BlockPosition blockposition = (new BlockPosition(EntityEvoker.this)).a(-2 + EntityEvoker.this.random.nextInt(5), 1, -2 + EntityEvoker.this.random.nextInt(5)); - EntityVex entityvex = new EntityVex(EntityEvoker.this.world); +- + EntityVex entityvex = EntityTypes.VEX.create(EntityEvoker.this.world); // Paper entityvex.setPositionRotation(blockposition, 0.0F, 0.0F); - entityvex.prepare(EntityEvoker.this.world.getDamageScaler(blockposition), (GroupDataEntity)null, (NBTTagCompound)null); - entityvex.a(EntityEvoker.this); + entityvex.prepare(EntityEvoker.this.world.getDamageScaler(blockposition), (GroupDataEntity) null, (NBTTagCompound) null); + entityvex.a((EntityInsentient) EntityEvoker.this); diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index 51a07311f..f20196388 100644 +index 4e8a97c55..1b9425f3e 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java @@ -0,0 +0,0 @@ public class EntityHorse extends EntityHorseAbstract { - public EntityAgeable createChild(EntityAgeable entityageable) { Object object; + if (entityageable instanceof EntityHorseDonkey) { - object = new EntityHorseMule(this.world); + object = EntityTypes.MULE.create(world); // Paper } else { - EntityHorse entityhorse1 = (EntityHorse)entityageable; + EntityHorse entityhorse = (EntityHorse) entityageable; + - object = new EntityHorse(this.world); + object = EntityTypes.HORSE.create(world); // Paper - int j = this.random.nextInt(9); - int i; - if (j < 4) { + int i = this.random.nextInt(9); + int j; + diff --git a/src/main/java/net/minecraft/server/EntityHorseDonkey.java b/src/main/java/net/minecraft/server/EntityHorseDonkey.java -index 50c0a8277..627ba1038 100644 +index 72eed22eb..65c40e72b 100644 --- a/src/main/java/net/minecraft/server/EntityHorseDonkey.java +++ b/src/main/java/net/minecraft/server/EntityHorseDonkey.java @@ -0,0 +0,0 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract { @@ -157,48 +159,48 @@ index 50c0a8277..627ba1038 100644 public EntityAgeable createChild(EntityAgeable entityageable) { - Object object = entityageable instanceof EntityHorse ? new EntityHorseMule(this.world) : new EntityHorseDonkey(this.world); + Object object = entityageable instanceof EntityHorse ? EntityTypes.MULE.create(world) : EntityTypes.DONKEY.create(world); // Paper - this.a(entityageable, (EntityHorseAbstract)object); - return (EntityAgeable)object; - } + + this.a(entityageable, (EntityHorseAbstract) object); + return (EntityAgeable) object; diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index 2c0cac674..e2af18326 100644 +index eae2b2665..0a092acdf 100644 --- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java +++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java @@ -0,0 +0,0 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { @Nullable - public EntityAgeable createChild(EntityAgeable var1) { + public EntityAgeable createChild(EntityAgeable entityageable) { - return new EntityHorseSkeleton(this.world); + return EntityTypes.SKELETON_HORSE.create(world); // Paper } public boolean a(EntityHuman entityhuman, EnumHand enumhand) { diff --git a/src/main/java/net/minecraft/server/EntityHorseZombie.java b/src/main/java/net/minecraft/server/EntityHorseZombie.java -index 560eac4af..4b928d2c7 100644 +index c23bc72fc..a1873f557 100644 --- a/src/main/java/net/minecraft/server/EntityHorseZombie.java +++ b/src/main/java/net/minecraft/server/EntityHorseZombie.java @@ -0,0 +0,0 @@ public class EntityHorseZombie extends EntityHorseAbstract { @Nullable - public EntityAgeable createChild(EntityAgeable var1) { + public EntityAgeable createChild(EntityAgeable entityageable) { - return new EntityHorseZombie(this.world); + return EntityTypes.ZOMBIE_HORSE.create(world); // Paper } public boolean a(EntityHuman entityhuman, EnumHand enumhand) { diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 22cea8552..ac7f37e4b 100644 +index 5e1976871..82a32c61e 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 } public EntityLlama createChild(EntityAgeable entityageable) { -- EntityLlama entityllama1 = new EntityLlama(this.world); -+ EntityLlama entityllama1 = EntityTypes.LLAMA.create(world); // Paper - this.a(entityageable, entityllama1); - EntityLlama entityllama2 = (EntityLlama)entityageable; - int i = this.random.nextInt(Math.max(this.getStrength(), entityllama2.getStrength())) + 1; +- EntityLlama entityllama = new EntityLlama(this.world); ++ EntityLlama entityllama = EntityTypes.LLAMA.create(world); // Paper + + this.a(entityageable, (EntityHorseAbstract) entityllama); + EntityLlama entityllama1 = (EntityLlama) entityageable; diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java index dde9f1e61..638dbe978 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java @@ -222,7 +224,7 @@ index dde9f1e61..638dbe978 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java -index c83f71401..34e860b4c 100644 +index ba074c10c..13c84bda8 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 { @@ -266,20 +268,20 @@ index 9dc2d8be2..d1689dc33 100644 public boolean f(ItemStack itemstack) { diff --git a/src/main/java/net/minecraft/server/EntityPolarBear.java b/src/main/java/net/minecraft/server/EntityPolarBear.java -index b9124a5b0..cb3e45f14 100644 +index a02020d5f..dbb534c9c 100644 --- a/src/main/java/net/minecraft/server/EntityPolarBear.java +++ b/src/main/java/net/minecraft/server/EntityPolarBear.java @@ -0,0 +0,0 @@ public class EntityPolarBear extends EntityAnimal { } - public EntityAgeable createChild(EntityAgeable var1) { + public EntityAgeable createChild(EntityAgeable entityageable) { - return new EntityPolarBear(this.world); + return EntityTypes.POLAR_BEAR.create(world); // Paper } - public boolean f(ItemStack var1) { + public boolean f(ItemStack itemstack) { diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java -index 7ee1b88f6..9605a50ae 100644 +index e545b1c9b..d6bac06a7 100644 --- a/src/main/java/net/minecraft/server/EntityRabbit.java +++ b/src/main/java/net/minecraft/server/EntityRabbit.java @@ -0,0 +0,0 @@ public class EntityRabbit extends EntityAnimal { @@ -292,7 +294,7 @@ index 7ee1b88f6..9605a50ae 100644 if (this.random.nextInt(20) != 0) { diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java -index b3586cd41..c0950116b 100644 +index f7a25c148..c35d1eef4 100644 --- a/src/main/java/net/minecraft/server/EntitySheep.java +++ b/src/main/java/net/minecraft/server/EntitySheep.java @@ -0,0 +0,0 @@ public class EntitySheep extends EntityAnimal { @@ -305,7 +307,7 @@ index b3586cd41..c0950116b 100644 entitysheep1.setColor(this.a((EntityAnimal) this, (EntityAnimal) entitysheep)); return entitysheep1; diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java -index 361c7831e..e46340e66 100644 +index a42b8d554..9ef1c9baf 100644 --- a/src/main/java/net/minecraft/server/EntitySpider.java +++ b/src/main/java/net/minecraft/server/EntitySpider.java @@ -0,0 +0,0 @@ public class EntitySpider extends EntityMonster { @@ -318,7 +320,7 @@ index 361c7831e..e46340e66 100644 entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F); entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 2484bd272..fbe504737 100644 +index a533e0eb5..270b95082 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -0,0 +0,0 @@ public class EntityTurtle extends EntityAnimal { @@ -331,7 +333,7 @@ index 2484bd272..fbe504737 100644 public boolean f(ItemStack itemstack) { diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 6b6fbfd79..29d5ef4c1 100644 +index d74bfa120..24ca35119 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 { @@ -343,7 +345,7 @@ index 6b6fbfd79..29d5ef4c1 100644 public T a(World world) { return this.aT.apply(world); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 2b2a6afb0..b2fb4af05 100644 +index f01e776fe..40b3ffd8c 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 { @@ -365,7 +367,7 @@ index 2b2a6afb0..b2fb4af05 100644 // Paper start if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, entitylightning, entitywitch).isCancelled()) { diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java -index 9599d6fa0..5f3d3e472 100644 +index 4f1696d01..46d8e0a1f 100644 --- a/src/main/java/net/minecraft/server/EntityWolf.java +++ b/src/main/java/net/minecraft/server/EntityWolf.java @@ -0,0 +0,0 @@ public class EntityWolf extends EntityTameableAnimal { @@ -378,7 +380,7 @@ index 9599d6fa0..5f3d3e472 100644 if (uuid != null) { diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 40abea29c..f25bcfd8f 100644 +index 33b343c14..92ad1ad15 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 { @@ -431,7 +433,7 @@ index 85d402965..0cca7b6d5 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java -index 17b9fd6dd..070c9c4c1 100644 +index 86e5fbcda..fb96743af 100644 --- a/src/main/java/net/minecraft/server/EntityZombieVillager.java +++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java @@ -0,0 +0,0 @@ public class EntityZombieVillager extends EntityZombie { @@ -444,7 +446,7 @@ index 17b9fd6dd..070c9c4c1 100644 entityvillager.u(this); entityvillager.setProfession(this.getProfession()); diff --git a/src/main/java/net/minecraft/server/ItemArmorStand.java b/src/main/java/net/minecraft/server/ItemArmorStand.java -index 9e4078148..a4fab5c23 100644 +index 576b3c565..4dd0e39ec 100644 --- a/src/main/java/net/minecraft/server/ItemArmorStand.java +++ b/src/main/java/net/minecraft/server/ItemArmorStand.java @@ -0,0 +0,0 @@ public class ItemArmorStand extends Item { @@ -492,7 +494,7 @@ index d4fdcbdfd..887e4461f 100644 entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null); entityskeleton.setPosition(entityhorseabstract.locX, entityhorseabstract.locY, entityhorseabstract.locZ); diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index 560edb523..f9b58b972 100644 +index 0ac1fb53a..509d62f6b 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -0,0 +0,0 @@ public class VillageSiege { @@ -505,82 +507,56 @@ index 560edb523..f9b58b972 100644 } catch (Exception exception) { exception.printStackTrace(); diff --git a/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java b/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java -index d53911594..83f55adba 100644 +index 94b21693e..0a223cfe5 100644 --- a/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java -@@ -0,0 +0,0 @@ public class WorldGenEndCityPieces { - if (i > 8) { - return false; - } else { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); // Paper - decompile error - if (worldgenendcitypieces$piecegenerator.a(definedstructuremanager, i, worldgenendcitypieces$piece, blockposition, arraylist, random)) { - boolean flag = false; - int j = random.nextInt(); @@ -0,0 +0,0 @@ public class WorldGenEndCityPieces { TileEntityLootable.a(generatoraccess, random, blockposition1, LootTables.c); } } else if (s.startsWith("Sentry")) { - EntityShulker entityshulker = new EntityShulker(generatoraccess.getMinecraftWorld()); + EntityShulker entityshulker = EntityTypes.SHULKER.create(generatoraccess.getMinecraftWorld()); // Paper - entityshulker.setPosition((double)blockposition.getX() + 0.5D, (double)blockposition.getY() + 0.5D, (double)blockposition.getZ() + 0.5D); + + entityshulker.setPosition((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D); entityshulker.g(blockposition); - generatoraccess.addEntity(entityshulker); diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java -index a542e581c..a64fef39d 100644 +index 2def56b06..abeb4aa02 100644 --- a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java @@ -0,0 +0,0 @@ public class WorldGenFeatureOceanRuinPieces { - ((TileEntityChest)tileentity).setLootTable(this.h ? LootTables.q : LootTables.p, random.nextLong()); + ((TileEntityChest) tileentity).setLootTable(this.h ? LootTables.q : LootTables.p, random.nextLong()); } } else if ("drowned".equals(s)) { - EntityDrowned entitydrowned = new EntityDrowned(generatoraccess.getMinecraftWorld()); +- + EntityDrowned entitydrowned = EntityTypes.DROWNED.create(generatoraccess.getMinecraftWorld()); // Paper entitydrowned.di(); entitydrowned.setPositionRotation(blockposition, 0.0F, 0.0F); - entitydrowned.prepare(generatoraccess.getDamageScaler(blockposition), (GroupDataEntity)null, (NBTTagCompound)null); + entitydrowned.prepare(generatoraccess.getDamageScaler(blockposition), (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java b/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java -index 6ab249ee7..c9a17e332 100644 +index 0e7aed09d..493a86e1b 100644 --- a/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java @@ -0,0 +0,0 @@ public class WorldGenMonumentPieces { - protected static final IBlockData d = b; + protected static final IBlockData d = WorldGenMonumentPieces.WorldGenMonumentPiece.b; protected static final IBlockData e = Blocks.SEA_LANTERN.getBlockData(); protected static final IBlockData f = Blocks.WATER.getBlockData(); -- protected static final Set g = ImmutableSet.builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(f.getBlock()).build(); -+ protected static final Set g = new ImmutableSet.Builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(f.getBlock()).build(); // Paper - decompile error +- protected static final Set g = ImmutableSet.builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(WorldGenMonumentPieces.WorldGenMonumentPiece.f.getBlock()).build(); ++ protected static final Set g = ImmutableSet.builder().add(Blocks.ICE).add(Blocks.PACKED_ICE).add(Blocks.BLUE_ICE).add(WorldGenMonumentPieces.WorldGenMonumentPiece.f.getBlock()).build(); // Paper - decompile fix protected static final int h = b(2, 0, 0); protected static final int i = b(2, 2, 0); protected static final int j = b(0, 1, 0); @@ -0,0 +0,0 @@ public class WorldGenMonumentPieces { - int i1 = this.d(jx); - int j1 = this.b(ix, kx); - if (structureboundingbox.b(new BlockPosition(lx, i1, j1))) { + int j1 = this.b(i, k); + + if (structureboundingbox.b((BaseBlockPosition) (new BlockPosition(l, i1, j1)))) { - EntityGuardianElder entityguardianelder = new EntityGuardianElder(generatoraccess.getMinecraftWorld()); + EntityGuardianElder entityguardianelder = EntityTypes.ELDER_GUARDIAN.create(generatoraccess.getMinecraftWorld()); // Paper + entityguardianelder.heal(entityguardianelder.getMaxHealth()); - entityguardianelder.setPositionRotation((double)lx + 0.5D, (double)i1, (double)j1 + 0.5D, 0.0F, 0.0F); - entityguardianelder.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityguardianelder)), (GroupDataEntity)null, (NBTTagCompound)null); -@@ -0,0 +0,0 @@ public class WorldGenMonumentPieces { - this.n = new StructureBoundingBox(i, 39, j, i + 58 - 1, 61, j + 58 - 1); - } - -- List list = this.a(random); -+ List list = this.a(random); // Paper - decompile error - this.p.d = true; - this.r.add(new WorldGenMonumentPieces.WorldGenMonumentPieceEntry(enumdirection1, this.p)); - this.r.add(new WorldGenMonumentPieces.WorldGenMonumentPiece2(enumdirection1, this.q, random)); -@@ -0,0 +0,0 @@ public class WorldGenMonumentPieces { - this.q.b[EnumDirection.EAST.a()].b[EnumDirection.UP.a()].d = true; - this.q.b[EnumDirection.NORTH.a()].b[EnumDirection.UP.a()].d = true; - this.q.b[EnumDirection.EAST.a()].b[EnumDirection.NORTH.a()].b[EnumDirection.UP.a()].d = true; -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList arraylist = Lists.newArrayList(); // Paper - decompile error - - for(WorldGenMonumentPieces.WorldGenMonumentStateTracker worldgenmonumentpieces$worldgenmonumentstatetracker4 : aworldgenmonumentpieces$worldgenmonumentstatetracker) { - if (worldgenmonumentpieces$worldgenmonumentstatetracker4 != null) { + entityguardianelder.setPositionRotation((double) l + 0.5D, (double) i1, (double) j1 + 0.5D, 0.0F, 0.0F); diff --git a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java -index 706e2b7e1..20630784a 100644 +index 5fa2987d2..967e33b3d 100644 --- a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java +++ b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java @@ -0,0 +0,0 @@ public class WorldGenVillagePieces { @@ -615,65 +591,41 @@ index efb0379ce..3d8193c47 100644 entitywitch.di(); entitywitch.setPositionRotation((double) j + 0.5D, (double) i, (double) k + 0.5D, 0.0F, 0.0F); diff --git a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java b/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java -index ee401980f..9ca9306d0 100644 +index 11010d8e1..4eb746ebb 100644 --- a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java +++ b/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java @@ -0,0 +0,0 @@ public class WorldGenWoodlandMansionPieces { + static class h extends WorldGenWoodlandMansionPieces.f { + + private h() { +- super(null); ++ super(); // Paper - decompile fix + } + } + + static class f extends WorldGenWoodlandMansionPieces.b { + + private f() { +- super(null); ++ super(); // Paper - decompile fix } - private void b() { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList> arraylist = Lists.newArrayList(); // Paper - decompile error - WorldGenWoodlandMansionPieces.g worldgenwoodlandmansionpieces$g = this.d[1]; + public String a(Random random) { +@@ -0,0 +0,0 @@ public class WorldGenWoodlandMansionPieces { + static class a extends WorldGenWoodlandMansionPieces.b { - for(int i = 0; i < this.c.c; ++i) { -@@ -0,0 +0,0 @@ public class WorldGenWoodlandMansionPieces { - int k = worldgenwoodlandmansionpieces$g.a(j, i); - int l = k & 983040; - if (l == 131072 && (k & 2097152) == 2097152) { -- arraylist.add(new Tuple(j, i)); -+ arraylist.add(new Tuple<>(j, i)); // Paper - decompile error - } - } - } -@@ -0,0 +0,0 @@ public class WorldGenWoodlandMansionPieces { - if (arraylist.isEmpty()) { - this.c.a(0, 0, this.c.b, this.c.c, 5); - } else { -- Tuple tuple = (Tuple)arraylist.get(this.a.nextInt(arraylist.size())); -+ Tuple tuple = arraylist.get(this.a.nextInt(arraylist.size())); // Paper - decompile error - int l1 = worldgenwoodlandmansionpieces$g.a(tuple.a(), tuple.b()); - worldgenwoodlandmansionpieces$g.a(tuple.a(), tuple.b(), l1 | 4194304); - EnumDirection enumdirection1 = this.b(this.b, tuple.a(), tuple.b(), 1, l1 & '\uffff'); -@@ -0,0 +0,0 @@ public class WorldGenWoodlandMansionPieces { + private a() { +- super(null); ++ super(); // Paper - decompile fix } - private void a(WorldGenWoodlandMansionPieces.g worldgenwoodlandmansionpieces$g, WorldGenWoodlandMansionPieces.g worldgenwoodlandmansionpieces$g1) { -- ArrayList arraylist = Lists.newArrayList(); -+ ArrayList> arraylist = Lists.newArrayList(); // Paper - decompile error - - for(int i = 0; i < worldgenwoodlandmansionpieces$g.c; ++i) { - for(int j = 0; j < worldgenwoodlandmansionpieces$g.b; ++j) { - if (worldgenwoodlandmansionpieces$g.a(j, i) == 2) { -- arraylist.add(new Tuple(j, i)); -+ arraylist.add(new Tuple<>(j, i)); // Paper - decompile error - } - } - } -@@ -0,0 +0,0 @@ public class WorldGenWoodlandMansionPieces { - Collections.shuffle(arraylist, this.a); - int k3 = 10; - -- for(Tuple tuple : arraylist) { -+ for(Tuple tuple : arraylist) { // Paper - decompile error - int k = tuple.a(); - int l = tuple.b(); - if (worldgenwoodlandmansionpieces$g1.a(k, l) == 0) { + public String a(Random random) { @@ -0,0 +0,0 @@ public class WorldGenWoodlandMansionPieces { this.a(generatoraccess, structureboundingbox, random, blockposition, LootTables.o, iblockdata); } else if ("Mage".equals(s)) { - EntityEvoker entityevoker = new EntityEvoker(generatoraccess.getMinecraftWorld()); +- + EntityEvoker entityevoker = EntityTypes.EVOKER.create(generatoraccess.getMinecraftWorld()); // Paper entityevoker.di(); entityevoker.setPositionRotation(blockposition, 0.0F, 0.0F); @@ -681,12 +633,13 @@ index ee401980f..9ca9306d0 100644 generatoraccess.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 2); } else if ("Warrior".equals(s)) { - EntityVindicator entityvindicator = new EntityVindicator(generatoraccess.getMinecraftWorld()); +- + EntityVindicator entityvindicator = EntityTypes.VINDICATOR.create(generatoraccess.getMinecraftWorld()); // Paper entityvindicator.di(); entityvindicator.setPositionRotation(blockposition, 0.0F, 0.0F); - entityvindicator.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityvindicator)), (GroupDataEntity)null, (NBTTagCompound)null); + entityvindicator.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityvindicator)), (GroupDataEntity) null, (NBTTagCompound) null); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 63c802d02..4d93a22d8 100644 +index 078399aa0..4de45c439 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 { @@ -699,7 +652,7 @@ index 63c802d02..4d93a22d8 100644 entityhorseskeleton.s(true); entityhorseskeleton.setAgeRaw(0); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 86e70f236..159d6bb73 100644 +index e33135ada..6ed7c9355 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/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index 0c65138326..d993d9e127 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 f0fc37abf..ea08d7d98 100644 +index 713034015..b1d860a75 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -143,7 +143,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 7f4c76669..1007641d5 100644 +index 0ebada490..be7030d56 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 @@ -185,7 +185,7 @@ index 7f4c76669..1007641d5 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 fd405281b..9c95661a7 100644 +index f2c172ff1..3b918da4d 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; @@ -243,7 +243,7 @@ index fd405281b..9c95661a7 100644 public KeyPair E() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d8ed44fe2..e7bae58fa 100644 +index fe2f13aef..07e25ce1d 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/Use-Vanilla-Minecart-Speeds.patch b/Spigot-Server-Patches/Use-Vanilla-Minecart-Speeds.patch index a044d4e806..9a9fcee812 100644 --- a/Spigot-Server-Patches/Use-Vanilla-Minecart-Speeds.patch +++ b/Spigot-Server-Patches/Use-Vanilla-Minecart-Speeds.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use Vanilla Minecart Speeds CraftBukkit changed the values on flying speed, restore back to vanilla diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index e741c7f83..6d21527ea 100644 +index a8a64d054..41e8a4b50 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -0,0 +0,0 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT diff --git a/Spigot-Server-Patches/Use-a-Queue-for-Queueing-Commands.patch b/Spigot-Server-Patches/Use-a-Queue-for-Queueing-Commands.patch index 755f30f137..732426d34c 100644 --- a/Spigot-Server-Patches/Use-a-Queue-for-Queueing-Commands.patch +++ b/Spigot-Server-Patches/Use-a-Queue-for-Queueing-Commands.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands Lists are bad as Queues mmmkay. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 1b3ca24d9..2c79c5333 100644 +index 3062d3e20..67690561b 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-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch index 2e300d0d40..ba30321206 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 43ceb2fb18..e31c97fb72 100644 +index dfb7d544f..ab46ae8c3 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-more-reasonable-thread-count-default-for-bootstr.patch b/Spigot-Server-Patches/Use-more-reasonable-thread-count-default-for-bootstr.patch index 88a47aeb38..21e0ee2470 100644 --- a/Spigot-Server-Patches/Use-more-reasonable-thread-count-default-for-bootstr.patch +++ b/Spigot-Server-Patches/Use-more-reasonable-thread-count-default-for-bootstr.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use more reasonable thread count default for bootstrap diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java -index 13f237ec4..012d878cb 100644 +index ee40bccf6..db9af361d 100644 --- a/src/main/java/net/minecraft/server/DataConverterRegistry.java +++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java @@ -0,0 +0,0 @@ public class DataConverterRegistry { 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 117ae10e3c..7dfa22fc58 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 07cd5aa28..fe0590dea 100644 +index 3e6a36af6..12ab5def2 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,20 +31,8 @@ index 85d364b8f..ff6c8e2b5 100644 org.bukkit.entity.Player player = (blockactioncontext.getEntity() instanceof EntityPlayer) ? (org.bukkit.entity.Player) blockactioncontext.getEntity().getBukkitEntity() : null; BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), player, CraftBlockData.fromData(iblockdata), defaultReturn); -diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java -index c6ec1a782..6c61718b2 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 i <= 0 ? Double.NEGATIVE_INFINITY : this.a(enumdirection$enumaxis, i); - } - -+ public AxisAlignedBB getBounds() { return a(); } // Paper - OBFHELPER - public AxisAlignedBB a() { - if (this.isEmpty()) { - throw new UnsupportedOperationException("No bounds for empty shape."); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 858cc1b97..78e85aacf 100644 +index 074d14b19..93b0544e0 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -61,7 +49,7 @@ index 858cc1b97..78e85aacf 100644 + if (voxelshape.isEmpty()) { + return true; + } else { -+ List list = this.getEntities((Entity) null, voxelshape.getBounds()); ++ List list = this.getEntities((Entity) null, voxelshape.getBoundingBox()); + + for (int i = 0; i < list.size(); ++i) { + Entity entity1 = (Entity) list.get(i); @@ -86,7 +74,7 @@ index 858cc1b97..78e85aacf 100644 if (voxelshape.isEmpty()) { 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 dcd628104..41b05f231 100644 +index 83f7116f4..fa3bb1047 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/Vex-getSummoner-API.patch b/Spigot-Server-Patches/Vex-getSummoner-API.patch index 2a2a069522..ab8ab54bc5 100644 --- a/Spigot-Server-Patches/Vex-getSummoner-API.patch +++ b/Spigot-Server-Patches/Vex-getSummoner-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Vex#getSummoner 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 b83826b18..90028c802 100644 +index 388d34126..c3864b869 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 { diff --git a/Spigot-Server-Patches/Waving-banner-workaround.patch b/Spigot-Server-Patches/Waving-banner-workaround.patch index 78c71918f6..4ad1934b29 100644 --- a/Spigot-Server-Patches/Waving-banner-workaround.patch +++ b/Spigot-Server-Patches/Waving-banner-workaround.patch @@ -6,13 +6,13 @@ Subject: [PATCH] Waving banner workaround This patch is a workaround for MC-63720 diff --git a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java -index 731b96dea2..2a0fd2fbc0 100644 +index c5c3f40ce..6413f76e7 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - import java.io.IOException; +@@ -0,0 +0,0 @@ import java.io.IOException; public class PacketPlayOutUpdateTime implements Packet { + + // World Age in ticks + // Not changed by server commands + // World Age must not be negative @@ -22,7 +22,7 @@ index 731b96dea2..2a0fd2fbc0 100644 + // Displayed in the debug screen (F3) private long b; - public PacketPlayOutUpdateTime() { + public PacketPlayOutUpdateTime() {} @@ -0,0 +0,0 @@ public class PacketPlayOutUpdateTime implements Packet { } } diff --git a/Spigot-Server-Patches/WitchConsumePotionEvent.patch b/Spigot-Server-Patches/WitchConsumePotionEvent.patch index 6e7dd06216..5d8be9aa0f 100644 --- a/Spigot-Server-Patches/WitchConsumePotionEvent.patch +++ b/Spigot-Server-Patches/WitchConsumePotionEvent.patch @@ -6,18 +6,18 @@ 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 093c7de52..f7d809444 100644 +index eaae9ea9a..0d579c7e4 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 { this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a); if (itemstack.getItem() == Items.POTION) { -- List list = PotionUtil.getEffects(itemstack); +- List list = PotionUtil.getEffects(itemstack); + // Paper start + com.destroystokyo.paper.event.entity.WitchConsumePotionEvent event = new com.destroystokyo.paper.event.entity.WitchConsumePotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); + -+ List list = event.callEvent() ? PotionUtil.getEffects(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion())) : null; ++ List list = event.callEvent() ? PotionUtil.getEffects(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion())) : null; + // Paper end if (list != null) { diff --git a/Spigot-Server-Patches/World-EntityHuman-Lookup-Optimizations.patch b/Spigot-Server-Patches/World-EntityHuman-Lookup-Optimizations.patch index 5cc7f25adb..9dfb74c6b8 100644 --- a/Spigot-Server-Patches/World-EntityHuman-Lookup-Optimizations.patch +++ b/Spigot-Server-Patches/World-EntityHuman-Lookup-Optimizations.patch @@ -5,7 +5,7 @@ Subject: [PATCH] World EntityHuman Lookup Optimizations diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 762ae7366..5e61826f6 100644 +index 2e6b00541..0d112016f 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 IEntityAccess, GeneratorAccess, IIBlockAc @@ -14,7 +14,7 @@ index 762ae7366..5e61826f6 100644 public final List players = Lists.newArrayList(); + public final Map playersByName = Maps.newHashMap(); // Paper - World EntityHuman Lookup Optimizations public final List k = Lists.newArrayList(); - protected final IntHashMap entitiesById = new IntHashMap(); + protected final IntHashMap entitiesById = new IntHashMap<>(); private final long F = 16777215L; @@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc EntityHuman entityhuman = (EntityHuman) entity; 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 c181436281..21e7d16807 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,14 +6,14 @@ 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 d033969cd..9f1610326 100644 +index df7a1a47e..969e43ed1 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 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(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX, this.locY, this.locZ}); +- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getText(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX, this.locY, this.locZ); + 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 } diff --git a/Spigot-Server-Patches/fix-newlines-in-spigot-tab-list-API.patch b/Spigot-Server-Patches/fix-newlines-in-spigot-tab-list-API.patch index 2f66b64b64..d33719e23c 100644 --- a/Spigot-Server-Patches/fix-newlines-in-spigot-tab-list-API.patch +++ b/Spigot-Server-Patches/fix-newlines-in-spigot-tab-list-API.patch @@ -7,7 +7,7 @@ Spigots implementation around the header/footer strips newlines from the header/footer, this patch allows the tab list header/footer to retain newlines. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0f1d700c7..0a0ea301d 100644 +index 5792a7538..c4b00acfb 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/force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch index 81ce8af7c4..5d39060cbc 100644 --- a/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch @@ -20,7 +20,7 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9eeb73d67..80db026ea 100644 +index 9f9eaf25c..1e789de1b 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 @@ -72,7 +72,7 @@ index 9eeb73d67..80db026ea 100644 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 53ae1528d..a35301ad5 100644 +index 7d096efa2..2bd256b3e 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 { @@ -90,7 +90,7 @@ index 53ae1528d..a35301ad5 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dc277f439..826ddc25c 100644 +index 710ad8b17..4acbc17ae 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 { @@ -110,7 +110,7 @@ index dc277f439..826ddc25c 100644 this.A(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d04570171..82855b3a8 100644 +index 71c4ed8fa..1c90f2f85 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/handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch index 980e8d6454..733e81e357 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 5076b9627..fb63496a0 100644 +index 8cd898a94..a781ca166 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/limit-the-range-at-which-we-ll-consider-an-attackabl.patch b/Spigot-Server-Patches/limit-the-range-at-which-we-ll-consider-an-attackabl.patch index f1f8105521..28560c9d2f 100644 --- a/Spigot-Server-Patches/limit-the-range-at-which-we-ll-consider-an-attackabl.patch +++ b/Spigot-Server-Patches/limit-the-range-at-which-we-ll-consider-an-attackabl.patch @@ -12,7 +12,7 @@ decrease when set, allowing us to skip further checks earlier on when looking for an attackable entity diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 160ef3659..c702b94ef 100644 +index 589d3efa7..c5960cf4c 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 IEntityAccess, GeneratorAccess, IIBlockAc 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 7c00aa3a55..0bdbab74ca 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,12 +21,12 @@ index aefb0ce97..af31030dc 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index b080fc792..fb76dc18b 100644 +index 81e602d1b..b6af42904 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 createEffectCloud() { - Collection collection = this.getEffects(); + Collection collection = this.getEffects(); - if (!collection.isEmpty()) { + if (!collection.isEmpty() && !world.paperConfig.disableCreeperLingeringEffect) { // Paper 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 13e1a19342..f151f6f11e 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 74c84dda69..eb6ada935f 100644 +index 862c5d66b..3ff271869 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 @@ -24,7 +24,7 @@ index 74c84dda69..eb6ada935f 100644 + SERVER = this; // Paper - better singleton + this.commandDispatcher = commanddispatcher; // CraftBukkit this.ac = new ResourceManager(EnumResourcePackType.SERVER_DATA); - this.resourcePackRepository = new ResourcePackRepository(ResourcePackLoader::new); + this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new); this.ag = new CraftingManager(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati // CraftBukkit start diff --git a/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch index 63c528892e..d30791518c 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 fb63496a0..921e1ec9e 100644 +index 7a6e9132c..8def17495 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 b97352e2c5..fd3dc0ee6c 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 15e07ce84..2ddc3f050 100644 +index 88300e2e5..f637aed77 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 IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/scripts/decompile.sh b/scripts/decompile.sh index 2771e260b7..4013638452 100755 --- a/scripts/decompile.sh +++ b/scripts/decompile.sh @@ -81,37 +81,37 @@ if [ ! -d "$classdir" ]; then set -e fi -needsDecomp=0 -if [ ! -f "$forgeflowercachefile" ]; then - needsDecomp=1 -elif [ "$(cat ${forgeflowercachefile})" != "$forgeflowercachevalue" ]; then - needsDecomp=1 -fi -if [ "$needsDecomp" == "1" ]; then - # our local cache is now invalidated, we can update forgeflower to get better deobfuscation - rm -rf "$forgedecompiledir/net" -fi +#needsDecomp=0 +#if [ ! -f "$forgeflowercachefile" ]; then +# needsDecomp=1 +#elif [ "$(cat ${forgeflowercachefile})" != "$forgeflowercachevalue" ]; then +# needsDecomp=1 +#fi +#if [ "$needsDecomp" == "1" ]; then +# # our local cache is now invalidated, we can update forgeflower to get better deobfuscation +# rm -rf "$forgedecompiledir/net" +#fi -# Forge (for Paper mc-dev imports, and dev src folders for unimported files) -if [ ! -d "$forgedecompiledir/net" ] ; then - echo "Decompiling classes (stage 1)..." - cd "$basedir" - - if [ ! -f "$forgeflowerbin" ]; then - echo "Downloading ForgeFlower ($forgeflowerversion)..." - curl -s -o "$forgeflowerbin" "$forgeflowerurl" - fi - - set +e - java -Ddecomp.renameparams=true -jar "$forgeflowerbin" ${forgefloweroptions} -ind=' ' "$classdir" "$forgedecompiledir" - if [ "$?" != "0" ]; then - rm -rf "$forgedecompiledir/net" - echo "Failed to decompile classes." - exit 1 - fi - echo "$forgeflowercachevalue" > "$forgeflowercachefile" - set -e -fi +## Forge (for Paper mc-dev imports, and dev src folders for unimported files) +#if [ ! -d "$forgedecompiledir/net" ] ; then +# echo "Decompiling classes (stage 1)..." +# cd "$basedir" +# +# if [ ! -f "$forgeflowerbin" ]; then +# echo "Downloading ForgeFlower ($forgeflowerversion)..." +# curl -s -o "$forgeflowerbin" "$forgeflowerurl" +# fi +# +# set +e +# java -Ddecomp.renameparams=true -jar "$forgeflowerbin" ${forgefloweroptions} -ind=' ' "$classdir" "$forgedecompiledir" +# if [ "$?" != "0" ]; then +# rm -rf "$forgedecompiledir/net" +# echo "Failed to decompile classes." +# exit 1 +# fi +# echo "$forgeflowercachevalue" > "$forgeflowercachefile" +# set -e +#fi # Spigot (for CraftBukkit patches) diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index c6b730e1da..488bbb6024 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -12,7 +12,8 @@ gitcmd="git -c commit.gpgsign=false" workdir="$basedir/work" minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) decompiledir="$workdir/Minecraft/$minecraftversion/forge" - +# replace for now +decompiledir="$workdir/Minecraft/$minecraftversion/spigot" export importedmcdev="" function import { export importedmcdev="$importedmcdev $1" diff --git a/scripts/remap.sh b/scripts/remap.sh index 8c3afcd13d..20f72bf835 100755 --- a/scripts/remap.sh +++ b/scripts/remap.sh @@ -45,7 +45,7 @@ fi echo "Applying class mappings..." if [ ! -f "$jarpath-cl.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-synth -i "$jarpath.jar" -m "$classmappings" -o "$jarpath-cl.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-lvt BASIC --auto-synth -i "$jarpath.jar" -m "$classmappings" -o "$jarpath-cl.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to apply class mappings." exit 1 @@ -63,7 +63,7 @@ fi echo "Creating remapped jar..." if [ ! -f "$jarpath-mapped.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only net/minecraft --only com/mojang/brigadier --kill-lvt -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "$packagemappings" -o "$jarpath-mapped.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only net/minecraft --only com/mojang/brigadier -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "$packagemappings" -o "$jarpath-mapped.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to create remapped jar." exit 1 diff --git a/work/BuildData b/work/BuildData index 370a4d9802..bcf503132c 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 370a4d9802d37f4228aa33720bdd5e9675222784 +Subproject commit bcf503132cdd66b4f92e41a8174e1b901467ec81 diff --git a/work/Bukkit b/work/Bukkit index 0969eedc88..7fca5fd456 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 0969eedc88f58ce58fc03bcd4acdfaa1ac91301c +Subproject commit 7fca5fd456b36db811d10990ff1fe9a532f8c5dd diff --git a/work/CraftBukkit b/work/CraftBukkit index dff66dfccd..c4a67eed99 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit dff66dfccd64280d066715340c0692f6e376be0b +Subproject commit c4a67eed9964aebb7add1686b044277cad42dbd4 diff --git a/work/Spigot b/work/Spigot index 573cdf2c73..518206a1d2 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 573cdf2c734efd81d75a18f0b6c64d5b4b95efa2 +Subproject commit 518206a1d250cdc7ae6448383ea9063f69c766c4