From 814cbeae0bbd6d6e50030dd93675226565b029eb Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sat, 15 Aug 2020 02:07:53 -0500 Subject: [PATCH] Delete patches/removed directory --- patches/removed/1.16/api/0005-Ridables.patch | 120 - ...intless-annotations-and-deprecations.patch | 142 - .../api/0009-Add-EntityPortalReadyEvent.patch | 59 - .../0013-Implement-ChunkTooLargeEvent.patch | 128 - ...-Add-LootableInventoryFirstFillEvent.patch | 61 - ...ityCreatePortalEvent-for-EnderDragon.patch | 47 - ...2-Configurable-enchantment-max-level.patch | 51 - .../1.16/server/0005-decompile-fixes.patch | 1618 ---- .../0006-Add-language-asset-purpur.lang.patch | 135 - .../removed/1.16/server/0009-Ridables.patch | 6558 ----------------- .../0034-Campfires-have-regen-effect.patch | 203 - .../0036-Campfires-burn-out-in-rain.patch | 82 - ...7-Campfires-should-fall-with-gravity.patch | 83 - ...3-Pillager-limits-and-leaders-chance.patch | 72 - .../server/0044-Make-the-GUI-better.patch | 1205 --- .../0046-Add-EntityPortalReadyEvent.patch | 158 - ...-Add-blacklist-option-for-grindstone.patch | 102 - .../0054-Option-for-slimes-not-pushable.patch | 67 - ...not-strip-colors-from-death-messages.patch | 25 - ...-speed-multiplier-using-values-betwe.patch | 30 - .../0075-Despawn-egg-hatches-chicken.patch | 65 - ...geEvent-not-firing-for-all-use-cases.patch | 54 - .../1.16/server/0077-Add-sleep-options.patch | 79 - ...078-Option-for-hay-block-fall-damage.patch | 41 - ...-Add-LootableInventoryFirstFillEvent.patch | 44 - .../0088-UPnP-Port-Forwarding-Service.patch | 200 - ...3-Configurable-enchantment-max-level.patch | 788 -- .../server/0104-Optimize-Chunk-Ticks.patch | 111 - ...nfigurable-beehive-generation-chance.patch | 107 - .../server/0106-Add-more-timings-timers.patch | 224 - .../0120-MC-56653-Fix-pig-zombies-aggro.patch | 67 - .../0124-YAPFA-Disable-mojang-profiler.patch | 175 - 32 files changed, 12901 deletions(-) delete mode 100644 patches/removed/1.16/api/0005-Ridables.patch delete mode 100644 patches/removed/1.16/api/0006-Remove-pointless-annotations-and-deprecations.patch delete mode 100644 patches/removed/1.16/api/0009-Add-EntityPortalReadyEvent.patch delete mode 100644 patches/removed/1.16/api/0013-Implement-ChunkTooLargeEvent.patch delete mode 100644 patches/removed/1.16/api/0027-Add-LootableInventoryFirstFillEvent.patch delete mode 100644 patches/removed/1.16/api/0028-Add-back-EntityCreatePortalEvent-for-EnderDragon.patch delete mode 100644 patches/removed/1.16/api/0032-Configurable-enchantment-max-level.patch delete mode 100644 patches/removed/1.16/server/0005-decompile-fixes.patch delete mode 100644 patches/removed/1.16/server/0006-Add-language-asset-purpur.lang.patch delete mode 100644 patches/removed/1.16/server/0009-Ridables.patch delete mode 100644 patches/removed/1.16/server/0034-Campfires-have-regen-effect.patch delete mode 100644 patches/removed/1.16/server/0036-Campfires-burn-out-in-rain.patch delete mode 100644 patches/removed/1.16/server/0037-Campfires-should-fall-with-gravity.patch delete mode 100644 patches/removed/1.16/server/0043-Pillager-limits-and-leaders-chance.patch delete mode 100644 patches/removed/1.16/server/0044-Make-the-GUI-better.patch delete mode 100644 patches/removed/1.16/server/0046-Add-EntityPortalReadyEvent.patch delete mode 100644 patches/removed/1.16/server/0048-Add-blacklist-option-for-grindstone.patch delete mode 100644 patches/removed/1.16/server/0054-Option-for-slimes-not-pushable.patch delete mode 100644 patches/removed/1.16/server/0064-Do-not-strip-colors-from-death-messages.patch delete mode 100644 patches/removed/1.16/server/0073-Fix-furnace-cook-speed-multiplier-using-values-betwe.patch delete mode 100644 patches/removed/1.16/server/0075-Despawn-egg-hatches-chicken.patch delete mode 100644 patches/removed/1.16/server/0076-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch delete mode 100644 patches/removed/1.16/server/0077-Add-sleep-options.patch delete mode 100644 patches/removed/1.16/server/0078-Option-for-hay-block-fall-damage.patch delete mode 100644 patches/removed/1.16/server/0080-Add-LootableInventoryFirstFillEvent.patch delete mode 100644 patches/removed/1.16/server/0088-UPnP-Port-Forwarding-Service.patch delete mode 100644 patches/removed/1.16/server/0103-Configurable-enchantment-max-level.patch delete mode 100644 patches/removed/1.16/server/0104-Optimize-Chunk-Ticks.patch delete mode 100644 patches/removed/1.16/server/0105-Add-configurable-beehive-generation-chance.patch delete mode 100644 patches/removed/1.16/server/0106-Add-more-timings-timers.patch delete mode 100644 patches/removed/1.16/server/0120-MC-56653-Fix-pig-zombies-aggro.patch delete mode 100644 patches/removed/1.16/server/0124-YAPFA-Disable-mojang-profiler.patch diff --git a/patches/removed/1.16/api/0005-Ridables.patch b/patches/removed/1.16/api/0005-Ridables.patch deleted file mode 100644 index fe054cda4..000000000 --- a/patches/removed/1.16/api/0005-Ridables.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 0c20fdc1cc34d29b9135326be5db514107bb6766 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 4 May 2019 00:57:16 -0500 -Subject: [PATCH] Ridables - ---- - .../paper/entity/ai/VanillaGoal.java | 4 ++ - .../event/entity/RidableSpacebarEvent.java | 37 ++++++++++++++++++ - src/main/java/org/bukkit/entity/Entity.java | 38 +++++++++++++++++++ - 3 files changed, 79 insertions(+) - create mode 100644 src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java - -diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -index d23ad96ee..36d37e9a3 100644 ---- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -@@ -154,6 +154,10 @@ public interface VanillaGoal extends Goal { - GoalKey FOLLOW_ENTITY = GoalKey.of(Mob.class, NamespacedKey.minecraft("follow_entity")); - GoalKey FOLLOW_OWNER = GoalKey.of(Tameable.class, NamespacedKey.minecraft("follow_owner")); - GoalKey FOLLOW_PARENT = GoalKey.of(Animals.class, NamespacedKey.minecraft("follow_parent")); -+ // Purpur start -+ GoalKey FIND_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("find_crystal_goal")); -+ GoalKey ORBIT_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal_goal")); -+ // Purpur end - GoalKey HORSE_TRAP = GoalKey.of(SkeletonHorse.class, NamespacedKey.minecraft("horse_trap")); - GoalKey HURT_BY_TARGET = GoalKey.of(Creature.class, NamespacedKey.minecraft("hurt_by_target")); - GoalKey INTERACT = GoalKey.of(Mob.class, NamespacedKey.minecraft("interact")); -diff --git a/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java -new file mode 100644 -index 000000000..c0ec5a130 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java -@@ -0,0 +1,37 @@ -+package net.pl3x.purpur.event.entity; -+ -+import org.bukkit.entity.Entity; -+import org.bukkit.event.Cancellable; -+import org.bukkit.event.HandlerList; -+import org.bukkit.event.entity.EntityEvent; -+import org.jetbrains.annotations.NotNull; -+ -+public class RidableSpacebarEvent extends EntityEvent implements Cancellable { -+ private static final HandlerList handlers = new HandlerList(); -+ private boolean cancelled; -+ -+ public RidableSpacebarEvent(@NotNull Entity entity) { -+ super(entity); -+ } -+ -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancel) { -+ cancelled = cancel; -+ } -+ -+ @Override -+ @NotNull -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} -diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 3f0f38031..25372c58b 100644 ---- a/src/main/java/org/bukkit/entity/Entity.java -+++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -659,4 +659,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent - @NotNull - org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason(); - // Paper end -+ -+ // Purpur start -+ /** -+ * Get the riding player -+ * -+ * @return Riding player -+ */ -+ @Nullable -+ Player getRider(); -+ -+ /** -+ * Check if entity is being ridden -+ * -+ * @return True if being ridden -+ */ -+ boolean hasRider(); -+ -+ /** -+ * Check if entity is ridable -+ * -+ * @return True if ridable -+ */ -+ boolean isRidable(); -+ -+ /** -+ * Check if entity is ridable in water -+ * -+ * @return True if ridable in water -+ */ -+ boolean isRidableInWater(); -+ -+ /** -+ * Check if shift is required to mount this entity -+ * -+ * @return True if shift is required -+ */ -+ boolean requireShiftToMount(); -+ // Purpur end - } --- -2.26.2 - diff --git a/patches/removed/1.16/api/0006-Remove-pointless-annotations-and-deprecations.patch b/patches/removed/1.16/api/0006-Remove-pointless-annotations-and-deprecations.patch deleted file mode 100644 index 94bbf8116..000000000 --- a/patches/removed/1.16/api/0006-Remove-pointless-annotations-and-deprecations.patch +++ /dev/null @@ -1,142 +0,0 @@ -From acabe1261f9db72988a29d0d72ee138b7c0cf221 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Tue, 31 Dec 2019 23:00:07 -0600 -Subject: [PATCH] Remove pointless annotations and deprecations - ---- - src/main/java/org/bukkit/Bukkit.java | 3 --- - src/main/java/org/bukkit/Server.java | 3 --- - src/main/java/org/bukkit/command/CommandExecutor.java | 2 +- - src/main/java/org/bukkit/command/TabCompleter.java | 2 +- - src/main/java/org/bukkit/inventory/ItemStack.java | 8 -------- - src/main/java/org/bukkit/plugin/java/JavaPlugin.java | 4 ++-- - src/test/java/org/bukkit/AnnotationTest.java | 5 +++++ - 7 files changed, 9 insertions(+), 18 deletions(-) - -diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index a9c10228e..780d603e4 100644 ---- a/src/main/java/org/bukkit/Bukkit.java -+++ b/src/main/java/org/bukkit/Bukkit.java -@@ -863,13 +863,10 @@ public final class Bukkit { - * This will return an object even if the player does not exist. To this - * method, all players will exist. - * -- * @deprecated Persistent storage of users should be by UUID as names are no longer -- * unique past a single session. - * @param name the name the player to retrieve - * @return an offline player - * @see #getOfflinePlayer(java.util.UUID) - */ -- @Deprecated - @NotNull - public static OfflinePlayer getOfflinePlayer(@NotNull String name) { - return server.getOfflinePlayer(name); -diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index ab1d082a4..a4cf71fb4 100644 ---- a/src/main/java/org/bukkit/Server.java -+++ b/src/main/java/org/bukkit/Server.java -@@ -722,13 +722,10 @@ public interface Server extends PluginMessageRecipient { - * This will return an object even if the player does not exist. To this - * method, all players will exist. - * -- * @deprecated Persistent storage of users should be by UUID as names are no longer -- * unique past a single session. - * @param name the name the player to retrieve - * @return an offline player - * @see #getOfflinePlayer(java.util.UUID) - */ -- @Deprecated - @NotNull - public OfflinePlayer getOfflinePlayer(@NotNull String name); - -diff --git a/src/main/java/org/bukkit/command/CommandExecutor.java b/src/main/java/org/bukkit/command/CommandExecutor.java -index 45cb8da12..383b43e1b 100644 ---- a/src/main/java/org/bukkit/command/CommandExecutor.java -+++ b/src/main/java/org/bukkit/command/CommandExecutor.java -@@ -19,5 +19,5 @@ public interface CommandExecutor { - * @param args Passed command arguments - * @return true if a valid command, otherwise false - */ -- public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args); -+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args); // Purpur - remove pointless annotations - } -diff --git a/src/main/java/org/bukkit/command/TabCompleter.java b/src/main/java/org/bukkit/command/TabCompleter.java -index e9cf71f5c..34d3462c7 100644 ---- a/src/main/java/org/bukkit/command/TabCompleter.java -+++ b/src/main/java/org/bukkit/command/TabCompleter.java -@@ -23,5 +23,5 @@ public interface TabCompleter { - * to default to the command executor - */ - @Nullable -- public List onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args); -+ public List onTabComplete(CommandSender sender, Command command, String alias, String[] args); // Purpur - remove pointless annotations - } -diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index ccd81fca2..a8ade268c 100644 ---- a/src/main/java/org/bukkit/inventory/ItemStack.java -+++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -204,13 +204,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { - * Sets the durability of this item - * - * @param durability Durability of this item -- * @deprecated durability is now part of ItemMeta. To avoid confusion and -- * misuse, {@link #getItemMeta()}, {@link #setItemMeta(ItemMeta)} and -- * {@link Damageable#setDamage(int)} should be used instead. This is because -- * any call to this method will be overwritten by subsequent setting of -- * ItemMeta which was created before this call. - */ -- @Deprecated - public void setDurability(final short durability) { - ItemMeta meta = getItemMeta(); - if (meta != null) { -@@ -223,9 +217,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { - * Gets the durability of this item - * - * @return Durability of this item -- * @deprecated see {@link #setDurability(short)} - */ -- @Deprecated - public short getDurability() { - ItemMeta meta = getItemMeta(); - return (meta == null) ? 0 : (short) ((Damageable) meta).getDamage(); -diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -index 04fa3991f..24d65491c 100644 ---- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -@@ -287,7 +287,7 @@ public abstract class JavaPlugin extends PluginBase { - * {@inheritDoc} - */ - @Override -- public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { -+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { // Purpur - remove pointless annotations - return false; - } - -@@ -296,7 +296,7 @@ public abstract class JavaPlugin extends PluginBase { - */ - @Override - @Nullable -- public List onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) { -+ public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) { // Purpur - remove pointless annotations - return null; - } - -diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java -index a48be38b1..951b81e79 100644 ---- a/src/test/java/org/bukkit/AnnotationTest.java -+++ b/src/test/java/org/bukkit/AnnotationTest.java -@@ -41,6 +41,11 @@ public class AnnotationTest { - "org/bukkit/plugin/java/PluginClassLoader", - // Generic functional interface - "org/bukkit/util/Consumer", -+ // Purpur start -+ "org/bukkit/command/CommandExecutor", -+ "org/bukkit/command/TabCompleter", -+ "org/bukkit/plugin/java/JavaPlugin", -+ // Purpur end - // Paper start - // Timings history is broken in terms of nullability due to guavas Function defining that the param is NonNull - "co/aikar/timings/TimingHistory$2", --- -2.26.2 - diff --git a/patches/removed/1.16/api/0009-Add-EntityPortalReadyEvent.patch b/patches/removed/1.16/api/0009-Add-EntityPortalReadyEvent.patch deleted file mode 100644 index 36ad3cc3d..000000000 --- a/patches/removed/1.16/api/0009-Add-EntityPortalReadyEvent.patch +++ /dev/null @@ -1,59 +0,0 @@ -From e503ea72858416dd97bd79c5aae85a2834f11195 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 11 Jan 2020 23:12:00 -0600 -Subject: [PATCH] Add EntityPortalReadyEvent - ---- - .../event/entity/EntityPortalReadyEvent.java | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - create mode 100644 src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java - -diff --git a/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java b/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java -new file mode 100644 -index 000000000..37f11c104 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java -@@ -0,0 +1,40 @@ -+package net.pl3x.purpur.event.entity; -+ -+import org.bukkit.entity.Entity; -+import org.bukkit.event.Cancellable; -+import org.bukkit.event.HandlerList; -+import org.bukkit.event.entity.EntityEvent; -+import org.jetbrains.annotations.NotNull; -+ -+/** -+ * Called when an entity is ready to travel through a portal -+ */ -+public class EntityPortalReadyEvent extends EntityEvent implements Cancellable { -+ private static final HandlerList handlers = new HandlerList(); -+ private boolean cancelled = false; -+ -+ public EntityPortalReadyEvent(@NotNull Entity entity) { -+ super(entity); -+ } -+ -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancel) { -+ this.cancelled = cancel; -+ } -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} --- -2.26.2 - diff --git a/patches/removed/1.16/api/0013-Implement-ChunkTooLargeEvent.patch b/patches/removed/1.16/api/0013-Implement-ChunkTooLargeEvent.patch deleted file mode 100644 index 47d4db63a..000000000 --- a/patches/removed/1.16/api/0013-Implement-ChunkTooLargeEvent.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 97b09e0112fecb7c4bd3dacf078e7cedcf402cdd Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Fri, 12 Jul 2019 02:09:58 -0500 -Subject: [PATCH] Implement ChunkTooLargeEvent - ---- - .../pl3x/purpur/event/ChunkTooLargeEvent.java | 109 ++++++++++++++++++ - 1 file changed, 109 insertions(+) - create mode 100644 src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java - -diff --git a/src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java b/src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java -new file mode 100644 -index 000000000..f9d4a42c6 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java -@@ -0,0 +1,109 @@ -+package net.pl3x.purpur.event; -+ -+import org.bukkit.Bukkit; -+import org.bukkit.Location; -+import org.bukkit.World; -+import org.bukkit.event.Event; -+import org.bukkit.event.HandlerList; -+import org.jetbrains.annotations.NotNull; -+import org.jetbrains.annotations.Nullable; -+ -+/** -+ * Called when an oversized chunk loads or saves -+ */ -+public class ChunkTooLargeEvent extends Event { -+ private static final HandlerList handlers = new HandlerList(); -+ private final String worldName; -+ private final World world; -+ private final int chunkX; -+ private final int chunkZ; -+ private final boolean saving; -+ private final boolean overzealous; -+ -+ public ChunkTooLargeEvent(@NotNull String worldName, int chunkX, int chunkZ, boolean saving, boolean overzealous) { -+ super(!Bukkit.isPrimaryThread()); -+ this.worldName = worldName; -+ this.world = Bukkit.getWorld(worldName); -+ this.chunkX = chunkX; -+ this.chunkZ = chunkZ; -+ this.saving = saving; -+ this.overzealous = overzealous; -+ } -+ -+ /** -+ * Get the world name according to the save directory -+ * -+ * @return World name -+ */ -+ @NotNull -+ public String getWorldName() { -+ return worldName; -+ } -+ -+ /** -+ * Get the world -+ * -+ * @return World, or null if world not loaded -+ */ -+ @Nullable -+ public World getWorld() { -+ return world; -+ } -+ -+ /** -+ * Get the X chunk coordinate -+ * -+ * @return X chunk coordinate -+ */ -+ public int getChunkX() { -+ return chunkX; -+ } -+ -+ /** -+ * Get the Z chunk coordinate -+ * -+ * @return Z chunk coordinate -+ */ -+ public int getChunkZ() { -+ return chunkZ; -+ } -+ -+ /** -+ * Whether this happened during a save attempt. -+ * -+ * @return True if saving, false if loading -+ */ -+ public boolean isSaving() { -+ return saving; -+ } -+ -+ /** -+ * If saving, was this is overzealous mode -+ * -+ * @return True if saving in overzealous mode -+ */ -+ public boolean isOverzealous() { -+ return overzealous; -+ } -+ -+ /** -+ * Get the location -+ * -+ * @return Location, or null if world not loaded -+ */ -+ @Nullable -+ public Location getLocation() { -+ return world == null ? null : new Location(world, chunkX << 4, 128, chunkZ << 4); -+ } -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} --- -2.26.2 - diff --git a/patches/removed/1.16/api/0027-Add-LootableInventoryFirstFillEvent.patch b/patches/removed/1.16/api/0027-Add-LootableInventoryFirstFillEvent.patch deleted file mode 100644 index 0fd71ee49..000000000 --- a/patches/removed/1.16/api/0027-Add-LootableInventoryFirstFillEvent.patch +++ /dev/null @@ -1,61 +0,0 @@ -From f6f1059eb70c8286fafd421d629652abddeab72a Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 02:43:10 -0500 -Subject: [PATCH] Add LootableInventoryFirstFillEvent - ---- - .../LootableInventoryFirstFillEvent.java | 42 +++++++++++++++++++ - 1 file changed, 42 insertions(+) - create mode 100644 src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java - -diff --git a/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java b/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java -new file mode 100644 -index 000000000..ef8eafb7c ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java -@@ -0,0 +1,42 @@ -+package net.pl3x.purpur.event.block; -+ -+import com.destroystokyo.paper.loottable.LootableInventory; -+import org.bukkit.entity.Player; -+import org.bukkit.event.Event; -+import org.bukkit.event.HandlerList; -+import org.jetbrains.annotations.NotNull; -+import org.jetbrains.annotations.Nullable; -+ -+public class LootableInventoryFirstFillEvent extends Event { -+ @Nullable -+ private final Player player; -+ @NotNull -+ private final LootableInventory inventory; -+ -+ public LootableInventoryFirstFillEvent(@Nullable Player player, @NotNull LootableInventory inventory) { -+ this.player = player; -+ this.inventory = inventory; -+ } -+ -+ @Nullable -+ public Player getPlayer() { -+ return player; -+ } -+ -+ @NotNull -+ public LootableInventory getInventory() { -+ return inventory; -+ } -+ -+ private static final HandlerList handlers = new HandlerList(); -+ -+ @NotNull -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} --- -2.26.2 - diff --git a/patches/removed/1.16/api/0028-Add-back-EntityCreatePortalEvent-for-EnderDragon.patch b/patches/removed/1.16/api/0028-Add-back-EntityCreatePortalEvent-for-EnderDragon.patch deleted file mode 100644 index 80e5b31a1..000000000 --- a/patches/removed/1.16/api/0028-Add-back-EntityCreatePortalEvent-for-EnderDragon.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b08452c2c1e0893a931b924f80972baa4d007619 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 03:53:46 -0500 -Subject: [PATCH] Add back EntityCreatePortalEvent for EnderDragon - ---- - src/main/java/org/bukkit/PortalType.java | 7 +++++++ - .../org/bukkit/event/entity/EntityCreatePortalEvent.java | 4 +--- - 2 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/main/java/org/bukkit/PortalType.java b/src/main/java/org/bukkit/PortalType.java -index 427cfbb8b..e23565323 100644 ---- a/src/main/java/org/bukkit/PortalType.java -+++ b/src/main/java/org/bukkit/PortalType.java -@@ -15,6 +15,13 @@ public enum PortalType { - */ - ENDER, - -+ // Purpur start -+ /** -+ * This is an End Gateway portal -+ */ -+ END_GATEWAY, -+ // Purpur end -+ - /** - * This is a custom Plugin portal. - */ -diff --git a/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java b/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java -index 397baaefd..7456240b4 100644 ---- a/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java -+++ b/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java -@@ -11,10 +11,8 @@ import org.jetbrains.annotations.NotNull; - - /** - * Thrown when a Living Entity creates a portal in a world. -- * -- * @deprecated Use {@link PortalCreateEvent} - */ --@Deprecated -+// Purpur - un-deprecate - public class EntityCreatePortalEvent extends EntityEvent implements Cancellable { - private static final HandlerList handlers = new HandlerList(); - private final List blocks; --- -2.26.2 - diff --git a/patches/removed/1.16/api/0032-Configurable-enchantment-max-level.patch b/patches/removed/1.16/api/0032-Configurable-enchantment-max-level.patch deleted file mode 100644 index d314269d1..000000000 --- a/patches/removed/1.16/api/0032-Configurable-enchantment-max-level.patch +++ /dev/null @@ -1,51 +0,0 @@ -From eb6271ac09f62253e19664c2a5e4b28f1dd5a914 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Wed, 1 Apr 2020 19:18:29 -0500 -Subject: [PATCH] Configurable enchantment max level - ---- - src/main/java/org/bukkit/enchantments/Enchantment.java | 9 +++++++++ - .../java/org/bukkit/enchantments/EnchantmentWrapper.java | 7 +++++++ - 2 files changed, 16 insertions(+) - -diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java -index d1885f178..b277428d6 100644 ---- a/src/main/java/org/bukkit/enchantments/Enchantment.java -+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java -@@ -232,6 +232,15 @@ public abstract class Enchantment implements Keyed { - */ - public abstract int getMaxLevel(); - -+ // Purpur start -+ /** -+ * Sets the maximum level that this Enchantment may become. -+ * -+ * @param maxLevel Maximum level of the Enchantment -+ */ -+ public abstract void setMaxLevel(int maxLevel); -+ // Purpur end -+ - /** - * Gets the level that this Enchantment should start at - * -diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java -index 9566e4306..67e31fee3 100644 ---- a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java -+++ b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java -@@ -27,6 +27,13 @@ public class EnchantmentWrapper extends Enchantment { - return getEnchantment().getMaxLevel(); - } - -+ // Purpur start -+ @Override -+ public void setMaxLevel(int maxLevel) { -+ getEnchantment().setMaxLevel(maxLevel); -+ } -+ // Purpur end -+ - @Override - public int getStartLevel() { - return getEnchantment().getStartLevel(); --- -2.26.2 - diff --git a/patches/removed/1.16/server/0005-decompile-fixes.patch b/patches/removed/1.16/server/0005-decompile-fixes.patch deleted file mode 100644 index e226adacb..000000000 --- a/patches/removed/1.16/server/0005-decompile-fixes.patch +++ /dev/null @@ -1,1618 +0,0 @@ -From 1bcefd743dbd60759181f1ee12aa4a4526102698 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 27 Feb 2020 13:39:06 -0600 -Subject: [PATCH] decompile-fixes - ---- - .../minecraft/server/BiomeBambooJungle.java | 6 ++--- - .../server/BiomeBambooJungleHills.java | 6 ++--- - .../java/net/minecraft/server/BiomeBeach.java | 6 ++--- - .../net/minecraft/server/BiomeBigHills.java | 4 +-- - .../minecraft/server/BiomeBirchForest.java | 4 +-- - .../server/BiomeBirchForestHills.java | 4 +-- - .../server/BiomeBirchForestHillsMutated.java | 4 +-- - .../server/BiomeBirchForestMutated.java | 4 +-- - .../net/minecraft/server/BiomeColdBeach.java | 6 ++--- - .../minecraft/server/BiomeColdDeepOcean.java | 10 +++---- - .../net/minecraft/server/BiomeColdOcean.java | 8 +++--- - .../net/minecraft/server/BiomeColdTaiga.java | 6 ++--- - .../minecraft/server/BiomeColdTaigaHills.java | 4 +-- - .../server/BiomeColdTaigaMutated.java | 4 +-- - .../net/minecraft/server/BiomeDeepOcean.java | 10 +++---- - .../net/minecraft/server/BiomeDesert.java | 10 +++---- - .../minecraft/server/BiomeDesertHills.java | 6 ++--- - .../minecraft/server/BiomeDesertMutated.java | 4 +-- - .../server/BiomeExtremeHillsEdge.java | 4 +-- - .../server/BiomeExtremeHillsMutated.java | 4 +-- - .../server/BiomeExtremeHillsWithTrees.java | 4 +-- - .../BiomeExtremeHillsWithTreesMutated.java | 4 +-- - .../minecraft/server/BiomeFlowerForest.java | 10 +++---- - .../net/minecraft/server/BiomeForest.java | 6 ++--- - .../minecraft/server/BiomeForestHills.java | 6 ++--- - .../server/BiomeFrozenDeepOcean.java | 8 +++--- - .../minecraft/server/BiomeFrozenOcean.java | 6 ++--- - .../minecraft/server/BiomeFrozenRiver.java | 2 +- - .../java/net/minecraft/server/BiomeHell.java | 26 +++++++++---------- - .../minecraft/server/BiomeIceMountains.java | 4 +-- - .../net/minecraft/server/BiomeIcePlains.java | 10 +++---- - .../server/BiomeIcePlainsSpikes.java | 8 +++--- - .../net/minecraft/server/BiomeJungle.java | 6 ++--- - .../net/minecraft/server/BiomeJungleEdge.java | 4 +-- - .../server/BiomeJungleEdgeMutated.java | 4 +-- - .../minecraft/server/BiomeJungleHills.java | 6 ++--- - .../minecraft/server/BiomeJungleMutated.java | 4 +-- - .../server/BiomeLukewarmDeepOcean.java | 8 +++--- - .../minecraft/server/BiomeLukewarmOcean.java | 6 ++--- - .../server/BiomeMegaSpruceTaiga.java | 4 +-- - .../net/minecraft/server/BiomeMegaTaiga.java | 4 +-- - .../minecraft/server/BiomeMegaTaigaHills.java | 4 +-- - .../java/net/minecraft/server/BiomeMesa.java | 4 +-- - .../net/minecraft/server/BiomeMesaBryce.java | 4 +-- - .../minecraft/server/BiomeMesaPlataeu.java | 4 +-- - .../server/BiomeMesaPlataeuClear.java | 4 +-- - .../server/BiomeMesaPlateauClearMutated.java | 4 +-- - .../server/BiomeMesaPlateauMutated.java | 4 +-- - .../server/BiomeMushroomIslandShore.java | 4 +-- - .../net/minecraft/server/BiomeMushrooms.java | 4 +-- - .../java/net/minecraft/server/BiomeOcean.java | 8 +++--- - .../net/minecraft/server/BiomePlains.java | 8 +++--- - .../server/BiomeRedwoodTaigaHillsMutated.java | 4 +-- - .../java/net/minecraft/server/BiomeRiver.java | 4 +-- - .../minecraft/server/BiomeRoofedForest.java | 8 +++--- - .../server/BiomeRoofedForestMutated.java | 8 +++--- - .../net/minecraft/server/BiomeSavanna.java | 8 +++--- - .../minecraft/server/BiomeSavannaMutated.java | 4 +-- - .../minecraft/server/BiomeSavannaPlateau.java | 4 +-- - .../server/BiomeSavannaPlateauMutated.java | 4 +-- - .../net/minecraft/server/BiomeStoneBeach.java | 4 +-- - .../server/BiomeSunflowerPlains.java | 10 +++---- - .../java/net/minecraft/server/BiomeSwamp.java | 6 ++--- - .../server/BiomeSwamplandMutated.java | 2 +- - .../java/net/minecraft/server/BiomeTaiga.java | 8 +++--- - .../net/minecraft/server/BiomeTaigaHills.java | 4 +-- - .../minecraft/server/BiomeTaigaMutated.java | 4 +-- - .../net/minecraft/server/BiomeTheEnd.java | 2 +- - .../server/BiomeTheEndFloatingIslands.java | 2 +- - .../server/BiomeTheEndHighIsland.java | 6 ++--- - .../server/BiomeTheEndMediumIsland.java | 2 +- - .../java/net/minecraft/server/BiomeVoid.java | 2 +- - .../minecraft/server/BiomeWarmDeepOcean.java | 8 +++--- - .../net/minecraft/server/BiomeWarmOcean.java | 10 +++---- - .../net/minecraft/server/CommandDebug.java | 2 +- - .../net/minecraft/server/EntityBlaze.java | 2 +- - .../java/net/minecraft/server/EntityCat.java | 2 +- - .../minecraft/server/EntityEnderSignal.java | 2 +- - .../net/minecraft/server/EntityEndermite.java | 2 +- - .../net/minecraft/server/EntityEvoker.java | 2 +- - .../java/net/minecraft/server/EntityFish.java | 6 +---- - .../net/minecraft/server/EntityParrot.java | 4 +-- - .../net/minecraft/server/EntitySheep.java | 6 ++--- - .../net/minecraft/server/EntityWitch.java | 4 +-- - .../net/minecraft/server/GeneratorAccess.java | 2 +- - .../java/net/minecraft/server/MathHelper.java | 2 +- - .../server/WorldGenFeatureConfigured.java | 2 +- - .../server/WorldGenFeatureTreeBeehive.java | 2 +- - 88 files changed, 227 insertions(+), 233 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/BiomeBambooJungle.java b/src/main/java/net/minecraft/server/BiomeBambooJungle.java -index de831ed87..9c38f8907 100644 ---- a/src/main/java/net/minecraft/server/BiomeBambooJungle.java -+++ b/src/main/java/net/minecraft/server/BiomeBambooJungle.java -@@ -4,9 +4,9 @@ public class BiomeBambooJungle extends BiomeBase { - - public BiomeBambooJungle() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.JUNGLE).a(0.1F).b(0.2F).c(0.95F).d(0.9F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.JUNGLE_TEMPLE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.JUNGLE_TEMPLE.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeBambooJungleHills.java b/src/main/java/net/minecraft/server/BiomeBambooJungleHills.java -index 5ae19373d..2a6dafccd 100644 ---- a/src/main/java/net/minecraft/server/BiomeBambooJungleHills.java -+++ b/src/main/java/net/minecraft/server/BiomeBambooJungleHills.java -@@ -4,9 +4,9 @@ public final class BiomeBambooJungleHills extends BiomeBase { - - public BiomeBambooJungleHills() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.JUNGLE).a(0.45F).b(0.3F).c(0.95F).d(0.9F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.JUNGLE_TEMPLE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.JUNGLE_TEMPLE.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeBeach.java b/src/main/java/net/minecraft/server/BiomeBeach.java -index 262740414..f4e9345ae 100644 ---- a/src/main/java/net/minecraft/server/BiomeBeach.java -+++ b/src/main/java/net/minecraft/server/BiomeBeach.java -@@ -4,9 +4,9 @@ public final class BiomeBeach extends BiomeBase { - - public BiomeBeach() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.z).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.BEACH).a(0.0F).b(0.025F).c(0.8F).d(0.4F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.BURIED_TREASURE.b((WorldGenFeatureConfiguration) (new WorldGenBuriedTreasureConfiguration(0.01F)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(true)))); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.BURIED_TREASURE.b(new WorldGenBuriedTreasureConfiguration(0.01F))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(true))); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeBigHills.java b/src/main/java/net/minecraft/server/BiomeBigHills.java -index a42098da5..58c30f652 100644 ---- a/src/main/java/net/minecraft/server/BiomeBigHills.java -+++ b/src/main/java/net/minecraft/server/BiomeBigHills.java -@@ -4,8 +4,8 @@ public final class BiomeBigHills extends BiomeBase { - - protected BiomeBigHills() { - super((new BiomeBase.a()).a(WorldGenSurface.H, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.EXTREME_HILLS).a(1.0F).b(0.5F).c(0.2F).d(0.3F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeBirchForest.java b/src/main/java/net/minecraft/server/BiomeBirchForest.java -index 27fa23801..9437438c8 100644 ---- a/src/main/java/net/minecraft/server/BiomeBirchForest.java -+++ b/src/main/java/net/minecraft/server/BiomeBirchForest.java -@@ -4,8 +4,8 @@ public final class BiomeBirchForest extends BiomeBase { - - public BiomeBirchForest() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.1F).b(0.2F).c(0.6F).d(0.6F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeBirchForestHills.java b/src/main/java/net/minecraft/server/BiomeBirchForestHills.java -index 51b1d39f5..3e5c23d31 100644 ---- a/src/main/java/net/minecraft/server/BiomeBirchForestHills.java -+++ b/src/main/java/net/minecraft/server/BiomeBirchForestHills.java -@@ -4,8 +4,8 @@ public final class BiomeBirchForestHills extends BiomeBase { - - public BiomeBirchForestHills() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.45F).b(0.3F).c(0.6F).d(0.6F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeBirchForestHillsMutated.java b/src/main/java/net/minecraft/server/BiomeBirchForestHillsMutated.java -index b74f23cff..d5eb5c91c 100644 ---- a/src/main/java/net/minecraft/server/BiomeBirchForestHillsMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeBirchForestHillsMutated.java -@@ -4,8 +4,8 @@ public final class BiomeBirchForestHillsMutated extends BiomeBase { - - public BiomeBirchForestHillsMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.55F).b(0.5F).c(0.6F).d(0.6F).a(4159204).b(329011).a("birch_forest_hills")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeBirchForestMutated.java b/src/main/java/net/minecraft/server/BiomeBirchForestMutated.java -index 17fe3818d..e805f9568 100644 ---- a/src/main/java/net/minecraft/server/BiomeBirchForestMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeBirchForestMutated.java -@@ -4,8 +4,8 @@ public final class BiomeBirchForestMutated extends BiomeBase { - - public BiomeBirchForestMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.2F).b(0.4F).c(0.6F).d(0.6F).a(4159204).b(329011).a("birch_forest")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeColdBeach.java b/src/main/java/net/minecraft/server/BiomeColdBeach.java -index 2c230be98..1b92f4567 100644 ---- a/src/main/java/net/minecraft/server/BiomeColdBeach.java -+++ b/src/main/java/net/minecraft/server/BiomeColdBeach.java -@@ -4,9 +4,9 @@ public final class BiomeColdBeach extends BiomeBase { - - public BiomeColdBeach() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.z).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.BEACH).a(0.0F).b(0.025F).c(0.05F).d(0.3F).a(4020182).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.BURIED_TREASURE.b((WorldGenFeatureConfiguration) (new WorldGenBuriedTreasureConfiguration(0.01F)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(true)))); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.BURIED_TREASURE.b(new WorldGenBuriedTreasureConfiguration(0.01F))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(true))); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeColdDeepOcean.java b/src/main/java/net/minecraft/server/BiomeColdDeepOcean.java -index d96e820e0..b9a5cb63a 100644 ---- a/src/main/java/net/minecraft/server/BiomeColdDeepOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeColdDeepOcean.java -@@ -4,10 +4,10 @@ public class BiomeColdDeepOcean extends BiomeBase { - - public BiomeColdDeepOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.8F).b(0.1F).c(0.5F).d(0.5F).a(4020182).b(329011).a((String) null)); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F)))); -- this.a(WorldGenerator.OCEAN_MONUMENT.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.OCEAN_MONUMENT.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -@@ -21,7 +21,7 @@ public class BiomeColdDeepOcean extends BiomeBase { - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.aa(this); - BiomeDecoratorGroups.am(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b((WorldGenFeatureConfiguration) (new WorldGenFeatureSeaGrassConfiguration(40, 0.8D))).a(WorldGenDecorator.v.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b(new WorldGenFeatureSeaGrassConfiguration(40, 0.8D)).a(WorldGenDecorator.v.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.ai(this); - BiomeDecoratorGroups.ah(this); - BiomeDecoratorGroups.ap(this); -diff --git a/src/main/java/net/minecraft/server/BiomeColdOcean.java b/src/main/java/net/minecraft/server/BiomeColdOcean.java -index c7ed2e134..571c3d139 100644 ---- a/src/main/java/net/minecraft/server/BiomeColdOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeColdOcean.java -@@ -4,9 +4,9 @@ public class BiomeColdOcean extends BiomeBase { - - public BiomeColdOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.0F).b(0.1F).c(0.5F).d(0.5F).a(4020182).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -@@ -20,7 +20,7 @@ public class BiomeColdOcean extends BiomeBase { - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.aa(this); - BiomeDecoratorGroups.am(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b((WorldGenFeatureConfiguration) (new WorldGenFeatureSeaGrassConfiguration(32, 0.3D))).a(WorldGenDecorator.v.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b(new WorldGenFeatureSeaGrassConfiguration(32, 0.3D)).a(WorldGenDecorator.v.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.ai(this); - BiomeDecoratorGroups.ah(this); - BiomeDecoratorGroups.ap(this); -diff --git a/src/main/java/net/minecraft/server/BiomeColdTaiga.java b/src/main/java/net/minecraft/server/BiomeColdTaiga.java -index c766dedfa..88400e77b 100644 ---- a/src/main/java/net/minecraft/server/BiomeColdTaiga.java -+++ b/src/main/java/net/minecraft/server/BiomeColdTaiga.java -@@ -4,9 +4,9 @@ public final class BiomeColdTaiga extends BiomeBase { - - public BiomeColdTaiga() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.TAIGA).a(0.2F).b(0.2F).c(-0.5F).d(0.4F).a(4020182).b(329011).a((String) null)); -- this.a(WorldGenerator.IGLOO.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.IGLOO.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeColdTaigaHills.java b/src/main/java/net/minecraft/server/BiomeColdTaigaHills.java -index 187f11f58..8a8fc7dbd 100644 ---- a/src/main/java/net/minecraft/server/BiomeColdTaigaHills.java -+++ b/src/main/java/net/minecraft/server/BiomeColdTaigaHills.java -@@ -4,8 +4,8 @@ public final class BiomeColdTaigaHills extends BiomeBase { - - public BiomeColdTaigaHills() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.TAIGA).a(0.45F).b(0.3F).c(-0.5F).d(0.4F).a(4020182).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeColdTaigaMutated.java b/src/main/java/net/minecraft/server/BiomeColdTaigaMutated.java -index 97c56fb80..327e6847f 100644 ---- a/src/main/java/net/minecraft/server/BiomeColdTaigaMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeColdTaigaMutated.java -@@ -4,8 +4,8 @@ public final class BiomeColdTaigaMutated extends BiomeBase { - - public BiomeColdTaigaMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.TAIGA).a(0.3F).b(0.4F).c(-0.5F).d(0.4F).a(4020182).b(329011).a("snowy_taiga")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeDeepOcean.java b/src/main/java/net/minecraft/server/BiomeDeepOcean.java -index bea129314..651d44cb3 100644 ---- a/src/main/java/net/minecraft/server/BiomeDeepOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeDeepOcean.java -@@ -4,10 +4,10 @@ public final class BiomeDeepOcean extends BiomeBase { - - public BiomeDeepOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.8F).b(0.1F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.OCEAN_MONUMENT.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F)))); -+ this.a(WorldGenerator.OCEAN_MONUMENT.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -@@ -21,7 +21,7 @@ public final class BiomeDeepOcean extends BiomeBase { - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.aa(this); - BiomeDecoratorGroups.am(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b((WorldGenFeatureConfiguration) (new WorldGenFeatureSeaGrassConfiguration(48, 0.8D))).a(WorldGenDecorator.v.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b(new WorldGenFeatureSeaGrassConfiguration(48, 0.8D)).a(WorldGenDecorator.v.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.ai(this); - BiomeDecoratorGroups.ah(this); - BiomeDecoratorGroups.ap(this); -diff --git a/src/main/java/net/minecraft/server/BiomeDesert.java b/src/main/java/net/minecraft/server/BiomeDesert.java -index 7a8784f18..257732dad 100644 ---- a/src/main/java/net/minecraft/server/BiomeDesert.java -+++ b/src/main/java/net/minecraft/server/BiomeDesert.java -@@ -4,11 +4,11 @@ public final class BiomeDesert extends BiomeBase { - - public BiomeDesert() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.z).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.DESERT).a(0.125F).b(0.05F).c(2.0F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.VILLAGE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureVillageConfiguration("village/desert/town_centers", 6)))); -- this.a(WorldGenerator.PILLAGER_OUTPOST.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.DESERT_PYRAMID.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.VILLAGE.b(new WorldGenFeatureVillageConfiguration("village/desert/town_centers", 6))); // Purpur - decompile error -+ this.a(WorldGenerator.PILLAGER_OUTPOST.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.DESERT_PYRAMID.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.e(this); -diff --git a/src/main/java/net/minecraft/server/BiomeDesertHills.java b/src/main/java/net/minecraft/server/BiomeDesertHills.java -index 9f5e9abc4..3752fc450 100644 ---- a/src/main/java/net/minecraft/server/BiomeDesertHills.java -+++ b/src/main/java/net/minecraft/server/BiomeDesertHills.java -@@ -4,9 +4,9 @@ public final class BiomeDesertHills extends BiomeBase { - - public BiomeDesertHills() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.z).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.DESERT).a(0.45F).b(0.3F).c(2.0F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.DESERT_PYRAMID.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.DESERT_PYRAMID.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.e(this); -diff --git a/src/main/java/net/minecraft/server/BiomeDesertMutated.java b/src/main/java/net/minecraft/server/BiomeDesertMutated.java -index f79e438dc..1a0b56932 100644 ---- a/src/main/java/net/minecraft/server/BiomeDesertMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeDesertMutated.java -@@ -4,8 +4,8 @@ public final class BiomeDesertMutated extends BiomeBase { - - public BiomeDesertMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.z).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.DESERT).a(0.225F).b(0.25F).c(2.0F).d(0.0F).a(4159204).b(329011).a("desert")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.e(this); -diff --git a/src/main/java/net/minecraft/server/BiomeExtremeHillsEdge.java b/src/main/java/net/minecraft/server/BiomeExtremeHillsEdge.java -index 58a612528..8e19e0688 100644 ---- a/src/main/java/net/minecraft/server/BiomeExtremeHillsEdge.java -+++ b/src/main/java/net/minecraft/server/BiomeExtremeHillsEdge.java -@@ -4,8 +4,8 @@ public final class BiomeExtremeHillsEdge extends BiomeBase { - - protected BiomeExtremeHillsEdge() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.EXTREME_HILLS).a(0.8F).b(0.3F).c(0.2F).d(0.3F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeExtremeHillsMutated.java b/src/main/java/net/minecraft/server/BiomeExtremeHillsMutated.java -index cd18533bb..69d4880c7 100644 ---- a/src/main/java/net/minecraft/server/BiomeExtremeHillsMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeExtremeHillsMutated.java -@@ -4,8 +4,8 @@ public final class BiomeExtremeHillsMutated extends BiomeBase { - - protected BiomeExtremeHillsMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.J, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.EXTREME_HILLS).a(1.0F).b(0.5F).c(0.2F).d(0.3F).a(4159204).b(329011).a("mountains")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTrees.java b/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTrees.java -index 2c7f5940a..7661d5316 100644 ---- a/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTrees.java -+++ b/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTrees.java -@@ -4,8 +4,8 @@ public final class BiomeExtremeHillsWithTrees extends BiomeBase { - - protected BiomeExtremeHillsWithTrees() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.EXTREME_HILLS).a(1.0F).b(0.5F).c(0.2F).d(0.3F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTreesMutated.java b/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTreesMutated.java -index 6e33c2363..05418f8fa 100644 ---- a/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTreesMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeExtremeHillsWithTreesMutated.java -@@ -4,8 +4,8 @@ public final class BiomeExtremeHillsWithTreesMutated extends BiomeBase { - - protected BiomeExtremeHillsWithTreesMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.J, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.EXTREME_HILLS).a(1.0F).b(0.5F).c(0.2F).d(0.3F).a(4159204).b(329011).a("wooded_mountains")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeFlowerForest.java b/src/main/java/net/minecraft/server/BiomeFlowerForest.java -index c6ac9506a..1d3f62432 100644 ---- a/src/main/java/net/minecraft/server/BiomeFlowerForest.java -+++ b/src/main/java/net/minecraft/server/BiomeFlowerForest.java -@@ -6,18 +6,18 @@ public final class BiomeFlowerForest extends BiomeBase { - - public BiomeFlowerForest() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.1F).b(0.4F).c(0.7F).d(0.8F).a(4159204).b(329011).a("forest")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); - BiomeDecoratorGroups.f(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_RANDOM_SELECTOR.b((WorldGenFeatureConfiguration) (new WorldGenFeatureRandomConfiguration(ImmutableList.of(WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.O), WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.P), WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.Q), WorldGenerator.FLOWER.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.B)), 2))).a(WorldGenDecorator.d.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(5))))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_RANDOM_SELECTOR.b(new WorldGenFeatureRandomConfiguration(ImmutableList.of(WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.O), WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.P), WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.Q), WorldGenerator.FLOWER.b(BiomeDecoratorGroups.B)), 2)).a(WorldGenDecorator.d.a(new WorldGenDecoratorFrequencyConfiguration(5)))); // Purpur - decompile error - BiomeDecoratorGroups.g(this); - BiomeDecoratorGroups.h(this); - BiomeDecoratorGroups.l(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_SELECTOR.b((WorldGenFeatureConfiguration) (new WorldGenFeatureRandomChoiceConfiguration(ImmutableList.of(WorldGenerator.NORMAL_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.BIRCH_TREE_BEES_002).a(0.2F), WorldGenerator.FANCY_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.FANCY_TREE_BEES_002).a(0.1F)), WorldGenerator.NORMAL_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.NORMAL_TREE_BEES_002)))).a(WorldGenDecorator.m.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyExtraChanceConfiguration(6, 0.1F, 1))))); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.FLOWER.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.F).a(WorldGenDecorator.d.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(100))))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_SELECTOR.b(new WorldGenFeatureRandomChoiceConfiguration(ImmutableList.of(WorldGenerator.NORMAL_TREE.b(BiomeDecoratorGroups.BIRCH_TREE_BEES_002).a(0.2F), WorldGenerator.FANCY_TREE.b(BiomeDecoratorGroups.FANCY_TREE_BEES_002).a(0.1F)), WorldGenerator.NORMAL_TREE.b(BiomeDecoratorGroups.NORMAL_TREE_BEES_002))).a(WorldGenDecorator.m.a(new WorldGenDecoratorFrequencyExtraChanceConfiguration(6, 0.1F, 1)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.FLOWER.b(BiomeDecoratorGroups.F).a(WorldGenDecorator.d.a(new WorldGenDecoratorFrequencyConfiguration(100)))); // Purpur - decompile error - BiomeDecoratorGroups.W(this); - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.aa(this); -diff --git a/src/main/java/net/minecraft/server/BiomeForest.java b/src/main/java/net/minecraft/server/BiomeForest.java -index 570a1f66f..e849b411c 100644 ---- a/src/main/java/net/minecraft/server/BiomeForest.java -+++ b/src/main/java/net/minecraft/server/BiomeForest.java -@@ -4,9 +4,9 @@ public final class BiomeForest extends BiomeBase { - - public BiomeForest() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.1F).b(0.2F).c(0.7F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeForestHills.java b/src/main/java/net/minecraft/server/BiomeForestHills.java -index 8179e1c60..f7dea38eb 100644 ---- a/src/main/java/net/minecraft/server/BiomeForestHills.java -+++ b/src/main/java/net/minecraft/server/BiomeForestHills.java -@@ -4,9 +4,9 @@ public final class BiomeForestHills extends BiomeBase { - - public BiomeForestHills() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.45F).b(0.3F).c(0.7F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java b/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java -index 852c4bd9a..67d120bef 100644 ---- a/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java -@@ -6,10 +6,10 @@ public class BiomeFrozenDeepOcean extends BiomeBase { - - public BiomeFrozenDeepOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.P, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.8F).b(0.1F).c(0.5F).d(0.5F).a(3750089).b(329011).a((String) null)); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F)))); -- this.a(WorldGenerator.OCEAN_MONUMENT.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.OCEAN_MONUMENT.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeFrozenOcean.java b/src/main/java/net/minecraft/server/BiomeFrozenOcean.java -index 3d649c600..2772bc6da 100644 ---- a/src/main/java/net/minecraft/server/BiomeFrozenOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeFrozenOcean.java -@@ -6,9 +6,9 @@ public final class BiomeFrozenOcean extends BiomeBase { - - public BiomeFrozenOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.P, WorldGenSurface.v).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.OCEAN).a(-1.0F).b(0.1F).c(0.0F).d(0.5F).a(3750089).b(329011).a((String) null)); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F)))); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeFrozenRiver.java b/src/main/java/net/minecraft/server/BiomeFrozenRiver.java -index 915f20042..4be53fc0f 100644 ---- a/src/main/java/net/minecraft/server/BiomeFrozenRiver.java -+++ b/src/main/java/net/minecraft/server/BiomeFrozenRiver.java -@@ -4,7 +4,7 @@ public final class BiomeFrozenRiver extends BiomeBase { - - public BiomeFrozenRiver() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.RIVER).a(-0.5F).b(0.0F).c(0.0F).d(0.5F).a(3750089).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeHell.java b/src/main/java/net/minecraft/server/BiomeHell.java -index f9ca6b889..888dfcd8d 100644 ---- a/src/main/java/net/minecraft/server/BiomeHell.java -+++ b/src/main/java/net/minecraft/server/BiomeHell.java -@@ -4,20 +4,20 @@ public final class BiomeHell extends BiomeBase { - - protected BiomeHell() { - super((new BiomeBase.a()).a(WorldGenSurface.Q, WorldGenSurface.E).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.NETHER).a(0.1F).b(0.2F).c(2.0F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.NETHER_BRIDGE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenStage.Features.AIR, a(WorldGenCarverAbstract.b, (WorldGenCarverConfiguration) (new WorldGenFeatureConfigurationChance(0.2F)))); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SPRING_FEATURE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.ac).a(WorldGenDecorator.p.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenFeatureChanceDecoratorCountConfiguration(20, 8, 16, 256))))); -+ this.a(WorldGenerator.NETHER_BRIDGE.b(WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenStage.Features.AIR, a(WorldGenCarverAbstract.b, new WorldGenFeatureConfigurationChance(0.2F))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SPRING_FEATURE.b(BiomeDecoratorGroups.ac).a(WorldGenDecorator.p.a(new WorldGenFeatureChanceDecoratorCountConfiguration(20, 8, 16, 256)))); // Purpur - decompile error - BiomeDecoratorGroups.Z(this); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.NETHER_BRIDGE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e).a(WorldGenDecorator.a.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.SPRING_FEATURE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.ad).a(WorldGenDecorator.n.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenFeatureChanceDecoratorCountConfiguration(8, 4, 8, 128))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.K).a(WorldGenDecorator.A.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(10))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.GLOWSTONE_BLOB.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e).a(WorldGenDecorator.I.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(10))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.GLOWSTONE_BLOB.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e).a(WorldGenDecorator.n.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenFeatureChanceDecoratorCountConfiguration(10, 0, 0, 128))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.N).a(WorldGenDecorator.r.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenFeatureChanceDecoratorRangeConfiguration(0.5F, 0, 0, 128))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.M).a(WorldGenDecorator.r.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenFeatureChanceDecoratorRangeConfiguration(0.5F, 0, 0, 128))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.ORE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOreConfiguration(WorldGenFeatureOreConfiguration.Target.NETHERRACK, Blocks.NETHER_QUARTZ_ORE.getBlockData(), 14))).a(WorldGenDecorator.n.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenFeatureChanceDecoratorCountConfiguration(16, 10, 20, 128))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.ORE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOreConfiguration(WorldGenFeatureOreConfiguration.Target.NETHERRACK, Blocks.MAGMA_BLOCK.getBlockData(), 33))).a(WorldGenDecorator.B.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(4))))); -- this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.SPRING_FEATURE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.ae).a(WorldGenDecorator.n.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenFeatureChanceDecoratorCountConfiguration(16, 10, 20, 128))))); -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.NETHER_BRIDGE.b(WorldGenFeatureConfiguration.e).a(WorldGenDecorator.a.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.SPRING_FEATURE.b(BiomeDecoratorGroups.ad).a(WorldGenDecorator.n.a(new WorldGenFeatureChanceDecoratorCountConfiguration(8, 4, 8, 128)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.K).a(WorldGenDecorator.A.a(new WorldGenDecoratorFrequencyConfiguration(10)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.GLOWSTONE_BLOB.b(WorldGenFeatureConfiguration.e).a(WorldGenDecorator.I.a(new WorldGenDecoratorFrequencyConfiguration(10)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.GLOWSTONE_BLOB.b(WorldGenFeatureConfiguration.e).a(WorldGenDecorator.n.a(new WorldGenFeatureChanceDecoratorCountConfiguration(10, 0, 0, 128)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.N).a(WorldGenDecorator.r.a(new WorldGenFeatureChanceDecoratorRangeConfiguration(0.5F, 0, 0, 128)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.M).a(WorldGenDecorator.r.a(new WorldGenFeatureChanceDecoratorRangeConfiguration(0.5F, 0, 0, 128)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.ORE.b(new WorldGenFeatureOreConfiguration(WorldGenFeatureOreConfiguration.Target.NETHERRACK, Blocks.NETHER_QUARTZ_ORE.getBlockData(), 14)).a(WorldGenDecorator.n.a(new WorldGenFeatureChanceDecoratorCountConfiguration(16, 10, 20, 128)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.ORE.b(new WorldGenFeatureOreConfiguration(WorldGenFeatureOreConfiguration.Target.NETHERRACK, Blocks.MAGMA_BLOCK.getBlockData(), 33)).a(WorldGenDecorator.B.a(new WorldGenDecoratorFrequencyConfiguration(4)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.UNDERGROUND_DECORATION, WorldGenerator.SPRING_FEATURE.b(BiomeDecoratorGroups.ae).a(WorldGenDecorator.n.a(new WorldGenFeatureChanceDecoratorCountConfiguration(16, 10, 20, 128)))); // Purpur - decompile error - this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.GHAST, 50, 4, 4)); - this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.ZOMBIE_PIGMAN, 100, 4, 4)); - this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.MAGMA_CUBE, 2, 4, 4)); -diff --git a/src/main/java/net/minecraft/server/BiomeIceMountains.java b/src/main/java/net/minecraft/server/BiomeIceMountains.java -index d5033de8a..ad9b4efe0 100644 ---- a/src/main/java/net/minecraft/server/BiomeIceMountains.java -+++ b/src/main/java/net/minecraft/server/BiomeIceMountains.java -@@ -4,8 +4,8 @@ public final class BiomeIceMountains extends BiomeBase { - - public BiomeIceMountains() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.ICY).a(0.45F).b(0.3F).c(0.0F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeIcePlains.java b/src/main/java/net/minecraft/server/BiomeIcePlains.java -index 054b0e0ab..71606b0a7 100644 ---- a/src/main/java/net/minecraft/server/BiomeIcePlains.java -+++ b/src/main/java/net/minecraft/server/BiomeIcePlains.java -@@ -4,11 +4,11 @@ public final class BiomeIcePlains extends BiomeBase { - - public BiomeIcePlains() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.ICY).a(0.125F).b(0.05F).c(0.0F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.VILLAGE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureVillageConfiguration("village/snowy/town_centers", 6)))); -- this.a(WorldGenerator.IGLOO.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.PILLAGER_OUTPOST.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.VILLAGE.b(new WorldGenFeatureVillageConfiguration("village/snowy/town_centers", 6))); // Purpur - decompile error -+ this.a(WorldGenerator.IGLOO.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.PILLAGER_OUTPOST.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeIcePlainsSpikes.java b/src/main/java/net/minecraft/server/BiomeIcePlainsSpikes.java -index 44c410f75..984f94bb5 100644 ---- a/src/main/java/net/minecraft/server/BiomeIcePlainsSpikes.java -+++ b/src/main/java/net/minecraft/server/BiomeIcePlainsSpikes.java -@@ -4,14 +4,14 @@ public final class BiomeIcePlainsSpikes extends BiomeBase { - - public BiomeIcePlainsSpikes() { - super((new BiomeBase.a()).a(WorldGenSurface.G, new WorldGenSurfaceConfigurationBase(Blocks.SNOW_BLOCK.getBlockData(), Blocks.DIRT.getBlockData(), Blocks.GRAVEL.getBlockData())).a(BiomeBase.Precipitation.SNOW).a(BiomeBase.Geography.ICY).a(0.425F).b(0.45000002F).c(0.0F).d(0.5F).a(4159204).b(329011).a("snowy_tundra")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); - BiomeDecoratorGroups.f(this); -- this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.ICE_SPIKE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e).a(WorldGenDecorator.b.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(3))))); -- this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.ICE_PATCH.b((WorldGenFeatureConfiguration) (new WorldGenFeatureRadiusConfiguration(2))).a(WorldGenDecorator.b.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(2))))); -+ this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.ICE_SPIKE.b(WorldGenFeatureConfiguration.e).a(WorldGenDecorator.b.a(new WorldGenDecoratorFrequencyConfiguration(3)))); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.ICE_PATCH.b(new WorldGenFeatureRadiusConfiguration(2)).a(WorldGenDecorator.b.a(new WorldGenDecoratorFrequencyConfiguration(2)))); // Purpur - decompile error - BiomeDecoratorGroups.g(this); - BiomeDecoratorGroups.h(this); - BiomeDecoratorGroups.l(this); -diff --git a/src/main/java/net/minecraft/server/BiomeJungle.java b/src/main/java/net/minecraft/server/BiomeJungle.java -index 2f893ce91..95e501996 100644 ---- a/src/main/java/net/minecraft/server/BiomeJungle.java -+++ b/src/main/java/net/minecraft/server/BiomeJungle.java -@@ -4,9 +4,9 @@ public final class BiomeJungle extends BiomeBase { - - public BiomeJungle() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.JUNGLE).a(0.1F).b(0.2F).c(0.95F).d(0.9F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.JUNGLE_TEMPLE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.JUNGLE_TEMPLE.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeJungleEdge.java b/src/main/java/net/minecraft/server/BiomeJungleEdge.java -index 485861785..e624f9764 100644 ---- a/src/main/java/net/minecraft/server/BiomeJungleEdge.java -+++ b/src/main/java/net/minecraft/server/BiomeJungleEdge.java -@@ -4,8 +4,8 @@ public final class BiomeJungleEdge extends BiomeBase { - - public BiomeJungleEdge() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.JUNGLE).a(0.1F).b(0.2F).c(0.95F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeJungleEdgeMutated.java b/src/main/java/net/minecraft/server/BiomeJungleEdgeMutated.java -index a957f6124..1fe9c840a 100644 ---- a/src/main/java/net/minecraft/server/BiomeJungleEdgeMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeJungleEdgeMutated.java -@@ -4,8 +4,8 @@ public final class BiomeJungleEdgeMutated extends BiomeBase { - - public BiomeJungleEdgeMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.JUNGLE).a(0.2F).b(0.4F).c(0.95F).d(0.8F).a(4159204).b(329011).a("jungle_edge")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeJungleHills.java b/src/main/java/net/minecraft/server/BiomeJungleHills.java -index 7b9bc967a..e2970ab00 100644 ---- a/src/main/java/net/minecraft/server/BiomeJungleHills.java -+++ b/src/main/java/net/minecraft/server/BiomeJungleHills.java -@@ -4,9 +4,9 @@ public final class BiomeJungleHills extends BiomeBase { - - public BiomeJungleHills() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.JUNGLE).a(0.45F).b(0.3F).c(0.95F).d(0.9F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.JUNGLE_TEMPLE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.JUNGLE_TEMPLE.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeJungleMutated.java b/src/main/java/net/minecraft/server/BiomeJungleMutated.java -index 02246950d..ffe6b4344 100644 ---- a/src/main/java/net/minecraft/server/BiomeJungleMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeJungleMutated.java -@@ -4,8 +4,8 @@ public final class BiomeJungleMutated extends BiomeBase { - - public BiomeJungleMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.JUNGLE).a(0.2F).b(0.4F).c(0.95F).d(0.9F).a(4159204).b(329011).a("jungle")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeLukewarmDeepOcean.java b/src/main/java/net/minecraft/server/BiomeLukewarmDeepOcean.java -index e6d4a2c39..b23c43305 100644 ---- a/src/main/java/net/minecraft/server/BiomeLukewarmDeepOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeLukewarmDeepOcean.java -@@ -4,10 +4,10 @@ public class BiomeLukewarmDeepOcean extends BiomeBase { - - public BiomeLukewarmDeepOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.A).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.8F).b(0.1F).c(0.5F).d(0.5F).a(4566514).b(267827).a((String) null)); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F)))); -- this.a(WorldGenerator.OCEAN_MONUMENT.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.OCEAN_MONUMENT.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeLukewarmOcean.java b/src/main/java/net/minecraft/server/BiomeLukewarmOcean.java -index f2dc5d1b5..efcb11bbe 100644 ---- a/src/main/java/net/minecraft/server/BiomeLukewarmOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeLukewarmOcean.java -@@ -4,9 +4,9 @@ public class BiomeLukewarmOcean extends BiomeBase { - - public BiomeLukewarmOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.A).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.0F).b(0.1F).c(0.5F).d(0.5F).a(4566514).b(267827).a((String) null)); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F)))); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMegaSpruceTaiga.java b/src/main/java/net/minecraft/server/BiomeMegaSpruceTaiga.java -index f6ec90c2d..328e939a6 100644 ---- a/src/main/java/net/minecraft/server/BiomeMegaSpruceTaiga.java -+++ b/src/main/java/net/minecraft/server/BiomeMegaSpruceTaiga.java -@@ -4,8 +4,8 @@ public final class BiomeMegaSpruceTaiga extends BiomeBase { - - public BiomeMegaSpruceTaiga() { - super((new BiomeBase.a()).a(WorldGenSurface.K, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.TAIGA).a(0.2F).b(0.2F).c(0.25F).d(0.8F).a(4159204).b(329011).a("giant_tree_taiga")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMegaTaiga.java b/src/main/java/net/minecraft/server/BiomeMegaTaiga.java -index e9ad930d8..36bea710a 100644 ---- a/src/main/java/net/minecraft/server/BiomeMegaTaiga.java -+++ b/src/main/java/net/minecraft/server/BiomeMegaTaiga.java -@@ -4,8 +4,8 @@ public final class BiomeMegaTaiga extends BiomeBase { - - public BiomeMegaTaiga() { - super((new BiomeBase.a()).a(WorldGenSurface.K, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.TAIGA).a(0.2F).b(0.2F).c(0.3F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMegaTaigaHills.java b/src/main/java/net/minecraft/server/BiomeMegaTaigaHills.java -index cdc182c22..22474d682 100644 ---- a/src/main/java/net/minecraft/server/BiomeMegaTaigaHills.java -+++ b/src/main/java/net/minecraft/server/BiomeMegaTaigaHills.java -@@ -4,8 +4,8 @@ public final class BiomeMegaTaigaHills extends BiomeBase { - - public BiomeMegaTaigaHills() { - super((new BiomeBase.a()).a(WorldGenSurface.K, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.TAIGA).a(0.45F).b(0.3F).c(0.3F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMesa.java b/src/main/java/net/minecraft/server/BiomeMesa.java -index 95e602a95..65d606d51 100644 ---- a/src/main/java/net/minecraft/server/BiomeMesa.java -+++ b/src/main/java/net/minecraft/server/BiomeMesa.java -@@ -4,8 +4,8 @@ public final class BiomeMesa extends BiomeBase { - - public BiomeMesa() { - super((new BiomeBase.a()).a(WorldGenSurface.M, WorldGenSurface.C).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.MESA).a(0.1F).b(0.2F).c(2.0F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMesaBryce.java b/src/main/java/net/minecraft/server/BiomeMesaBryce.java -index 57ef10afb..5ecec62f1 100644 ---- a/src/main/java/net/minecraft/server/BiomeMesaBryce.java -+++ b/src/main/java/net/minecraft/server/BiomeMesaBryce.java -@@ -4,8 +4,8 @@ public final class BiomeMesaBryce extends BiomeBase { - - public BiomeMesaBryce() { - super((new BiomeBase.a()).a(WorldGenSurface.O, WorldGenSurface.C).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.MESA).a(0.1F).b(0.2F).c(2.0F).d(0.0F).a(4159204).b(329011).a("badlands")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMesaPlataeu.java b/src/main/java/net/minecraft/server/BiomeMesaPlataeu.java -index b9f81a044..14d4bd312 100644 ---- a/src/main/java/net/minecraft/server/BiomeMesaPlataeu.java -+++ b/src/main/java/net/minecraft/server/BiomeMesaPlataeu.java -@@ -4,8 +4,8 @@ public final class BiomeMesaPlataeu extends BiomeBase { - - public BiomeMesaPlataeu() { - super((new BiomeBase.a()).a(WorldGenSurface.N, WorldGenSurface.C).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.MESA).a(1.5F).b(0.025F).c(2.0F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMesaPlataeuClear.java b/src/main/java/net/minecraft/server/BiomeMesaPlataeuClear.java -index 3ce8d3cef..b5dab9d2a 100644 ---- a/src/main/java/net/minecraft/server/BiomeMesaPlataeuClear.java -+++ b/src/main/java/net/minecraft/server/BiomeMesaPlataeuClear.java -@@ -4,8 +4,8 @@ public final class BiomeMesaPlataeuClear extends BiomeBase { - - public BiomeMesaPlataeuClear() { - super((new BiomeBase.a()).a(WorldGenSurface.M, WorldGenSurface.C).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.MESA).a(1.5F).b(0.025F).c(2.0F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMesaPlateauClearMutated.java b/src/main/java/net/minecraft/server/BiomeMesaPlateauClearMutated.java -index 88b7b3746..d05cc38b5 100644 ---- a/src/main/java/net/minecraft/server/BiomeMesaPlateauClearMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeMesaPlateauClearMutated.java -@@ -4,8 +4,8 @@ public final class BiomeMesaPlateauClearMutated extends BiomeBase { - - public BiomeMesaPlateauClearMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.M, WorldGenSurface.C).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.MESA).a(0.45F).b(0.3F).c(2.0F).d(0.0F).a(4159204).b(329011).a("badlands_plateau")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMesaPlateauMutated.java b/src/main/java/net/minecraft/server/BiomeMesaPlateauMutated.java -index 7254bcf3e..21a77ee81 100644 ---- a/src/main/java/net/minecraft/server/BiomeMesaPlateauMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeMesaPlateauMutated.java -@@ -4,8 +4,8 @@ public final class BiomeMesaPlateauMutated extends BiomeBase { - - public BiomeMesaPlateauMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.N, WorldGenSurface.C).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.MESA).a(0.45F).b(0.3F).c(2.0F).d(0.0F).a(4159204).b(329011).a("wooded_badlands_plateau")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.MESA))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMushroomIslandShore.java b/src/main/java/net/minecraft/server/BiomeMushroomIslandShore.java -index 58bc1f234..0302efbdc 100644 ---- a/src/main/java/net/minecraft/server/BiomeMushroomIslandShore.java -+++ b/src/main/java/net/minecraft/server/BiomeMushroomIslandShore.java -@@ -4,8 +4,8 @@ public final class BiomeMushroomIslandShore extends BiomeBase { - - public BiomeMushroomIslandShore() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.D).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.MUSHROOM).a(0.0F).b(0.025F).c(0.9F).d(1.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeMushrooms.java b/src/main/java/net/minecraft/server/BiomeMushrooms.java -index cb620014b..51f92584b 100644 ---- a/src/main/java/net/minecraft/server/BiomeMushrooms.java -+++ b/src/main/java/net/minecraft/server/BiomeMushrooms.java -@@ -4,8 +4,8 @@ public final class BiomeMushrooms extends BiomeBase { - - public BiomeMushrooms() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.D).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.MUSHROOM).a(0.2F).b(0.3F).c(0.9F).d(1.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeOcean.java b/src/main/java/net/minecraft/server/BiomeOcean.java -index fd7e99106..ad9628b2a 100644 ---- a/src/main/java/net/minecraft/server/BiomeOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeOcean.java -@@ -4,9 +4,9 @@ public final class BiomeOcean extends BiomeBase { - - public BiomeOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.0F).b(0.1F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F)))); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.COLD, 0.3F, 0.9F))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -@@ -20,7 +20,7 @@ public final class BiomeOcean extends BiomeBase { - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.aa(this); - BiomeDecoratorGroups.am(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b((WorldGenFeatureConfiguration) (new WorldGenFeatureSeaGrassConfiguration(48, 0.3D))).a(WorldGenDecorator.v.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b(new WorldGenFeatureSeaGrassConfiguration(48, 0.3D)).a(WorldGenDecorator.v.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.ai(this); - BiomeDecoratorGroups.ah(this); - BiomeDecoratorGroups.ap(this); -diff --git a/src/main/java/net/minecraft/server/BiomePlains.java b/src/main/java/net/minecraft/server/BiomePlains.java -index efbb36d01..ff6090e3c 100644 ---- a/src/main/java/net/minecraft/server/BiomePlains.java -+++ b/src/main/java/net/minecraft/server/BiomePlains.java -@@ -4,10 +4,10 @@ public final class BiomePlains extends BiomeBase { - - protected BiomePlains() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.PLAINS).a(0.125F).b(0.05F).c(0.8F).d(0.4F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.VILLAGE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureVillageConfiguration("village/plains/town_centers", 6)))); -- this.a(WorldGenerator.PILLAGER_OUTPOST.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.VILLAGE.b(new WorldGenFeatureVillageConfiguration("village/plains/town_centers", 6))); // Purpur - decompile error -+ this.a(WorldGenerator.PILLAGER_OUTPOST.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeRedwoodTaigaHillsMutated.java b/src/main/java/net/minecraft/server/BiomeRedwoodTaigaHillsMutated.java -index 7804a4e32..a28222eb1 100644 ---- a/src/main/java/net/minecraft/server/BiomeRedwoodTaigaHillsMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeRedwoodTaigaHillsMutated.java -@@ -4,8 +4,8 @@ public final class BiomeRedwoodTaigaHillsMutated extends BiomeBase { - - public BiomeRedwoodTaigaHillsMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.K, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.TAIGA).a(0.2F).b(0.2F).c(0.25F).d(0.8F).a(4159204).b(329011).a("giant_tree_taiga_hills")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeRiver.java b/src/main/java/net/minecraft/server/BiomeRiver.java -index 6522c8021..b84b868b1 100644 ---- a/src/main/java/net/minecraft/server/BiomeRiver.java -+++ b/src/main/java/net/minecraft/server/BiomeRiver.java -@@ -4,7 +4,7 @@ public final class BiomeRiver extends BiomeBase { - - public BiomeRiver() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.RIVER).a(-0.5F).b(0.0F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -@@ -18,7 +18,7 @@ public final class BiomeRiver extends BiomeBase { - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.aa(this); - BiomeDecoratorGroups.am(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b((WorldGenFeatureConfiguration) (new WorldGenFeatureSeaGrassConfiguration(48, 0.4D))).a(WorldGenDecorator.v.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b(new WorldGenFeatureSeaGrassConfiguration(48, 0.4D)).a(WorldGenDecorator.v.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.ap(this); - this.a(EnumCreatureType.WATER_CREATURE, new BiomeBase.BiomeMeta(EntityTypes.SQUID, 2, 1, 4)); - this.a(EnumCreatureType.WATER_CREATURE, new BiomeBase.BiomeMeta(EntityTypes.SALMON, 5, 1, 5)); -diff --git a/src/main/java/net/minecraft/server/BiomeRoofedForest.java b/src/main/java/net/minecraft/server/BiomeRoofedForest.java -index 30d680224..16bcf9bff 100644 ---- a/src/main/java/net/minecraft/server/BiomeRoofedForest.java -+++ b/src/main/java/net/minecraft/server/BiomeRoofedForest.java -@@ -6,14 +6,14 @@ public final class BiomeRoofedForest extends BiomeBase { - - public BiomeRoofedForest() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.1F).b(0.2F).c(0.7F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.WOODLAND_MANSION.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.WOODLAND_MANSION.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); - BiomeDecoratorGroups.f(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_SELECTOR.b((WorldGenFeatureConfiguration) (new WorldGenFeatureRandomChoiceConfiguration(ImmutableList.of(WorldGenerator.HUGE_BROWN_MUSHROOM.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.HUGE_BROWN_MUSHROOM).a(0.025F), WorldGenerator.HUGE_RED_MUSHROOM.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.HUGE_RED_MUSHROOM).a(0.05F), WorldGenerator.DARK_OAK_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.DARK_OAK_TREE).a(0.6666667F), WorldGenerator.NORMAL_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.BIRCH_TREE).a(0.2F), WorldGenerator.FANCY_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.FANCY_TREE).a(0.1F)), WorldGenerator.NORMAL_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.NORMAL_TREE)))).a(WorldGenDecorator.G.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_SELECTOR.b(new WorldGenFeatureRandomChoiceConfiguration(ImmutableList.of(WorldGenerator.HUGE_BROWN_MUSHROOM.b(BiomeDecoratorGroups.HUGE_BROWN_MUSHROOM).a(0.025F), WorldGenerator.HUGE_RED_MUSHROOM.b(BiomeDecoratorGroups.HUGE_RED_MUSHROOM).a(0.05F), WorldGenerator.DARK_OAK_TREE.b(BiomeDecoratorGroups.DARK_OAK_TREE).a(0.6666667F), WorldGenerator.NORMAL_TREE.b(BiomeDecoratorGroups.BIRCH_TREE).a(0.2F), WorldGenerator.FANCY_TREE.b(BiomeDecoratorGroups.FANCY_TREE).a(0.1F)), WorldGenerator.NORMAL_TREE.b(BiomeDecoratorGroups.NORMAL_TREE))).a(WorldGenDecorator.G.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.N(this); - BiomeDecoratorGroups.g(this); - BiomeDecoratorGroups.h(this); -diff --git a/src/main/java/net/minecraft/server/BiomeRoofedForestMutated.java b/src/main/java/net/minecraft/server/BiomeRoofedForestMutated.java -index 5c9ab0864..9fa84c87f 100644 ---- a/src/main/java/net/minecraft/server/BiomeRoofedForestMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeRoofedForestMutated.java -@@ -6,14 +6,14 @@ public final class BiomeRoofedForestMutated extends BiomeBase { - - public BiomeRoofedForestMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.FOREST).a(0.2F).b(0.4F).c(0.7F).d(0.8F).a(4159204).b(329011).a("dark_forest")); -- this.a(WorldGenerator.WOODLAND_MANSION.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.WOODLAND_MANSION.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); - BiomeDecoratorGroups.f(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_SELECTOR.b((WorldGenFeatureConfiguration) (new WorldGenFeatureRandomChoiceConfiguration(ImmutableList.of(WorldGenerator.HUGE_RED_MUSHROOM.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.HUGE_RED_MUSHROOM).a(0.025F), WorldGenerator.HUGE_BROWN_MUSHROOM.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.HUGE_BROWN_MUSHROOM).a(0.05F), WorldGenerator.DARK_OAK_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.DARK_OAK_TREE).a(0.6666667F), WorldGenerator.NORMAL_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.BIRCH_TREE).a(0.2F), WorldGenerator.FANCY_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.FANCY_TREE).a(0.1F)), WorldGenerator.NORMAL_TREE.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.NORMAL_TREE)))).a(WorldGenDecorator.G.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_SELECTOR.b(new WorldGenFeatureRandomChoiceConfiguration(ImmutableList.of(WorldGenerator.HUGE_RED_MUSHROOM.b(BiomeDecoratorGroups.HUGE_RED_MUSHROOM).a(0.025F), WorldGenerator.HUGE_BROWN_MUSHROOM.b(BiomeDecoratorGroups.HUGE_BROWN_MUSHROOM).a(0.05F), WorldGenerator.DARK_OAK_TREE.b(BiomeDecoratorGroups.DARK_OAK_TREE).a(0.6666667F), WorldGenerator.NORMAL_TREE.b(BiomeDecoratorGroups.BIRCH_TREE).a(0.2F), WorldGenerator.FANCY_TREE.b(BiomeDecoratorGroups.FANCY_TREE).a(0.1F)), WorldGenerator.NORMAL_TREE.b(BiomeDecoratorGroups.NORMAL_TREE))).a(WorldGenDecorator.G.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.N(this); - BiomeDecoratorGroups.g(this); - BiomeDecoratorGroups.h(this); -diff --git a/src/main/java/net/minecraft/server/BiomeSavanna.java b/src/main/java/net/minecraft/server/BiomeSavanna.java -index e023898b3..c12a89016 100644 ---- a/src/main/java/net/minecraft/server/BiomeSavanna.java -+++ b/src/main/java/net/minecraft/server/BiomeSavanna.java -@@ -4,10 +4,10 @@ public final class BiomeSavanna extends BiomeBase { - - protected BiomeSavanna() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.SAVANNA).a(0.125F).b(0.05F).c(1.2F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.VILLAGE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureVillageConfiguration("village/savanna/town_centers", 6)))); -- this.a(WorldGenerator.PILLAGER_OUTPOST.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.VILLAGE.b(new WorldGenFeatureVillageConfiguration("village/savanna/town_centers", 6))); // Purpur - decompile error -+ this.a(WorldGenerator.PILLAGER_OUTPOST.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeSavannaMutated.java b/src/main/java/net/minecraft/server/BiomeSavannaMutated.java -index 8a0da661f..db8b20a6c 100644 ---- a/src/main/java/net/minecraft/server/BiomeSavannaMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeSavannaMutated.java -@@ -4,8 +4,8 @@ public final class BiomeSavannaMutated extends BiomeBase { - - public BiomeSavannaMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.I, WorldGenSurface.v).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.SAVANNA).a(0.3625F).b(1.225F).c(1.1F).d(0.0F).a(4159204).b(329011).a("savanna")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeSavannaPlateau.java b/src/main/java/net/minecraft/server/BiomeSavannaPlateau.java -index 1d2a37a41..2826c510d 100644 ---- a/src/main/java/net/minecraft/server/BiomeSavannaPlateau.java -+++ b/src/main/java/net/minecraft/server/BiomeSavannaPlateau.java -@@ -4,8 +4,8 @@ public final class BiomeSavannaPlateau extends BiomeBase { - - protected BiomeSavannaPlateau() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.SAVANNA).a(1.5F).b(0.025F).c(1.0F).d(0.0F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeSavannaPlateauMutated.java b/src/main/java/net/minecraft/server/BiomeSavannaPlateauMutated.java -index 91e2b5903..e544a8f6b 100644 ---- a/src/main/java/net/minecraft/server/BiomeSavannaPlateauMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeSavannaPlateauMutated.java -@@ -4,8 +4,8 @@ public final class BiomeSavannaPlateauMutated extends BiomeBase { - - public BiomeSavannaPlateauMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.I, WorldGenSurface.v).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.SAVANNA).a(1.05F).b(1.2125001F).c(1.0F).d(0.0F).a(4159204).b(329011).a("savanna_plateau")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeStoneBeach.java b/src/main/java/net/minecraft/server/BiomeStoneBeach.java -index 501c36649..34660f9f8 100644 ---- a/src/main/java/net/minecraft/server/BiomeStoneBeach.java -+++ b/src/main/java/net/minecraft/server/BiomeStoneBeach.java -@@ -4,8 +4,8 @@ public final class BiomeStoneBeach extends BiomeBase { - - public BiomeStoneBeach() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.x).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.NONE).a(0.1F).b(0.8F).c(0.2F).d(0.3F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeSunflowerPlains.java b/src/main/java/net/minecraft/server/BiomeSunflowerPlains.java -index 62c1cfaef..8815c9590 100644 ---- a/src/main/java/net/minecraft/server/BiomeSunflowerPlains.java -+++ b/src/main/java/net/minecraft/server/BiomeSunflowerPlains.java -@@ -4,21 +4,21 @@ public final class BiomeSunflowerPlains extends BiomeBase { - - protected BiomeSunflowerPlains() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.PLAINS).a(0.125F).b(0.05F).c(0.8F).d(0.4F).a(4159204).b(329011).a("plains")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); - BiomeDecoratorGroups.f(this); - BiomeDecoratorGroups.Y(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.R).a(WorldGenDecorator.d.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(10))))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.R).a(WorldGenDecorator.d.a(new WorldGenDecoratorFrequencyConfiguration(10)))); // Purpur - decompile error - BiomeDecoratorGroups.g(this); - BiomeDecoratorGroups.h(this); - BiomeDecoratorGroups.l(this); - BiomeDecoratorGroups.R(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.V).a(WorldGenDecorator.e.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorFrequencyConfiguration(10))))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.V).a(WorldGenDecorator.e.a(new WorldGenDecoratorFrequencyConfiguration(10)))); // Purpur - decompile error - BiomeDecoratorGroups.Z(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_PATCH.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.I).a(WorldGenDecorator.j.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorDungeonConfiguration(32))))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.RANDOM_PATCH.b(BiomeDecoratorGroups.I).a(WorldGenDecorator.j.a(new WorldGenDecoratorDungeonConfiguration(32)))); // Purpur - decompile error - BiomeDecoratorGroups.am(this); - BiomeDecoratorGroups.ap(this); - this.a(EnumCreatureType.CREATURE, new BiomeBase.BiomeMeta(EntityTypes.SHEEP, 12, 4, 4)); -diff --git a/src/main/java/net/minecraft/server/BiomeSwamp.java b/src/main/java/net/minecraft/server/BiomeSwamp.java -index 29e448f5a..02584897e 100644 ---- a/src/main/java/net/minecraft/server/BiomeSwamp.java -+++ b/src/main/java/net/minecraft/server/BiomeSwamp.java -@@ -4,8 +4,8 @@ public final class BiomeSwamp extends BiomeBase { - - protected BiomeSwamp() { - super((new BiomeBase.a()).a(WorldGenSurface.L, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.SWAMP).a(-0.2F).b(0.1F).c(0.8F).d(0.9F).a(6388580).b(2302743).a((String) null)); -- this.a(WorldGenerator.SWAMP_HUT.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -+ this.a(WorldGenerator.SWAMP_HUT.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -@@ -17,7 +17,7 @@ public final class BiomeSwamp extends BiomeBase { - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.ae(this); - BiomeDecoratorGroups.am(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b((WorldGenFeatureConfiguration) (new WorldGenFeatureSeaGrassConfiguration(64, 0.6D))).a(WorldGenDecorator.v.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEAGRASS.b(new WorldGenFeatureSeaGrassConfiguration(64, 0.6D)).a(WorldGenDecorator.v.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.ag(this); - BiomeDecoratorGroups.ap(this); - this.a(EnumCreatureType.CREATURE, new BiomeBase.BiomeMeta(EntityTypes.SHEEP, 12, 4, 4)); -diff --git a/src/main/java/net/minecraft/server/BiomeSwamplandMutated.java b/src/main/java/net/minecraft/server/BiomeSwamplandMutated.java -index 1352daa25..d85b01b95 100644 ---- a/src/main/java/net/minecraft/server/BiomeSwamplandMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeSwamplandMutated.java -@@ -4,7 +4,7 @@ public final class BiomeSwamplandMutated extends BiomeBase { - - protected BiomeSwamplandMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.L, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.SWAMP).a(-0.1F).b(0.3F).c(0.8F).d(0.9F).a(6388580).b(2302743).a("swamp")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeTaiga.java b/src/main/java/net/minecraft/server/BiomeTaiga.java -index 5cd569dcd..ae6e6ca89 100644 ---- a/src/main/java/net/minecraft/server/BiomeTaiga.java -+++ b/src/main/java/net/minecraft/server/BiomeTaiga.java -@@ -4,10 +4,10 @@ public final class BiomeTaiga extends BiomeBase { - - public BiomeTaiga() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.TAIGA).a(0.2F).b(0.2F).c(0.25F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.VILLAGE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureVillageConfiguration("village/taiga/town_centers", 6)))); -- this.a(WorldGenerator.PILLAGER_OUTPOST.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.VILLAGE.b(new WorldGenFeatureVillageConfiguration("village/taiga/town_centers", 6))); // Purpur - decompile error -+ this.a(WorldGenerator.PILLAGER_OUTPOST.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeTaigaHills.java b/src/main/java/net/minecraft/server/BiomeTaigaHills.java -index e182f0400..4e19fe5ae 100644 ---- a/src/main/java/net/minecraft/server/BiomeTaigaHills.java -+++ b/src/main/java/net/minecraft/server/BiomeTaigaHills.java -@@ -4,8 +4,8 @@ public final class BiomeTaigaHills extends BiomeBase { - - public BiomeTaigaHills() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.TAIGA).a(0.45F).b(0.3F).c(0.25F).d(0.8F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeTaigaMutated.java b/src/main/java/net/minecraft/server/BiomeTaigaMutated.java -index 75d46c61d..05e833ffe 100644 ---- a/src/main/java/net/minecraft/server/BiomeTaigaMutated.java -+++ b/src/main/java/net/minecraft/server/BiomeTaigaMutated.java -@@ -4,8 +4,8 @@ public final class BiomeTaigaMutated extends BiomeBase { - - public BiomeTaigaMutated() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.v).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.TAIGA).a(0.3F).b(0.4F).c(0.25F).d(0.8F).a(4159204).b(329011).a("taiga")); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.STRONGHOLD.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.STRONGHOLD.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.a(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeTheEnd.java b/src/main/java/net/minecraft/server/BiomeTheEnd.java -index 26fda2cf6..22e9789a3 100644 ---- a/src/main/java/net/minecraft/server/BiomeTheEnd.java -+++ b/src/main/java/net/minecraft/server/BiomeTheEnd.java -@@ -6,7 +6,7 @@ public final class BiomeTheEnd extends BiomeBase { - - public BiomeTheEnd() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.F).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.THEEND).a(0.1F).b(0.2F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.END_SPIKE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureEndSpikeConfiguration(false, ImmutableList.of(), (BlockPosition) null))).a(WorldGenDecorator.a.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.END_SPIKE.b(new WorldGenFeatureEndSpikeConfiguration(false, ImmutableList.of(), (BlockPosition) null)).a(WorldGenDecorator.a.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.aq(this); - this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.ENDERMAN, 10, 4, 4)); - } -diff --git a/src/main/java/net/minecraft/server/BiomeTheEndFloatingIslands.java b/src/main/java/net/minecraft/server/BiomeTheEndFloatingIslands.java -index c06512864..a26d56aa4 100644 ---- a/src/main/java/net/minecraft/server/BiomeTheEndFloatingIslands.java -+++ b/src/main/java/net/minecraft/server/BiomeTheEndFloatingIslands.java -@@ -4,7 +4,7 @@ public class BiomeTheEndFloatingIslands extends BiomeBase { - - public BiomeTheEndFloatingIslands() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.F).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.THEEND).a(0.1F).b(0.2F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenStage.Decoration.RAW_GENERATION, WorldGenerator.END_ISLAND.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e).a(WorldGenDecorator.J.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.RAW_GENERATION, WorldGenerator.END_ISLAND.b(WorldGenFeatureConfiguration.e).a(WorldGenDecorator.J.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.aq(this); - this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.ENDERMAN, 10, 4, 4)); - } -diff --git a/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java b/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java -index 90e79b291..e47add3e4 100644 ---- a/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java -+++ b/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java -@@ -4,10 +4,10 @@ public class BiomeTheEndHighIsland extends BiomeBase { - - public BiomeTheEndHighIsland() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.F).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.THEEND).a(0.1F).b(0.2F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.END_CITY.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.END_GATEWAY.b((WorldGenFeatureConfiguration) WorldGenEndGatewayConfiguration.a(WorldProviderTheEnd.f, true)).a(WorldGenDecorator.L.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenerator.END_CITY.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenStage.Decoration.SURFACE_STRUCTURES, WorldGenerator.END_GATEWAY.b(WorldGenEndGatewayConfiguration.a(WorldProviderTheEnd.f, true)).a(WorldGenDecorator.L.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - BiomeDecoratorGroups.aq(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.CHORUS_PLANT.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e).a(WorldGenDecorator.K.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.CHORUS_PLANT.b(WorldGenFeatureConfiguration.e).a(WorldGenDecorator.K.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.ENDERMAN, 10, 4, 4)); - } - } -diff --git a/src/main/java/net/minecraft/server/BiomeTheEndMediumIsland.java b/src/main/java/net/minecraft/server/BiomeTheEndMediumIsland.java -index c7d5317cc..ec92a8457 100644 ---- a/src/main/java/net/minecraft/server/BiomeTheEndMediumIsland.java -+++ b/src/main/java/net/minecraft/server/BiomeTheEndMediumIsland.java -@@ -4,7 +4,7 @@ public class BiomeTheEndMediumIsland extends BiomeBase { - - public BiomeTheEndMediumIsland() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.F).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.THEEND).a(0.1F).b(0.2F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenerator.END_CITY.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -+ this.a(WorldGenerator.END_CITY.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error - BiomeDecoratorGroups.aq(this); - this.a(EnumCreatureType.MONSTER, new BiomeBase.BiomeMeta(EntityTypes.ENDERMAN, 10, 4, 4)); - } -diff --git a/src/main/java/net/minecraft/server/BiomeVoid.java b/src/main/java/net/minecraft/server/BiomeVoid.java -index 87fd7e146..c9ba33453 100644 ---- a/src/main/java/net/minecraft/server/BiomeVoid.java -+++ b/src/main/java/net/minecraft/server/BiomeVoid.java -@@ -4,6 +4,6 @@ public final class BiomeVoid extends BiomeBase { - - public BiomeVoid() { - super((new BiomeBase.a()).a(WorldGenSurface.R, WorldGenSurface.x).a(BiomeBase.Precipitation.NONE).a(BiomeBase.Geography.NONE).a(0.1F).b(0.2F).c(0.5F).d(0.5F).a(4159204).b(329011).a((String) null)); -- this.a(WorldGenStage.Decoration.TOP_LAYER_MODIFICATION, WorldGenerator.VOID_START_PLATFORM.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e).a(WorldGenDecorator.a.a((WorldGenFeatureDecoratorConfiguration) WorldGenFeatureDecoratorConfiguration.e))); -+ this.a(WorldGenStage.Decoration.TOP_LAYER_MODIFICATION, WorldGenerator.VOID_START_PLATFORM.b(WorldGenFeatureConfiguration.e).a(WorldGenDecorator.a.a(WorldGenFeatureDecoratorConfiguration.e))); // Purpur - decompile error - } - } -diff --git a/src/main/java/net/minecraft/server/BiomeWarmDeepOcean.java b/src/main/java/net/minecraft/server/BiomeWarmDeepOcean.java -index 3f8e18a2c..11dc5f637 100644 ---- a/src/main/java/net/minecraft/server/BiomeWarmDeepOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeWarmDeepOcean.java -@@ -4,10 +4,10 @@ public class BiomeWarmDeepOcean extends BiomeBase { - - public BiomeWarmDeepOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.B).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.8F).b(0.1F).c(0.5F).d(0.5F).a(4445678).b(270131).a((String) null)); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F)))); -- this.a(WorldGenerator.OCEAN_MONUMENT.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e)); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.OCEAN_MONUMENT.b(WorldGenFeatureConfiguration.e)); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -diff --git a/src/main/java/net/minecraft/server/BiomeWarmOcean.java b/src/main/java/net/minecraft/server/BiomeWarmOcean.java -index dd7916c09..e4dc7d198 100644 ---- a/src/main/java/net/minecraft/server/BiomeWarmOcean.java -+++ b/src/main/java/net/minecraft/server/BiomeWarmOcean.java -@@ -6,9 +6,9 @@ public class BiomeWarmOcean extends BiomeBase { - - public BiomeWarmOcean() { - super((new BiomeBase.a()).a(WorldGenSurface.G, WorldGenSurface.B).a(BiomeBase.Precipitation.RAIN).a(BiomeBase.Geography.OCEAN).a(-1.0F).b(0.1F).c(0.5F).d(0.5F).a(4445678).b(270131).a((String) null)); -- this.a(WorldGenerator.OCEAN_RUIN.b((WorldGenFeatureConfiguration) (new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F)))); -- this.a(WorldGenerator.MINESHAFT.b((WorldGenFeatureConfiguration) (new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL)))); -- this.a(WorldGenerator.SHIPWRECK.b((WorldGenFeatureConfiguration) (new WorldGenFeatureShipwreckConfiguration(false)))); -+ this.a(WorldGenerator.OCEAN_RUIN.b(new WorldGenFeatureOceanRuinConfiguration(WorldGenFeatureOceanRuin.Temperature.WARM, 0.3F, 0.9F))); // Purpur - decompile error -+ this.a(WorldGenerator.MINESHAFT.b(new WorldGenMineshaftConfiguration(0.004D, WorldGenMineshaft.Type.NORMAL))); // Purpur - decompile error -+ this.a(WorldGenerator.SHIPWRECK.b(new WorldGenFeatureShipwreckConfiguration(false))); // Purpur - decompile error - BiomeDecoratorGroups.b(this); - BiomeDecoratorGroups.c(this); - BiomeDecoratorGroups.d(this); -@@ -22,9 +22,9 @@ public class BiomeWarmOcean extends BiomeBase { - BiomeDecoratorGroups.Z(this); - BiomeDecoratorGroups.aa(this); - BiomeDecoratorGroups.am(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SIMPLE_RANDOM_SELECTOR.b((WorldGenFeatureConfiguration) (new WorldGenFeatureRandom2(ImmutableList.of(WorldGenerator.CORAL_TREE.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e), WorldGenerator.CORAL_CLAW.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e), WorldGenerator.CORAL_MUSHROOM.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.e))))).a(WorldGenDecorator.x.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorNoiseConfiguration(20, 400.0D, 0.0D, HeightMap.Type.OCEAN_FLOOR_WG))))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SIMPLE_RANDOM_SELECTOR.b(new WorldGenFeatureRandom2(ImmutableList.of(WorldGenerator.CORAL_TREE.b(WorldGenFeatureConfiguration.e), WorldGenerator.CORAL_CLAW.b(WorldGenFeatureConfiguration.e), WorldGenerator.CORAL_MUSHROOM.b(WorldGenFeatureConfiguration.e)))).a(WorldGenDecorator.x.a(new WorldGenDecoratorNoiseConfiguration(20, 400.0D, 0.0D, HeightMap.Type.OCEAN_FLOOR_WG)))); // Purpur - decompile error - BiomeDecoratorGroups.aj(this); -- this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEA_PICKLE.b((WorldGenFeatureConfiguration) (new WorldGenFeatureKelpConfiguration(20))).a(WorldGenDecorator.l.a((WorldGenFeatureDecoratorConfiguration) (new WorldGenDecoratorDungeonConfiguration(16))))); -+ this.a(WorldGenStage.Decoration.VEGETAL_DECORATION, WorldGenerator.SEA_PICKLE.b(new WorldGenFeatureKelpConfiguration(20)).a(WorldGenDecorator.l.a(new WorldGenDecoratorDungeonConfiguration(16)))); // Purpur - decompile error - BiomeDecoratorGroups.ap(this); - this.a(EnumCreatureType.WATER_CREATURE, new BiomeBase.BiomeMeta(EntityTypes.SQUID, 10, 4, 4)); - this.a(EnumCreatureType.WATER_CREATURE, new BiomeBase.BiomeMeta(EntityTypes.PUFFERFISH, 15, 1, 3)); -diff --git a/src/main/java/net/minecraft/server/CommandDebug.java b/src/main/java/net/minecraft/server/CommandDebug.java -index d384e9578..f0d72ea39 100644 ---- a/src/main/java/net/minecraft/server/CommandDebug.java -+++ b/src/main/java/net/minecraft/server/CommandDebug.java -@@ -25,7 +25,7 @@ public class CommandDebug { - @Nullable - private static final FileSystemProvider d = (FileSystemProvider) FileSystemProvider.installedProviders().stream().filter((filesystemprovider) -> { - return filesystemprovider.getScheme().equalsIgnoreCase("jar"); -- }).findFirst().orElse((Object) null); -+ }).findFirst().orElse(null); // Purpur - decompile error - - public static void a(com.mojang.brigadier.CommandDispatcher com_mojang_brigadier_commanddispatcher) { - com_mojang_brigadier_commanddispatcher.register((LiteralArgumentBuilder) ((LiteralArgumentBuilder) ((LiteralArgumentBuilder) ((LiteralArgumentBuilder) CommandDispatcher.a("debug").requires((commandlistenerwrapper) -> { -diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java -index 5b1d2c7f5..da6a3fa2c 100644 ---- a/src/main/java/net/minecraft/server/EntityBlaze.java -+++ b/src/main/java/net/minecraft/server/EntityBlaze.java -@@ -24,7 +24,7 @@ public class EntityBlaze extends EntityMonster { - this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D, 0.0F)); - this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a()); -+ this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this).a(new Class[0])); // Purpur - decompile error - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - } - -diff --git a/src/main/java/net/minecraft/server/EntityCat.java b/src/main/java/net/minecraft/server/EntityCat.java -index 57af3835e..b3bdc194a 100644 ---- a/src/main/java/net/minecraft/server/EntityCat.java -+++ b/src/main/java/net/minecraft/server/EntityCat.java -@@ -16,7 +16,7 @@ public class EntityCat extends EntityTameableAnimal { - private static final DataWatcherObject bC = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i); - private static final DataWatcherObject bD = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i); - private static final DataWatcherObject bE = DataWatcher.a(EntityCat.class, DataWatcherRegistry.b); -- public static final Map bz = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error -+ public static final Map bz = SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error // Purpur - decompile error - hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png")); - hashmap.put(1, new MinecraftKey("textures/entity/cat/black.png")); - hashmap.put(2, new MinecraftKey("textures/entity/cat/red.png")); -diff --git a/src/main/java/net/minecraft/server/EntityEnderSignal.java b/src/main/java/net/minecraft/server/EntityEnderSignal.java -index c13abc7e0..7ebd7da1c 100644 ---- a/src/main/java/net/minecraft/server/EntityEnderSignal.java -+++ b/src/main/java/net/minecraft/server/EntityEnderSignal.java -@@ -21,7 +21,7 @@ public class EntityEnderSignal extends Entity { - - public void b(ItemStack itemstack) { - if (itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) { -- this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> { -+ this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // Purpur - decompile error - itemstack1.setCount(1); - })); - } -diff --git a/src/main/java/net/minecraft/server/EntityEndermite.java b/src/main/java/net/minecraft/server/EntityEndermite.java -index b34695f2d..e4bd2796a 100644 ---- a/src/main/java/net/minecraft/server/EntityEndermite.java -+++ b/src/main/java/net/minecraft/server/EntityEndermite.java -@@ -19,7 +19,7 @@ public class EntityEndermite extends EntityMonster { - this.goalSelector.a(3, new PathfinderGoalRandomStrollLand(this, 1.0D)); - this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a()); -+ this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this).a(new Class[0])); // Purpur - decompile error - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - } - -diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java -index 886268b09..b030fe957 100644 ---- a/src/main/java/net/minecraft/server/EntityEvoker.java -+++ b/src/main/java/net/minecraft/server/EntityEvoker.java -@@ -24,7 +24,7 @@ public class EntityEvoker extends EntityIllagerWizard { - this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D)); - this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); -- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a()); -+ this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, EntityRaider.class).a(new Class[0])); // Purpur - decompile error - this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300)); - this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300)); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, false)); -diff --git a/src/main/java/net/minecraft/server/EntityFish.java b/src/main/java/net/minecraft/server/EntityFish.java -index d332907b3..b853fd0d9 100644 ---- a/src/main/java/net/minecraft/server/EntityFish.java -+++ b/src/main/java/net/minecraft/server/EntityFish.java -@@ -73,11 +73,7 @@ public abstract class EntityFish extends EntityWaterAnimal { - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalPanic(this, 1.25D)); -- PathfinderGoalSelector pathfindergoalselector = this.goalSelector; -- Predicate predicate = IEntitySelector.f; -- -- predicate.getClass(); -- pathfindergoalselector.a(2, new PathfinderGoalAvoidTarget<>(this, EntityHuman.class, 8.0F, 1.6D, 1.4D, predicate::test)); -+ this.goalSelector.a(2, new PathfinderGoalAvoidTarget<>(this, EntityHuman.class, 8.0F, 1.6D, 1.4D, IEntitySelector.f::test)); // Purpur - decompile error - this.goalSelector.a(4, new EntityFish.b(this)); - } - -diff --git a/src/main/java/net/minecraft/server/EntityParrot.java b/src/main/java/net/minecraft/server/EntityParrot.java -index 140208761..94e57a2d8 100644 ---- a/src/main/java/net/minecraft/server/EntityParrot.java -+++ b/src/main/java/net/minecraft/server/EntityParrot.java -@@ -20,8 +20,8 @@ public class EntityParrot extends EntityPerchable implements EntityBird { - } - }; - private static final Item bF = Items.COOKIE; -- private static final Set bG = Sets.newHashSet(new Item[]{Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS}); -- private static final Map, SoundEffect> bH = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error -+ private static final Set bG = Sets.newHashSet(Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS); // Purpur - decompile error -+ private static final Map, SoundEffect> bH = SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error // Purpur - decompile error - hashmap.put(EntityTypes.BLAZE, SoundEffects.ENTITY_PARROT_IMITATE_BLAZE); - hashmap.put(EntityTypes.CAVE_SPIDER, SoundEffects.ENTITY_PARROT_IMITATE_SPIDER); - hashmap.put(EntityTypes.CREEPER, SoundEffects.ENTITY_PARROT_IMITATE_CREEPER); -diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java -index bb46247f2..f63528ca3 100644 ---- a/src/main/java/net/minecraft/server/EntitySheep.java -+++ b/src/main/java/net/minecraft/server/EntitySheep.java -@@ -18,7 +18,7 @@ import org.bukkit.inventory.InventoryView; - public class EntitySheep extends EntityAnimal { - - private static final DataWatcherObject bw = DataWatcher.a(EntitySheep.class, DataWatcherRegistry.a); -- private static final Map bx = (Map) SystemUtils.a(Maps.newEnumMap(EnumColor.class), (enummap) -> { // CraftBukkit - decompile error -+ private static final Map bx = SystemUtils.a(Maps.newEnumMap(EnumColor.class), (enummap) -> { // CraftBukkit - decompile error // Purpur - decompile error - enummap.put(EnumColor.WHITE, Blocks.WHITE_WOOL); - enummap.put(EnumColor.ORANGE, Blocks.ORANGE_WOOL); - enummap.put(EnumColor.MAGENTA, Blocks.MAGENTA_WOOL); -@@ -36,9 +36,7 @@ public class EntitySheep extends EntityAnimal { - enummap.put(EnumColor.RED, Blocks.RED_WOOL); - enummap.put(EnumColor.BLACK, Blocks.BLACK_WOOL); - }); -- private static final Map by = Maps.newEnumMap((Map) Arrays.stream(EnumColor.values()).collect(Collectors.toMap((enumcolor) -> { -- return enumcolor; -- }, EntitySheep::c))); -+ private static final Map by = Arrays.stream(EnumColor.values()).collect(Collectors.toMap((enumcolor) -> enumcolor, EntitySheep::c)); // Purpur - decompile error - private int bz; - private PathfinderGoalEatTile bA; - -diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 7b6b1ad17..1432d3f6b 100644 ---- a/src/main/java/net/minecraft/server/EntityWitch.java -+++ b/src/main/java/net/minecraft/server/EntityWitch.java -@@ -30,13 +30,13 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { - this.bz = new PathfinderGoalNearestHealableRaider<>(this, EntityRaider.class, true, (entityliving) -> { - return entityliving != null && this.eF() && entityliving.getEntityType() != EntityTypes.WITCH; - }); -- this.bA = new PathfinderGoalNearestAttackableTargetWitch<>(this, EntityHuman.class, 10, true, false, (Predicate) null); -+ this.bA = new PathfinderGoalNearestAttackableTargetWitch<>(this, EntityHuman.class, 10, true, false, null); // Purpur - decompile error - this.goalSelector.a(1, new PathfinderGoalFloat(this)); - this.goalSelector.a(2, new PathfinderGoalArrowAttack(this, 1.0D, 60, 10.0F)); - this.goalSelector.a(2, new PathfinderGoalRandomStrollLand(this, 1.0D)); - this.goalSelector.a(3, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(3, new PathfinderGoalRandomLookaround(this)); -- this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})); -+ this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, EntityRaider.class)); // Purpur - decompile error - this.targetSelector.a(2, this.bz); - this.targetSelector.a(3, this.bA); - } -diff --git a/src/main/java/net/minecraft/server/GeneratorAccess.java b/src/main/java/net/minecraft/server/GeneratorAccess.java -index 5648ba73c..304190fdc 100644 ---- a/src/main/java/net/minecraft/server/GeneratorAccess.java -+++ b/src/main/java/net/minecraft/server/GeneratorAccess.java -@@ -49,7 +49,7 @@ public interface GeneratorAccess extends IEntityAccess, IWorldReader, VirtualLev - void a(@Nullable EntityHuman entityhuman, int i, BlockPosition blockposition, int j); - - default void triggerEffect(int i, BlockPosition blockposition, int j) { -- this.a((EntityHuman) null, i, blockposition, j); -+ this.a(null, i, blockposition, j); // Purpur - decompile error - } - - @Override default java.util.List getEntityCollisions(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set set, boolean returnFast) {return IEntityAccess.super.getEntityCollisions(entity, axisalignedbb, set, returnFast); } // Paper -diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java -index 38b79b5b1..c4aa38ddf 100644 ---- a/src/main/java/net/minecraft/server/MathHelper.java -+++ b/src/main/java/net/minecraft/server/MathHelper.java -@@ -7,7 +7,7 @@ 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 = SystemUtils.a((new float[65536]), (afloat) -> { // Purpur - decompile error - for (int i = 0; i < afloat.length; ++i) { - afloat[i] = (float) Math.sin((double) i * 3.141592653589793D * 2.0D / 65536.0D); - } -diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java b/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java -index de8f1874a..73402f2b5 100644 ---- a/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java -+++ b/src/main/java/net/minecraft/server/WorldGenFeatureConfigured.java -@@ -25,7 +25,7 @@ public class WorldGenFeatureConfigured a(WorldGenDecoratorConfigured worldgendecoratorconfigured) { - WorldGenerator worldgenerator = this.b instanceof WorldGenFlowers ? WorldGenerator.DECORATED_FLOWER : WorldGenerator.DECORATED; - -- return worldgenerator.b((WorldGenFeatureConfiguration) (new WorldGenFeatureCompositeConfiguration(this, worldgendecoratorconfigured))); -+ return worldgenerator.b(new WorldGenFeatureCompositeConfiguration(this, worldgendecoratorconfigured)); // Purpur - decompile error - } - - public WorldGenFeatureRandomChoiceConfigurationWeight a(float f) { -diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java b/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java -index 979f3517c..5827b1ba1 100644 ---- a/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java -+++ b/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java -@@ -58,6 +58,6 @@ public class WorldGenFeatureTreeBeehive extends WorldGenFeatureTree { - - @Override - public T a(DynamicOps dynamicops) { -- return (new Dynamic(dynamicops, dynamicops.createMap(ImmutableMap.of(dynamicops.createString("type"), dynamicops.createString(IRegistry.w.getKey(this.a).toString()), dynamicops.createString("probability"), dynamicops.createFloat(this.b))))).getValue(); -+ return new Dynamic<>(dynamicops, dynamicops.createMap(ImmutableMap.of(dynamicops.createString("type"), dynamicops.createString(IRegistry.w.getKey(this.a).toString()), dynamicops.createString("probability"), dynamicops.createFloat(this.b)))).getValue(); // Purpur - decompile error - } - } --- -2.26.2 - diff --git a/patches/removed/1.16/server/0006-Add-language-asset-purpur.lang.patch b/patches/removed/1.16/server/0006-Add-language-asset-purpur.lang.patch deleted file mode 100644 index 5b9028817..000000000 --- a/patches/removed/1.16/server/0006-Add-language-asset-purpur.lang.patch +++ /dev/null @@ -1,135 +0,0 @@ -From b1cd21795f45b71ae265cebd95060a23cfcf9310 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 26 Mar 2020 13:17:09 -0500 -Subject: [PATCH] Add language asset purpur.lang - ---- - .../net/minecraft/server/EntityPlayer.java | 1 + - .../net/minecraft/server/LocaleLanguage.java | 48 +++++++++++++++++-- - .../pl3x/purpur/command/PurpurCommand.java | 3 ++ - src/main/resources/purpur.lang | 1 + - 4 files changed, 49 insertions(+), 4 deletions(-) - create mode 100644 src/main/resources/purpur.lang - -diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 39072ebdc..fe1e9ea61 100644 ---- a/src/main/java/net/minecraft/server/EntityPlayer.java -+++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1582,6 +1582,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - } - - public void a(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype) { -+ if (ichatbasecomponent == null) return; // Purpur - this.playerConnection.a((Packet) (new PacketPlayOutChat(ichatbasecomponent, chatmessagetype)), (future) -> { - if (!future.isSuccess() && (chatmessagetype == ChatMessageType.GAME_INFO || chatmessagetype == ChatMessageType.SYSTEM)) { - boolean flag = true; -diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java -index 601273933..75707adcd 100644 ---- a/src/main/java/net/minecraft/server/LocaleLanguage.java -+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java -@@ -15,18 +15,41 @@ import java.util.Map.Entry; - import java.util.regex.Pattern; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; -+import org.bukkit.ChatColor; - - public class LocaleLanguage { - - private static final Logger LOGGER = LogManager.getLogger(); - private static final Pattern b = Pattern.compile("%(\\d+\\$)?[\\d\\.]*[df]"); - private static final LocaleLanguage c = new LocaleLanguage(); -- private final Map d = Maps.newHashMap(); -- private long e; -+ private final Map d = Maps.newHashMap(); public Map getStorage() { return this.d; } // Purpur - OBFHELPER -+ private long e; public long getLastUpdateTime() { return this.e; } public void setLastUpdateTime(int time) { this.e = time; } // Purpur - OBFHELPER - - public LocaleLanguage() { -+ // Purpur start -+ reload(this); -+ } -+ -+ private void loadFromFile(String resource) { - try { -- InputStream inputstream = LocaleLanguage.class.getResourceAsStream("/assets/minecraft/lang/en_us.json"); -+ java.io.File file = new java.io.File(resource); -+ if (!file.exists()) { -+ java.nio.file.Files.copy(getClass().getResourceAsStream("/" + resource), file.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING); -+ } -+ loadFromJar("/" + resource); -+ loadFromStream(resource, new java.io.FileInputStream(file)); -+ } catch (IOException e) { -+ LOGGER.error("Couldn't read string from " + resource, e); -+ } -+ } -+ -+ private void loadFromJar(String resource) { -+ loadFromStream(resource, getClass().getResourceAsStream(resource)); -+ } -+ -+ private void loadFromStream(String resource, InputStream inputstream) { -+ try { -+ // Purpur end - Throwable throwable = null; - - try { -@@ -60,7 +83,7 @@ public class LocaleLanguage { - - } - } catch (JsonParseException | IOException ioexception) { -- LocaleLanguage.LOGGER.error("Couldn't read strings from /assets/minecraft/lang/en_us.json", ioexception); -+ LocaleLanguage.LOGGER.error("Couldn't read strings from " + resource, ioexception); // Purpur - } - - } -@@ -88,4 +111,21 @@ public class LocaleLanguage { - public long b() { - return this.e; - } -+ -+ // Purpur start -+ public static void reload(LocaleLanguage instance) { -+ instance.setLastUpdateTime(0); -+ instance.getStorage().clear(); -+ instance.loadFromJar("/assets/minecraft/lang/en_us.json"); -+ instance.loadFromFile("purpur.lang"); -+ } -+ -+ public static ChatMessage translate(String key, Object... args) { -+ String str = getInstance().translateKey(key); -+ if (str == null) return null; -+ str = ChatColor.translateAlternateColorCodes('&', str); -+ if (str.isEmpty()) return null; -+ return new ChatMessage(str, args); -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/pl3x/purpur/command/PurpurCommand.java b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java -index 7d983d9a5..36260e0ec 100644 ---- a/src/main/java/net/pl3x/purpur/command/PurpurCommand.java -+++ b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java -@@ -1,5 +1,6 @@ - package net.pl3x.purpur.command; - -+import net.minecraft.server.LocaleLanguage; - import net.minecraft.server.MinecraftServer; - import net.minecraft.server.WorldServer; - import net.pl3x.purpur.PurpurConfig; -@@ -45,6 +46,8 @@ public class PurpurCommand extends Command { - Command.broadcastCommandMessage(sender, ChatColor.RED + "Please note that this command is not supported and may cause issues."); - Command.broadcastCommandMessage(sender, ChatColor.RED + "If you encounter any issues please use the /stop command to restart your server."); - -+ LocaleLanguage.reload(LocaleLanguage.getInstance()); -+ - MinecraftServer console = MinecraftServer.getServer(); - PurpurConfig.init((File) console.options.valueOf("purpur-settings")); - for (WorldServer world : console.getWorlds()) { -diff --git a/src/main/resources/purpur.lang b/src/main/resources/purpur.lang -new file mode 100644 -index 000000000..0967ef424 ---- /dev/null -+++ b/src/main/resources/purpur.lang -@@ -0,0 +1 @@ -+{} --- -2.26.2 - diff --git a/patches/removed/1.16/server/0009-Ridables.patch b/patches/removed/1.16/server/0009-Ridables.patch deleted file mode 100644 index c2315e619..000000000 --- a/patches/removed/1.16/server/0009-Ridables.patch +++ /dev/null @@ -1,6558 +0,0 @@ -From 807a6d3ab82b3c883c3d8ad10b0409012b3f4f02 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 6 Feb 2020 19:53:59 -0600 -Subject: [PATCH] Ridables - ---- - .../net/minecraft/server/AxisAlignedBB.java | 2 + - .../server/ControllerLookDolphin.java | 4 +- - .../net/minecraft/server/ControllerMove.java | 6 +- - .../net/minecraft/server/DamageSource.java | 3 + - .../java/net/minecraft/server/Entity.java | 68 +- - .../net/minecraft/server/EntityAgeable.java | 2 +- - .../java/net/minecraft/server/EntityBat.java | 58 ++ - .../java/net/minecraft/server/EntityBee.java | 118 +++- - .../net/minecraft/server/EntityBlaze.java | 51 ++ - .../java/net/minecraft/server/EntityCat.java | 34 +- - .../minecraft/server/EntityCaveSpider.java | 17 + - .../net/minecraft/server/EntityChicken.java | 19 + - .../java/net/minecraft/server/EntityCod.java | 17 + - .../minecraft/server/EntityComplexPart.java | 7 + - .../java/net/minecraft/server/EntityCow.java | 18 + - .../net/minecraft/server/EntityCreeper.java | 76 +++ - .../net/minecraft/server/EntityDolphin.java | 78 ++- - .../net/minecraft/server/EntityDrowned.java | 24 +- - .../minecraft/server/EntityEnderDragon.java | 87 ++- - .../net/minecraft/server/EntityEnderman.java | 33 +- - .../net/minecraft/server/EntityEndermite.java | 19 + - .../net/minecraft/server/EntityEvoker.java | 22 + - .../java/net/minecraft/server/EntityFish.java | 21 +- - .../java/net/minecraft/server/EntityFox.java | 57 +- - .../net/minecraft/server/EntityGhast.java | 46 +- - .../minecraft/server/EntityGiantZombie.java | 25 + - .../net/minecraft/server/EntityGuardian.java | 47 +- - .../minecraft/server/EntityGuardianElder.java | 17 + - .../net/minecraft/server/EntityHorse.java | 7 + - .../minecraft/server/EntityHorseAbstract.java | 22 +- - .../minecraft/server/EntityHorseDonkey.java | 7 + - .../net/minecraft/server/EntityHorseMule.java | 7 + - .../minecraft/server/EntityHorseSkeleton.java | 16 +- - .../minecraft/server/EntityHorseZombie.java | 14 +- - .../net/minecraft/server/EntityHuman.java | 14 +- - .../server/EntityIllagerIllusioner.java | 19 + - .../minecraft/server/EntityInsentient.java | 48 +- - .../net/minecraft/server/EntityIronGolem.java | 23 +- - .../net/minecraft/server/EntityLiving.java | 21 +- - .../net/minecraft/server/EntityLlama.java | 50 +- - .../minecraft/server/EntityLlamaTrader.java | 23 + - .../net/minecraft/server/EntityMagmaCube.java | 17 + - .../minecraft/server/EntityMushroomCow.java | 17 + - .../net/minecraft/server/EntityOcelot.java | 19 + - .../net/minecraft/server/EntityPanda.java | 47 +- - .../net/minecraft/server/EntityParrot.java | 77 ++- - .../net/minecraft/server/EntityPhantom.java | 97 ++- - .../java/net/minecraft/server/EntityPig.java | 48 +- - .../net/minecraft/server/EntityPigZombie.java | 17 + - .../net/minecraft/server/EntityPillager.java | 19 + - .../net/minecraft/server/EntityPlayer.java | 2 +- - .../net/minecraft/server/EntityPolarBear.java | 42 ++ - .../minecraft/server/EntityPufferFish.java | 19 +- - .../net/minecraft/server/EntityRabbit.java | 79 ++- - .../net/minecraft/server/EntityRavager.java | 19 + - .../net/minecraft/server/EntitySalmon.java | 17 + - .../net/minecraft/server/EntitySheep.java | 18 + - .../net/minecraft/server/EntityShulker.java | 21 +- - .../minecraft/server/EntitySilverfish.java | 20 + - .../net/minecraft/server/EntitySkeleton.java | 17 + - .../server/EntitySkeletonAbstract.java | 2 + - .../minecraft/server/EntitySkeletonStray.java | 17 + - .../server/EntitySkeletonWither.java | 17 + - .../net/minecraft/server/EntitySlime.java | 44 +- - .../net/minecraft/server/EntitySnowman.java | 24 +- - .../net/minecraft/server/EntitySpider.java | 19 + - .../net/minecraft/server/EntitySquid.java | 68 +- - .../server/EntityTameableAnimal.java | 1 + - .../minecraft/server/EntityTropicalFish.java | 17 + - .../net/minecraft/server/EntityTurtle.java | 115 +++- - .../net/minecraft/server/EntityTypes.java | 6 + - .../java/net/minecraft/server/EntityVex.java | 65 +- - .../net/minecraft/server/EntityVillager.java | 22 + - .../server/EntityVillagerTrader.java | 18 + - .../minecraft/server/EntityVindicator.java | 19 + - .../net/minecraft/server/EntityWitch.java | 21 +- - .../net/minecraft/server/EntityWither.java | 69 +- - .../java/net/minecraft/server/EntityWolf.java | 121 ++-- - .../net/minecraft/server/EntityZombie.java | 19 + - .../minecraft/server/EntityZombieHusk.java | 17 + - .../server/EntityZombieVillager.java | 17 + - .../java/net/minecraft/server/FoodInfo.java | 1 + - .../java/net/minecraft/server/ItemDye.java | 1 + - .../java/net/minecraft/server/MathHelper.java | 2 + - .../minecraft/server/PathfinderGoalSwell.java | 5 +- - .../minecraft/server/ProjectileHelper.java | 1 + - src/main/java/net/minecraft/server/Vec3D.java | 3 + - src/main/java/net/minecraft/server/World.java | 7 + - .../net/pl3x/purpur/PurpurWorldConfig.java | 599 ++++++++++++++++++ - .../purpur/controller/ControllerLookWASD.java | 75 +++ - .../purpur/controller/ControllerMoveWASD.java | 86 +++ - .../controller/ControllerMoveWASDFlying.java | 53 ++ - .../ControllerMoveWASDFlyingWithSpacebar.java | 61 ++ - .../controller/ControllerMoveWASDWater.java | 43 ++ - .../net/pl3x/purpur/entity/DolphinSpit.java | 119 ++++ - .../net/pl3x/purpur/entity/PhantomFlames.java | 126 ++++ - .../pathfinder/PathfinderGoalHasRider.java | 21 + - .../PathfinderGoalHorseHasRider.java | 21 + - .../craftbukkit/entity/CraftEntity.java | 27 + - src/main/resources/purpur.lang | 4 +- - 100 files changed, 3621 insertions(+), 211 deletions(-) - create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java - create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java - create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java - create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlyingWithSpacebar.java - create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDWater.java - create mode 100644 src/main/java/net/pl3x/purpur/entity/DolphinSpit.java - create mode 100644 src/main/java/net/pl3x/purpur/entity/PhantomFlames.java - create mode 100644 src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java - create mode 100644 src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHorseHasRider.java - -diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index 688c5b1bd..b35bac0e2 100644 ---- a/src/main/java/net/minecraft/server/AxisAlignedBB.java -+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -216,6 +216,7 @@ public class AxisAlignedBB { - return new AxisAlignedBB(d3, d4, d5, d6, d7, d8); - } - -+ public AxisAlignedBB expandTowards(Vec3D vec3d) { return a(vec3d); } // Purpur - OBFHELPER - public AxisAlignedBB a(Vec3D vec3d) { - return this.b(vec3d.x, vec3d.y, vec3d.z); - } -@@ -267,6 +268,7 @@ public class AxisAlignedBB { - return new AxisAlignedBB(d3, d4, d5, d6, d7, d8); - } - -+ public AxisAlignedBB expand(double size) { return g(size); } // Purpur - OBFHELPER - public AxisAlignedBB g(double d0) { - return this.grow(d0, d0, d0); - } -diff --git a/src/main/java/net/minecraft/server/ControllerLookDolphin.java b/src/main/java/net/minecraft/server/ControllerLookDolphin.java -index 1d9ba04da..2bade947e 100644 ---- a/src/main/java/net/minecraft/server/ControllerLookDolphin.java -+++ b/src/main/java/net/minecraft/server/ControllerLookDolphin.java -@@ -1,6 +1,6 @@ - package net.minecraft.server; - --public class ControllerLookDolphin extends ControllerLook { -+public class ControllerLookDolphin extends net.pl3x.purpur.controller.ControllerLookWASD { // Purpur - - private final int h; - -@@ -10,7 +10,7 @@ public class ControllerLookDolphin extends ControllerLook { - } - - @Override -- public void a() { -+ public void tick() { // Purpur - if (this.d) { - this.d = false; - this.a.aK = this.a(this.a.aK, this.h() + 20.0F, this.b); -diff --git a/src/main/java/net/minecraft/server/ControllerMove.java b/src/main/java/net/minecraft/server/ControllerMove.java -index a5c4cbb67..efe6afde9 100644 ---- a/src/main/java/net/minecraft/server/ControllerMove.java -+++ b/src/main/java/net/minecraft/server/ControllerMove.java -@@ -6,9 +6,9 @@ public class ControllerMove { - protected double b; - protected double c; - protected double d; -- protected double e; -- protected float f; -- protected float g; -+ protected double e; public double getSpeed() { return e; } public void setSpeed(double speed) { this.e = speed; } // Purpur - OBFHELPER -+ protected float f; public float getForward() { return f; } public void setForward(float forward) { this.f = forward; } // Purpur - OBFHELPER -+ protected float g; public float getStrafe() { return g; } public void setStrafe(float strafe) { this.g = strafe; } // Purpur - OBFHELPER - protected ControllerMove.Operation h; - - public ControllerMove(EntityInsentient entityinsentient) { -diff --git a/src/main/java/net/minecraft/server/DamageSource.java b/src/main/java/net/minecraft/server/DamageSource.java -index 816d301f1..f7344d3ae 100644 ---- a/src/main/java/net/minecraft/server/DamageSource.java -+++ b/src/main/java/net/minecraft/server/DamageSource.java -@@ -57,6 +57,7 @@ public class DamageSource { - return new EntityDamageSource("mob", entityliving); - } - -+ public static DamageSource indirectMobAttack(Entity entity, EntityLiving entityliving) { return a(entity, entityliving); } // Purpur - OBFHELPER - public static DamageSource a(Entity entity, EntityLiving entityliving) { - return new EntityDamageSourceIndirect("mob", entity, entityliving); - } -@@ -101,10 +102,12 @@ public class DamageSource { - return new DamageSourceNetherBed(); - } - -+ public boolean isProjectile() { return b(); } // Purpur - OBFHELPER - public boolean b() { - return this.C; - } - -+ public DamageSource setProjectile() { return c(); } // Purpur - OBFHELPER - public DamageSource c() { - this.C = true; - return this; -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 37f854764..dc72ee435 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -79,7 +79,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper - private CraftEntity bukkitEntity; - -- PlayerChunkMap.EntityTracker tracker; // Paper -+ PlayerChunkMap.EntityTracker tracker; public PlayerChunkMap.EntityTracker getTracker() { return tracker; } // Paper // Purpur - boolean collisionLoadChunks = false; // Paper - Throwable addedToWorldStack; // Paper - entity debug - public CraftEntity getBukkitEntity() { -@@ -104,7 +104,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - private int id; - public boolean i; public final boolean blocksEntitySpawning() { return this.i; } // Paper - OBFHELPER - public final List passengers; -- protected int j; -+ protected int j; public int getRideCooldown() { return j; } // Purpur - OBFHELPER - @Nullable - private Entity vehicle; - public boolean attachedToPlayer; -@@ -137,7 +137,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - public double E; - public double F; - public double G; -- public float H; public final float getStepHeight() { return this.H; } // Tuinity - OBFHELPER -+ public float H; public final float getStepHeight() { return this.H; } public void setStepHeight(float stepHeight) { this.H = stepHeight; } // Purpur // Tuinity - OBFHELPER - public boolean noclip; - public float J; - protected final Random random; -@@ -181,7 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - private boolean aF; - private final double[] aG; - private long aH; -- private EntitySize size; -+ protected EntitySize size; // Purpur - private -> protected - private float headHeight; - // CraftBukkit start - public boolean persist = true; -@@ -1387,6 +1387,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return flag; - } - -+ public boolean isInBubbleColumn() { return l(); } // Purpur - OBFHELPER - private boolean l() { - return this.world.getType(new BlockPosition(this)).getBlock() == Blocks.BUBBLE_COLUMN; - } -@@ -1400,8 +1401,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return this.isInWater() || this.isInRain() || this.l(); - } - -+ public boolean isInWaterOrBubbleColumn() { return az(); } // Purpur - OBFHELPER - public boolean az() { -- return this.isInWater() || this.l(); -+ return this.isInWater() || this.isInBubbleColumn(); // Purpur - } - - public boolean aA() { -@@ -1532,6 +1534,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return this.inLava; - } - -+ public void moveRelative(float speed, Vec3D motion) { this.a(speed, motion); } // Purpur - OBFHELPER - public void a(float f, Vec3D vec3d) { - Vec3D vec3d1 = a(vec3d, f, this.yaw); - -@@ -2367,7 +2370,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - } else { - this.passengers.add(entity); - } -- -+ // Purpur start -+ if (isRidable() && passengers.get(0) == entity && entity instanceof EntityHuman) { -+ EntityHuman entityhuman = (EntityHuman) entity; -+ onMount(entityhuman); -+ this.rider = entityhuman; -+ } -+ // Purpur end - } - return true; // CraftBukkit - } -@@ -2402,6 +2411,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return false; - } - // Spigot end -+ // Purpur start -+ if (rider != null && passengers.get(0) == rider) { -+ onDismount(rider); -+ this.rider = null; -+ } -+ // Purpur end - this.passengers.remove(entity); - entity.j = 60; - } -@@ -2570,6 +2585,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - this.setFlag(4, flag); - } - -+ public boolean isGlowing() { return bt(); } // Purpur - OBFHELPER - public boolean bt() { - return this.glowing || this.world.isClientSide && this.getFlag(6); - } -@@ -2788,6 +2804,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - - public void setHeadRotation(float f) {} - -+ public void setBodyYaw(float yaw) { l(yaw); } // Purpur - OBFHELPER - public void l(float f) {} - - public boolean bA() { -@@ -3657,4 +3674,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - - void accept(Entity entity, double d0, double d1, double d2); - } -+ -+ // Purpur start -+ private EntityHuman rider; -+ -+ public EntityHuman getRider() { -+ return rider; -+ } -+ -+ public boolean hasRider() { -+ return rider != null; -+ } -+ -+ public boolean isRidable() { -+ return false; -+ } -+ -+ public boolean isRidableInWater() { -+ return false; -+ } -+ -+ public boolean requireShiftToMount() { -+ return true; -+ } -+ -+ public void onMount(EntityHuman entityhuman) { -+ if (this instanceof EntityInsentient) { -+ ((EntityInsentient) this).setGoalTarget(null, null, false); -+ ((EntityInsentient) this).getNavigation().stopPathfinding(); -+ } -+ entityhuman.setJumping(false); // fixes jump on mount -+ } -+ -+ public void onDismount(EntityHuman entityhuman) { -+ } -+ -+ public boolean onSpacebar() { -+ return false; -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java -index 3d27f0964..822316a65 100644 ---- a/src/main/java/net/minecraft/server/EntityAgeable.java -+++ b/src/main/java/net/minecraft/server/EntityAgeable.java -@@ -86,7 +86,7 @@ public abstract class EntityAgeable extends EntityCreature { - - return true; - } else { -- return false; -+ return super.a(entityhuman, enumhand); // Purpur - } - } - -diff --git a/src/main/java/net/minecraft/server/EntityBat.java b/src/main/java/net/minecraft/server/EntityBat.java -index 34239160b..592408bac 100644 ---- a/src/main/java/net/minecraft/server/EntityBat.java -+++ b/src/main/java/net/minecraft/server/EntityBat.java -@@ -14,9 +14,44 @@ public class EntityBat extends EntityAmbient { - - public EntityBat(EntityTypes entitytypes, World world) { - super(entitytypes, world); -+ this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASDFlyingWithSpacebar(this, 0.075F); // Purpur - this.setAsleep(true); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.batRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.batRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.batRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.batMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider() && !onGround) { -+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ // Purpur end -+ - @Override - protected void initDatawatcher() { - super.initDatawatcher(); -@@ -64,6 +99,12 @@ public class EntityBat extends EntityAmbient { - protected void initAttributes() { - super.initAttributes(); - this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(6.0D); -+ // Purpur start -+ if (world != null && world.purpurConfig.batRidable) { -+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); -+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); -+ } -+ // Purpur end - } - - public boolean isAsleep() { -@@ -95,6 +136,13 @@ public class EntityBat extends EntityAmbient { - - @Override - protected void mobTick() { -+ // Purpur start -+ if (hasRider()) { -+ Vec3D mot = getMot(); -+ setMot(mot.x, mot.y + (getVertical() > 0 ? 0.07D : 0.0D), mot.z); -+ return; -+ } -+ // Purpur end - super.mobTick(); - BlockPosition blockposition = new BlockPosition(this); - BlockPosition blockposition1 = blockposition.up(); -@@ -229,4 +277,14 @@ public class EntityBat extends EntityAmbient { - protected float b(EntityPose entitypose, EntitySize entitysize) { - return entitysize.height / 2.0F; - } -+ -+ // Purpur start -+ @Override -+ public void onMount(EntityHuman entityhuman) { -+ if (isAsleep()) { -+ setAsleep(false); -+ world.playEffect(null, 1025, new BlockPosition(this).up(), 0); -+ } -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java -index dd1d246ae..f0f83baac 100644 ---- a/src/main/java/net/minecraft/server/EntityBee.java -+++ b/src/main/java/net/minecraft/server/EntityBee.java -@@ -36,9 +36,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { - - public EntityBee(EntityTypes entitytypes, World world) { - super(entitytypes, world); -- // Paper start - apply gravity to bees when they get stuck in the void, fixes MC-167279 -- this.moveController = new ControllerMoveFlying(this, 20, true) { -- @Override -+ this.moveController = new ControllerMoveWASDBee(this, 20, true) { // Purpur - public void tick() { - if (getEntity().locY() <= 0) { - getEntity().setNoGravity(false); -@@ -46,13 +44,55 @@ public class EntityBee extends EntityAnimal implements EntityBird { - super.tick(); - } - }; -- // Paper end -- this.lookController = new EntityBee.j(this); -+ // Purpur start -+ this.lookController = new net.pl3x.purpur.controller.ControllerLookWASD(this) { -+ @Override -+ protected void tick() { -+ if (!((EntityBee) entity).isAngry()) { -+ super.tick(); -+ } -+ } -+ }; -+ // Purpur end - this.a(PathType.WATER, -1.0F); - this.a(PathType.COCOA, -1.0F); - this.a(PathType.FENCE, -1.0F); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.beeRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.beeRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.beeRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.beeMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider() && !onGround) { -+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, speed, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ // Purpur end -+ - @Override - protected void initDatawatcher() { - super.initDatawatcher(); -@@ -67,6 +107,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { - - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(0, new EntityBee.b(this, 1.399999976158142D, true)); - this.goalSelector.a(1, new EntityBee.d()); - this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D)); -@@ -82,6 +123,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { - this.goalSelector.a(7, new EntityBee.g()); - this.goalSelector.a(8, new EntityBee.l()); - this.goalSelector.a(9, new PathfinderGoalFloat(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new EntityBee.h(this)).a(new Class[0])); - this.targetSelector.a(2, new EntityBee.c(this)); - } -@@ -590,6 +632,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { - - private d() { - super(); // CraftBukkit - decompile error -+ this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); // Purpur - enter hive - } - - @Override -@@ -652,6 +695,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { - - private g() { - super(); // CraftBukkit - decompile error -+ this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); // Purpur - grow crop - } - - @Override -@@ -716,6 +760,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { - - private i() { - super(); // CraftBukkit - decompile error -+ this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); // Purpur - go to hive - } - - @Override -@@ -1234,4 +1279,67 @@ public class EntityBee extends EntityAnimal implements EntityBird { - - } - } -+ -+ // Purpur start -+ public static class ControllerMoveWASDBee extends ControllerMoveFlying { -+ protected final EntityBee entity; -+ protected int tooHighCooldown = 0; -+ -+ public ControllerMoveWASDBee(EntityBee entity, int pitchDelta, boolean gravity) { -+ super(entity, pitchDelta, gravity); -+ this.entity = entity; -+ } -+ -+ // isUpdating -+ @Override -+ public boolean b() { -+ return entity.hasRider() || super.b(); -+ } -+ -+ // tick -+ @Override -+ public void a() { -+ if (entity.hasRider()) { -+ tick(entity.getRider()); -+ } else { -+ tick(); -+ } -+ } -+ -+ protected void tick(EntityHuman rider) { -+ float forward = Math.max(0.0F, rider.getForward()); -+ float vertical = forward == 0.0F ? 0.0F : -(rider.pitch / 90.0F); -+ float strafe = rider.getStrafe(); -+ -+ if (rider.jumping && net.pl3x.purpur.controller.ControllerMoveWASD.spacebarEvent(entity)) { -+ entity.onSpacebar(); -+ } -+ -+ if (entity.locY() >= entity.getMaxY() || --tooHighCooldown > 0) { -+ tooHighCooldown = 60; -+ entity.setMot(entity.getMot().add(0.0D, -0.05D, 0.0D)); -+ vertical = 0.0F; -+ } -+ -+ setSpeed(entity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue()); -+ float speed = (float) getSpeed(); -+ -+ if (entity.onGround) { -+ speed *= 0.25F; -+ } -+ -+ entity.setSpeed(speed); -+ entity.setVertical(vertical); -+ entity.setStrafe(strafe); -+ entity.setForward(forward); -+ -+ setForward(entity.getForward()); -+ setStrafe(entity.getStrafe()); -+ -+ if (forward == 0 && strafe == 0) { -+ entity.setMot(entity.getMot().multiply(0.95, 0.9, 0.95)); -+ } -+ } -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java -index da6a3fa2c..d02130e0d 100644 ---- a/src/main/java/net/minecraft/server/EntityBlaze.java -+++ b/src/main/java/net/minecraft/server/EntityBlaze.java -@@ -10,6 +10,7 @@ public class EntityBlaze extends EntityMonster { - - public EntityBlaze(EntityTypes entitytypes, World world) { - super(entitytypes, world); -+ this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASDFlyingWithSpacebar(this, 0.3F); // Purpur - this.a(PathType.WATER, -1.0F); - this.a(PathType.LAVA, 8.0F); - this.a(PathType.DANGER_FIRE, 0.0F); -@@ -17,13 +18,49 @@ public class EntityBlaze extends EntityMonster { - this.f = 10; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.blazeRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.blazeRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.blazeRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.blazeMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider() && !onGround) { -+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(4, new EntityBlaze.PathfinderGoalBlazeFireball(this)); - this.goalSelector.a(5, new PathfinderGoalMoveTowardsRestriction(this, 1.0D)); - this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D, 0.0F)); - this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this).a(new Class[0])); // Purpur - decompile error - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - } -@@ -34,6 +71,12 @@ public class EntityBlaze extends EntityMonster { - this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(6.0D); - this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.23000000417232513D); - this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(48.0D); -+ // Purpur start -+ if (world != null && world.purpurConfig.blazeRidable) { -+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); -+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); -+ } -+ // Purpur end - } - - @Override -@@ -87,6 +130,14 @@ public class EntityBlaze extends EntityMonster { - this.damageEntity(DamageSource.DROWN, 1.0F); - } - -+ // Purpur start -+ if (hasRider()) { -+ Vec3D mot = getMot(); -+ setMot(mot.x, getVertical() > 0 ? 0.07D : -0.07D, mot.z); -+ return; -+ } -+ // Purpur end -+ - --this.c; - if (this.c <= 0) { - this.c = 100; -diff --git a/src/main/java/net/minecraft/server/EntityCat.java b/src/main/java/net/minecraft/server/EntityCat.java -index b3bdc194a..8b9222d77 100644 ---- a/src/main/java/net/minecraft/server/EntityCat.java -+++ b/src/main/java/net/minecraft/server/EntityCat.java -@@ -42,6 +42,23 @@ public class EntityCat extends EntityTameableAnimal { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.catRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.catRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.catRequireShiftToMount; -+ } -+ // Purpur end -+ - public MinecraftKey ez() { - return (MinecraftKey) EntityCat.bz.getOrDefault(this.getCatType(), EntityCat.bz.get(0)); - } -@@ -50,7 +67,8 @@ public class EntityCat extends EntityTameableAnimal { - protected void initPathfinder() { - this.goalSit = new PathfinderGoalSit(this); - this.bG = new EntityCat.PathfinderGoalTemptChance(this, 0.6D, EntityCat.bA, true); -- this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new PathfinderGoalFloat(this)); // Purpur -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityCat.b(this)); - this.goalSelector.a(2, this.goalSit); - this.goalSelector.a(3, this.bG); -@@ -62,6 +80,7 @@ public class EntityCat extends EntityTameableAnimal { - this.goalSelector.a(10, new PathfinderGoalBreed(this, 0.8D)); - this.goalSelector.a(11, new PathfinderGoalRandomStrollLand(this, 0.8D, 1.0000001E-5F)); - this.goalSelector.a(12, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalRandomTargetNonTamed<>(this, EntityRabbit.class, false, (Predicate) null)); - this.targetSelector.a(1, new PathfinderGoalRandomTargetNonTamed<>(this, EntityTurtle.class, false, EntityTurtle.bw)); - } -@@ -78,6 +97,7 @@ public class EntityCat extends EntityTameableAnimal { - this.datawatcher.set(EntityCat.bB, i); - } - -+ public void setSleepingWithOwner(boolean flag) { u(flag); } // Purpur - OBFHELPER - public void u(boolean flag) { - this.datawatcher.set(EntityCat.bC, flag); - } -@@ -86,6 +106,7 @@ public class EntityCat extends EntityTameableAnimal { - return (Boolean) this.datawatcher.get(EntityCat.bC); - } - -+ public void setHeadDown(boolean flag) { v(flag); } // Purpur - OBFHELPER - public void v(boolean flag) { - this.datawatcher.set(EntityCat.bD, flag); - } -@@ -306,6 +327,7 @@ public class EntityCat extends EntityTameableAnimal { - - @Override - public boolean a(EntityHuman entityhuman, EnumHand enumhand) { -+ if (hasRider()) return false; // Purpur - ItemStack itemstack = entityhuman.b(enumhand); - Item item = itemstack.getItem(); - -@@ -396,6 +418,15 @@ public class EntityCat extends EntityTameableAnimal { - - } - -+ // Purpur start -+ public void onMount(EntityHuman entityhuman) { -+ super.onMount(entityhuman); -+ setSitting(false); -+ setSleepingWithOwner(false); -+ setHeadDown(false); -+ } -+ // Purpur end -+ - static class b extends PathfinderGoal { - - private final EntityCat a; -@@ -405,6 +436,7 @@ public class EntityCat extends EntityTameableAnimal { - - public b(EntityCat entitycat) { - this.a = entitycat; -+ this.a(java.util.EnumSet.of(PathfinderGoal.Type.MOVE)); // Purpur - lay on owner - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityCaveSpider.java b/src/main/java/net/minecraft/server/EntityCaveSpider.java -index 23ced2c7b..5b86b36f6 100644 ---- a/src/main/java/net/minecraft/server/EntityCaveSpider.java -+++ b/src/main/java/net/minecraft/server/EntityCaveSpider.java -@@ -8,6 +8,23 @@ public class EntityCaveSpider extends EntitySpider { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.caveSpiderRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.caveSpiderRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.caveSpiderRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initAttributes() { - super.initAttributes(); -diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java -index 65795fc89..5505b7ee9 100644 ---- a/src/main/java/net/minecraft/server/EntityChicken.java -+++ b/src/main/java/net/minecraft/server/EntityChicken.java -@@ -17,9 +17,27 @@ public class EntityChicken extends EntityAnimal { - this.a(PathType.WATER, 0.0F); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.chickenRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.chickenRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.chickenRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.4D)); - this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D)); - this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.0D, false, EntityChicken.bD)); -@@ -66,6 +84,7 @@ public class EntityChicken extends EntityAnimal { - - this.bw += this.bA * 2.0F; - if (!this.world.isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggLayTime <= 0) { -+ if (world.purpurConfig.chickenDontLayEggsWhenRidden) return; // Purpur - this.a(SoundEffects.ENTITY_CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); - this.forceDrops = true; // CraftBukkit - this.a((IMaterial) Items.EGG); -diff --git a/src/main/java/net/minecraft/server/EntityCod.java b/src/main/java/net/minecraft/server/EntityCod.java -index 1e3782122..0153a821e 100644 ---- a/src/main/java/net/minecraft/server/EntityCod.java -+++ b/src/main/java/net/minecraft/server/EntityCod.java -@@ -6,6 +6,23 @@ public class EntityCod extends EntityFishSchool { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.codRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.codRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.codRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected ItemStack l() { - return new ItemStack(Items.COD_BUCKET); -diff --git a/src/main/java/net/minecraft/server/EntityComplexPart.java b/src/main/java/net/minecraft/server/EntityComplexPart.java -index a0b35c869..144e89f22 100644 ---- a/src/main/java/net/minecraft/server/EntityComplexPart.java -+++ b/src/main/java/net/minecraft/server/EntityComplexPart.java -@@ -47,4 +47,11 @@ public class EntityComplexPart extends Entity { - public EntitySize a(EntityPose entitypose) { - return this.d; - } -+ -+ // Purpur start -+ @Override -+ public boolean b(EntityHuman entityhuman, EnumHand enumhand) { -+ return owner.isAlive() && owner.tryRide(entityhuman, enumhand); -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java -index 2c8bbf20a..723a9fa1e 100644 ---- a/src/main/java/net/minecraft/server/EntityCow.java -+++ b/src/main/java/net/minecraft/server/EntityCow.java -@@ -11,9 +11,27 @@ public class EntityCow extends EntityAnimal { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.cowRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.cowRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.cowRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalPanic(this, 2.0D)); - this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D)); - this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.25D, RecipeItemStack.a(Items.WHEAT), false)); -diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 45dfc8104..48fd8e716 100644 ---- a/src/main/java/net/minecraft/server/EntityCreeper.java -+++ b/src/main/java/net/minecraft/server/EntityCreeper.java -@@ -23,16 +23,35 @@ public class EntityCreeper extends EntityMonster { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.creeperRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.creeperRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.creeperRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(1, new PathfinderGoalFloat(this)); - this.goalSelector.a(2, new PathfinderGoalSwell(this)); -+ this.goalSelector.a(3, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(3, new PathfinderGoalAvoidTarget<>(this, EntityOcelot.class, 6.0F, 1.0D, 1.2D)); - this.goalSelector.a(3, new PathfinderGoalAvoidTarget<>(this, EntityCat.class, 6.0F, 1.0D, 1.2D)); - this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 1.0D, false)); - this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 0.8D)); - this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(6, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, new Class[0])); - } -@@ -165,6 +184,7 @@ public class EntityCreeper extends EntityMonster { - return (Integer) this.datawatcher.get(EntityCreeper.b); - } - -+ public void setSwellDirection(int i) { a(i); } // Purpur - OBFHELPER - public void a(int i) { - this.datawatcher.set(EntityCreeper.b, i); - } -@@ -265,6 +285,7 @@ public class EntityCreeper extends EntityMonster { - com.destroystokyo.paper.event.entity.CreeperIgniteEvent event = new com.destroystokyo.paper.event.entity.CreeperIgniteEvent((org.bukkit.entity.Creeper) getBukkitEntity(), ignited); - if (event.callEvent()) { - this.datawatcher.set(EntityCreeper.d, event.isIgnited()); -+ if (!event.isIgnited()) setSwellDirection(-1); - } - } - // Paper end -@@ -277,4 +298,59 @@ public class EntityCreeper extends EntityMonster { - public void setCausedHeadDrop() { - ++this.bA; - } -+ -+ // Purpur start -+ @Override -+ protected void mobTick() { -+ if (powerToggleDelay > 0) { -+ powerToggleDelay--; -+ } -+ if (hasRider()) { -+ if (getRider().getForward() != 0 || getRider().getStrafe() != 0) { -+ spacebarCharge = 0; -+ setIgnited(false); -+ } -+ if (spacebarCharge == prevSpacebarCharge) { -+ spacebarCharge = 0; -+ } -+ prevSpacebarCharge = spacebarCharge; -+ } -+ super.mobTick(); -+ } -+ -+ @Override -+ public void onMount(EntityHuman entityhuman) { -+ super.onMount(entityhuman); -+ setIgnited(false); -+ } -+ -+ private int spacebarCharge = 0; -+ private int prevSpacebarCharge = 0; -+ private int powerToggleDelay = 0; -+ -+ @Override -+ public boolean onSpacebar() { -+ if (powerToggleDelay > 0) { -+ return true; // just toggled power, do not jump or ignite -+ } -+ spacebarCharge++; -+ if (spacebarCharge > maxFuseTicks - 2) { -+ spacebarCharge = 0; -+ if (getRider().getBukkitEntity().hasPermission("allow.powered.creeper")) { -+ powerToggleDelay = 20; -+ setPowered(!isPowered()); -+ setIgnited(false); -+ return true; -+ } -+ } -+ if (!isIgnited()) { -+ if (hasRider() && getRider().getForward() == 0 && getRider().getStrafe() == 0 && -+ getRider().getBukkitEntity().hasPermission("allow.special.creeper")) { -+ setIgnited(true); -+ return true; -+ } -+ } -+ return getForward() == 0 && getStrafe() == 0; // do not jump if standing still -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/minecraft/server/EntityDolphin.java b/src/main/java/net/minecraft/server/EntityDolphin.java -index ce78586ea..81570b37b 100644 ---- a/src/main/java/net/minecraft/server/EntityDolphin.java -+++ b/src/main/java/net/minecraft/server/EntityDolphin.java -@@ -1,5 +1,12 @@ - package net.minecraft.server; - -+// Purpur start -+import net.pl3x.purpur.entity.DolphinSpit; -+import org.bukkit.Location; -+import org.bukkit.craftbukkit.entity.CraftPlayer; -+import org.bukkit.util.Vector; -+// Purpur end -+ - import java.util.EnumSet; - import java.util.List; - import java.util.Random; -@@ -15,6 +22,7 @@ public class EntityDolphin extends EntityWaterAnimal { - public static final Predicate b = (entityitem) -> { - return !entityitem.p() && entityitem.isAlive() && entityitem.isInWater(); - }; -+ private int spitCooldown; // Purpur - - public EntityDolphin(EntityTypes entitytypes, World world) { - super(entitytypes, world); -@@ -23,6 +31,50 @@ public class EntityDolphin extends EntityWaterAnimal { - this.setCanPickupLoot(true); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.dolphinRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.dolphinRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.dolphinRequireShiftToMount; -+ } -+ -+ @Override -+ public boolean onSpacebar() { -+ if (spitCooldown == 0 && hasRider()) { -+ spitCooldown = world.purpurConfig.dolphinSpitCooldown; -+ if (!hasRider()) { -+ return false; -+ } -+ -+ CraftPlayer player = (CraftPlayer) getRider().getBukkitEntity(); -+ if (!player.hasPermission("allow.special.dolphin")) { -+ return false; -+ } -+ -+ Location loc = player.getEyeLocation(); -+ loc.setPitch(loc.getPitch() - 10); -+ Vector target = loc.getDirection().normalize().multiply(10).add(loc.toVector()); -+ -+ DolphinSpit spit = new DolphinSpit(world, this); -+ spit.shoot(target.getX() - locX(), target.getY() - locY(), target.getZ() - locZ(), world.purpurConfig.dolphinSpitSpeed, 5.0F); -+ -+ world.addEntity(spit); -+ playSound(SoundEffects.ENTITY_DOLPHIN_ATTACK, 1.0F, 1.0F + (random.nextFloat() - random.nextFloat()) * 0.2F); -+ return true; -+ } -+ return false; -+ } -+ // Purpur end -+ - @Nullable - @Override - public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) { -@@ -97,6 +149,7 @@ public class EntityDolphin extends EntityWaterAnimal { - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalBreath(this)); - this.goalSelector.a(0, new PathfinderGoalWater(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityDolphin.b(this)); - this.goalSelector.a(2, new EntityDolphin.c(this, 4.0D)); - this.goalSelector.a(4, new PathfinderGoalRandomSwim(this, 1.0D, 10)); -@@ -107,6 +160,7 @@ public class EntityDolphin extends EntityWaterAnimal { - this.goalSelector.a(8, new EntityDolphin.d()); - this.goalSelector.a(8, new PathfinderGoalFollowBoat(this)); - this.goalSelector.a(9, new PathfinderGoalAvoidTarget<>(this, EntityGuardian.class, 8.0F, 1.0D, 1.0D)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityGuardian.class})).a(new Class[0])); // CraftBukkit - decompile error - } - -@@ -163,7 +217,7 @@ public class EntityDolphin extends EntityWaterAnimal { - - @Override - protected boolean n(Entity entity) { -- return true; -+ return getRideCooldown() <= 0; // Purpur - make dolphin honor ride cooldown like all other non-boss mobs - } - - @Override -@@ -196,6 +250,9 @@ public class EntityDolphin extends EntityWaterAnimal { - @Override - public void tick() { - super.tick(); -+ if (spitCooldown > 0) { -+ spitCooldown--; -+ } - if (!this.isNoAI()) { - if (this.ay()) { - this.b(2400); -@@ -459,7 +516,7 @@ public class EntityDolphin extends EntityWaterAnimal { - - private int b; - -- private d() {} -+ private d() { this.a(java.util.EnumSet.of(PathfinderGoal.Type.MOVE)); } // Purpur - play with item - - @Override - public boolean a() { -@@ -527,7 +584,7 @@ public class EntityDolphin extends EntityWaterAnimal { - } - } - -- static class a extends ControllerMove { -+ static class a extends net.pl3x.purpur.controller.ControllerMoveWASDWater { // Purpur - - private final EntityDolphin i; - -@@ -537,7 +594,20 @@ public class EntityDolphin extends EntityWaterAnimal { - } - - @Override -- public void a() { -+ // Purpur start -+ public void tick(EntityHuman rider) { -+ if (this.i.getAirTicks() < 150) { -+ // if drowning override player WASD controls to find air -+ tick(); -+ } else { -+ super.tick(rider); -+ this.i.setMot(this.i.getMot().add(0.0D, 0.005D, 0.0D)); -+ } -+ } -+ -+ @Override -+ public void tick() { -+ // Purpur end - if (this.i.isInWater()) { - this.i.setMot(this.i.getMot().add(0.0D, 0.005D, 0.0D)); - } -diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java -index 77885f67f..63f5969b1 100644 ---- a/src/main/java/net/minecraft/server/EntityDrowned.java -+++ b/src/main/java/net/minecraft/server/EntityDrowned.java -@@ -19,6 +19,23 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - this.navigationLand = new Navigation(this, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.drownedRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.drownedRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.drownedRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void l() { - this.goalSelector.a(1, new EntityDrowned.c(this, 1.0D)); -@@ -200,7 +217,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - this.bw = flag; - } - -- static class d extends ControllerMove { -+ static class d extends net.pl3x.purpur.controller.ControllerMoveWASD { // Purpur - - private final EntityDrowned i; - -@@ -210,7 +227,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - } - - @Override -- public void a() { -+ public void tick() { // Purpur - EntityLiving entityliving = this.i.getGoalTarget(); - - if (this.i.ez() && this.i.isInWater()) { -@@ -243,7 +260,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - this.i.setMot(this.i.getMot().add(0.0D, -0.008D, 0.0D)); - } - -- super.a(); -+ super.tick(); // Purpur - } - - } -@@ -382,6 +399,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - this.a = entitydrowned; - this.b = d0; - this.c = i; -+ this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); // Purpur - swim up - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 7daebfdab..54b63395f 100644 ---- a/src/main/java/net/minecraft/server/EntityEnderDragon.java -+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -46,6 +46,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - private final int[] bS = new int[24]; - private final Path bT = new Path(); - private Explosion explosionSource = new Explosion(null, this, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.Effect.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource() -+ private boolean hadRider; // Purpur - - public EntityEnderDragon(EntityTypes entitytypes, World world) { - super(EntityTypes.ENDER_DRAGON, world); -@@ -60,8 +61,50 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - } - - this.bO = new DragonControllerManager(this); -+ -+ // Purpur start -+ this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASDFlying(this) { -+ @Override -+ public void tick() { -+ // dragon doesn't use the controller. do nothing -+ } -+ }; -+ this.lookController = new net.pl3x.purpur.controller.ControllerLookWASD(this) { -+ @Override -+ public void tick() { -+ // dragon doesn't use the controller. do nothing -+ } -+ -+ @Override -+ public void tick(EntityHuman rider) { -+ setYawPitch(rider.yaw - 180F, rider.pitch * 0.5F); -+ } -+ }; -+ // Purpur end -+ } -+ -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.enderDragonRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.enderDragonRidableInWater; - } - -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.enderDragonRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.enderDragonMaxY; -+ } -+ // Purpur end -+ - @Override - protected void initAttributes() { - super.initAttributes(); -@@ -96,6 +139,37 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - - @Override - public void movementTick() { -+ // Purpur start -+ boolean hasRider = getRider() != null; -+ if (hasRider) { -+ if (!hadRider) { -+ hadRider = true; -+ noclip = false; -+ this.size = EntitySize.b(4.0F, 2.0F); -+ } -+ -+ // dragon doesn't use controllers, so must tick manually -+ moveController.a(); -+ lookController.a(); -+ -+ moveRelative((float) getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue() * 0.1F, new Vec3D(-getStrafe(), getVertical(), -getForward())); -+ Vec3D mot = getMot(); -+ setMot(mot); -+ move(EnumMoveType.PLAYER, mot); -+ -+ mot = mot.multiply(0.9F, 0.9F, 0.9F); -+ setMot(mot); -+ -+ // control wing flap speed on client -+ getDragonControllerManager().setControllerPhase(mot.getX() * mot.getX() + mot.getZ() * mot.getZ() < 0.005F ? DragonControllerPhase.HOVER : DragonControllerPhase.HOLDING_PATTERN); -+ } else if (hadRider) { -+ hadRider = false; -+ noclip = true; -+ this.size = EntitySize.b(16.0F, 8.0F); -+ getDragonControllerManager().setControllerPhase(DragonControllerPhase.HOLDING_PATTERN); // HoldingPattern -+ } -+ // Purpur end -+ - float f; - float f1; - -@@ -117,6 +191,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - - this.bx = this.by; - if (this.getHealth() <= 0.0F) { -+ if (hasRider) ejectPassengers(); // Purpur - f = (this.random.nextFloat() - 0.5F) * 8.0F; - f1 = (this.random.nextFloat() - 0.5F) * 4.0F; - float f2 = (this.random.nextFloat() - 0.5F) * 8.0F; -@@ -128,9 +203,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - - f1 = 0.2F / (MathHelper.sqrt(b(vec3d)) * 10.0F + 1.0F); - f1 *= (float) Math.pow(2.0D, vec3d.y); -- if (this.bO.a().a()) { -+ if (!hasRider && this.bO.a().a()) { // Purpur - this.by += 0.1F; -- } else if (this.bz) { -+ } else if (!hasRider && this.bz) { // Purpur - this.by += f1 * 0.5F; - } else { - this.by += f1; -@@ -174,7 +249,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - } - - this.bO.a().b(); -- } else { -+ } else if (!hasRider) { // Purpur - IDragonController idragoncontroller = this.bO.a(); - - idragoncontroller.c(); -@@ -241,7 +316,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - this.a(this.bH, (double) (f11 * 0.5F), 0.0D, (double) (-f12 * 0.5F)); - this.a(this.bL, (double) (f12 * 4.5F), 2.0D, (double) (f11 * 4.5F)); - this.a(this.bM, (double) (f12 * -4.5F), 2.0D, (double) (f11 * -4.5F)); -- if (!this.world.isClientSide && this.hurtTicks == 0) { -+ if (!hasRider && this.hurtTicks == 0) { // Purpur - this.a(this.world.getEntities(this, this.bL.getBoundingBox().grow(4.0D, 2.0D, 4.0D).d(0.0D, -2.0D, 0.0D), IEntitySelector.e)); - this.a(this.world.getEntities(this, this.bM.getBoundingBox().grow(4.0D, 2.0D, 4.0D).d(0.0D, -2.0D, 0.0D), IEntitySelector.e)); - this.b(this.world.getEntities(this, this.bw.getBoundingBox().g(1.0D), IEntitySelector.e)); -@@ -284,7 +359,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - } - - if (!this.world.isClientSide) { -- this.bz = this.b(this.bw.getBoundingBox()) | this.b(this.bG.getBoundingBox()) | this.b(this.bH.getBoundingBox()); -+ this.bz = !hasRider && this.b(this.bw.getBoundingBox()) | this.b(this.bG.getBoundingBox()) | this.b(this.bH.getBoundingBox()); // Purpur - if (this.bN != null) { - this.bN.b(this); - } -@@ -953,7 +1028,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - - @Override - protected boolean n(Entity entity) { -- return false; -+ return getRideCooldown() <= 0; // Purpur - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 212636dcb..de30ce483 100644 ---- a/src/main/java/net/minecraft/server/EntityEnderman.java -+++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -27,9 +27,27 @@ public class EntityEnderman extends EntityMonster { - this.a(PathType.WATER, -1.0F); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.endermanRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.endermanRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.endermanRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityEnderman.a(this)); - this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, 1.0D, false)); - this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D, 0.0F)); -@@ -37,6 +55,7 @@ public class EntityEnderman extends EntityMonster { - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); - this.goalSelector.a(10, new EntityEnderman.PathfinderGoalEndermanPlaceBlock(this)); - this.goalSelector.a(11, new EntityEnderman.PathfinderGoalEndermanPickupBlock(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new EntityEnderman.PathfinderGoalPlayerWhoLookedAtTarget(this)); - this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, new Class[0])); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityEndermite.class, 10, true, false, EntityEnderman.by)); -@@ -189,7 +208,7 @@ public class EntityEnderman extends EntityMonster { - this.damageEntity(DamageSource.DROWN, 1.0F); // Paper - copied in patch 13 (allow nerfed mobs to jump, float and take water damage) - } - -- if (this.world.isDay() && this.ticksLived >= this.bA + 600) { -+ if (!hasRider() && this.world.isDay() && this.ticksLived >= this.bA + 600) { // Purpur - no random teleporting - float f = this.aI(); - - if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper -@@ -290,6 +309,7 @@ public class EntityEnderman extends EntityMonster { - public boolean damageEntity(DamageSource damagesource, float f) { - if (this.isInvulnerable(damagesource)) { - return false; -+ } else if (hasRider()) { return super.damageEntity(damagesource, f); // Purpur - no teleporting on damage - } else if (!(damagesource instanceof EntityDamageSourceIndirect) && damagesource != DamageSource.FIREWORKS) { - boolean flag = super.damageEntity(damagesource, f); - -@@ -329,6 +349,7 @@ public class EntityEnderman extends EntityMonster { - - public PathfinderGoalEndermanPickupBlock(EntityEnderman entityenderman) { - this.enderman = entityenderman; -+ this.a(EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - } - - @Override -@@ -367,11 +388,11 @@ public class EntityEnderman extends EntityMonster { - - static class PathfinderGoalEndermanPlaceBlock extends PathfinderGoal { - -- private EntityEnderman getEnderman() { return this.a; } // Paper - OBFHELPER -- private final EntityEnderman a; -+ private final EntityEnderman a; private EntityEnderman getEnderman() { return this.a; } // Paper - OBFHELPER - - public PathfinderGoalEndermanPlaceBlock(EntityEnderman entityenderman) { - this.a = entityenderman; -+ this.a(EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - } - - @Override -@@ -381,6 +402,10 @@ public class EntityEnderman extends EntityMonster { - - @Override - public void e() { -+ // Purpur start -+ IBlockData carried = getEnderman().getCarried(); -+ if (carried == null) return; -+ // Purpur end - Random random = this.a.getRandom(); - World world = this.a.world; - int i = MathHelper.floor(this.a.locX() - 1.0D + random.nextDouble() * 2.0D); -@@ -391,7 +416,7 @@ public class EntityEnderman extends EntityMonster { - if (iblockdata == null) return; // Paper - BlockPosition blockposition1 = blockposition.down(); - IBlockData iblockdata1 = world.getType(blockposition1); -- IBlockData iblockdata2 = Block.getValidBlockForPosition(getEnderman().getCarried(), getEnderman().world, blockposition); // Paper - Fix MC-124320 -+ IBlockData iblockdata2 = Block.getValidBlockForPosition(carried, getEnderman().world, blockposition); // Paper - Fix MC-124320 // Purpur - - if (iblockdata2 != null && this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) { - // CraftBukkit start - Place event -diff --git a/src/main/java/net/minecraft/server/EntityEndermite.java b/src/main/java/net/minecraft/server/EntityEndermite.java -index e4bd2796a..5eaf1920b 100644 ---- a/src/main/java/net/minecraft/server/EntityEndermite.java -+++ b/src/main/java/net/minecraft/server/EntityEndermite.java -@@ -12,13 +12,32 @@ public class EntityEndermite extends EntityMonster { - this.f = 3; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.endermiteRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.endermiteRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.endermiteRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(1, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, 1.0D, false)); - this.goalSelector.a(3, new PathfinderGoalRandomStrollLand(this, 1.0D)); - this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this).a(new Class[0])); // Purpur - decompile error - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - } -diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java -index b030fe957..179a26129 100644 ---- a/src/main/java/net/minecraft/server/EntityEvoker.java -+++ b/src/main/java/net/minecraft/server/EntityEvoker.java -@@ -12,10 +12,28 @@ public class EntityEvoker extends EntityIllagerWizard { - this.f = 10; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.evokerRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.evokerRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.evokerRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityEvoker.b()); - this.goalSelector.a(2, new PathfinderGoalAvoidTarget<>(this, EntityHuman.class, 8.0F, 0.6D, 1.0D)); - this.goalSelector.a(4, new EntityEvoker.c()); -@@ -24,6 +42,7 @@ public class EntityEvoker extends EntityIllagerWizard { - this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D)); - this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, EntityRaider.class).a(new Class[0])); // Purpur - decompile error - this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300)); - this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300)); -@@ -108,6 +127,7 @@ public class EntityEvoker extends EntityIllagerWizard { - - public d() { - super(); -+ this.a(java.util.EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - wolololo spell - } - - @Override -@@ -186,6 +206,7 @@ public class EntityEvoker extends EntityIllagerWizard { - private c() { - super(); - this.e = (new PathfinderTargetCondition()).a(16.0D).c().e().a().b(); -+ this.a(java.util.EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - summon spell - } - - @Override -@@ -240,6 +261,7 @@ public class EntityEvoker extends EntityIllagerWizard { - - private a() { - super(); -+ this.a(java.util.EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - attack with spell - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityFish.java b/src/main/java/net/minecraft/server/EntityFish.java -index b853fd0d9..b8d786fad 100644 ---- a/src/main/java/net/minecraft/server/EntityFish.java -+++ b/src/main/java/net/minecraft/server/EntityFish.java -@@ -72,9 +72,10 @@ public abstract class EntityFish extends EntityWaterAnimal { - @Override - protected void initPathfinder() { - super.initPathfinder(); -- this.goalSelector.a(0, new PathfinderGoalPanic(this, 1.25D)); -- this.goalSelector.a(2, new PathfinderGoalAvoidTarget<>(this, EntityHuman.class, 8.0F, 1.6D, 1.4D, IEntitySelector.f::test)); // Purpur - decompile error -- this.goalSelector.a(4, new EntityFish.b(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur -+ this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D)); // Purpur -+ this.goalSelector.a(3, new PathfinderGoalAvoidTarget<>(this, EntityHuman.class, 8.0F, 1.6D, 1.4D, IEntitySelector.f::test)); // Purpur - decompile error -+ this.goalSelector.a(5, new EntityFish.b(this)); // Purpur - } - - @Override -@@ -85,7 +86,7 @@ public abstract class EntityFish extends EntityWaterAnimal { - @Override - public void e(Vec3D vec3d) { - if (this.doAITick() && this.isInWater()) { -- this.a(0.01F, vec3d); -+ this.a(hasRider() ? getSpeed() : 0.1F, vec3d); // Purpur - this.move(EnumMoveType.SELF, this.getMot()); - this.setMot(this.getMot().a(0.9D)); - if (this.getGoalTarget() == null) { -@@ -156,7 +157,7 @@ public abstract class EntityFish extends EntityWaterAnimal { - return SoundEffects.ENTITY_FISH_SWIM; - } - -- static class a extends ControllerMove { -+ static class a extends net.pl3x.purpur.controller.ControllerMoveWASDWater { // Purpur - - private final EntityFish i; - -@@ -165,8 +166,16 @@ public abstract class EntityFish extends EntityWaterAnimal { - this.i = entityfish; - } - -+ // Purpur start - @Override -- public void a() { -+ public void tick(EntityHuman rider) { -+ super.tick(rider); -+ this.i.setMot(this.i.getMot().add(0.0D, 0.005D, 0.0D)); -+ } -+ -+ @Override -+ public void tick() { -+ // Purpur end - if (this.i.a(TagsFluid.WATER)) { - this.i.setMot(this.i.getMot().add(0.0D, 0.005D, 0.0D)); - } -diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java -index 82a32d5db..4f53090d3 100644 ---- a/src/main/java/net/minecraft/server/EntityFox.java -+++ b/src/main/java/net/minecraft/server/EntityFox.java -@@ -55,6 +55,23 @@ public class EntityFox extends EntityAnimal { - this.setCanPickupLoot(true); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.foxRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.foxRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.foxRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initDatawatcher() { - super.initDatawatcher(); -@@ -74,6 +91,7 @@ public class EntityFox extends EntityAnimal { - return entityliving instanceof EntityFishSchool; - }); - this.goalSelector.a(0, new EntityFox.g()); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityFox.b()); - this.goalSelector.a(2, new EntityFox.n(2.2D)); - this.goalSelector.a(3, new EntityFox.e(1.0D)); -@@ -96,6 +114,7 @@ public class EntityFox extends EntityAnimal { - this.goalSelector.a(11, new EntityFox.p()); - this.goalSelector.a(12, new EntityFox.j(this, EntityHuman.class, 24.0F)); - this.goalSelector.a(13, new EntityFox.r()); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(3, new EntityFox.a(EntityLiving.class, false, false, (entityliving) -> { - return EntityFox.bB.test(entityliving) && !this.c(entityliving.getUniqueID()); - })); -@@ -376,6 +395,7 @@ public class EntityFox extends EntityAnimal { - return itemstack1.isEmpty() || this.bL > 0 && item.isFood() && !itemstack1.getItem().isFood(); - } - -+ public void spit(ItemStack itemstack) { k(itemstack); } // Purpur - OBFHELPER - private void k(ItemStack itemstack) { - if (!itemstack.isEmpty() && !this.world.isClientSide) { - EntityItem entityitem = new EntityItem(this.world, this.locX() + this.getLookDirection().x, this.locY() + 1.0D, this.locZ() + this.getLookDirection().z, itemstack); -@@ -469,6 +489,7 @@ public class EntityFox extends EntityAnimal { - return this.t(16); - } - -+ public void setChasing(boolean flag) { s(flag); } // Purpur - OBFHELPER - public void s(boolean flag) { - this.d(16, flag); - } -@@ -511,6 +532,7 @@ public class EntityFox extends EntityAnimal { - this.setSleeping(false); - } - -+ public void stopActions() { eH(); } // Purpur - OBFHELPER - private void eH() { - this.u(false); - this.setCrouching(false); -@@ -592,6 +614,29 @@ public class EntityFox extends EntityAnimal { - return deathEvent; // Paper - } - -+ // Purpur start -+ @Override -+ public float getJumpHeight() { -+ return !hasRider() ? super.getJumpHeight() : 0.5F; -+ } -+ -+ @Override -+ public void onMount(EntityHuman entityhuman) { -+ super.onMount(entityhuman); -+ setCanPickupLoot(false); -+ stopActions(); -+ setChasing(false); -+ spit(getEquipment(EnumItemSlot.MAINHAND)); -+ setSlot(EnumItemSlot.MAINHAND, ItemStack.NULL_ITEM); -+ } -+ -+ @Override -+ public void onDismount(EntityHuman entityhuman) { -+ super.onDismount(entityhuman); -+ setCanPickupLoot(true); -+ } -+ // Purpur end -+ - public static boolean a(EntityFox entityfox, EntityLiving entityliving) { - double d0 = entityliving.locZ() - entityfox.locZ(); - double d1 = entityliving.locX() - entityfox.locX(); -@@ -655,16 +700,16 @@ public class EntityFox extends EntityAnimal { - } - } - -- public class k extends ControllerLook { -+ public class k extends net.pl3x.purpur.controller.ControllerLookWASD { // Purpur - - public k() { - super(EntityFox.this); - } - - @Override -- public void a() { -+ public void tick() { // Purpur - if (!EntityFox.this.isSleeping()) { -- super.a(); -+ super.tick(); // Purpur - } - - } -@@ -1335,16 +1380,16 @@ public class EntityFox extends EntityAnimal { - } - } - -- class m extends ControllerMove { -+ class m extends net.pl3x.purpur.controller.ControllerMoveWASD { // Purpur - - public m() { - super(EntityFox.this); - } - - @Override -- public void a() { -+ public void tick() { // Purpur - if (EntityFox.this.eI()) { -- super.a(); -+ super.tick(); // Purpur - } - - } -diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java -index e1c2540d1..46841df71 100644 ---- a/src/main/java/net/minecraft/server/EntityGhast.java -+++ b/src/main/java/net/minecraft/server/EntityGhast.java -@@ -14,11 +14,47 @@ public class EntityGhast extends EntityFlying implements IMonster { - this.moveController = new EntityGhast.ControllerGhast(this); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.ghastRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.ghastRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.ghastRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.ghastMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider() && !onGround) { -+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(5, new EntityGhast.PathfinderGoalGhastIdleMove(this)); - this.goalSelector.a(7, new EntityGhast.PathfinderGoalGhastMoveTowardsTarget(this)); - this.goalSelector.a(7, new EntityGhast.PathfinderGoalGhastAttackTarget(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, (entityliving) -> { - return Math.abs(entityliving.locY() - this.locY()) <= 4.0D; - })); -@@ -60,6 +96,12 @@ public class EntityGhast extends EntityFlying implements IMonster { - super.initAttributes(); - this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(10.0D); - this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(100.0D); -+ // Purpur start -+ if (world != null && world.purpurConfig.ghastRidable) { -+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); -+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); -+ } -+ // Purpur end - } - - @Override -@@ -255,7 +297,7 @@ public class EntityGhast extends EntityFlying implements IMonster { - } - } - -- static class ControllerGhast extends ControllerMove { -+ static class ControllerGhast extends net.pl3x.purpur.controller.ControllerMoveWASDFlying { // Purpur - - private final EntityGhast i; - private int j; -@@ -266,7 +308,7 @@ public class EntityGhast extends EntityFlying implements IMonster { - } - - @Override -- public void a() { -+ public void tick() { // Purpur - if (this.h == ControllerMove.Operation.MOVE_TO) { - if (this.j-- <= 0) { - this.j += this.i.getRandom().nextInt(5) + 2; -diff --git a/src/main/java/net/minecraft/server/EntityGiantZombie.java b/src/main/java/net/minecraft/server/EntityGiantZombie.java -index d9e5eaad1..ff8a41a53 100644 ---- a/src/main/java/net/minecraft/server/EntityGiantZombie.java -+++ b/src/main/java/net/minecraft/server/EntityGiantZombie.java -@@ -4,8 +4,33 @@ public class EntityGiantZombie extends EntityMonster { - - public EntityGiantZombie(EntityTypes entitytypes, World world) { - super(entitytypes, world); -+ setStepHeight(world.purpurConfig.giantStepHeight); // Purpur - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.giantRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.giantRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.giantRequireShiftToMount; -+ } -+ -+ @Override -+ public float getJumpHeight() { -+ // make giants jump as high as everything else relative to their size -+ // 1.0 makes bottom of feet about as high as their waist when they jump -+ return world.purpurConfig.giantJumpHeight; -+ } -+ // Purpur end -+ - @Override - protected float b(EntityPose entitypose, EntitySize entitysize) { - return 10.440001F; -diff --git a/src/main/java/net/minecraft/server/EntityGuardian.java b/src/main/java/net/minecraft/server/EntityGuardian.java -index e69cb334f..97040872b 100644 ---- a/src/main/java/net/minecraft/server/EntityGuardian.java -+++ b/src/main/java/net/minecraft/server/EntityGuardian.java -@@ -24,15 +24,39 @@ public class EntityGuardian extends EntityMonster { - this.f = 10; - this.a(PathType.WATER, 0.0F); - this.moveController = new EntityGuardian.ControllerMoveGuardian(this); -- this.c = this.random.nextFloat(); -- this.d = this.c; -+ // Purpur start -+ this.lookController = new net.pl3x.purpur.controller.ControllerLookWASD(this) { -+ @Override -+ public void setYawPitch(float yaw, float pitch) { -+ super.setYawPitch(yaw, pitch * 0.35F); -+ } -+ }; -+ // Purpur end -+ } -+ -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.guardianRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.guardianRidableInWater; - } - -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.guardianRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - PathfinderGoalMoveTowardsRestriction pathfindergoalmovetowardsrestriction = new PathfinderGoalMoveTowardsRestriction(this, 1.0D); - - this.goalRandomStroll = new PathfinderGoalRandomStroll(this, 1.0D, 80); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(4, new EntityGuardian.PathfinderGoalGuardianAttack(this)); - this.goalSelector.a(5, pathfindergoalmovetowardsrestriction); - this.goalSelector.a(7, this.goalRandomStroll); -@@ -41,6 +65,7 @@ public class EntityGuardian extends EntityMonster { - this.goalSelector.a(9, new PathfinderGoalRandomLookaround(this)); - this.goalRandomStroll.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK)); - pathfindergoalmovetowardsrestriction.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityLiving.class, 10, true, false, new EntityGuardian.EntitySelectorGuardianTargetHumanSquid(this))); - } - -@@ -79,6 +104,7 @@ public class EntityGuardian extends EntityMonster { - return (Boolean) this.datawatcher.get(EntityGuardian.b); - } - -+ private void setMovingFlag(boolean movingFlag) { r(movingFlag); } // Purpur - OBFHELPER - private void r(boolean flag) { - this.datawatcher.set(EntityGuardian.b, flag); - } -@@ -293,7 +319,7 @@ public class EntityGuardian extends EntityMonster { - @Override - public void e(Vec3D vec3d) { - if (this.doAITick() && this.isInWater()) { -- this.a(0.1F, vec3d); -+ this.a(hasRider() ? getSpeed(): 0.1F, vec3d); // Purpur - this.move(EnumMoveType.SELF, this.getMot()); - this.setMot(this.getMot().a(0.9D)); - if (!this.es() && this.getGoalTarget() == null) { -@@ -305,17 +331,26 @@ public class EntityGuardian extends EntityMonster { - - } - -- static class ControllerMoveGuardian extends ControllerMove { -+ static class ControllerMoveGuardian extends net.pl3x.purpur.controller.ControllerMoveWASDWater { // Purpur - -- private final EntityGuardian i; -+ private final EntityGuardian i; private EntityGuardian getGuardian() { return i; } // Purpur - OBFHELPER) - - public ControllerMoveGuardian(EntityGuardian entityguardian) { - super(entityguardian); - this.i = entityguardian; - } - -+ // Purpur start -+ @Override -+ public void tick(EntityHuman rider) { -+ super.tick(rider); -+ getGuardian().setMot(getGuardian().getMot().add(0.0D, 0.005D, 0.0D)); -+ getGuardian().setMovingFlag(getGuardian().getForward() > 0.0F); // control tail speed -+ } -+ - @Override -- public void a() { -+ public void tick() { -+ // Purpur end - if (this.h == ControllerMove.Operation.MOVE_TO && !this.i.getNavigation().m()) { - Vec3D vec3d = new Vec3D(this.b - this.i.locX(), this.c - this.i.locY(), this.d - this.i.locZ()); - double d0 = vec3d.f(); -diff --git a/src/main/java/net/minecraft/server/EntityGuardianElder.java b/src/main/java/net/minecraft/server/EntityGuardianElder.java -index 7484bfeea..f231340d9 100644 ---- a/src/main/java/net/minecraft/server/EntityGuardianElder.java -+++ b/src/main/java/net/minecraft/server/EntityGuardianElder.java -@@ -16,6 +16,23 @@ public class EntityGuardianElder extends EntityGuardian { - - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.elderGuardianRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.elderGuardianRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.elderGuardianRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - public void initAttributes() { - super.initAttributes(); -diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index a6fb4ba5b..98b1e9375 100644 ---- a/src/main/java/net/minecraft/server/EntityHorse.java -+++ b/src/main/java/net/minecraft/server/EntityHorse.java -@@ -19,6 +19,13 @@ public class EntityHorse extends EntityHorseAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.horseRidableInWater; -+ } -+ // Purpur end -+ - @Override - protected void initDatawatcher() { - super.initDatawatcher(); -diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index c56efe035..f31cb0554 100644 ---- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java -+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -@@ -38,12 +38,32 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven - - protected EntityHorseAbstract(EntityTypes entitytypes, World world) { - super(entitytypes, world); -+ this.moveController = new ControllerMove(this); // Purpur - use vanilla controller -+ this.lookController = new ControllerLook(this); // Purpur - use vanilla controller - this.H = 1.0F; - this.loadChest(); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return false; // vanilla handles -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return false; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return false; // vanilla handles -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHorseHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.2D)); - this.goalSelector.a(1, new PathfinderGoalTame(this, 1.2D)); - this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D, EntityHorseAbstract.class)); -@@ -281,7 +301,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven - return true; - } - -- public boolean eL() { -+ public boolean eL() { return isSaddled(); } public boolean isSaddled() { // Purpur - OBFHELPER - return this.t(4); - } - -diff --git a/src/main/java/net/minecraft/server/EntityHorseDonkey.java b/src/main/java/net/minecraft/server/EntityHorseDonkey.java -index 9a52decdc..64d80081f 100644 ---- a/src/main/java/net/minecraft/server/EntityHorseDonkey.java -+++ b/src/main/java/net/minecraft/server/EntityHorseDonkey.java -@@ -6,6 +6,13 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.donkeyRidableInWater; -+ } -+ // Purpur end -+ - @Override - protected SoundEffect getSoundAmbient() { - super.getSoundAmbient(); -diff --git a/src/main/java/net/minecraft/server/EntityHorseMule.java b/src/main/java/net/minecraft/server/EntityHorseMule.java -index 4dd4d91eb..a9f26efe6 100644 ---- a/src/main/java/net/minecraft/server/EntityHorseMule.java -+++ b/src/main/java/net/minecraft/server/EntityHorseMule.java -@@ -6,6 +6,13 @@ public class EntityHorseMule extends EntityHorseChestedAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.muleRidableInWater; -+ } -+ // Purpur end -+ - @Override - protected SoundEffect getSoundAmbient() { - super.getSoundAmbient(); -diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index 290cb9337..7bf76e5a0 100644 ---- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -+++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -@@ -12,6 +12,18 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.skeletonHorseRidableInWater; -+ } -+ -+ @Override -+ public boolean isTamed() { -+ return true; -+ } -+ // Purpur end -+ - @Override - protected void initAttributes() { - super.initAttributes(); -@@ -21,7 +33,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { - } - - @Override -- protected void ez() {} -+ protected void ez() { if (world.purpurConfig.skeletonHorseCanSwim) goalSelector.a(0, new PathfinderGoalFloat(this)); } // Purpur - - @Override - protected SoundEffect getSoundAmbient() { -@@ -116,7 +128,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { - - @Override - public boolean bi() { -- return true; -+ return super.bi(); // Purpur - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityHorseZombie.java b/src/main/java/net/minecraft/server/EntityHorseZombie.java -index 5782a25ec..c87fc523f 100644 ---- a/src/main/java/net/minecraft/server/EntityHorseZombie.java -+++ b/src/main/java/net/minecraft/server/EntityHorseZombie.java -@@ -8,6 +8,18 @@ public class EntityHorseZombie extends EntityHorseAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.zombieHorseRidableInWater; -+ } -+ -+ @Override -+ public boolean isTamed() { -+ return true; -+ } -+ // Purpur end -+ - @Override - protected void initAttributes() { - super.initAttributes(); -@@ -78,5 +90,5 @@ public class EntityHorseZombie extends EntityHorseAbstract { - } - - @Override -- protected void ez() {} -+ protected void ez() { if (world.purpurConfig.zombieHorseCanSwim) goalSelector.a(0, new PathfinderGoalFloat(this)); } // Purpur - } -diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 7df24be46..27cfc6654 100644 ---- a/src/main/java/net/minecraft/server/EntityHuman.java -+++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -374,9 +374,21 @@ public abstract class EntityHuman extends EntityLiving { - this.activeContainer = this.defaultContainer; - } - -+ // Purpur start -+ boolean mounting = false; -+ -+ @Override -+ public void setSneaking(boolean sneaking) { -+ if (this.mounting && !sneaking) { -+ this.mounting = false; -+ } -+ super.setSneaking(sneaking); -+ } -+ // Purpur end -+ - @Override - public void passengerTick() { -- if (!this.world.isClientSide && this.dU() && this.isPassenger()) { -+ if (this.isSneaking() && this.isPassenger() && !this.mounting) { // Purpur - this.stopRiding(); - this.setSneaking(false); - } else { -diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -index 81b7cd06f..3e6722cfc 100644 ---- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -+++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -@@ -19,10 +19,28 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan - - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.illusionerRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.illusionerRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.illusionerRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityIllagerWizard.b()); - this.goalSelector.a(4, new EntityIllagerIllusioner.b()); - this.goalSelector.a(5, new EntityIllagerIllusioner.a()); -@@ -30,6 +48,7 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan - this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D)); - this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // CraftBukkit - decompile error - this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300)); - this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300)); -diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 5aca7a913..cbbbc875b 100644 ---- a/src/main/java/net/minecraft/server/EntityInsentient.java -+++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -28,7 +28,7 @@ public abstract class EntityInsentient extends EntityLiving { - protected int f; - protected ControllerLook lookController; - protected ControllerMove moveController; -- protected ControllerJump bq; -+ protected ControllerJump bq; public ControllerJump getJumpController() { return bq; } // Purpur - OBFHELPER - private final EntityAIBodyControl c; - protected NavigationAbstract navigation; - public PathfinderGoalSelector goalSelector; -@@ -66,8 +66,8 @@ public abstract class EntityInsentient extends EntityLiving { - this.bI = -1.0F; - this.goalSelector = new PathfinderGoalSelector(world != null && world.getMethodProfiler() != null ? world.getMethodProfiler() : null); - this.targetSelector = new PathfinderGoalSelector(world != null && world.getMethodProfiler() != null ? world.getMethodProfiler() : null); -- this.lookController = new ControllerLook(this); -- this.moveController = new ControllerMove(this); -+ this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASD(this); // Purpur -+ this.lookController = new net.pl3x.purpur.controller.ControllerLookWASD(this); // Purpur - this.bq = new ControllerJump(this); - this.c = this.o(); - this.navigation = this.b(world); -@@ -502,7 +502,7 @@ public abstract class EntityInsentient extends EntityLiving { - return super.cW(); - } - -- public void r(float f) { -+ public void setForwardSpeed(float speed) { this.r(speed); } public void r(float f) { // Purpur - OBFHELPER - this.bb = f; - } - -@@ -514,8 +514,7 @@ public abstract class EntityInsentient extends EntityLiving { - this.aZ = f; - } - -- @Override -- public void o(float f) { -+ public void setSpeed(float speed) { o(speed); } @Override public void o(float f) { // Purpur - OBFHELPER - super.o(f); - this.r(f); - } -@@ -1082,7 +1081,7 @@ public abstract class EntityInsentient extends EntityLiving { - } - - protected boolean a(EntityHuman entityhuman, EnumHand enumhand) { -- return false; -+ return tryRide(entityhuman, enumhand); // Purpur - } - - public boolean ec() { -@@ -1381,4 +1380,39 @@ public abstract class EntityInsentient extends EntityLiving { - public boolean a(Item item) { - return this.getItemInMainHand().getItem() == item || this.getItemInOffHand().getItem() == item; - } -+ -+ // Purpur start -+ public double getMaxY() { -+ return world.getHeight(); -+ } -+ -+ public boolean tryRide(EntityHuman entityhuman, EnumHand enumhand) { -+ if (!isRidable()) { -+ return false; -+ } -+ if (enumhand != EnumHand.MAIN_HAND) { -+ return false; -+ } -+ if (requireShiftToMount() && !entityhuman.isSneaking()) { -+ return false; -+ } -+ if (!passengers.isEmpty() || entityhuman.isPassenger()) { -+ return false; -+ } -+ if (this instanceof EntityTameableAnimal) { -+ EntityTameableAnimal tameable = (EntityTameableAnimal) this; -+ if (tameable.isTamed() && !tameable.isOwner(entityhuman)) { -+ return false; -+ } -+ } -+ if (!entityhuman.getBukkitEntity().hasPermission("allow.ride." + getEntityType().getName())) { -+ entityhuman.sendMessage(LocaleLanguage.translate("cannot.ride.mob")); -+ return false; -+ } -+ entityhuman.mounting = true; -+ entityhuman.yaw = this.yaw; -+ entityhuman.pitch = this.pitch; -+ return entityhuman.startRiding(this) || (entityhuman.mounting = false); -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java -index 7f6a56776..288a043fb 100644 ---- a/src/main/java/net/minecraft/server/EntityIronGolem.java -+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java -@@ -17,8 +17,26 @@ public class EntityIronGolem extends EntityGolem { - this.H = 1.0F; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.ironGolemRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.ironGolemRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.ironGolemRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, true)); - this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F)); - this.goalSelector.a(2, new PathfinderGoalStrollVillage(this, 0.6D)); -@@ -29,6 +47,7 @@ public class EntityIronGolem extends EntityGolem { - this.goalSelector.a(6, new PathfinderGoalRandomStrollLand(this, 0.6D)); - this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalDefendVillage(this)); - this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, new Class[0])); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 5, false, false, (entityliving) -> { -@@ -170,13 +189,13 @@ public class EntityIronGolem extends EntityGolem { - Item item = itemstack.getItem(); - - if (item != Items.IRON_INGOT) { -- return false; -+ return super.a(entityhuman, enumhand); // Purpur - } else { - float f = this.getHealth(); - - this.heal(25.0F); - if (this.getHealth() == f) { -- return false; -+ return super.a(entityhuman, enumhand); // Purpur - } else { - float f1 = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F; - -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a245cfab6..14dc1318a 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -75,7 +75,7 @@ public abstract class EntityLiving extends Entity { - public int maxNoDamageTicks; - public final float aG; - public final float aH; -- public float aI; -+ public float aI; public float getBodyRotation() { return aI; } // Purpur - OBFHELPER - public float aJ; - public float aK; - public float aL; -@@ -92,9 +92,9 @@ public abstract class EntityLiving extends Entity { - protected int aW; protected int getKillCount() { return this.aW; } // Paper - OBFHELPER - public float lastDamage; - public boolean jumping; // Paper -- public float aZ; -- public float ba; -- public float bb; -+ public float aZ; public float getStrafe() { return aZ; } public void setStrafe(float strafe) { aZ = strafe; } // Purpur - OBFHELPER -+ public float ba; public float getVertical() { return ba; } public void setVertical(float vertical) { ba = vertical; } // Purpur - OBFHELPER -+ public float bb; public float getForward() { return bb; } public void setForward(float forward) { bb = forward; } // Purpur - OBFHELPER - protected int bc; - protected double bd; - protected double be; -@@ -366,7 +366,7 @@ public abstract class EntityLiving extends Entity { - - @Override - public boolean bi() { -- return false; -+ return isRidableInWater(); // Purpur - } - - protected void cD() { -@@ -2098,12 +2098,12 @@ public abstract class EntityLiving extends Entity { - } - } - -- protected float dp() { -+ protected float dp() { return getJumpHeight(); } public float getJumpHeight() { // Purpur - OBFHELPER - return 0.42F * this.ah(); - } - -- protected void jump() { -- float f = this.dp(); -+ public void doJump() { jump(); } protected void jump() { // Purpur -+ float f = getJumpHeight(); // Purpur - - if (this.hasEffect(MobEffects.JUMP)) { - f += 0.1F * (float) (this.getEffect(MobEffects.JUMP).getAmplifier() + 1); -@@ -2111,6 +2111,7 @@ public abstract class EntityLiving extends Entity { - - Vec3D vec3d = this.getMot(); - -+ if (hasRider()) setMot(vec3d.x * 2D, (double) f, vec3d.z * 2D); else // Purpur - add small boost to velocity when jumping while being ridden - this.setMot(vec3d.x, (double) f, vec3d.z); - if (this.isSprinting()) { - float f1 = this.yaw * 0.017453292F; -@@ -2329,11 +2330,11 @@ public abstract class EntityLiving extends Entity { - return this.onGround ? this.dt() * (0.21600002F / (f * f * f)) : this.aM; - } - -- public float dt() { -+ public float getSpeed() { return dt(); } public float dt() { // Purpur - OBFHELPER - return this.bB; - } - -- public void o(float f) { -+ public void setSpeed(float speed) { o(speed); } public void o(float f) { // Purpur - OBFHELPER - this.bB = f; - } - -diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 193dbfc5f..c5f87cbdd 100644 ---- a/src/main/java/net/minecraft/server/EntityLlama.java -+++ b/src/main/java/net/minecraft/server/EntityLlama.java -@@ -16,7 +16,46 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn - - public EntityLlama(EntityTypes entitytypes, World world) { - super(entitytypes, world); -+ // Purpur start -+ this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASD(this) { -+ @Override -+ public void a() { // tick -+ if (entity.hasRider() && isSaddled()) { -+ tick(entity.getRider()); -+ } else { -+ tick(); -+ } -+ } -+ }; -+ this.lookController = new net.pl3x.purpur.controller.ControllerLookWASD(this) { -+ @Override -+ public void a() { // tick -+ if (entity.hasRider() && isSaddled()) { -+ tick(entity.getRider()); -+ } else { -+ tick(); -+ } -+ } -+ }; -+ // Purpur end -+ } -+ -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.llamaRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.llamaRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return false; // shift reserved for opening inventory - } -+ // Purpur end - - public void setStrength(int i) { - this.datawatcher.set(EntityLlama.bF, Math.max(1, Math.min(5, i))); -@@ -58,6 +97,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHorseHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalTame(this, 1.2D)); - this.goalSelector.a(2, new PathfinderGoalLlamaFollow(this, 2.0999999046325684D)); - this.goalSelector.a(3, new PathfinderGoalArrowAttack(this, 1.25D, 40, 20.0F)); -@@ -67,6 +107,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn - this.goalSelector.a(6, new PathfinderGoalRandomStrollLand(this, 0.7D)); - this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHorseHasRider(this)); // Purpur - this.targetSelector.a(1, new EntityLlama.c(this)); - this.targetSelector.a(2, new EntityLlama.a(this)); - } -@@ -253,6 +294,13 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn - return false; - } - -+ // Purpur start -+ @Override -+ public boolean isSaddled() { -+ return isTamed() && getColor() != null; -+ } -+ // Purpur end -+ - @Override - public void a(IInventory iinventory) { - EnumColor enumcolor = this.eZ(); -@@ -286,7 +334,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn - } - - @Nullable -- public EnumColor eZ() { -+ public EnumColor eZ() { return getColor(); } public EnumColor getColor() { // Purpur - OBFHELPER - int i = (Integer) this.datawatcher.get(EntityLlama.bG); - - return i == -1 ? null : EnumColor.fromColorIndex(i); -diff --git a/src/main/java/net/minecraft/server/EntityLlamaTrader.java b/src/main/java/net/minecraft/server/EntityLlamaTrader.java -index 4cebd67e8..08c4ca3f3 100644 ---- a/src/main/java/net/minecraft/server/EntityLlamaTrader.java -+++ b/src/main/java/net/minecraft/server/EntityLlamaTrader.java -@@ -11,6 +11,23 @@ public class EntityLlamaTrader extends EntityLlama { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.llamaTraderRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.llamaTraderRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return false; // shift reserved for opening inventory -+ } -+ // Purpur end -+ - @Override - protected EntityLlama fa() { - return (EntityLlama) EntityTypes.TRADER_LLAMA.a(this.world); -@@ -79,6 +96,12 @@ public class EntityLlamaTrader extends EntityLlama { - return this.isLeashed() && !this.fh(); - } - -+ // Purpur start -+ public boolean isSaddled() { -+ return isTamed(); -+ } -+ // Purpur end -+ - @Nullable - @Override - public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) { -diff --git a/src/main/java/net/minecraft/server/EntityMagmaCube.java b/src/main/java/net/minecraft/server/EntityMagmaCube.java -index 1fdc248ba..a5a36af21 100644 ---- a/src/main/java/net/minecraft/server/EntityMagmaCube.java -+++ b/src/main/java/net/minecraft/server/EntityMagmaCube.java -@@ -8,6 +8,23 @@ public class EntityMagmaCube extends EntitySlime { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.magmaCubeRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.magmaCubeRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.magmaCubeRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initAttributes() { - super.initAttributes(); -diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java -index 8b199971b..53bc31287 100644 ---- a/src/main/java/net/minecraft/server/EntityMushroomCow.java -+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java -@@ -19,6 +19,23 @@ public class EntityMushroomCow extends EntityCow { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.mooshroomRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.mooshroomRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.mooshroomRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - public float a(BlockPosition blockposition, IWorldReader iworldreader) { - return iworldreader.getType(blockposition.down()).getBlock() == Blocks.MYCELIUM ? 10.0F : iworldreader.w(blockposition) - 0.5F; -diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java -index d9a7b8ac1..8fdf34857 100644 ---- a/src/main/java/net/minecraft/server/EntityOcelot.java -+++ b/src/main/java/net/minecraft/server/EntityOcelot.java -@@ -16,6 +16,23 @@ public class EntityOcelot extends EntityAnimal { - this.eq(); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.ocelotRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.ocelotRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.ocelotRequireShiftToMount; -+ } -+ // Purpur end -+ - private boolean isTrusting() { - return (Boolean) this.datawatcher.get(EntityOcelot.bx); - } -@@ -47,12 +64,14 @@ public class EntityOcelot extends EntityAnimal { - protected void initPathfinder() { - this.bz = new EntityOcelot.b(this, 0.6D, EntityOcelot.bw, true); - this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(1, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(3, this.bz); - this.goalSelector.a(7, new PathfinderGoalLeapAtTarget(this, 0.3F)); - this.goalSelector.a(8, new PathfinderGoalOcelotAttack(this)); - this.goalSelector.a(9, new PathfinderGoalBreed(this, 0.8D)); - this.goalSelector.a(10, new PathfinderGoalRandomStrollLand(this, 0.8D, 1.0000001E-5F)); - this.goalSelector.a(11, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityChicken.class, false)); - this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, false, false, EntityTurtle.bw)); - } -diff --git a/src/main/java/net/minecraft/server/EntityPanda.java b/src/main/java/net/minecraft/server/EntityPanda.java -index f50ed1908..87ed9a8ca 100644 ---- a/src/main/java/net/minecraft/server/EntityPanda.java -+++ b/src/main/java/net/minecraft/server/EntityPanda.java -@@ -46,6 +46,23 @@ public class EntityPanda extends EntityAnimal { - - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.pandaRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.pandaRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.pandaRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - public boolean e(ItemStack itemstack) { - EnumItemSlot enumitemslot = EntityInsentient.h(itemstack); -@@ -69,6 +86,7 @@ public class EntityPanda extends EntityAnimal { - return this.w(8); - } - -+ public void setScared(boolean scared) { this.r(scared); } // Purpur - OBFHELPER - public void r(boolean flag) { - this.d(8, flag); - } -@@ -77,6 +95,7 @@ public class EntityPanda extends EntityAnimal { - return this.w(16); - } - -+ public void setLayingOnBack(boolean layingOnBack) { this.s(layingOnBack); } // Purpur - OBFHELPER - public void s(boolean flag) { - this.d(16, flag); - } -@@ -85,6 +104,7 @@ public class EntityPanda extends EntityAnimal { - return (Integer) this.datawatcher.get(EntityPanda.bz) > 0; - } - -+ public void setEating(boolean eating) { this.t(eating); } // Purpur - OBFHELPER - public void t(boolean flag) { - this.datawatcher.set(EntityPanda.bz, flag ? 1 : 0); - } -@@ -201,6 +221,7 @@ public class EntityPanda extends EntityAnimal { - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(2, new EntityPanda.i(this, 2.0D)); - this.goalSelector.a(2, new EntityPanda.d(this, 1.0D)); - this.goalSelector.a(3, new EntityPanda.b(this, 1.2000000476837158D, true)); -@@ -216,6 +237,7 @@ public class EntityPanda extends EntityAnimal { - this.goalSelector.a(12, new EntityPanda.j(this)); - this.goalSelector.a(13, new PathfinderGoalFollowParent(this, 1.25D)); - this.goalSelector.a(14, new PathfinderGoalRandomStrollLand(this, 1.0D)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new EntityPanda.e(this, new Class[0])).a(new Class[0])); - } - -@@ -541,7 +563,7 @@ public class EntityPanda extends EntityAnimal { - if (itemstack.getItem() instanceof ItemMonsterEgg) { - return super.a(entityhuman, enumhand); - } else if (this.eJ()) { -- return false; -+ return tryRide(entityhuman, enumhand); // Purpur; - } else if (this.et()) { - this.s(false); - return true; -@@ -558,7 +580,7 @@ public class EntityPanda extends EntityAnimal { - this.f(entityhuman); - } else { - if (this.world.isClientSide || this.es() || this.isInWater()) { -- return false; -+ return tryRide(entityhuman, enumhand); // Purpur; - } - - this.eX(); -@@ -576,10 +598,21 @@ public class EntityPanda extends EntityAnimal { - entityhuman.a(enumhand, true); - return true; - } else { -- return false; -+ return tryRide(entityhuman, enumhand); // Purpur - } - } - -+ // Purpur start -+ @Override -+ public void onMount(EntityHuman entityhuman) { -+ super.onMount(entityhuman); -+ this.setForwardSpeed(0.0F); -+ this.setScared(false); -+ this.setEating(false); -+ this.setLayingOnBack(false); -+ } -+ // Purpur end -+ - @Nullable - @Override - protected SoundEffect getSoundAmbient() { -@@ -689,6 +722,7 @@ public class EntityPanda extends EntityAnimal { - - public f(EntityPanda entitypanda) { - this.a = entitypanda; -+ this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); // Purpur - lay on back - } - - @Override -@@ -852,6 +886,7 @@ public class EntityPanda extends EntityAnimal { - - public l(EntityPanda entitypanda) { - this.a = entitypanda; -+ this.a(EnumSet.of(PathfinderGoal.Type.MOVE)); // Purpur - sneeze - } - - @Override -@@ -981,7 +1016,7 @@ public class EntityPanda extends EntityAnimal { - } - } - -- static class h extends ControllerMove { -+ static class h extends net.pl3x.purpur.controller.ControllerMoveWASD { // Purpur - - private final EntityPanda i; - -@@ -991,9 +1026,9 @@ public class EntityPanda extends EntityAnimal { - } - - @Override -- public void a() { -+ public void tick() { // Purpur - if (this.i.eL()) { -- super.a(); -+ super.tick(); // Purpur - } - } - } -diff --git a/src/main/java/net/minecraft/server/EntityParrot.java b/src/main/java/net/minecraft/server/EntityParrot.java -index 94e57a2d8..7ba2f3a35 100644 ---- a/src/main/java/net/minecraft/server/EntityParrot.java -+++ b/src/main/java/net/minecraft/server/EntityParrot.java -@@ -62,12 +62,83 @@ public class EntityParrot extends EntityPerchable implements EntityBird { - - public EntityParrot(EntityTypes entitytypes, World world) { - super(entitytypes, world); -- this.moveController = new ControllerMoveFlying(this, 10, false); -+ // Purpur start -+ this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASDFlyingWithSpacebar(this, 0.3F) { -+ @Override -+ protected void tick() { -+ // flying controller (from ControllerMoveFlying) -+ if (this.h == Operation.MOVE_TO) { -+ this.h = Operation.WAIT; -+ this.a.setNoGravity(true); -+ double var0 = this.b - this.a.locX(); -+ double var2 = this.c - this.a.locY(); -+ double var4 = this.d - this.a.locZ(); -+ double var6 = var0 * var0 + var2 * var2 + var4 * var4; -+ if (var6 < 2.500000277905201E-7D) { -+ this.a.s(0.0F); -+ this.a.r(0.0F); -+ return; -+ } -+ float var8 = (float)(MathHelper.d(var4, var0) * 57.2957763671875D) - 90.0F; -+ this.a.yaw = this.a(this.a.yaw, var8, 90.0F); -+ float var9; -+ if (this.a.onGround) { -+ var9 = (float)(this.e * this.a.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue()); -+ } else { -+ var9 = (float)(this.e * this.a.getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue()); -+ } -+ this.a.o(var9); -+ double var10 = (double)MathHelper.sqrt(var0 * var0 + var4 * var4); -+ float var12 = (float)(-(MathHelper.d(var2, var10) * 57.2957763671875D)); -+ this.a.pitch = this.a(this.a.pitch, var12, 10); -+ this.a.s(var2 > 0.0D ? var9 : -var9); -+ } else { -+ this.a.setNoGravity(false); -+ this.a.s(0.0F); -+ this.a.r(0.0F); -+ } -+ } -+ }; -+ // Purpur end - this.a(PathType.DANGER_FIRE, -1.0F); - this.a(PathType.DAMAGE_FIRE, -1.0F); - this.a(PathType.COCOA, -1.0F); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.parrotRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.parrotRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.parrotRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.parrotMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider() && !onGround) { -+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ // Purpur end -+ - @Nullable - @Override - public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) { -@@ -83,8 +154,10 @@ public class EntityParrot extends EntityPerchable implements EntityBird { - @Override - protected void initPathfinder() { - this.goalSit = new PathfinderGoalSit(this); -- this.goalSelector.a(0, new PathfinderGoalPanic(this, 1.25D)); -+ // this.goalSelector.a(0, new PathfinderGoalPanic(this, 1.25D)); // Purpur - move down - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur -+ this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D)); // Purpur - this.goalSelector.a(1, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(2, this.goalSit); - this.goalSelector.a(2, new PathfinderGoalFollowOwner(this, 1.0D, 5.0F, 1.0F, true)); -diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 96b4912c4..777bc95ee 100644 ---- a/src/main/java/net/minecraft/server/EntityPhantom.java -+++ b/src/main/java/net/minecraft/server/EntityPhantom.java -@@ -22,6 +22,40 @@ public class EntityPhantom extends EntityFlying implements IMonster { - this.lookController = new EntityPhantom.f(this); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.phantomRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.phantomRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.phantomRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.phantomMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider() && !onGround) { -+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, speed, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ // Purpur end -+ - @Override - protected EntityAIBodyControl o() { - return new EntityPhantom.d(this); -@@ -29,9 +63,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { - - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityPhantom.c()); - this.goalSelector.a(2, new EntityPhantom.i()); - this.goalSelector.a(3, new EntityPhantom.e()); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new EntityPhantom.b()); - } - -@@ -39,6 +75,12 @@ public class EntityPhantom extends EntityFlying implements IMonster { - protected void initAttributes() { - super.initAttributes(); - this.getAttributeMap().b(GenericAttributes.ATTACK_DAMAGE); -+ // Purpur start -+ if (world != null && world.purpurConfig.phantomRidable) { -+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); -+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(3.0D); -+ } -+ // Purpur end - } - - @Override -@@ -103,7 +145,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { - - @Override - public void movementTick() { -- if (this.isAlive() && this.en()) { -+ if (this.isAlive() && !hasRider() && this.isInDaylight()) { // Purpur - do not burn from daylight if has rider - this.setOnFire(8); - } - -@@ -115,6 +157,27 @@ public class EntityPhantom extends EntityFlying implements IMonster { - super.mobTick(); - } - -+ // Purpur start -+ @Override -+ public boolean onSpacebar() { -+ if (hasRider() && getRider().getBukkitEntity().hasPermission("allow.special.phantom")) { -+ shoot(); -+ } -+ return false; -+ } -+ -+ public boolean shoot() { -+ org.bukkit.Location loc = ((org.bukkit.entity.LivingEntity) getBukkitEntity()).getEyeLocation(); -+ loc.setPitch(-loc.getPitch()); -+ org.bukkit.util.Vector target = loc.getDirection().normalize().multiply(100).add(loc.toVector()); -+ -+ net.pl3x.purpur.entity.PhantomFlames flames = new net.pl3x.purpur.entity.PhantomFlames(world, this); -+ flames.shoot(target.getX() - locX(), target.getY() - locY(), target.getZ() - locZ(), 1.0F, 5.0F); -+ world.addEntity(flames); -+ return true; -+ } -+ // Purpur end -+ - @Override - public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) { - this.d = (new BlockPosition(this)).up(5); -@@ -215,6 +278,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { - - @Override - public boolean a() { -+ if (getRider() != null) return false; // Purpur - pathfinder does not have a flag - if (this.c > 0) { - --this.c; - return false; -@@ -245,6 +309,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { - - @Override - public boolean b() { -+ if (getRider() != null) return false; // Purpur - pathfinder does not have a flag - EntityLiving entityliving = EntityPhantom.this.getGoalTarget(); - - return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false; -@@ -259,6 +324,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { - - @Override - public boolean a() { -+ if (getRider() != null) return false; // Purpur - pathfinder does not have a flag - EntityLiving entityliving = EntityPhantom.this.getGoalTarget(); - - return entityliving != null ? EntityPhantom.this.a(EntityPhantom.this.getGoalTarget(), PathfinderTargetCondition.a) : false; -@@ -448,14 +514,23 @@ public class EntityPhantom extends EntityFlying implements IMonster { - } - } - -- class f extends ControllerLook { -+ class f extends net.pl3x.purpur.controller.ControllerLookWASD { // Purpur - - public f(EntityInsentient entityinsentient) { - super(entityinsentient); - } - - @Override -- public void a() {} -+ // Purpur start -+ public void tick(EntityHuman rider) { -+ setYawPitch(rider.yaw, -rider.pitch * 0.75F); -+ } -+ -+ @Override -+ public void tick() { -+ // do nothing -+ } -+ // Purpur end - } - - class d extends EntityAIBodyControl { -@@ -471,7 +546,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { - } - } - -- class g extends ControllerMove { -+ class g extends net.pl3x.purpur.controller.ControllerMoveWASDFlying { // Purpur - - private float j = 0.1F; - -@@ -480,7 +555,19 @@ public class EntityPhantom extends EntityFlying implements IMonster { - } - - @Override -- public void a() { -+ // Purpur start -+ public void tick(EntityHuman rider) { -+ if (!EntityPhantom.this.onGround) { -+ // phantom is always in motion when flying -+ // TODO - FIX THIS -+ // rider.setForward(1.0F); -+ } -+ super.tick(rider); -+ } -+ -+ @Override -+ public void tick() { -+ // Purpur end - if (EntityPhantom.this.positionChanged) { - EntityPhantom.this.yaw += 180.0F; - this.j = 0.1F; -diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index 8d277566e..e6a7f8ef3 100644 ---- a/src/main/java/net/minecraft/server/EntityPig.java -+++ b/src/main/java/net/minecraft/server/EntityPig.java -@@ -19,9 +19,27 @@ public class EntityPig extends EntityAnimal { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.pigRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.pigRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return false; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D)); - this.goalSelector.a(3, new PathfinderGoalBreed(this, 1.0D)); - this.goalSelector.a(4, new PathfinderGoalTempt(this, 1.2D, RecipeItemStack.a(Items.CARROT_ON_A_STICK), false)); -@@ -110,24 +128,22 @@ public class EntityPig extends EntityAnimal { - - @Override - public boolean a(EntityHuman entityhuman, EnumHand enumhand) { -- if (super.a(entityhuman, enumhand)) { -+ // Purpur start - reorder logic so super is last (so tryRide is last) -+ ItemStack itemstack = entityhuman.b(enumhand); -+ if (itemstack.getItem() == Items.NAME_TAG) { -+ itemstack.a(entityhuman, this, enumhand); -+ return true; -+ } -+ if (hasSaddle() && !isVehicle()) { -+ entityhuman.startRiding(this); -+ return true; -+ } -+ if (itemstack.getItem() == Items.SADDLE) { -+ itemstack.a(entityhuman, this, enumhand); - return true; -- } else { -- ItemStack itemstack = entityhuman.b(enumhand); -- -- if (itemstack.getItem() == Items.NAME_TAG) { -- itemstack.a(entityhuman, (EntityLiving) this, enumhand); -- return true; -- } else if (this.hasSaddle() && !this.isVehicle()) { -- if (!this.world.isClientSide) { -- entityhuman.startRiding(this); -- } -- -- return true; -- } else { -- return itemstack.getItem() == Items.SADDLE && itemstack.a(entityhuman, (EntityLiving) this, enumhand); -- } - } -+ return super.a(entityhuman, enumhand); -+ // Purpur end - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java -index 9dd028b55..fb9ef88ea 100644 ---- a/src/main/java/net/minecraft/server/EntityPigZombie.java -+++ b/src/main/java/net/minecraft/server/EntityPigZombie.java -@@ -17,6 +17,23 @@ public class EntityPigZombie extends EntityZombie { - this.a(PathType.LAVA, 8.0F); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.zombiePigmanRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.zombiePigmanRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.zombiePigmanRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - public void setLastDamager(@Nullable EntityLiving entityliving) { - super.setLastDamager(entityliving); -diff --git a/src/main/java/net/minecraft/server/EntityPillager.java b/src/main/java/net/minecraft/server/EntityPillager.java -index 0357c9da9..98a657cec 100644 ---- a/src/main/java/net/minecraft/server/EntityPillager.java -+++ b/src/main/java/net/minecraft/server/EntityPillager.java -@@ -13,15 +13,34 @@ public class EntityPillager extends EntityIllagerAbstract implements ICrossbow, - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.pillagerRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.pillagerRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.pillagerRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(2, new EntityRaider.a(this, 10.0F)); - this.goalSelector.a(3, new PathfinderGoalCrossbowAttack<>(this, 1.0D, 8.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D)); - this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 15.0F, 1.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 15.0F)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // CraftBukkit - decompile error - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); -diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index fe1e9ea61..51bae05ec 100644 ---- a/src/main/java/net/minecraft/server/EntityPlayer.java -+++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1313,6 +1313,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - } - - public void a(float f, float f1, boolean flag, boolean flag1) { -+ if (aZ != f || bb != f1 || jumping != flag || isSneaking() != flag1) resetIdleTimer(); // Purpur - if (this.isPassenger()) { - if (f >= -1.0F && f <= 1.0F) { - this.aZ = f; -@@ -1325,7 +1326,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.jumping = flag; - this.setSneaking(flag1); - } -- - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityPolarBear.java b/src/main/java/net/minecraft/server/EntityPolarBear.java -index f8e29a02d..0a3906bde 100644 ---- a/src/main/java/net/minecraft/server/EntityPolarBear.java -+++ b/src/main/java/net/minecraft/server/EntityPolarBear.java -@@ -17,6 +17,23 @@ public class EntityPolarBear extends EntityAnimal { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.polarBearRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.polarBearRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.polarBearRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - public EntityAgeable createChild(EntityAgeable entityageable) { - return (EntityAgeable) EntityTypes.POLAR_BEAR.a(this.world); -@@ -31,12 +48,14 @@ public class EntityPolarBear extends EntityAnimal { - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityPolarBear.c()); - this.goalSelector.a(1, new EntityPolarBear.d()); - this.goalSelector.a(4, new PathfinderGoalFollowParent(this, 1.25D)); - this.goalSelector.a(5, new PathfinderGoalRandomStroll(this, 1.0D)); - this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); - this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new EntityPolarBear.b()); - this.targetSelector.a(2, new EntityPolarBear.a()); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityFox.class, 10, true, true, (Predicate) null)); -@@ -112,6 +131,11 @@ public class EntityPolarBear extends EntityAnimal { - --this.bz; - } - -+ // Purpur start -+ if (isStanding() && --standTimer <= 0) { -+ setStanding(false); -+ } -+ // Purpur end - } - - @Override -@@ -137,11 +161,14 @@ public class EntityPolarBear extends EntityAnimal { - return flag; - } - -+ public boolean isStanding() { return er(); } // Purpur - OBFHELPER - public boolean er() { - return (Boolean) this.datawatcher.get(EntityPolarBear.bw); - } - -+ public void setStanding(boolean standing) { r(standing); } // Purpur - OBFHELPER - public void r(boolean flag) { -+ standTimer = flag ? 20 : -1; // Purpur - this.datawatcher.set(EntityPolarBear.bw, flag); - } - -@@ -160,6 +187,21 @@ public class EntityPolarBear extends EntityAnimal { - return super.prepare(generatoraccess, difficultydamagescaler, enummobspawn, (GroupDataEntity) groupdataentity, nbttagcompound); - } - -+ // Purpur start -+ private int standTimer = 0; -+ -+ @Override -+ public boolean onSpacebar() { -+ if (!isStanding()) { -+ if (hasRider() && getRider().getForward() == 0 && getRider().getStrafe() == 0) { -+ setStanding(true); -+ a(SoundEffects.ENTITY_POLAR_BEAR_WARNING, 1.0F, 1.0F); // playSound -+ } -+ } -+ return false; -+ } -+ // Purpur end -+ - class d extends PathfinderGoalPanic { - - public d() { -diff --git a/src/main/java/net/minecraft/server/EntityPufferFish.java b/src/main/java/net/minecraft/server/EntityPufferFish.java -index 98af9a223..d0e3e251e 100644 ---- a/src/main/java/net/minecraft/server/EntityPufferFish.java -+++ b/src/main/java/net/minecraft/server/EntityPufferFish.java -@@ -17,6 +17,23 @@ public class EntityPufferFish extends EntityFish { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.pufferfishRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.pufferfishRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.pufferfishRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initDatawatcher() { - super.initDatawatcher(); -@@ -60,7 +77,7 @@ public class EntityPufferFish extends EntityFish { - @Override - protected void initPathfinder() { - super.initPathfinder(); -- this.goalSelector.a(1, new EntityPufferFish.a(this)); -+ this.goalSelector.a(2, new EntityPufferFish.a(this)); // Purpur - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java -index 2ed2d0b6b..9040ab1c5 100644 ---- a/src/main/java/net/minecraft/server/EntityRabbit.java -+++ b/src/main/java/net/minecraft/server/EntityRabbit.java -@@ -26,9 +26,27 @@ public class EntityRabbit extends EntityAnimal { - } - // CraftBukkit end - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.rabbitRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.rabbitRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.rabbitRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -- this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new PathfinderGoalFloat(this)); // Purpur -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityRabbit.PathfinderGoalRabbitPanic(this, 2.2D)); - this.goalSelector.a(2, new PathfinderGoalBreed(this, 0.8D)); - this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.0D, RecipeItemStack.a(Items.CARROT, Items.GOLDEN_CARROT, Blocks.DANDELION), false)); -@@ -41,7 +59,15 @@ public class EntityRabbit extends EntityAnimal { - } - - @Override -- protected float dp() { -+ // Purpur start -+ public float getJumpHeight() { -+ if (hasRider()) { -+ if (getForward() < 0) { -+ setSpeed(getForward() * 2F); -+ } -+ return actualJump ? 0.5F : 0.3F; -+ } -+ // Purpur end - if (!this.positionChanged && (!this.moveController.b() || this.moveController.e() <= this.locY() + 0.5D)) { - PathEntity pathentity = this.navigation.k(); - -@@ -92,6 +118,7 @@ public class EntityRabbit extends EntityAnimal { - - } - -+ public void startJumping() { eq(); } // Purpur - OBFHELPER - public void eq() { - this.setJumping(true); - this.bz = 10; -@@ -106,6 +133,12 @@ public class EntityRabbit extends EntityAnimal { - - @Override - public void mobTick() { -+ // Purpur start -+ if (hasRider()) { -+ handleJumping(); -+ return; -+ } -+ // Purpur end - if (this.bB > 0) { - --this.bB; - } -@@ -156,6 +189,39 @@ public class EntityRabbit extends EntityAnimal { - this.bA = this.onGround; - } - -+ // Purpur start -+ private boolean wasOnGround; -+ private boolean actualJump; -+ -+ private void handleJumping() { -+ if (onGround) { -+ ControllerJumpRabbit jumpController = (ControllerJumpRabbit) getJumpController(); -+ if (!wasOnGround) { -+ setJumping(false); -+ jumpController.setCanJump(false); -+ } -+ if (!jumpController.isJumping()) { -+ if (moveController.b()) { // isUpdating -+ startJumping(); -+ } -+ } else if (!jumpController.canJump()) { -+ jumpController.setCanJump(true); -+ } -+ } -+ wasOnGround = onGround; -+ } -+ -+ @Override -+ public boolean onSpacebar() { -+ if (onGround) { -+ actualJump = true; -+ jump(); -+ actualJump = false; -+ } -+ return true; -+ } -+ // Purpur end -+ - @Override - public void aE() {} - -@@ -472,7 +538,7 @@ public class EntityRabbit extends EntityAnimal { - } - } - -- static class ControllerMoveRabbit extends ControllerMove { -+ static class ControllerMoveRabbit extends net.pl3x.purpur.controller.ControllerMoveWASD { // Purpur - - private final EntityRabbit i; - private double j; -@@ -483,14 +549,14 @@ public class EntityRabbit extends EntityAnimal { - } - - @Override -- public void a() { -+ public void tick() { // Purpur - if (this.i.onGround && !this.i.jumping && !((EntityRabbit.ControllerJumpRabbit) this.i.bq).c()) { - this.i.i(0.0D); - } else if (this.b()) { - this.i.i(this.j); - } - -- super.a(); -+ super.tick(); // Purpur - } - - @Override -@@ -517,14 +583,17 @@ public class EntityRabbit extends EntityAnimal { - this.c = entityrabbit; - } - -+ public boolean isJumping() { return c(); } // Purpur - OBFHELPER - public boolean c() { - return this.a; - } - -+ public boolean canJump() { return d(); } // Purpur - OBFHELPER - public boolean d() { - return this.d; - } - -+ public void setCanJump(boolean canJump) { a(canJump); } // Purpur - OBFHELPER - public void a(boolean flag) { - this.d = flag; - } -diff --git a/src/main/java/net/minecraft/server/EntityRavager.java b/src/main/java/net/minecraft/server/EntityRavager.java -index fd25ce102..98d182a4c 100644 ---- a/src/main/java/net/minecraft/server/EntityRavager.java -+++ b/src/main/java/net/minecraft/server/EntityRavager.java -@@ -20,14 +20,33 @@ public class EntityRavager extends EntityRaider { - this.f = 20; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.ravagerRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.ravagerRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.ravagerRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(4, new EntityRavager.a()); - this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 0.4D)); - this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(2, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // CraftBukkit - decompile error - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true)); -diff --git a/src/main/java/net/minecraft/server/EntitySalmon.java b/src/main/java/net/minecraft/server/EntitySalmon.java -index 6be29f307..189515b0f 100644 ---- a/src/main/java/net/minecraft/server/EntitySalmon.java -+++ b/src/main/java/net/minecraft/server/EntitySalmon.java -@@ -6,6 +6,23 @@ public class EntitySalmon extends EntityFishSchool { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.salmonRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.salmonRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.salmonRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - public int es() { - return 5; -diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java -index f63528ca3..43eefa46c 100644 ---- a/src/main/java/net/minecraft/server/EntitySheep.java -+++ b/src/main/java/net/minecraft/server/EntitySheep.java -@@ -55,10 +55,28 @@ public class EntitySheep extends EntityAnimal { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.sheepRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.sheepRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.sheepRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.bA = new PathfinderGoalEatTile(this); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D)); - this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D)); - this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.1D, RecipeItemStack.a(Items.WHEAT), false)); -diff --git a/src/main/java/net/minecraft/server/EntityShulker.java b/src/main/java/net/minecraft/server/EntityShulker.java -index 0d2ceff6f..46379588c 100644 ---- a/src/main/java/net/minecraft/server/EntityShulker.java -+++ b/src/main/java/net/minecraft/server/EntityShulker.java -@@ -32,6 +32,23 @@ public class EntityShulker extends EntityGolem implements IMonster { - this.f = 5; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.shulkerRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.shulkerRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.shulkerRequireShiftToMount; -+ } -+ // Purpur end -+ - @Nullable - @Override - public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) { -@@ -46,10 +63,12 @@ public class EntityShulker extends EntityGolem implements IMonster { - - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(4, new EntityShulker.a()); - this.goalSelector.a(7, new EntityShulker.e()); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // CraftBukkit - decompile error - this.targetSelector.a(2, new EntityShulker.d(this)); - this.targetSelector.a(3, new EntityShulker.c(this)); -@@ -543,7 +562,7 @@ public class EntityShulker extends EntityGolem implements IMonster { - - private int b; - -- private e() {} -+ private e() { this.a(EnumSet.of(PathfinderGoal.Type.LOOK)); } // Purpur - peek - - @Override - public boolean a() { -diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java -index 08c2a22f7..dff20567b 100644 ---- a/src/main/java/net/minecraft/server/EntitySilverfish.java -+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java -@@ -11,13 +11,32 @@ public class EntitySilverfish extends EntityMonster { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.silverfishRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.silverfishRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.silverfishRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.b = new EntitySilverfish.PathfinderGoalSilverfishWakeOthers(this); - this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(1, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(3, this.b); - this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 1.0D, false)); - this.goalSelector.a(5, new EntitySilverfish.PathfinderGoalSilverfishHideInBlock(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // CraftBukkit - decompile error - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - } -@@ -181,6 +200,7 @@ public class EntitySilverfish extends EntityMonster { - - public PathfinderGoalSilverfishWakeOthers(EntitySilverfish entitysilverfish) { - this.silverfish = entitysilverfish; -+ this.a(EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - } - - public void g() { -diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java -index 0e78d5c62..8e6efeb7b 100644 ---- a/src/main/java/net/minecraft/server/EntitySkeleton.java -+++ b/src/main/java/net/minecraft/server/EntitySkeleton.java -@@ -6,6 +6,23 @@ public class EntitySkeleton extends EntitySkeletonAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.skeletonRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.skeletonRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.skeletonRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected SoundEffect getSoundAmbient() { - return SoundEffects.ENTITY_SKELETON_AMBIENT; -diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -index 3c95c0428..8bc4e8515 100644 ---- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -+++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -@@ -28,12 +28,14 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR - - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(2, new PathfinderGoalRestrictSun(this)); - this.goalSelector.a(3, new PathfinderGoalFleeSun(this, 1.0D)); - this.goalSelector.a(3, new PathfinderGoalAvoidTarget<>(this, EntityWolf.class, 6.0F, 1.0D, 1.2D)); - this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 1.0D)); - this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(6, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0])); - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); -diff --git a/src/main/java/net/minecraft/server/EntitySkeletonStray.java b/src/main/java/net/minecraft/server/EntitySkeletonStray.java -index 2eb53864f..a930fb840 100644 ---- a/src/main/java/net/minecraft/server/EntitySkeletonStray.java -+++ b/src/main/java/net/minecraft/server/EntitySkeletonStray.java -@@ -8,6 +8,23 @@ public class EntitySkeletonStray extends EntitySkeletonAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.strayRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.strayRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.strayRequireShiftToMount; -+ } -+ // Purpur end -+ - public static boolean b(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { - return c(entitytypes, generatoraccess, enummobspawn, blockposition, random) && (enummobspawn == EnumMobSpawn.SPAWNER || generatoraccess.f(blockposition)); - } -diff --git a/src/main/java/net/minecraft/server/EntitySkeletonWither.java b/src/main/java/net/minecraft/server/EntitySkeletonWither.java -index 98e042424..8aa0a6699 100644 ---- a/src/main/java/net/minecraft/server/EntitySkeletonWither.java -+++ b/src/main/java/net/minecraft/server/EntitySkeletonWither.java -@@ -9,6 +9,23 @@ public class EntitySkeletonWither extends EntitySkeletonAbstract { - this.a(PathType.LAVA, 8.0F); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.witherSkeletonRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.witherSkeletonRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.witherSkeletonRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected SoundEffect getSoundAmbient() { - return SoundEffects.ENTITY_WITHER_SKELETON_AMBIENT; -diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index 2efc18df9..1469e3b23 100644 ---- a/src/main/java/net/minecraft/server/EntitySlime.java -+++ b/src/main/java/net/minecraft/server/EntitySlime.java -@@ -32,12 +32,31 @@ public class EntitySlime extends EntityInsentient implements IMonster { - this.moveController = new EntitySlime.ControllerMoveSlime(this); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.slimeRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.slimeRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.slimeRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntitySlime.PathfinderGoalSlimeRandomJump(this)); - this.goalSelector.a(2, new EntitySlime.PathfinderGoalSlimeNearestPlayer(this)); - this.goalSelector.a(3, new EntitySlime.PathfinderGoalSlimeRandomDirection(this)); - this.goalSelector.a(5, new EntitySlime.PathfinderGoalSlimeIdle(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, (entityliving) -> { - return Math.abs(entityliving.locY() - this.locY()) <= 4.0D; - })); -@@ -496,10 +515,10 @@ public class EntitySlime extends EntityInsentient implements IMonster { - // Paper end - } - -- static class ControllerMoveSlime extends ControllerMove { -+ static class ControllerMoveSlime extends net.pl3x.purpur.controller.ControllerMoveWASD { // Purpur - - private float i; -- private int j; -+ private int j; private int getJumpDelay() { return j; } private void setJumpDelay(int delay) { j = delay; } // Purpur - OBFHELPER - private final EntitySlime k; - private boolean l; - -@@ -521,10 +540,23 @@ public class EntitySlime extends EntityInsentient implements IMonster { - - @Override - public void a() { -- this.a.yaw = this.a(this.a.yaw, this.i, 90.0F); -- this.a.aK = this.a.yaw; -- this.a.aI = this.a.yaw; -- if (this.h != ControllerMove.Operation.MOVE_TO) { -+ // Purpur start -+ if (entity.hasRider()) { -+ tick(entity.getRider()); -+ if (entity.getForward() != 0 || entity.getStrafe() != 0) { -+ if (getJumpDelay() > 10) { -+ setJumpDelay(6); -+ } -+ } else { -+ setJumpDelay(20); -+ } -+ } else { -+ this.a.yaw = this.a(this.a.yaw, this.i, 90.0F); -+ this.a.aK = this.a.yaw; -+ this.a.aI = this.a.yaw; -+ } -+ if (!entity.hasRider() && this.h != ControllerMove.Operation.MOVE_TO) { -+ // Purpur end - this.a.r(0.0F); - } else { - this.h = ControllerMove.Operation.WAIT; -diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java -index dee55c5de..65d746899 100644 ---- a/src/main/java/net/minecraft/server/EntitySnowman.java -+++ b/src/main/java/net/minecraft/server/EntitySnowman.java -@@ -13,12 +13,31 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.snowGolemRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.snowGolemRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.snowGolemRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalArrowAttack(this, 1.25D, 20, 10.0F)); - this.goalSelector.a(2, new PathfinderGoalRandomStrollLand(this, 1.0D, 1.0000001E-5F)); - this.goalSelector.a(3, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); - this.goalSelector.a(4, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 10, true, false, (entityliving) -> { - return entityliving instanceof IMonster; - })); -@@ -72,6 +91,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity { - return; - } - -+ if (hasRider() && !world.purpurConfig.snowGolemLeaveTrailWhenRidden) return; // Purpur - don't leave snow trail when being ridden - IBlockData iblockdata = Blocks.SNOW.getBlockData(); - - for (int l = 0; l < 4; ++l) { -@@ -115,7 +135,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity { - if (!this.world.isClientSide) { - // CraftBukkit start - if (!CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) { -- return false; -+ return tryRide(entityhuman, enumhand); // Purpur - } - // CraftBukkit end - this.setHasPumpkin(false); -@@ -126,7 +146,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity { - - return true; - } else { -- return false; -+ return tryRide(entityhuman, enumhand); // Purpur - } - } - -diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java -index d02db5659..d3708a7b0 100644 ---- a/src/main/java/net/minecraft/server/EntitySpider.java -+++ b/src/main/java/net/minecraft/server/EntitySpider.java -@@ -11,14 +11,33 @@ public class EntitySpider extends EntityMonster { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.spiderRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.spiderRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.spiderRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(1, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(3, new PathfinderGoalLeapAtTarget(this, 0.4F)); - this.goalSelector.a(4, new EntitySpider.PathfinderGoalSpiderMeleeAttack(this)); - this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 0.8D)); - this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(6, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0])); - this.targetSelector.a(2, new EntitySpider.PathfinderGoalSpiderNearestAttackableTarget<>(this, EntityHuman.class)); - this.targetSelector.a(3, new EntitySpider.PathfinderGoalSpiderNearestAttackableTarget<>(this, EntityIronGolem.class)); -diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 92efe4e7f..b967135ac 100644 ---- a/src/main/java/net/minecraft/server/EntitySquid.java -+++ b/src/main/java/net/minecraft/server/EntitySquid.java -@@ -25,10 +25,28 @@ public class EntitySquid extends EntityWaterAnimal { - this.bC = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.squidRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.squidRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.squidRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new EntitySquid.PathfinderGoalSquid(this)); -- this.goalSelector.a(1, new EntitySquid.a()); -+ this.goalSelector.a(1, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur -+ this.goalSelector.a(2, new EntitySquid.a()); // Purpur - } - - @Override -@@ -175,6 +193,7 @@ public class EntitySquid extends EntityWaterAnimal { - return blockposition.getY() > generatoraccess.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && blockposition.getY() < maxHeight; // Spigot // Paper - } - -+ public void setMovementVector(float x, float y, float z) { a(x, y, z); } // Purpur - OBFHELPER - public void a(float f, float f1, float f2) { - this.bE = f; - this.bF = f1; -@@ -246,7 +265,7 @@ public class EntitySquid extends EntityWaterAnimal { - - class PathfinderGoalSquid extends PathfinderGoal { - -- private final EntitySquid b; -+ private final EntitySquid b; public EntitySquid getSquid() { return b; } // Purpur - OBFHELPER - - public PathfinderGoalSquid(EntitySquid entitysquid) { - this.b = entitysquid; -@@ -259,6 +278,39 @@ public class EntitySquid extends EntityWaterAnimal { - - @Override - public void e() { -+ // Purpur start -+ EntitySquid squid = getSquid(); -+ EntityHuman rider = squid.getRider(); -+ if (rider != null) { -+ if (rider.jumping) { -+ squid.onSpacebar(); -+ } -+ float forward = rider.getForward(); -+ float strafe = rider.getStrafe(); -+ float speed = (float) squid.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue() * 5F; -+ if (forward < 0.0F) { -+ speed *= -0.5; -+ } -+ org.bukkit.util.Vector dir = rider.getBukkitEntity().getEyeLocation().getDirection().normalize().multiply(speed / 20.0F); -+ if (strafe != 0.0F) { -+ if (forward == 0.0F) { -+ dir.setY(0); -+ rotateVectorAroundY(dir, strafe > 0.0F ? -90 : 90); -+ } else if (forward < 0.0F) { -+ rotateVectorAroundY(dir, strafe > 0.0F ? 45 : -45); -+ } else { -+ rotateVectorAroundY(dir, strafe > 0.0F ? -45 : 45); -+ } -+ } -+ if (forward != 0.0F || strafe != 0.0F) { -+ squid.setMovementVector((float) dir.getX(), (float) dir.getY(), (float) dir.getZ()); -+ } else { -+ squid.setMovementVector(0.0F, 0.0F, 0.0F); -+ } -+ return; -+ } -+ // Purpur end -+ - int i = this.b.cL(); - - if (i > 100) { -@@ -273,5 +325,17 @@ public class EntitySquid extends EntityWaterAnimal { - } - - } -+ -+ // Purpur start -+ private void rotateVectorAroundY(org.bukkit.util.Vector vector, double degrees) { -+ double rad = Math.toRadians(degrees); -+ double cos = Math.cos(rad); -+ double sine = Math.sin(rad); -+ double x = vector.getX(); -+ double z = vector.getZ(); -+ vector.setX(cos * x - sine * z); -+ vector.setZ(sine * x + cos * z); -+ } -+ // Purpur end - } - } -diff --git a/src/main/java/net/minecraft/server/EntityTameableAnimal.java b/src/main/java/net/minecraft/server/EntityTameableAnimal.java -index 9b2eea71c..d55c6cb33 100644 ---- a/src/main/java/net/minecraft/server/EntityTameableAnimal.java -+++ b/src/main/java/net/minecraft/server/EntityTameableAnimal.java -@@ -135,6 +135,7 @@ public abstract class EntityTameableAnimal extends EntityAnimal { - return this.i(entityliving) ? false : super.c(entityliving); - } - -+ public boolean isOwner(EntityLiving entityLiving) { return i(entityLiving); } // Purpur - OBFHELPER - public boolean i(EntityLiving entityliving) { - return entityliving == this.getOwner(); - } -diff --git a/src/main/java/net/minecraft/server/EntityTropicalFish.java b/src/main/java/net/minecraft/server/EntityTropicalFish.java -index ef8f373be..992978463 100644 ---- a/src/main/java/net/minecraft/server/EntityTropicalFish.java -+++ b/src/main/java/net/minecraft/server/EntityTropicalFish.java -@@ -19,6 +19,23 @@ public class EntityTropicalFish extends EntityFishSchool { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.tropicalFishRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.tropicalFishRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.tropicalFishRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initDatawatcher() { - super.initDatawatcher(); -diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index b24a5100b..469549206 100644 ---- a/src/main/java/net/minecraft/server/EntityTurtle.java -+++ b/src/main/java/net/minecraft/server/EntityTurtle.java -@@ -27,6 +27,23 @@ public class EntityTurtle extends EntityAnimal { - this.H = 1.0F; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.turtleRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.turtleRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.turtleRequireShiftToMount; -+ } -+ // Purpur end -+ - public final void setHome(BlockPosition pos) { g(pos); } // Paper - OBFHELPER - public void g(BlockPosition blockposition) { - this.datawatcher.set(EntityTurtle.bx, blockposition.immutableCopy()); // Paper - make sure home position can't change -@@ -141,12 +158,13 @@ public class EntityTurtle extends EntityAnimal { - - @Override - protected void initPathfinder() { -- this.goalSelector.a(0, new EntityTurtle.f(this, 1.2D)); -- this.goalSelector.a(1, new EntityTurtle.a(this, 1.0D)); -- this.goalSelector.a(1, new EntityTurtle.d(this, 1.0D)); -- this.goalSelector.a(2, new EntityTurtle.i(this, 1.1D, Blocks.SEAGRASS.getItem())); -- this.goalSelector.a(3, new EntityTurtle.c(this, 1.0D)); -- this.goalSelector.a(4, new EntityTurtle.b(this, 1.0D)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur -+ this.goalSelector.a(1, new EntityTurtle.f(this, 1.2D)); // Purpur -+ this.goalSelector.a(2, new EntityTurtle.a(this, 1.0D)); // Purpur -+ this.goalSelector.a(2, new EntityTurtle.d(this, 1.0D)); // Purpur -+ this.goalSelector.a(3, new EntityTurtle.i(this, 1.1D, Blocks.SEAGRASS.getItem())); // Purpur -+ this.goalSelector.a(4, new EntityTurtle.c(this, 1.0D)); // Purpur -+ this.goalSelector.a(5, new EntityTurtle.b(this, 1.0D)); // Purpur - this.goalSelector.a(7, new EntityTurtle.j(this, 1.0D)); - this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(9, new EntityTurtle.h(this, 1.0D, 100)); -@@ -332,9 +350,9 @@ public class EntityTurtle extends EntityAnimal { - } - } - -- static class e extends ControllerMove { -+ static class e extends net.pl3x.purpur.controller.ControllerMoveWASD { // Purpur - -- private final EntityTurtle i; -+ private final EntityTurtle i; public EntityTurtle getTurtle() { return i; } // Purpur - OBFHELPER - - e(EntityTurtle entityturtle) { - super(entityturtle); -@@ -358,7 +376,86 @@ public class EntityTurtle extends EntityAnimal { - } - - @Override -- public void a() { -+ // Purpur start -+ public void tick(EntityHuman rider) { -+ if (getTurtle().isInWater()) { -+ // water controls (from ControllerMoveWASDWater) -+ float forward = rider.getForward() * 0.5F; -+ float strafe = rider.getStrafe() * 0.25F; // strafe slower by default -+ float vertical = -(rider.pitch / 90); -+ -+ if (forward == 0.0F) { -+ // strafe slower if not moving forward -+ strafe *= 0.5F; -+ // do not move vertically if not moving forward -+ vertical = 0.0F; -+ } else if (forward < 0.0F) { -+ // water animals can't swim backwards -+ forward = 0.0F; -+ vertical = 0.0F; -+ } -+ -+ if (rider.jumping) { -+ entity.onSpacebar(); -+ } -+ -+ setSpeed(entity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue()); -+ entity.setSpeed((float) getSpeed() * 0.1F); -+ -+ entity.setForward(forward); -+ entity.setStrafe(strafe); -+ entity.setVertical(vertical * 2F); -+ -+ setForward(entity.getForward()); -+ setStrafe(entity.getStrafe()); -+ } else { -+ // land controls (from ControllerMoveWASD) -+ float forward = rider.getForward() * 0.5F; -+ float strafe = rider.getStrafe() * 0.25F; -+ -+ if (forward <= 0.0F) { -+ forward *= 0.5F; -+ } -+ -+ float yawOffset = 0; -+ if (strafe != 0) { -+ if (forward == 0) { -+ yawOffset += strafe > 0 ? -90 : 90; -+ forward = Math.abs(strafe * 2); -+ } else { -+ yawOffset += strafe > 0 ? -30 : 30; -+ strafe /= 2; -+ if (forward < 0) { -+ yawOffset += strafe > 0 ? -110 : 110; -+ forward *= -1; -+ } -+ } -+ } else if (forward < 0) { -+ yawOffset -= 180; -+ forward *= -1; -+ } -+ -+ ((net.pl3x.purpur.controller.ControllerLookWASD) entity.getControllerLook()).setOffsets(yawOffset, 0); -+ -+ if (rider.jumping) { -+ //RidableSpacebarEvent event = new RidableSpacebarEvent(entity); -+ if (/*event.callEvent() && !event.isHandled() &&*/ !entity.onSpacebar() && entity.onGround) { -+ entity.jump(); -+ } -+ } -+ -+ setSpeed(entity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue()); -+ entity.setSpeed((float) getSpeed() * 0.1F); -+ entity.setForward(forward); -+ -+ setForward(entity.getForward()); -+ setStrafe(entity.getStrafe()); -+ } -+ } -+ -+ @Override -+ public void tick() { -+ // Purpur end - this.g(); - if (this.h == ControllerMove.Operation.MOVE_TO && !this.i.getNavigation().m()) { - double d0 = this.b - this.i.locX(); -diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 0f04bcc8b..5a7494947 100644 ---- a/src/main/java/net/minecraft/server/EntityTypes.java -+++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -259,6 +259,12 @@ public class EntityTypes { - return this.bb; - } - -+ // Purpur start -+ public String getName() { -+ return IRegistry.ENTITY_TYPE.getKey(this).getKey(); -+ } -+ // Purpur end -+ - public String f() { - if (this.bg == null) { - this.bg = SystemUtils.a("entity", IRegistry.ENTITY_TYPE.getKey(this)); -diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index cf274666c..d919f44ab 100644 ---- a/src/main/java/net/minecraft/server/EntityVex.java -+++ b/src/main/java/net/minecraft/server/EntityVex.java -@@ -19,6 +19,50 @@ public class EntityVex extends EntityMonster { - this.f = 3; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.vexRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.vexRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.vexRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.vexMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider()) { -+ float speed; -+ if (onGround) { -+ speed = (float) getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue() * 0.1F; -+ } else { -+ speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ } -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ -+ @Override -+ public boolean b(float f, float f1) { -+ return false; // no fall damage please -+ } -+ // Purpur end -+ - @Override - public void move(EnumMoveType enummovetype, Vec3D vec3d) { - super.move(enummovetype, vec3d); -@@ -27,7 +71,7 @@ public class EntityVex extends EntityMonster { - - @Override - public void tick() { -- this.noclip = true; -+ this.noclip = !hasRider(); // Purpur - super.tick(); - this.noclip = false; - this.setNoGravity(true); -@@ -42,10 +86,12 @@ public class EntityVex extends EntityMonster { - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(4, new EntityVex.a()); - this.goalSelector.a(8, new EntityVex.d()); - this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // CraftBukkit - decompile error - this.targetSelector.a(2, new EntityVex.b(this)); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); -@@ -56,6 +102,12 @@ public class EntityVex extends EntityMonster { - super.initAttributes(); - this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(14.0D); - this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(4.0D); -+ // Purpur start -+ if (world != null && world.purpurConfig.vexRidable) { -+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); -+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); -+ } -+ // Purpur end - } - - @Override -@@ -287,14 +339,21 @@ public class EntityVex extends EntityMonster { - } - } - -- class c extends ControllerMove { -+ class c extends net.pl3x.purpur.controller.ControllerMoveWASDFlying { // Purpur - - public c(EntityVex entityvex) { - super(entityvex); - } - - @Override -- public void a() { -+ // Purpur start -+ public void tick(EntityHuman rider) { -+ super.tick(rider); -+ } -+ -+ @Override -+ public void tick() { -+ // Purpur end - if (this.h == ControllerMove.Operation.MOVE_TO) { - Vec3D vec3d = new Vec3D(this.b - EntityVex.this.locX(), this.c - EntityVex.this.locY(), this.d - EntityVex.this.locZ()); - double d0 = vec3d.f(); -diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 7da267d28..5b0de0d9d 100644 ---- a/src/main/java/net/minecraft/server/EntityVillager.java -+++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -68,6 +68,28 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - this.bo = this.a(new Dynamic(DynamicOpsNBT.a, new NBTTagCompound())); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.villagerRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.villagerRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.villagerRequireShiftToMount; -+ } -+ -+ @Override -+ protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur -+ } -+ // Purpur end -+ - @Override - public BehaviorController getBehaviorController() { - return (BehaviorController) super.getBehaviorController(); // CraftBukkit - decompile error -diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -index 2ad8dba5c..4e9c5e84a 100644 ---- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java -+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -@@ -20,6 +20,23 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { - this.attachedToPlayer = true; - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.villagerTraderRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.villagerTraderRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.villagerTraderRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -@@ -29,6 +46,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { - this.goalSelector.a(0, new PathfinderGoalUseItem<>(this, new ItemStack(Items.MILK_BUCKET), SoundEffects.ENTITY_WANDERING_TRADER_REAPPEARED, (entityvillagertrader) -> { - return this.world.isDay() && entityvillagertrader.isInvisible(); - })); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new PathfinderGoalTradeWithPlayer(this)); - this.goalSelector.a(1, new PathfinderGoalAvoidTarget<>(this, EntityZombie.class, 8.0F, 0.5D, 0.5D)); - this.goalSelector.a(1, new PathfinderGoalAvoidTarget<>(this, EntityEvoker.class, 12.0F, 0.5D, 0.5D)); -diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java -index c974c02e9..6ba920134 100644 ---- a/src/main/java/net/minecraft/server/EntityVindicator.java -+++ b/src/main/java/net/minecraft/server/EntityVindicator.java -@@ -17,14 +17,33 @@ public class EntityVindicator extends EntityIllagerAbstract { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.vindicatorRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.vindicatorRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.vindicatorRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - super.initPathfinder(); - this.goalSelector.a(0, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(1, new EntityVindicator.a(this)); - this.goalSelector.a(2, new EntityIllagerAbstract.b(this)); - this.goalSelector.a(3, new EntityRaider.a(this, 10.0F)); - this.goalSelector.a(4, new EntityVindicator.c(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // Paper - decompile fix - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true)); -diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 1432d3f6b..447387bd7 100644 ---- a/src/main/java/net/minecraft/server/EntityWitch.java -+++ b/src/main/java/net/minecraft/server/EntityWitch.java -@@ -24,6 +24,23 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.witchRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.witchRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.witchRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - super.initPathfinder(); -@@ -31,11 +48,13 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { - return entityliving != null && this.eF() && entityliving.getEntityType() != EntityTypes.WITCH; - }); - this.bA = new PathfinderGoalNearestAttackableTargetWitch<>(this, EntityHuman.class, 10, true, false, null); // Purpur - decompile error -- this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(0, new PathfinderGoalFloat(this)); // Purpur -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(2, new PathfinderGoalArrowAttack(this, 1.0D, 60, 10.0F)); - this.goalSelector.a(2, new PathfinderGoalRandomStrollLand(this, 1.0D)); - this.goalSelector.a(3, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(3, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, EntityRaider.class)); // Purpur - decompile error - this.targetSelector.a(2, this.bz); - this.targetSelector.a(3, this.bA); -diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index 2f466af4d..8c1fa3717 100644 ---- a/src/main/java/net/minecraft/server/EntityWither.java -+++ b/src/main/java/net/minecraft/server/EntityWither.java -@@ -18,7 +18,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - private static final DataWatcherObject b = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b); - private static final DataWatcherObject c = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b); - private static final DataWatcherObject d = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b); -- private static final List> bw = ImmutableList.of(EntityWither.b, EntityWither.c, EntityWither.d); -+ private static final List> bw = ImmutableList.of(EntityWither.b, EntityWither.c, EntityWither.d); private static List> targetList() { return bw; } // Purpur - OBFHELPER - private static final DataWatcherObject bx = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b); - private final float[] by = new float[2]; - private final float[] bz = new float[2]; -@@ -39,15 +39,59 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - this.setHealth(this.getMaxHealth()); - this.getNavigation().d(true); - this.f = 50; -+ this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASDFlyingWithSpacebar(this, 0.1F); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.witherRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.witherRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.witherRequireShiftToMount; -+ } -+ -+ @Override -+ public double getMaxY() { -+ return world.purpurConfig.witherMaxY; -+ } -+ -+ @Override -+ public void e(Vec3D vec3d) { -+ super.e(vec3d); -+ if (hasRider() && !onGround) { -+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); -+ setSpeed(speed); -+ Vec3D mot = getMot(); -+ move(EnumMoveType.SELF, mot.multiply(speed, 0.5, speed)); -+ setMot(mot.a(0.9D)); -+ } -+ } -+ -+ @Override -+ public void onMount(EntityHuman entityhuman) { -+ this.datawatcher.set(targetList().get(0), 0); -+ this.datawatcher.set(targetList().get(1), 0); -+ this.datawatcher.set(targetList().get(2), 0); -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -- this.goalSelector.a(0, new EntityWither.a()); -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur -+ this.goalSelector.a(1, new EntityWither.a()); // Purpur - this.goalSelector.a(2, new PathfinderGoalArrowAttack(this, 1.0D, 40, 20.0F)); - this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 1.0D)); - this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0])); - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 0, false, false, EntityWither.bG)); - } -@@ -125,7 +169,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - } - - this.setMot(vec3d); -- if (b(vec3d) > 0.05D) { -+ if (!hasRider() && b(vec3d) > 0.05D) { // Purpur - this.yaw = (float) MathHelper.d(vec3d.z, vec3d.x) * 57.295776F - 90.0F; - } - -@@ -189,6 +233,13 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - - @Override - protected void mobTick() { -+ // Purpur start -+ if (hasRider()) { -+ Vec3D mot = getMot(); -+ setMot(mot.x, mot.y + (getVertical() > 0 ? 0.07D : 0.0D), mot.z); -+ } -+ // Purpur end -+ - int i; - - if (this.eq() > 0) { -@@ -512,6 +563,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.6000000238418579D); - this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(40.0D); - this.getAttributeInstance(GenericAttributes.ARMOR).setValue(4.0D); -+ // Purpur start -+ if (world != null && world.purpurConfig.witherRidable) { -+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); -+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); -+ } -+ // Purpur end - } - - public int eq() { -@@ -523,11 +580,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - } - - public int getHeadTarget(int i) { -- return (Integer) this.datawatcher.get((DataWatcherObject) EntityWither.bw.get(i)); -+ return hasRider() ? 0 : this.datawatcher.get(EntityWither.bw.get(i)); // Purpur - } - - public void setHeadTarget(int i, int j) { -- this.datawatcher.set((DataWatcherObject) EntityWither.bw.get(i), j); -+ if (!hasRider()) this.datawatcher.set(EntityWither.bw.get(i), j); // Purpur - } - - public boolean J_() { -@@ -541,7 +598,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - - @Override - protected boolean n(Entity entity) { -- return false; -+ return getRideCooldown() <= 0; // Purpur - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java -index eec1e26b6..47f0b2df6 100644 ---- a/src/main/java/net/minecraft/server/EntityWolf.java -+++ b/src/main/java/net/minecraft/server/EntityWolf.java -@@ -30,10 +30,28 @@ public class EntityWolf extends EntityTameableAnimal { - this.setTamed(false); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.wolfRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.wolfRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.wolfRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { - this.goalSit = new PathfinderGoalSit(this); - this.goalSelector.a(1, new PathfinderGoalFloat(this)); -+ this.goalSelector.a(1, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(2, this.goalSit); - this.goalSelector.a(3, new EntityWolf.a<>(this, EntityLlama.class, 24.0F, 1.5D, 1.5D)); - this.goalSelector.a(4, new PathfinderGoalLeapAtTarget(this, 0.4F)); -@@ -44,6 +62,7 @@ public class EntityWolf extends EntityTameableAnimal { - this.goalSelector.a(9, new PathfinderGoalBeg(this, 8.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(10, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, new PathfinderGoalOwnerHurtByTarget(this)); - this.targetSelector.a(2, new PathfinderGoalOwnerHurtTarget(this)); - this.targetSelector.a(3, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // CraftBukkit - decompile error -@@ -274,85 +293,56 @@ public class EntityWolf extends EntityTameableAnimal { - - @Override - public boolean a(EntityHuman entityhuman, EnumHand enumhand) { -- ItemStack itemstack = entityhuman.b(enumhand); -+ // Purpur start - rebuild entire method back to 1.14 standards -+ ItemStack itemstack = entityhuman.getItemInHand(enumhand); - Item item = itemstack.getItem(); - -- if (itemstack.getItem() instanceof ItemMonsterEgg) { -- return super.a(entityhuman, enumhand); -- } else if (this.world.isClientSide) { -- return this.i((EntityLiving) entityhuman) || item == Items.BONE && !this.isAngry(); -- } else { -- if (this.isTamed()) { -- if (item.isFood() && item.getFoodInfo().c() && this.getHealth() < this.getMaxHealth()) { -+ if (isTamed()) { -+ if (item.isFood()) { -+ if (item.getFoodInfo().isMeat() && getHealth() < getMaxHealth()) { - if (!entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); - } -- -- this.heal((float) item.getFoodInfo().getNutrition(), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit -+ heal((float) item.getFoodInfo().getNutrition(), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit - return true; - } -- -- if (!(item instanceof ItemDye)) { -- boolean flag = super.a(entityhuman, enumhand); -- -- if (!flag || this.isBaby()) { -- //this.goalSit.setSitting(!this.isSitting()); // Paper start - copied from below -- if (this.i((EntityLiving) entityhuman) && !this.i(itemstack)) { -- this.goalSit.setSitting(!this.isSitting()); -- this.jumping = false; -- this.navigation.o(); -- this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason -- } -- // Paper end - copied from below -- } -- -- return flag; -- } -- -- EnumColor enumcolor = ((ItemDye) item).d(); -- -- if (enumcolor != this.getCollarColor()) { -- this.setCollarColor(enumcolor); -+ } else if (item instanceof ItemDye) { -+ EnumColor color = ((ItemDye) item).getDyeColor(); -+ if (color != getCollarColor()) { - if (!entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); - } -- -+ setCollarColor(color); - return true; - } -- -- /* Paper start - Move into above -- if (this.i((EntityLiving) entityhuman) && !this.i(itemstack)) { -- this.goalSit.setSitting(!this.isSitting()); -- this.jumping = false; -- this.navigation.o(); -- this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason -- } -- */ // Paper end -- } else if (item == Items.BONE && !this.isAngry()) { -- if (!entityhuman.abilities.canInstantlyBuild) { -- itemstack.subtract(1); -- } -- -- // CraftBukkit - added event call and isCancelled check. -- if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { -- this.tame(entityhuman); -- this.navigation.o(); -- this.setGoalTarget((EntityLiving) null); -- this.goalSit.setSitting(true); -- this.world.broadcastEntityEffect(this, (byte) 7); -- } else { -- this.world.broadcastEntityEffect(this, (byte) 6); -- } -- -- return true; - } -- -- return super.a(entityhuman, enumhand); -+ if (isOwner(entityhuman) && !isFood(itemstack)) { -+ goalSit.setSitting(!isSitting()); -+ jumping = false; -+ navigation.stopPathfinding(); -+ setGoalTarget(null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason -+ } -+ } else if (item == Items.BONE && !isAngry()) { -+ if (!entityhuman.abilities.canInstantlyBuild) { -+ itemstack.subtract(1); -+ } -+ if (random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit - added event call and isCancelled check. -+ tame(entityhuman); -+ navigation.stopPathfinding(); -+ setGoalTarget(null); -+ goalSit.setSitting(true); -+ world.broadcastEntityEffect(this, (byte) 7); -+ } else { -+ world.broadcastEntityEffect(this, (byte) 6); -+ } -+ return true; - } -+ return super.a(entityhuman, enumhand); -+ // Purpur end - } - - @Override -- public boolean i(ItemStack itemstack) { -+ public boolean i(ItemStack itemstack) { return isFood(itemstack); } public boolean isFood(ItemStack itemstack) { // Purpur - OBFHELPER - Item item = itemstack.getItem(); - - return item.isFood() && item.getFoodInfo().c(); -@@ -442,6 +432,13 @@ public class EntityWolf extends EntityTameableAnimal { - return !this.isAngry() && super.a(entityhuman); - } - -+ // Purpur start -+ public void onMount(EntityHuman entityhuman) { -+ super.onMount(entityhuman); -+ setSitting(false); -+ } -+ // Purpur end -+ - class a extends PathfinderGoalAvoidTarget { - - private final EntityWolf j; -diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 07ebc1d81..8d1f04415 100644 ---- a/src/main/java/net/minecraft/server/EntityZombie.java -+++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -44,11 +44,30 @@ public class EntityZombie extends EntityMonster { - this(EntityTypes.ZOMBIE, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.zombieRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.zombieRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.zombieRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initPathfinder() { -+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); - this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); -+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.l(); - } - -diff --git a/src/main/java/net/minecraft/server/EntityZombieHusk.java b/src/main/java/net/minecraft/server/EntityZombieHusk.java -index da8446d05..db252ba4e 100644 ---- a/src/main/java/net/minecraft/server/EntityZombieHusk.java -+++ b/src/main/java/net/minecraft/server/EntityZombieHusk.java -@@ -8,6 +8,23 @@ public class EntityZombieHusk extends EntityZombie { - super(entitytypes, world); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.huskRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.huskRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.huskRequireShiftToMount; -+ } -+ // Purpur end -+ - public static boolean b(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { - return c(entitytypes, generatoraccess, enummobspawn, blockposition, random) && (enummobspawn == EnumMobSpawn.SPAWNER || generatoraccess.f(blockposition)); - } -diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java -index 8082fa617..ebbfcb75a 100644 ---- a/src/main/java/net/minecraft/server/EntityZombieVillager.java -+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java -@@ -25,6 +25,23 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo - this.setVillagerData(this.getVillagerData().withProfession((VillagerProfession) IRegistry.VILLAGER_PROFESSION.a(this.random))); - } - -+ // Purpur start -+ @Override -+ public boolean isRidable() { -+ return world.purpurConfig.zombieVillagerRidable; -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return world.purpurConfig.zombieVillagerRidableInWater; -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return world.purpurConfig.zombieVillagerRequireShiftToMount; -+ } -+ // Purpur end -+ - @Override - protected void initDatawatcher() { - super.initDatawatcher(); -diff --git a/src/main/java/net/minecraft/server/FoodInfo.java b/src/main/java/net/minecraft/server/FoodInfo.java -index b35fe21a6..5b0f35c73 100644 ---- a/src/main/java/net/minecraft/server/FoodInfo.java -+++ b/src/main/java/net/minecraft/server/FoodInfo.java -@@ -30,6 +30,7 @@ public class FoodInfo { - return this.b; - } - -+ public boolean isMeat() { return c(); } // Purpur - OBFHELPER - public boolean c() { - return this.c; - } -diff --git a/src/main/java/net/minecraft/server/ItemDye.java b/src/main/java/net/minecraft/server/ItemDye.java -index da49f6e5a..7b5d60264 100644 ---- a/src/main/java/net/minecraft/server/ItemDye.java -+++ b/src/main/java/net/minecraft/server/ItemDye.java -@@ -42,6 +42,7 @@ public class ItemDye extends Item { - } - } - -+ public EnumColor getDyeColor() { return d(); } // Purpur - OBFHELPER - public EnumColor d() { - return this.b; - } -diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java -index c4aa38ddf..3d52a396e 100644 ---- a/src/main/java/net/minecraft/server/MathHelper.java -+++ b/src/main/java/net/minecraft/server/MathHelper.java -@@ -263,6 +263,7 @@ public class MathHelper { - return (d0 - d1) / (d2 - d1); - } - -+ public static double atan2(double d0, double d1) { return d(d0, d1); } // Purpur - OBFHELPER - public static double d(double d0, double d1) { - double d2 = d1 * d1 + d0 * d0; - -@@ -407,6 +408,7 @@ public class MathHelper { - return i; - } - -+ public static float lerp(float f, float f1, float f2) { return g(f, f1, f2); } // Purpur - OBFHELPER - public static float g(float f, float f1, float f2) { - return f1 + f * (f2 - f1); - } -diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSwell.java b/src/main/java/net/minecraft/server/PathfinderGoalSwell.java -index e07c7674a..3c077b687 100644 ---- a/src/main/java/net/minecraft/server/PathfinderGoalSwell.java -+++ b/src/main/java/net/minecraft/server/PathfinderGoalSwell.java -@@ -4,8 +4,8 @@ import java.util.EnumSet; - - public class PathfinderGoalSwell extends PathfinderGoal { - -- private final EntityCreeper a; -- private EntityLiving b; -+ private final EntityCreeper a; public EntityCreeper getCreeper() { return a; } // Purpur - OBFHELPER -+ private EntityLiving b; public void setTarget(EntityLiving target) { b = target; } // Purpur - OBFHELPER - - public PathfinderGoalSwell(EntityCreeper entitycreeper) { - this.a = entitycreeper; -@@ -32,6 +32,7 @@ public class PathfinderGoalSwell extends PathfinderGoal { - - @Override - public void e() { -+ setTarget(getCreeper().getGoalTarget()); // Purpur - if (this.b == null) { - this.a.a(-1); - } else if (this.a.h((Entity) this.b) > 49.0D) { -diff --git a/src/main/java/net/minecraft/server/ProjectileHelper.java b/src/main/java/net/minecraft/server/ProjectileHelper.java -index 1b796ba5b..7dbe3500e 100644 ---- a/src/main/java/net/minecraft/server/ProjectileHelper.java -+++ b/src/main/java/net/minecraft/server/ProjectileHelper.java -@@ -15,6 +15,7 @@ public final class ProjectileHelper { - }, entity.getBoundingBox().a(entity.getMot()).g(1.0D)); - } - -+ public static MovingObjectPosition getHitResult(Entity entity, AxisAlignedBB aabb, Predicate predicate, RayTrace.BlockCollisionOption option, boolean flag) { return a(entity, aabb, predicate, option, flag); } // Purpur - OBFHELPER - public static MovingObjectPosition a(Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate, RayTrace.BlockCollisionOption raytrace_blockcollisionoption, boolean flag) { - return a(entity, flag, false, (Entity) null, raytrace_blockcollisionoption, false, predicate, axisalignedbb); - } -diff --git a/src/main/java/net/minecraft/server/Vec3D.java b/src/main/java/net/minecraft/server/Vec3D.java -index c2e4b5e8d..3838b3b3a 100644 ---- a/src/main/java/net/minecraft/server/Vec3D.java -+++ b/src/main/java/net/minecraft/server/Vec3D.java -@@ -27,6 +27,7 @@ public class Vec3D implements IPosition { - return new Vec3D(vec3d.x - this.x, vec3d.y - this.y, vec3d.z - this.z); - } - -+ public Vec3D normalize() { return d(); } // Purpur - OBFHELPER - public Vec3D d() { - double d0 = (double) MathHelper.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); - -@@ -82,6 +83,7 @@ public class Vec3D implements IPosition { - return d3 * d3 + d4 * d4 + d5 * d5; - } - -+ public Vec3D scale(double scale) { return a(scale); } // Purpur - OBFHELPER - public Vec3D a(double d0) { - return this.d(d0, d0, d0); - } -@@ -90,6 +92,7 @@ public class Vec3D implements IPosition { - return this.d(vec3d.x, vec3d.y, vec3d.z); - } - -+ public Vec3D multiply (double x, double y, double z) { return d(x, y, z); } // Purpur - OBFHELPER - public Vec3D d(double d0, double d1, double d2) { - return new Vec3D(this.x * d0, this.y * d1, this.z * d2); - } -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index bdb12d16f..ad3b81a11 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -1020,6 +1020,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - } - } - -+ public boolean containsMaterial(AxisAlignedBB aabb, Material mat) { return a(aabb, mat); } // Purpur - OBFHELPER - public boolean a(AxisAlignedBB axisalignedbb, Material material) { - int i = MathHelper.floor(axisalignedbb.minX); - int j = MathHelper.f(axisalignedbb.maxX); -@@ -1665,4 +1666,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - @Override public BiomeManager d() { - return this.biomeManager; - } -+ -+ // Purpur start -+ public void playEffect(@Nullable EntityHuman entityhuman, int i, BlockPosition blockposition, int j) { -+ this.a(entityhuman, i, blockposition, j); -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index eda37fa43..69f99a993 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -64,4 +64,603 @@ public class PurpurWorldConfig { - PurpurConfig.config.addDefault("world-settings.default." + path, def); - return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path)); - } -+ -+ public boolean batRidable = false; -+ public boolean batRidableInWater = false; -+ public boolean batRequireShiftToMount = true; -+ public double batMaxY = 256D; -+ private void batSettings() { -+ batRidable = getBoolean("mobs.bat.ridable", batRidable); -+ batRidableInWater = getBoolean("mobs.bat.ridable-in-water", batRidableInWater); -+ batRequireShiftToMount = getBoolean("mobs.bat.require-shift-to-mount", batRequireShiftToMount); -+ batMaxY = getDouble("mobs.bat.ridable-max-y", batMaxY); -+ } -+ -+ public boolean beeRidable = false; -+ public boolean beeRidableInWater = false; -+ public boolean beeRequireShiftToMount = true; -+ public double beeMaxY = 256D; -+ private void beeSettings() { -+ beeRidable = getBoolean("mobs.bee.ridable", beeRidable); -+ beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater); -+ beeRequireShiftToMount = getBoolean("mobs.bee.require-shift-to-mount", beeRequireShiftToMount); -+ beeMaxY = getDouble("mobs.bee.ridable-max-y", beeMaxY); -+ } -+ -+ public boolean blazeRidable = false; -+ public boolean blazeRidableInWater = false; -+ public boolean blazeRequireShiftToMount = true; -+ public double blazeMaxY = 256D; -+ private void blazeSettings() { -+ blazeRidable = getBoolean("mobs.blaze.ridable", blazeRidable); -+ blazeRidableInWater = getBoolean("mobs.blaze.ridable-in-water", blazeRidableInWater); -+ blazeRequireShiftToMount = getBoolean("mobs.blaze.require-shift-to-mount", blazeRequireShiftToMount); -+ blazeMaxY = getDouble("mobs.blaze.ridable-max-y", blazeMaxY); -+ } -+ -+ public boolean catRidable = false; -+ public boolean catRidableInWater = false; -+ public boolean catRequireShiftToMount = true; -+ private void catSettings() { -+ catRidable = getBoolean("mobs.cat.ridable", catRidable); -+ catRidableInWater = getBoolean("mobs.cat.ridable-in-water", catRidableInWater); -+ catRequireShiftToMount = getBoolean("mobs.cat.require-shift-to-mount", catRequireShiftToMount); -+ } -+ -+ public boolean caveSpiderRidable = false; -+ public boolean caveSpiderRidableInWater = false; -+ public boolean caveSpiderRequireShiftToMount = true; -+ private void caveSpiderSettings() { -+ caveSpiderRidable = getBoolean("mobs.cave_spider.ridable", caveSpiderRidable); -+ caveSpiderRidableInWater = getBoolean("mobs.cave_spider.ridable-in-water", caveSpiderRidableInWater); -+ caveSpiderRequireShiftToMount = getBoolean("mobs.cave_spider.require-shift-to-mount", caveSpiderRequireShiftToMount); -+ } -+ -+ public boolean chickenRidable = false; -+ public boolean chickenRidableInWater = false; -+ public boolean chickenRequireShiftToMount = true; -+ public boolean chickenDontLayEggsWhenRidden = false; -+ private void chickenSettings() { -+ chickenRidable = getBoolean("mobs.chicken.ridable", chickenRidable); -+ chickenRidableInWater = getBoolean("mobs.chicken.ridable-in-water", chickenRidableInWater); -+ chickenRequireShiftToMount = getBoolean("mobs.chicken.require-shift-to-mount", chickenRequireShiftToMount); -+ chickenDontLayEggsWhenRidden = getBoolean("mobs.chicken.dont-lay-eggs-when-ridden", chickenDontLayEggsWhenRidden); -+ } -+ -+ public boolean codRidable = false; -+ public boolean codRidableInWater = false; -+ public boolean codRequireShiftToMount = true; -+ private void codSettings() { -+ codRidable = getBoolean("mobs.cod.ridable", codRidable); -+ codRidableInWater = getBoolean("mobs.cod.ridable-in-water", codRidableInWater); -+ codRequireShiftToMount = getBoolean("mobs.cod.require-shift-to-mount", codRequireShiftToMount); -+ } -+ -+ public boolean cowRidable = false; -+ public boolean cowRidableInWater = false; -+ public boolean cowRequireShiftToMount = true; -+ private void cowSettings() { -+ cowRidable = getBoolean("mobs.cow.ridable", cowRidable); -+ cowRidableInWater = getBoolean("mobs.cow.ridable-in-water", cowRidableInWater); -+ cowRequireShiftToMount = getBoolean("mobs.cow.require-shift-to-mount", cowRequireShiftToMount); -+ } -+ -+ public boolean creeperRidable = false; -+ public boolean creeperRidableInWater = false; -+ public boolean creeperRequireShiftToMount = true; -+ private void creeperSettings() { -+ creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable); -+ creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater); -+ creeperRequireShiftToMount = getBoolean("mobs.creeper.require-shift-to-mount", creeperRequireShiftToMount); -+ } -+ -+ public boolean dolphinRidable = false; -+ public boolean dolphinRidableInWater = false; -+ public boolean dolphinRequireShiftToMount = true; -+ public int dolphinSpitCooldown = 20; -+ public float dolphinSpitSpeed = 1.0F; -+ public float dolphinSpitDamage = 2.0F; -+ private void dolphinSettings() { -+ dolphinRidable = getBoolean("mobs.dolphin.ridable", dolphinRidable); -+ dolphinRidableInWater = getBoolean("mobs.dolphin.ridable-in-water", dolphinRidableInWater); -+ dolphinRequireShiftToMount = getBoolean("mobs.dolphin.require-shift-to-mount", dolphinRequireShiftToMount); -+ dolphinSpitCooldown = getInt("mobs.dolphin.spit.cooldown", dolphinSpitCooldown); -+ dolphinSpitSpeed = (float) getDouble("mobs.dolphin.spit.speed", dolphinSpitSpeed); -+ dolphinSpitDamage = (float) getDouble("mobs.dolphin.spit.damage", dolphinSpitDamage); -+ } -+ -+ public boolean donkeyRidableInWater = false; -+ private void donkeySettings() { -+ donkeyRidableInWater = getBoolean("mobs.donkey.ridable-in-water", donkeyRidableInWater); -+ } -+ -+ public boolean drownedRidable = false; -+ public boolean drownedRidableInWater = false; -+ public boolean drownedRequireShiftToMount = true; -+ private void drownedSettings() { -+ drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable); -+ drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater); -+ drownedRequireShiftToMount = getBoolean("mobs.drowned.require-shift-to-mount", drownedRequireShiftToMount); -+ } -+ -+ public boolean elderGuardianRidable = false; -+ public boolean elderGuardianRidableInWater = false; -+ public boolean elderGuardianRequireShiftToMount = true; -+ private void elderGuardianSettings() { -+ elderGuardianRidable = getBoolean("mobs.elder_guardian.ridable", elderGuardianRidable); -+ elderGuardianRidableInWater = getBoolean("mobs.elder_guardian.ridable-in-water", elderGuardianRidableInWater); -+ elderGuardianRequireShiftToMount = getBoolean("mobs.elder_guardian.require-shift-to-mount", elderGuardianRequireShiftToMount); -+ } -+ -+ public boolean enderDragonRidable = false; -+ public boolean enderDragonRidableInWater = false; -+ public boolean enderDragonRequireShiftToMount = true; -+ public double enderDragonMaxY = 256D; -+ private void enderDragonSettings() { -+ enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable); -+ enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater); -+ enderDragonRequireShiftToMount = getBoolean("mobs.ender_dragon.require-shift-to-mount", enderDragonRequireShiftToMount); -+ enderDragonMaxY = getDouble("mobs.ender_dragon.ridable-max-y", enderDragonMaxY); -+ } -+ -+ public boolean endermanRidable = false; -+ public boolean endermanRidableInWater = false; -+ public boolean endermanRequireShiftToMount = true; -+ private void endermanSettings() { -+ endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable); -+ endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater); -+ endermanRequireShiftToMount = getBoolean("mobs.enderman.require-shift-to-mount", endermanRequireShiftToMount); -+ } -+ -+ public boolean endermiteRidable = false; -+ public boolean endermiteRidableInWater = false; -+ public boolean endermiteRequireShiftToMount = true; -+ private void endermiteSettings() { -+ endermiteRidable = getBoolean("mobs.endermite.ridable", endermiteRidable); -+ endermiteRidableInWater = getBoolean("mobs.endermite.ridable-in-water", endermiteRidableInWater); -+ endermiteRequireShiftToMount = getBoolean("mobs.endermite.require-shift-to-mount", endermiteRequireShiftToMount); -+ } -+ -+ public boolean evokerRidable = false; -+ public boolean evokerRidableInWater = false; -+ public boolean evokerRequireShiftToMount = true; -+ private void evokerSettings() { -+ evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable); -+ evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater); -+ evokerRequireShiftToMount = getBoolean("mobs.evoker.require-shift-to-mount", evokerRequireShiftToMount); -+ } -+ -+ public boolean foxRidable = false; -+ public boolean foxRidableInWater = false; -+ public boolean foxRequireShiftToMount = true; -+ private void foxSettings() { -+ foxRidable = getBoolean("mobs.fox.ridable", foxRidable); -+ foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater); -+ foxRequireShiftToMount = getBoolean("mobs.fox.require-shift-to-mount", foxRequireShiftToMount); -+ } -+ -+ public boolean ghastRidable = false; -+ public boolean ghastRidableInWater = false; -+ public boolean ghastRequireShiftToMount = true; -+ public double ghastMaxY = 256D; -+ private void ghastSettings() { -+ ghastRidable = getBoolean("mobs.ghast.ridable", ghastRidable); -+ ghastRidableInWater = getBoolean("mobs.ghast.ridable-in-water", ghastRidableInWater); -+ ghastRequireShiftToMount = getBoolean("mobs.ghast.require-shift-to-mount", ghastRequireShiftToMount); -+ ghastMaxY = getDouble("mobs.ghast.ridable-max-y", ghastMaxY); -+ } -+ -+ public boolean giantRidable = false; -+ public boolean giantRidableInWater = false; -+ public boolean giantRequireShiftToMount = true; -+ public float giantStepHeight = 2.0F; -+ public float giantJumpHeight = 1.0F; -+ private void giantSettings() { -+ giantRidable = getBoolean("mobs.giant.ridable", giantRidable); -+ giantRidableInWater = getBoolean("mobs.giant.ridable-in-water", giantRidableInWater); -+ giantRequireShiftToMount = getBoolean("mobs.giant.require-shift-to-mount", giantRequireShiftToMount); -+ giantStepHeight = (float) getDouble("mobs.giant.step-height", giantStepHeight); -+ giantJumpHeight = (float) getDouble("mobs.giant.jump-height", giantJumpHeight); -+ } -+ -+ public boolean guardianRidable = false; -+ public boolean guardianRidableInWater = false; -+ public boolean guardianRequireShiftToMount = true; -+ private void guardianSettings() { -+ guardianRidable = getBoolean("mobs.guardian.ridable", guardianRidable); -+ guardianRidableInWater = getBoolean("mobs.guardian.ridable-in-water", guardianRidableInWater); -+ guardianRequireShiftToMount = getBoolean("mobs.guardian.require-shift-to-mount", guardianRequireShiftToMount); -+ } -+ -+ public boolean huskRidable = false; -+ public boolean huskRidableInWater = false; -+ public boolean huskRequireShiftToMount = true; -+ private void huskSettings() { -+ huskRidable = getBoolean("mobs.husk.ridable", huskRidable); -+ huskRidableInWater = getBoolean("mobs.husk.ridable-in-water", huskRidableInWater); -+ huskRequireShiftToMount = getBoolean("mobs.husk.require-shift-to-mount", huskRequireShiftToMount); -+ } -+ -+ public boolean horseRidableInWater = false; -+ private void horseSettings() { -+ horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater); -+ } -+ -+ public boolean illusionerRidable = false; -+ public boolean illusionerRidableInWater = false; -+ public boolean illusionerRequireShiftToMount = true; -+ private void illusionerSettings() { -+ illusionerRidable = getBoolean("mobs.illusioner.ridable", illusionerRidable); -+ illusionerRidableInWater = getBoolean("mobs.illusioner.ridable-in-water", illusionerRidableInWater); -+ illusionerRequireShiftToMount = getBoolean("mobs.illusioner.require-shift-to-mount", illusionerRequireShiftToMount); -+ } -+ -+ public boolean ironGolemRidable = false; -+ public boolean ironGolemRidableInWater = false; -+ public boolean ironGolemRequireShiftToMount = true; -+ private void ironGolemSettings() { -+ ironGolemRidable = getBoolean("mobs.iron_golem.ridable", ironGolemRidable); -+ ironGolemRidableInWater = getBoolean("mobs.iron_golem.ridable-in-water", ironGolemRidableInWater); -+ ironGolemRequireShiftToMount = getBoolean("mobs.iron_golem.require-shift-to-mount", ironGolemRequireShiftToMount); -+ } -+ -+ public boolean llamaRidable = false; -+ public boolean llamaRidableInWater = false; -+ private void llamaSettings() { -+ llamaRidable = getBoolean("mobs.llama.ridable", llamaRidable); -+ llamaRidableInWater = getBoolean("mobs.llama.ridable-in-water", llamaRidableInWater); -+ } -+ -+ public boolean llamaTraderRidable = false; -+ public boolean llamaTraderRidableInWater = false; -+ private void llamaTraderSettings() { -+ llamaTraderRidable = getBoolean("mobs.trader_llama.ridable", llamaTraderRidable); -+ llamaTraderRidableInWater = getBoolean("mobs.trader_llama.ridable-in-water", llamaTraderRidableInWater); -+ } -+ -+ public boolean magmaCubeRidable = false; -+ public boolean magmaCubeRidableInWater = false; -+ public boolean magmaCubeRequireShiftToMount = true; -+ private void magmaCubeSettings() { -+ magmaCubeRidable = getBoolean("mobs.magma_cube.ridable", magmaCubeRidable); -+ magmaCubeRidableInWater = getBoolean("mobs.magma_cube.ridable-in-water", magmaCubeRidableInWater); -+ magmaCubeRequireShiftToMount = getBoolean("mobs.magma_cube.require-shift-to-mount", magmaCubeRequireShiftToMount); -+ } -+ -+ public boolean mooshroomRidable = false; -+ public boolean mooshroomRidableInWater = false; -+ public boolean mooshroomRequireShiftToMount = true; -+ private void mooshroomSettings() { -+ mooshroomRidable = getBoolean("mobs.mooshroom.ridable", mooshroomRidable); -+ mooshroomRidableInWater = getBoolean("mobs.mooshroom.ridable-in-water", mooshroomRidableInWater); -+ mooshroomRequireShiftToMount = getBoolean("mobs.mooshroom.require-shift-to-mount", mooshroomRequireShiftToMount); -+ } -+ -+ public boolean muleRidableInWater = false; -+ private void muleSettings() { -+ muleRidableInWater = getBoolean("mobs.mule.ridable-in-water", muleRidableInWater); -+ } -+ -+ public boolean ocelotRidable = false; -+ public boolean ocelotRidableInWater = false; -+ public boolean ocelotRequireShiftToMount = true; -+ private void ocelotSettings() { -+ ocelotRidable = getBoolean("mobs.ocelot.ridable", ocelotRidable); -+ ocelotRidableInWater = getBoolean("mobs.ocelot.ridable-in-water", ocelotRidableInWater); -+ ocelotRequireShiftToMount = getBoolean("mobs.ocelot.require-shift-to-mount", ocelotRequireShiftToMount); -+ } -+ -+ public boolean pandaRidable = false; -+ public boolean pandaRidableInWater = false; -+ public boolean pandaRequireShiftToMount = true; -+ private void pandaSettings() { -+ pandaRidable = getBoolean("mobs.panda.ridable", pandaRidable); -+ pandaRidableInWater = getBoolean("mobs.panda.ridable-in-water", pandaRidableInWater); -+ pandaRequireShiftToMount = getBoolean("mobs.panda.require-shift-to-mount", pandaRequireShiftToMount); -+ } -+ -+ public boolean parrotRidable = false; -+ public boolean parrotRidableInWater = false; -+ public boolean parrotRequireShiftToMount = true; -+ public double parrotMaxY = 256D; -+ private void parrotSettings() { -+ parrotRidable = getBoolean("mobs.parrot.ridable", parrotRidable); -+ parrotRidableInWater = getBoolean("mobs.parrot.ridable-in-water", parrotRidableInWater); -+ parrotRequireShiftToMount = getBoolean("mobs.parrot.require-shift-to-mount", parrotRequireShiftToMount); -+ parrotMaxY = getDouble("mobs.parrot.ridable-max-y", parrotMaxY); -+ } -+ -+ public boolean phantomRidable = false; -+ public boolean phantomRidableInWater = false; -+ public boolean phantomRequireShiftToMount = true; -+ public double phantomMaxY = 256D; -+ public float phantomFlameDamage = 1.0F; -+ public int phantomFlameFireTime = 8; -+ private void phantomSettings() { -+ phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable); -+ phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater); -+ phantomRequireShiftToMount = getBoolean("mobs.phantom.require-shift-to-mount", phantomRequireShiftToMount); -+ phantomMaxY = getDouble("mobs.phantom.ridable-max-y", phantomMaxY); -+ phantomFlameDamage = (float) getDouble("mobs.phantom.flames.damage", phantomFlameDamage); -+ phantomFlameFireTime = getInt("mobs.phantom.flames.fire-time", phantomFlameFireTime); -+ } -+ -+ public boolean pigRidable = false; -+ public boolean pigRidableInWater = false; -+ private void pigSettings() { -+ pigRidable = getBoolean("mobs.pig.ridable", pigRidable); -+ pigRidableInWater = getBoolean("mobs.pig.ridable-in-water", pigRidableInWater); -+ } -+ -+ public boolean pillagerRidable = false; -+ public boolean pillagerRidableInWater = false; -+ public boolean pillagerRequireShiftToMount = true; -+ private void pillagerSettings() { -+ pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable); -+ pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater); -+ pillagerRequireShiftToMount = getBoolean("mobs.pillager.require-shift-to-mount", pillagerRequireShiftToMount); -+ } -+ -+ public boolean polarBearRidable = false; -+ public boolean polarBearRidableInWater = false; -+ public boolean polarBearRequireShiftToMount = true; -+ private void polarBearSettings() { -+ polarBearRidable = getBoolean("mobs.polar_bear.ridable", polarBearRidable); -+ polarBearRidableInWater = getBoolean("mobs.polar_bear.ridable-in-water", polarBearRidableInWater); -+ polarBearRequireShiftToMount = getBoolean("mobs.polar_bear.require-shift-to-mount", polarBearRequireShiftToMount); -+ } -+ -+ public boolean pufferfishRidable = false; -+ public boolean pufferfishRidableInWater = false; -+ public boolean pufferfishRequireShiftToMount = true; -+ private void pufferfishSettings() { -+ pufferfishRidable = getBoolean("mobs.pufferfish.ridable", pufferfishRidable); -+ pufferfishRidableInWater = getBoolean("mobs.pufferfish.ridable-in-water", pufferfishRidableInWater); -+ pufferfishRequireShiftToMount = getBoolean("mobs.pufferfish.require-shift-to-mount", pufferfishRequireShiftToMount); -+ } -+ -+ public boolean rabbitRidable = false; -+ public boolean rabbitRidableInWater = false; -+ public boolean rabbitRequireShiftToMount = true; -+ private void rabbitSettings() { -+ rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable); -+ rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater); -+ rabbitRequireShiftToMount = getBoolean("mobs.rabbit.require-shift-to-mount", rabbitRequireShiftToMount); -+ } -+ -+ public boolean ravagerRidable = false; -+ public boolean ravagerRidableInWater = false; -+ public boolean ravagerRequireShiftToMount = true; -+ private void ravagerSettings() { -+ ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable); -+ ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater); -+ ravagerRequireShiftToMount = getBoolean("mobs.ravager.require-shift-to-mount", ravagerRequireShiftToMount); -+ } -+ -+ public boolean salmonRidable = false; -+ public boolean salmonRidableInWater = false; -+ public boolean salmonRequireShiftToMount = true; -+ private void salmonSettings() { -+ salmonRidable = getBoolean("mobs.salmon.ridable", salmonRidable); -+ salmonRidableInWater = getBoolean("mobs.salmon.ridable-in-water", salmonRidableInWater); -+ salmonRequireShiftToMount = getBoolean("mobs.salmon.require-shift-to-mount", salmonRequireShiftToMount); -+ } -+ -+ public boolean sheepRidable = false; -+ public boolean sheepRidableInWater = false; -+ public boolean sheepRequireShiftToMount = true; -+ private void sheepSettings() { -+ sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable); -+ sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater); -+ sheepRequireShiftToMount = getBoolean("mobs.sheep.require-shift-to-mount", sheepRequireShiftToMount); -+ } -+ -+ public boolean shulkerRidable = false; -+ public boolean shulkerRidableInWater = false; -+ public boolean shulkerRequireShiftToMount = true; -+ private void shulkerSettings() { -+ shulkerRidable = getBoolean("mobs.shulker.ridable", shulkerRidable); -+ shulkerRidableInWater = getBoolean("mobs.shulker.ridable-in-water", shulkerRidableInWater); -+ shulkerRequireShiftToMount = getBoolean("mobs.shulker.require-shift-to-mount", shulkerRequireShiftToMount); -+ } -+ -+ public boolean silverfishRidable = false; -+ public boolean silverfishRidableInWater = false; -+ public boolean silverfishRequireShiftToMount = true; -+ private void silverfishSettings() { -+ silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable); -+ silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater); -+ silverfishRequireShiftToMount = getBoolean("mobs.silverfish.require-shift-to-mount", silverfishRequireShiftToMount); -+ } -+ -+ public boolean skeletonRidable = false; -+ public boolean skeletonRidableInWater = false; -+ public boolean skeletonRequireShiftToMount = true; -+ private void skeletonSettings() { -+ skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable); -+ skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater); -+ skeletonRequireShiftToMount = getBoolean("mobs.skeleton.require-shift-to-mount", skeletonRequireShiftToMount); -+ } -+ -+ public boolean skeletonHorseCanSwim = false; -+ public boolean skeletonHorseRidableInWater = true; -+ private void skeletonHorseSettings() { -+ skeletonHorseCanSwim = getBoolean("mobs.skeleton_horse.can-swim", skeletonHorseCanSwim); -+ skeletonHorseRidableInWater = getBoolean("mobs.skeleton_horse.ridable-in-water", skeletonHorseRidableInWater); -+ } -+ -+ public boolean slimeRidable = false; -+ public boolean slimeRidableInWater = false; -+ public boolean slimeRequireShiftToMount = true; -+ private void slimeSettings() { -+ slimeRidable = getBoolean("mobs.slime.ridable", slimeRidable); -+ slimeRidableInWater = getBoolean("mobs.slime.ridable-in-water", slimeRidableInWater); -+ slimeRequireShiftToMount = getBoolean("mobs.slime.require-shift-to-mount", slimeRequireShiftToMount); -+ } -+ -+ public boolean snowGolemRidable = false; -+ public boolean snowGolemRidableInWater = false; -+ public boolean snowGolemRequireShiftToMount = true; -+ public boolean snowGolemLeaveTrailWhenRidden = false; -+ private void snowGolemSettings() { -+ snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable); -+ snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater); -+ snowGolemRequireShiftToMount = getBoolean("mobs.snow_golem.require-shift-to-mount", snowGolemRequireShiftToMount); -+ snowGolemLeaveTrailWhenRidden = getBoolean("mobs.snow_golem.leave-trail-when-ridden", snowGolemLeaveTrailWhenRidden); -+ } -+ -+ public boolean spiderRidable = false; -+ public boolean spiderRidableInWater = false; -+ public boolean spiderRequireShiftToMount = true; -+ private void spiderSettings() { -+ spiderRidable = getBoolean("mobs.spider.ridable", spiderRidable); -+ spiderRidableInWater = getBoolean("mobs.spider.ridable-in-water", spiderRidableInWater); -+ spiderRequireShiftToMount = getBoolean("mobs.spider.require-shift-to-mount", spiderRequireShiftToMount); -+ } -+ -+ public boolean squidRidable = false; -+ public boolean squidRidableInWater = false; -+ public boolean squidRequireShiftToMount = true; -+ private void squidSettings() { -+ squidRidable = getBoolean("mobs.squid.ridable", squidRidable); -+ squidRidableInWater = getBoolean("mobs.squid.ridable-in-water", squidRidableInWater); -+ squidRequireShiftToMount = getBoolean("mobs.squid.require-shift-to-mount", squidRequireShiftToMount); -+ } -+ -+ public boolean strayRidable = false; -+ public boolean strayRidableInWater = false; -+ public boolean strayRequireShiftToMount = true; -+ private void straySettings() { -+ strayRidable = getBoolean("mobs.stray.ridable", strayRidable); -+ strayRidableInWater = getBoolean("mobs.stray.ridable-in-water", strayRidableInWater); -+ strayRequireShiftToMount = getBoolean("mobs.stray.require-shift-to-mount", strayRequireShiftToMount); -+ } -+ -+ public boolean tropicalFishRidable = false; -+ public boolean tropicalFishRidableInWater = false; -+ public boolean tropicalFishRequireShiftToMount = true; -+ private void tropicalFishSettings() { -+ tropicalFishRidable = getBoolean("mobs.tropical_fish.ridable", tropicalFishRidable); -+ tropicalFishRidableInWater = getBoolean("mobs.tropical_fish.ridable-in-water", tropicalFishRidableInWater); -+ tropicalFishRequireShiftToMount = getBoolean("mobs.tropical_fish.require-shift-to-mount", tropicalFishRequireShiftToMount); -+ } -+ -+ public boolean turtleRidable = false; -+ public boolean turtleRidableInWater = false; -+ public boolean turtleRequireShiftToMount = true; -+ private void turtleSettings() { -+ turtleRidable = getBoolean("mobs.turtle.ridable", turtleRidable); -+ turtleRidableInWater = getBoolean("mobs.turtle.ridable-in-water", turtleRidableInWater); -+ turtleRequireShiftToMount = getBoolean("mobs.turtle.require-shift-to-mount", turtleRequireShiftToMount); -+ } -+ -+ public boolean vexRidable = false; -+ public boolean vexRidableInWater = false; -+ public boolean vexRequireShiftToMount = true; -+ public double vexMaxY = 256D; -+ private void vexSettings() { -+ vexRidable = getBoolean("mobs.vex.ridable", vexRidable); -+ vexRidableInWater = getBoolean("mobs.vex.ridable-in-water", vexRidableInWater); -+ vexRequireShiftToMount = getBoolean("mobs.vex.require-shift-to-mount", vexRequireShiftToMount); -+ vexMaxY = getDouble("mobs.vex.ridable-max-y", vexMaxY); -+ } -+ -+ public boolean villagerRidable = false; -+ public boolean villagerRidableInWater = false; -+ public boolean villagerRequireShiftToMount = true; -+ private void villagerSettings() { -+ villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable); -+ villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater); -+ villagerRequireShiftToMount = getBoolean("mobs.villager.require-shift-to-mount", villagerRequireShiftToMount); -+ } -+ -+ public boolean villagerTraderRidable = false; -+ public boolean villagerTraderRidableInWater = false; -+ public boolean villagerTraderRequireShiftToMount = true; -+ private void villagerTraderSettings() { -+ villagerTraderRidable = getBoolean("mobs.wandering_trader.ridable", villagerTraderRidable); -+ villagerTraderRidableInWater = getBoolean("mobs.wandering_trader.ridable-in-water", villagerTraderRidableInWater); -+ villagerTraderRequireShiftToMount = getBoolean("mobs.wandering_trader.require-shift-to-mount", villagerTraderRequireShiftToMount); -+ } -+ -+ public boolean vindicatorRidable = false; -+ public boolean vindicatorRidableInWater = false; -+ public boolean vindicatorRequireShiftToMount = true; -+ private void vindicatorSettings() { -+ vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable); -+ vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater); -+ vindicatorRequireShiftToMount = getBoolean("mobs.vindicator.require-shift-to-mount", vindicatorRequireShiftToMount); -+ } -+ -+ public boolean witchRidable = false; -+ public boolean witchRidableInWater = false; -+ public boolean witchRequireShiftToMount = true; -+ private void witchSettings() { -+ witchRidable = getBoolean("mobs.witch.ridable", witchRidable); -+ witchRidableInWater = getBoolean("mobs.witch.ridable-in-water", witchRidableInWater); -+ witchRequireShiftToMount = getBoolean("mobs.witch.require-shift-to-mount", witchRequireShiftToMount); -+ } -+ -+ public boolean witherRidable = false; -+ public boolean witherRidableInWater = false; -+ public boolean witherRequireShiftToMount = true; -+ public double witherMaxY = 256D; -+ private void witherSettings() { -+ witherRidable = getBoolean("mobs.wither.ridable", witherRidable); -+ witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater); -+ witherRequireShiftToMount = getBoolean("mobs.wither.require-shift-to-mount", witherRequireShiftToMount); -+ witherMaxY = getDouble("mobs.wither.ridable-max-y", witherMaxY); -+ } -+ -+ public boolean witherSkeletonRidable = false; -+ public boolean witherSkeletonRidableInWater = false; -+ public boolean witherSkeletonRequireShiftToMount = true; -+ private void witherSkeletonSettings() { -+ witherSkeletonRidable = getBoolean("mobs.wither_skeleton.ridable", witherSkeletonRidable); -+ witherSkeletonRidableInWater = getBoolean("mobs.wither_skeleton.ridable-in-water", witherSkeletonRidableInWater); -+ witherSkeletonRequireShiftToMount = getBoolean("mobs.wither_skeleton.require-shift-to-mount", witherSkeletonRequireShiftToMount); -+ } -+ -+ public boolean wolfRidable = false; -+ public boolean wolfRidableInWater = false; -+ public boolean wolfRequireShiftToMount = true; -+ private void wolfSettings() { -+ wolfRidable = getBoolean("mobs.wolf.ridable", wolfRidable); -+ wolfRidableInWater = getBoolean("mobs.wolf.ridable-in-water", wolfRidableInWater); -+ wolfRequireShiftToMount = getBoolean("mobs.wolf.require-shift-to-mount", wolfRequireShiftToMount); -+ } -+ -+ public boolean zombieRidable = false; -+ public boolean zombieRidableInWater = false; -+ public boolean zombieRequireShiftToMount = true; -+ private void zombieSettings() { -+ zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); -+ zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); -+ zombieRequireShiftToMount = getBoolean("mobs.zombie.require-shift-to-mount", zombieRequireShiftToMount); -+ } -+ -+ public boolean zombieHorseCanSwim = false; -+ public boolean zombieHorseRidableInWater = false; -+ private void zombieHorseSettings() { -+ zombieHorseCanSwim = getBoolean("mobs.zombie_horse.can-swim", zombieHorseCanSwim); -+ zombieHorseRidableInWater = getBoolean("mobs.zombie_horse.ridable-in-water", zombieHorseRidableInWater); -+ } -+ -+ public boolean zombiePigmanRidable = false; -+ public boolean zombiePigmanRidableInWater = false; -+ public boolean zombiePigmanRequireShiftToMount = true; -+ private void zombiePigmanSettings() { -+ zombiePigmanRidable = getBoolean("mobs.zombie_pigman.ridable", zombiePigmanRidable); -+ zombiePigmanRidableInWater = getBoolean("mobs.zombie_pigman.ridable-in-water", zombiePigmanRidableInWater); -+ zombiePigmanRequireShiftToMount = getBoolean("mobs.zombie_pigman.require-shift-to-mount", zombiePigmanRequireShiftToMount); -+ } -+ -+ public boolean zombieVillagerRidable = false; -+ public boolean zombieVillagerRidableInWater = false; -+ public boolean zombieVillagerRequireShiftToMount = true; -+ private void zombieVillagerSettings() { -+ zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable); -+ zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater); -+ zombieVillagerRequireShiftToMount = getBoolean("mobs.zombie_villager.require-shift-to-mount", zombieVillagerRequireShiftToMount); -+ } - } -diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java b/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java -new file mode 100644 -index 000000000..828e1b873 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java -@@ -0,0 +1,75 @@ -+package net.pl3x.purpur.controller; -+ -+import net.minecraft.server.ControllerLook; -+import net.minecraft.server.EntityHuman; -+import net.minecraft.server.EntityInsentient; -+import net.minecraft.server.MathHelper; -+import net.minecraft.server.PacketPlayOutEntity; -+ -+public class ControllerLookWASD extends ControllerLook { -+ protected final EntityInsentient entity; -+ private float yawOffset = 0; -+ private float pitchOffset = 0; -+ -+ public ControllerLookWASD(EntityInsentient entity) { -+ super(entity); -+ this.entity = entity; -+ } -+ -+ // tick -+ @Override -+ public void a() { -+ if (entity.hasRider()) { -+ tick(entity.getRider()); -+ } else { -+ tick(); -+ } -+ } -+ -+ protected void tick() { -+ super.a(); // tick -+ } -+ -+ protected void tick(EntityHuman rider) { -+ setYawPitch(rider.yaw, rider.pitch); -+ } -+ -+ public void setYawPitch(float yaw, float pitch) { -+ entity.yaw = normalizeYaw(yaw + yawOffset); -+ entity.lastYaw = entity.yaw; -+ entity.setBodyYaw(entity.yaw); -+ entity.setHeadRotation(entity.yaw); -+ entity.pitch = normalizePitch(pitch + pitchOffset); -+ -+ entity.getTracker().broadcast(new PacketPlayOutEntity -+ .PacketPlayOutRelEntityMoveLook(entity.getId(), -+ (short) 0, (short) 0, (short) 0, -+ (byte) MathHelper.d(entity.yaw * 256.0F / 360.0F), -+ (byte) MathHelper.d(entity.pitch * 256.0F / 360.0F), -+ entity.onGround)); -+ } -+ -+ public void setOffsets(float yaw, float pitch) { -+ yawOffset = yaw; -+ pitchOffset = pitch; -+ } -+ -+ public float normalizeYaw(float yaw) { -+ yaw %= 360.0f; -+ if (yaw >= 180.0f) { -+ yaw -= 360.0f; -+ } else if (yaw < -180.0f) { -+ yaw += 360.0f; -+ } -+ return yaw; -+ } -+ -+ public float normalizePitch(float pitch) { -+ if (pitch > 90.0f) { -+ pitch = 90.0f; -+ } else if (pitch < -90.0f) { -+ pitch = -90.0f; -+ } -+ return pitch; -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java -new file mode 100644 -index 000000000..0a5d6d46c ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java -@@ -0,0 +1,86 @@ -+package net.pl3x.purpur.controller; -+ -+import net.minecraft.server.ControllerMove; -+import net.minecraft.server.Entity; -+import net.minecraft.server.EntityHuman; -+import net.minecraft.server.EntityInsentient; -+import net.minecraft.server.GenericAttributes; -+import net.pl3x.purpur.event.entity.RidableSpacebarEvent; -+ -+public class ControllerMoveWASD extends ControllerMove { -+ protected final EntityInsentient entity; -+ -+ public ControllerMoveWASD(EntityInsentient entity) { -+ super(entity); -+ this.entity = entity; -+ } -+ -+ // isUpdating -+ @Override -+ public boolean b() { -+ return entity.hasRider() ? getForward() != 0 || getStrafe() != 0 : super.b(); -+ } -+ -+ // tick -+ @Override -+ public void a() { -+ if (entity.hasRider()) { -+ tick(entity.getRider()); -+ } else { -+ tick(); -+ } -+ } -+ -+ protected void tick() { -+ super.a(); // tick -+ } -+ -+ protected void tick(EntityHuman rider) { -+ float forward = rider.getForward() * 0.5F; -+ float strafe = rider.getStrafe() * 0.25F; -+ -+ if (forward <= 0.0F) { -+ forward *= 0.5F; -+ } -+ -+ float yawOffset = 0; -+ if (strafe != 0) { -+ if (forward == 0) { -+ yawOffset += strafe > 0 ? -90 : 90; -+ forward = Math.abs(strafe * 2); -+ } else { -+ yawOffset += strafe > 0 ? -30 : 30; -+ strafe /= 2; -+ if (forward < 0) { -+ yawOffset += strafe > 0 ? -110 : 110; -+ forward *= -1; -+ } -+ } -+ } else if (forward < 0) { -+ yawOffset -= 180; -+ forward *= -1; -+ } -+ -+ ((ControllerLookWASD) entity.getControllerLook()).setOffsets(yawOffset, 0); -+ -+ if (rider.jumping && spacebarEvent(entity) && !entity.onSpacebar() && entity.onGround) { -+ entity.doJump(); -+ } -+ -+ setSpeed(entity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue()); -+ -+ entity.setSpeed((float) getSpeed()); -+ entity.setForward(forward); -+ -+ setForward(entity.getForward()); -+ setStrafe(entity.getStrafe()); -+ } -+ -+ public static boolean spacebarEvent(Entity entity) { -+ if (RidableSpacebarEvent.getHandlerList().getRegisteredListeners().length > 0) { -+ return new RidableSpacebarEvent(entity.getBukkitEntity()).callEvent(); -+ } else { -+ return true; -+ } -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java -new file mode 100644 -index 000000000..349125070 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java -@@ -0,0 +1,53 @@ -+package net.pl3x.purpur.controller; -+ -+import net.minecraft.server.EntityHuman; -+import net.minecraft.server.EntityInsentient; -+import net.minecraft.server.GenericAttributes; -+ -+public class ControllerMoveWASDFlying extends ControllerMoveWASD { -+ protected final float groundSpeedModifier; -+ protected int tooHighCooldown = 0; -+ -+ public ControllerMoveWASDFlying(EntityInsentient entity) { -+ this(entity, 1.0F); -+ } -+ -+ public ControllerMoveWASDFlying(EntityInsentient entity, float groundSpeedModifier) { -+ super(entity); -+ this.groundSpeedModifier = groundSpeedModifier; -+ } -+ -+ @Override -+ public void tick(EntityHuman rider) { -+ float forward = Math.max(0.0F, rider.getForward()); -+ float vertical = forward == 0.0F ? 0.0F : -(rider.pitch / 45.0F); -+ float strafe = rider.getStrafe(); -+ -+ if (rider.jumping && spacebarEvent(entity)) { -+ entity.onSpacebar(); -+ } -+ -+ if (entity.locY() >= entity.getMaxY() || --tooHighCooldown > 0) { -+ tooHighCooldown = 60; -+ entity.setMot(entity.getMot().add(0.0D, -0.05D, 0.0D)); -+ vertical = 0.0F; -+ } -+ -+ setSpeed(entity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue()); -+ float speed = (float) getSpeed(); -+ -+ if (entity.onGround) { -+ speed *= groundSpeedModifier; // TODO = fix this! -+ } -+ -+ entity.setNoGravity(forward > 0); -+ -+ entity.setSpeed(speed); -+ entity.setVertical(vertical); -+ entity.setStrafe(strafe); -+ entity.setForward(forward); -+ -+ setForward(entity.getForward()); -+ setStrafe(entity.getStrafe()); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlyingWithSpacebar.java b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlyingWithSpacebar.java -new file mode 100644 -index 000000000..f75375936 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlyingWithSpacebar.java -@@ -0,0 +1,61 @@ -+package net.pl3x.purpur.controller; -+ -+import net.minecraft.server.EntityHuman; -+import net.minecraft.server.EntityInsentient; -+import net.minecraft.server.GenericAttributes; -+import net.minecraft.server.Vec3D; -+ -+public class ControllerMoveWASDFlyingWithSpacebar extends ControllerMoveWASDFlying { -+ public ControllerMoveWASDFlyingWithSpacebar(EntityInsentient entity) { -+ super(entity); -+ } -+ -+ public ControllerMoveWASDFlyingWithSpacebar(EntityInsentient entity, float groundSpeedModifier) { -+ super(entity, groundSpeedModifier); -+ } -+ -+ @Override -+ public void tick(EntityHuman rider) { -+ float forward = rider.getForward(); -+ float strafe = rider.getStrafe() * 0.5F; -+ float vertical = 0; -+ -+ if (forward < 0.0F) { -+ forward *= 0.5F; -+ strafe *= 0.5F; -+ } -+ -+ float speed = (float) entity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue(); -+ -+ if (entity.onGround) { -+ speed *= groundSpeedModifier; -+ } -+ -+ if (rider.jumping && spacebarEvent(entity) && !entity.onSpacebar()) { -+ entity.setNoGravity(true); -+ vertical = 1.0F; -+ } else { -+ entity.setNoGravity(false); -+ } -+ -+ if (entity.locY() >= entity.getMaxY() || --tooHighCooldown > 0) { -+ tooHighCooldown = 60; -+ entity.setMot(entity.getMot().add(0.0D, -0.2D, 0.0D)); -+ vertical = 0.0F; -+ } -+ -+ setSpeed(speed); -+ entity.setSpeed((float) getSpeed()); -+ entity.setVertical(vertical); -+ entity.setStrafe(strafe); -+ entity.setForward(forward); -+ -+ setForward(entity.getForward()); -+ setStrafe(entity.getStrafe()); -+ -+ Vec3D mot = entity.getMot(); -+ if (mot.y > 0.2D) { -+ entity.setMot(mot.x, 0.2D, mot.z); -+ } -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDWater.java b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDWater.java -new file mode 100644 -index 000000000..e75e58067 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDWater.java -@@ -0,0 +1,43 @@ -+package net.pl3x.purpur.controller; -+ -+import net.minecraft.server.EntityHuman; -+import net.minecraft.server.EntityInsentient; -+import net.minecraft.server.GenericAttributes; -+ -+public class ControllerMoveWASDWater extends ControllerMoveWASD { -+ public ControllerMoveWASDWater(EntityInsentient entity) { -+ super(entity); -+ } -+ -+ @Override -+ protected void tick(EntityHuman rider) { -+ float forward = rider.getForward(); -+ float strafe = rider.getStrafe() * 0.5F; // strafe slower by default -+ float vertical = -(rider.pitch / 90); -+ -+ if (forward == 0.0F) { -+ // strafe slower if not moving forward -+ strafe *= 0.5F; -+ // do not move vertically if not moving forward -+ vertical = 0.0F; -+ } else if (forward < 0.0F) { -+ // water animals can't swim backwards -+ forward = 0.0F; -+ vertical = 0.0F; -+ } -+ -+ if (rider.jumping && spacebarEvent(entity)) { -+ entity.onSpacebar(); -+ } -+ -+ setSpeed(entity.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue()); -+ entity.setSpeed((float) getSpeed() * 0.1F); -+ -+ entity.setForward(forward); -+ entity.setStrafe(strafe); -+ entity.setVertical(vertical); -+ -+ setForward(entity.getForward()); -+ setStrafe(entity.getStrafe()); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java b/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java -new file mode 100644 -index 000000000..7189cc569 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java -@@ -0,0 +1,119 @@ -+package net.pl3x.purpur.entity; -+ -+import net.minecraft.server.DamageSource; -+import net.minecraft.server.Entity; -+import net.minecraft.server.EntityDolphin; -+import net.minecraft.server.EntityLiving; -+import net.minecraft.server.EntityLlamaSpit; -+import net.minecraft.server.EntityTypes; -+import net.minecraft.server.IProjectile; -+import net.minecraft.server.Material; -+import net.minecraft.server.MathHelper; -+import net.minecraft.server.MovingObjectPosition; -+import net.minecraft.server.MovingObjectPositionEntity; -+import net.minecraft.server.NBTTagCompound; -+import net.minecraft.server.Packet; -+import net.minecraft.server.PacketPlayOutSpawnEntity; -+import net.minecraft.server.Particles; -+import net.minecraft.server.ProjectileHelper; -+import net.minecraft.server.RayTrace; -+import net.minecraft.server.Vec3D; -+import net.minecraft.server.World; -+import net.minecraft.server.WorldServer; -+import org.bukkit.craftbukkit.event.CraftEventFactory; -+ -+public class DolphinSpit extends EntityLlamaSpit implements IProjectile { -+ public EntityLiving dolphin; -+ public int ticksLived; -+ -+ public DolphinSpit(EntityTypes entitytypes, World world) { -+ super(entitytypes, world); -+ } -+ -+ public DolphinSpit(World world, EntityDolphin dolphin) { -+ this(EntityTypes.LLAMA_SPIT, world); -+ this.dolphin = dolphin; -+ -+ setPosition(dolphin.locX() - (double) (dolphin.getWidth() + 1.0F) * 0.5D * (double) MathHelper.sin(dolphin.getBodyRotation() * ((float) Math.PI / 180F)), dolphin.getHeadY() - (double) 0.1F, dolphin.locZ() + (double) (dolphin.getWidth() + 1.0F) * 0.5D * (double) MathHelper.cos(dolphin.getBodyRotation() * ((float) Math.PI / 180F))); -+ } -+ -+ @Override -+ public boolean canSaveToDisk() { -+ return false; -+ } -+ -+ @Override -+ public void tick() { -+ setFlag(6, isGlowing()); -+ entityBaseTick(); -+ -+ Vec3D mot = getMot(); -+ -+ MovingObjectPosition hitResult = ProjectileHelper.getHitResult(this, getBoundingBox().expandTowards(mot).expand(1.0D), (entity) -> !entity.isSpectator() && entity != dolphin && entity != dolphin.getRider(), RayTrace.BlockCollisionOption.OUTLINE, true); -+ if (hitResult != null) { -+ onHit(hitResult); -+ } -+ -+ mot = mot.scale(0.99F); -+ setMot(mot); -+ setPosition(locX() + mot.x, locY() + mot.y, locZ() + mot.z); -+ -+ for (int i = 0; i < 5; i++) { -+ ((WorldServer) world).sendParticles(null, Particles.BUBBLE, -+ locX() + random.nextFloat() / 2 - 0.25F, -+ locY() + random.nextFloat() / 2 - 0.25F, -+ locZ() + random.nextFloat() / 2 - 0.25F, -+ 1, 0, 0, 0, 0, true); -+ } -+ -+ if (++ticksLived > 20) { -+ die(); -+ } -+ } -+ -+ @Override -+ public void shoot(double x, double y, double z, float speed, float inaccuracy) { -+ setMot(new Vec3D(x, y, z).normalize().add( -+ random.nextGaussian() * (double) 0.0075F * (double) inaccuracy, -+ random.nextGaussian() * (double) 0.0075F * (double) inaccuracy, -+ random.nextGaussian() * (double) 0.0075F * (double) inaccuracy) -+ .scale(speed)); -+ } -+ -+ public void onHit(MovingObjectPosition rayTrace) { -+ CraftEventFactory.callProjectileHitEvent(this, rayTrace); -+ -+ switch (rayTrace.getType()) { -+ case BLOCK: -+ die(); -+ break; -+ case ENTITY: -+ if (dolphin != null) { -+ Entity entity = ((MovingObjectPositionEntity) rayTrace).getEntity(); -+ entity.damageEntity(DamageSource.indirectMobAttack(this, dolphin).setProjectile(), world.purpurConfig.dolphinSpitDamage); -+ } -+ die(); -+ } -+ } -+ -+ @Override -+ public void a(MovingObjectPosition movingobjectposition) { -+ } -+ -+ @Override -+ protected void initDatawatcher() { -+ } -+ -+ @Override -+ protected void a(NBTTagCompound nbttagcompound) { -+ } -+ -+ @Override -+ protected void b(NBTTagCompound nbttagcompound) { -+ } -+ -+ @Override -+ public Packet L() { -+ return new PacketPlayOutSpawnEntity(this); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java -new file mode 100644 -index 000000000..f9e680efd ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java -@@ -0,0 +1,126 @@ -+package net.pl3x.purpur.entity; -+ -+import net.minecraft.server.DamageSource; -+import net.minecraft.server.Entity; -+import net.minecraft.server.EntityLiving; -+import net.minecraft.server.EntityLlamaSpit; -+import net.minecraft.server.EntityPhantom; -+import net.minecraft.server.EntityTypes; -+import net.minecraft.server.IProjectile; -+import net.minecraft.server.Material; -+import net.minecraft.server.MathHelper; -+import net.minecraft.server.MovingObjectPosition; -+import net.minecraft.server.MovingObjectPositionEntity; -+import net.minecraft.server.NBTTagCompound; -+import net.minecraft.server.Packet; -+import net.minecraft.server.PacketPlayOutSpawnEntity; -+import net.minecraft.server.Particles; -+import net.minecraft.server.ProjectileHelper; -+import net.minecraft.server.RayTrace; -+import net.minecraft.server.Vec3D; -+import net.minecraft.server.World; -+import net.minecraft.server.WorldServer; -+import org.bukkit.craftbukkit.event.CraftEventFactory; -+ -+public class PhantomFlames extends EntityLlamaSpit implements IProjectile { -+ public EntityLiving phantom; -+ public int ticksLived; -+ -+ public PhantomFlames(EntityTypes entitytypes, World world) { -+ super(entitytypes, world); -+ } -+ -+ public PhantomFlames(World world, EntityPhantom phantom) { -+ this(EntityTypes.LLAMA_SPIT, world); -+ this.phantom = phantom; -+ -+ setPosition(phantom.locX() - (double) (phantom.getWidth() + 1.0F) * 0.5D * (double) MathHelper.sin(phantom.getBodyRotation() * ((float) Math.PI / 180F)), phantom.getHeadY() - (double) 0.1F, phantom.locZ() + (double) (phantom.getWidth() + 1.0F) * 0.5D * (double) MathHelper.cos(phantom.getBodyRotation() * ((float) Math.PI / 180F))); -+ } -+ -+ @Override -+ public boolean canSaveToDisk() { -+ return false; -+ } -+ -+ @Override -+ public void tick() { -+ setFlag(6, isGlowing()); -+ entityBaseTick(); -+ -+ Vec3D mot = getMot(); -+ -+ MovingObjectPosition hitResult = ProjectileHelper.getHitResult(this, getBoundingBox().expandTowards(mot).expand(1.0D), (entity) -> !entity.isSpectator() && entity != phantom && entity != phantom.getRider(), RayTrace.BlockCollisionOption.OUTLINE, true); -+ if (hitResult != null) { -+ onHit(hitResult); -+ } -+ -+ mot = mot.scale(0.99F); -+ setMot(mot); -+ setPosition(locX() + mot.x, locY() + mot.y, locZ() + mot.z); -+ -+ Vec3D m = mot.scale(2.0); -+ for (int i = 0; i < 5; i++) { -+ ((WorldServer) world).sendParticles(null, Particles.FLAME, -+ locX() + random.nextFloat() / 2 - 0.25F, -+ locY() + random.nextFloat() / 2 - 0.25F, -+ locZ() + random.nextFloat() / 2 - 0.25F, -+ 0, m.getX(), m.getY(), m.getZ(), 0.1, true); -+ } -+ -+ if (!world.containsMaterial(getBoundingBox(), Material.AIR)) { -+ die(); -+ } -+ if (++ticksLived > 20) { -+ die(); -+ } -+ } -+ -+ @Override -+ public void shoot(double x, double y, double z, float speed, float inaccuracy) { -+ setMot(new Vec3D(x, y, z).normalize().add( -+ random.nextGaussian() * (double) 0.0075F * (double) inaccuracy, -+ random.nextGaussian() * (double) 0.0075F * (double) inaccuracy, -+ random.nextGaussian() * (double) 0.0075F * (double) inaccuracy) -+ .scale(speed)); -+ } -+ -+ public void onHit(MovingObjectPosition rayTrace) { -+ CraftEventFactory.callProjectileHitEvent(this, rayTrace); -+ -+ switch (rayTrace.getType()) { -+ case BLOCK: -+ die(); -+ break; -+ case ENTITY: -+ if (phantom != null) { -+ Entity entity = ((MovingObjectPositionEntity) rayTrace).getEntity(); -+ entity.damageEntity(DamageSource.indirectMobAttack(this, phantom).setProjectile(), world.purpurConfig.phantomFlameDamage); -+ if (world.purpurConfig.phantomFlameFireTime > 0) { -+ entity.setOnFire(world.purpurConfig.phantomFlameFireTime); -+ } -+ } -+ die(); -+ } -+ } -+ -+ @Override -+ public void a(MovingObjectPosition movingobjectposition) { -+ } -+ -+ @Override -+ protected void initDatawatcher() { -+ } -+ -+ @Override -+ protected void a(NBTTagCompound nbttagcompound) { -+ } -+ -+ @Override -+ protected void b(NBTTagCompound nbttagcompound) { -+ } -+ -+ @Override -+ public Packet L() { -+ return new PacketPlayOutSpawnEntity(this); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java -new file mode 100644 -index 000000000..6e50344c0 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java -@@ -0,0 +1,21 @@ -+package net.pl3x.purpur.pathfinder; -+ -+import net.minecraft.server.Entity; -+import net.minecraft.server.PathfinderGoal; -+ -+import java.util.EnumSet; -+ -+public class PathfinderGoalHasRider extends PathfinderGoal { -+ public final Entity entity; -+ -+ public PathfinderGoalHasRider(Entity entity) { -+ this.entity = entity; -+ setTypes(EnumSet.of(Type.JUMP, Type.MOVE, Type.LOOK, Type.TARGET)); -+ } -+ -+ // shouldExecute -+ @Override -+ public boolean a() { -+ return entity.hasRider(); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHorseHasRider.java b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHorseHasRider.java -new file mode 100644 -index 000000000..9bb9da22a ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHorseHasRider.java -@@ -0,0 +1,21 @@ -+package net.pl3x.purpur.pathfinder; -+ -+import net.minecraft.server.EntityHorseAbstract; -+import net.minecraft.server.PathfinderGoal; -+ -+import java.util.EnumSet; -+ -+public class PathfinderGoalHorseHasRider extends PathfinderGoal { -+ public final EntityHorseAbstract entity; -+ -+ public PathfinderGoalHorseHasRider(EntityHorseAbstract entity) { -+ this.entity = entity; -+ setTypes(EnumSet.of(Type.JUMP, Type.MOVE, Type.LOOK, Type.TARGET)); -+ } -+ -+ // shouldExecute -+ @Override -+ public boolean a() { -+ return super.a() && entity.isSaddled(); -+ } -+} -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 5a7b714cc..ab414917d 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1089,4 +1089,31 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { - return getHandle().spawnReason; - } - // Paper end -+ -+ // Purpur start -+ @Override -+ public org.bukkit.entity.Player getRider() { -+ return hasRider() ? (org.bukkit.entity.Player) getHandle().getRider().getBukkitEntity() : null; -+ } -+ -+ @Override -+ public boolean hasRider() { -+ return getHandle().hasRider(); -+ } -+ -+ @Override -+ public boolean isRidable() { -+ return getHandle().isRidable(); -+ } -+ -+ @Override -+ public boolean isRidableInWater() { -+ return getHandle().isRidableInWater(); -+ } -+ -+ @Override -+ public boolean requireShiftToMount() { -+ return getHandle().requireShiftToMount(); -+ } -+ // Purpur end - } -diff --git a/src/main/resources/purpur.lang b/src/main/resources/purpur.lang -index 0967ef424..7125c0477 100644 ---- a/src/main/resources/purpur.lang -+++ b/src/main/resources/purpur.lang -@@ -1 +1,3 @@ --{} -+{ -+ "cannot.ride.mob": "You cannot mount that mob" -+} --- -2.26.2 - diff --git a/patches/removed/1.16/server/0034-Campfires-have-regen-effect.patch b/patches/removed/1.16/server/0034-Campfires-have-regen-effect.patch deleted file mode 100644 index b3df30504..000000000 --- a/patches/removed/1.16/server/0034-Campfires-have-regen-effect.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 9b77d9886cde434034d95d1dd086971e27e85222 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sun, 19 May 2019 18:11:53 -0500 -Subject: [PATCH] Campfires have regen effect - ---- - .../net/minecraft/server/BlockCampfire.java | 2 +- - .../net/minecraft/server/EntityLiving.java | 15 ++++++++-- - .../net/minecraft/server/EntityPotion.java | 26 ++++++++++++++++ - .../minecraft/server/TileEntityCampfire.java | 30 +++++++++++++++++++ - .../net/pl3x/purpur/PurpurWorldConfig.java | 23 ++++++++++++++ - 5 files changed, 92 insertions(+), 4 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java -index 6303be944..65f8d803b 100644 ---- a/src/main/java/net/minecraft/server/BlockCampfire.java -+++ b/src/main/java/net/minecraft/server/BlockCampfire.java -@@ -8,7 +8,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged - - protected static final VoxelShape a = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 7.0D, 16.0D); - public static final BlockStateBoolean b = BlockProperties.r; -- public static final BlockStateBoolean c = BlockProperties.y; -+ public static final BlockStateBoolean c = BlockProperties.y; public static BlockStateBoolean signalFire() { return c; } // Purpur - OBFHELPER - public static final BlockStateBoolean d = BlockProperties.C; - public static final BlockStateDirection e = BlockProperties.N; - private static final VoxelShape f = Block.a(6.0D, 0.0D, 6.0D, 10.0D, 16.0D, 10.0D); -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 685538793..aaaa98318 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2799,10 +2799,19 @@ public abstract class EntityLiving extends Entity { - - public boolean hasLineOfSight(Entity entity) { - if (this.world != entity.world) return false; // CraftBukkit - SPIGOT-5675, SPIGOT-5798, MC-149563 -- Vec3D vec3d = new Vec3D(this.locX(), this.getHeadY(), this.locZ()); -- Vec3D vec3d1 = new Vec3D(entity.locX(), entity.getHeadY(), entity.locZ()); -+ // Purpur start -+ return hasLineOfSight(entity.locX(), entity.getHeadY(), entity.locZ()); -+ } -+ -+ public boolean hasLineOfSight(TileEntity te) { -+ return hasLineOfSight(te.position.getX() + 0.5, te.position.getY() + 0.5, te.position.getZ() + 0.5); -+ } - -- return this.world.rayTrace(new RayTrace(vec3d, vec3d1, RayTrace.BlockCollisionOption.COLLIDER, RayTrace.FluidCollisionOption.NONE, this)).getType() == MovingObjectPosition.EnumMovingObjectType.MISS; -+ public boolean hasLineOfSight(double x, double y, double z) { -+ Vec3D start = new Vec3D(locX(), getHeadY(), locZ()); -+ Vec3D end = new Vec3D(x, y, z); -+ return world.rayTrace(new RayTrace(start, end, RayTrace.BlockCollisionOption.COLLIDER, RayTrace.FluidCollisionOption.NONE, this)).getType() == MovingObjectPosition.EnumMovingObjectType.MISS; -+ // Purpur end - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityPotion.java b/src/main/java/net/minecraft/server/EntityPotion.java -index b56b021b4..fcc5a5c23 100644 ---- a/src/main/java/net/minecraft/server/EntityPotion.java -+++ b/src/main/java/net/minecraft/server/EntityPotion.java -@@ -92,6 +92,7 @@ public class EntityPotion extends EntityProjectile { - } else { - this.a(list, movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY ? ((MovingObjectPositionEntity) movingobjectposition).getEntity() : null); - } -+ splashCampfires(list); // Purpur - } - - int i = potionregistry.b() ? 2007 : 2002; -@@ -101,6 +102,31 @@ public class EntityPotion extends EntityProjectile { - } - } - -+ // Purpur start -+ private void splashCampfires(List list) { -+ AxisAlignedBB aabb = getBoundingBox().grow(4.0D, 2.0D, 4.0D); -+ for (int x = (int) aabb.minX; x <= aabb.maxX; x++) { -+ for (int z = (int) aabb.minZ; z <= aabb.maxZ; z++) { -+ for (int y = (int) aabb.minY; y <= aabb.maxY; y++) { -+ BlockPosition pos = new BlockPosition(x, y, z); -+ TileEntity te = world.getTileEntity(pos); -+ if (te instanceof TileEntityCampfire) { -+ for (MobEffect effect : list) { -+ if (effect.getMobEffect() == MobEffects.REGENERATION) { -+ for (int i = 0; i < 6 ; i++) { -+ ((WorldServer) world).sendParticles(((WorldServer) world).players, null, Particles.HEART, te.position.getX(), te.position.getY() + 1, te.position.getZ(), 1, 0.5, 0.5, 0.5, 0, true); -+ } -+ ((TileEntityCampfire) te).splashed = true; -+ break; -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ // Purpur end -+ - private void splash() { - AxisAlignedBB axisalignedbb = this.getBoundingBox().grow(4.0D, 2.0D, 4.0D); - List list = this.world.a(EntityLiving.class, axisalignedbb, EntityPotion.e); -diff --git a/src/main/java/net/minecraft/server/TileEntityCampfire.java b/src/main/java/net/minecraft/server/TileEntityCampfire.java -index a1580b8c6..618ca2d76 100644 ---- a/src/main/java/net/minecraft/server/TileEntityCampfire.java -+++ b/src/main/java/net/minecraft/server/TileEntityCampfire.java -@@ -14,6 +14,7 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickab - private final NonNullList items; - public final int[] cookingTimes; - public final int[] cookingTotalTimes; -+ public boolean splashed = false; // Purpur - - public TileEntityCampfire() { - super(TileEntityTypes.CAMPFIRE); -@@ -34,6 +35,27 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickab - - } else { - if (flag) { -+ // Purpur start -+ if ((splashed || !world.purpurConfig.campfireRequireRegenPotion) && world.purpurConfig.campfireRegenInterval > 0 && world.getTime() % world.purpurConfig.campfireRegenInterval == 0L) { -+ boolean signalBoost = getBlock().get(BlockCampfire.signalFire()); -+ int duration = signalBoost ? world.purpurConfig.campfireRegenBoostDuration : world.purpurConfig.campfireRegenDuration; -+ byte amp = (byte) (signalBoost ? world.purpurConfig.campfireRegenBoostAmp : world.purpurConfig.campfireRegenAmp); -+ int range = signalBoost ? world.purpurConfig.campfireRegenBoostRange : world.purpurConfig.campfireRegenRange; -+ MobEffect regeneration = new MobEffect(MobEffects.REGENERATION, duration, amp, true, true); -+ world.getEntitiesByClass(EntityHuman.class, new AxisAlignedBB(position).grow(range)).forEach(entityhuman -> { -+ boolean noLineOfSign = true; -+ if (!signalBoost && world.purpurConfig.campfireRegenRequireLineOfSight) { -+ noLineOfSign = false; -+ } -+ if (signalBoost && world.purpurConfig.campfireRegenBoostRequireLineOfSight) { -+ noLineOfSign = false; -+ } -+ if (noLineOfSign || entityhuman.hasLineOfSight(this)) { -+ entityhuman.addEffect(regeneration); -+ } -+ }); -+ } -+ // Purpur end - this.h(); - } else { - for (int i = 0; i < this.items.size(); ++i) { -@@ -41,6 +63,7 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickab - this.cookingTimes[i] = MathHelper.clamp(this.cookingTimes[i] - 2, 0, this.cookingTotalTimes[i]); - } - } -+ splashed = false; // Purpur - } - - } -@@ -137,6 +160,12 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickab - System.arraycopy(aint, 0, this.cookingTotalTimes, 0, Math.min(this.cookingTotalTimes.length, aint.length)); - } - -+ // Purpur start -+ if (nbttagcompound.hasKey("Purpur.splashed")) { -+ splashed = nbttagcompound.getBoolean("Purpur.splashed"); -+ } -+ // Purpur end -+ - } - - @Override -@@ -144,6 +173,7 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickab - this.d(nbttagcompound); - nbttagcompound.setIntArray("CookingTimes", this.cookingTimes); - nbttagcompound.setIntArray("CookingTotalTimes", this.cookingTotalTimes); -+ nbttagcompound.setBoolean("Purpur.splashed", splashed); // Purpur - return nbttagcompound; - } - -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 94744c78b..d8d95d787 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -71,6 +71,29 @@ public class PurpurWorldConfig { - return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path)); - } - -+ public int campfireRegenInterval = 0; -+ public int campfireRegenDuration = 80; -+ public int campfireRegenRange = 5; -+ public int campfireRegenAmp = 0; -+ public boolean campfireRegenRequireLineOfSight = true; -+ public int campfireRegenBoostDuration = 0; -+ public int campfireRegenBoostRange = 10; -+ public int campfireRegenBoostAmp = 1; -+ public boolean campfireRegenBoostRequireLineOfSight = false; -+ public boolean campfireRequireRegenPotion = true; -+ private void campfireSettings() { -+ campfireRegenInterval = getInt("blocks.campfire.regen.interval", campfireRegenInterval); -+ campfireRegenDuration = getInt("blocks.campfire.regen.duration", campfireRegenDuration); -+ campfireRegenRange = getInt("blocks.campfire.regen.range", campfireRegenRange); -+ campfireRegenAmp = getInt("blocks.campfire.regen.amplifier", campfireRegenAmp); -+ campfireRegenRequireLineOfSight = getBoolean("blocks.campfire.regen.require-line-of-sight", campfireRegenRequireLineOfSight); -+ campfireRegenBoostDuration = getInt("blocks.campfire.regen.boost-duration", campfireRegenBoostDuration); -+ campfireRegenBoostRange = getInt("blocks.campfire.regen.boost-range", campfireRegenBoostRange); -+ campfireRegenBoostAmp = getInt("blocks.campfire.regen.boost-amplifier", campfireRegenBoostAmp); -+ campfireRegenBoostRequireLineOfSight = getBoolean("blocks.campfire.regen.boost-require-line-of-sight", campfireRegenBoostRequireLineOfSight); -+ campfireRequireRegenPotion = getBoolean("blocks.campfire.regen.requires-potion-to-activate", campfireRequireRegenPotion); -+ } -+ - public boolean farmlandGetsMoistFromBelow = false; - private void farmlandSettings() { - farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow); --- -2.26.2 - diff --git a/patches/removed/1.16/server/0036-Campfires-burn-out-in-rain.patch b/patches/removed/1.16/server/0036-Campfires-burn-out-in-rain.patch deleted file mode 100644 index bb4753ff0..000000000 --- a/patches/removed/1.16/server/0036-Campfires-burn-out-in-rain.patch +++ /dev/null @@ -1,82 +0,0 @@ -From e95433c37c07dd0343e1336c9a49661974ddc28f Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 6 Jun 2019 21:30:49 -0500 -Subject: [PATCH] Campfires burn out in rain - ---- - src/main/java/net/minecraft/server/Block.java | 2 +- - .../net/minecraft/server/BlockCampfire.java | 17 ++++++++++++++++- - .../java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++ - 3 files changed, 19 insertions(+), 2 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 9c7faa2bd..97e553b38 100644 ---- a/src/main/java/net/minecraft/server/Block.java -+++ b/src/main/java/net/minecraft/server/Block.java -@@ -395,7 +395,7 @@ public class Block implements IMaterial { - PacketDebug.a(world, blockposition); - } - -- public int a(IWorldReader iworldreader) { -+ public int a(IWorldReader world) { return tickRate(world); } public int tickRate(IWorldReader world) { // Purpur - OBFHELPER - return 10; - } - -diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java -index 65f8d803b..3b95dfaaa 100644 ---- a/src/main/java/net/minecraft/server/BlockCampfire.java -+++ b/src/main/java/net/minecraft/server/BlockCampfire.java -@@ -7,7 +7,7 @@ import javax.annotation.Nullable; - public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged { - - protected static final VoxelShape a = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 7.0D, 16.0D); -- public static final BlockStateBoolean b = BlockProperties.r; -+ public static final BlockStateBoolean b = BlockProperties.r; public static BlockStateBoolean lit() { return b; } // Purpur - OBFHELPER - public static final BlockStateBoolean c = BlockProperties.y; public static BlockStateBoolean signalFire() { return c; } // Purpur - OBFHELPER - public static final BlockStateBoolean d = BlockProperties.C; - public static final BlockStateDirection e = BlockProperties.N; -@@ -74,6 +74,21 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged - return (IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.getBlockData().set(BlockCampfire.d, flag)).set(BlockCampfire.c, this.h(world.getType(blockposition.down())))).set(BlockCampfire.b, !flag)).set(BlockCampfire.e, blockactioncontext.f()); - } - -+ // Purpur start -+ @Override -+ public void tick(IBlockData iblockdata, WorldServer world, BlockPosition pos, Random random) { -+ if (world.purpurConfig.campfireBurnOutInRain && world.getTime() % 20 == 0L && iblockdata.get(lit()) && world.isRainingAt(pos.shift(EnumDirection.UP))) { -+ world.setTypeAndData(pos, iblockdata.set(lit(), false), 3); -+ } -+ world.getBlockTickList().a(pos, this, tickRate(world)); -+ } -+ -+ @Override -+ public int tickRate(IWorldReader world) { -+ return 1; -+ } -+ // Purpur end -+ - @Override - public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { - if ((Boolean) iblockdata.get(BlockCampfire.d)) { -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 8c84431e5..a761b2c73 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -81,6 +81,7 @@ public class PurpurWorldConfig { - public int campfireRegenBoostAmp = 1; - public boolean campfireRegenBoostRequireLineOfSight = false; - public boolean campfireRequireRegenPotion = true; -+ public boolean campfireBurnOutInRain = false; - private void campfireSettings() { - campfireRegenInterval = getInt("blocks.campfire.regen.interval", campfireRegenInterval); - campfireRegenDuration = getInt("blocks.campfire.regen.duration", campfireRegenDuration); -@@ -92,6 +93,7 @@ public class PurpurWorldConfig { - campfireRegenBoostAmp = getInt("blocks.campfire.regen.boost-amplifier", campfireRegenBoostAmp); - campfireRegenBoostRequireLineOfSight = getBoolean("blocks.campfire.regen.boost-require-line-of-sight", campfireRegenBoostRequireLineOfSight); - campfireRequireRegenPotion = getBoolean("blocks.campfire.regen.requires-potion-to-activate", campfireRequireRegenPotion); -+ campfireBurnOutInRain = getBoolean("blocks.campfire.burn-out-in-rain", campfireBurnOutInRain); - } - - public boolean farmlandGetsMoistFromBelow = false; --- -2.26.2 - diff --git a/patches/removed/1.16/server/0037-Campfires-should-fall-with-gravity.patch b/patches/removed/1.16/server/0037-Campfires-should-fall-with-gravity.patch deleted file mode 100644 index 0db8bb44b..000000000 --- a/patches/removed/1.16/server/0037-Campfires-should-fall-with-gravity.patch +++ /dev/null @@ -1,83 +0,0 @@ -From dd79210dd48515873533b7a50d14eab5db537495 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 23 May 2019 16:20:21 -0500 -Subject: [PATCH] Campfires should fall with gravity - ---- - .../java/net/minecraft/server/BlockCampfire.java | 16 ++++++++++++++-- - .../java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++ - 2 files changed, 16 insertions(+), 2 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java -index 3b95dfaaa..418fa6d1f 100644 ---- a/src/main/java/net/minecraft/server/BlockCampfire.java -+++ b/src/main/java/net/minecraft/server/BlockCampfire.java -@@ -9,7 +9,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged - protected static final VoxelShape a = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 7.0D, 16.0D); - public static final BlockStateBoolean b = BlockProperties.r; public static BlockStateBoolean lit() { return b; } // Purpur - OBFHELPER - public static final BlockStateBoolean c = BlockProperties.y; public static BlockStateBoolean signalFire() { return c; } // Purpur - OBFHELPER -- public static final BlockStateBoolean d = BlockProperties.C; -+ public static final BlockStateBoolean d = BlockProperties.C; public static BlockStateBoolean waterlogged() { return d; } // Purpur - OBFHELPER - public static final BlockStateDirection e = BlockProperties.N; - private static final VoxelShape f = Block.a(6.0D, 0.0D, 6.0D, 10.0D, 16.0D, 10.0D); - -@@ -75,8 +75,19 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged - } - - // Purpur start -+ @Override -+ public void onPlace(IBlockData iblockdata, World world, BlockPosition pos, IBlockData iblockdata1, boolean flag) { -+ world.getBlockTickList().a(pos, this, tickRate(world)); -+ } -+ - @Override - public void tick(IBlockData iblockdata, WorldServer world, BlockPosition pos, Random random) { -+ if (world.purpurConfig.campfireFallWithGravity && BlockFalling.canFallThrough(world.getType(pos.down())) && pos.getY() >= 0) { -+ world.addEntity(new EntityFallingBlock(world, pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, world.getType(pos))); -+ } -+ if (iblockdata.get(waterlogged()) && iblockdata.get(lit())) { -+ world.setTypeAndData(pos, iblockdata.set(lit(), false), 3); -+ } - if (world.purpurConfig.campfireBurnOutInRain && world.getTime() % 20 == 0L && iblockdata.get(lit()) && world.isRainingAt(pos.shift(EnumDirection.UP))) { - world.setTypeAndData(pos, iblockdata.set(lit(), false), 3); - } -@@ -91,6 +102,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged - - @Override - public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { -+ generatoraccess.getBlockTickList().a(blockposition, this, tickRate(generatoraccess)); // Purpur - Campfires should fall with gravity - if ((Boolean) iblockdata.get(BlockCampfire.d)) { - generatoraccess.getFluidTickList().a(blockposition, FluidTypes.WATER, FluidTypes.WATER.a((IWorldReader) generatoraccess)); - } -@@ -119,7 +131,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged - - @Override - public boolean place(GeneratorAccess generatoraccess, BlockPosition blockposition, IBlockData iblockdata, Fluid fluid) { -- if (!(Boolean) iblockdata.get(BlockProperties.C) && fluid.getType() == FluidTypes.WATER) { -+ if (!(Boolean) iblockdata.get(BlockCampfire.d) && fluid.getType() == FluidTypes.WATER) { // Purpur - boolean flag = (Boolean) iblockdata.get(BlockCampfire.b); - - if (flag) { -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index a761b2c73..d6405b2ec 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -82,6 +82,7 @@ public class PurpurWorldConfig { - public boolean campfireRegenBoostRequireLineOfSight = false; - public boolean campfireRequireRegenPotion = true; - public boolean campfireBurnOutInRain = false; -+ public boolean campfireFallWithGravity = false; - private void campfireSettings() { - campfireRegenInterval = getInt("blocks.campfire.regen.interval", campfireRegenInterval); - campfireRegenDuration = getInt("blocks.campfire.regen.duration", campfireRegenDuration); -@@ -94,6 +95,7 @@ public class PurpurWorldConfig { - campfireRegenBoostRequireLineOfSight = getBoolean("blocks.campfire.regen.boost-require-line-of-sight", campfireRegenBoostRequireLineOfSight); - campfireRequireRegenPotion = getBoolean("blocks.campfire.regen.requires-potion-to-activate", campfireRequireRegenPotion); - campfireBurnOutInRain = getBoolean("blocks.campfire.burn-out-in-rain", campfireBurnOutInRain); -+ campfireFallWithGravity = getBoolean("blocks.campfire.fall-with-gravity", campfireFallWithGravity); - } - - public boolean farmlandGetsMoistFromBelow = false; --- -2.26.2 - diff --git a/patches/removed/1.16/server/0043-Pillager-limits-and-leaders-chance.patch b/patches/removed/1.16/server/0043-Pillager-limits-and-leaders-chance.patch deleted file mode 100644 index 788736703..000000000 --- a/patches/removed/1.16/server/0043-Pillager-limits-and-leaders-chance.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 48d14d7c57478a6af1c85d20a59ebef69b43ec9e Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Mon, 22 Jul 2019 14:24:26 -0500 -Subject: [PATCH] Pillager limits and leaders chance - ---- - .../java/net/minecraft/server/ChunkProviderGenerate.java | 1 + - .../java/net/minecraft/server/EntityMonsterPatrolling.java | 7 ++++++- - src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 6 ++++++ - 3 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -index 70f43c515..fa08b8e1a 100644 ---- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -+++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -@@ -143,6 +143,7 @@ public class ChunkProviderGenerate extends ChunkGeneratorAbstract -Date: Thu, 16 Jan 2020 14:59:16 -0600 -Subject: [PATCH] Make the GUI better - ---- - .../net/minecraft/server/DedicatedServer.java | 9 +- - .../net/minecraft/server/MinecraftServer.java | 1 + - .../java/net/pl3x/purpur/gui/ServerGUI.java | 123 +++++++++++++++ - .../purpur/gui/console/JColorTextPane.java | 81 ++++++++++ - .../purpur/gui/console/JConsolePanel.java | 128 ++++++++++++++++ - .../gui/info/DetailsListSelectionModel.java | 21 +++ - .../net/pl3x/purpur/gui/info/JInfoPanel.java | 42 +++++ - .../net/pl3x/purpur/gui/info/RAMDetails.java | 59 +++++++ - .../purpur/gui/info/graph/GraphColor.java | 44 ++++++ - .../pl3x/purpur/gui/info/graph/GraphData.java | 47 ++++++ - .../pl3x/purpur/gui/info/graph/RAMGraph.java | 144 ++++++++++++++++++ - .../purpur/gui/playerlist/JPlayerList.java | 57 +++++++ - .../playerlist/PlayerListCellRenderer.java | 22 +++ - .../gui/playerlist/PlayerListModel.java | 47 ++++++ - .../playerlist/PlayerListMouseAdapter.java | 32 ++++ - .../net/pl3x/purpur/gui/util/GUIColor.java | 54 +++++++ - .../purpur/util/HighlightErrorConverter.java | 86 +++++++++++ - src/main/resources/log4j2.xml | 13 +- - 18 files changed, 1005 insertions(+), 5 deletions(-) - create mode 100644 src/main/java/net/pl3x/purpur/gui/ServerGUI.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/console/JColorTextPane.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/console/JConsolePanel.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/info/DetailsListSelectionModel.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/info/JInfoPanel.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/info/RAMDetails.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/info/graph/GraphColor.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/info/graph/GraphData.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/info/graph/RAMGraph.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/playerlist/JPlayerList.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListCellRenderer.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListModel.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListMouseAdapter.java - create mode 100644 src/main/java/net/pl3x/purpur/gui/util/GUIColor.java - create mode 100644 src/main/java/net/pl3x/purpur/util/HighlightErrorConverter.java - -diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 3190c709a..7f2db5f0b 100644 ---- a/src/main/java/net/minecraft/server/DedicatedServer.java -+++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -8,6 +8,8 @@ import com.mojang.authlib.GameProfileRepository; - import com.mojang.authlib.minecraft.MinecraftSessionService; - import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; - import com.mojang.datafixers.DataFixer; -+ -+import java.awt.GraphicsEnvironment; - import java.io.BufferedReader; - import java.io.File; - import java.io.IOException; -@@ -51,7 +53,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - public DedicatedServerSettings propertyManager; - private EnumGamemode o; - @Nullable -- private ServerGUI p; -+ private net.pl3x.purpur.gui.ServerGUI p; // Purpur - - // CraftBukkit start - Signature changed - public DedicatedServer(joptsimple.OptionSet options, DedicatedServerSettings dedicatedserversettings, DataFixer datafixer, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory, String s) { -@@ -87,6 +89,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - return; - } - // Paper start - Use TerminalConsoleAppender -+ if (DedicatedServer.this.p == null || System.console() != null) // Purpur - has no GUI or has console (did not double click) - new com.destroystokyo.paper.console.PaperConsole(DedicatedServer.this).start(); - /* - jline.console.ConsoleReader bufferedreader = reader; -@@ -421,7 +424,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - @Override - public void exit() { - if (this.p != null) { -- this.p.b(); -+ this.p.close(); // Purpur - } - - if (this.remoteControlListener != null) { -@@ -521,7 +524,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - - public void bc() { - if (this.p == null) { -- this.p = ServerGUI.a(this); -+ this.p = net.pl3x.purpur.gui.ServerGUI.create(this); // Purpur - } - - } -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 28d92cbce..da8c98356 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1435,6 +1435,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant finalizers = Lists.newArrayList(); -+ private final AtomicBoolean isClosing = new AtomicBoolean(); -+ -+ private JConsolePanel consolePanel; -+ -+ public static ServerGUI create(final DedicatedServer dedicatedserver) { -+ try { -+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); -+ } catch (Exception ignore) { -+ } -+ -+ JFrame window = new JFrame("Purpur Minecraft Server"); -+ ServerGUI serverGUI = new ServerGUI(dedicatedserver); -+ -+ window.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); -+ window.add(serverGUI); -+ window.pack(); -+ window.setLocationRelativeTo(null); -+ window.setVisible(true); -+ -+ window.addWindowListener(new WindowAdapter() { -+ @Override -+ public void windowClosing(WindowEvent windowevent) { -+ if (!serverGUI.isClosing.getAndSet(true)) { -+ window.setTitle("Purpur Minecraft Server - Shutting Down!"); -+ dedicatedserver.safeShutdown(true); -+ serverGUI.runFinalizers(); -+ } -+ -+ } -+ }); -+ -+ serverGUI.addFinalizer(window::dispose); -+ serverGUI.start(); -+ -+ return serverGUI; -+ } -+ -+ private ServerGUI(DedicatedServer dedicatedserver) { -+ this.server = dedicatedserver; -+ -+ setPreferredSize(new Dimension(854, 480)); -+ setLayout(new BorderLayout()); -+ -+ consolePanel = new JConsolePanel(server); -+ -+ try { -+ add(consolePanel, "Center"); -+ add(buildInfoPanel(), "West"); -+ } catch (Exception exception) { -+ LOGGER.error("Couldn't build server GUI", exception); -+ } -+ } -+ -+ private void addFinalizer(Runnable runnable) { -+ finalizers.add(runnable); -+ } -+ -+ private JComponent buildInfoPanel() { -+ JPanel jpanel = new JPanel(new BorderLayout()); -+ -+ JInfoPanel serverInfo = new JInfoPanel(server); -+ finalizers.add(serverInfo::stop); -+ -+ jpanel.add(serverInfo, "North"); -+ jpanel.add(buildPlayerPanel(), "Center"); -+ -+ jpanel.setBorder(new TitledBorder(new EtchedBorder(), "Stats")); -+ return jpanel; -+ } -+ -+ private JComponent buildPlayerPanel() { -+ JScrollPane jscrollpane = new JScrollPane(new JPlayerList(server), ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); -+ jscrollpane.setBorder(new TitledBorder(new EtchedBorder(), "Players")); -+ return jscrollpane; -+ } -+ -+ public void start() { -+ consolePanel.start(); -+ } -+ -+ public void close() { -+ if (!isClosing.getAndSet(true)) { -+ runFinalizers(); -+ } -+ -+ } -+ -+ private void runFinalizers() { -+ finalizers.forEach(Runnable::run); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/console/JColorTextPane.java b/src/main/java/net/pl3x/purpur/gui/console/JColorTextPane.java -new file mode 100644 -index 000000000..55feec811 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/console/JColorTextPane.java -@@ -0,0 +1,81 @@ -+package net.pl3x.purpur.gui.console; -+ -+import net.md_5.bungee.api.ChatColor; -+import net.md_5.bungee.api.chat.BaseComponent; -+import net.md_5.bungee.api.chat.TextComponent; -+import net.pl3x.purpur.gui.util.GUIColor; -+ -+import javax.swing.JTextPane; -+import javax.swing.Timer; -+import javax.swing.text.AttributeSet; -+import javax.swing.text.BadLocationException; -+import javax.swing.text.SimpleAttributeSet; -+import javax.swing.text.StyleConstants; -+import javax.swing.text.StyleContext; -+import java.util.HashSet; -+import java.util.Set; -+ -+public class JColorTextPane extends JTextPane { -+ private static final GUIColor DEFAULT_COLOR = GUIColor.BLACK; -+ -+ public void append(String str) { -+ BaseComponent[] components = TextComponent.fromLegacyText(DEFAULT_COLOR.getCode() + str, ChatColor.BLACK); -+ for (BaseComponent component : components) { -+ String text = component.toPlainText(); -+ if (text == null || text.isEmpty()) { -+ continue; -+ } -+ -+ GUIColor guiColor = GUIColor.getColor(component.getColor()); -+ -+ StyleContext context = StyleContext.getDefaultStyleContext(); -+ AttributeSet attr = context.addAttribute(SimpleAttributeSet.EMPTY, StyleConstants.Foreground, guiColor.getColor()); -+ attr = context.addAttribute(attr, StyleConstants.CharacterConstants.Bold, component.isBold() || guiColor != DEFAULT_COLOR); -+ attr = context.addAttribute(attr, StyleConstants.CharacterConstants.Italic, component.isItalic()); -+ attr = context.addAttribute(attr, StyleConstants.CharacterConstants.Underline, component.isUnderlined()); -+ attr = context.addAttribute(attr, StyleConstants.CharacterConstants.StrikeThrough, component.isStrikethrough()); -+ //attr = context.addAttribute(attr, StyleConstants.CharacterConstants.Blink, component.isObfuscated()); // no such thing as Blink, sadly -+ -+ try { -+ int pos = getDocument().getLength(); -+ getDocument().insertString(pos, text, attr); -+ -+ if (component.isObfuscated()) { -+ // dirty hack to blink some text -+ Blink blink = new Blink(pos, text.length(), attr, context.addAttribute(attr, StyleConstants.Foreground, getBackground())); -+ BLINKS.add(blink); -+ } -+ } catch (BadLocationException e) { -+ e.printStackTrace(); -+ } -+ } -+ } -+ -+ private static final Set BLINKS = new HashSet<>(); -+ private static boolean SYNC_BLINK; -+ -+ static { -+ Timer timer = new Timer(500, e -> { -+ SYNC_BLINK = !SYNC_BLINK; -+ BLINKS.forEach(Blink::blink); -+ }); -+ timer.start(); -+ } -+ -+ public class Blink { -+ private final int start, length; -+ private final AttributeSet attr1; -+ private final AttributeSet attr2; -+ -+ private Blink(int start, int length, AttributeSet attr1, AttributeSet attr2) { -+ this.start = start; -+ this.length = length; -+ this.attr1 = attr1; -+ this.attr2 = attr2; -+ } -+ -+ private void blink() { -+ getStyledDocument().setCharacterAttributes(start, length, SYNC_BLINK ? attr1 : attr2, true); -+ } -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/console/JConsolePanel.java b/src/main/java/net/pl3x/purpur/gui/console/JConsolePanel.java -new file mode 100644 -index 000000000..fb017a070 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/console/JConsolePanel.java -@@ -0,0 +1,128 @@ -+package net.pl3x.purpur.gui.console; -+ -+import com.mojang.util.QueueLogAppender; -+import net.minecraft.server.DedicatedServer; -+import net.minecraft.server.DefaultUncaughtExceptionHandler; -+import org.apache.logging.log4j.LogManager; -+import org.apache.logging.log4j.Logger; -+ -+import javax.swing.AbstractAction; -+import javax.swing.JPanel; -+import javax.swing.JScrollBar; -+import javax.swing.JScrollPane; -+import javax.swing.JTextField; -+import javax.swing.KeyStroke; -+import javax.swing.ScrollPaneConstants; -+import javax.swing.SwingUtilities; -+import javax.swing.border.EtchedBorder; -+import javax.swing.border.TitledBorder; -+import java.awt.BorderLayout; -+import java.awt.Font; -+import java.awt.event.ActionEvent; -+import java.util.LinkedList; -+ -+public class JConsolePanel extends JPanel { -+ private static final Font MONOSPACED = new Font("Monospaced", Font.PLAIN, 12); -+ private static final Logger LOGGER = LogManager.getLogger(); -+ -+ private final CommandHistory history = new CommandHistory(); -+ private String currentCommand = ""; -+ private int historyIndex = 0; -+ -+ private Thread logAppenderThread; -+ -+ public JConsolePanel(DedicatedServer server) { -+ super(new BorderLayout()); -+ -+ JColorTextPane console = new JColorTextPane(); -+ console.setEditable(false); -+ console.setFont(MONOSPACED); -+ -+ JTextField jtextfield = new JTextField(); -+ jtextfield.addActionListener((actionevent) -> { -+ String msg = jtextfield.getText().trim(); -+ if (!msg.isEmpty()) { -+ server.issueCommand(msg, server.getServerCommandListener()); -+ history.add(msg); -+ historyIndex = -1; -+ } -+ jtextfield.setText(""); -+ }); -+ jtextfield.getInputMap().put(KeyStroke.getKeyStroke("UP"), "up"); -+ jtextfield.getInputMap().put(KeyStroke.getKeyStroke("DOWN"), "down"); -+ jtextfield.getActionMap().put("up", new AbstractAction() { -+ @Override -+ public void actionPerformed(ActionEvent actionEvent) { -+ if (historyIndex < 0) { -+ currentCommand = jtextfield.getText(); -+ } -+ if (historyIndex < history.size() - 1) { -+ jtextfield.setText(history.get(++historyIndex)); -+ } -+ } -+ }); -+ jtextfield.getActionMap().put("down", new AbstractAction() { -+ @Override -+ public void actionPerformed(ActionEvent actionEvent) { -+ if (historyIndex >= 0) { -+ if (historyIndex == 0) { -+ --historyIndex; -+ jtextfield.setText(currentCommand); -+ } else { -+ --historyIndex; -+ jtextfield.setText(history.get(historyIndex)); -+ } -+ } -+ } -+ }); -+ -+ JScrollPane jscrollpane = new JScrollPane(console, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); -+ -+ add(jscrollpane, "Center"); -+ add(jtextfield, "South"); -+ setBorder(new TitledBorder(new EtchedBorder(), "Console")); -+ -+ logAppenderThread = new Thread(() -> { -+ String msg; -+ while ((msg = QueueLogAppender.getNextLogEvent("ServerGuiConsole")) != null) { -+ this.print(console, jscrollpane, msg); -+ } -+ -+ }); -+ logAppenderThread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)); -+ logAppenderThread.setDaemon(true); -+ } -+ -+ public void start() { -+ logAppenderThread.start(); -+ } -+ -+ private void print(JColorTextPane console, JScrollPane jscrollpane, String str) { -+ if (!SwingUtilities.isEventDispatchThread()) { -+ SwingUtilities.invokeLater(() -> print(console, jscrollpane, str)); -+ } else { -+ JScrollBar jscrollbar = jscrollpane.getVerticalScrollBar(); -+ boolean scrollToBottom = false; -+ -+ if (jscrollpane.getViewport().getView() == console) { -+ scrollToBottom = (double) jscrollbar.getValue() + jscrollbar.getSize().getHeight() + (double) (MONOSPACED.getSize() * 4) > (double) jscrollbar.getMaximum(); -+ } -+ -+ console.append(str); -+ -+ if (scrollToBottom) { -+ jscrollbar.setValue(Integer.MAX_VALUE); -+ } -+ } -+ } -+ -+ public static class CommandHistory extends LinkedList { -+ @Override -+ public boolean add(String command) { -+ if (size() > 1000) { -+ remove(); -+ } -+ return super.offerFirst(command); -+ } -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/info/DetailsListSelectionModel.java b/src/main/java/net/pl3x/purpur/gui/info/DetailsListSelectionModel.java -new file mode 100644 -index 000000000..4e0b80fdd ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/info/DetailsListSelectionModel.java -@@ -0,0 +1,21 @@ -+package net.pl3x.purpur.gui.info; -+ -+import javax.swing.DefaultListSelectionModel; -+ -+public class DetailsListSelectionModel extends DefaultListSelectionModel { -+ @Override -+ public void setAnchorSelectionIndex(final int anchorIndex) { -+ } -+ -+ @Override -+ public void setLeadAnchorNotificationEnabled(final boolean flag) { -+ } -+ -+ @Override -+ public void setLeadSelectionIndex(final int leadIndex) { -+ } -+ -+ @Override -+ public void setSelectionInterval(final int index0, final int index1) { -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/info/JInfoPanel.java b/src/main/java/net/pl3x/purpur/gui/info/JInfoPanel.java -new file mode 100644 -index 000000000..c4903c7db ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/info/JInfoPanel.java -@@ -0,0 +1,42 @@ -+package net.pl3x.purpur.gui.info; -+ -+import net.minecraft.server.MinecraftServer; -+import net.pl3x.purpur.gui.info.graph.RAMGraph; -+ -+import javax.swing.JPanel; -+import javax.swing.Timer; -+import java.awt.BorderLayout; -+import java.awt.Dimension; -+ -+public class JInfoPanel extends JPanel { -+ private final Timer timer; -+ private final RAMGraph ramGraph; -+ -+ public JInfoPanel(MinecraftServer server) { -+ super(new BorderLayout()); -+ -+ setOpaque(false); -+ -+ ramGraph = new RAMGraph(); -+ RAMDetails ramDetails = new RAMDetails(server); -+ -+ add(ramGraph, "North"); -+ add(ramDetails, "Center"); -+ -+ timer = new Timer(500, (event) -> { -+ ramGraph.update(); -+ ramDetails.update(); -+ }); -+ timer.start(); -+ } -+ -+ @Override -+ public Dimension getPreferredSize() { -+ return new Dimension(350, 200); -+ } -+ -+ public void stop() { -+ timer.stop(); -+ ramGraph.stop(); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/info/RAMDetails.java b/src/main/java/net/pl3x/purpur/gui/info/RAMDetails.java -new file mode 100644 -index 000000000..1e049d575 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/info/RAMDetails.java -@@ -0,0 +1,59 @@ -+package net.pl3x.purpur.gui.info; -+ -+import net.minecraft.server.MinecraftServer; -+import net.minecraft.server.SystemUtils; -+import net.pl3x.purpur.gui.info.graph.GraphData; -+import net.pl3x.purpur.gui.info.graph.RAMGraph; -+import org.bukkit.Bukkit; -+ -+import javax.swing.DefaultListCellRenderer; -+import javax.swing.JList; -+import javax.swing.border.EmptyBorder; -+import java.awt.Dimension; -+import java.text.DecimalFormat; -+import java.text.DecimalFormatSymbols; -+import java.util.Locale; -+import java.util.Vector; -+ -+public class RAMDetails extends JList { -+ private static final DecimalFormat DECIMAL_FORMAT = SystemUtils.a(new DecimalFormat("########0.000"), (format) -+ -> format.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT))); -+ -+ private final MinecraftServer server; -+ -+ public RAMDetails(MinecraftServer server) { -+ this.server = server; -+ -+ setBorder(new EmptyBorder(0, 10, 0, 0)); -+ setFixedCellHeight(20); -+ setOpaque(false); -+ -+ DefaultListCellRenderer renderer = new DefaultListCellRenderer(); -+ renderer.setOpaque(false); -+ setCellRenderer(renderer); -+ -+ setSelectionModel(new DetailsListSelectionModel()); -+ } -+ -+ @Override -+ public Dimension getPreferredSize() { -+ return new Dimension(350, 100); -+ } -+ -+ public void update() { -+ GraphData data = RAMGraph.DATA.peekLast(); -+ Vector vector = new Vector<>(); -+ vector.add("Memory use: " + (data.getUsedMem() / 1024L / 1024L) + " mb (" + (data.getFree() * 100L / data.getMax()) + "% free)"); -+ vector.add("Heap: " + (data.getTotal() / 1024L / 1024L) + " / " + (data.getMax() / 1024L / 1024L) + " mb"); -+ vector.add("Avg tick: " + DECIMAL_FORMAT.format(server.tickTimes5s.getAverage()) + " ms"); -+ setListData(vector); -+ } -+ -+ private double getAverage(long[] values) { -+ long total = 0L; -+ for (long value : values) { -+ total += value; -+ } -+ return (double) total / (double) values.length; -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/info/graph/GraphColor.java b/src/main/java/net/pl3x/purpur/gui/info/graph/GraphColor.java -new file mode 100644 -index 000000000..2fdb9bdd0 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/info/graph/GraphColor.java -@@ -0,0 +1,44 @@ -+package net.pl3x.purpur.gui.info.graph; -+ -+import java.awt.Color; -+ -+public class GraphColor { -+ private static final Color[] colorLine = new Color[101]; -+ private static final Color[] colorFill = new Color[101]; -+ -+ static { -+ for (int i = 0; i < 101; i++) { -+ Color color = createColor(i); -+ colorLine[i] = new Color(color.getRed() / 2, color.getGreen() / 2, color.getBlue() / 2, 255); -+ colorFill[i] = new Color(colorLine[i].getRed(), colorLine[i].getGreen(), colorLine[i].getBlue(), 125); -+ } -+ } -+ -+ public static Color getLineColor(int percent) { -+ return colorLine[percent]; -+ } -+ -+ public static Color getFillColor(int percent) { -+ return colorFill[percent]; -+ } -+ -+ private static Color createColor(int percent) { -+ if (percent <= 50) { -+ return new Color(0X00FF00); -+ } -+ -+ int value = 510 - (int) (Math.min(Math.max(0, ((percent - 50) / 50F)), 1) * 510); -+ -+ int red, green; -+ if (value < 255) { -+ red = 255; -+ green = (int) (Math.sqrt(value) * 16); -+ } else { -+ green = 255; -+ value = value - 255; -+ red = 255 - (value * value / 255); -+ } -+ -+ return new Color(red, green, 0); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/info/graph/GraphData.java b/src/main/java/net/pl3x/purpur/gui/info/graph/GraphData.java -new file mode 100644 -index 000000000..85babad9c ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/info/graph/GraphData.java -@@ -0,0 +1,47 @@ -+package net.pl3x.purpur.gui.info.graph; -+ -+import java.awt.Color; -+ -+public class GraphData { -+ private long total; -+ private long free; -+ private long max; -+ private long usedMem; -+ private int usedPercent; -+ -+ public GraphData(long total, long free, long max) { -+ this.total = total; -+ this.free = free; -+ this.max = max; -+ this.usedMem = total - free; -+ this.usedPercent = usedMem == 0 ? 0 : (int) (usedMem * 100L / max); -+ } -+ -+ public long getTotal() { -+ return total; -+ } -+ -+ public long getFree() { -+ return free; -+ } -+ -+ public long getMax() { -+ return max; -+ } -+ -+ public long getUsedMem() { -+ return usedMem; -+ } -+ -+ public int getUsedPercent() { -+ return usedPercent; -+ } -+ -+ public Color getFillColor() { -+ return GraphColor.getFillColor(usedPercent); -+ } -+ -+ public Color getLineColor() { -+ return GraphColor.getLineColor(usedPercent); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/info/graph/RAMGraph.java b/src/main/java/net/pl3x/purpur/gui/info/graph/RAMGraph.java -new file mode 100644 -index 000000000..0c0c73bee ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/info/graph/RAMGraph.java -@@ -0,0 +1,144 @@ -+package net.pl3x.purpur.gui.info.graph; -+ -+import javax.swing.JComponent; -+import javax.swing.SwingUtilities; -+import javax.swing.Timer; -+import javax.swing.ToolTipManager; -+import java.awt.Color; -+import java.awt.Dimension; -+import java.awt.Graphics; -+import java.awt.MouseInfo; -+import java.awt.Point; -+import java.awt.PointerInfo; -+import java.awt.event.MouseAdapter; -+import java.awt.event.MouseEvent; -+import java.text.SimpleDateFormat; -+import java.util.Date; -+import java.util.LinkedList; -+import java.util.concurrent.TimeUnit; -+ -+public class RAMGraph extends JComponent { -+ public static final LinkedList DATA = new LinkedList() { -+ @Override -+ public boolean add(GraphData data) { -+ if (size() >= 348) { -+ remove(); -+ } -+ return super.add(data); -+ } -+ }; -+ -+ static { -+ GraphData empty = new GraphData(0, 0, 0); -+ for (int i = 0; i < 350; i++) { -+ DATA.add(empty); -+ } -+ } -+ -+ private final Timer timer; -+ private final SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm:ss"); -+ -+ private int currentTick; -+ -+ public RAMGraph() { -+ ToolTipManager.sharedInstance().setInitialDelay(0); -+ -+ addMouseListener(new MouseAdapter() { -+ final int defaultDismissTimeout = ToolTipManager.sharedInstance().getDismissDelay(); -+ final int dismissDelayMinutes = (int) TimeUnit.MINUTES.toMillis(10); -+ -+ @Override -+ public void mouseEntered(MouseEvent me) { -+ ToolTipManager.sharedInstance().setDismissDelay(dismissDelayMinutes); -+ } -+ -+ @Override -+ public void mouseExited(MouseEvent me) { -+ ToolTipManager.sharedInstance().setDismissDelay(defaultDismissTimeout); -+ } -+ }); -+ -+ timer = new Timer(50, (event) -> repaint()); -+ timer.start(); -+ } -+ -+ @Override -+ public Dimension getPreferredSize() { -+ return new Dimension(350, 110); -+ } -+ -+ public void update() { -+ Runtime jvm = Runtime.getRuntime(); -+ DATA.add(new GraphData(jvm.totalMemory(), jvm.freeMemory(), jvm.maxMemory())); -+ -+ PointerInfo pointerInfo = MouseInfo.getPointerInfo(); -+ if (pointerInfo != null) { -+ Point point = pointerInfo.getLocation(); -+ if (point != null) { -+ Point loc = new Point(point); -+ SwingUtilities.convertPointFromScreen(loc, this); -+ if (this.contains(loc)) { -+ ToolTipManager.sharedInstance().mouseMoved( -+ new MouseEvent(this, -1, System.currentTimeMillis(), 0, loc.x, loc.y, -+ point.x, point.y, 0, false, 0)); -+ } -+ } -+ } -+ -+ currentTick++; -+ } -+ -+ @Override -+ public void paint(Graphics graphics) { -+ graphics.setColor(new Color(0xFFFFFFFF)); -+ graphics.fillRect(0, 0, 350, 100); -+ -+ graphics.setColor(new Color(0x888888)); -+ graphics.drawLine(1, 25, 348, 25); -+ graphics.drawLine(1, 50, 348, 50); -+ graphics.drawLine(1, 75, 348, 75); -+ -+ int i = 0; -+ for (GraphData data : DATA) { -+ i++; -+ if ((i + currentTick) % 120 == 0) { -+ graphics.setColor(new Color(0x888888)); -+ graphics.drawLine(i, 1, i, 99); -+ } -+ int used = data.getUsedPercent(); -+ if (used > 0) { -+ Color color = data.getLineColor(); -+ graphics.setColor(data.getFillColor()); -+ graphics.fillRect(i, 100 - used, 1, used); -+ graphics.setColor(color); -+ graphics.fillRect(i, 100 - used, 1, 1); -+ } -+ } -+ -+ graphics.setColor(new Color(0xFF000000)); -+ graphics.drawRect(0, 0, 348, 100); -+ -+ Point m = getMousePosition(); -+ if (m != null && m.x > 0 && m.x < 348 && m.y > 0 && m.y < 100) { -+ GraphData data = DATA.get(m.x); -+ int used = data.getUsedPercent(); -+ graphics.setColor(new Color(0x000000)); -+ graphics.drawLine(m.x, 1, m.x, 99); -+ graphics.drawOval(m.x - 2, 100 - used - 2, 5, 5); -+ graphics.setColor(data.getLineColor()); -+ graphics.fillOval(m.x - 2, 100 - used - 2, 5, 5); -+ setToolTipText(String.format("Used: %s mb (%s%%)
%s", -+ Math.round(data.getUsedMem() / 1024F / 1024F), -+ used, getTime(m.x))); -+ } -+ } -+ -+ public String getTime(int halfSeconds) { -+ int millis = (348 - halfSeconds) / 2 * 1000; -+ return TIME_FORMAT.format(new Date((System.currentTimeMillis() - millis))); -+ } -+ -+ public void stop() { -+ timer.stop(); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/playerlist/JPlayerList.java b/src/main/java/net/pl3x/purpur/gui/playerlist/JPlayerList.java -new file mode 100644 -index 000000000..17e75a207 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/playerlist/JPlayerList.java -@@ -0,0 +1,57 @@ -+package net.pl3x.purpur.gui.playerlist; -+ -+import net.minecraft.server.EntityPlayer; -+import net.minecraft.server.MinecraftServer; -+ -+import javax.swing.JList; -+import javax.swing.JMenuItem; -+import javax.swing.JPopupMenu; -+import javax.swing.ListSelectionModel; -+import java.awt.Dimension; -+ -+public class JPlayerList extends JList { -+ private final MinecraftServer server; -+ private final PlayerListModel model; -+ private final JPopupMenu popupMenu; -+ private int currentSelection = -1; -+ private int tickCount; -+ -+ public JPlayerList(MinecraftServer server) { -+ this.server = server; -+ server.addTickable(this::tick); -+ -+ setModel(model = new PlayerListModel(this)); -+ setSelectionMode(ListSelectionModel.SINGLE_SELECTION); -+ addListSelectionListener(event -> currentSelection = event.getFirstIndex()); -+ addMouseListener(new PlayerListMouseAdapter(this)); -+ setCellRenderer(new PlayerListCellRenderer()); -+ -+ popupMenu = new JPopupMenu(); -+ popupMenu.add(new JMenuItem("Details")); -+ popupMenu.add(new JPopupMenu.Separator()); -+ popupMenu.add(new JMenuItem("Kick")); -+ popupMenu.add(new JMenuItem("Ban")); -+ popupMenu.add(new JPopupMenu.Separator()); -+ popupMenu.add(new JMenuItem("Op")); -+ } -+ -+ @Override -+ public Dimension getPreferredSize() { -+ Dimension superPref = super.getPreferredSize(); -+ return new Dimension(330, superPref.height); -+ } -+ -+ public void tick() { -+ if (tickCount++ % 20 == 0) { -+ model.update(server.getPlayerList().getPlayers()); -+ } -+ } -+ -+ public int getCurrentSelection() { -+ return currentSelection; -+ } -+ -+ public JPopupMenu getPopupMenu() { -+ return popupMenu; -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListCellRenderer.java b/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListCellRenderer.java -new file mode 100644 -index 000000000..2f02e9adc ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListCellRenderer.java -@@ -0,0 +1,22 @@ -+package net.pl3x.purpur.gui.playerlist; -+ -+import com.mojang.authlib.GameProfile; -+import net.minecraft.server.EntityPlayer; -+ -+import javax.swing.DefaultListCellRenderer; -+import javax.swing.JList; -+import java.awt.Component; -+ -+public class PlayerListCellRenderer extends DefaultListCellRenderer { -+ @Override -+ public Component getListCellRendererComponent(JList list, Object player, int index, boolean isSelected, boolean cellHasFocus) { -+ super.getListCellRendererComponent(list, player, index, isSelected, cellHasFocus); -+ if (player instanceof EntityPlayer) { -+ GameProfile profile = ((EntityPlayer) player).getProfile(); -+ setText(profile.getName()); -+ setToolTipText(String.format("%s
%s", -+ profile.getName(), profile.getId())); -+ } -+ return this; -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListModel.java b/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListModel.java -new file mode 100644 -index 000000000..edbf45416 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListModel.java -@@ -0,0 +1,47 @@ -+package net.pl3x.purpur.gui.playerlist; -+ -+import net.minecraft.server.EntityPlayer; -+ -+import javax.swing.DefaultListModel; -+import java.util.Collection; -+import java.util.HashSet; -+import java.util.Set; -+ -+public class PlayerListModel extends DefaultListModel { -+ private final Set datas = new HashSet<>(); -+ private final JPlayerList parent; -+ -+ public PlayerListModel(JPlayerList parent) { -+ this.parent = parent; -+ } -+ -+ public void update(Collection players) { -+ boolean hadFocus = parent.hasFocus(); -+ -+ players.forEach(this::add); -+ -+ Set result = new HashSet<>(datas); -+ result.removeIf(players::contains); -+ result.forEach(this::remove); -+ -+ if (parent.getCurrentSelection() >= 0) { -+ parent.setSelectedIndex(parent.getCurrentSelection()); -+ } -+ -+ if (hadFocus) { -+ parent.grabFocus(); -+ } -+ } -+ -+ public void add(EntityPlayer player) { -+ if (datas.add(player)) { -+ addElement(player); -+ } -+ } -+ -+ public void remove(EntityPlayer player) { -+ if (datas.remove(player)) { -+ removeElement(player); -+ } -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListMouseAdapter.java b/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListMouseAdapter.java -new file mode 100644 -index 000000000..13a5eb3ad ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/playerlist/PlayerListMouseAdapter.java -@@ -0,0 +1,32 @@ -+package net.pl3x.purpur.gui.playerlist; -+ -+import javax.swing.SwingUtilities; -+import java.awt.event.MouseAdapter; -+import java.awt.event.MouseEvent; -+ -+public class PlayerListMouseAdapter extends MouseAdapter { -+ private final JPlayerList parent; -+ -+ public PlayerListMouseAdapter(JPlayerList parent) { -+ this.parent = parent; -+ } -+ -+ @Override -+ public void mousePressed(MouseEvent event) { -+ if (!SwingUtilities.isRightMouseButton(event)) { -+ return; -+ } -+ -+ parent.setSelectedIndex(parent.locationToIndex(event.getPoint())); -+ -+ if (parent.isSelectionEmpty()) { -+ return; -+ } -+ -+ if (parent.locationToIndex(event.getPoint()) != parent.getSelectedIndex()) { -+ return; -+ } -+ -+ parent.getPopupMenu().show(parent, event.getX(), event.getY()); -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/gui/util/GUIColor.java b/src/main/java/net/pl3x/purpur/gui/util/GUIColor.java -new file mode 100644 -index 000000000..973c8ddf9 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/util/GUIColor.java -@@ -0,0 +1,54 @@ -+package net.pl3x.purpur.gui.util; -+ -+import net.md_5.bungee.api.ChatColor; -+ -+import java.awt.Color; -+import java.util.HashMap; -+import java.util.Map; -+ -+public enum GUIColor { -+ BLACK(ChatColor.BLACK, new Color(0x000000)), -+ DARK_BLUE(ChatColor.DARK_BLUE, new Color(0x0000AA)), -+ DARK_GREEN(ChatColor.DARK_GREEN, new Color(0x00AA00)), -+ DARK_AQUA(ChatColor.DARK_AQUA, new Color(0x009999)), -+ DARK_RED(ChatColor.DARK_RED, new Color(0xAA0000)), -+ DARK_PURPLE(ChatColor.DARK_PURPLE, new Color(0xAA00AA)), -+ GOLD(ChatColor.GOLD, new Color(0xBB8800)), -+ GRAY(ChatColor.GRAY, new Color(0x888888)), -+ DARK_GRAY(ChatColor.DARK_GRAY, new Color(0x444444)), -+ BLUE(ChatColor.BLUE, new Color(0x5555FF)), -+ GREEN(ChatColor.GREEN, new Color(0x55FF55)), -+ AQUA(ChatColor.AQUA, new Color(0x55DDDD)), -+ RED(ChatColor.RED, new Color(0xFF5555)), -+ LIGHT_PURPLE(ChatColor.LIGHT_PURPLE, new Color(0xFF55FF)), -+ YELLOW(ChatColor.YELLOW, new Color(0xFFBB00)), -+ WHITE(ChatColor.WHITE, new Color(0xBBBBBB)); -+ -+ private final ChatColor chat; -+ private final Color color; -+ -+ private static final Map BY_CHAT = new HashMap<>(); -+ -+ GUIColor(ChatColor chat, Color color) { -+ this.chat = chat; -+ this.color = color; -+ } -+ -+ public Color getColor() { -+ return color; -+ } -+ -+ public String getCode() { -+ return chat.toString(); -+ } -+ -+ public static GUIColor getColor(ChatColor chat) { -+ return BY_CHAT.get(chat); -+ } -+ -+ static { -+ for (GUIColor color : values()) { -+ BY_CHAT.put(color.chat, color); -+ } -+ } -+} -diff --git a/src/main/java/net/pl3x/purpur/util/HighlightErrorConverter.java b/src/main/java/net/pl3x/purpur/util/HighlightErrorConverter.java -new file mode 100644 -index 000000000..4b340b88a ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/util/HighlightErrorConverter.java -@@ -0,0 +1,86 @@ -+package net.pl3x.purpur.util; -+ -+import org.apache.logging.log4j.Level; -+import org.apache.logging.log4j.core.LogEvent; -+import org.apache.logging.log4j.core.config.Configuration; -+import org.apache.logging.log4j.core.config.plugins.Plugin; -+import org.apache.logging.log4j.core.layout.PatternLayout; -+import org.apache.logging.log4j.core.pattern.ConverterKeys; -+import org.apache.logging.log4j.core.pattern.LogEventPatternConverter; -+import org.apache.logging.log4j.core.pattern.PatternConverter; -+import org.apache.logging.log4j.core.pattern.PatternFormatter; -+import org.apache.logging.log4j.core.pattern.PatternParser; -+import org.apache.logging.log4j.util.PerformanceSensitive; -+ -+import java.util.List; -+ -+@Plugin(name = "highlightGUIError", category = PatternConverter.CATEGORY) -+@ConverterKeys({"highlightGUIError"}) -+@PerformanceSensitive("allocation") -+public final class HighlightErrorConverter extends LogEventPatternConverter { -+ -+ private static final String ERROR = "\u00A74\u00A7l"; // Bold Red -+ private static final String WARN = "\u00A7e\u00A7l"; // Bold Yellow -+ -+ private final List formatters; -+ -+ protected HighlightErrorConverter(List formatters) { -+ super("highlightGUIError", null); -+ this.formatters = formatters; -+ } -+ -+ @Override -+ public void format(LogEvent event, StringBuilder toAppendTo) { -+ Level level = event.getLevel(); -+ if (level.isMoreSpecificThan(Level.ERROR)) { -+ format(ERROR, event, toAppendTo); -+ return; -+ } else if (level.isMoreSpecificThan(Level.WARN)) { -+ format(WARN, event, toAppendTo); -+ return; -+ } -+ for (PatternFormatter formatter : formatters) { -+ formatter.format(event, toAppendTo); -+ } -+ } -+ -+ private void format(String style, LogEvent event, StringBuilder toAppendTo) { -+ int start = toAppendTo.length(); -+ toAppendTo.append(style); -+ int end = toAppendTo.length(); -+ -+ for (PatternFormatter formatter : formatters) { -+ formatter.format(event, toAppendTo); -+ } -+ -+ if (toAppendTo.length() == end) { -+ toAppendTo.setLength(start); -+ } -+ } -+ -+ @Override -+ public boolean handlesThrowable() { -+ for (final PatternFormatter formatter : formatters) { -+ if (formatter.handlesThrowable()) { -+ return true; -+ } -+ } -+ return false; -+ } -+ -+ public static HighlightErrorConverter newInstance(Configuration config, String[] options) { -+ if (options.length != 1) { -+ LOGGER.error("Incorrect number of options on highlightGUIError. Expected 1 received " + options.length); -+ return null; -+ } -+ if (options[0] == null) { -+ LOGGER.error("No pattern supplied on highlightGUIError"); -+ return null; -+ } -+ -+ PatternParser parser = PatternLayout.createPatternParser(config); -+ List formatters = parser.parse(options[0]); -+ return new HighlightErrorConverter(formatters); -+ } -+ -+} -diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 8af159abd..5bc278a99 100644 ---- a/src/main/resources/log4j2.xml -+++ b/src/main/resources/log4j2.xml -@@ -1,8 +1,17 @@ - -- -+ - - -- -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - --- -2.26.2 - diff --git a/patches/removed/1.16/server/0046-Add-EntityPortalReadyEvent.patch b/patches/removed/1.16/server/0046-Add-EntityPortalReadyEvent.patch deleted file mode 100644 index 09550ff51..000000000 --- a/patches/removed/1.16/server/0046-Add-EntityPortalReadyEvent.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 76ab9614c42d949915127a45567be02453e414ef Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 11 Jan 2020 23:12:52 -0600 -Subject: [PATCH] Add EntityPortalReadyEvent - ---- - .../java/net/minecraft/server/BlockPortal.java | 16 +++++++++------- - src/main/java/net/minecraft/server/Entity.java | 7 ++++--- - .../net/minecraft/server/PortalTravelAgent.java | 5 +++-- - .../java/net/minecraft/server/WorldServer.java | 2 +- - 4 files changed, 17 insertions(+), 13 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java -index 09c7c1318..6880cdd7f 100644 ---- a/src/main/java/net/minecraft/server/BlockPortal.java -+++ b/src/main/java/net/minecraft/server/BlockPortal.java -@@ -54,6 +54,7 @@ public class BlockPortal extends Block { - - } - -+ public boolean createPortal(GeneratorAccess generatoraccess, BlockPosition blockposition) { return a(generatoraccess, blockposition); } // Purpur - OBFHELPER - public boolean a(GeneratorAccess generatoraccess, BlockPosition blockposition) { - BlockPortal.Shape blockportal_shape = this.b(generatoraccess, blockposition); - -@@ -67,8 +68,8 @@ public class BlockPortal extends Block { - } - } - -- @Nullable -- public BlockPortal.Shape b(GeneratorAccess generatoraccess, BlockPosition blockposition) { -+ public BlockPortal.Shape createShape(GeneratorAccess generatoraccess, BlockPosition blockposition) { return b(generatoraccess, blockposition); } // Purpur - OBFHELPER -+ @Nullable public BlockPortal.Shape b(GeneratorAccess generatoraccess, BlockPosition blockposition) { - BlockPortal.Shape blockportal_shape = new BlockPortal.Shape(generatoraccess, blockposition, EnumDirection.EnumAxis.X); - - if (blockportal_shape.d() && blockportal_shape.e == 0) { -@@ -189,6 +190,7 @@ public class BlockPortal extends Block { - private int height; - private int width; - java.util.List blocks = new java.util.ArrayList(); // CraftBukkit - add field -+ public static Block FRAME_BLOCK = Blocks.OBSIDIAN; // Purpur - - public Shape(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) { - this.a = generatoraccess; -@@ -228,14 +230,14 @@ public class BlockPortal extends Block { - for (i = 0; i < 22; ++i) { - BlockPosition blockposition1 = blockposition.shift(enumdirection, i); - -- if (!this.a(this.a.getType(blockposition1)) || this.a.getType(blockposition1.down()).getBlock() != Blocks.OBSIDIAN) { -+ if (!this.a(this.a.getType(blockposition1)) || this.a.getType(blockposition1.down()).getBlock() != FRAME_BLOCK) { // Purpur - break; - } - } - - Block block = this.a.getType(blockposition.shift(enumdirection, i)).getBlock(); - -- return block == Blocks.OBSIDIAN ? i : 0; -+ return block == FRAME_BLOCK ? i : 0; // Purpur - } - - public int a() { -@@ -270,7 +272,7 @@ public class BlockPortal extends Block { - - if (i == 0) { - block = this.a.getType(blockposition.shift(this.d)).getBlock(); -- if (block != Blocks.OBSIDIAN) { -+ if (block != FRAME_BLOCK) { // Purpur - break label56; - // CraftBukkit start - add the block to our list - } else { -@@ -280,7 +282,7 @@ public class BlockPortal extends Block { - } - } else if (i == this.width - 1) { - block = this.a.getType(blockposition.shift(this.c)).getBlock(); -- if (block != Blocks.OBSIDIAN) { -+ if (block != FRAME_BLOCK) { // Purpur - break label56; - // CraftBukkit start - add the block to our list - } else { -@@ -293,7 +295,7 @@ public class BlockPortal extends Block { - } - - for (i = 0; i < this.width; ++i) { -- if (this.a.getType(this.position.shift(this.c, i).up(this.height)).getBlock() != Blocks.OBSIDIAN) { -+ if (this.a.getType(this.position.shift(this.c, i).up(this.height)).getBlock() != FRAME_BLOCK) { // Purpur - this.height = 0; - break; - // CraftBukkit start - add the block to our list -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 580843686..bdf79302b 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -170,9 +170,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - protected boolean af; public final boolean inPortal() { return this.af; } // Paper - OBFHELPER - protected int ag; - public DimensionManager dimension; -- protected BlockPosition ai; -- protected Vec3D aj; -- protected EnumDirection ak; -+ public BlockPosition ai; // Purpur - protected -> public -+ public Vec3D aj; // Purpur - protected -> public -+ public EnumDirection ak; // Purpur - protected -> public - private boolean invulnerable; - protected UUID uniqueID; - protected String am; -@@ -2472,6 +2472,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - this.world.getMethodProfiler().enter("portal"); - this.ag = i; - this.portalCooldown = this.ba(); -+ if (new net.pl3x.purpur.event.entity.EntityPortalReadyEvent(getBukkitEntity()).callEvent()) // Purpur - // CraftBukkit start - if (this instanceof EntityPlayer) { - ((EntityPlayer) this).a(this.world.worldProvider.getDimensionManager().getType() == DimensionManager.NETHER ? DimensionManager.OVERWORLD : DimensionManager.NETHER, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL); -diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java -index f84dd6d9b..f50e9670b 100644 ---- a/src/main/java/net/minecraft/server/PortalTravelAgent.java -+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java -@@ -11,6 +11,7 @@ public class PortalTravelAgent { - - private final WorldServer world; - private final Random b; -+ public Block FRAME_BLOCK = Blocks.OBSIDIAN; // Purpur - - public PortalTravelAgent(WorldServer worldserver) { - this.world = worldserver; -@@ -233,7 +234,7 @@ public class PortalTravelAgent { - boolean flag1 = l2 < 0; - - blockposition_mutableblockposition.d(j3, l3, i4); -- blockList.setTypeAndData(blockposition_mutableblockposition, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData(), 3); // CraftBukkit -+ blockList.setTypeAndData(blockposition_mutableblockposition, flag1 ? FRAME_BLOCK.getBlockData() : Blocks.AIR.getBlockData(), 3); // CraftBukkit // Purpur - } - } - } -@@ -243,7 +244,7 @@ public class PortalTravelAgent { - for (i3 = -1; i3 < 4; ++i3) { - if (k2 == -1 || k2 == 2 || i3 == -1 || i3 == 3) { - blockposition_mutableblockposition.d(i5 + k2 * k5, j5 + i3, j2 + k2 * l5); -- blockList.setTypeAndData(blockposition_mutableblockposition, Blocks.OBSIDIAN.getBlockData(), 3); // CraftBukkit -+ blockList.setTypeAndData(blockposition_mutableblockposition, FRAME_BLOCK.getBlockData(), 3); // CraftBukkit // Purpur - } - } - } -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 156c87ed4..610542dc8 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -76,7 +76,7 @@ public class WorldServer extends World { - public boolean savingDisabled; - private boolean everyoneSleeping; - private int emptyTime; -- private final PortalTravelAgent portalTravelAgent; -+ public PortalTravelAgent portalTravelAgent; // Purpur - private final -> public non-final - private final TickListServer nextTickListBlock; - private final TickListServer nextTickListFluid; - private final Set navigators; final com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet navigatorsForIteration = new com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<>(2048, 0.5f, 2048, 0.2); // Tuinity - make removing entities while ticking safe --- -2.26.2 - diff --git a/patches/removed/1.16/server/0048-Add-blacklist-option-for-grindstone.patch b/patches/removed/1.16/server/0048-Add-blacklist-option-for-grindstone.patch deleted file mode 100644 index 86a85242d..000000000 --- a/patches/removed/1.16/server/0048-Add-blacklist-option-for-grindstone.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 5de138cbdf306a02f264c50f32f22c6864d001f1 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 1 Aug 2019 19:15:12 -0500 -Subject: [PATCH] Add blacklist option for grindstone - ---- - .../minecraft/server/ContainerGrindstone.java | 17 +++++++++++++++++ - .../java/net/minecraft/server/ItemStack.java | 6 ++++++ - .../java/net/pl3x/purpur/PurpurWorldConfig.java | 12 ++++++++++++ - 3 files changed, 35 insertions(+) - -diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java -index 83cb0cd64..2a849d0ec 100644 ---- a/src/main/java/net/minecraft/server/ContainerGrindstone.java -+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java -@@ -61,12 +61,24 @@ public class ContainerGrindstone extends Container { - this.a(new Slot(this.craftInventory, 0, 49, 19) { - @Override - public boolean isAllowed(ItemStack itemstack) { -+ // Purpur start -+ if (containeraccess.getWorld().purpurConfig.grindstoneBlacklistDisallowPlacement && containeraccess.getWorld().purpurConfig.grindstoneBlacklist.contains(itemstack.getId())) { -+ getBukkitView().getTopInventory().getViewers().forEach(viewer -> ((Player) viewer).updateInventory()); -+ return false; -+ } -+ // Purpur end - return itemstack.e() || itemstack.getItem() == Items.ENCHANTED_BOOK || itemstack.hasEnchantments(); - } - }); - this.a(new Slot(this.craftInventory, 1, 49, 40) { - @Override - public boolean isAllowed(ItemStack itemstack) { -+ // Purpur start -+ if (containeraccess.getWorld().purpurConfig.grindstoneBlacklistDisallowPlacement && containeraccess.getWorld().purpurConfig.grindstoneBlacklist.contains(itemstack.getId())) { -+ getBukkitView().getTopInventory().getViewers().forEach(viewer -> ((Player) viewer).updateInventory()); -+ return false; -+ } -+ // Purpur end - return itemstack.e() || itemstack.getItem() == Items.ENCHANTED_BOOK || itemstack.hasEnchantments(); - } - }); -@@ -110,6 +122,11 @@ public class ContainerGrindstone extends Container { - } - - private int e(ItemStack itemstack) { -+ // Purpur start -+ if (containeraccess.getWorld().purpurConfig.grindstoneBlacklistReturnsZeroExp && containeraccess.getWorld().purpurConfig.grindstoneBlacklist.contains(itemstack.getId())) { -+ return 0; -+ } -+ // Purpur end - int j = 0; - Map map = EnchantmentManager.a(itemstack); - Iterator iterator = map.entrySet().iterator(); -diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 8c3bbef66..d5e0578b2 100644 ---- a/src/main/java/net/minecraft/server/ItemStack.java -+++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -542,6 +542,12 @@ public final class ItemStack { - return !this.e() ? this.doMaterialsMatch(itemstack) : !itemstack.isEmpty() && this.getItem() == itemstack.getItem(); - } - -+ // Purpur start -+ public String getId() { -+ return IRegistry.ITEM.getKey(getItem()).toString(); -+ } -+ // Purpur end -+ - public String j() { - return this.getItem().f(this); - } -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 5318a8e32..9c60855d6 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -8,6 +8,7 @@ import net.minecraft.server.MinecraftKey; - import org.bukkit.configuration.ConfigurationSection; - import org.spigotmc.SpigotWorldConfig; - -+import java.util.ArrayList; - import java.util.HashMap; - import java.util.List; - import java.util.Map; -@@ -103,6 +104,17 @@ public class PurpurWorldConfig { - farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow); - } - -+ public List grindstoneBlacklist = new ArrayList<>(); -+ public boolean grindstoneBlacklistDisallowPlacement = true; -+ public boolean grindstoneBlacklistReturnsZeroExp = true; -+ private void grindstoneBlacklist() { -+ List blacklist = getList("blocks.grindstone.blacklist.blacklisted-items", grindstoneBlacklist); -+ grindstoneBlacklistDisallowPlacement = getBoolean("blocks.grindstone.blacklist.disallow-placement", grindstoneBlacklistDisallowPlacement); -+ grindstoneBlacklistReturnsZeroExp = getBoolean("blocks.grindstone.blacklist.returns-zero-exp", grindstoneBlacklistReturnsZeroExp); -+ grindstoneBlacklist.clear(); -+ grindstoneBlacklist.addAll(blacklist); -+ } -+ - public boolean signAllowColors = false; - public boolean signRightClickEdit = false; - private void signSettings() { --- -2.26.2 - diff --git a/patches/removed/1.16/server/0054-Option-for-slimes-not-pushable.patch b/patches/removed/1.16/server/0054-Option-for-slimes-not-pushable.patch deleted file mode 100644 index e06afcab3..000000000 --- a/patches/removed/1.16/server/0054-Option-for-slimes-not-pushable.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 9b4138db851b38e9c42ecd40ede122f9b75f2ce1 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Fri, 23 Aug 2019 21:56:31 -0500 -Subject: [PATCH] Option for slimes not pushable - ---- - src/main/java/net/minecraft/server/BlockPiston.java | 10 ++++++++++ - src/main/java/net/minecraft/server/BlockSlime.java | 7 +++++++ - src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++ - 3 files changed, 22 insertions(+) - -diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index 8312ed779..a1721c63d 100644 ---- a/src/main/java/net/minecraft/server/BlockPiston.java -+++ b/src/main/java/net/minecraft/server/BlockPiston.java -@@ -347,6 +347,16 @@ public class BlockPiston extends BlockDirectional { - } else { - event = new BlockPistonRetractEvent(bblock, blocks, CraftBlock.notchToBlockFace(enumdirection1)); - } -+ // Purpur start -+ if (net.pl3x.purpur.PurpurConfig.slimeBlocksNotPushable) { -+ for (org.bukkit.block.Block block : blocks) { -+ if (block.getType() == org.bukkit.Material.SLIME_BLOCK) { -+ event.setCancelled(true); -+ break; -+ } -+ } -+ } -+ // Purpur end - world.getServer().getPluginManager().callEvent(event); - - if (event.isCancelled()) { -diff --git a/src/main/java/net/minecraft/server/BlockSlime.java b/src/main/java/net/minecraft/server/BlockSlime.java -index 01f32659d..52ab86f0b 100644 ---- a/src/main/java/net/minecraft/server/BlockSlime.java -+++ b/src/main/java/net/minecraft/server/BlockSlime.java -@@ -49,4 +49,11 @@ public class BlockSlime extends BlockHalfTransparent { - - super.stepOn(world, blockposition, entity); - } -+ -+ // Purpur start -+ @Override -+ public EnumPistonReaction getPushReaction(IBlockData iblockdata) { -+ return net.pl3x.purpur.PurpurConfig.slimeBlocksNotPushable ? EnumPistonReaction.BLOCK : super.getPushReaction(iblockdata); -+ } -+ // Purpur end - } -diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java -index ab20fa2fa..72ad9dce7 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java -@@ -149,6 +149,11 @@ public class PurpurConfig { - dontSendUselessEntityPackets = getBoolean("settings.dont-send-useless-entity-packets", dontSendUselessEntityPackets); - } - -+ public static boolean slimeBlocksNotPushable = false; -+ private static void blockSettings() { -+ slimeBlocksNotPushable = getBoolean("settings.blocks.slime.not-movable-by-piston", slimeBlocksNotPushable); -+ } -+ - private static void timingsSettings() { - getString("settings.timings.url", "https://timings.pl3x.net"); - } --- -2.26.2 - diff --git a/patches/removed/1.16/server/0064-Do-not-strip-colors-from-death-messages.patch b/patches/removed/1.16/server/0064-Do-not-strip-colors-from-death-messages.patch deleted file mode 100644 index d67f62a7a..000000000 --- a/patches/removed/1.16/server/0064-Do-not-strip-colors-from-death-messages.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a39be3fb1c8b97c9dc58761e79799ca1cd78c907 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sun, 7 Jun 2020 13:16:02 -0500 -Subject: [PATCH] Do not strip colors from death messages - ---- - src/main/java/net/minecraft/server/EntityPlayer.java | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 42f3ef1ee6..b224ff153d 100644 ---- a/src/main/java/net/minecraft/server/EntityPlayer.java -+++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -662,7 +662,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - - IChatBaseComponent defaultMessage = this.getCombatTracker().getDeathMessage(); - -- String deathmessage = defaultMessage.getString(); -+ String deathmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromComponent(defaultMessage); // Purpur - org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); - // Paper start - cancellable death event - if (event.isCancelled()) { --- -2.26.2 - diff --git a/patches/removed/1.16/server/0073-Fix-furnace-cook-speed-multiplier-using-values-betwe.patch b/patches/removed/1.16/server/0073-Fix-furnace-cook-speed-multiplier-using-values-betwe.patch deleted file mode 100644 index 421e185ff..000000000 --- a/patches/removed/1.16/server/0073-Fix-furnace-cook-speed-multiplier-using-values-betwe.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 2773516386b1b074024a5129b2dac38d1d1d0ec9 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 03:36:52 -0500 -Subject: [PATCH] Fix furnace cook speed multiplier using values between 0 and - 1 - ---- - src/main/java/net/minecraft/server/TileEntityFurnace.java | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 7d50b7056..c5e643292 100644 ---- a/src/main/java/net/minecraft/server/TileEntityFurnace.java -+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java -@@ -307,8 +307,10 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I - } - - if (this.isBurning() && this.canBurn(irecipe)) { -- this.cookTime += cookSpeedMultiplier; // Paper - cook speed multiplier API -- if (this.cookTime >= this.cookTimeTotal) { // Paper - cook speed multiplier API -+ // Purpur start - fix cook speed multiplier API -+ ++this.cookTime; -+ if (this.cookTime >= this.cookTimeTotal / this.cookSpeedMultiplier) { -+ // Purpur end - fix cook speed multiplier API - this.cookTime = 0; - this.cookTimeTotal = this.getRecipeCookingTime(); - this.burn(irecipe); --- -2.26.2 - diff --git a/patches/removed/1.16/server/0075-Despawn-egg-hatches-chicken.patch b/patches/removed/1.16/server/0075-Despawn-egg-hatches-chicken.patch deleted file mode 100644 index 4e5018c28..000000000 --- a/patches/removed/1.16/server/0075-Despawn-egg-hatches-chicken.patch +++ /dev/null @@ -1,65 +0,0 @@ -From ab9d1fa681708fd626c0c7a02291cd17d8bdff0c Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Fri, 29 Nov 2019 23:47:42 -0600 -Subject: [PATCH] Despawn egg hatches chicken - ---- - .../java/net/minecraft/server/EntityItem.java | 21 +++++++++++++++++++ - .../net/pl3x/purpur/PurpurWorldConfig.java | 4 ++++ - 2 files changed, 25 insertions(+) - -diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 2926fbb95..bbb9ca1ef 100644 ---- a/src/main/java/net/minecraft/server/EntityItem.java -+++ b/src/main/java/net/minecraft/server/EntityItem.java -@@ -165,6 +165,27 @@ public class EntityItem extends Entity { - } - // Spigot end - -+ // Purpur start -+ @Override -+ public void die() { -+ if (!dead && world.purpurConfig.chickenEggsHatchWhenDespawnedMax > 0) { -+ ItemStack item = getItemStack(); -+ if (item != null && item.getItem() == Items.EGG) { -+ int range = world.purpurConfig.chickenEggsHatchWhenDespawnedRange; -+ if (world.getEntitiesByClass(EntityChicken.class, new AxisAlignedBB(locX() - range, locY() - range, locZ() - range, locX() + range, locY() + range, locZ() + range)).size() < world.purpurConfig.chickenEggsHatchWhenDespawnedMax) { -+ EntityChicken chicken = EntityTypes.CHICKEN.create(world); -+ if (chicken != null) { -+ chicken.setPosition(locX(), locY(), locZ()); -+ chicken.setAge(-24000); -+ world.addEntity(chicken, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); -+ } -+ } -+ } -+ } -+ super.die(); -+ } -+ // Purpur end -+ - private void u() { - Vec3D vec3d = this.getMot(); - -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 5b042a609..647bece31 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -262,11 +262,15 @@ public class PurpurWorldConfig { - public boolean chickenRidableInWater = false; - public boolean chickenRequireShiftToMount = true; - public boolean chickenDontLayEggsWhenRidden = false; -+ public int chickenEggsHatchWhenDespawnedMax = 0; -+ public int chickenEggsHatchWhenDespawnedRange = 10; - private void chickenSettings() { - chickenRidable = getBoolean("mobs.chicken.ridable", chickenRidable); - chickenRidableInWater = getBoolean("mobs.chicken.ridable-in-water", chickenRidableInWater); - chickenRequireShiftToMount = getBoolean("mobs.chicken.require-shift-to-mount", chickenRequireShiftToMount); - chickenDontLayEggsWhenRidden = getBoolean("mobs.chicken.dont-lay-eggs-when-ridden", chickenDontLayEggsWhenRidden); -+ chickenEggsHatchWhenDespawnedMax = getInt("mobs.chicken.eggs-hatch-when-despawned.max", chickenEggsHatchWhenDespawnedMax); -+ chickenEggsHatchWhenDespawnedRange = getInt("mobs.chicken.eggs-hatch-when-despawned.range", chickenEggsHatchWhenDespawnedRange); - } - - public boolean codRidable = false; --- -2.26.2 - diff --git a/patches/removed/1.16/server/0076-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/removed/1.16/server/0076-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch deleted file mode 100644 index 2dc748509..000000000 --- a/patches/removed/1.16/server/0076-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 324ade06e16035915b27500e54ab4fb1f1c29a32 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 01:42:50 -0500 -Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases - ---- - src/main/java/net/minecraft/server/World.java | 3 +++ - src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 12 ++++++++---- - 2 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ad3b81a11..b24191d81 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -1472,8 +1472,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - return blockposition; - } - -+ public void setSpawn(BlockPosition blockposition) { v(blockposition); } // Purpur - OBFHELPER - public void a_(BlockPosition blockposition) { -+ BlockPosition prevPos = getSpawn(); // Purpur - this.worldData.setSpawn(blockposition); -+ new org.bukkit.event.world.SpawnChangeEvent(world, MCUtil.toLocation(this, prevPos)).callEvent(); // Purpur - } - - public boolean a(EntityHuman entityhuman, BlockPosition blockposition) { -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3d27028e8..85922aaa9 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -391,12 +391,16 @@ public class CraftWorld implements World { - @Override - public boolean setSpawnLocation(int x, int y, int z) { - try { -- Location previousLocation = getSpawnLocation(); -- world.worldData.setSpawn(new BlockPosition(x, y, z)); -+ // Purpur start - move to World#setSpawn() -+ //Location previousLocation = getSpawnLocation(); -+ //world.worldData.setSpawn(new BlockPosition(x, y, z)); - - // Notify anyone who's listening. -- SpawnChangeEvent event = new SpawnChangeEvent(this, previousLocation); -- server.getPluginManager().callEvent(event); -+ //SpawnChangeEvent event = new SpawnChangeEvent(this, previousLocation); -+ //server.getPluginManager().callEvent(event); -+ -+ world.setSpawn(new BlockPosition(x, y, z)); -+ // Purpur end - - return true; - } catch (Exception e) { --- -2.26.2 - diff --git a/patches/removed/1.16/server/0077-Add-sleep-options.patch b/patches/removed/1.16/server/0077-Add-sleep-options.patch deleted file mode 100644 index 76ae93017..000000000 --- a/patches/removed/1.16/server/0077-Add-sleep-options.patch +++ /dev/null @@ -1,79 +0,0 @@ -From ace26bd42b6a6b5de262a011df936981c281c91e Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 30 Nov 2019 03:30:17 -0600 -Subject: [PATCH] Add sleep options - ---- - .../net/minecraft/server/EntityHuman.java | 19 +++++++++++++++++-- - .../net/pl3x/purpur/PurpurWorldConfig.java | 4 ++++ - 2 files changed, 21 insertions(+), 2 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index d62174e9c..22e17e3de 100644 ---- a/src/main/java/net/minecraft/server/EntityHuman.java -+++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -143,6 +143,21 @@ public abstract class EntityHuman extends EntityLiving { - this.datawatcher.register(EntityHuman.bt, new NBTTagCompound()); - } - -+ // Purpur start -+ private javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); -+ -+ private boolean unableToSleepRightNow() { -+ if (world.purpurConfig.playerSleepOnlyWithCondition) { -+ try { -+ scriptEngine.eval("time = " + world.getDayTime()); -+ return !(Boolean) scriptEngine.eval(world.purpurConfig.playerSleepCondition); -+ } catch (Exception ignore) { -+ } -+ } -+ return world.isDay(); -+ } -+ // Purpur end -+ - @Override - public void tick() { - this.noclip = this.isSpectator(); -@@ -160,7 +175,7 @@ public abstract class EntityHuman extends EntityLiving { - this.sleepTicks = 100; - } - -- if (!this.world.isClientSide && this.world.isDay()) { -+ if (!this.world.isClientSide && unableToSleepRightNow()) { // Purpur - this.wakeup(false, true); - } - } else if (this.sleepTicks > 0) { -@@ -1334,7 +1349,7 @@ public abstract class EntityHuman extends EntityLiving { - return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE); - } - -- if (this.world.isDay()) { -+ if (unableToSleepRightNow()) { // Purpur - this.setRespawnPosition(blockposition, false, true); - return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_NOW); - } -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 647bece31..08fb0bae3 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -150,6 +150,8 @@ public class PurpurWorldConfig { - public boolean disableDropsOnCrammingDeath = false; - public boolean fixClimbingBypassingCrammingRule = false; - public boolean milkCuresBadOmen = true; -+ public boolean playerSleepOnlyWithCondition = false; -+ public String playerSleepCondition = "time >= 12541 && time <= 23458"; - public boolean useBetterMending = false; - private void gameplayMechanicsSettings() { - boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand); -@@ -174,6 +176,8 @@ public class PurpurWorldConfig { - disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath); - fixClimbingBypassingCrammingRule = getBoolean("gameplay-mechanics.fix-climbing-bypassing-cramming-rule", fixClimbingBypassingCrammingRule); - milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen); -+ playerSleepOnlyWithCondition = getBoolean("gameplay-mechanics.player.sleep.only-with-condition", playerSleepOnlyWithCondition); -+ playerSleepCondition = getString("gameplay-mechanics.player.sleep.condition", playerSleepCondition); - useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); - } - --- -2.26.2 - diff --git a/patches/removed/1.16/server/0078-Option-for-hay-block-fall-damage.patch b/patches/removed/1.16/server/0078-Option-for-hay-block-fall-damage.patch deleted file mode 100644 index 3c5c387aa..000000000 --- a/patches/removed/1.16/server/0078-Option-for-hay-block-fall-damage.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 670ad16925b34ff2bf80abea7613073586291c86 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 30 Nov 2019 01:31:09 -0600 -Subject: [PATCH] Option for hay block fall damage - ---- - src/main/java/net/minecraft/server/BlockHay.java | 2 +- - src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/main/java/net/minecraft/server/BlockHay.java b/src/main/java/net/minecraft/server/BlockHay.java -index ca81c49f0..1f8f60542 100644 ---- a/src/main/java/net/minecraft/server/BlockHay.java -+++ b/src/main/java/net/minecraft/server/BlockHay.java -@@ -9,6 +9,6 @@ public class BlockHay extends BlockRotatable { - - @Override - public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) { -- entity.b(f, 0.2F); -+ entity.b(f, world.purpurConfig.hayBlockFallDamage); // Purpur - } - } -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 08fb0bae3..a4a09874f 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -127,6 +127,11 @@ public class PurpurWorldConfig { - grindstoneBlacklist.addAll(blacklist); - } - -+ public float hayBlockFallDamage = 0.2F; -+ private void hayBlockFallDamage() { -+ hayBlockFallDamage = (float) getDouble("blocks.hay_block.fall-damage", hayBlockFallDamage); -+ } -+ - public boolean lavaInfinite = false; - private void lavaSettings() { - lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite); --- -2.26.2 - diff --git a/patches/removed/1.16/server/0080-Add-LootableInventoryFirstFillEvent.patch b/patches/removed/1.16/server/0080-Add-LootableInventoryFirstFillEvent.patch deleted file mode 100644 index 646548f00..000000000 --- a/patches/removed/1.16/server/0080-Add-LootableInventoryFirstFillEvent.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 5cb92f4ecb97c800374f4c632b3f3c371241a0c9 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 02:43:17 -0500 -Subject: [PATCH] Add LootableInventoryFirstFillEvent - ---- - .../paper/loottable/PaperLootableInventoryData.java | 4 ++++ - .../paper/loottable/PaperTileEntityLootableInventory.java | 5 ++++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java -index b5401eaf9..1decf0e89 100644 ---- a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java -+++ b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java -@@ -49,6 +49,10 @@ public class PaperLootableInventoryData { - - // ALWAYS process the first fill or if the feature is disabled - if (this.lastFill == -1 || !this.lootable.getNMSWorld().paperConfig.autoReplenishLootables) { -+ // Purpur start -+ LootableInventory inventory = lootable.getAPILootableInventory(); -+ if (inventory != null) new net.pl3x.purpur.event.block.LootableInventoryFirstFillEvent(player == null ? null : (Player) player.getBukkitEntity(), inventory).callEvent(); -+ // Purpur end - return true; - } - -diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperTileEntityLootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/PaperTileEntityLootableInventory.java -index d50410532..2f24e5a70 100644 ---- a/src/main/java/com/destroystokyo/paper/loottable/PaperTileEntityLootableInventory.java -+++ b/src/main/java/com/destroystokyo/paper/loottable/PaperTileEntityLootableInventory.java -@@ -57,7 +57,10 @@ public class PaperTileEntityLootableInventory implements PaperLootableBlockInven - if (world == null) { - return null; - } -- return (LootableInventory) getBukkitWorld().getBlockAt(MCUtil.toLocation(world, tileEntityLootable.getPosition())).getState(); -+ // Purpur start -+ org.bukkit.block.BlockState state = getBukkitWorld().getBlockAt(MCUtil.toLocation(world, tileEntityLootable.getPosition())).getState(); -+ return state instanceof LootableInventory ? (LootableInventory) state : null; -+ // Purpur end - } - - @Override --- -2.26.2 - diff --git a/patches/removed/1.16/server/0088-UPnP-Port-Forwarding-Service.patch b/patches/removed/1.16/server/0088-UPnP-Port-Forwarding-Service.patch deleted file mode 100644 index f5db87def..000000000 --- a/patches/removed/1.16/server/0088-UPnP-Port-Forwarding-Service.patch +++ /dev/null @@ -1,200 +0,0 @@ -From cbe470f55a4b73c26d920e28b5a34244ccbfb9cf Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Wed, 22 Jan 2020 20:13:40 -0600 -Subject: [PATCH] UPnP Port Forwarding Service - ---- - pom.xml | 10 ++++ - .../net/minecraft/server/DedicatedServer.java | 25 ++++++++++ - .../net/minecraft/server/MinecraftServer.java | 10 ++++ - .../java/net/pl3x/purpur/PurpurConfig.java | 5 ++ - .../net/pl3x/purpur/gui/info/JInfoPanel.java | 3 ++ - .../pl3x/purpur/gui/info/UPnPComponent.java | 47 +++++++++++++++++++ - 6 files changed, 100 insertions(+) - create mode 100644 src/main/java/net/pl3x/purpur/gui/info/UPnPComponent.java - -diff --git a/pom.xml b/pom.xml -index 097c736bc..adf7f78da 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -55,6 +55,12 @@ - 1.7.7.1 - compile - -+ -+ com.dosse.upnp -+ UPnP -+ 1.0 -+ compile -+ - - - net.minecrell -@@ -166,6 +172,10 @@ - spigotmc-public - https://hub.spigotmc.org/nexus/content/groups/public/ - -+ -+ pl3x -+ https://repo.pl3x.net/ -+ - - - -diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 7f2db5f0b..5cfb6fd3d 100644 ---- a/src/main/java/net/minecraft/server/DedicatedServer.java -+++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -242,6 +242,31 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - return false; - } - -+ // Purpur start -+ if (net.pl3x.purpur.PurpurConfig.useUPnP) { -+ LOGGER.info("[UPnP] Attempting to start UPnP port forwarding service..."); -+ com.dosse.upnp.UPnP.NAME = "Purpur UPnP"; -+ if (com.dosse.upnp.UPnP.isUPnPAvailable()) { -+ if (com.dosse.upnp.UPnP.isMappedTCP(getPort())) { -+ upnp = false; -+ LOGGER.info("[UPnP] Port " + getPort() + " is already open"); -+ } else if (com.dosse.upnp.UPnP.openPortTCP(getPort())) { -+ upnp = true; -+ LOGGER.info("[UPnP] Successfully opened port " + getPort()); -+ } else { -+ upnp = false; -+ LOGGER.info("[UPnP] Failed to open port " + getPort()); -+ } -+ if (upnp) { -+ LOGGER.info("[UPnP] " + com.dosse.upnp.UPnP.getExternalIP() + ":" + getPort()); -+ } -+ } else { -+ upnp = false; -+ LOGGER.error("[UPnP] Service is unavailable"); -+ } -+ } -+ // Purpur end -+ - // CraftBukkit start - // this.a((PlayerList) (new DedicatedPlayerList(this))); // Spigot - moved up - server.loadPlugins(); -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f23fdd5f2..d9e5eda9b 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -187,6 +187,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { - ramGraph.update(); - ramDetails.update(); -+ upnpComponent.repaint(); - }); - timer.start(); - } -diff --git a/src/main/java/net/pl3x/purpur/gui/info/UPnPComponent.java b/src/main/java/net/pl3x/purpur/gui/info/UPnPComponent.java -new file mode 100644 -index 000000000..b0465d360 ---- /dev/null -+++ b/src/main/java/net/pl3x/purpur/gui/info/UPnPComponent.java -@@ -0,0 +1,47 @@ -+package net.pl3x.purpur.gui.info; -+ -+import net.minecraft.server.MinecraftServer; -+import net.pl3x.purpur.PurpurConfig; -+ -+import javax.swing.JTextPane; -+import javax.swing.border.EmptyBorder; -+import java.awt.Color; -+import java.awt.Dimension; -+import java.awt.Graphics; -+ -+public class UPnPComponent extends JTextPane { -+ private final MinecraftServer server; -+ -+ public UPnPComponent(MinecraftServer server) { -+ this.server = server; -+ setBorder(new EmptyBorder(0, 30, 0, 10)); -+ setEditable(false); -+ setText("UPnP Status"); -+ setOpaque(false); -+ setHighlighter(null); -+ } -+ -+ @Override -+ public Dimension getPreferredSize() { -+ return new Dimension(350, 20); -+ } -+ -+ @Override -+ public void paint(Graphics graphics) { -+ super.paint(graphics); -+ graphics.setColor(server.isUPnPEnabled() ? Color.GREEN : Color.RED); -+ graphics.fillOval(10, 0, 15, 15); -+ setToolTipText(getTooltip()); -+ } -+ -+ private String getTooltip() { -+ if (!PurpurConfig.useUPnP) { -+ return "UPnP Disabled"; -+ } -+ if (server.isUPnPEnabled()) { -+ return "UPnP Enabled"; -+ } else { -+ return "UPnP Unavailable"; -+ } -+ } -+} --- -2.26.2 - diff --git a/patches/removed/1.16/server/0103-Configurable-enchantment-max-level.patch b/patches/removed/1.16/server/0103-Configurable-enchantment-max-level.patch deleted file mode 100644 index a34f2fcd4..000000000 --- a/patches/removed/1.16/server/0103-Configurable-enchantment-max-level.patch +++ /dev/null @@ -1,788 +0,0 @@ -From df05bfbcf31d32354e0286477ecf261279eb244d Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Wed, 1 Apr 2020 17:21:42 -0500 -Subject: [PATCH] Configurable enchantment max level - ---- - src/main/java/net/minecraft/server/Enchantment.java | 12 ++++++++++-- - .../net/minecraft/server/EnchantmentArrowDamage.java | 6 +----- - .../minecraft/server/EnchantmentArrowKnockback.java | 6 +----- - .../net/minecraft/server/EnchantmentBinding.java | 6 +----- - .../minecraft/server/EnchantmentDepthStrider.java | 6 +----- - .../net/minecraft/server/EnchantmentDigging.java | 6 +----- - .../net/minecraft/server/EnchantmentDurability.java | 6 +----- - .../java/net/minecraft/server/EnchantmentFire.java | 6 +----- - .../net/minecraft/server/EnchantmentFlameArrows.java | 6 +----- - .../net/minecraft/server/EnchantmentFrostWalker.java | 6 +----- - .../minecraft/server/EnchantmentInfiniteArrows.java | 6 +----- - .../net/minecraft/server/EnchantmentKnockback.java | 6 +----- - .../net/minecraft/server/EnchantmentLootBonus.java | 6 +----- - .../java/net/minecraft/server/EnchantmentLure.java | 6 +----- - .../net/minecraft/server/EnchantmentMending.java | 6 +----- - .../net/minecraft/server/EnchantmentMultishot.java | 6 +----- - .../java/net/minecraft/server/EnchantmentOxygen.java | 6 +----- - .../net/minecraft/server/EnchantmentPiercing.java | 6 +----- - .../net/minecraft/server/EnchantmentProtection.java | 7 +------ - .../net/minecraft/server/EnchantmentQuickCharge.java | 6 +----- - .../net/minecraft/server/EnchantmentSilkTouch.java | 6 +----- - .../net/minecraft/server/EnchantmentSweeping.java | 6 +----- - .../java/net/minecraft/server/EnchantmentThorns.java | 6 +----- - .../server/EnchantmentTridentChanneling.java | 6 +----- - .../minecraft/server/EnchantmentTridentImpaling.java | 6 +----- - .../minecraft/server/EnchantmentTridentLoyalty.java | 6 +----- - .../minecraft/server/EnchantmentTridentRiptide.java | 6 +----- - .../net/minecraft/server/EnchantmentVanishing.java | 6 +----- - .../net/minecraft/server/EnchantmentWaterWorker.java | 6 +----- - .../minecraft/server/EnchantmentWeaponDamage.java | 6 +----- - src/main/java/net/pl3x/purpur/PurpurConfig.java | 10 ++++++++++ - .../craftbukkit/enchantments/CraftEnchantment.java | 7 +++++++ - 32 files changed, 56 insertions(+), 148 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/Enchantment.java b/src/main/java/net/minecraft/server/Enchantment.java -index 70cd4a483..0ab96ea34 100644 ---- a/src/main/java/net/minecraft/server/Enchantment.java -+++ b/src/main/java/net/minecraft/server/Enchantment.java -@@ -44,9 +44,17 @@ public abstract class Enchantment { - return 1; - } - -- public int getMaxLevel() { -- return 1; -+ // Purpur start -+ private int maxLevel = 1; -+ -+ public final int getMaxLevel() { -+ return maxLevel; -+ } -+ -+ public final void setMaxLevel(int maxLevel) { -+ this.maxLevel = maxLevel; - } -+ // Purpur end - - public int a(int i) { - return 1 + i * 10; -diff --git a/src/main/java/net/minecraft/server/EnchantmentArrowDamage.java b/src/main/java/net/minecraft/server/EnchantmentArrowDamage.java -index ffa1d19cb..1040e7e08 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentArrowDamage.java -+++ b/src/main/java/net/minecraft/server/EnchantmentArrowDamage.java -@@ -4,6 +4,7 @@ public class EnchantmentArrowDamage extends Enchantment { - - public EnchantmentArrowDamage(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.BOW, aenumitemslot); -+ setMaxLevel(5); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentArrowDamage extends Enchantment { - public int b(int i) { - return this.a(i) + 15; - } -- -- @Override -- public int getMaxLevel() { -- return 5; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentArrowKnockback.java b/src/main/java/net/minecraft/server/EnchantmentArrowKnockback.java -index 9103f3c61..67f487b9e 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentArrowKnockback.java -+++ b/src/main/java/net/minecraft/server/EnchantmentArrowKnockback.java -@@ -4,6 +4,7 @@ public class EnchantmentArrowKnockback extends Enchantment { - - public EnchantmentArrowKnockback(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.BOW, aenumitemslot); -+ setMaxLevel(2); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentArrowKnockback extends Enchantment { - public int b(int i) { - return this.a(i) + 25; - } -- -- @Override -- public int getMaxLevel() { -- return 2; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentBinding.java b/src/main/java/net/minecraft/server/EnchantmentBinding.java -index b49154b13..ec4dad3cf 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentBinding.java -+++ b/src/main/java/net/minecraft/server/EnchantmentBinding.java -@@ -4,6 +4,7 @@ public class EnchantmentBinding extends Enchantment { - - public EnchantmentBinding(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.WEARABLE, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentBinding extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 1; -- } -- - @Override - public boolean isTreasure() { - return true; -diff --git a/src/main/java/net/minecraft/server/EnchantmentDepthStrider.java b/src/main/java/net/minecraft/server/EnchantmentDepthStrider.java -index 669fbd268..07d566cd9 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentDepthStrider.java -+++ b/src/main/java/net/minecraft/server/EnchantmentDepthStrider.java -@@ -4,6 +4,7 @@ public class EnchantmentDepthStrider extends Enchantment { - - public EnchantmentDepthStrider(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.ARMOR_FEET, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentDepthStrider extends Enchantment { - return this.a(i) + 15; - } - -- @Override -- public int getMaxLevel() { -- return 3; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment) && enchantment != Enchantments.FROST_WALKER; -diff --git a/src/main/java/net/minecraft/server/EnchantmentDigging.java b/src/main/java/net/minecraft/server/EnchantmentDigging.java -index 798b3c250..16a7c38bc 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentDigging.java -+++ b/src/main/java/net/minecraft/server/EnchantmentDigging.java -@@ -4,6 +4,7 @@ public class EnchantmentDigging extends Enchantment { - - protected EnchantmentDigging(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.DIGGER, aenumitemslot); -+ setMaxLevel(5); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentDigging extends Enchantment { - return super.a(i) + 50; - } - -- @Override -- public int getMaxLevel() { -- return 5; -- } -- - @Override - public boolean canEnchant(ItemStack itemstack) { - return itemstack.getItem() == Items.SHEARS ? true : super.canEnchant(itemstack); -diff --git a/src/main/java/net/minecraft/server/EnchantmentDurability.java b/src/main/java/net/minecraft/server/EnchantmentDurability.java -index c946326fb..6deccef55 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentDurability.java -+++ b/src/main/java/net/minecraft/server/EnchantmentDurability.java -@@ -6,6 +6,7 @@ public class EnchantmentDurability extends Enchantment { - - protected EnchantmentDurability(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.BREAKABLE, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -18,11 +19,6 @@ public class EnchantmentDurability extends Enchantment { - return super.a(i) + 50; - } - -- @Override -- public int getMaxLevel() { -- return 3; -- } -- - @Override - public boolean canEnchant(ItemStack itemstack) { - return itemstack.e() ? true : super.canEnchant(itemstack); -diff --git a/src/main/java/net/minecraft/server/EnchantmentFire.java b/src/main/java/net/minecraft/server/EnchantmentFire.java -index c4da4378c..f2664c18e 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentFire.java -+++ b/src/main/java/net/minecraft/server/EnchantmentFire.java -@@ -4,6 +4,7 @@ public class EnchantmentFire extends Enchantment { - - protected EnchantmentFire(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.WEAPON, aenumitemslot); -+ setMaxLevel(2); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentFire extends Enchantment { - public int b(int i) { - return super.a(i) + 50; - } -- -- @Override -- public int getMaxLevel() { -- return 2; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentFlameArrows.java b/src/main/java/net/minecraft/server/EnchantmentFlameArrows.java -index a0b4da25b..af3db770f 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentFlameArrows.java -+++ b/src/main/java/net/minecraft/server/EnchantmentFlameArrows.java -@@ -4,6 +4,7 @@ public class EnchantmentFlameArrows extends Enchantment { - - public EnchantmentFlameArrows(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.BOW, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentFlameArrows extends Enchantment { - public int b(int i) { - return 50; - } -- -- @Override -- public int getMaxLevel() { -- return 1; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentFrostWalker.java b/src/main/java/net/minecraft/server/EnchantmentFrostWalker.java -index b5de6c740..8c4fd331c 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentFrostWalker.java -+++ b/src/main/java/net/minecraft/server/EnchantmentFrostWalker.java -@@ -10,6 +10,7 @@ public class EnchantmentFrostWalker extends Enchantment { - - public EnchantmentFrostWalker(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.ARMOR_FEET, aenumitemslot); -+ setMaxLevel(2); // Purpur - } - - @Override -@@ -27,11 +28,6 @@ public class EnchantmentFrostWalker extends Enchantment { - return true; - } - -- @Override -- public int getMaxLevel() { -- return 2; -- } -- - public static void a(EntityLiving entityliving, World world, BlockPosition blockposition, int i) { - if (entityliving.onGround) { - IBlockData iblockdata = Blocks.FROSTED_ICE.getBlockData(); -diff --git a/src/main/java/net/minecraft/server/EnchantmentInfiniteArrows.java b/src/main/java/net/minecraft/server/EnchantmentInfiniteArrows.java -index 408cfa460..1dbedc0ad 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentInfiniteArrows.java -+++ b/src/main/java/net/minecraft/server/EnchantmentInfiniteArrows.java -@@ -4,6 +4,7 @@ public class EnchantmentInfiniteArrows extends Enchantment { - - public EnchantmentInfiniteArrows(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.BOW, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentInfiniteArrows extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 1; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return enchantment instanceof EnchantmentMending ? false : super.a(enchantment); -diff --git a/src/main/java/net/minecraft/server/EnchantmentKnockback.java b/src/main/java/net/minecraft/server/EnchantmentKnockback.java -index 362ce7bc4..04062c255 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentKnockback.java -+++ b/src/main/java/net/minecraft/server/EnchantmentKnockback.java -@@ -4,6 +4,7 @@ public class EnchantmentKnockback extends Enchantment { - - protected EnchantmentKnockback(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.WEAPON, aenumitemslot); -+ setMaxLevel(2); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentKnockback extends Enchantment { - public int b(int i) { - return super.a(i) + 50; - } -- -- @Override -- public int getMaxLevel() { -- return 2; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentLootBonus.java b/src/main/java/net/minecraft/server/EnchantmentLootBonus.java -index b5232facc..c27e20e06 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentLootBonus.java -+++ b/src/main/java/net/minecraft/server/EnchantmentLootBonus.java -@@ -4,6 +4,7 @@ public class EnchantmentLootBonus extends Enchantment { - - protected EnchantmentLootBonus(Enchantment.Rarity enchantment_rarity, EnchantmentSlotType enchantmentslottype, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, enchantmentslottype, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentLootBonus extends Enchantment { - return super.a(i) + 50; - } - -- @Override -- public int getMaxLevel() { -- return 3; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment) && enchantment != Enchantments.SILK_TOUCH; -diff --git a/src/main/java/net/minecraft/server/EnchantmentLure.java b/src/main/java/net/minecraft/server/EnchantmentLure.java -index 1ffb91c57..c5a9e61f9 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentLure.java -+++ b/src/main/java/net/minecraft/server/EnchantmentLure.java -@@ -4,6 +4,7 @@ public class EnchantmentLure extends Enchantment { - - protected EnchantmentLure(Enchantment.Rarity enchantment_rarity, EnchantmentSlotType enchantmentslottype, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, enchantmentslottype, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentLure extends Enchantment { - public int b(int i) { - return super.a(i) + 50; - } -- -- @Override -- public int getMaxLevel() { -- return 3; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentMending.java b/src/main/java/net/minecraft/server/EnchantmentMending.java -index dafc29399..ace2e19a6 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentMending.java -+++ b/src/main/java/net/minecraft/server/EnchantmentMending.java -@@ -4,6 +4,7 @@ public class EnchantmentMending extends Enchantment { - - public EnchantmentMending(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.BREAKABLE, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -20,9 +21,4 @@ public class EnchantmentMending extends Enchantment { - public boolean isTreasure() { - return true; - } -- -- @Override -- public int getMaxLevel() { -- return 1; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentMultishot.java b/src/main/java/net/minecraft/server/EnchantmentMultishot.java -index 6f423e753..5fb8a624c 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentMultishot.java -+++ b/src/main/java/net/minecraft/server/EnchantmentMultishot.java -@@ -4,6 +4,7 @@ public class EnchantmentMultishot extends Enchantment { - - public EnchantmentMultishot(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.CROSSBOW, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentMultishot extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 1; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment) && enchantment != Enchantments.PIERCING; -diff --git a/src/main/java/net/minecraft/server/EnchantmentOxygen.java b/src/main/java/net/minecraft/server/EnchantmentOxygen.java -index c1bc97f6e..a5726d36d 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentOxygen.java -+++ b/src/main/java/net/minecraft/server/EnchantmentOxygen.java -@@ -4,6 +4,7 @@ public class EnchantmentOxygen extends Enchantment { - - public EnchantmentOxygen(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.ARMOR_HEAD, aenumitemslot); -+ setMaxLevel(3);// Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentOxygen extends Enchantment { - public int b(int i) { - return this.a(i) + 30; - } -- -- @Override -- public int getMaxLevel() { -- return 3; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentPiercing.java b/src/main/java/net/minecraft/server/EnchantmentPiercing.java -index 1a2e8e31f..0e8993e86 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentPiercing.java -+++ b/src/main/java/net/minecraft/server/EnchantmentPiercing.java -@@ -4,6 +4,7 @@ public class EnchantmentPiercing extends Enchantment { - - public EnchantmentPiercing(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.CROSSBOW, aenumitemslot); -+ setMaxLevel(4); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentPiercing extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 4; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment) && enchantment != Enchantments.MULTISHOT; -diff --git a/src/main/java/net/minecraft/server/EnchantmentProtection.java b/src/main/java/net/minecraft/server/EnchantmentProtection.java -index 416e57caa..b29cb5467 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentProtection.java -+++ b/src/main/java/net/minecraft/server/EnchantmentProtection.java -@@ -10,7 +10,7 @@ public class EnchantmentProtection extends Enchantment { - if (enchantmentprotection_damagetype == EnchantmentProtection.DamageType.FALL) { - this.itemTarget = EnchantmentSlotType.ARMOR_FEET; - } -- -+ setMaxLevel(4); // Purpur - } - - @Override -@@ -23,11 +23,6 @@ public class EnchantmentProtection extends Enchantment { - return this.a(i) + this.a.c(); - } - -- @Override -- public int getMaxLevel() { -- return 4; -- } -- - @Override - public int a(int i, DamageSource damagesource) { - return damagesource.ignoresInvulnerability() ? 0 : (this.a == EnchantmentProtection.DamageType.ALL ? i : (this.a == EnchantmentProtection.DamageType.FIRE && damagesource.isFire() ? i * 2 : (this.a == EnchantmentProtection.DamageType.FALL && damagesource == DamageSource.FALL ? i * 3 : (this.a == EnchantmentProtection.DamageType.EXPLOSION && damagesource.isExplosion() ? i * 2 : (this.a == EnchantmentProtection.DamageType.PROJECTILE && damagesource.b() ? i * 2 : 0))))); -diff --git a/src/main/java/net/minecraft/server/EnchantmentQuickCharge.java b/src/main/java/net/minecraft/server/EnchantmentQuickCharge.java -index e624b63aa..762642ce5 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentQuickCharge.java -+++ b/src/main/java/net/minecraft/server/EnchantmentQuickCharge.java -@@ -4,6 +4,7 @@ public class EnchantmentQuickCharge extends Enchantment { - - public EnchantmentQuickCharge(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.CROSSBOW, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentQuickCharge extends Enchantment { - public int b(int i) { - return 50; - } -- -- @Override -- public int getMaxLevel() { -- return 3; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentSilkTouch.java b/src/main/java/net/minecraft/server/EnchantmentSilkTouch.java -index 04aa8e1d5..d0eac6dbc 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentSilkTouch.java -+++ b/src/main/java/net/minecraft/server/EnchantmentSilkTouch.java -@@ -4,6 +4,7 @@ public class EnchantmentSilkTouch extends Enchantment { - - protected EnchantmentSilkTouch(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.DIGGER, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentSilkTouch extends Enchantment { - return super.a(i) + 50; - } - -- @Override -- public int getMaxLevel() { -- return 1; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment) && enchantment != Enchantments.LOOT_BONUS_BLOCKS; -diff --git a/src/main/java/net/minecraft/server/EnchantmentSweeping.java b/src/main/java/net/minecraft/server/EnchantmentSweeping.java -index a20b1c8f5..7804e0a0a 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentSweeping.java -+++ b/src/main/java/net/minecraft/server/EnchantmentSweeping.java -@@ -4,6 +4,7 @@ public class EnchantmentSweeping extends Enchantment { - - public EnchantmentSweeping(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.WEAPON, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentSweeping extends Enchantment { - return this.a(i) + 15; - } - -- @Override -- public int getMaxLevel() { -- return 3; -- } -- - public static float e(int i) { - return 1.0F - 1.0F / (float) (i + 1); - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentThorns.java b/src/main/java/net/minecraft/server/EnchantmentThorns.java -index fd0255c89..df7c9b24b 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentThorns.java -+++ b/src/main/java/net/minecraft/server/EnchantmentThorns.java -@@ -7,6 +7,7 @@ public class EnchantmentThorns extends Enchantment { - - public EnchantmentThorns(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.ARMOR_CHEST, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -19,11 +20,6 @@ public class EnchantmentThorns extends Enchantment { - return super.a(i) + 50; - } - -- @Override -- public int getMaxLevel() { -- return 3; -- } -- - @Override - public boolean canEnchant(ItemStack itemstack) { - return itemstack.getItem() instanceof ItemArmor ? true : super.canEnchant(itemstack); -diff --git a/src/main/java/net/minecraft/server/EnchantmentTridentChanneling.java b/src/main/java/net/minecraft/server/EnchantmentTridentChanneling.java -index 14115ecc7..2533b2cab 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentTridentChanneling.java -+++ b/src/main/java/net/minecraft/server/EnchantmentTridentChanneling.java -@@ -4,6 +4,7 @@ public class EnchantmentTridentChanneling extends Enchantment { - - public EnchantmentTridentChanneling(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.TRIDENT, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentTridentChanneling extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 1; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment); -diff --git a/src/main/java/net/minecraft/server/EnchantmentTridentImpaling.java b/src/main/java/net/minecraft/server/EnchantmentTridentImpaling.java -index f64fc401e..b47d8284f 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentTridentImpaling.java -+++ b/src/main/java/net/minecraft/server/EnchantmentTridentImpaling.java -@@ -4,6 +4,7 @@ public class EnchantmentTridentImpaling extends Enchantment { - - public EnchantmentTridentImpaling(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.TRIDENT, aenumitemslot); -+ setMaxLevel(5); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentTridentImpaling extends Enchantment { - return this.a(i) + 20; - } - -- @Override -- public int getMaxLevel() { -- return 5; -- } -- - @Override - public float a(int i, EnumMonsterType enummonstertype) { - return enummonstertype == EnumMonsterType.e ? (float) i * 2.5F : 0.0F; -diff --git a/src/main/java/net/minecraft/server/EnchantmentTridentLoyalty.java b/src/main/java/net/minecraft/server/EnchantmentTridentLoyalty.java -index dd91bed6e..826f4d875 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentTridentLoyalty.java -+++ b/src/main/java/net/minecraft/server/EnchantmentTridentLoyalty.java -@@ -4,6 +4,7 @@ public class EnchantmentTridentLoyalty extends Enchantment { - - public EnchantmentTridentLoyalty(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.TRIDENT, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentTridentLoyalty extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 3; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment); -diff --git a/src/main/java/net/minecraft/server/EnchantmentTridentRiptide.java b/src/main/java/net/minecraft/server/EnchantmentTridentRiptide.java -index 0f669dc7a..81d6ccc35 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentTridentRiptide.java -+++ b/src/main/java/net/minecraft/server/EnchantmentTridentRiptide.java -@@ -4,6 +4,7 @@ public class EnchantmentTridentRiptide extends Enchantment { - - public EnchantmentTridentRiptide(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.TRIDENT, aenumitemslot); -+ setMaxLevel(3); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentTridentRiptide extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 3; -- } -- - @Override - public boolean a(Enchantment enchantment) { - return super.a(enchantment) && enchantment != Enchantments.LOYALTY && enchantment != Enchantments.CHANNELING; -diff --git a/src/main/java/net/minecraft/server/EnchantmentVanishing.java b/src/main/java/net/minecraft/server/EnchantmentVanishing.java -index 4ef59d7f1..5d7b6ca57 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentVanishing.java -+++ b/src/main/java/net/minecraft/server/EnchantmentVanishing.java -@@ -4,6 +4,7 @@ public class EnchantmentVanishing extends Enchantment { - - public EnchantmentVanishing(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.ALL, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -16,11 +17,6 @@ public class EnchantmentVanishing extends Enchantment { - return 50; - } - -- @Override -- public int getMaxLevel() { -- return 1; -- } -- - @Override - public boolean isTreasure() { - return true; -diff --git a/src/main/java/net/minecraft/server/EnchantmentWaterWorker.java b/src/main/java/net/minecraft/server/EnchantmentWaterWorker.java -index cf0999095..bea57861b 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentWaterWorker.java -+++ b/src/main/java/net/minecraft/server/EnchantmentWaterWorker.java -@@ -4,6 +4,7 @@ public class EnchantmentWaterWorker extends Enchantment { - - public EnchantmentWaterWorker(Enchantment.Rarity enchantment_rarity, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.ARMOR_HEAD, aenumitemslot); -+ setMaxLevel(1); // Purpur - } - - @Override -@@ -15,9 +16,4 @@ public class EnchantmentWaterWorker extends Enchantment { - public int b(int i) { - return this.a(i) + 40; - } -- -- @Override -- public int getMaxLevel() { -- return 1; -- } - } -diff --git a/src/main/java/net/minecraft/server/EnchantmentWeaponDamage.java b/src/main/java/net/minecraft/server/EnchantmentWeaponDamage.java -index 4571cdf02..aa3cbd523 100644 ---- a/src/main/java/net/minecraft/server/EnchantmentWeaponDamage.java -+++ b/src/main/java/net/minecraft/server/EnchantmentWeaponDamage.java -@@ -11,6 +11,7 @@ public class EnchantmentWeaponDamage extends Enchantment { - public EnchantmentWeaponDamage(Enchantment.Rarity enchantment_rarity, int i, EnumItemSlot... aenumitemslot) { - super(enchantment_rarity, EnchantmentSlotType.WEAPON, aenumitemslot); - this.a = i; -+ setMaxLevel(5); // Purpur - } - - @Override -@@ -23,11 +24,6 @@ public class EnchantmentWeaponDamage extends Enchantment { - return this.a(i) + EnchantmentWeaponDamage.g[this.a]; - } - -- @Override -- public int getMaxLevel() { -- return 5; -- } -- - @Override - public float a(int i, EnumMonsterType enummonstertype) { - return this.a == 0 ? 1.0F + (float) Math.max(0, i - 1) * 0.5F : (this.a == 1 && enummonstertype == EnumMonsterType.UNDEAD ? (float) i * 2.5F : (this.a == 2 && enummonstertype == EnumMonsterType.ARTHROPOD ? (float) i * 2.5F : 0.0F)); -diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java -index 7bea36213..68bad6a13 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java -@@ -1,6 +1,8 @@ - package net.pl3x.purpur; - - import com.google.common.base.Throwables; -+import net.minecraft.server.Enchantment; -+import net.minecraft.server.IRegistry; - import net.minecraft.server.MinecraftServer; - import net.pl3x.purpur.command.PurpurCommand; - import org.bukkit.Bukkit; -@@ -194,4 +196,12 @@ public class PurpurConfig { - private static void timingsSettings() { - getString("settings.timings.url", "https://timings.pl3x.net"); - } -+ -+ private static void enchantmentSettings() { -+ for (Enchantment enchantment : IRegistry.ENCHANTMENT) { -+ String name = IRegistry.ENCHANTMENT.getKey(enchantment).getKey(); -+ int maxLevel = getInt("settings.enchantment." + name + ".max-level", enchantment.getMaxLevel()); -+ enchantment.setMaxLevel(maxLevel); -+ } -+ } - } -diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index 64ceeda1a..0e9fa3441 100644 ---- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -+++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -@@ -23,6 +23,13 @@ public class CraftEnchantment extends Enchantment { - return target.getMaxLevel(); - } - -+ // Purpur start -+ @Override -+ public void setMaxLevel(int maxLevel) { -+ target.setMaxLevel(maxLevel); -+ } -+ // Purpur end -+ - @Override - public int getStartLevel() { - return target.getStartLevel(); --- -2.26.2 - diff --git a/patches/removed/1.16/server/0104-Optimize-Chunk-Ticks.patch b/patches/removed/1.16/server/0104-Optimize-Chunk-Ticks.patch deleted file mode 100644 index 006c56655..000000000 --- a/patches/removed/1.16/server/0104-Optimize-Chunk-Ticks.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 4d4c1ccec681b4363afd0772013d59b6de57b351 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 2 Apr 2020 00:28:06 -0500 -Subject: [PATCH] Optimize Chunk Ticks - ---- - .../minecraft/server/ChunkProviderServer.java | 50 ++++--------------- - .../minecraft/server/EnumCreatureType.java | 14 ++++++ - 2 files changed, 25 insertions(+), 39 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index e8bf60507..93abf7493 100644 ---- a/src/main/java/net/minecraft/server/ChunkProviderServer.java -+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -981,11 +981,12 @@ public class ChunkProviderServer extends IChunkProvider { - int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); - BlockPosition blockposition = this.world.getSpawn(); - // CraftBukkit start - Other mob type spawn tick rate -- boolean spawnAnimalThisTick = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; -- boolean spawnMonsterThisTick = world.ticksPerMonsterSpawns != 0L && worlddata.getTime() % world.ticksPerMonsterSpawns == 0L; -- boolean spawnWaterThisTick = world.ticksPerWaterSpawns != 0L && worlddata.getTime() % world.ticksPerWaterSpawns == 0L; -- boolean spawnAmbientThisTick = world.ticksPerAmbientSpawns != 0L && worlddata.getTime() % world.ticksPerAmbientSpawns == 0L; -- boolean flag2 = spawnAnimalThisTick; -+ // Purpur start -+ EnumCreatureType.CREATURE.setLimitThisTick(world.ticksPerAnimalSpawns != 0L && i % world.ticksPerAnimalSpawns == 0L ? world.getWorld().getAnimalSpawnLimit() : -1); -+ EnumCreatureType.MONSTER.setLimitThisTick(world.ticksPerMonsterSpawns != 0L && i % world.ticksPerMonsterSpawns == 0L ? world.getWorld().getMonsterSpawnLimit() : -1); -+ EnumCreatureType.WATER_CREATURE.setLimitThisTick(world.ticksPerWaterSpawns != 0L && i % world.ticksPerWaterSpawns == 0L ? world.getWorld().getWaterAnimalSpawnLimit() : -1); -+ EnumCreatureType.AMBIENT.setLimitThisTick(world.ticksPerAmbientSpawns != 0L && i % world.ticksPerAmbientSpawns == 0L ? world.getWorld().getAmbientSpawnLimit() : -1); -+ // Purpur end - // CraftBukkit end - - this.world.getMethodProfiler().enter("naturalSpawnCount"); -@@ -1032,40 +1033,11 @@ public class ChunkProviderServer extends IChunkProvider { - if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, true)) { // Spigot // Paper - optimise isOutsideOfRange - this.world.getMethodProfiler().enter("spawner"); - this.world.timings.mobSpawn.startTiming(); // Spigot -- EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype; -- int i1 = aenumcreaturetype.length; -- -- for (int j1 = 0; j1 < i1; ++j1) { -- EnumCreatureType enumcreaturetype = aenumcreaturetype1[j1]; -- -- // CraftBukkit start - Use per-world spawn limits -- boolean spawnThisTick = true; -- int limit = enumcreaturetype.b(); -- switch (enumcreaturetype) { -- case MONSTER: -- spawnThisTick = spawnMonsterThisTick; -- limit = world.getWorld().getMonsterSpawnLimit(); -- break; -- case CREATURE: -- spawnThisTick = spawnAnimalThisTick; -- limit = world.getWorld().getAnimalSpawnLimit(); -- break; -- case WATER_CREATURE: -- spawnThisTick = spawnWaterThisTick; -- limit = world.getWorld().getWaterAnimalSpawnLimit(); -- break; -- case AMBIENT: -- spawnThisTick = spawnAmbientThisTick; -- limit = world.getWorld().getAmbientSpawnLimit(); -- break; -- } -- -- if (!spawnThisTick || limit == 0) { -- continue; -- } -- // CraftBukkit end -- -- if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) { -+ // Purpur start -+ for (EnumCreatureType enumcreaturetype : aenumcreaturetype) { -+ int limit = enumcreaturetype.getLimitThisTick(); -+ if (limit > 0 && enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.isFriendly() || this.allowAnimals) && (enumcreaturetype.isFriendly() || this.allowMonsters)) { -+ // Purpur end - int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits - - // Paper start - only allow spawns upto the limit per chunk and update count afterwards -diff --git a/src/main/java/net/minecraft/server/EnumCreatureType.java b/src/main/java/net/minecraft/server/EnumCreatureType.java -index 3ed7fa324..7f236585d 100644 ---- a/src/main/java/net/minecraft/server/EnumCreatureType.java -+++ b/src/main/java/net/minecraft/server/EnumCreatureType.java -@@ -31,11 +31,25 @@ public enum EnumCreatureType { - return this.g; - } - -+ public boolean isFriendly() { return c(); } // Purpur - OBFHELPER - public boolean c() { - return this.h; - } - -+ public boolean isPersistent() { return d(); } // Purpur - OBFHELPER - public boolean d() { - return this.i; - } -+ -+ // Purpur start -+ private int limitThisTick = -1; -+ -+ void setLimitThisTick(int cap) { -+ this.limitThisTick = cap; -+ } -+ -+ int getLimitThisTick() { -+ return this.limitThisTick; -+ } -+ // Purpur end - } --- -2.26.2 - diff --git a/patches/removed/1.16/server/0105-Add-configurable-beehive-generation-chance.patch b/patches/removed/1.16/server/0105-Add-configurable-beehive-generation-chance.patch deleted file mode 100644 index 86ca731e0..000000000 --- a/patches/removed/1.16/server/0105-Add-configurable-beehive-generation-chance.patch +++ /dev/null @@ -1,107 +0,0 @@ -From a4900735eb07249132c6a813145a613e4d86026b Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Thu, 2 Apr 2020 03:39:34 -0500 -Subject: [PATCH] Add configurable beehive generation chance - ---- - .../server/WorldGenFeatureTreeBeehive.java | 18 +++++++++++++-- - .../server/WorldGenTreeProvider.java | 5 +++- - .../net/pl3x/purpur/PurpurWorldConfig.java | 23 +++++++++++++++++++ - 3 files changed, 43 insertions(+), 3 deletions(-) - -diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java b/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java -index 5827b1ba1..5ef9ae16e 100644 ---- a/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java -+++ b/src/main/java/net/minecraft/server/WorldGenFeatureTreeBeehive.java -@@ -10,7 +10,7 @@ import java.util.stream.Collectors; - - public class WorldGenFeatureTreeBeehive extends WorldGenFeatureTree { - -- private final float b; -+ private final float b; public float getChance() { return b; } // Purpur - OBFHELPER - - public WorldGenFeatureTreeBeehive(float f) { - super(WorldGenFeatureTrees.d); -@@ -23,7 +23,7 @@ public class WorldGenFeatureTreeBeehive extends WorldGenFeatureTree { - - @Override - public void a(GeneratorAccess generatoraccess, Random random, List list, List list1, Set set, StructureBoundingBox structureboundingbox) { -- if (random.nextFloat() < this.b) { -+ if (random.nextFloat() < getChance(generatoraccess.getMinecraftWorld(), list.get(0))) { - EnumDirection enumdirection = BlockBeehive.a[random.nextInt(BlockBeehive.a.length)]; - int i = !list1.isEmpty() ? Math.max(((BlockPosition) list1.get(0)).getY() - 1, ((BlockPosition) list.get(0)).getY()) : Math.min(((BlockPosition) list.get(0)).getY() + 1 + random.nextInt(3), ((BlockPosition) list.get(list.size() - 1)).getY()); - List list2 = (List) list.stream().filter((blockposition) -> { -@@ -56,6 +56,20 @@ public class WorldGenFeatureTreeBeehive extends WorldGenFeatureTree { - } - } - -+ private float getChance(World world, BlockPosition position) { -+ BiomeBase biome = world.getBiome(position); -+ if (biome == Biomes.PLAINS) return world.purpurConfig.beehivesGeneratePlainsChance; -+ else if (biome == Biomes.SUNFLOWER_PLAINS) return world.purpurConfig.beehivesGenerateSunflowerPlainsChance; -+ else if (biome == Biomes.FLOWER_FOREST) return world.purpurConfig.beehivesGenerateFlowerForestChance; -+ else if (biome == Biomes.FOREST) return world.purpurConfig.beehivesGenerateForestChance; -+ else if (biome == Biomes.WOODED_HILLS) return world.purpurConfig.beehivesGenerateWoodedHillsChance; -+ else if (biome == Biomes.BIRCH_FOREST) return world.purpurConfig.beehivesGenerateBirchForestChance; -+ else if (biome == Biomes.TALL_BIRCH_FOREST) return world.purpurConfig.beehivesGenerateTallBirchForestChance; -+ else if (biome == Biomes.BIRCH_FOREST_HILLS) return world.purpurConfig.beehivesGenerateBirchForestHillsChance; -+ else if (biome == Biomes.TALL_BIRCH_HILLS) return world.purpurConfig.beehivesGenerateTallBirchHillsChance; -+ return getChance(); -+ } -+ - @Override - public T a(DynamicOps dynamicops) { - return new Dynamic<>(dynamicops, dynamicops.createMap(ImmutableMap.of(dynamicops.createString("type"), dynamicops.createString(IRegistry.w.getKey(this.a).toString()), dynamicops.createString("probability"), dynamicops.createFloat(this.b)))).getValue(); // Purpur - decompile error -diff --git a/src/main/java/net/minecraft/server/WorldGenTreeProvider.java b/src/main/java/net/minecraft/server/WorldGenTreeProvider.java -index b9dee0e25..9e9d9e643 100644 ---- a/src/main/java/net/minecraft/server/WorldGenTreeProvider.java -+++ b/src/main/java/net/minecraft/server/WorldGenTreeProvider.java -@@ -31,7 +31,10 @@ public abstract class WorldGenTreeProvider { - } - - private boolean a(GeneratorAccess generatoraccess, BlockPosition blockposition) { -- Iterator iterator = BlockPosition.MutableBlockPosition.a(blockposition.down().north(2).west(2), blockposition.up().south(2).east(2)).iterator(); -+ // Purpur start -+ int r = generatoraccess.getMinecraftWorld().purpurConfig.beehivesSaplingFlowerRadius; -+ Iterator iterator = BlockPosition.MutableBlockPosition.a(blockposition.down().north(r).west(r), blockposition.up().south(r).east(r)).iterator(); -+ // Purpur end - - BlockPosition blockposition1; - -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index adcdc6b8f..0347b729c 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -99,6 +99,29 @@ public class PurpurWorldConfig { - } - } - -+ public int beehivesSaplingFlowerRadius = 2; -+ public float beehivesGeneratePlainsChance = 0.05F; -+ public float beehivesGenerateSunflowerPlainsChance = 0.05F; -+ public float beehivesGenerateFlowerForestChance = 0.01F; -+ public float beehivesGenerateForestChance; -+ public float beehivesGenerateWoodedHillsChance; -+ public float beehivesGenerateBirchForestChance; -+ public float beehivesGenerateTallBirchForestChance; -+ public float beehivesGenerateBirchForestHillsChance; -+ public float beehivesGenerateTallBirchHillsChance; -+ private void beehiveSettings() { -+ beehivesSaplingFlowerRadius = getInt("beehive.grow-sapling-flower-check-radius", beehivesSaplingFlowerRadius); -+ beehivesGeneratePlainsChance = (float) getDouble("beehive.generation-chance.plains", beehivesGeneratePlainsChance); -+ beehivesGenerateSunflowerPlainsChance = (float) getDouble("beehive.generation-chance.sunflower-plains", beehivesGenerateSunflowerPlainsChance); -+ beehivesGenerateFlowerForestChance = (float) getDouble("beehive.generation-chance.flower-forest", beehivesGenerateFlowerForestChance); -+ beehivesGenerateForestChance = (float) getDouble("beehive.generation-chance.forest", beehivesGenerateForestChance); -+ beehivesGenerateWoodedHillsChance = (float) getDouble("beehive.generation-chance.wooded-hills", beehivesGenerateWoodedHillsChance); -+ beehivesGenerateBirchForestChance = (float) getDouble("beehive.generation-chance.birch-forest", beehivesGenerateBirchForestChance); -+ beehivesGenerateTallBirchForestChance = (float) getDouble("beehive.generation-chance.tall-birch-forest", beehivesGenerateTallBirchForestChance); -+ beehivesGenerateBirchForestHillsChance = (float) getDouble("beehive.generation-chance.birch-forest-hills", beehivesGenerateBirchForestHillsChance); -+ beehivesGenerateTallBirchHillsChance = (float) getDouble("beehive.generation-chance.tall-birch-hills", beehivesGenerateTallBirchHillsChance); -+ } -+ - public int campfireRegenInterval = 0; - public int campfireRegenDuration = 80; - public int campfireRegenRange = 5; --- -2.26.2 - diff --git a/patches/removed/1.16/server/0106-Add-more-timings-timers.patch b/patches/removed/1.16/server/0106-Add-more-timings-timers.patch deleted file mode 100644 index 31d92ff4e..000000000 --- a/patches/removed/1.16/server/0106-Add-more-timings-timers.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 758523eb133359d46e347782229675a02ee5a1e9 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 4 Apr 2020 02:36:45 -0500 -Subject: [PATCH] Add more timings timers - ---- - .../co/aikar/timings/MinecraftTimings.java | 22 +++++++++++++++++++ - .../minecraft/server/EntityInsentient.java | 14 ++++++++++++ - .../net/minecraft/server/EntityLiving.java | 12 ++++++++++ - .../server/PathfinderGoalSelector.java | 6 +++++ - .../net/minecraft/server/WorldServer.java | 2 ++ - 5 files changed, 56 insertions(+) - -diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java -index 2966c5731..f663f019b 100644 ---- a/src/main/java/co/aikar/timings/MinecraftTimings.java -+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java -@@ -45,6 +45,28 @@ public final class MinecraftTimings { - - public static final Timing scoreboardScoreSearch = Timings.ofSafe("Scoreboard score search"); // Tuinity - add timings for scoreboard search - -+ // Purpur start -+ public static final Timing goalCleanup = Timings.ofSafe("PathfinderGoal - Cleanup"); -+ public static final Timing goalUpdate = Timings.ofSafe("PathfinderGoal - Update"); -+ public static final Timing goalTick = Timings.ofSafe("PathfinderGoal - Tick"); -+ -+ public static final Timing entityMovementTick = Timings.ofSafe("Entity Movement"); -+ public static final Timing entityMovementTickAI = Timings.ofSafe("Entity Movement - AI"); -+ public static final Timing entityMovementTickNewAI = Timings.ofSafe("Entity Movement - New AI"); -+ public static final Timing entityMovementTickJump = Timings.ofSafe("Entity Movement - Jump"); -+ public static final Timing entityMovementTickTravel = Timings.ofSafe("Entity Movement - Travel"); -+ public static final Timing entityMovementTickPush = Timings.ofSafe("Entity Movement - Push"); -+ -+ public static final Timing entityInsentientSensing = Timings.ofSafe("Entity Insentient - Sensing"); -+ public static final Timing entityInsentientTargetSelector = Timings.ofSafe("Entity Insentient - TargetSelector"); -+ public static final Timing entityInsentientGoalSelector = Timings.ofSafe("Entity Insentient - GoalSelector"); -+ public static final Timing entityInsentientNavigation = Timings.ofSafe("Entity Insentient - Navigation"); -+ public static final Timing entityInsentientMobTick = Timings.ofSafe("Entity Insentient - MobTick"); -+ public static final Timing entityInsentientControls = Timings.ofSafe("Entity Insentient - Controls"); -+ -+ public static final Timing passengerTick = Timings.ofSafe("Passenger Tick"); -+ // Purpur end -+ - private static final Map, String> taskNameCache = new MapMaker().weakKeys().makeMap(); - - private MinecraftTimings() {} -diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 3adc3434e..eb0befb35 100644 ---- a/src/main/java/net/minecraft/server/EntityInsentient.java -+++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; - -+import co.aikar.timings.Timing; -+import co.aikar.timings.Timings; - import com.google.common.collect.Maps; - import java.util.Arrays; - import java.util.Iterator; -@@ -676,21 +678,32 @@ public abstract class EntityInsentient extends EntityLiving { - } - // Paper end - this.world.getMethodProfiler().enter("sensing"); -+ co.aikar.timings.MinecraftTimings.entityInsentientSensing.startTiming(); // Purpur - this.bw.a(); -+ co.aikar.timings.MinecraftTimings.entityInsentientSensing.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("targetSelector"); -+ co.aikar.timings.MinecraftTimings.entityInsentientTargetSelector.startTiming(); // Purpur - this.targetSelector.doTick(); -+ co.aikar.timings.MinecraftTimings.entityInsentientTargetSelector.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("goalSelector"); -+ co.aikar.timings.MinecraftTimings.entityInsentientGoalSelector.startTiming(); // Purpur - this.goalSelector.doTick(); -+ co.aikar.timings.MinecraftTimings.entityInsentientGoalSelector.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("navigation"); -+ co.aikar.timings.MinecraftTimings.entityInsentientNavigation.startTiming(); // Purpur - this.navigation.c(); -+ co.aikar.timings.MinecraftTimings.entityInsentientNavigation.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("mob tick"); -+ co.aikar.timings.MinecraftTimings.entityInsentientMobTick.startTiming(); // Purpur - this.mobTick(); -+ co.aikar.timings.MinecraftTimings.entityInsentientMobTick.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("controls"); -+ co.aikar.timings.MinecraftTimings.entityInsentientControls.startTiming(); // Purpur - this.world.getMethodProfiler().enter("move"); - this.moveController.a(); - this.world.getMethodProfiler().exitEnter("look"); -@@ -698,6 +711,7 @@ public abstract class EntityInsentient extends EntityLiving { - this.world.getMethodProfiler().exitEnter("jump"); - this.bq.b(); - this.world.getMethodProfiler().exit(); -+ co.aikar.timings.MinecraftTimings.entityInsentientControls.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.K(); - } -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dae35c55e..3b5e38608 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2398,7 +2398,9 @@ public abstract class EntityLiving extends Entity { - } - } - -+ MinecraftTimings.entityMovementTick.startTiming(); // Purpur - if (!dead) this.movementTick(); // Purpur -+ MinecraftTimings.entityMovementTick.stopTiming(); // Purpur - double d0 = this.locX() - this.lastX; - double d1 = this.locZ() - this.lastZ; - float f = (float) (d0 * d0 + d1 * d1); -@@ -2605,18 +2607,23 @@ public abstract class EntityLiving extends Entity { - - this.setMot(d4, d5, d6); - this.world.getMethodProfiler().enter("ai"); -+ co.aikar.timings.MinecraftTimings.entityMovementTickAI.startTiming(); // Purpur - if (this.isFrozen()) { - this.jumping = false; - this.aZ = 0.0F; - this.bb = 0.0F; - } else if (this.doAITick()) { - this.world.getMethodProfiler().enter("newAi"); -+ co.aikar.timings.MinecraftTimings.entityMovementTickNewAI.startTiming(); // Purpur - this.doTick(); -+ co.aikar.timings.MinecraftTimings.entityMovementTickNewAI.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - } - -+ co.aikar.timings.MinecraftTimings.entityMovementTickAI.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("jump"); -+ co.aikar.timings.MinecraftTimings.entityMovementTickJump.startTiming(); // Purpur - if (this.jumping) { - if (this.N > 0.0D && (!this.onGround || this.N > 0.4D)) { - this.c(TagsFluid.WATER); -@@ -2632,22 +2639,27 @@ public abstract class EntityLiving extends Entity { - this.jumpTicks = 0; - } - -+ co.aikar.timings.MinecraftTimings.entityMovementTickJump.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("travel"); -+ co.aikar.timings.MinecraftTimings.entityMovementTickTravel.startTiming(); // Purpur - this.aZ *= 0.98F; - this.bb *= 0.98F; - this.n(); - AxisAlignedBB axisalignedbb = this.getBoundingBox(); - - this.e(new Vec3D((double) this.aZ, (double) this.ba, (double) this.bb)); -+ co.aikar.timings.MinecraftTimings.entityMovementTickTravel.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("push"); -+ co.aikar.timings.MinecraftTimings.entityMovementTickPush.startTiming(); // Purpur - if (this.bn > 0) { - --this.bn; - this.a(axisalignedbb, this.getBoundingBox()); - } - - this.collideNearby(); -+ co.aikar.timings.MinecraftTimings.entityMovementTickPush.stopTiming(); // Purpur - this.world.getMethodProfiler().exit(); - // Purpur start - if (EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0) { -diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -index a68fc11ec..4b277a6f6 100644 ---- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -+++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -@@ -78,6 +78,7 @@ public class PathfinderGoalSelector { - private static final PathfinderGoal.Type[] PATHFINDER_GOAL_TYPES = PathfinderGoal.Type.values(); // Paper - remove streams from pathfindergoalselector - - public void doTick() { -+ co.aikar.timings.MinecraftTimings.goalCleanup.startTiming(); - this.e.enter("goalCleanup"); - // Paper start - remove streams from pathfindergoalselector - for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { -@@ -97,8 +98,10 @@ public class PathfinderGoalSelector { - } - - }); -+ co.aikar.timings.MinecraftTimings.goalCleanup.stopTiming(); - this.e.exit(); - this.e.enter("goalUpdate"); -+ co.aikar.timings.MinecraftTimings.goalUpdate.startTiming(); - // Paper start - remove streams from pathfindergoalselector - goal_update_loop: for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { - PathfinderGoalWrapped wrappedGoal = iterator.next(); -@@ -141,8 +144,10 @@ public class PathfinderGoalSelector { - wrappedGoal.c(); - } - // Paper end - remove streams from pathfindergoalselector -+ co.aikar.timings.MinecraftTimings.goalUpdate.stopTiming(); - this.e.exit(); - this.e.enter("goalTick"); -+ co.aikar.timings.MinecraftTimings.goalTick.startTiming(); - // Paper start - remove streams from pathfindergoalselector - for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { - PathfinderGoalWrapped wrappedGoal = iterator.next(); -@@ -151,6 +156,7 @@ public class PathfinderGoalSelector { - } - } - // Paper end - remove streams from pathfindergoalselector -+ co.aikar.timings.MinecraftTimings.goalTick.stopTiming(); - this.e.exit(); - } - -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 610542dc8..23d832914 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1308,7 +1308,9 @@ public class WorldServer extends World { - return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString(); - }); - gameprofilerfiller.c("tickPassenger"); -+ co.aikar.timings.MinecraftTimings.passengerTick.startTiming(); // Purpur - entity1.passengerTick(); -+ co.aikar.timings.MinecraftTimings.passengerTick.stopTiming(); // Purpur - gameprofilerfiller.exit(); - } - --- -2.26.2 - diff --git a/patches/removed/1.16/server/0120-MC-56653-Fix-pig-zombies-aggro.patch b/patches/removed/1.16/server/0120-MC-56653-Fix-pig-zombies-aggro.patch deleted file mode 100644 index ad750f66b..000000000 --- a/patches/removed/1.16/server/0120-MC-56653-Fix-pig-zombies-aggro.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 709d9ada46d90e86bde0c82e0dc0960c3e7c86b7 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Tue, 9 Jul 2019 20:56:47 -0500 -Subject: [PATCH] MC-56653 Fix - pig zombies aggro - ---- - src/main/java/net/minecraft/server/EntityPigZombie.java | 9 ++++++++- - src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java -index 90bf12c73..c78876fc4 100644 ---- a/src/main/java/net/minecraft/server/EntityPigZombie.java -+++ b/src/main/java/net/minecraft/server/EntityPigZombie.java -@@ -170,6 +170,7 @@ public class EntityPigZombie extends EntityZombie { - boolean result = super.damageEntity(damagesource, f); - - if (result && entity instanceof EntityHuman && !((EntityHuman) entity).isCreative() && this.hasLineOfSight(entity)) { -+ if (world.purpurConfig.zombiePigmanDontTargetUnlessHit) this.setLastDamager((EntityHuman) entity); // Purpur - fix MC-56653 - this.i((EntityLiving) entity); - } - -@@ -188,7 +189,7 @@ public class EntityPigZombie extends EntityZombie { - this.angerLevel = event.getNewAnger(); - // CraftBukkit end - this.soundDelay = this.random.nextInt(40); -- this.setLastDamager(entityliving); -+ if (!world.purpurConfig.zombiePigmanDontTargetUnlessHit) this.setLastDamager(entityliving); // Purpur - fix MC-56653 - return true; - } - -@@ -230,6 +231,12 @@ public class EntityPigZombie extends EntityZombie { - return this.eA(); - } - -+ // Purpur start - fix MC-56653 -+ protected boolean isDropExperience() { -+ return super.isDropExperience() && (!world.purpurConfig.zombiePigmanDontTargetUnlessHit || getLastDamager() instanceof EntityHuman); -+ } -+ // Purpur end -+ - static class PathfinderGoalAnger extends PathfinderGoalNearestAttackableTarget { - - public PathfinderGoalAnger(EntityPigZombie entitypigzombie) { -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 296274896..7e7f10351 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -1013,6 +1013,7 @@ public class PurpurWorldConfig { - public boolean zombiePigmanJockeyOnlyBaby = true; - public double zombiePigmanJockeyChance = 0.05D; - public boolean zombiePigmanJockeyTryExistingChickens = true; -+ public boolean zombiePigmanDontTargetUnlessHit = false; - private void zombiePigmanSettings() { - zombiePigmanRidable = getBoolean("mobs.zombie_pigman.ridable", zombiePigmanRidable); - zombiePigmanRidableInWater = getBoolean("mobs.zombie_pigman.ridable-in-water", zombiePigmanRidableInWater); -@@ -1020,6 +1021,7 @@ public class PurpurWorldConfig { - zombiePigmanJockeyOnlyBaby = getBoolean("mobs.zombie_pigman.jockey.only-babies", zombiePigmanJockeyOnlyBaby); - zombiePigmanJockeyChance = getDouble("mobs.zombie_pigman.jockey.chance", zombiePigmanJockeyChance); - zombiePigmanJockeyTryExistingChickens = getBoolean("mobs.zombie_pigman.jockey.try-existing-chickens", zombiePigmanJockeyTryExistingChickens); -+ zombiePigmanDontTargetUnlessHit = getBoolean("mobs.zombie_pigman.dont-target-unless-hit", zombiePigmanDontTargetUnlessHit); - } - - public boolean zombieVillagerRidable = false; --- -2.26.2 - diff --git a/patches/removed/1.16/server/0124-YAPFA-Disable-mojang-profiler.patch b/patches/removed/1.16/server/0124-YAPFA-Disable-mojang-profiler.patch deleted file mode 100644 index 5152957eb..000000000 --- a/patches/removed/1.16/server/0124-YAPFA-Disable-mojang-profiler.patch +++ /dev/null @@ -1,175 +0,0 @@ -From 1b1a21c1dc6b4bbfbe85b0743ee29c22385882f9 Mon Sep 17 00:00:00 2001 -From: tr7zw -Date: Thu, 5 Mar 2020 23:08:01 +0100 -Subject: [PATCH] YAPFA - Disable mojang profiler - ---- - .../net/minecraft/server/CommandDebug.java | 5 ++ - .../net/minecraft/server/MinecraftServer.java | 5 +- - .../net/pl3x/purpur/GameProfilerNoop.java | 68 +++++++++++++++++++ - .../java/org/bukkit/craftbukkit/Main.java | 2 + - src/main/resources/purpur.lang | 1 + - 5 files changed, 80 insertions(+), 1 deletion(-) - create mode 100644 src/main/java/net/pl3x/purpur/GameProfilerNoop.java - -diff --git a/src/main/java/net/minecraft/server/CommandDebug.java b/src/main/java/net/minecraft/server/CommandDebug.java -index f0d72ea39..e38a68406 100644 ---- a/src/main/java/net/minecraft/server/CommandDebug.java -+++ b/src/main/java/net/minecraft/server/CommandDebug.java -@@ -22,6 +22,7 @@ public class CommandDebug { - private static final Logger LOGGER = LogManager.getLogger(); - private static final SimpleCommandExceptionType b = new SimpleCommandExceptionType(new ChatMessage("commands.debug.notRunning", new Object[0])); - private static final SimpleCommandExceptionType c = new SimpleCommandExceptionType(new ChatMessage("commands.debug.alreadyRunning", new Object[0])); -+ private static final SimpleCommandExceptionType disabled = new SimpleCommandExceptionType(new ChatMessage("commands.purpur.debug.disabled")); // Purpur - @Nullable - private static final FileSystemProvider d = (FileSystemProvider) FileSystemProvider.installedProviders().stream().filter((filesystemprovider) -> { - return filesystemprovider.getScheme().equalsIgnoreCase("jar"); -@@ -43,6 +44,8 @@ public class CommandDebug { - MinecraftServer minecraftserver = commandlistenerwrapper.getServer(); - GameProfiler gameprofiler = minecraftserver.getMethodProfiler(); - -+ if (gameprofiler instanceof net.pl3x.purpur.GameProfilerNoop) throw CommandDebug.disabled.create(); // Purpur -+ - if (gameprofiler.d().a()) { - throw CommandDebug.c.create(); - } else { -@@ -56,6 +59,8 @@ public class CommandDebug { - MinecraftServer minecraftserver = commandlistenerwrapper.getServer(); - GameProfiler gameprofiler = minecraftserver.getMethodProfiler(); - -+ if (gameprofiler instanceof net.pl3x.purpur.GameProfilerNoop) throw CommandDebug.disabled.create(); // Purpur -+ - if (!gameprofiler.d().a()) { - throw CommandDebug.b.create(); - } else { -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 40da7a05c..6928d2492 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -80,7 +80,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant tickables = Lists.newArrayList(); -- private final GameProfiler methodProfiler = new GameProfiler(this::ak); -+ protected GameProfiler methodProfiler = new net.pl3x.purpur.GameProfilerNoop(this::getTickCount); // Purpur - private ServerConnection serverConnection; - public final WorldLoadListenerFactory worldLoadListenerFactory; - private final ServerPing serverPing = new ServerPing(); -@@ -1529,6 +1529,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant supplier) { -+ } -+ -+ @Override -+ public void exit() { -+ } -+ -+ @Override -+ public void exitEnter(String s) { -+ } -+ -+ @Override -+ public void c(String s) { -+ } -+ -+ @Override -+ public void c(Supplier supplier) { -+ } -+ -+ static class EmptyProfiler implements GameProfiler.a { -+ @Override -+ public boolean a() { // isEnabled -+ return false; -+ } -+ -+ @Override -+ public MethodProfilerResults b() { // disable -+ return MethodProfilerResultsEmpty.a; // empty -+ } -+ -+ @Override -+ public void d() { // enable -+ } -+ } -+} -diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index b007840a5..1916bfb5d 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Main.java -+++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -152,6 +152,8 @@ public class Main { - .ofType(File.class) - .defaultsTo(new File("purpur.yml")) - .describedAs("Yml file"); -+ -+ acceptsAll(asList("enableProfiler"), "Enables the vanilla profiler"); - // Purpur end - - // Paper start -diff --git a/src/main/resources/purpur.lang b/src/main/resources/purpur.lang -index e81beea7f..5c3536b26 100644 ---- a/src/main/resources/purpur.lang -+++ b/src/main/resources/purpur.lang -@@ -1,5 +1,6 @@ - { - "cannot.ride.mob": "You cannot mount that mob", -+ "commands.purpur.debug.disabled": "The debug profiler is disabled", - "commands.purpur.ping": "§a%s's ping is %sms", - "idle.timeout.broadcast.away": "§e§o%s is now AFK", - "idle.timeout.broadcast.back": "§e§o%s is no longer AFK" --- -2.26.2 -