diff --git a/Spigot-Server-Patches/Activation-Range-Improvements.patch b/Spigot-Server-Patches/Activation-Range-Improvements.patch index f8d9dbc8c7..486e4de849 100644 --- a/Spigot-Server-Patches/Activation-Range-Improvements.patch +++ b/Spigot-Server-Patches/Activation-Range-Improvements.patch @@ -6,19 +6,19 @@ Subject: [PATCH] Activation Range Improvements Fixes and adds new Immunities to improve gameplay behavior diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java -index fdfe5b9ed..ce3907438 100644 +index 653aba2ba..6f18bd75b 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -0,0 +0,0 @@ public abstract class EntityCreature extends EntityInsentient { - public static final UUID bu = UUID.fromString("E199AD21-BA8A-4C53-8D13-6182D5C69D3A"); - public static final AttributeModifier bv = (new AttributeModifier(EntityCreature.bu, "Fleeing speed bonus", 2.0D, 2)).a(false); + public static final UUID bv = UUID.fromString("E199AD21-BA8A-4C53-8D13-6182D5C69D3A"); + public static final AttributeModifier bw = (new AttributeModifier(EntityCreature.bv, "Fleeing speed bonus", 2.0D, 2)).a(false); + public BlockPosition movingTarget = null; public BlockPosition getMovingTarget() { return movingTarget; } // Paper private BlockPosition a; private float b; - private float c; + private final float c; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b8ac99e5d..7242da9cc 100644 +index 9bfc14e43..1fae017c0 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -31,31 +31,29 @@ index b8ac99e5d..7242da9cc 100644 protected int ticksFarFromPlayer; protected float aW; diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 13ae7a030..7e3aa6ee6 100644 +index 8e165f9db..05ac3811e 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java @@ -0,0 +0,0 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn + return this.bM != null; + } + ++ public boolean inCaravan() { return this.dU(); } // Paper - OBFHELPER + public boolean dU() { return this.bL != null; } - -- public boolean dR() { -+ public boolean inCaravan() { return dR(); } public boolean dR() { // Paper - OBFHELPER - return this.bK != null; - } - diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index ac6e2a9aa..e6c190d43 100644 +index faa82f764..ba7f250c2 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { - private static final Logger bx = LogManager.getLogger(); - private static final DataWatcherObject by = DataWatcher.a(EntityVillager.class, DataWatcherRegistry.b); - private int profession; -- private boolean bA; -+ private boolean bA;public boolean isMating() { return bA; } // Paper - OBFHELPER - private boolean bB; - Village village; - private EntityHuman tradingPlayer; + return Math.max(((Integer) this.datawatcher.get(EntityVillager.bz)).intValue() % 6, 0); + } + ++ public final boolean isMating() { return this.dk(); } // Paper - OBFHELPER + public boolean dk() { + return this.bB; + } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java index 83d9c43f3..1cb6652c2 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoal.java @@ -110,7 +108,7 @@ index e5b5e9887..e3781f3a8 100644 } } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index c8a6ff3d4..428912cbc 100644 +index 7396b35f5..428912cbc 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityFireball; @@ -144,7 +142,7 @@ index c8a6ff3d4..428912cbc 100644 { return true; } -- if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).df()/* Getter for first boolean */ ) +- if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).dk()/* Getter for first boolean */ ) + // Paper start + if ( entity instanceof EntityLlama && ( (EntityLlama ) entity ).inCaravan() ) { diff --git a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch index 5d7aac3e7d..c6aab8f27b 100644 --- a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 96bb11005..7738ca385 100644 +index 0ea60d125..091c96411 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -17,7 +17,7 @@ index 96bb11005..7738ca385 100644 public EntityArmorStand(World world) { super(world); @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { - public boolean cK() { + public boolean cQ() { return false; } + diff --git a/Spigot-Server-Patches/Add-EntityZapEvent.patch b/Spigot-Server-Patches/Add-EntityZapEvent.patch index a85a0ddfbe..287dccee47 100644 --- a/Spigot-Server-Patches/Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/Add-EntityZapEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index 88bd674ba..80ad25c1b 100644 +index c2f4337d0..50629ff33 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -0,0 +0,0 @@ public class EntityPig extends EntityAnimal { @@ -22,7 +22,7 @@ index 88bd674ba..80ad25c1b 100644 if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { return; diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index ee11691bf..4ad75468c 100644 +index 67be37ae8..34945598c 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { @@ -48,7 +48,7 @@ index ee11691bf..4ad75468c 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 8158c4801..d77eefd6f 100644 +index a16694ecc..2ff9cee86 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch index dd92c697f5..8d064e72fb 100644 --- a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent For modifying a player's initial spawn location as they join the server diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 80bf61164..59c7e78b8 100644 +index 4aaf287ae..7c73e08c3 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/Add-PlayerUseUnknownEntityEvent.patch index 6627be19d5..cef3eea323 100644 --- a/Spigot-Server-Patches/Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerUseUnknownEntityEvent.patch @@ -18,7 +18,7 @@ index c67cb54a3..521f46262 100644 private Vec3D c; private EnumHand d; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b67837dd2..840448995 100644 +index 1bc61ef43..25c02c727 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Add-World-Util-Methods.patch b/Spigot-Server-Patches/Add-World-Util-Methods.patch index e80eddfbed..e955c78777 100644 --- a/Spigot-Server-Patches/Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/Add-World-Util-Methods.patch @@ -5,10 +5,31 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 491278646..c0d6e056d 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -0,0 +0,0 @@ public class Chunk { + + } + ++ public final int getLightSubtracted(BlockPosition blockposition, int i) { return this.a(blockposition, i); } // Paper - OBFHELPER + public int a(BlockPosition blockposition, int i) { + int j = blockposition.getX() & 15; + int k = blockposition.getY(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cc7369e52..1d2d174e8 100644 +index 1fc7ec6f4..20bdf4055 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { + public final List j = Lists.newArrayList(); + protected final IntHashMap entitiesById = new IntHashMap(); + private final long K = 16777215L; +- private int L; ++ private int L; private int getSkylightSubtracted() { return this.L; } // Paper - OBFHELPER + protected int l = (new Random()).nextInt(); + protected final int m = 1013904223; + protected float n; @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { return (CraftServer) Bukkit.getServer(); } @@ -53,7 +74,7 @@ index cc7369e52..1d2d174e8 100644 + } + + Chunk chunk = this.getChunkAtWorldCoords(blockposition); -+ return chunk.a(blockposition, this.J) >= level; ++ return chunk.getLightSubtracted(blockposition, this.getSkylightSubtracted()) >= level; + } + } else { + return true; @@ -64,6 +85,11 @@ index cc7369e52..1d2d174e8 100644 public int getLightLevel(BlockPosition blockposition) { return this.c(blockposition, true); } + ++ public final int getLight(BlockPosition blockposition, boolean checkNeighbors) { return this.c(blockposition, checkNeighbors); } // Paper - OBFHELPER + public int c(BlockPosition blockposition, boolean flag) { + if (blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000) { + if (flag && this.getType(blockposition).f()) { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { return this.worldProvider.o()[this.getLightLevel(blockposition)]; } diff --git a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch index 9af72defaf..60cc03444d 100644 --- a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch @@ -30,7 +30,7 @@ index 5f13fbff3..4b64ccaa0 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index c23bd2e9b..a9e3b632b 100644 +index 09e5408ac..be3422adc 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/Add-exception-reporting-event.patch b/Spigot-Server-Patches/Add-exception-reporting-event.patch index 50bff6c7a0..c06436923a 100644 --- a/Spigot-Server-Patches/Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/Add-exception-reporting-event.patch @@ -50,7 +50,7 @@ index 000000000..93397188b +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index e1fc4ea6c..8f1a68d67 100644 +index 9c7b81a8b..491278646 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -89,7 +89,7 @@ index e1fc4ea6c..8f1a68d67 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index fab36ec15..0ad57afba 100644 +index ba720204d..9449b645d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ import java.util.Iterator; @@ -144,16 +144,17 @@ index fab36ec15..0ad57afba 100644 } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 016c64e82..2ff8a6da0 100644 +index 83322b85b..b943a9b20 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -0,0 +0,0 @@ package net.minecraft.server; +import com.destroystokyo.paper.exception.ServerInternalException; - import com.google.common.base.Charsets; ++import com.google.common.base.Charsets; import com.google.common.base.Predicate; import com.google.common.collect.Iterators; + import com.google.common.collect.Lists; @@ -0,0 +0,0 @@ public class NameReferencingFileConverter { root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1)); } catch (Exception exception) { @@ -198,7 +199,7 @@ index 936d6c640..50056f49a 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 8d1b65885..5f9678aad 100644 +index 1ba26de5c..6a92b5af8 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -0,0 +0,0 @@ @@ -225,7 +226,7 @@ index 8d1b65885..5f9678aad 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 6ec72689c..02b9bc8df 100644 +index c15a0d1f8..5f9e9ddef 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -0,0 +0,0 @@ @@ -244,7 +245,7 @@ index 6ec72689c..02b9bc8df 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index e42a0c776..c79fb7d57 100644 +index c56a8e9c2..fdc439914 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ import java.util.Random; @@ -272,7 +273,7 @@ index e42a0c776..c79fb7d57 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index 7af5b7dd7..2b498024c 100644 +index 9ff4f23ab..6fce3015f 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -0,0 +0,0 @@ @@ -292,7 +293,7 @@ index 7af5b7dd7..2b498024c 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 354a7309b..cc7369e52 100644 +index b7f502ecd..1fc7ec6f4 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -301,7 +302,7 @@ index 354a7309b..cc7369e52 100644 +import com.destroystokyo.paper.event.server.ServerExceptionEvent; +import com.destroystokyo.paper.exception.ServerInternalException; import com.google.common.base.Function; - import com.google.common.base.Objects; + import com.google.common.base.MoreObjects; import com.google.common.base.Predicate; @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { } catch (Throwable throwable1) { diff --git a/Spigot-Server-Patches/Add-fromBottle-flag-to-Experience-Orbs.patch b/Spigot-Server-Patches/Add-fromBottle-flag-to-Experience-Orbs.patch index bc60e15107..3c16b786a1 100644 --- a/Spigot-Server-Patches/Add-fromBottle-flag-to-Experience-Orbs.patch +++ b/Spigot-Server-Patches/Add-fromBottle-flag-to-Experience-Orbs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add fromBottle flag to Experience Orbs diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 14431b8ad..54c9200a9 100644 +index 64ac6e6a3..19a37bfec 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { diff --git a/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch index 75f852ed1e..8a95802c61 100644 --- a/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -4,25 +4,8 @@ Date: Sun, 25 Nov 2012 13:43:39 -0600 Subject: [PATCH] Add methods for working with arrows stuck in living entities -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index e5fa1c3ba..247224117 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue(); - } - -+ public final int getStuckArrows() { return this.cc(); } // Paper - OBFHELPER - public final int cc() { - return ((Integer) this.datawatcher.get(EntityLiving.bq)).intValue(); - } - -+ public final void setStuckArrows(int arrows) { this.f(arrows); } // Paper - OBFHELPER - public final void f(int i) { - this.datawatcher.set(EntityLiving.bq, Integer.valueOf(i)); - } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 61032eb2f..348a8c758 100644 +index 062a0fd55..8ed91e82a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -33,12 +16,12 @@ index 61032eb2f..348a8c758 100644 + // Paper start + @Override + public int getArrowsStuck() { -+ return this.getHandle().getStuckArrows(); ++ return getHandle().getArrowCount(); + } + + @Override + public void setArrowsStuck(int arrows) { -+ this.getHandle().setStuckArrows(arrows); ++ getHandle().setArrowCount(arrows); + } + // Paper end } diff --git a/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch b/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch index d4523c2029..32be6794e3 100644 --- a/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch +++ b/Spigot-Server-Patches/Add-option-to-remove-invalid-statistics.patch @@ -23,7 +23,7 @@ index db2a4c2c7..e936264c5 100644 + } } diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java -index 99466dbde..d1bee0257 100644 +index 14af226f3..e3d2c0ff7 100644 --- a/src/main/java/net/minecraft/server/ServerStatisticManager.java +++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java @@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager { @@ -37,7 +37,7 @@ index 99466dbde..d1bee0257 100644 @@ -0,0 +0,0 @@ public class ServerStatisticManager extends StatisticManager { hashmap.put(statistic, statisticwrapper); } else { - ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", new Object[] { this.d, entry.getKey()}); + ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", this.d, entry.getKey()); + if (com.destroystokyo.paper.PaperConfig.removeInvalidStatistics) invalidStats.add((String) entry.getKey()); // Paper } } diff --git a/Spigot-Server-Patches/Add-player-view-distance-API.patch b/Spigot-Server-Patches/Add-player-view-distance-API.patch index 3472ba0d4b..caccbb57bd 100644 --- a/Spigot-Server-Patches/Add-player-view-distance-API.patch +++ b/Spigot-Server-Patches/Add-player-view-distance-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add player view distance API diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 79c9601fa..1ed1859b8 100644 +index 586c4ad0d..1a5e5d944 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -25,7 +25,7 @@ index 79c9601fa..1ed1859b8 100644 // CraftBukkit start public String displayName; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 021dfba14..9012a63a0 100644 +index e4ed2e991..cfac05750 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap { @@ -194,7 +194,7 @@ index 021dfba14..9012a63a0 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 87ac74420..16dcaba3f 100644 +index 94cca69a4..efcf383e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch index 41674485d3..303d296a43 100644 --- a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch @@ -19,7 +19,7 @@ index 0140d1981..c758bde3f 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 2ff8a6da0..52e736080 100644 +index b943a9b20..8f3b93dc1 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -0,0 +0,0 @@ public class NameReferencingFileConverter { @@ -33,7 +33,7 @@ index 2ff8a6da0..52e736080 100644 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a958ce998..8ade16865 100644 +index f4fd25c29..8f8f5e36f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-velocity-warnings.patch b/Spigot-Server-Patches/Add-velocity-warnings.patch index 9f53b367cc..a2cbddd133 100644 --- a/Spigot-Server-Patches/Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/Add-velocity-warnings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index cab671d68..28da39cbd 100644 +index 01b1ef39f..0b7c02d36 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -17,7 +17,7 @@ index cab671d68..28da39cbd 100644 private final class BooleanWrapper { private boolean value = true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 6497905b9..463289199 100644 +index 9cb05e067..917fa3d21 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch index d716cd30c1..04d548cf64 100644 --- a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch @@ -19,17 +19,18 @@ index 6ce62827a..ab7e81a0d 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index 8fb14d6b5..c68429fb1 100644 +index 24aac10da..31cf1df5d 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster { - return super.cM(); + if (biomebase == Biomes.h && this.locY > 50.0D && this.locY < 70.0D && this.random.nextFloat() < 0.5F && this.random.nextFloat() < this.world.G() && this.world.getLightLevel(new BlockPosition(this)) <= this.random.nextInt(8)) { + return super.P(); } - +- - if (this.random.nextInt(10) == 0 && chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0 && this.locY < 40.0D) { // Spigot + boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper + if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { // Paper - return super.cM(); + return super.P(); } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch index 83dfab8f18..3ce392d2bb 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8ade16865..326196ce4 100644 +index 8f8f5e36f..8559d8200 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch index 94b2e80302..7c22f01f5e 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9df6c0ebb..e77307c35 100644 +index e1ae5f878..0dca774af 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/Allow-for-toggling-of-spawn-chunks.patch index a9272f9ebf..c158eb2412 100644 --- a/Spigot-Server-Patches/Allow-for-toggling-of-spawn-chunks.patch +++ b/Spigot-Server-Patches/Allow-for-toggling-of-spawn-chunks.patch @@ -20,7 +20,7 @@ index 4b64ccaa0..7ac6a5f1f 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a87b37277..edd6c3b5e 100644 +index eafb76003..1ff2263eb 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch index 4caafb7c00..e37ea1b9d5 100644 --- a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch @@ -31,13 +31,13 @@ index 4f2fa59ac..8af52a61f 100644 this.b.l(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 48ff4c811..c23bd2e9b 100644 +index 254955156..09e5408ac 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { - private boolean bD; + private boolean bE; private Entity leashHolder; - private NBTTagCompound bF; + private NBTTagCompound bG; + public PathfinderGoalFloat goalFloat; // Paper public EntityInsentient(World world) { @@ -56,7 +56,7 @@ index 48ff4c811..c23bd2e9b 100644 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index e3b405856..2d27aa63a 100644 +index b3b303b3b..fc8be86fd 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java @@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal { @@ -65,12 +65,15 @@ index e3b405856..2d27aa63a 100644 this.a = entityinsentient; + if (entityinsentient.fromMobSpawner && entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper this.a(4); - ((Navigation) entityinsentient.getNavigation()).c(true); + if (entityinsentient.getNavigation() instanceof Navigation) { + ((Navigation) entityinsentient.getNavigation()).c(true); +@@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal { + } + public boolean validConditions() { return this.a(); } // Paper - OBFHELPER public boolean a() { - return this.a.isInWater() || this.a.ao(); + return this.a.isInWater() || this.a.au(); } + public void update() { this.e(); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/Auto-Save-Improvements.patch b/Spigot-Server-Patches/Auto-Save-Improvements.patch index 96485061d5..d2ed32c232 100644 --- a/Spigot-Server-Patches/Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/Auto-Save-Improvements.patch @@ -12,7 +12,7 @@ Re-introduce a cap per tick for auto save (Spigot disabled the vanilla cap) and Adds incremental player auto saving too diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5b4d715a4..db2a4c2c7 100644 +index 621c585e7..da0984a35 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -26,7 +26,7 @@ index 5b4d715a4..db2a4c2c7 100644 + } } diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index dc96bd7f4..bcf24cb49 100644 +index cec9ea74c..39f8a0a2c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ package com.destroystokyo.paper; @@ -34,9 +34,9 @@ index dc96bd7f4..bcf24cb49 100644 import java.util.List; +import net.minecraft.server.MinecraftServer; - import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; + @@ -0,0 +0,0 @@ public class PaperWorldConfig { private void elytraHitWallDamage() { elytraHitWallDamage = getBoolean("elytra-hit-wall-damage", true); @@ -58,7 +58,7 @@ index dc96bd7f4..bcf24cb49 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 88437d77a..9f7f32dc2 100644 +index a639ab2a8..099ce0b2d 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -76,7 +76,7 @@ index 88437d77a..9f7f32dc2 100644 public Random a(long i) { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 81b9bb884..71df9e4aa 100644 +index 9836c0c5a..39f0f5a17 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ @@ -96,22 +96,22 @@ index 81b9bb884..71df9e4aa 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 4e8efc549..55c966811 100644 +index 2b01c5395..42eaef8a1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - private static final Logger bR = LogManager.getLogger(); + private static final Logger bW = LogManager.getLogger(); public String locale = null; // Spigot private -> public // Paper - default to null + public long lastSave = MinecraftServer.currentTick; // Paper public PlayerConnection playerConnection; public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2349c3ade..8134501c7 100644 +index 19a66b64c..1f0e79387 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; @@ -119,7 +119,7 @@ index 2349c3ade..8134501c7 100644 // CraftBukkit end // Spigot start public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant(); -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.q.b().a(agameprofile); } @@ -155,7 +155,7 @@ index 2349c3ade..8134501c7 100644 this.methodProfiler.a("tallying"); // Spigot start diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 97322c5da..58f30fb1d 100644 +index e7017883f..31f2704af 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -192,7 +192,7 @@ index 97322c5da..58f30fb1d 100644 public void addWhitelist(GameProfile gameprofile) { this.whitelist.add(new WhiteListEntry(gameprofile)); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f80647b31..914c20282 100644 +index 36e6fdd16..b1253899c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch index 8257be8a59..9d97bc2ff3 100644 --- a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch @@ -6,15 +6,15 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 55c966811..eca224bdb 100644 +index 42eaef8a1..57d21fc12 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - } - } + public void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + if (this.locY > 300) this.locY = 257; // Paper - bring down to a saner Y level if out of world - this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit - } - + if (nbttagcompound.hasKeyOfType("playerGameType", 99)) { + if (this.C_().getForceGamemode()) { + this.playerInteractManager.setGameMode(this.C_().getGamemode()); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch index 07c0992b53..3195976014 100644 --- a/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/Bound-Treasure-Maps-to-World-Border.patch @@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 9c1605b14..77236760f 100644 +index 078957aac..7b635d3fa 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -0,0 +0,0 @@ public abstract class StructureGenerator extends WorldGenBase { diff --git a/Spigot-Server-Patches/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch index 39f0855dd2..67edd4e3b9 100644 --- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch @@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped. You can set this to 0 to disable collisions. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 61efcc479..4898e8bce 100644 +index 70af657f5..af953dda4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -27,7 +27,7 @@ index 61efcc479..4898e8bce 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6fcced926..cfeff7c48 100644 +index b8b1b32df..2794ffa5b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -39,7 +39,7 @@ index 6fcced926..cfeff7c48 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 7242da9cc..53486e205 100644 +index f59c67b79..096d56026 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Change-Outdated-Build-Download-URL-to-Paper-CI.patch b/Spigot-Server-Patches/Change-Outdated-Build-Download-URL-to-Paper-CI.patch index b3eaf8525e..bbc4773993 100644 --- a/Spigot-Server-Patches/Change-Outdated-Build-Download-URL-to-Paper-CI.patch +++ b/Spigot-Server-Patches/Change-Outdated-Build-Download-URL-to-Paper-CI.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Change Outdated Build Download URL to Paper CI diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 59d4e2e6f..e4ec213e4 100644 +index 507390c4b..dab983481 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { - deadline.add(Calendar.DAY_OF_YEAR, -14); + deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { System.err.println("*** Error, this build is outdated ***"); - System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***"); diff --git a/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch index 26bf53234f..387befbe6d 100644 --- a/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Change implementation of (tile)entity removal list diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7feed2995..5b5e0e73c 100644 +index e712ab370..e9a7565ae 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { - private static final DataWatcherObject aB = DataWatcher.a(Entity.class, DataWatcherRegistry.h); private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.h); private static final DataWatcherObject aD = DataWatcher.a(Entity.class, DataWatcherRegistry.h); + private static final DataWatcherObject aE = DataWatcher.a(Entity.class, DataWatcherRegistry.h); - public boolean aa; - public int ab; - public int ac; @@ -24,7 +24,7 @@ index 7feed2995..5b5e0e73c 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a1cdcd71b..354a7309b 100644 +index 4b49d1976..b7f502ecd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; diff --git a/Spigot-Server-Patches/Check-online-mode-before-converting-and-renaming-pla.patch b/Spigot-Server-Patches/Check-online-mode-before-converting-and-renaming-pla.patch index 5d015afe24..94774f7c17 100644 --- a/Spigot-Server-Patches/Check-online-mode-before-converting-and-renaming-pla.patch +++ b/Spigot-Server-Patches/Check-online-mode-before-converting-and-renaming-pla.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Check online mode before converting and renaming player data diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index caec56824..30b54a50e 100644 +index ba124665f..7eaa8d511 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -0,0 +0,0 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { - File file = new File(this.playerDir, entityhuman.bf() + ".dat"); + File file = new File(this.playerDir, entityhuman.bl() + ".dat"); // Spigot Start boolean usingWrongFile = false; - if ( !file.exists() ) diff --git a/Spigot-Server-Patches/Chunk-registration-fixes.patch b/Spigot-Server-Patches/Chunk-registration-fixes.patch index 51855aabb0..74eebdd37e 100644 --- a/Spigot-Server-Patches/Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/Chunk-registration-fixes.patch @@ -8,7 +8,7 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7900fca57..ec0a28cff 100644 +index 0a473d7d2..888ecce77 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/Chunk-save-queue-improvements.patch index 6ed6f5839e..6f35390f90 100644 --- a/Spigot-Server-Patches/Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/Chunk-save-queue-improvements.patch @@ -41,12 +41,12 @@ index 9a6f87e59..873ffa77d 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index bee52d783..8e91be4a1 100644 +index 6550686ee..17005d677 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -0,0 +0,0 @@ import java.util.Map; +@@ -0,0 +0,0 @@ import java.util.List; + import java.util.Map; import java.util.Set; - import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nullable; +import java.util.concurrent.ConcurrentLinkedQueue; // Paper import org.apache.logging.log4j.LogManager; @@ -57,9 +57,9 @@ index bee52d783..8e91be4a1 100644 + private ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue<>(); // Paper - Chunk queue improvements + private final Object lock = new Object(); // Paper - Chunk queue improvements private static final Logger a = LogManager.getLogger(); - private final Map b = new ConcurrentHashMap(); -- private final Set c = Collections.newSetFromMap(new ConcurrentHashMap()); -+ //private final Set c = Collections.newSetFromMap(new ConcurrentHashMap()); // Paper - Chunk queue improvements + private final Map b = Maps.newConcurrentMap(); +- private final Set c = Collections.newSetFromMap(Maps.newConcurrentMap()); ++ //private final Set c = Collections.newSetFromMap(Maps.newConcurrentMap()); // Paper - Chunk queue improvements private final File d; private final DataConverterManager e; private boolean f; @@ -76,7 +76,7 @@ index bee52d783..8e91be4a1 100644 FileIOThread.a().a(this); } - public boolean c() { + public boolean a() { - // CraftBukkit start - Iterator> iter = this.b.entrySet().iterator(); - if (!iter.hasNext()) { @@ -86,7 +86,7 @@ index bee52d783..8e91be4a1 100644 + if (chunk == null) { + // Paper - end if (this.f) { - ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", new Object[] { this.d.getName()}); + ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.d.getName()); } return false; @@ -139,7 +139,7 @@ index bee52d783..8e91be4a1 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java -index acfdd52dc..fdbaf5fbd 100644 +index 1d6b1874c..9ee4115be 100644 --- a/src/main/java/net/minecraft/server/FileIOThread.java +++ b/src/main/java/net/minecraft/server/FileIOThread.java @@ -0,0 +0,0 @@ public class FileIOThread implements Runnable { diff --git a/Spigot-Server-Patches/Complete-resource-pack-API.patch b/Spigot-Server-Patches/Complete-resource-pack-API.patch index fd24db9f26..497a1617b8 100644 --- a/Spigot-Server-Patches/Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/Complete-resource-pack-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 57879c76d..b67837dd2 100644 +index 65ab76cc5..1bc61ef43 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -23,7 +23,7 @@ index 57879c76d..b67837dd2 100644 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 88fcadbfd..dd8380f71 100644 +index cf753d362..5839801f5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch index 72c45cc240..75071e22ac 100644 --- a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch @@ -9,7 +9,7 @@ Also allow turning off treasure maps all together as they can eat up Map ID's which are limited in quantity. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index dcf64efcc..bf2916802 100644 +index a80d8b2ac..32ca0a40e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -28,16 +28,15 @@ index dcf64efcc..bf2916802 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 4ad75468c..ac6e2a9aa 100644 +index 34945598c..faa82f764 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { public void a(IMerchant imerchant, MerchantRecipeList merchantrecipelist, Random random) { int i = this.a.a(random); - World world = imerchant.t_(); -- BlockPosition blockposition = world.a(this.b, imerchant.u_(), true); -+ if (!world.paperConfig.enableTreasureMaps) return; // Paper -+ BlockPosition blockposition = world.a(this.b, imerchant.u_(), !world.paperConfig.treasureMapsAlreadyDiscovered); // Paper - pass false to return first structure, regardless of if its been discovered. true returns only undiscovered. + World world = imerchant.u_(); +- BlockPosition blockposition = world.a(this.b, imerchant.v_(), true); ++ BlockPosition blockposition = world.a(this.b, imerchant.v_(), world.paperConfig.treasureMapsAlreadyDiscovered); // Paper - pass false to return first structure, regardless of if its been discovered. true returns only undiscovered. if (blockposition != null) { ItemStack itemstack = ItemWorldMap.a(world, (double) blockposition.getX(), (double) blockposition.getZ(), (byte) 2, true, true); diff --git a/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch b/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch index 116e63ba8f..34a0bdc9f4 100644 --- a/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch +++ b/Spigot-Server-Patches/Configurable-Chunk-Inhabited-Timer.patch @@ -23,7 +23,7 @@ index e706efff5..2c682ccf7 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 736fa1f62..61d34fc37 100644 +index 88f5ce9e2..15494d0b1 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { diff --git a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch index 10c87e461f..6e03128b8b 100644 --- a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -21,10 +21,10 @@ index 74a49a5fb..3a942c763 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e7c63a953..3aea41f76 100644 +index ecdb92397..b55ce6b1a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs long j = aw(); i = 0; @@ -39,7 +39,7 @@ index e7c63a953..3aea41f76 100644 if (i1 - j > 1000L) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7e6459654..dba3fb167 100644 +index 036d96fa7..b3c580836 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -54,7 +54,7 @@ index 7e6459654..dba3fb167 100644 public void a(Packet packet) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4d761d32a..a958ce998 100644 +index fcc20d28e..f4fd25c29 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -67,7 +67,7 @@ index 4d761d32a..a958ce998 100644 for (int j = -short1; j <= short1; j += 16) { for (int k = -short1; k <= short1; k += 16) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f65611a6a..9965235ab 100644 +index 7c1bbb491..1f88cc94c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Configurable-Player-Collision.patch b/Spigot-Server-Patches/Configurable-Player-Collision.patch index d48b310c64..ef56253c0c 100644 --- a/Spigot-Server-Patches/Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/Configurable-Player-Collision.patch @@ -19,7 +19,7 @@ index 62cbe0cf3..dae321d01 100644 + } } diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java -index ab9aa132a..f9f59e559 100644 +index 00a34e85a..3e1ee96d1 100644 --- a/src/main/java/net/minecraft/server/CommandScoreboard.java +++ b/src/main/java/net/minecraft/server/CommandScoreboard.java @@ -0,0 +0,0 @@ public class CommandScoreboard extends CommandAbstract { @@ -37,10 +37,10 @@ index ab9aa132a..f9f59e559 100644 } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3aea41f76..430168d21 100644 +index b55ce6b1a..9099eb64f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.v.setPlayerFileData(this.worldServer); this.a(this.getDifficulty()); this.l(); @@ -75,7 +75,7 @@ index d8ec50455..eb45d3cf2 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e303b45f0..97322c5da 100644 +index 45ad22c8f..e7017883f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch index 51073d66df..8fc42c0bbf 100644 --- a/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch @@ -20,7 +20,7 @@ index 6228bc1f6..fe9e7b342 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 497d5593c..897882c97 100644 +index 36afc8f07..bf059a746 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { @@ -29,9 +29,9 @@ index 497d5593c..897882c97 100644 private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); - private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, 1); + private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable - private static final DataWatcherObject bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); - private static final DataWatcherObject bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); - private static final DataWatcherObject by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); + private static final DataWatcherObject bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); + private static final DataWatcherObject by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); + private static final DataWatcherObject bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { if (this.world != null && !this.world.isClientSide) { AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); diff --git a/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch index ffd4cad8ca..7eac4861dc 100644 --- a/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch @@ -19,7 +19,7 @@ index 1bb956515..e6aae7317 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b830f833f..bf3e46c35 100644 +index 1a5e5d944..42f6b7206 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/Configurable-end-credits.patch b/Spigot-Server-Patches/Configurable-end-credits.patch index 90a1b0684e..0b8cf60d0c 100644 --- a/Spigot-Server-Patches/Configurable-end-credits.patch +++ b/Spigot-Server-Patches/Configurable-end-credits.patch @@ -20,35 +20,24 @@ index fd606ee14..c00fa83d5 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f7edd9aa1..dbc5cf632 100644 +index 3ef2ffd2d..586c4ad0d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - return this.world.pvpMode; - } - -+ -+ // Paper start - Give "theEnd2" achievement if the player doesn't already have it -+ private void giveTheEnd2() { -+ if (!this.a(AchievementList.D)) { -+ this.b(AchievementList.D); -+ } -+ } -+ // Paper end -+ - @Nullable - public Entity c(int i) { - if (this.isSleeping()) return this; // CraftBukkit - SPIGOT-3154 + private long co = System.currentTimeMillis(); + private Entity cp; + public boolean worldChangeInvuln; +- private boolean cr; ++ private boolean cr; private void setHasSeenCredits(boolean has) { this.cr = has; } // Paper - OBFHELPER + private final RecipeBookServer cs = new RecipeBookServer(); + private Vec3D ct; + private int cu; @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.world.kill(this); if (!this.viewingCredits) { this.viewingCredits = true; -- if (this.a(AchievementList.D)) { -+ // Paper start - Allow configurable end portal credits -+ if (world.paperConfig.disableEndCredits || this.a(AchievementList.D)) { -+ this.giveTheEnd2(); -+ // Paper end - this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, 0.0F)); - } else { - this.b((Statistic) AchievementList.D); ++ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits + this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cr ? 0.0F : 1.0F)); + this.cr = true; + } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/Configurable-flying-kick-messages.patch index fbc71aeaec..8e7a5640b7 100644 --- a/Spigot-Server-Patches/Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/Configurable-flying-kick-messages.patch @@ -21,22 +21,22 @@ index d765607c0..5b4d715a4 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6281fe4d5..51d27351d 100644 +index 7b8e7f343..d2742df61 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { if (this.B) { if (++this.C > 80) { - PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", new Object[] { this.player.getName()}); + PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getName()); - this.disconnect("Flying is not enabled on this server"); + this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message return; } } else { @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - if (this.D && this.player.getVehicle().bw() == this.player) { + if (this.D && this.player.getVehicle().bC() == this.player) { if (++this.E > 80) { - PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", new Object[] { this.player.getName()}); + PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName()); - this.disconnect("Flying is not enabled on this server"); + this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage); // Paper - use configurable kick message return; diff --git a/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch index 212b0883e2..1e46bb977a 100644 --- a/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch @@ -23,7 +23,7 @@ index c758bde3f..d765607c0 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 060434f32..6281fe4d5 100644 +index bac3ba83d..7b8e7f343 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/Configurable-spawn-chances-for-skeleton-horses.patch index 645abf9708..0350082abe 100644 --- a/Spigot-Server-Patches/Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/Configurable-spawn-chances-for-skeleton-horses.patch @@ -19,7 +19,7 @@ index b37b5901b..adc810720 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9b059e52c..de900920a 100644 +index 04eb5ad9a..7d7f3d39e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch b/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch index f14d8da3b8..20bfa18d69 100644 --- a/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch +++ b/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch @@ -22,15 +22,15 @@ index 621bf7051..f24839378 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 549e3434b..bc0652874 100644 +index 20b71b455..ee8e50706 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { } - public boolean cM() { -- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cM(); -+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cM(); // Paper - Configurable squid spawn height range + public boolean P() { +- return this.locY > 45.0D && this.locY < (double) this.world.getSeaLevel() && super.P(); ++ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.P(); // Paper - Configurable squid spawn height range } public void b(float f, float f1, float f2) { diff --git a/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch index 726d13b758..5637ec6c00 100644 --- a/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch @@ -20,7 +20,7 @@ index 62e6830aa..e524a464f 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 313100aed..7feed2995 100644 +index 3dff98596..e712ab370 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -31,7 +31,7 @@ index 313100aed..7feed2995 100644 + // Extracted to own function + /* if (this.locY < -64.0D) { - this.Y(); + this.ac(); } + */ + this.checkAndDoHeightDamage(); @@ -55,19 +55,19 @@ index 313100aed..7feed2995 100644 + } + // Paper end + - protected void H() { + protected void I() { if (this.portalCooldown > 0) { --this.portalCooldown; @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { this.fireTicks = 0; } -+ protected final void kill() { this.Y(); } // Paper - OBFHELPER - protected void Y() { ++ protected final void kill() { this.ac(); } // Paper - OBFHELPER + protected void ac() { this.die(); } diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index fd3337d3f..ca1faa41d 100644 +index f4ad25dae..4b1c7ad99 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -0,0 +0,0 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT @@ -78,7 +78,7 @@ index fd3337d3f..ca1faa41d 100644 + // Extracted to own function + /* if (this.locY < -64.0D) { - this.Y(); + this.ac(); } + */ + this.checkAndDoHeightDamage(); diff --git a/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch index b1ba654ea1..879453dc05 100644 --- a/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/Custom-replacement-for-eaten-items.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 247224117..9cb3b22fb 100644 +index 1ad33521c..2b20a0205 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -13,7 +13,7 @@ index 247224117..9cb3b22fb 100644 protected void v() { if (!this.activeItem.isEmpty() && this.isHandRaised()) { + PlayerItemConsumeEvent event = null; // Paper - this.a(this.activeItem, 16); + this.b(this.activeItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; if (this instanceof EntityPlayer) { @@ -34,9 +34,9 @@ index 247224117..9cb3b22fb 100644 + } + // Paper end + - this.a(this.cz(), itemstack); + this.a(this.cF(), itemstack); // CraftBukkit end - this.cF(); + this.cL(); + + // Paper start - if the replacement is anything but the default, update the client inventory + if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { diff --git a/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch index 434b71035d..a7fa852283 100644 --- a/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/Default-loading-permissions.yml-before-plugins.patch @@ -30,7 +30,7 @@ index 873ffa77d..b5ff26c71 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 28da39cbd..9df6c0ebb 100644 +index 0b7c02d36..e1ae5f878 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch index c67d1a5180..84005e4c82 100644 --- a/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,7 +17,7 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 894d40662..04861f146 100644 +index d5d6e7fcd..ef60c15bd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -35,7 +35,7 @@ index 894d40662..04861f146 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 98f2cff15..88437d77a 100644 +index d37221f09..a639ab2a8 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -47,7 +47,7 @@ index 98f2cff15..88437d77a 100644 public final int locZ; private boolean m; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index eb3225ef2..81b9bb884 100644 +index a512a4113..9836c0c5a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -68,10 +68,10 @@ index eb3225ef2..81b9bb884 100644 + } + // Paper end - this.chunkLoader.a(); + this.chunkLoader.b(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index dd40e98c8..f109e986d 100644 +index 3d30e1831..48a008e0a 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -127,7 +127,7 @@ index 0a0b5261b..14ea89c91 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9965235ab..3f8859a1f 100644 +index 1f88cc94c..0466a4f00 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch index bb96e30c51..17da98ce32 100644 --- a/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/Disable-Scoreboards-for-non-players-by-default.patch @@ -25,7 +25,7 @@ index fa49397ea..9987a5c7a 100644 + } } diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java -index 7af5d0aef..ab9aa132a 100644 +index 06523f683..00a34e85a 100644 --- a/src/main/java/net/minecraft/server/CommandScoreboard.java +++ b/src/main/java/net/minecraft/server/CommandScoreboard.java @@ -0,0 +0,0 @@ public class CommandScoreboard extends CommandAbstract { @@ -33,19 +33,19 @@ index 7af5d0aef..ab9aa132a 100644 while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); + if (!entity.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(entity instanceof EntityHuman)) { continue; } // Paper - String s2 = e(minecraftserver, icommandlistener, entity.bf()); + String s2 = f(minecraftserver, icommandlistener, entity.bl()); if (scoreboard.addPlayerToTeam(s2, s)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 5b5e0e73c..be54c807b 100644 +index e9a7565ae..dbaf2863b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @Nullable - public ScoreboardTeamBase aQ() { + public ScoreboardTeamBase aW() { + if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper - return this.world.getScoreboard().getPlayerTeam(this.bf()); + return this.world.getScoreboard().getPlayerTeam(this.bl()); } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch b/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch index baef782275..a9248e9f28 100644 --- a/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch +++ b/Spigot-Server-Patches/Disable-Vanilla-Chunk-GC.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Disable Vanilla Chunk GC Bukkit has its own system for this. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 914c20282..fdec385a7 100644 +index b1253899c..ce7ef012f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Disable-explosion-knockback.patch b/Spigot-Server-Patches/Disable-explosion-knockback.patch index 4e617dda51..847fff361f 100644 --- a/Spigot-Server-Patches/Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/Disable-explosion-knockback.patch @@ -19,7 +19,7 @@ index a197af84f..2217f680c 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b22f81b12..e5fa1c3ba 100644 +index c9bf14d77..64876f134 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -30,11 +30,12 @@ index b22f81b12..e5fa1c3ba 100644 if (flag1) { if (flag) { this.world.broadcastEntityEffect(this, (byte) 29); - } else if (damagesource instanceof EntityDamageSource && ((EntityDamageSource) damagesource).x()) { - this.world.broadcastEntityEffect(this, (byte) 33); - } else { +@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { + b0 = 2; + } + + if (!knockbackCancelled) // Paper - Disable explosion knockback - this.world.broadcastEntityEffect(this, (byte) 2); + this.world.broadcastEntityEffect(this, b0); } @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -44,10 +45,10 @@ index b22f81b12..e5fa1c3ba 100644 + if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback + if (this.getHealth() <= 0.0F) { - if (!this.d(damagesource)) { - SoundEffect soundeffect = this.bX(); + if (!this.e(damagesource)) { + SoundEffect soundeffect = this.cd(); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 49fc95e35..d7bc6a0ed 100644 +index 63b70d60c..0d434544d 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -0,0 +0,0 @@ public class Explosion { diff --git a/Spigot-Server-Patches/Disable-ice-and-snow.patch b/Spigot-Server-Patches/Disable-ice-and-snow.patch index cc25f9bd19..600a06a5dd 100644 --- a/Spigot-Server-Patches/Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/Disable-ice-and-snow.patch @@ -19,7 +19,7 @@ index a40d4887c..4fea4b359 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ce087eb7d..ac8dc5f2f 100644 +index 1432c6c85..04eb5ad9a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch index 62f47dc2e5..1ef7948349 100644 --- a/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5f7590e11..a1cdcd71b 100644 +index dfd6c8a3d..4b49d1976 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Disable-thunder.patch b/Spigot-Server-Patches/Disable-thunder.patch index 45f34ec968..0c7c6bf3c9 100644 --- a/Spigot-Server-Patches/Disable-thunder.patch +++ b/Spigot-Server-Patches/Disable-thunder.patch @@ -19,7 +19,7 @@ index 2217f680c..a40d4887c 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 966938997..ce087eb7d 100644 +index 6856aac64..1432c6c85 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/Do-not-allow-a-zero-max-height-in-BiomeJungle.patch b/Spigot-Server-Patches/Do-not-allow-a-zero-max-height-in-BiomeJungle.patch index f9be95793c..37785473b3 100644 --- a/Spigot-Server-Patches/Do-not-allow-a-zero-max-height-in-BiomeJungle.patch +++ b/Spigot-Server-Patches/Do-not-allow-a-zero-max-height-in-BiomeJungle.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not allow a zero max height in BiomeJungle diff --git a/src/main/java/net/minecraft/server/BiomeJungle.java b/src/main/java/net/minecraft/server/BiomeJungle.java -index a4e5e4933..20c18cdbd 100644 +index 8f67cb36c..8dc0b6238 100644 --- a/src/main/java/net/minecraft/server/BiomeJungle.java +++ b/src/main/java/net/minecraft/server/BiomeJungle.java @@ -0,0 +0,0 @@ public class BiomeJungle extends BiomeBase { diff --git a/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch index 2691a2ddb6..7630693341 100644 --- a/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 7738ca385..5818aa5e9 100644 +index 091c96411..693f157ea 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -20,23 +20,23 @@ index 7738ca385..5818aa5e9 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 53486e205..9b7159450 100644 +index 1277ba3c2..ff2fe1b9d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { super.a(d0, flag, iblockdata, blockposition); } -+ public boolean canBreatheUnderwater() { return this.bF(); } // Paper - OBFHELPER - public boolean bF() { ++ public boolean canBreatheUnderwater() { return this.bL(); } // Paper - OBFHELPER + public boolean bL() { return false; } @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { if (this.isAlive()) { if (this.a(Material.WATER)) { -- if (!this.bF() && !this.hasEffect(MobEffects.WATER_BREATHING) && !flag1) { -+ if (!this.canBreatheUnderwater() && !this.hasEffect(MobEffects.WATER_BREATHING) && !flag1) { // Paper - Use obfhelper +- if (!this.bL() && !this.hasEffect(MobEffects.WATER_BREATHING) && !flag1) { ++ if (!this.canBreatheUnderwater() && !this.hasEffect(MobEffects.WATER_BREATHING) && !flag1) { this.setAirTicks(this.d(this.getAirTicks())); if (this.getAirTicks() == -20) { this.setAirTicks(0); diff --git a/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch b/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch index d4fa9e92d6..be4ed2fd7b 100644 --- a/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch +++ b/Spigot-Server-Patches/Do-not-load-chunks-for-light-checks.patch @@ -7,7 +7,7 @@ Should only happen for blocks on the edge that uses neighbors light level (certain blocks). In that case, there will be 3-4 other neighbors to get a light level from. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f86c64cb2..7e6459654 100644 +index ae470656b..036d96fa7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Do-not-mark-chunks-as-active-for-neighbor-updates.patch b/Spigot-Server-Patches/Do-not-mark-chunks-as-active-for-neighbor-updates.patch index f7f8892001..9278e81eaf 100644 --- a/Spigot-Server-Patches/Do-not-mark-chunks-as-active-for-neighbor-updates.patch +++ b/Spigot-Server-Patches/Do-not-mark-chunks-as-active-for-neighbor-updates.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Do not mark chunks as active for neighbor updates Fixes chunk unload issues diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index a6cf1d83d..3db29161d 100644 +index f743efca4..6a64053ca 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { diff --git a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index dbe9b42e83..499f3116cf 100644 --- a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1e295432e..6fcced926 100644 +index 6915be3f1..b8b1b32df 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -13,7 +13,7 @@ index 1e295432e..6fcced926 100644 protected void o(Entity entity) { + if (entity == this) throw new IllegalArgumentException("Entities cannot become a passenger of themselves"); // Paper - issue 572 - if (entity.bB() != this) { + if (entity.bH() != this) { throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch index 6a3503936c..0f4ddcd0c8 100644 --- a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0479b7551..44fdf92ff 100644 +index 5476aa5f7..ca05b3310 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -18,7 +18,7 @@ index 0479b7551..44fdf92ff 100644 public int dimension; protected BlockPosition an; diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 0c528c699..606160a17 100644 +index e6a1e5a2a..d905c338f 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { diff --git a/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch index 1627259664..e25347ca80 100644 --- a/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch +++ b/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index 989758cdf..1c619c596 100644 +index 924dc63a4..07d39d46a 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -0,0 +0,0 @@ public class UserCache { diff --git a/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch b/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch index e7f17a7309..64cbbbf6c1 100644 --- a/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch +++ b/Spigot-Server-Patches/Don-t-spam-reload-spawn-chunks-in-nether-end.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Don't spam reload spawn chunks in nether/end diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 44108ab9a..9bc8ce64c 100644 +index fb24b5407..e301eaf9d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - return this.N; + return this.P; } + public boolean shouldStayLoaded(int i, int j) { return e(i, j); } // Paper - OBFHELPER @@ -17,7 +17,7 @@ index 44108ab9a..9bc8ce64c 100644 BlockPosition blockposition = this.getSpawn(); int k = i * 16 + 8 - blockposition.getX(); diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java -index a27512c0f..4691b3d8f 100644 +index d0265f960..35d8d1a6e 100644 --- a/src/main/java/net/minecraft/server/WorldProvider.java +++ b/src/main/java/net/minecraft/server/WorldProvider.java @@ -0,0 +0,0 @@ public abstract class WorldProvider { diff --git a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch index 85ec341638..f059c1f736 100644 --- a/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/Don-t-teleport-dead-entities.patch @@ -7,7 +7,7 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 42bd79b10..70a431a63 100644 +index aabf25cf2..b3911fa9f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { diff --git a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch index bace3d270d..8bdeac1da8 100644 --- a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -23,8 +23,20 @@ index 7ac6a5f1f..8cdeb34d4 100644 + if (entityTNTHeightNerf != 0) log("TNT Entity Height Limit set to Y: " + entityTNTHeightNerf); + } } +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index c6b7d6c22..bbbd1689e 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { + return this.a(new ItemStack(item, i, 0), f); + } + ++ @Nullable public final EntityItem dropItem(ItemStack itemstack, float offset) { return this.a(itemstack, offset); } // Paper - OBFHELPER + @Nullable + public EntityItem a(ItemStack itemstack, float f) { + if (itemstack.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 5c5038402..4c168d333 100644 +index 3c7488965..0fd29b17e 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { @@ -35,17 +47,18 @@ index 5c5038402..4c168d333 100644 + // Paper start - Configurable EntityFallingBlock height nerf + if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) { + if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) { -+ this.a(new ItemStack(block, 1, block.getDropData(this.block)), 0.0F); ++ this.dropItem(new ItemStack(block, 1, block.getDropData(this.block)), 0.0F); + } + + this.die(); + } + // Paper end - this.motX *= 0.9800000190734863D; - this.motY *= 0.9800000190734863D; - this.motZ *= 0.9800000190734863D; ++ + if (!this.world.isClientSide) { + blockposition = new BlockPosition(this); + boolean flag = this.block.getBlock() == Blocks.dS; diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 0fbdbd69b..fd0735611 100644 +index 44b2d4735..0d70dd1d2 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch b/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch index 4eca5dd83b..58fba1e40a 100644 --- a/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch +++ b/Spigot-Server-Patches/Enforce-Sync-Chunk-Unloads.patch @@ -7,7 +7,7 @@ Unloading Chunks async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b42074706..b837a921c 100644 +index 7e8913794..90565227e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch index 7bbed14c83..580a3f26d3 100644 --- a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 58f30fb1d..034bdb7cf 100644 +index 31f2704af..bc2322e62 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch index cd20bdc141..ed27b3d374 100644 --- a/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch @@ -14,7 +14,7 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 27283efad..57879c76d 100644 +index 63ea04fb4..65ab76cc5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -48,7 +48,7 @@ index 27283efad..57879c76d 100644 } else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) { // Do nothing, this is coming from a plugin diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0f77d0674..5302bb283 100644 +index e5dcd4094..374956d5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch index a24600a256..2826861e67 100644 --- a/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8cbdbda92..f86c64cb2 100644 +index b8719ba91..ae470656b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Entity-Origin-API.patch b/Spigot-Server-Patches/Entity-Origin-API.patch index c875d0b8a4..5d9f3aaccf 100644 --- a/Spigot-Server-Patches/Entity-Origin-API.patch +++ b/Spigot-Server-Patches/Entity-Origin-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 14d23556f..313100aed 100644 +index bbbd1689e..3dff98596 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -35,7 +35,7 @@ index 14d23556f..313100aed 100644 + // Paper start - Restore the entity's origin location + NBTTagList originTag = nbttagcompound.getList("Paper.Origin", 6); + if (!originTag.isEmpty()) { -+ origin = new Location(world.getWorld(), originTag.e(0), originTag.e(1), originTag.e(2)); ++ origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); + } + // Paper end + @@ -51,7 +51,7 @@ index 14d23556f..313100aed 100644 NBTTagList nbttaglist = new NBTTagList(); double[] adouble1 = adouble; diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 4c168d333..307a44c85 100644 +index 0fd29b17e..18e7cf2ad 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { @@ -70,7 +70,7 @@ index 4c168d333..307a44c85 100644 public void a(boolean flag) { diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index fd0735611..25e471d37 100644 +index 0d70dd1d2..bb0904f86 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { @@ -88,8 +88,20 @@ index fd0735611..25e471d37 100644 } @Nullable +diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java +index bc6383669..ca9eb2f3b 100644 +--- a/src/main/java/net/minecraft/server/NBTTagList.java ++++ b/src/main/java/net/minecraft/server/NBTTagList.java +@@ -0,0 +0,0 @@ public class NBTTagList extends NBTBase { + return new int[0]; + } + ++ public final double getDoubleAt(int i) { return this.f(i); } // Paper - OBFHELPER + public double f(int i) { + if (i >= 0 && i < this.list.size()) { + NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 751fc01d1..39919ab1c 100644 +index b87273aca..c6cf7754b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -106,7 +118,7 @@ index 751fc01d1..39919ab1c 100644 flag = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index b3cd6ec17..6497905b9 100644 +index a7fb58a9e..9cb05e067 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/EntityPathfindEvent.patch b/Spigot-Server-Patches/EntityPathfindEvent.patch index ce52d6f06f..c4b9ef27ed 100644 --- a/Spigot-Server-Patches/EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/EntityPathfindEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityPathfindEvent Fires when an Entity decides to start moving to a location. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 43b2be505..c0ef2400b 100644 +index 3e598afd4..3871ad017 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -24,7 +24,7 @@ index 43b2be505..c0ef2400b 100644 } else { + if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper this.q = blockposition; - float f = this.h(); + float f = this.i(); @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { @@ -32,6 +32,6 @@ index 43b2be505..c0ef2400b 100644 } else { + if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper this.q = blockposition; - float f = this.h(); + float f = this.i(); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch index fbfb21df23..b9248a260d 100644 --- a/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/EntityRegainHealthEvent-isFastRegen-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c70f14a15..ec901150d 100644 +index 98cb3c7c2..95700bf68 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -28,7 +28,7 @@ index c70f14a15..ec901150d 100644 if (!event.isCancelled()) { diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index b6e978668..8d95d148f 100644 +index 401002b61..0f63055b5 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -0,0 +0,0 @@ public class FoodMetaData { diff --git a/Spigot-Server-Patches/Expose-server-CommandMap.patch b/Spigot-Server-Patches/Expose-server-CommandMap.patch index 7a6faeba90..aa12e9635a 100644 --- a/Spigot-Server-Patches/Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/Expose-server-CommandMap.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5302bb283..cab671d68 100644 +index 374956d5e..01b1ef39f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/Faster-redstone-torch-rapid-clock-removal.patch index 313e7f7994..5f40d75aae 100644 --- a/Spigot-Server-Patches/Faster-redstone-torch-rapid-clock-removal.patch +++ b/Spigot-Server-Patches/Faster-redstone-torch-rapid-clock-removal.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Faster redstone torch rapid clock removal Only resize the the redstone torch list once, since resizing arrays / lists is costly diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -index 741236289..25a2a5d36 100644 +index 5b0028a78..429f26ed5 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java @@ -0,0 +0,0 @@ public class BlockRedstoneTorch extends BlockTorch { diff --git a/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index 92fff87159..afc84ed513 100644 --- a/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -5,9 +5,17 @@ Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4ca44afa9..dcf64efcc 100644 +index 70b498c7b..a80d8b2ac 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ package com.destroystokyo.paper; + import java.util.List; + + import net.minecraft.server.MinecraftServer; ++import org.bukkit.Bukkit; + import org.bukkit.configuration.file.YamlConfiguration; + import org.spigotmc.SpigotWorldConfig; + @@ -0,0 +0,0 @@ public class PaperWorldConfig { private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); @@ -22,7 +30,7 @@ index 4ca44afa9..dcf64efcc 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 8059e6dcd..a4f465e38 100644 +index 6a22dce51..30e6e69fa 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { @@ -41,11 +49,11 @@ index 8059e6dcd..a4f465e38 100644 Block block = this.block.getBlock(); diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java -index 1a01a57d2..f914ad417 100644 +index 41a639a27..c88938dd3 100644 --- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java +++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java @@ -0,0 +0,0 @@ public class ItemMonsterEgg extends Item { - NBTTagCompound nbttagcompound1 = entity.e(new NBTTagCompound()); + NBTTagCompound nbttagcompound1 = entity.save(new NBTTagCompound()); UUID uuid = entity.getUniqueID(); - nbttagcompound1.a(nbttagcompound.getCompound("EntityTag")); diff --git a/Spigot-Server-Patches/Firework-API-s.patch b/Spigot-Server-Patches/Firework-API-s.patch index 7b3e64d8fa..b27600fc7b 100644 --- a/Spigot-Server-Patches/Firework-API-s.patch +++ b/Spigot-Server-Patches/Firework-API-s.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java -index 572f4dead..f9cf382b2 100644 +index 5e452b93c..28e12f7cc 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -51,9 +51,9 @@ index 572f4dead..f9cf382b2 100644 + // Paper end } - public boolean aV() { + public boolean bb() { diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index 4fc36d243..5cd68bfaf 100644 +index dc8952340..b7569b2bd 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java @@ -0,0 +0,0 @@ public class ItemFireworks extends Item { @@ -73,7 +73,7 @@ index 4fc36d243..5cd68bfaf 100644 if (!entityhuman.abilities.canInstantlyBuild) { itemstack.subtract(1); diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 2a2f53c82..266741fcd 100644 +index e15c23367..82c2537b3 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -0,0 +0,0 @@ public class NBTTagCompound extends NBTBase { diff --git a/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch index d62d2d90ab..2bc1a9b97a 100644 --- a/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch +++ b/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix AIOOBE in inventory handling diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4b79031f0..060434f32 100644 +index b8ec71a93..bac3ba83d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch b/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch index 2c3e0ae91f..f5f604a71d 100644 --- a/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch +++ b/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch @@ -14,7 +14,7 @@ Specially with servers using smaller mob spawn ranges than view distance, as wel This patch returns mob counting to use all loaded chunks, and 17x17 division. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 61d34fc37..a6cf1d83d 100644 +index 15494d0b1..f743efca4 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -27,7 +27,7 @@ index 61d34fc37..a6cf1d83d 100644 if (entity instanceof EntityItem) { itemCounts[i]--; diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 8749a1879..29d4c0866 100644 +index 79a93a862..1d0c9cc4e 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { diff --git a/Spigot-Server-Patches/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index 5aa0d19bca..564edc92dc 100644 --- a/Spigot-Server-Patches/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index dba3fb167..44108ab9a 100644 +index b3c580836..fb24b5407 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch index c0d6c43309..c016b0d1fe 100644 --- a/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch @@ -8,7 +8,7 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 721a3cd81..90d069539 100644 +index 911f527f8..0d73e41f2 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -18,10 +18,10 @@ index 721a3cd81..90d069539 100644 - if (world.addEntity(entity, reason) && entity.isVehicle()) { + if (!entity.valid && world.addEntity(entity, reason) && entity.isVehicle()) { // Paper // CraftBukkit end - Iterator iterator = entity.bx().iterator(); + Iterator iterator = entity.bD().iterator(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7ed3a0677..7900fca57 100644 +index 634f1c28c..0a473d7d2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch b/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch index a25e31d6fa..ab7f2d0f75 100644 --- a/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch +++ b/Spigot-Server-Patches/Fix-FallingBlocks-being-stuck-on-fences.patch @@ -11,12 +11,12 @@ We now first check, if if we are already on the ground. if not, we check if the falling block is inside of the hitbox of the block at y - 1. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c4acb7597..7bd745a27 100644 +index d2a542354..c74071eb1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { - log("Old Cannon Behaviors: This feature may not be working entirely properly at the moment"); - } + preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false); + log("Prevent TNT from moving in water: " + preventTntFromMovingInWater); } + + public boolean altFallingBlockOnGround; @@ -25,7 +25,7 @@ index c4acb7597..7bd745a27 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockFalling.java b/src/main/java/net/minecraft/server/BlockFalling.java -index dcdae998c..3c777418b 100644 +index db5c0deae..9bcfc336f 100644 --- a/src/main/java/net/minecraft/server/BlockFalling.java +++ b/src/main/java/net/minecraft/server/BlockFalling.java @@ -0,0 +0,0 @@ public class BlockFalling extends Block { @@ -38,29 +38,26 @@ index dcdae998c..3c777418b 100644 + } + // Paper end + - public void a_(World world, BlockPosition blockposition) {} + public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} - public void b(World world, BlockPosition blockposition) {} + public void a_(World world, BlockPosition blockposition) {} diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index bb01929e8..8059e6dcd 100644 +index 18e7cf2ad..6a22dce51 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ package net.minecraft.server; - import com.google.common.collect.Lists; import java.util.ArrayList; -+import java.util.Arrays; import java.util.Iterator; +import java.util.List; import javax.annotation.Nullable; import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { - blockposition = new BlockPosition(this); - if (this.onGround) { + } else { IBlockData iblockdata = this.world.getType(blockposition); -- -- if (BlockFalling.i(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) { + +- if (!flag1 && BlockFalling.i(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) { + if (!isOnGround()) { this.onGround = false; - // return; // CraftBukkit diff --git a/Spigot-Server-Patches/Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch b/Spigot-Server-Patches/Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch index 47afc180dd..8e5f893ca7 100644 --- a/Spigot-Server-Patches/Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch +++ b/Spigot-Server-Patches/Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix NFE when attempting to read EMPTY ItemStack Thanks @gabizou diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 548da18e0..29902769f 100644 +index 4de2e2b25..b8ac7479d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { diff --git a/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch index e39255457f..5667f23dc5 100644 --- a/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch @@ -9,7 +9,7 @@ Subject: [PATCH] Fix Old Sign Conversion This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index a3dc6fe31..83646341b 100644 +index 32020e39d..f13752362 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java @@ -0,0 +0,0 @@ public class DefinedStructure { @@ -34,7 +34,7 @@ index a3dc6fe31..83646341b 100644 public Iterator iterator() { diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index d2662ae14..e6b79a571 100644 +index 6e23d325f..ddea15cfe 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder; // CraftBukkit @@ -46,7 +46,7 @@ index d2662ae14..e6b79a571 100644 private static final RegistryMaterials> f = new RegistryMaterials(); protected World world; diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 34ade146c..242552c36 100644 +index f04b7aa99..50a8d7977 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java @@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity { diff --git a/Spigot-Server-Patches/Fix-block-break-desync.patch b/Spigot-Server-Patches/Fix-block-break-desync.patch index f5638ed841..a863e930ba 100644 --- a/Spigot-Server-Patches/Fix-block-break-desync.patch +++ b/Spigot-Server-Patches/Fix-block-break-desync.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix block break desync diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 70af4ebbb..0e2f43b96 100644 +index 20f026eb8..0b6fd67e7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Fix-inter-world-teleportation-glitches.patch b/Spigot-Server-Patches/Fix-inter-world-teleportation-glitches.patch index 3d7c904569..e274346636 100644 --- a/Spigot-Server-Patches/Fix-inter-world-teleportation-glitches.patch +++ b/Spigot-Server-Patches/Fix-inter-world-teleportation-glitches.patch @@ -25,7 +25,7 @@ index 4cc74cd65..fa49397ea 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0df01186f..88fcadbfd 100644 +index b1c06388b..cf753d362 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch index 8dd545a875..829ae22233 100644 --- a/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 59c7e78b8..e303b45f0 100644 +index 7c73e08c3..45ad22c8f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -14,6 +14,6 @@ index 59c7e78b8..e303b45f0 100644 playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); + playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean("reducedDebugInfo") ? 22 : 23))); // Paper - fix this rule not being initialized on the client this.f(entityplayer); - entityplayer.getStatisticManager().d(); - entityplayer.getStatisticManager().updateStatistics(entityplayer); + entityplayer.getStatisticManager().c(); + entityplayer.F().a(entityplayer); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index f3370690fb..776102637e 100644 --- a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch @@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d9e4f1a9f..c4497aaa6 100644 +index 577a1b92a..995542ab9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; public ConsoleReader reader; @@ -33,7 +33,7 @@ index d9e4f1a9f..c4497aaa6 100644 public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant(); // Spigot end -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.isRunning = false; } @@ -93,7 +93,7 @@ index d9e4f1a9f..c4497aaa6 100644 public void run() { try { -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // Spigot start Arrays.fill( recentTps, 20 ); @@ -147,7 +147,7 @@ index d9e4f1a9f..c4497aaa6 100644 } lastTick = curTime; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index db4ac484f..0f77d0674 100644 +index a06b7f325..e5dcd4094 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Generator-Settings.patch b/Spigot-Server-Patches/Generator-Settings.patch index 4123c441b5..f72e517882 100644 --- a/Spigot-Server-Patches/Generator-Settings.patch +++ b/Spigot-Server-Patches/Generator-Settings.patch @@ -38,7 +38,7 @@ index c00fa83d5..3b19b53a8 100644 + } } diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 62a338e95..d3f1dceb6 100644 +index 1b7599769..ab6db7468 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java @@ -0,0 +0,0 @@ public abstract class BiomeBase { @@ -51,7 +51,7 @@ index 62a338e95..d3f1dceb6 100644 } else { IBlockData iblockdata2 = chunksnapshot.a(k1, l1, j1); diff --git a/src/main/java/net/minecraft/server/BiomeMesa.java b/src/main/java/net/minecraft/server/BiomeMesa.java -index 3d0a60b93..121419302 100644 +index f2dd96a32..0541403f0 100644 --- a/src/main/java/net/minecraft/server/BiomeMesa.java +++ b/src/main/java/net/minecraft/server/BiomeMesa.java @@ -0,0 +0,0 @@ public class BiomeMesa extends BiomeBase { @@ -61,10 +61,10 @@ index 3d0a60b93..121419302 100644 - if (i2 <= random.nextInt(5)) { + if (i2 <= (world.paperConfig.generateFlatBedrock ? 0 : random.nextInt(5))) { // Paper - Configurable flat bedrock chunksnapshot.a(l, i2, k, BiomeMesa.c); - } else if (l1 < 15 || this.J) { + } else if (l1 < 15 || this.I) { IBlockData iblockdata2 = chunksnapshot.a(l, i2, k); diff --git a/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/src/main/java/net/minecraft/server/ChunkProviderFlat.java -index d958a6654..f8a9f499f 100644 +index 1452ff657..8b1b79380 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderFlat.java +++ b/src/main/java/net/minecraft/server/ChunkProviderFlat.java @@ -0,0 +0,0 @@ public class ChunkProviderFlat implements ChunkGenerator { @@ -110,7 +110,7 @@ index d958a6654..f8a9f499f 100644 int k = 0; boolean flag1 = true; diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -index 7ba6b9add..776ebd653 100644 +index 22a24a39f..ee9e00e64 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java +++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java @@ -0,0 +0,0 @@ public class ChunkProviderGenerate implements ChunkGenerator { @@ -221,7 +221,7 @@ index 7ba6b9add..776ebd653 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkProviderHell.java b/src/main/java/net/minecraft/server/ChunkProviderHell.java -index f9519d7e1..ca64ae067 100644 +index 9f738749f..12bc10ff0 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderHell.java +++ b/src/main/java/net/minecraft/server/ChunkProviderHell.java @@ -0,0 +0,0 @@ public class ChunkProviderHell implements ChunkGenerator { @@ -245,20 +245,12 @@ index f9519d7e1..ca64ae067 100644 } } diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index fb350c408..9c1605b14 100644 +index 2580a4cf6..078957aac 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -0,0 +0,0 @@ public abstract class StructureGenerator extends WorldGenBase { } - public boolean b(BlockPosition blockposition) { -+ if (this.g == null) return false; // Paper - this.a(this.g); - return this.c(blockposition) != null; - } -@@ -0,0 +0,0 @@ public abstract class StructureGenerator extends WorldGenBase { - } - public boolean a(World world, BlockPosition blockposition) { + if (this.g == null) return false; // Paper this.a(world); diff --git a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch index 38ffed5a06..e43dae5bbb 100644 --- a/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/Handle-Item-Meta-Inconsistencies.patch @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index a54bc7c42..81ec8f69e 100644 +index 3f11e4279..ebb3e04bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -0,0 +0,0 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -144,7 +144,7 @@ index a54bc7c42..81ec8f69e 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 9d0c05cd0..ab50ee92e 100644 +index 2bf7e9f35..523c14df0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ import java.lang.annotation.RetentionPolicy; diff --git a/Spigot-Server-Patches/IllegalPacketEvent.patch b/Spigot-Server-Patches/IllegalPacketEvent.patch index 27f6eb1940..dd8a61a0b3 100644 --- a/Spigot-Server-Patches/IllegalPacketEvent.patch +++ b/Spigot-Server-Patches/IllegalPacketEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] IllegalPacketEvent Fired for invalid data from players that represents hacking attempts diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 3946ee6e5..4a3b7be2a 100644 +index d2742df61..13cce8904 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; diff --git a/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch index a00028a62b..3e7943298f 100644 --- a/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index bf3e46c35..ad1bb7bab 100644 +index 42f6b7206..f4a2e748d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.MainHand; public class EntityPlayer extends EntityHuman implements ICrafting { - private static final Logger bR = LogManager.getLogger(); + private static final Logger bW = LogManager.getLogger(); - public String locale = "en_US"; // Spigot private -> public + public String locale = null; // Spigot private -> public // Paper - default to null public PlayerConnection playerConnection; @@ -30,11 +30,11 @@ index bf3e46c35..ad1bb7bab 100644 + new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), oldLocale, this.locale).callEvent(); + } + // Paper end - this.cg = packetplayinsettings.c(); - this.ch = packetplayinsettings.d(); - this.getDataWatcher().set(EntityPlayer.bq, Byte.valueOf((byte) packetplayinsettings.e())); + this.cm = packetplayinsettings.c(); + this.cn = packetplayinsettings.d(); + this.getDataWatcher().set(EntityPlayer.br, Byte.valueOf((byte) packetplayinsettings.e())); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8e06c2140..61c32223d 100644 +index 00f9229f0..d1f70af51 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 4b4603c8c7..145f73e2c4 100644 --- a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -13,7 +13,7 @@ custom renderers are in use, defaulting to the much simpler Vanilla system. Additionally, numerous issues to player position tracking on maps has been fixed. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 43e28d61c..af173a137 100644 +index b4507fe0c..29c2fd4c9 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -30,7 +30,7 @@ index 43e28d61c..af173a137 100644 ItemStack itemstack1 = this.a(entityitem); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index f542bf491..fbda70a39 100644 +index 10cafe057..1d0d7453a 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -0,0 +0,0 @@ public class EntityTrackerEntry { @@ -48,7 +48,7 @@ index f542bf491..fbda70a39 100644 Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2f4728b0d..7ed3a0677 100644 +index 0ddc03507..634f1c28c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -60,7 +60,7 @@ index 2f4728b0d..7ed3a0677 100644 } } diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index dd5412e69..dbe6a80f2 100644 +index b4296a0fc..5394e37f8 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java @@ -0,0 +0,0 @@ public class WorldMap extends PersistentBase { diff --git a/Spigot-Server-Patches/Improve-Minecraft-Hopper-Performance.patch b/Spigot-Server-Patches/Improve-Minecraft-Hopper-Performance.patch index 329f3b716c..e157c2c3e0 100644 --- a/Spigot-Server-Patches/Improve-Minecraft-Hopper-Performance.patch +++ b/Spigot-Server-Patches/Improve-Minecraft-Hopper-Performance.patch @@ -8,7 +8,7 @@ Also reset cooldown each hopper tick that a hopper is full. Also don't constantly clone ItemStacks without merit diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index d0c0371fc..d2662ae14 100644 +index 39be107fd..6e23d325f 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity { @@ -28,7 +28,7 @@ index d0c0371fc..d2662ae14 100644 this.g = iblockdata.getBlock().toLegacyData(iblockdata); diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 6acce15e7..44b6ecc5d 100644 +index e38411f35..f99812989 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -68,7 +68,7 @@ index 6acce15e7..44b6ecc5d 100644 } else { iinventory.setItem(i, itemstack1); @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - boolean flag1 = iinventory1.w_(); + boolean flag1 = iinventory1.x_(); if (itemstack1.isEmpty()) { + IGNORE_TILE_UPDATES = true; // Paper diff --git a/Spigot-Server-Patches/Lighting-Queue.patch b/Spigot-Server-Patches/Lighting-Queue.patch index 8a195dcebe..8eda2c5f66 100644 --- a/Spigot-Server-Patches/Lighting-Queue.patch +++ b/Spigot-Server-Patches/Lighting-Queue.patch @@ -42,7 +42,7 @@ index e524a464f..fd606ee14 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1c0108ef1..b80f95159 100644 +index e55aa73e9..972654790 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -85,7 +85,7 @@ index 1c0108ef1..b80f95159 100644 TileEntity tileentity; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 3ba489d4f..f7f2d12cf 100644 +index c1b0d6cea..ba720204d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -97,10 +97,10 @@ index 3ba489d4f..f7f2d12cf 100644 // Update neighbor counts for (int x = -2; x < 3; x++) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c4497aaa6..ca0ff4d30 100644 +index 995542ab9..43ec2d9dc 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper this.slackActivityAccountant.tickStarted(); // Spigot @@ -109,7 +109,7 @@ index c4497aaa6..ca0ff4d30 100644 ++this.ticks; if (this.T) { -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.methodProfiler.b(); org.spigotmc.WatchdogThread.tick(); // Spigot @@ -225,7 +225,7 @@ index 000000000..d8d3e1efd + } +} diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 632d5c760..e6e85e7a8 100644 +index b1addedeb..5d039f049 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index c99de3404d..bce747e21f 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -418,7 +418,7 @@ index 000000000..01c2713d3 + } +} diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index a79919696..965aa5c23 100644 +index 4a8eee119..0eece3933 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -475,7 +475,7 @@ index a79919696..965aa5c23 100644 public void f(@Nullable EntityHuman entityhuman) { - if (this.c != null) { + if (lootableData.shouldReplenish(entityhuman)) { // Paper - LootTable loottable = this.world.ak().a(this.c); + LootTable loottable = this.world.getLootTableRegistry().a(this.c); - this.c = null; + lootableData.processRefill(entityhuman); // Paper @@ -536,7 +536,7 @@ index a79919696..965aa5c23 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index 5632f2e78..01d0d8071 100644 +index 243ae3533..548b8f4f5 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java @@ -0,0 +0,0 @@ @@ -589,7 +589,7 @@ index 5632f2e78..01d0d8071 100644 public void d(@Nullable EntityHuman entityhuman) { - if (this.m != null) { + if (lootableData.shouldReplenish(entityhuman)) { // Paper - LootTable loottable = this.world.ak().a(this.m); + LootTable loottable = this.world.getLootTableRegistry().a(this.m); - this.m = null; + lootableData.processRefill(entityhuman); // Paper @@ -713,7 +713,7 @@ index b7a04bd84..5d4a5519d 100644 public CraftHopper(final Block block) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java -index 8a7ce92bf..02f56bc0d 100644 +index 788c60263..dc2648094 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch b/Spigot-Server-Patches/MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch index 607cc8058b..61bd955827 100644 --- a/Spigot-Server-Patches/MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch +++ b/Spigot-Server-Patches/MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch @@ -11,7 +11,7 @@ This breaks the ability to rename more than 1 item at a time. See: https://bugs.mojang.com/browse/MC-111699 diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7c2d43ac2..cbe5d36d0 100644 +index 563781256..dfeadd9b5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/MC-112017-Allow-31-instead-of-30-for-item-names.patch b/Spigot-Server-Patches/MC-112017-Allow-31-instead-of-30-for-item-names.patch index de1b59ce9a..bf3bcd8d9c 100644 --- a/Spigot-Server-Patches/MC-112017-Allow-31-instead-of-30-for-item-names.patch +++ b/Spigot-Server-Patches/MC-112017-Allow-31-instead-of-30-for-item-names.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC-112017: Allow 31 instead of 30 for item names diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index cbe5d36d0..70af4ebbb 100644 +index dfeadd9b5..20f026eb8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index 717e503906..e15fbf04a2 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -5,11 +5,11 @@ Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index f02fc607..d60e7550 100644 +index d4f412742..d55e180d7 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable { - return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString(); + return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString(); } - public int compareTo(Object object) { @@ -18,11 +18,11 @@ index f02fc607..d60e7550 100644 } } diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index e62df5c1..62a338e9 100644 +index 62a9c92f8..1b7599769 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java @@ -0,0 +0,0 @@ public abstract class BiomeBase { - protected List x; + protected List w; public static int a(BiomeBase biomebase) { - return BiomeBase.REGISTRY_ID.a((Object) biomebase); @@ -31,7 +31,7 @@ index e62df5c1..62a338e9 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java -index 71524f2c..288c52c5 100644 +index 71524f2cd..288c52c55 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java @@ -0,0 +0,0 @@ public class BlockStateEnum & INamable> extends BlockState @@ -44,7 +44,7 @@ index 71524f2c..288c52c5 100644 } diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java -index fe74068e..b669884d 100644 +index 14a7b9c92..8b703db42 100644 --- a/src/main/java/net/minecraft/server/CommandAbstract.java +++ b/src/main/java/net/minecraft/server/CommandAbstract.java @@ -0,0 +0,0 @@ public abstract class CommandAbstract implements ICommand { @@ -84,7 +84,7 @@ index fe74068e..b669884d 100644 } diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java -index f5bcbdbe..3190cadf 100644 +index f5bcbdbe1..3190cadfc 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java @@ -0,0 +0,0 @@ public class ItemFactoryTest extends AbstractTestingBase { diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index a331d2a643..23302e25da 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC Utils diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b0aba6089..81fc04ed3 100644 +index 38d69b944..7fee74d80 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -212,13 +212,13 @@ index 000000000..1159eea1a + } +} diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 90d18f489..2a2f53c82 100644 +index aa1ca6d91..e15c23367 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - public class NBTTagCompound extends NBTBase { +@@ -0,0 +0,0 @@ public class NBTTagCompound extends NBTBase { private static final Logger b = LogManager.getLogger(); + private static final Pattern c = Pattern.compile("[A-Za-z0-9._+-]+"); - private final Map map = Maps.newHashMap(); + public final Map map = Maps.newHashMap(); // Paper @@ -239,7 +239,7 @@ index 90d18f489..2a2f53c82 100644 public UUID a(String s) { return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index 370203b2d..ae7498c03 100644 +index e0cb6aa6e..bc6383669 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; diff --git a/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch b/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch index 6bc84ccdd8..0efc0d996d 100644 --- a/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch +++ b/Spigot-Server-Patches/Make-entities-look-for-hoppers.patch @@ -78,7 +78,7 @@ index 000000000..aef7c2be9 + double getZ(); +} diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7bd745a27..894d40662 100644 +index c74071eb1..d5d6e7fcd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -132,7 +132,7 @@ index 008ed206d..b3c1f550c 100644 this.b = i; this.c = j; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0d1fdd3ee..0479b7551 100644 +index 5cd82f1b2..c81f88bce 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -156,7 +156,7 @@ index 0d1fdd3ee..0479b7551 100644 public double motY; public double motZ; diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 9742afc65..95ca1b8e4 100644 +index 7b137d847..0a7f1476d 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -179,7 +179,7 @@ index 9742afc65..95ca1b8e4 100644 @@ -0,0 +0,0 @@ public class EntityItem extends Entity { this.die(); } else { - super.A_(); + super.B_(); + if (tryPutInHopper()) return; // Paper // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; @@ -193,7 +193,7 @@ index 9742afc65..95ca1b8e4 100644 int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index 965aa5c23..04256898b 100644 +index 0eece3933..8415832d1 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -217,8 +217,8 @@ index 965aa5c23..04256898b 100644 + } + + @Override -+ public void A_() { -+ super.A_(); ++ public void B_() { ++ super.B_(); + tryPutInHopper(); + } + @@ -249,7 +249,7 @@ index 804215a1c..e830d8390 100644 + double G(); default double getZ() { return G(); } // Paper - OBFHELPER } diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 44b6ecc5d..022e64520 100644 +index f99812989..d22261646 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -321,7 +321,7 @@ index 44b6ecc5d..022e64520 100644 @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi private IInventory I() { - EnumDirection enumdirection = BlockHopper.e(this.v()); + EnumDirection enumdirection = BlockHopper.b(this.v()); - return b(this.getWorld(), this.E() + (double) enumdirection.getAdjacentX(), this.F() + (double) enumdirection.getAdjacentY(), this.G() + (double) enumdirection.getAdjacentZ()); + // Paper start - don't search for entities in push mode diff --git a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 825ed16e59..1b0d119856 100644 --- a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index dabe4137f..fb4f11958 100644 +index 9159ed023..e54f4f47f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { diff --git a/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch index 22dd4b1f2e..51b5b7c77d 100644 --- a/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch +++ b/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch @@ -5,14 +5,14 @@ Subject: [PATCH] More informative vehicle moved wrongly message diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index dfbae01f4..4b79031f0 100644 +index 353e73b15..b8ec71a93 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot flag1 = true; -- PlayerConnection.LOGGER.warn("{} moved wrongly!", new Object[] { entity.getName()}); +- PlayerConnection.LOGGER.warn("{} moved wrongly!", entity.getName()); + PlayerConnection.LOGGER.warn(entity.getName() + " (vehicle of " + this.player.getName() + ") moved wrongly!"); // Paper - More informative } diff --git a/Spigot-Server-Patches/Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/Only-refresh-abilities-if-needed.patch index a74d630bb3..eb7445a5db 100644 --- a/Spigot-Server-Patches/Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/Only-refresh-abilities-if-needed.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6509df573..87ac74420 100644 +index c5924a2be..94cca69a4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index 1df52b3c65..1397394813 100644 --- a/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world Also fix view distance lookup diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index e24be3ccd..e93819fc1 100644 +index f8e84f413..e88082485 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo - if (this.bG == 1) { + if (this.bH == 1) { // CraftBukkit start - Use relative location for far away sounds // this.world.a(1028, new BlockPosition(this), 0); - int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; @@ -25,7 +25,7 @@ index e24be3ccd..e93819fc1 100644 double deltaZ = this.locZ - player.locZ; double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index 9af34ba60..031507574 100644 +index b7954362d..202774a7c 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -0,0 +0,0 @@ public class EntityWither extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/Optimise-NetworkManager.patch b/Spigot-Server-Patches/Optimise-NetworkManager.patch index 8af627813b..c655c70b54 100644 --- a/Spigot-Server-Patches/Optimise-NetworkManager.patch +++ b/Spigot-Server-Patches/Optimise-NetworkManager.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimise NetworkManager diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 184ef32a8..be14c0b25 100644 +index 58011bb2f..fb118e90b 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -27,23 +27,12 @@ index 184ef32a8..be14c0b25 100644 - this.j.writeLock().lock(); - - try { -- this.i.add(new NetworkManager.QueuedPacket(packet, (GenericFutureListener[]) null)); +- this.i.add(new NetworkManager.QueuedPacket(packet, new GenericFutureListener[0])); - } finally { - this.j.writeLock().unlock(); - } } - -+ // Paper start - Remove but force a conflict -+// else { -+// this.j.writeLock().lock(); -+// -+// try { -+// this.i.add(new NetworkManager.QueuedPacket(packet, (GenericFutureListener[]) null)); -+// } finally { -+// this.j.writeLock().unlock(); -+// } -+// } -+ // Paper end } public void sendPacket(Packet packet, GenericFutureListener> genericfuturelistener, GenericFutureListener>... agenericfuturelistener) { @@ -60,17 +49,6 @@ index 184ef32a8..be14c0b25 100644 - } } - -+ // Paper start - Remove but force a conflict -+// else { -+// this.j.writeLock().lock(); -+// -+// try { -+// this.i.add(new NetworkManager.QueuedPacket(packet, (GenericFutureListener[]) ArrayUtils.add(agenericfuturelistener, 0, genericfuturelistener))); -+// } finally { -+// this.j.writeLock().unlock(); -+// } -+// } -+ // Paper end } private void a(final Packet packet, @Nullable final GenericFutureListener>[] agenericfuturelistener) { @@ -92,22 +70,7 @@ index 184ef32a8..be14c0b25 100644 - } - - } -+ // Paper start - Remove but force a conflict -+// if (this.channel != null && this.channel.isOpen()) { -+// this.j.readLock().lock(); -+// -+// try { -+// while (!this.i.isEmpty()) { -+// NetworkManager.QueuedPacket networkmanager_queuedpacket = (NetworkManager.QueuedPacket) this.i.poll(); -+// -+// this.a(networkmanager_queuedpacket.a, networkmanager_queuedpacket.b); -+// } -+// } finally { -+// this.j.readLock().unlock(); -+// } -+// -+// } -+ // Paper end ++ // Paper - Contents removed } public void a() { diff --git a/Spigot-Server-Patches/Optimise-removeQueue.patch b/Spigot-Server-Patches/Optimise-removeQueue.patch index fc2716399b..c6914680c6 100644 --- a/Spigot-Server-Patches/Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/Optimise-removeQueue.patch @@ -5,28 +5,29 @@ Subject: [PATCH] Optimise removeQueue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index eca224bdb..58d40f994 100644 +index 57d21fc12..8d48d7c0c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -0,0 +0,0 @@ import com.google.common.collect.Lists; - import com.google.common.collect.Sets; +@@ -0,0 +0,0 @@ package net.minecraft.server; + import com.google.common.collect.Lists; import com.mojang.authlib.GameProfile; import io.netty.buffer.Unpooled; +import java.util.ArrayDeque; // Paper + import java.util.ArrayList; import java.util.Collection; +import java.util.Deque; // Paper - import java.util.HashSet; import java.util.Iterator; import java.util.List; + import javax.annotation.Nonnull; @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public final PlayerInteractManager playerInteractManager; public double d; public double e; - public final List removeQueue = Lists.newLinkedList(); + public final Deque removeQueue = new ArrayDeque<>(); // Paper - private final ServerStatisticManager bU; - private float bV = Float.MIN_VALUE; - private int bW = Integer.MIN_VALUE; + private final AdvancementDataPlayer bZ; + private final ServerStatisticManager ca; + private float cb = Float.MIN_VALUE; @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { Iterator iterator = this.removeQueue.iterator(); int j = 0; @@ -47,17 +48,16 @@ index eca224bdb..58d40f994 100644 this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.lastSentExp = -1; this.lastHealthSent = -1.0F; - this.cc = -1; -- this.removeQueue.addAll(((EntityPlayer) entityhuman).removeQueue); -+ // this.removeQueue.addAll(((EntityPlayer) entityhuman).removeQueue); // Paper -+ // Paper start -+ if (this.removeQueue != ((EntityPlayer) entityhuman).removeQueue) { -+ this.removeQueue.addAll(((EntityPlayer) entityhuman).removeQueue); + this.ci = -1; + this.cs.a((RecipeBook) entityplayer.cs); +- this.removeQueue.addAll(entityplayer.removeQueue); ++ //this.removeQueue.addAll(entityplayer.removeQueue); // Paper ++ if (this.removeQueue != entityplayer.removeQueue) { ++ this.removeQueue.addAll(entityplayer.removeQueue); + } + // Paper end - } - - protected void a(MobEffect mobeffect) { + this.cr = entityplayer.cr; + this.cw = entityplayer.cw; + this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft()); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch index d03857c2eb..9c3df92666 100644 --- a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index aca63be53..548da18e0 100644 +index 75b55fb18..4de2e2b25 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { diff --git a/Spigot-Server-Patches/Optimize-Network-Queue.patch b/Spigot-Server-Patches/Optimize-Network-Queue.patch index 3eae7aeca8..ace9e4e194 100644 --- a/Spigot-Server-Patches/Optimize-Network-Queue.patch +++ b/Spigot-Server-Patches/Optimize-Network-Queue.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize Network Queue diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8134501c7..8df30e3d0 100644 +index 1f0e79387..40514d042 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs private final GameProfileRepository X; private final UserCache Y; private long Z; diff --git a/Spigot-Server-Patches/Optimize-Pathfinding.patch b/Spigot-Server-Patches/Optimize-Pathfinding.patch index 82770dc7da..ef48985134 100644 --- a/Spigot-Server-Patches/Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/Optimize-Pathfinding.patch @@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 4f28b8819..43b2be505 100644 +index 26319d9b7..3e598afd4 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { @@ -41,7 +41,7 @@ index 4f28b8819..43b2be505 100644 @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { } - public void o() { + public void p() { + this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; } diff --git a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch index 9ff36a8cc9..57d1e9fb87 100644 --- a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 28a514a64..60452e83b 100644 +index af8c2cfa8..3cf80495e 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -36,7 +36,7 @@ index 28a514a64..60452e83b 100644 @@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { } - public void F_() { + public void e() { + // Paper - Disable all of this, just in case this does get ticked + /* this.o(); @@ -74,7 +74,7 @@ index 28a514a64..60452e83b 100644 + d1 += 0.5D; + } + -+ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.Z, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); ++ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.ac, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + } + // Paper end + @@ -108,7 +108,7 @@ index 28a514a64..60452e83b 100644 + d0 += 0.5D; + } + -+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); ++ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.aa, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + this.j = 0.0F; + } + // Paper end @@ -117,7 +117,7 @@ index 28a514a64..60452e83b 100644 this.world.applyPhysics(this.position, this.getBlock(), false); diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java -index 3d61c2d68..586ceaa67 100644 +index 31585757b..1c1741c56 100644 --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java @@ -0,0 +0,0 @@ @@ -135,7 +135,7 @@ index 3d61c2d68..586ceaa67 100644 public TileEntityEnderChest() {} - public void F_() { + public void e() { + // Paper start - Disable all of this, just in case this does get ticked + /* if (++this.h % 20 * 4 == 0) { @@ -162,14 +162,14 @@ index 3d61c2d68..586ceaa67 100644 + double d1 = (double) this.getPosition().getX() + 0.5D; + double d0 = (double) this.getPosition().getZ() + 0.5D; + -+ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aQ, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); ++ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aT, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + } + // Paper end + this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g); } - public void e() { + public void f() { --this.g; + + // Paper start - Move enderchest close sounds out of the tick loop @@ -177,7 +177,7 @@ index 3d61c2d68..586ceaa67 100644 + double d0 = (double) this.getPosition().getX() + 0.5D; + double d2 = (double) this.getPosition().getZ() + 0.5D; + -+ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aP, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); ++ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aS, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); + this.a = 0.0F; + } + // Paper end diff --git a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch index 8cf6a7eb69..7529d8d5f1 100644 --- a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch @@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 83b62da55..2349c3ade 100644 +index 111c363c7..19a66b64c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // Spigot start if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { LOGGER.info("Saving usercache.json"); @@ -23,7 +23,7 @@ index 83b62da55..2349c3ade 100644 // Spigot end } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index ccfc755d2..989758cdf 100644 +index 487fc11f1..924dc63a4 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -0,0 +0,0 @@ public class UserCache { diff --git a/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch index c87fb98e22..83f7de1d23 100644 --- a/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ec0a28cff..2fa63a27f 100644 +index 888ecce77..cfdd04d8b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Optimize-explosions.patch b/Spigot-Server-Patches/Optimize-explosions.patch index 43eac89cf3..3db818afda 100644 --- a/Spigot-Server-Patches/Optimize-explosions.patch +++ b/Spigot-Server-Patches/Optimize-explosions.patch @@ -25,7 +25,7 @@ index 3b19b53a8..a7dfd2af7 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 4e05bcdfa..49fc95e35 100644 +index bb5345a1a..63b70d60c 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -0,0 +0,0 @@ public class Explosion { @@ -124,10 +124,10 @@ index 4e05bcdfa..49fc95e35 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ca0ff4d30..e7c63a953 100644 +index 43ec2d9dc..ecdb92397 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs worldserver.getTracker().updatePlayers(); this.methodProfiler.b(); this.methodProfiler.b(); @@ -136,7 +136,7 @@ index ca0ff4d30..e7c63a953 100644 // this.i[i][this.ticks % 100] = System.nanoTime() - j; // CraftBukkit diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e6e85e7a8..5f7590e11 100644 +index 5d039f049..dfd6c8a3d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch index 5d93d487b6..7312ad7862 100644 --- a/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward. Optimize getType and getBlockData to manually inline and optimize the calls diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index d60e75502..f772c7cdf 100644 +index d55e180d7..679d5504e 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable { @@ -52,7 +52,7 @@ index 67b476b22..008ed206d 100644 public MutableBlockPosition() { this(0, 0, 0); diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8f1a68d67..736fa1f62 100644 +index c0d6e056d..88f5ce9e2 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -79,9 +79,10 @@ index 8f1a68d67..736fa1f62 100644 public IBlockData a(final int i, final int j, final int k) { + return getBlockData(i, j, k); + } ++ + public IBlockData unused(final int i, final int j, final int k) { + // Paper end - if (this.world.L() == WorldType.DEBUG_ALL_BLOCK_STATES) { + if (this.world.N() == WorldType.DEBUG_ALL_BLOCK_STATES) { IBlockData iblockdata = null; diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java @@ -98,7 +99,7 @@ index 3d784d0dc..afdc4a779 100644 private NibbleArray skyLight; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1d2d174e8..9427fc080 100644 +index 20bdf4055..1cd81e533 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -225,8 +226,8 @@ index 1d2d174e8..9427fc080 100644 } + // Paper end - public boolean B() { - return this.J < 4; + public boolean D() { + return this.L < 4; @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { public Map capturedTileEntities = Maps.newHashMap(); @Nullable diff --git a/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch index eb39487372..bbe31b4bcf 100644 --- a/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/Optimized-Light-Level-Comparisons.patch @@ -91,7 +91,7 @@ index c74b6284f..bb96e164e 100644 if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index 3ee52139c..59d8bb6e7 100644 +index 21539ff9b..1585bf3bc 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -0,0 +0,0 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -102,8 +102,8 @@ index 3ee52139c..59d8bb6e7 100644 - + //int i = this.world.getLightLevel(blockposition); // Paper + boolean passes; // Paper - if (this.world.V()) { - int j = this.world.af(); + if (this.world.X()) { + int j = this.world.ah(); this.world.c(10); - i = this.world.getLightLevel(blockposition); @@ -118,7 +118,7 @@ index 3ee52139c..59d8bb6e7 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 897882c97..970fabf71 100644 +index bf059a746..003e06156 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch b/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch index 80c9faff83..b4fb2351b2 100644 --- a/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch +++ b/Spigot-Server-Patches/Option-to-disable-BlockPhysicsEvent-for-Redstone.patch @@ -25,7 +25,7 @@ index adc810720..e706efff5 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9427fc080..8cbdbda92 100644 +index 1cd81e533..b8719ba91 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -38,7 +38,7 @@ index 9427fc080..8cbdbda92 100644 this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index de900920a..f80647b31 100644 +index 7d7f3d39e..36e6fdd16 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ import org.bukkit.event.weather.LightningStrikeEvent; diff --git a/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 6a46e60cf4..84fc94977f 100644 --- a/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bf2916802..61efcc479 100644 +index 32ca0a40e..70af657f5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index bf2916802..61efcc479 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7af76e14c..2028cf81e 100644 +index 42cfbe096..2fe4433e7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch index 59889bf300..2a37e80178 100644 --- a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to remove corrupt tile entities diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bcf24cb49..220ecaf8d 100644 +index 39f8a0a2c..efae01b1d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index bcf24cb49..220ecaf8d 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9f7f32dc2..d850dbfc3 100644 +index 099ce0b2d..68ddf5f96 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index f093efbc49..1df118011d 100644 --- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -19,19 +19,19 @@ index 3a942c763..3bd29650c 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 70a431a63..8908d8b8d 100644 +index b3911fa9f..fa940ad31 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { return this.getFlag(5); } -+ @Nullable public ScoreboardTeamBase getTeam() { return this.aQ(); } // Paper - OBFHELPER ++ @Nullable public ScoreboardTeamBase getTeam() { return this.aW(); } // Paper - OBFHELPER @Nullable - public ScoreboardTeamBase aQ() { + public ScoreboardTeamBase aW() { if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 840448995..dfbae01f4 100644 +index 25c02c727..353e73b15 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch new file mode 100644 index 0000000000..2ccbbf46f0 --- /dev/null +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -0,0 +1,114 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown <1254957+zachbr@users.noreply.github.com> +Date: Sun, 22 May 2016 20:20:55 -0500 +Subject: [PATCH] Optional TNT doesn't move in water + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index fbe769eb3..d2a542354 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ package com.destroystokyo.paper; + + import java.util.List; + +-import org.bukkit.Bukkit; + import org.bukkit.configuration.file.YamlConfiguration; + import org.spigotmc.SpigotWorldConfig; + +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + ); + } + } ++ ++ public boolean preventTntFromMovingInWater; ++ private void preventTntFromMovingInWater() { ++ if (PaperConfig.version < 13) { ++ boolean oldVal = getBoolean("enable-old-tnt-cannon-behaviors", false); ++ set("prevent-tnt-from-moving-in-water", oldVal); ++ } ++ preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false); ++ log("Prevent TNT from moving in water: " + preventTntFromMovingInWater); ++ } + } +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 094891057..5cd82f1b2 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { + } + + public boolean aq() { ++ return this.doWaterMovement(); ++ } ++ ++ public boolean doWaterMovement() { ++ // Paper end + if (this.bH() instanceof EntityBoat) { + this.inWater = false; + } else if (this.world.a(this.getBoundingBox().grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D), Material.WATER, this)) { +@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { + } + + public boolean bm() { ++ return this.pushedByWater(); ++ } ++ ++ public boolean pushedByWater() { ++ // Paper end + return true; + } + +diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +index bb0904f86..ac81808c3 100644 +--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java ++++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { + public int getFuseTicks() { + return this.c; + } ++ ++ // Paper start - Optional prevent TNT from moving in water ++ @Override ++ public boolean pushedByWater() { ++ return !world.paperConfig.preventTntFromMovingInWater && super.pushedByWater(); ++ } ++ ++ /** ++ * Author: Jedediah Smith ++ */ ++ @Override ++ public boolean doWaterMovement() { ++ if (!world.paperConfig.preventTntFromMovingInWater) return super.doWaterMovement(); ++ ++ // Preserve velocity while calling the super method ++ double oldMotX = this.motX; ++ double oldMotY = this.motY; ++ double oldMotZ = this.motZ; ++ ++ super.doWaterMovement(); ++ ++ this.motX = oldMotX; ++ this.motY = oldMotY; ++ this.motZ = oldMotZ; ++ ++ if (this.inWater) { ++ // Send position and velocity updates to nearby players on every tick while the TNT is in water. ++ // This does pretty well at keeping their clients in sync with the server. ++ EntityTrackerEntry ete = ((WorldServer) this.getWorld()).getTracker().trackedEntities.get(this.getId()); ++ if (ete != null) { ++ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this); ++ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this); ++ ++ ete.trackedPlayers.stream().filter(viewer -> (viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16).forEach(viewer -> { ++ viewer.playerConnection.sendPacket(velocityPacket); ++ viewer.playerConnection.sendPacket(positionPacket); ++ }); ++ } ++ } ++ ++ return this.inWater; ++ } ++ // Paper end + } +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optional-old-TNT-cannon-behaviors.patch b/Spigot-Server-Patches/Optional-old-TNT-cannon-behaviors.patch deleted file mode 100644 index f01a246460..0000000000 --- a/Spigot-Server-Patches/Optional-old-TNT-cannon-behaviors.patch +++ /dev/null @@ -1,391 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Sun, 22 May 2016 20:20:55 -0500 -Subject: [PATCH] Optional old TNT cannon behaviors - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fbe769eb3..c4acb7597 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -0,0 +0,0 @@ public class PaperWorldConfig { - ); - } - } -+ -+ public boolean oldCannonBehaviors; -+ private void oldCannonBehaviors() { -+ oldCannonBehaviors = getBoolean("enable-old-tnt-cannon-behaviors", false); -+ if (oldCannonBehaviors) { -+ log("Old Cannon Behaviors: This feature may not be working entirely properly at the moment"); -+ } -+ } - } -diff --git a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java -index 59ee13de8..40c9f18bf 100644 ---- a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java -+++ b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java -@@ -0,0 +0,0 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal { - } else { - this.b(world, blockposition, iblockdata, 0); - world.setAir(blockposition); -+ // Paper start - Old TNT cannon behaviors -+ if (world.paperConfig.oldCannonBehaviors) { -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -@@ -0,0 +0,0 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal { - - public void postBreak(World world, BlockPosition blockposition, IBlockData iblockdata) { - if (this.d) { -+ // Paper start - Old TNT cannon behaviors -+ if (world.paperConfig.oldCannonBehaviors) { -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -index c7e095a11..741236289 100644 ---- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -@@ -0,0 +0,0 @@ public class BlockRedstoneTorch extends BlockTorch { - - public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { - if (this.isOn) { -+ // Paper start - Old TNT cannon behaviors -+ if (world.paperConfig.oldCannonBehaviors) { -+ this.shiftPositions(world, blockposition); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -@@ -0,0 +0,0 @@ public class BlockRedstoneTorch extends BlockTorch { - - public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) { - if (this.isOn) { -+ // Paper start - Old TNT cannon behaviors -+ if (world.paperConfig.oldCannonBehaviors) { -+ this.shiftPositions(world, blockposition); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -@@ -0,0 +0,0 @@ public class BlockRedstoneTorch extends BlockTorch { - - } - -+ // Paper start - Old TNT cannon behaviors -+ private void shiftPositions(World world, BlockPosition blockposition) { -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false); -+ } -+ // Paper end -+ - public int b(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) { - return this.isOn && iblockdata.get(BlockRedstoneTorch.FACING) != enumdirection ? 15 : 0; - } -diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -index 5a0f026b1..20b9465e7 100644 ---- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java -+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block { - public static final BlockStateInteger POWER = BlockStateInteger.of("power", 0, 15); - protected static final AxisAlignedBB[] f = new AxisAlignedBB[] { new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 1.0D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 1.0D, 0.0625D, 1.0D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.0625D, 1.0D)}; - private boolean g = true; -- private final Set B = Sets.newHashSet(); -+ private final Set B = Sets.newHashSet(); private final Set blocksToUpdate = B; // Paper - OBFHELPER - - public BlockRedstoneWire() { - super(Material.ORIENTABLE); -@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block { - } - - this.B.add(blockposition); -+ // Paper start - Old TNT cannon behaviors -+ if (world.paperConfig.oldCannonBehaviors) { -+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.WEST)); -+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.EAST)); -+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.DOWN)); -+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.UP)); -+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.NORTH)); -+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.SOUTH)); -+ return iblockdata; -+ } -+ // Paper end -+ -+ - EnumDirection[] aenumdirection = EnumDirection.values(); - int i1 = aenumdirection.length; - -@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block { - private void b(World world, BlockPosition blockposition) { - if (world.getType(blockposition).getBlock() == this) { - world.applyPhysics(blockposition, this, false); -+ if (world.paperConfig.oldCannonBehaviors) { -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java -index 6b6aa892a..5cec4160c 100644 ---- a/src/main/java/net/minecraft/server/BlockTNT.java -+++ b/src/main/java/net/minecraft/server/BlockTNT.java -@@ -0,0 +0,0 @@ public class BlockTNT extends Block { - - public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) { - if (!world.isClientSide) { -- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); -+ // Paper start - Old TNT cannon behaviors -+ double y = blockposition.getY(); -+ if (!world.paperConfig.oldCannonBehaviors) y += 0.5; -+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); -+ // Paper end - - entitytntprimed.setFuseTicks((short) (world.random.nextInt(entitytntprimed.getFuseTicks() / 4) + entitytntprimed.getFuseTicks() / 8)); - world.addEntity(entitytntprimed); -@@ -0,0 +0,0 @@ public class BlockTNT extends Block { - public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) { - if (!world.isClientSide) { - if (((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue()) { -- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), entityliving); -+ // Paper start - Old TNT cannon behaviors -+ double y = blockposition.getY(); -+ if (!world.paperConfig.oldCannonBehaviors) y += 0.5; -+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), entityliving); -+ // Paper end - - world.addEntity(entitytntprimed); - world.a((EntityHuman) null, entitytntprimed.locX, entitytntprimed.locY, entitytntprimed.locZ, SoundEffects.gV, SoundCategory.BLOCKS, 1.0F, 1.0F); -diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java -index 6af9f206b..bec623c4d 100644 ---- a/src/main/java/net/minecraft/server/DispenserRegistry.java -+++ b/src/main/java/net/minecraft/server/DispenserRegistry.java -@@ -0,0 +0,0 @@ public class DispenserRegistry { - org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ()); - CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); - -- BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D)); -+ // Paper start - Old TNT cannon behaviors -+ double y = blockposition.getY(); -+ if (!world.paperConfig.oldCannonBehaviors) y += 0.5; -+ BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, y, (double) blockposition.getZ() + 0.5D)); -+ // Paper end - if (!BlockDispenser.eventFired) { - world.getServer().getPluginManager().callEvent(event); - } -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 96b1e9a78..0d1fdd3ee 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { - } - - public boolean ak() { -+ // Paper start - OBFHELPER -+ return this.doWaterMovement(); -+ } -+ -+ public boolean doWaterMovement() { -+ // Paper end - if (this.bB() instanceof EntityBoat) { - this.inWater = false; - } else if (this.world.a(this.getBoundingBox().grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D), Material.WATER, this)) { -@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { - } - - public double e(double d0, double d1, double d2) { -+ // Paper start - OBFHELPER -+ return this.getDistance(d0, d1, d2); -+ } -+ -+ public double getDistance(double d0, double d1, double d2) { -+ // Paper end - double d3 = this.locX - d0; - double d4 = this.locY - d1; - double d5 = this.locZ - d2; -@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { - } - - public void f(double d0, double d1, double d2) { -+ // Paper start - OBFHELPER -+ this.addVelocity(d0, d1, d2); -+ } -+ -+ public void addVelocity(double d0, double d1, double d2) { - this.motX += d0; - this.motY += d1; - this.motZ += d2; -@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { - } - - public boolean bg() { -+ // Paper start - OBFHELPER -+ return this.pushedByWater(); -+ } -+ -+ public boolean pushedByWater() { -+ // Paper end - return true; - } - -diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 307a44c85..bb01929e8 100644 ---- a/src/main/java/net/minecraft/server/EntityFallingBlock.java -+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java -@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { - public boolean bu() { - return true; - } -+ -+ // Paper start - Old TNT cannon behaviors -+ @Override -+ public double getDistance(double d0, double d1, double d2) { -+ if (!world.paperConfig.oldCannonBehaviors) return super.getDistance(d0, d1, d2); -+ -+ double newX = this.locX - d0; -+ double newY = this.locY + this.getHeadHeight() - d1; -+ double newZ = this.locZ - d2; -+ -+ return (double) MathHelper.sqrt(newX * newX + newY * newY + newZ * newZ); -+ } -+ -+ -+ // Paper end - } -diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 25e471d37..e796ade87 100644 ---- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java -+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { - this.lastY = d1; - this.lastZ = d2; - this.source = entityliving; -+ if (world.paperConfig.oldCannonBehaviors) this.motX = this.motZ = 0.0F; // Paper - Old TNT cannon behaviors - } - - protected void i() { -@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { - } - - public float getHeadHeight() { -- return 0.0F; -+ return world.paperConfig.oldCannonBehaviors ? this.length / 16F : 0.0F; // Paper - Old TNT cannon behaviors - } - - public void setFuseTicks(int i) { -@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { - public int getFuseTicks() { - return this.c; - } -+ -+ // Paper start - Old TNT cannon behaviors -+ @Override -+ public double getDistance(double d0, double d1, double d2) { -+ if (!world.paperConfig.oldCannonBehaviors) return super.getDistance(d0, d1, d2); -+ -+ double newX = this.locX - d0; -+ double newY = this.locY + this.getHeadHeight() - d1; -+ double newZ = this.locZ - d2; -+ -+ return (double) MathHelper.sqrt(newX * newX + newY * newY + newZ * newZ); -+ } -+ -+ @Override -+ public boolean pushedByWater() { -+ return !world.paperConfig.oldCannonBehaviors && super.pushedByWater(); -+ } -+ -+ /** -+ * Author: Jedediah Smith -+ */ -+ @Override -+ public boolean doWaterMovement() { -+ if (!world.paperConfig.oldCannonBehaviors) return super.doWaterMovement(); -+ -+ // Preserve velocity while calling the super method -+ double oldMotX = this.motX; -+ double oldMotY = this.motY; -+ double oldMotZ = this.motZ; -+ -+ super.doWaterMovement(); -+ -+ this.motX = oldMotX; -+ this.motY = oldMotY; -+ this.motZ = oldMotZ; -+ -+ if (this.inWater) { -+ // Send position and velocity updates to nearby players on every tick while the TNT is in water. -+ // This does pretty well at keeping their clients in sync with the server. -+ EntityTrackerEntry ete = ((WorldServer) this.getWorld()).getTracker().trackedEntities.get(this.getId()); -+ if (ete != null) { -+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this); -+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this); -+ -+ ete.trackedPlayers.stream().filter(viewer -> (viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16).forEach(viewer -> { -+ viewer.playerConnection.sendPacket(velocityPacket); -+ viewer.playerConnection.sendPacket(positionPacket); -+ }); -+ } -+ } -+ -+ return this.inWater; -+ } -+ // Paper end - } -diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index d7bc6a0ed..f2785d86c 100644 ---- a/src/main/java/net/minecraft/server/Explosion.java -+++ b/src/main/java/net/minecraft/server/Explosion.java -@@ -0,0 +0,0 @@ public class Explosion { - d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback - } - -- entity.motX += d8 * d14; -- entity.motY += d9 * d14; -- entity.motZ += d10 * d14; -+ // Paper start - Fix cannons -+ /* -+ entity.motX += d8 * d14; -+ entity.motY += d9 * d14; -+ entity.motZ += d10 * d14; -+ */ -+ // This impulse method sets the dirty flag, so clients will get an immediate velocity update -+ entity.addVelocity(d8 * d14, d9 * d14, d10 * d14); -+ // Paper end - if (entity instanceof EntityHuman) { - EntityHuman entityhuman = (EntityHuman) entity; - --- \ No newline at end of file diff --git a/Spigot-Server-Patches/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index 8255bc58d0..8aec163857 100644 --- a/Spigot-Server-Patches/POM-Changes.patch +++ b/Spigot-Server-Patches/POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +index 4f14d6f41..a833892e3 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + com.destroystokyo.paper + paper jar - 1.11.2-R0.1-SNAPSHOT + 1.12-pre2-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper @@ -26,14 +26,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 UTF-8 @@ -0,0 +0,0 @@ - git-Bukkit- - - yyyyMMdd-HHmm -- 1.6 -- 1.6 -+ -+ 1.8 -+ 1.8 @@ -114,33 +106,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ${maven.build.timestamp} Bukkit ${api.version} -@@ -0,0 +0,0 @@ - - - -- org.codehaus.mojo -- animal-sniffer-maven-plugin -- 1.15 -- -- -- process-classes -- -- check -- -- -- -- -- -- org.codehaus.mojo.signature -- java16 -- 1.1 -- -- -- -- - org.apache.maven.plugins - maven-shade-plugin - 2.4.3 @@ -0,0 +0,0 @@ shade @@ -181,7 +146,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 org.apache.maven.plugins diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +index 93046379d..674096cab 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java @@ -0,0 +0,0 @@ public final class Versioning { diff --git a/Spigot-Server-Patches/Paper-config-files.patch b/Spigot-Server-Patches/Paper-config-files.patch index ec0deb6cdf..e861c3b19c 100644 --- a/Spigot-Server-Patches/Paper-config-files.patch +++ b/Spigot-Server-Patches/Paper-config-files.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java new file mode 100644 -index 00000000..2096d3f9 +index 000000000..2096d3f97 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +0,0 @@ @@ -61,7 +61,7 @@ index 00000000..2096d3f9 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 -index 00000000..328ff012 +index 000000000..3d8ee9ed3 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ @@ -124,8 +124,8 @@ index 00000000..328ff012 + commands = new HashMap(); + commands.put("paper", new PaperCommand("paper")); + -+ version = getInt("config-version", 12); -+ set("config-version", 12); ++ version = getInt("config-version", 13); ++ set("config-version", 13); + readConfig(PaperConfig.class, null); + } + @@ -240,7 +240,7 @@ index 00000000..328ff012 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java new file mode 100644 -index 00000000..621bf705 +index 000000000..621bf7051 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ @@ -311,7 +311,7 @@ index 00000000..621bf705 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 31756b80..cb83e4f5 100644 +index 072dff9b5..30538d8ec 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -326,7 +326,7 @@ index 31756b80..cb83e4f5 100644 DedicatedServer.LOGGER.info("Generating keypair"); this.a(MinecraftEncryption.b()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index eab11685..758962e6 100644 +index b2cc418a7..a366b2d70 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -347,7 +347,7 @@ index eab11685..758962e6 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b7e1f182..587d23df 100644 +index 8a0043d3c..440b23cf5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -366,15 +366,16 @@ index b7e1f182..587d23df 100644 } pluginManager.clearPlugins(); - commandMap.clearCommands(); +@@ -0,0 +0,0 @@ public final class CraftServer implements Server { resetRecipes(); + reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot + com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper - overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); + int pollCount = 0; diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ee8ec5a6..4399faf6 100644 +index 21170f377..30b6f3477 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { @@ -393,7 +394,7 @@ index ee8ec5a6..4399faf6 100644 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 01e73eb8..0b66f5e3 100644 +index 01e73eb89..0b66f5e35 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -0,0 +0,0 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch index f1d8689124..06fb66ee34 100644 --- a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch @@ -78,7 +78,7 @@ index 7bcafa8bb..4f6c1c2e7 100644 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c86a48070..0df01186f 100644 +index efcf383e7..b1c06388b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Player-affects-spawning-API.patch b/Spigot-Server-Patches/Player-affects-spawning-API.patch index df917eafbf..3edde04b7e 100644 --- a/Spigot-Server-Patches/Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/Player-affects-spawning-API.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index ec8f581ad..43e28d61c 100644 +index fc3d05394..b4507fe0c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - private final ItemCooldown bV; + private final ItemCooldown bX; @Nullable public EntityFishingHook hookedFish; + public boolean affectsSpawning = true; @@ -17,7 +17,7 @@ index ec8f581ad..43e28d61c 100644 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index a9e3b632b..1d26555d3 100644 +index be3422adc..2802cc062 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -30,12 +30,12 @@ index a9e3b632b..1d26555d3 100644 double d1 = entityhuman.locY - this.locY; double d2 = entityhuman.locZ - this.locZ; diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java -index 5af51cc0a..7531c9ba9 100644 +index dcc251e31..d8344ddc9 100644 --- a/src/main/java/net/minecraft/server/EntitySilverfish.java +++ b/src/main/java/net/minecraft/server/EntitySilverfish.java @@ -0,0 +0,0 @@ public class EntitySilverfish extends EntityMonster { - public boolean cM() { - if (super.cM()) { + public boolean P() { + if (super.P()) { EntityHuman entityhuman = this.world.b(this, 5.0D); - - return entityhuman == null; @@ -44,7 +44,7 @@ index 5af51cc0a..7531c9ba9 100644 return false; } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index b23c0be2a..e42a0c776 100644 +index 4c65dc0a9..c56a8e9c2 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -57,7 +57,7 @@ index b23c0be2a..e42a0c776 100644 j = MathHelper.floor(entityhuman.locZ / 16.0D); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index edd6c3b5e..751fc01d1 100644 +index 1ff2263eb..b87273aca 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -70,14 +70,13 @@ index edd6c3b5e..751fc01d1 100644 if (d3 < 0.0D || d4 < d3 * d3) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b56ae7a36..6509df573 100644 +index 433aafb33..c5924a2be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - + return new CraftAdvancementProgress(craft, data, progress); } -+ @Override + public void setAffectsSpawning(boolean affects) { + this.getHandle().affectsSpawning = affects; + } diff --git a/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch index 15be882f94..f52fe42df8 100644 --- a/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent Allows you to access the Gateway being used in a teleport event diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index 065d0bbfc..ea8992d72 100644 +index f9590d4c4..82c1a37ed 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -0,0 +0,0 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick diff --git a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch index 120152c9d7..9940d02f9a 100644 --- a/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -7,7 +7,7 @@ If the save queue already has 50 (configurable) of chunks pending, then avoid processing auto save (which would add more) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 220ecaf8d..4ca44afa9 100644 +index efae01b1d..70b498c7b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -23,7 +23,7 @@ index 220ecaf8d..4ca44afa9 100644 private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 71df9e4aa..0fb1f8427 100644 +index 39f0f5a17..19f10feda 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -51,7 +51,7 @@ index 71df9e4aa..0fb1f8427 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 90d069539..895882b2e 100644 +index 0d73e41f2..e14f62d01 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { diff --git a/Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch index c62bd75e29..5e22cbacf7 100644 --- a/Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch @@ -7,7 +7,7 @@ This causes the nether to spam unload/reload chunks, plus overall bad behavior. diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 94cb9d462..dfc328850 100644 +index 74c76fd6b..36df22215 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -0,0 +0,0 @@ public class BlockFire extends Block { @@ -22,12 +22,10 @@ index 94cb9d462..dfc328850 100644 } private void a(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition -- int k = this.c(world.getType(blockposition).getBlock()); + // Paper start + final IBlockData iblockdata = world.getTypeIfLoaded(blockposition); + if (iblockdata == null) return; -+ int k = this.c(iblockdata.getBlock()); -+ // Paper end + int k = this.e(world.getType(blockposition).getBlock()); if (random.nextInt(i) < k) { - IBlockData iblockdata = world.getType(blockposition); @@ -39,11 +37,9 @@ index 94cb9d462..dfc328850 100644 for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[k]; -- i = Math.max(this.d(world.getType(blockposition.shift(enumdirection)).getBlock()), i); + final IBlockData type = world.getTypeIfLoaded(blockposition.shift(enumdirection)); // Paper + if (type == null) continue; // Paper -+ i = Math.max(this.d(type.getBlock()), i); // Paper + i = Math.max(this.f(world.getType(blockposition.shift(enumdirection)).getBlock()), i); } - return i; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch index 60273f9629..f32dbb2dd6 100644 --- a/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch +++ b/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch @@ -6,13 +6,13 @@ Subject: [PATCH] Prevent Pathfinding out of World Border This prevents Entities from trying to run outside of the World Border diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index c0ef2400b..74d1fd6b2 100644 +index 3871ad017..a67cc3b75 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { @Nullable - public PathEntity a(BlockPosition blockposition) { + public PathEntity b(BlockPosition blockposition) { + if (!getEntity().getWorld().getWorldBorder().isInBounds(blockposition)) return null; // Paper - don't path out of world border if (!this.b()) { return null; diff --git a/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch index 2b2b9ede07..b4ba15da07 100644 --- a/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/Prevent-tile-entity-and-entity-crashes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index b3d3df4cf..d0c0371fc 100644 +index e02f0c442..39be107fd 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity { @@ -23,7 +23,7 @@ index b3d3df4cf..d0c0371fc 100644 public String a() throws Exception { int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 39919ab1c..632d5c760 100644 +index c6cf7754b..b1addedeb 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -44,7 +44,7 @@ index 39919ab1c..632d5c760 100644 } @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - ((ITickable) tileentity).F_(); + ((ITickable) tileentity).e(); this.methodProfiler.b(); } catch (Throwable throwable2) { - crashreport1 = CrashReport.a(throwable2, "Ticking block entity"); diff --git a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch index dbd36ede8b..d4b19cabf7 100644 --- a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 58d40f994..acb4469d2 100644 +index 8d48d7c0c..eca718513 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -19,7 +19,7 @@ index 58d40f994..acb4469d2 100644 public void reset() { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4a3b7be2a..d1b27c220 100644 +index 13cce8904..563781256 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { diff --git a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch index d6bb697698..04f34c0414 100644 --- a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch @@ -19,10 +19,10 @@ tickable state; it may be completely deadlocked. Therefore, we kill that thread right then and there. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8df30e3d0..df3077c9d 100644 +index 40514d042..1d0dc7a0d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs return this.ab; } diff --git a/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch index 089b785824..b127ee0f51 100644 --- a/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3f8859a1f..b42074706 100644 +index 0466a4f00..7e8913794 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Raise-string-limit-for-packet-serialization.patch b/Spigot-Server-Patches/Raise-string-limit-for-packet-serialization.patch index 5bc92c3d14..a13d5a4d74 100644 --- a/Spigot-Server-Patches/Raise-string-limit-for-packet-serialization.patch +++ b/Spigot-Server-Patches/Raise-string-limit-for-packet-serialization.patch @@ -8,12 +8,12 @@ The default limit is possible to hit with 50 page books with color codes, causin Bump the limit up a hair to above currently seen sizes. diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index 7a6619595..68e8c4671 100644 +index a8fc7e431..c1273e988 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -0,0 +0,0 @@ public class PacketDataSerializer extends ByteBuf { public PacketDataSerializer a(String s) { - byte[] abyte = s.getBytes(Charsets.UTF_8); + byte[] abyte = s.getBytes(StandardCharsets.UTF_8); - if (abyte.length > 32767) { - throw new EncoderException("String too big (was " + abyte.length + " bytes encoded, max " + 32767 + ")"); diff --git a/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch b/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch index 1016e0150b..35096dba03 100644 --- a/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch +++ b/Spigot-Server-Patches/Re-track-players-that-dismount-from-other-players.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Re-track players that dismount from other players diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ad1bb7bab..4e8efc549 100644 +index f4a2e748d..2b01c5395 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/Remove-Metadata-on-reload.patch index a4475fe788..aa1c0f76a7 100644 --- a/Spigot-Server-Patches/Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/Remove-Metadata-on-reload.patch @@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e77307c35..4d761d32a 100644 +index 0dca774af..fcc20d28e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Remove-the-Vanilla-Method-Profiler.patch b/Spigot-Server-Patches/Remove-the-Vanilla-Method-Profiler.patch index e63004d26c..9a29a14155 100644 --- a/Spigot-Server-Patches/Remove-the-Vanilla-Method-Profiler.patch +++ b/Spigot-Server-Patches/Remove-the-Vanilla-Method-Profiler.patch @@ -11,7 +11,7 @@ added, so we do not want any risk of performance degredation. Paper has a proper Timings system that makes the Vanilla Method profiler obsolete and inferior. diff --git a/src/main/java/net/minecraft/server/CommandDebug.java b/src/main/java/net/minecraft/server/CommandDebug.java -index fe58d428f..938f62f83 100644 +index 89708da96..7586168db 100644 --- a/src/main/java/net/minecraft/server/CommandDebug.java +++ b/src/main/java/net/minecraft/server/CommandDebug.java @@ -0,0 +0,0 @@ public class CommandDebug extends CommandAbstract { @@ -40,7 +40,7 @@ index fe58d428f..938f62f83 100644 public List tabComplete(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, @Nullable BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/MethodProfiler.java b/src/main/java/net/minecraft/server/MethodProfiler.java -index 654652916..276983485 100644 +index 20aa10c14..ebc324ed1 100644 --- a/src/main/java/net/minecraft/server/MethodProfiler.java +++ b/src/main/java/net/minecraft/server/MethodProfiler.java @@ -0,0 +0,0 @@ import java.util.List; diff --git a/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch index a984c45be1..49d72e1b78 100644 --- a/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/Remove-unused-World-Tile-Entity-List.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9bc8ce64c..2f4728b0d 100644 +index e301eaf9d..0ddc03507 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/Shame-on-you-Mojang.patch b/Spigot-Server-Patches/Shame-on-you-Mojang.patch index 1a7de84dcb..2e6af1a678 100644 --- a/Spigot-Server-Patches/Shame-on-you-Mojang.patch +++ b/Spigot-Server-Patches/Shame-on-you-Mojang.patch @@ -12,7 +12,7 @@ This then triggers async chunk loads! What in the hell were you thinking? diff --git a/src/main/java/net/minecraft/server/BlockBeacon.java b/src/main/java/net/minecraft/server/BlockBeacon.java -index f44f05620..74c371179 100644 +index f07ac0186..21075974d 100644 --- a/src/main/java/net/minecraft/server/BlockBeacon.java +++ b/src/main/java/net/minecraft/server/BlockBeacon.java @@ -0,0 +0,0 @@ public class BlockBeacon extends BlockTileEntity { diff --git a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index d8f574aa6f..6496ffaaf7 100644 --- a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index a8b507961..ebbc1fcaf 100644 +index 8361888c2..3623751bf 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -0,0 +0,0 @@ public class EULA { @@ -17,13 +17,13 @@ index a8b507961..ebbc1fcaf 100644 + properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)." + + "\nand also agreeing that tacos are tasty."); // Paper - fix lag } catch (Exception exception) { - EULA.a.warn("Failed to save {}", new Object[] { this.b, exception}); + EULA.a.warn("Failed to save {}", this.b, exception); } finally { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8f7b148a1..7539bb215 100644 +index e847f3f1a..577a1b92a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs } public String getServerModName() { @@ -33,7 +33,7 @@ index 8f7b148a1..7539bb215 100644 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 38ce05828..24fd62b53 100644 +index 42d3dd542..a06b7f325 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import net.md_5.bungee.api.chat.BaseComponent; diff --git a/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch b/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch index 1704157cd4..c4d667bae0 100644 --- a/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch +++ b/Spigot-Server-Patches/ShulkerBox-Dupe-Prevention.patch @@ -7,7 +7,7 @@ This ensures that Shulker Boxes can never drop their contents twice, and that the inventory is cleared incase it some how also got saved to the world. diff --git a/src/main/java/net/minecraft/server/BlockShulkerBox.java b/src/main/java/net/minecraft/server/BlockShulkerBox.java -index fcb1a6c66..12fb81635 100644 +index e4e0eae60..3fe3af1c2 100644 --- a/src/main/java/net/minecraft/server/BlockShulkerBox.java +++ b/src/main/java/net/minecraft/server/BlockShulkerBox.java @@ -0,0 +0,0 @@ public class BlockShulkerBox extends BlockTileEntity { diff --git a/Spigot-Server-Patches/String-based-Action-Bar-API.patch b/Spigot-Server-Patches/String-based-Action-Bar-API.patch index ee6381a2ab..e6486b0ac4 100644 --- a/Spigot-Server-Patches/String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/String-based-Action-Bar-API.patch @@ -62,7 +62,7 @@ index 1159eea1a..38359517c 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 61c32223d..072b59125 100644 +index d1f70af51..d698d7c0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -71,7 +71,7 @@ index 61c32223d..072b59125 100644 @Override + public void sendActionBar(String message) { + if (getHandle().playerConnection == null || message == null || message.isEmpty()) return; -+ getHandle().playerConnection.sendPacket(new PacketPlayOutChat(new ChatComponentText(message), (byte) 2)); ++ getHandle().playerConnection.sendPacket(new PacketPlayOutChat(new ChatComponentText(message), ChatMessageType.GAME_INFO)); + } + + @Override diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index e7dc822daa..147ef01291 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Timings v2 diff --git a/pom.xml b/pom.xml -index 8b96966d8..8d1e8680b 100644 +index a833892e3..3090f79f3 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -23,7 +23,7 @@ index 8b96966d8..8d1e8680b 100644 3.0.3 diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java new file mode 100644 -index 000000000..4b4b77a5c +index 000000000..1b33390de --- /dev/null +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java @@ -0,0 +0,0 @@ @@ -38,6 +38,7 @@ index 000000000..4b4b77a5c +public final class MinecraftTimings { + + public static final Timing playerListTimer = Timings.ofSafe("Player List"); ++ public static final Timing commandFunctionsTimer = Timings.ofSafe("Command Functions"); + public static final Timing connectionTimer = Timings.ofSafe("Connection Handler"); + public static final Timing tickablesTimer = Timings.ofSafe("Tickables"); + public static final Timing minecraftSchedulerTimer = Timings.ofSafe("Minecraft Scheduler"); @@ -153,7 +154,7 @@ index 000000000..4b4b77a5c +} diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java new file mode 100644 -index 000000000..b79f1be7a +index 000000000..089154f62 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java @@ -0,0 +0,0 @@ @@ -282,6 +283,11 @@ index 000000000..b79f1be7a + timedGenerator.recreateStructures(chunk, i, j); + } + } ++ ++ @Override ++ public boolean a(World world, String s, BlockPosition blockPosition) { ++ return timedGenerator.a(world, s, blockPosition); ++ } +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 @@ -391,7 +397,7 @@ index 000000000..e7789117b + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 1594d7ca4..007589314 100644 +index 5ab2cf6ee..b5795b6d3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import java.util.concurrent.TimeUnit; @@ -435,7 +441,7 @@ index 1594d7ca4..007589314 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index e8511ac9a..d3f1a4ac0 100644 +index 0ee47df3f..ba3913667 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -0,0 +0,0 @@ public class Block { @@ -455,7 +461,7 @@ index e8511ac9a..d3f1a4ac0 100644 public static int getId(Block block) { return Block.REGISTRY.a(block); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 81fc04ed3..bd3b16025 100644 +index 7fee74d80..39ad8d691 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { @@ -503,7 +509,7 @@ index 81fc04ed3..bd3b16025 100644 private void z() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 2d267e44b..2762d1838 100644 +index 9dcab42de..c1b0d6cea 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { @@ -525,7 +531,7 @@ index 2d267e44b..2762d1838 100644 this.chunkLoader.a(this.world, chunk); } catch (IOException ioexception) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 65fe4e2ec..bee52d783 100644 +index fe387e218..6550686ee 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -565,7 +571,7 @@ index 65fe4e2ec..bee52d783 100644 // return chunk; // CraftBukkit } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index cb83e4f56..e6819139f 100644 +index 30538d8ec..840ffeb93 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ import java.io.PrintStream; @@ -580,7 +586,7 @@ index cb83e4f56..e6819139f 100644 @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } - public void aM() { + public void aP() { - SpigotTimings.serverCommandTimer.startTiming(); // Spigot + MinecraftTimings.serverCommandTimer.startTiming(); // Spigot while (!this.serverCommandQueue.isEmpty()) { @@ -618,7 +624,7 @@ index cb83e4f56..e6819139f 100644 return waitable.get(); } catch (java.util.concurrent.ExecutionException e) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9bd9dc28b..14d23556f 100644 +index bae717b18..c6b7d6c22 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.block.BlockFace; @@ -657,7 +663,7 @@ index 9bd9dc28b..14d23556f 100644 public void recalcPosition() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index e9002c953..b22f81b12 100644 +index 3a92c468c..2c22b6ca2 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -672,10 +678,10 @@ index e9002c953..b22f81b12 100644 @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { } - public void A_() { + public void B_() { - SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot - super.A_(); - this.cA(); + super.B_(); + this.cG(); if (!this.world.isClientSide) { @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { } @@ -689,13 +695,13 @@ index e9002c953..b22f81b12 100644 float f = (float) (d0 * d0 + d1 * d1); @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { } else { - this.bp = 0; + this.bq = 0; } - - SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot } - protected float h(float f, float f1) { + protected float g(float f, float f1) { @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { } @@ -713,22 +719,22 @@ index e9002c953..b22f81b12 100644 this.world.methodProfiler.b(); this.world.methodProfiler.a("jump"); @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - this.bf *= 0.98F; - this.bg *= 0.9F; + this.bg *= 0.98F; + this.bh *= 0.9F; this.r(); - SpigotTimings.timerEntityAIMove.startTiming(); // Spigot - this.g(this.be, this.bf); + this.a(this.be, this.bf, this.bg); - SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot this.world.methodProfiler.b(); this.world.methodProfiler.a("push"); - SpigotTimings.timerEntityAICollision.startTiming(); // Spigot - this.ct(); + this.cz(); - SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot this.world.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index 347a2b671..aceb08ce1 100644 +index c840f6761..14504cbcc 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -0,0 +0,0 @@ public class EntityTracker { @@ -759,7 +765,7 @@ index 347a2b671..aceb08ce1 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cc0efa2e0..1b432f0d7 100644 +index 39318aaf1..e847f3f1a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.bukkit.Bukkit; @@ -770,9 +776,9 @@ index cc0efa2e0..1b432f0d7 100644 import org.spigotmc.SlackActivityAccountant; // Spigot +import co.aikar.timings.MinecraftTimings; // Paper - public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics { + public abstract class MinecraftServer implements ICommandListener, Runnable, IAsyncTaskHandler, IMojangStatistics { -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs } // CraftBukkit end MinecraftServer.LOGGER.info("Stopping server"); @@ -780,7 +786,7 @@ index cc0efa2e0..1b432f0d7 100644 // CraftBukkit start if (this.server != null) { this.server.disablePlugins(); -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs public void B() {} protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws @@ -789,7 +795,7 @@ index cc0efa2e0..1b432f0d7 100644 this.slackActivityAccountant.tickStarted(); // Spigot long i = System.nanoTime(); -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs } if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -797,7 +803,7 @@ index cc0efa2e0..1b432f0d7 100644 this.methodProfiler.a("save"); this.v.savePlayers(); // Spigot Start -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // this.saveChunks(true); // Spigot End this.methodProfiler.b(); @@ -805,7 +811,7 @@ index cc0efa2e0..1b432f0d7 100644 } this.methodProfiler.a("tallying"); -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs org.spigotmc.WatchdogThread.tick(); // Spigot this.slackActivityAccountant.tickEnded(tickNanos); // Spigot @@ -824,7 +830,7 @@ index cc0efa2e0..1b432f0d7 100644 this.methodProfiler.a("jobs"); Queue queue = this.j; -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs SystemUtils.a(entry, MinecraftServer.LOGGER); } // Spigot end @@ -853,7 +859,7 @@ index cc0efa2e0..1b432f0d7 100644 // Send time updates to everyone, it will get the right time from the world the player is in. if (this.ticks % 20 == 0) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) { -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time } } @@ -862,7 +868,7 @@ index cc0efa2e0..1b432f0d7 100644 int i; -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.methodProfiler.b(); this.methodProfiler.a("tracker"); @@ -872,7 +878,7 @@ index cc0efa2e0..1b432f0d7 100644 this.methodProfiler.b(); this.methodProfiler.b(); // } // CraftBukkit -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs } this.methodProfiler.c("connection"); @@ -887,12 +893,18 @@ index cc0efa2e0..1b432f0d7 100644 this.v.tick(); - SpigotTimings.playerListTimer.stopTiming(); // Spigot + MinecraftTimings.playerListTimer.stopTiming(); // Spigot + this.methodProfiler.c("commandFunctions"); +- SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot ++ MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot + this.aL().e(); +- SpigotTimings.commandFunctionsTimer.stopTiming();// Spigot ++ MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot this.methodProfiler.c("tickables"); - SpigotTimings.tickablesTimer.startTiming(); // Spigot + MinecraftTimings.tickablesTimer.startTiming(); // Spigot for (i = 0; i < this.o.size(); ++i) { - ((ITickable) this.o.get(i)).F_(); + ((ITickable) this.o.get(i)).e(); } - SpigotTimings.tickablesTimer.stopTiming(); // Spigot + MinecraftTimings.tickablesTimer.stopTiming(); // Spigot @@ -900,7 +912,7 @@ index cc0efa2e0..1b432f0d7 100644 this.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 703d5813d..021dfba14 100644 +index eeac34998..e4ed2e991 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ @@ -1000,7 +1012,7 @@ index 703d5813d..021dfba14 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9897bade8..27283efad 100644 +index 1dbdcfa57..63ea04fb4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; @@ -1014,9 +1026,9 @@ index 9897bade8..27283efad 100644 @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit end - private void handleCommand(String s) { + private void handleCommand(String s) { - org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot -+ MinecraftTimings.playerCommandTimer.startTiming(); // Paper ++ MinecraftTimings.playerCommandTimer.startTiming(); // Paper // CraftBukkit start - whole method if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getName() + " issued server command: " + s); @@ -1044,7 +1056,7 @@ index 9897bade8..27283efad 100644 } - org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot + MinecraftTimings.playerCommandTimer.stopTiming(); // Paper - // this.minecraftServer.getCommandHandler().a(this.player, s); + // this.minecraftServer.getCommandHandler().b(this.player, s); // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -1078,7 +1090,7 @@ index f74b06794..1fc632e0c 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 411720f2d..80bf61164 100644 +index f79683a60..4aaf287ae 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ @@ -1102,7 +1114,7 @@ index 411720f2d..80bf61164 100644 public void addWhitelist(GameProfile gameprofile) { diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index f1f206501..fb350c408 100644 +index 74e3f42cd..2580a4cf6 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -0,0 +0,0 @@ @@ -1144,7 +1156,7 @@ index f1f206501..fb350c408 100644 return flag; } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 6958a2e0f..b3d3df4cf 100644 +index 591f4ad7f..e02f0c442 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -1164,7 +1176,7 @@ index 6958a2e0f..b3d3df4cf 100644 private static final RegistryMaterials> f = new RegistryMaterials(); protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 758962e67..a87b37277 100644 +index a366b2d70..eafb76003 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ import com.google.common.collect.Maps; @@ -1258,7 +1270,7 @@ index 758962e67..a87b37277 100644 ++entity.ticksLived; + ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper if (entity.isPassenger()) { - entity.aw(); + entity.leaveVehicle(); } else { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { } @@ -1270,7 +1282,7 @@ index 758962e67..a87b37277 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 391a09c52..966938997 100644 +index c48a16682..6856aac64 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1318,16 +1330,17 @@ index 391a09c52..966938997 100644 for (int j = 0; j < i; ++j) { @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { // this.nextTickListHash.remove(nextticklistentry); - this.U.add(nextticklistentry); + this.W.add(nextticklistentry); } + timings.scheduledBlocksCleanup.stopTiming(); // Paper this.methodProfiler.b(); this.methodProfiler.a("ticking"); + Iterator iterator = this.W.iterator(); + timings.scheduledBlocksTicking.startTiming(); // Paper - Iterator iterator = this.U.iterator(); while (iterator.hasNext()) { + nextticklistentry = (NextTickListEntry) iterator.next(); @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (this.areChunksLoadedBetween(nextticklistentry.a.a(0, 0, 0), nextticklistentry.a.a(0, 0, 0))) { @@ -1349,7 +1362,7 @@ index 391a09c52..966938997 100644 + timings.scheduledBlocksTicking.stopTiming(); // Paper this.methodProfiler.b(); - this.U.clear(); + this.W.clear(); @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed()); } @@ -1403,7 +1416,7 @@ index 391a09c52..966938997 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 587d23dfd..d27e2ce98 100644 +index 440b23cf5..42d3dd542 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -1441,7 +1454,7 @@ index 587d23dfd..d27e2ce98 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java deleted file mode 100644 -index 41d2d87ee..000000000 +index 311a2c3f6..000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -1462,6 +1475,7 @@ index 41d2d87ee..000000000 - - public static final CustomTimingsHandler serverTickTimer = new CustomTimingsHandler("** Full Server Tick"); - public static final CustomTimingsHandler playerListTimer = new CustomTimingsHandler("Player List"); +- public static final CustomTimingsHandler commandFunctionsTimer = new CustomTimingsHandler("Command Functions"); - public static final CustomTimingsHandler connectionTimer = new CustomTimingsHandler("Connection Handler"); - public static final CustomTimingsHandler tickablesTimer = new CustomTimingsHandler("Tickables"); - public static final CustomTimingsHandler schedulerTimer = new CustomTimingsHandler("Scheduler"); @@ -1663,7 +1677,7 @@ index 3a95b4465..b5efb9c3f 100644 public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0c8295435..f4d71683a 100644 +index e6dcddc64..433aafb33 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -1674,15 +1688,7 @@ index 0c8295435..f4d71683a 100644 +import org.bukkit.craftbukkit.*; import org.bukkit.craftbukkit.block.CraftSign; import org.bukkit.craftbukkit.conversations.ConversationTracker; --import org.bukkit.craftbukkit.CraftEffect; --import org.bukkit.craftbukkit.CraftOfflinePlayer; --import org.bukkit.craftbukkit.CraftServer; --import org.bukkit.craftbukkit.CraftSound; --import org.bukkit.craftbukkit.CraftStatistic; --import org.bukkit.craftbukkit.CraftWorld; - import org.bukkit.craftbukkit.map.CraftMapView; - import org.bukkit.craftbukkit.map.RenderData; - import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; + import org.bukkit.craftbukkit.CraftEffect; @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); @@ -1867,7 +1873,7 @@ index e52ef47b7..3d90b3426 100644 this.value = value; } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index c32d44df0..5c2fb0058 100644 +index be23631b2..9eb36f3e9 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityWither; diff --git a/Spigot-Server-Patches/Toggleable-Elytra-Wall-Damage.patch b/Spigot-Server-Patches/Toggleable-Elytra-Wall-Damage.patch index 045f42f4cb..d6b5cebb93 100644 --- a/Spigot-Server-Patches/Toggleable-Elytra-Wall-Damage.patch +++ b/Spigot-Server-Patches/Toggleable-Elytra-Wall-Damage.patch @@ -7,7 +7,7 @@ Instead of calculating the damage taken from hitting a wall, you can disable it in the config. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 04861f146..dc96bd7f4 100644 +index ef60c15bd..cec9ea74c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,19 +21,19 @@ index 04861f146..dc96bd7f4 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ec901150d..b8ac99e5d 100644 +index 9587704d7..97b498507 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { this.motY = 0.30000001192092896D; } - } else if (this.cH()) { + } else if (this.cN()) { + if (world.paperConfig.elytraHitWallDamage) { // Paper start - Toggleable Elytra Wall Damage if (this.motY > -0.5D) { this.fallDistance = 1.0F; } @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - this.damageEntity(DamageSource.FLY_INTO_WALL, f7); + this.damageEntity(DamageSource.FLY_INTO_WALL, f8); } } + } // Paper end - Elyta Wall Damage if statement diff --git a/Spigot-Server-Patches/Undead-horse-leashing.patch b/Spigot-Server-Patches/Undead-horse-leashing.patch index 8c06eb6f31..208602713d 100644 --- a/Spigot-Server-Patches/Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/Undead-horse-leashing.patch @@ -20,7 +20,7 @@ index 9987a5c7a..0873febb6 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index d74ccd68d..3416c7a7d 100644 +index bed01b8c0..a3c41130f 100644 --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java @@ -0,0 +0,0 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven @@ -31,5 +31,5 @@ index d74ccd68d..3416c7a7d 100644 + return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper } - protected void q(float f) { + protected void s(float f) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch index 857f9e7672..2cf5c4aa0b 100644 --- a/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index be54c807b..42bd79b10 100644 +index dbaf2863b..aabf25cf2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -18,9 +18,9 @@ index be54c807b..42bd79b10 100644 return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { - this.width = 0.6F; this.length = 1.8F; this.ax = 1; + this.ay = 1.0F; - this.random = new Random(); + this.random = SHARED_RANDOM; // Paper this.fireTicks = -this.getMaxFireTicks(); diff --git a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch index 3f6c951be2..ad5a75a4c4 100644 --- a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 44fdf92ff..1e295432e 100644 +index ca05b3310..916c63ef7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -18,7 +18,7 @@ index 44fdf92ff..1e295432e 100644 protected int j; private Entity au;public void setVehicle(Entity entity) { this.au = entity; } // Paper // OBFHELPER diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java -index eb32871bd..a380e615b 100644 +index c0d97f154..363209170 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java @@ -0,0 +0,0 @@ public class ItemBlock extends Item { @@ -31,7 +31,7 @@ index eb32871bd..a380e615b 100644 IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2fa63a27f..7af76e14c 100644 +index cfdd04d8b..42cfbe096 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -78,7 +78,7 @@ index 2fa63a27f..7af76e14c 100644 this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index e669f0878..afdd4ab70 100644 +index 09f009522..2596c2fa0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch index 9d463dd252..4efa94edfc 100644 --- a/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch +++ b/Spigot-Server-Patches/Vehicle-Event-Cancellation-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vehicle Event Cancellation Changes diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8908d8b8d..0f4a1b66b 100644 +index fa940ad31..0ec78ec2f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { diff --git a/Spigot-Server-Patches/Water-mobs-should-only-spawn-in-the-water.patch b/Spigot-Server-Patches/Water-mobs-should-only-spawn-in-the-water.patch index 077ca63b3b..a29129728e 100644 --- a/Spigot-Server-Patches/Water-mobs-should-only-spawn-in-the-water.patch +++ b/Spigot-Server-Patches/Water-mobs-should-only-spawn-in-the-water.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Water mobs should only spawn in the water diff --git a/src/main/java/net/minecraft/server/EntityWaterAnimal.java b/src/main/java/net/minecraft/server/EntityWaterAnimal.java -index 90d33af95..251555713 100644 +index 203e387fb..6ddb1aa8a 100644 --- a/src/main/java/net/minecraft/server/EntityWaterAnimal.java +++ b/src/main/java/net/minecraft/server/EntityWaterAnimal.java @@ -0,0 +0,0 @@ public abstract class EntityWaterAnimal extends EntityInsentient implements IAni } - public boolean cM() { + public boolean P() { - return true; + // Paper start - Don't let water mobs spawn in non-water blocks + // Based around EntityAnimal's implementation diff --git a/Spigot-Server-Patches/Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/Workaround-for-setting-passengers-on-players.patch index fa16e581a0..d2045f0e47 100644 --- a/Spigot-Server-Patches/Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/Workaround-for-setting-passengers-on-players.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a9e8b9cd..8e06c2140 100644 +index 78aab5c63..00f9229f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch index 5227c79353..c2e45d0d33 100644 --- a/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 9cb3b22fb..c70f14a15 100644 +index 2b20a0205..793353ac7 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -44,7 +44,7 @@ index 9cb3b22fb..c70f14a15 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index dd8380f71..0a9e8b9cd 100644 +index 5839801f5..78aab5c63 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index 0c9255f652..cbf4e0ffc7 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -6,18 +6,18 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 430168d21..83b62da55 100644 +index 9099eb64f..111c363c7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import co.aikar.timings.MinecraftTimings; // Paper - public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics { + public abstract class MinecraftServer implements ICommandListener, Runnable, IAsyncTaskHandler, IMojangStatistics { + private static MinecraftServer SERVER; // Paper public static final Logger LOGGER = LogManager.getLogger(); public static final File a = new File("usercache.json"); public Convertable convertable; -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // Spigot end public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { @@ -25,7 +25,7 @@ index 430168d21..83b62da55 100644 io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable this.e = proxy; this.V = yggdrasilauthenticationservice; -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // CraftBukkit start @Deprecated public static MinecraftServer getServer() { diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index b4f4c1f8a6..6685298554 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -60,6 +60,7 @@ import DataBits import DataConverterMaterialId import DataInspectorBlockEntity import DefinedStructure +import EntityLlama import EULA import EntitySquid import EntityWaterAnimal @@ -84,6 +85,7 @@ import PathfinderGoalGotoTarget import PathfinderWater import PersistentVillage import PlayerConnectionUtils +import RegionFile import RemoteControlListener import TileEntityEnderChest import TileEntityLootable