diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index 19c58dee0c..c9d7ca945c 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 1f8f0180d8a5714931673fe8fabce687a0c24095 Mon Sep 17 00:00:00 2001 +From 617559d05de68cd645b17492c511e62ae593de4b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:40:33 -0600 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 6d019d1..0e88ae2 100644 +index 4f14d6f41..a833892e3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -17,7 +17,7 @@ index 6d019d1..0e88ae2 100644 + com.destroystokyo.paper + paper jar - 1.11.2-R0.1-SNAPSHOT + 1.12-pre2-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper @@ -25,15 +25,7 @@ index 6d019d1..0e88ae2 100644 UTF-8 -@@ -16,21 +16,22 @@ - git-Bukkit- - - yyyyMMdd-HHmm -- 1.6 -- 1.6 -+ -+ 1.8 -+ 1.8 +@@ -21,16 +21,16 @@ @@ -54,7 +46,7 @@ index 6d019d1..0e88ae2 100644 ${project.version} compile -@@ -94,34 +95,22 @@ +@@ -94,34 +94,22 @@ @@ -100,7 +92,7 @@ index 6d019d1..0e88ae2 100644 -@@ -131,11 +120,12 @@ +@@ -131,11 +119,12 @@ maven-jar-plugin 3.0.2 @@ -114,34 +106,7 @@ index 6d019d1..0e88ae2 100644 ${maven.build.timestamp} Bukkit ${api.version} -@@ -165,26 +155,6 @@ - - - -- 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 -@@ -195,11 +165,13 @@ +@@ -195,11 +184,13 @@ shade @@ -159,7 +124,7 @@ index 6d019d1..0e88ae2 100644 jline org.bukkit.craftbukkit.libs.jline -@@ -238,20 +210,6 @@ +@@ -234,20 +225,6 @@ maven-compiler-plugin 3.1 @@ -181,7 +146,7 @@ index 6d019d1..0e88ae2 100644 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 9304637..674096c 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 @@ -11,7 +11,7 @@ public final class Versioning { @@ -194,5 +159,5 @@ index 9304637..674096c 100644 if (stream != null) { -- -2.9.3 +2.13.0 diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 8952d74d11..9ec4891f3b 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -1,4 +1,4 @@ -From 592ca37122a5eb5a53cc83cd94dcd1a7c36ebaf8 Mon Sep 17 00:00:00 2001 +From 79288da44d41aa22fd80969a8ad4447b475f67c7 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:02:09 -0600 Subject: [PATCH] Paper config files @@ -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 +1,49 @@ @@ -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 +1,173 @@ @@ -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 +1,66 @@ @@ -311,10 +311,10 @@ 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 -@@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -184,6 +184,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings")); org.spigotmc.SpigotConfig.registerCommands(); // Spigot end @@ -326,10 +326,10 @@ 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 -@@ -125,6 +125,8 @@ public abstract class World implements IBlockAccess { +@@ -127,6 +127,8 @@ public abstract class World implements IBlockAccess { private int tickPosition; public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot @@ -338,7 +338,7 @@ index eab11685..758962e6 100644 public final SpigotTimings.WorldTimingsHandler timings; // Spigot private boolean guardEntityList; // Spigot public static boolean haveWeSilencedAPhysicsCrash; -@@ -147,6 +149,7 @@ public abstract class World implements IBlockAccess { +@@ -149,6 +151,7 @@ public abstract class World implements IBlockAccess { protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot @@ -347,10 +347,10 @@ 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 -@@ -697,6 +697,7 @@ public final class CraftServer implements Server { +@@ -689,6 +689,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -358,7 +358,7 @@ index b7e1f182..587d23df 100644 for (WorldServer world : console.worlds) { world.worldData.setDifficulty(difficulty); world.setSpawnFlags(monsters, animals); -@@ -712,12 +713,14 @@ public final class CraftServer implements Server { +@@ -704,6 +705,7 @@ public final class CraftServer implements Server { world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); } world.spigotConfig.init(); // Spigot @@ -366,15 +366,16 @@ index b7e1f182..587d23df 100644 } pluginManager.clearPlugins(); - commandMap.clearCommands(); +@@ -711,6 +713,7 @@ 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 @@ -126,6 +126,14 @@ 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 @@ -39,31 +39,31 @@ public class SpigotWorldConfig @@ -434,5 +435,5 @@ index 01e73eb8..0b66f5e3 100644 config.addDefault( "world-settings.default." + path, def ); return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index db54ee31ac..6af59ab027 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -1,15 +1,15 @@ -From d53c24fef5ec8a7ba7a0681d0b7361d10eba2d40 Mon Sep 17 00:00:00 2001 +From d96016cb6d0bc3a710cf6e081872d2f4117e1dda Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 19:36:20 -0400 Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 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 @@ -89,7 +89,7 @@ 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 -@@ -49,7 +49,7 @@ public abstract class BiomeBase { - protected List x; +@@ -46,7 +46,7 @@ public abstract class BiomeBase { + 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 @@ -29,7 +29,7 @@ public class BlockStateEnum & INamable> extends BlockState @@ -44,10 +44,10 @@ 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 -@@ -223,7 +223,7 @@ public abstract class CommandAbstract implements ICommand { +@@ -231,7 +231,7 @@ public abstract class CommandAbstract implements ICommand { } if (object != null && oclass.isAssignableFrom(object.getClass())) { @@ -56,7 +56,7 @@ index fe74068e..b669884d 100644 } else { throw new ExceptionEntityNotFound(s); } -@@ -440,7 +440,7 @@ public abstract class CommandAbstract implements ICommand { +@@ -448,7 +448,7 @@ public abstract class CommandAbstract implements ICommand { } private static > IBlockData a(IBlockData iblockdata, IBlockState iblockstate, Comparable comparable) { @@ -65,7 +65,7 @@ index fe74068e..b669884d 100644 } public static Predicate b(final Block block, String s) throws ExceptionInvalidBlockState { -@@ -533,7 +533,7 @@ public abstract class CommandAbstract implements ICommand { +@@ -541,7 +541,7 @@ public abstract class CommandAbstract implements ICommand { @Nullable private static > T a(IBlockState iblockstate, String s) { @@ -74,7 +74,7 @@ index fe74068e..b669884d 100644 } public static String a(Object[] aobject) { -@@ -684,7 +684,7 @@ public abstract class CommandAbstract implements ICommand { +@@ -692,7 +692,7 @@ public abstract class CommandAbstract implements ICommand { return this.getCommand().compareTo(icommand.getCommand()); } @@ -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 @@ -20,7 +20,7 @@ public class ItemFactoryTest extends AbstractTestingBase { @@ -97,5 +97,5 @@ index f5bcbdbe..3190cadf 100644 for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) { final String entryName = clazzEntry.getName(); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0005-MC-Utils.patch b/Spigot-Server-Patches/0005-MC-Utils.patch index d2fc54a83e..19409f2bb7 100644 --- a/Spigot-Server-Patches/0005-MC-Utils.patch +++ b/Spigot-Server-Patches/0005-MC-Utils.patch @@ -1,11 +1,11 @@ -From a703dc3147918196659551ad173b9072f80e983c Mon Sep 17 00:00:00 2001 +From 2ff1a095a26d78e4e5de5a878259f8094cbb0d90 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 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 @@ -675,6 +675,7 @@ public class Chunk { @@ -212,19 +212,19 @@ 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 -@@ -19,7 +19,7 @@ import org.apache.logging.log4j.Logger; - public class NBTTagCompound extends NBTBase { +@@ -22,7 +22,7 @@ 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 public NBTTagCompound() {} -@@ -91,11 +91,13 @@ public class NBTTagCompound extends NBTBase { +@@ -94,11 +94,13 @@ public class NBTTagCompound extends NBTBase { this.map.put(s, new NBTTagLong(i)); } @@ -239,10 +239,10 @@ 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 -@@ -12,7 +12,7 @@ import org.apache.logging.log4j.Logger; +@@ -13,7 +13,7 @@ import org.apache.logging.log4j.Logger; public class NBTTagList extends NBTBase { private static final Logger b = LogManager.getLogger(); @@ -252,5 +252,5 @@ index 370203b2d..ae7498c03 100644 public NBTTagList() {} -- -2.12.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0006-Timings-v2.patch b/Spigot-Server-Patches/0006-Timings-v2.patch index 40f9849d19..a1e1774a74 100644 --- a/Spigot-Server-Patches/0006-Timings-v2.patch +++ b/Spigot-Server-Patches/0006-Timings-v2.patch @@ -1,14 +1,14 @@ -From 1c2a256ac8dc0122b4a34665f614bb09ea329fe4 Mon Sep 17 00:00:00 2001 +From 52903d99be9e34ce9c9871eaecc2a371db5b4497 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 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 -@@ -66,6 +66,12 @@ +@@ -65,6 +65,12 @@ compile @@ -23,10 +23,10 @@ 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 +1,124 @@ +@@ -0,0 +1,125 @@ +package co.aikar.timings; + +import net.minecraft.server.*; @@ -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,10 +154,10 @@ 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 +1,126 @@ +@@ -0,0 +1,131 @@ +/* + * This file is licensed under the MIT License (MIT). + * @@ -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 @@ -14,11 +14,14 @@ 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 @@ -35,6 +35,15 @@ 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 @@ -900,7 +900,7 @@ 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 @@ -195,7 +195,7 @@ 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 @@ -388,7 +388,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -565,10 +571,10 @@ 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 -@@ -23,7 +23,7 @@ import java.io.PrintStream; +@@ -24,7 +24,7 @@ import java.io.PrintStream; import org.apache.logging.log4j.Level; import org.bukkit.craftbukkit.LoggerOutputStream; @@ -577,16 +583,16 @@ index cb83e4f56..e6819139f 100644 import org.bukkit.event.server.ServerCommandEvent; import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; -@@ -427,7 +427,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -433,7 +433,7 @@ 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()) { ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0); -@@ -442,7 +442,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -448,7 +448,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer // CraftBukkit end } @@ -595,7 +601,7 @@ index cb83e4f56..e6819139f 100644 } public boolean aa() { -@@ -692,7 +692,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -694,7 +694,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer return remoteControlCommandListener.getMessages(); } }; @@ -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 @@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace; @@ -631,7 +637,7 @@ index 9bd9dc28b..14d23556f 100644 import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; -@@ -145,7 +146,7 @@ public abstract class Entity implements ICommandListener { +@@ -146,7 +147,7 @@ public abstract class Entity implements ICommandListener { public boolean valid; // CraftBukkit public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 @@ -640,7 +646,7 @@ index 9bd9dc28b..14d23556f 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -523,7 +524,6 @@ public abstract class Entity implements ICommandListener { +@@ -525,7 +526,6 @@ public abstract class Entity implements ICommandListener { } public void move(EnumMoveType enummovetype, double d0, double d1, double d2) { @@ -648,7 +654,7 @@ index 9bd9dc28b..14d23556f 100644 if (this.noclip) { this.a(this.getBoundingBox().d(d0, d1, d2)); this.recalcPosition(); -@@ -915,7 +915,6 @@ public abstract class Entity implements ICommandListener { +@@ -919,7 +919,6 @@ public abstract class Entity implements ICommandListener { this.world.methodProfiler.b(); } @@ -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 @@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -669,15 +675,15 @@ index e9002c953..b22f81b12 100644 public abstract class EntityLiving extends Entity { -@@ -1816,7 +1816,6 @@ public abstract class EntityLiving extends Entity { +@@ -1861,7 +1861,6 @@ 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) { -@@ -1889,9 +1888,7 @@ public abstract class EntityLiving extends Entity { +@@ -1934,9 +1933,7 @@ public abstract class EntityLiving extends Entity { } } @@ -687,16 +693,16 @@ index e9002c953..b22f81b12 100644 double d0 = this.locX - this.lastX; double d1 = this.locZ - this.lastZ; float f = (float) (d0 * d0 + d1 * d1); -@@ -1960,8 +1957,6 @@ public abstract class EntityLiving extends Entity { +@@ -2012,8 +2009,6 @@ public abstract class EntityLiving extends Entity { } else { - this.bp = 0; + this.bq = 0; } - - SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot } - protected float h(float f, float f1) { -@@ -2026,7 +2021,6 @@ public abstract class EntityLiving extends Entity { + protected float g(float f, float f1) { +@@ -2078,7 +2073,6 @@ public abstract class EntityLiving extends Entity { } this.world.methodProfiler.a("ai"); @@ -704,7 +710,7 @@ index e9002c953..b22f81b12 100644 if (this.isFrozen()) { this.bd = false; this.be = 0.0F; -@@ -2037,7 +2031,6 @@ public abstract class EntityLiving extends Entity { +@@ -2089,7 +2083,6 @@ public abstract class EntityLiving extends Entity { this.doTick(); this.world.methodProfiler.b(); } @@ -712,23 +718,23 @@ index e9002c953..b22f81b12 100644 this.world.methodProfiler.b(); this.world.methodProfiler.a("jump"); -@@ -2060,14 +2053,10 @@ public abstract class EntityLiving extends Entity { - this.bf *= 0.98F; - this.bg *= 0.9F; +@@ -2112,14 +2105,10 @@ public abstract class EntityLiving extends Entity { + 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 @@ -175,7 +175,7 @@ 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 @@ -47,8 +47,8 @@ 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 { -@@ -459,6 +459,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -459,6 +459,7 @@ 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(); -@@ -663,7 +664,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -663,7 +664,7 @@ 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(); -@@ -691,7 +692,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -691,7 +692,6 @@ 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 -@@ -706,7 +706,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -706,7 +706,6 @@ 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"); -@@ -729,14 +728,14 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -729,14 +728,14 @@ 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; -@@ -747,22 +746,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -747,22 +746,23 @@ 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) { -@@ -770,7 +770,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -770,7 +770,7 @@ 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; -@@ -827,9 +827,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -827,9 +827,7 @@ 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 -@@ -838,20 +836,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -838,24 +836,24 @@ 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 @@ -1,5 +1,6 @@ @@ -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 @@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1011,16 +1023,16 @@ index 9897bade8..27283efad 100644 // CraftBukkit end public class PlayerConnection implements PacketListenerPlayIn, ITickable { -@@ -1335,7 +1336,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1346,7 +1347,7 @@ 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); -@@ -1346,22 +1347,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1357,22 +1358,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -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 @@ -1,5 +1,6 @@ @@ -1088,7 +1100,7 @@ index 411720f2d..80bf61164 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1174,10 +1175,11 @@ public abstract class PlayerList { +@@ -1197,10 +1198,11 @@ public abstract class PlayerList { } public void savePlayers() { @@ -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 @@ -1,5 +1,7 @@ @@ -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 @@ -4,12 +4,13 @@ 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 @@ -18,11 +18,11 @@ import com.google.common.collect.Maps; @@ -1180,7 +1192,7 @@ index 758962e67..a87b37277 100644 import org.bukkit.event.block.BlockCanBuildEvent; import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; -@@ -127,7 +127,7 @@ public abstract class World implements IBlockAccess { +@@ -129,7 +129,7 @@ public abstract class World implements IBlockAccess { public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper @@ -1189,7 +1201,7 @@ index 758962e67..a87b37277 100644 private boolean guardEntityList; // Spigot public static boolean haveWeSilencedAPhysicsCrash; public static String blockLocation; -@@ -197,7 +197,7 @@ public abstract class World implements IBlockAccess { +@@ -199,7 +199,7 @@ public abstract class World implements IBlockAccess { }); this.getServer().addWorld(this.world); // CraftBukkit end @@ -1198,7 +1210,7 @@ index 758962e67..a87b37277 100644 this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -@@ -1381,6 +1381,7 @@ public abstract class World implements IBlockAccess { +@@ -1383,6 +1383,7 @@ public abstract class World implements IBlockAccess { } this.methodProfiler.c("remove"); @@ -1206,7 +1218,7 @@ index 758962e67..a87b37277 100644 this.entityList.removeAll(this.f); int j; -@@ -1401,6 +1402,7 @@ public abstract class World implements IBlockAccess { +@@ -1403,6 +1404,7 @@ public abstract class World implements IBlockAccess { this.f.clear(); this.l(); @@ -1214,7 +1226,7 @@ index 758962e67..a87b37277 100644 this.methodProfiler.c("regular"); CrashReportSystemDetails crashreportsystemdetails1; -@@ -1410,6 +1412,7 @@ public abstract class World implements IBlockAccess { +@@ -1412,6 +1414,7 @@ public abstract class World implements IBlockAccess { timings.entityTick.startTiming(); // Spigot guardEntityList = true; // Spigot // CraftBukkit start - Use field for loop variable @@ -1222,7 +1234,7 @@ index 758962e67..a87b37277 100644 int entitiesThisCycle = 0; if (tickPosition < 0) tickPosition = 0; for (entityLimiter.initTick(); -@@ -1431,10 +1434,11 @@ public abstract class World implements IBlockAccess { +@@ -1433,10 +1436,11 @@ public abstract class World implements IBlockAccess { this.methodProfiler.a("tick"); if (!entity.dead && !(entity instanceof EntityPlayer)) { try { @@ -1236,7 +1248,7 @@ index 758962e67..a87b37277 100644 crashreport1 = CrashReport.a(throwable1, "Ticking entity"); crashreportsystemdetails1 = crashreport1.a("Entity being ticked"); entity.appendEntityCrashDetails(crashreportsystemdetails1); -@@ -1567,6 +1571,7 @@ public abstract class World implements IBlockAccess { +@@ -1569,6 +1573,7 @@ public abstract class World implements IBlockAccess { } timings.tileEntityPending.stopTiming(); // Spigot @@ -1244,7 +1256,7 @@ index 758962e67..a87b37277 100644 this.methodProfiler.b(); this.methodProfiler.b(); } -@@ -1619,7 +1624,6 @@ public abstract class World implements IBlockAccess { +@@ -1621,7 +1626,6 @@ public abstract class World implements IBlockAccess { entity.ticksLived++; entity.inactiveTick(); } else { @@ -1252,15 +1264,15 @@ index 758962e67..a87b37277 100644 // CraftBukkit end entity.M = entity.locX; entity.N = entity.locY; -@@ -1628,6 +1632,7 @@ public abstract class World implements IBlockAccess { +@@ -1630,6 +1634,7 @@ public abstract class World implements IBlockAccess { entity.lastPitch = entity.pitch; if (flag && entity.aa) { ++entity.ticksLived; + ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper if (entity.isPassenger()) { - entity.aw(); + entity.leaveVehicle(); } else { -@@ -1687,8 +1692,6 @@ public abstract class World implements IBlockAccess { +@@ -1689,8 +1694,6 @@ public abstract class World implements IBlockAccess { } } } @@ -1270,10 +1282,10 @@ 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 -@@ -247,13 +247,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -256,13 +256,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { timings.doChunkUnload.stopTiming(); // Spigot this.methodProfiler.c("tickPending"); @@ -1291,7 +1303,7 @@ index 391a09c52..966938997 100644 this.methodProfiler.c("chunkMap"); timings.doChunkMap.startTiming(); // Spigot this.manager.flush(); -@@ -469,7 +469,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -478,7 +478,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } @@ -1300,7 +1312,7 @@ index 391a09c52..966938997 100644 if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int i1 = achunksection.length; -@@ -497,6 +497,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -506,6 +506,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } } @@ -1308,7 +1320,7 @@ index 391a09c52..966938997 100644 } this.methodProfiler.b(); -@@ -692,6 +693,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -691,6 +692,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.methodProfiler.a("cleaning"); @@ -1316,19 +1328,20 @@ index 391a09c52..966938997 100644 NextTickListEntry nextticklistentry; for (int j = 0; j < i; ++j) { -@@ -705,9 +707,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -704,10 +706,12 @@ 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()) { -@@ -717,6 +721,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { + nextticklistentry = (NextTickListEntry) iterator.next(); +@@ -716,6 +720,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (this.areChunksLoadedBetween(nextticklistentry.a.a(0, 0, 0), nextticklistentry.a.a(0, 0, 0))) { IBlockData iblockdata = this.getType(nextticklistentry.a); @@ -1337,7 +1350,7 @@ index 391a09c52..966938997 100644 if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) { try { -@@ -729,10 +735,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -728,10 +734,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { throw new ReportedException(crashreport); } } @@ -1349,8 +1362,8 @@ index 391a09c52..966938997 100644 + timings.scheduledBlocksTicking.stopTiming(); // Paper this.methodProfiler.b(); - this.U.clear(); -@@ -828,7 +836,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + this.W.clear(); +@@ -827,7 +835,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed()); } @@ -1359,7 +1372,7 @@ index 391a09c52..966938997 100644 // CraftBukkit end } -@@ -993,6 +1001,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -992,6 +1000,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (chunkproviderserver.e()) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit @@ -1367,7 +1380,7 @@ index 391a09c52..966938997 100644 if (iprogressupdate != null) { iprogressupdate.a("Saving level"); } -@@ -1002,7 +1011,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1001,7 +1010,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { iprogressupdate.c("Saving chunks"); } @@ -1377,7 +1390,7 @@ index 391a09c52..966938997 100644 // CraftBukkit - ArrayList -> Collection Collection arraylist = chunkproviderserver.a(); Iterator iterator = arraylist.iterator(); -@@ -1014,7 +1025,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1013,7 +1024,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { chunkproviderserver.unload(chunk); } } @@ -1386,7 +1399,7 @@ index 391a09c52..966938997 100644 } } -@@ -1027,6 +1038,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1026,6 +1037,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } protected void a() throws ExceptionWorldConflict { @@ -1394,7 +1407,7 @@ index 391a09c52..966938997 100644 this.checkSession(); WorldServer[] aworldserver = this.server.worldServer; int i = aworldserver.length; -@@ -1056,6 +1068,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1055,6 +1067,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.worldData.e(this.getWorldBorder().i()); this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t()); this.worldMaps.a(); @@ -1403,10 +1416,10 @@ 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 -@@ -1741,6 +1741,7 @@ public final class CraftServer implements Server { +@@ -1727,6 +1727,7 @@ public final class CraftServer implements Server { private final Spigot spigot = new Spigot() { @@ -1414,7 +1427,7 @@ index 587d23dfd..d27e2ce98 100644 @Override public YamlConfiguration getConfig() { -@@ -1748,6 +1749,24 @@ public final class CraftServer implements Server { +@@ -1734,6 +1735,24 @@ public final class CraftServer implements Server { } @Override @@ -1441,10 +1454,10 @@ 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 -@@ -1,173 +0,0 @@ +@@ -1,174 +0,0 @@ -package org.bukkit.craftbukkit; - -import com.google.common.collect.Maps; @@ -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,10 +1677,10 @@ 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 -@@ -39,15 +39,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; +@@ -39,7 +39,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.conversations.Conversation; import org.bukkit.conversations.ConversationAbandonedEvent; import org.bukkit.conversations.ManuallyAbandonedConversationCanceller; @@ -1674,16 +1688,8 @@ 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; -@@ -1595,6 +1589,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + import org.bukkit.craftbukkit.CraftEffect; +@@ -1587,6 +1587,12 @@ 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 @@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither; @@ -1929,5 +1935,5 @@ index c32d44df0..5c2fb0058 100644 } } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch b/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch index 32de5f6428..a38c2cdcd2 100644 --- a/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch +++ b/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch @@ -1,4 +1,4 @@ -From ffac25bb34932ef90c85baca9c77303e9ccf3702 Mon Sep 17 00:00:00 2001 +From fbea6e7aa23f4b7e63d3ad5671c1bc18a1e4189d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 12:45:11 -0600 Subject: [PATCH] Configurable squid spawn ranges @@ -22,18 +22,18 @@ 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 @@ -141,7 +141,7 @@ 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) { -- -2.12.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch index dc122be552..7c53d06b58 100644 --- a/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch @@ -1,4 +1,4 @@ -From 4f7e02a3e570583d2510848d700901e72de644c8 Mon Sep 17 00:00:00 2001 +From 729eb0ea88be715b9a00822f01f963c86361ecd0 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:09:16 -0600 Subject: [PATCH] Configurable baby zombie movement speed @@ -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 @@ -16,7 +16,7 @@ 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); @@ -102,9 +102,9 @@ public class EntityZombie extends EntityMonster { if (this.world != null && !this.world.isClientSide) { AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); @@ -45,5 +45,5 @@ index 497d5593c..897882c97 100644 } -- -2.12.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch index 2e6b356842..98586ca983 100644 --- a/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch @@ -1,4 +1,4 @@ -From 6601ad2f54c73981b4fe6198097e131cb22f75e4 Mon Sep 17 00:00:00 2001 +From a2b70ad6f16f9f9ed468870ddc0e36ad7200ed59 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:24:16 -0600 Subject: [PATCH] Allow nerfed mobs to jump @@ -31,18 +31,18 @@ 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 @@ -44,6 +44,7 @@ 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) { super(world); -@@ -645,6 +646,12 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -641,6 +642,12 @@ public abstract class EntityInsentient extends EntityLiving { // Spigot Start if ( this.fromMobSpawner ) { @@ -56,21 +56,24 @@ 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 -@@ -6,14 +6,17 @@ public class PathfinderGoalFloat extends PathfinderGoal { +@@ -6,6 +6,7 @@ public class PathfinderGoalFloat extends PathfinderGoal { public PathfinderGoalFloat(EntityInsentient entityinsentient) { 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); +@@ -15,10 +16,12 @@ 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 @@ -78,5 +81,5 @@ index e3b405856..2d27aa63a 100644 if (this.a.getRandom().nextFloat() < 0.8F) { this.a.getControllerJump().a(); -- -2.12.1.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0012-Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/0012-Add-configurable-despawn-distances-for-living-entiti.patch index 7888ecdb36..812c737c24 100644 --- a/Spigot-Server-Patches/0012-Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/0012-Add-configurable-despawn-distances-for-living-entiti.patch @@ -1,4 +1,4 @@ -From 71ef92829982f9b99e1b96d8e903a5064341ff03 Mon Sep 17 00:00:00 2001 +From 10fdbe916be252c01a51a6b68695eaa90e5619f1 Mon Sep 17 00:00:00 2001 From: Suddenly Date: Tue, 1 Mar 2016 13:51:54 -0600 Subject: [PATCH] Add configurable despawn distances for living entities @@ -30,10 +30,10 @@ 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 -@@ -624,13 +624,13 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -620,13 +620,13 @@ public abstract class EntityInsentient extends EntityLiving { double d2 = entityhuman.locZ - this.locZ; double d3 = d0 * d0 + d1 * d1 + d2 * d2; @@ -51,5 +51,5 @@ index c23bd2e9b..a9e3b632b 100644 } } -- -2.12.1.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0013-Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/0013-Allow-for-toggling-of-spawn-chunks.patch index e973efb720..172447537a 100644 --- a/Spigot-Server-Patches/0013-Allow-for-toggling-of-spawn-chunks.patch +++ b/Spigot-Server-Patches/0013-Allow-for-toggling-of-spawn-chunks.patch @@ -1,4 +1,4 @@ -From 93cedb6f2ccf3c12457a4f0662bfc01ba6aacdfb Mon Sep 17 00:00:00 2001 +From 63f3013587dc1e8a42ed59e62d6b6bb5225a91dc Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 3 Mar 2016 03:53:43 -0600 Subject: [PATCH] Allow for toggling of spawn chunks @@ -20,10 +20,10 @@ 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 -@@ -198,6 +198,7 @@ public abstract class World implements IBlockAccess { +@@ -200,6 +200,7 @@ public abstract class World implements IBlockAccess { this.getServer().addWorld(this.world); // CraftBukkit end timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings @@ -32,5 +32,5 @@ index a87b37277..edd6c3b5e 100644 this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -- -2.12.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0014-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0014-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 56bf1e5c0b..d1559ce612 100644 --- a/Spigot-Server-Patches/0014-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0014-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -1,4 +1,4 @@ -From c626ab09022ba5bd9efab830624989ecffdcc36a Mon Sep 17 00:00:00 2001 +From 289d49cb724c7f24f635dfb88410a2b490a80629 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 14:14:15 -0600 Subject: [PATCH] Drop falling block and tnt entities at the specified height @@ -23,11 +23,23 @@ 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 +@@ -1745,6 +1745,7 @@ 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 -@@ -80,6 +80,16 @@ public class EntityFallingBlock extends Entity { +@@ -84,6 +84,17 @@ public class EntityFallingBlock extends Entity { } this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ); @@ -35,20 +47,21 @@ 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 -@@ -56,6 +56,13 @@ public class EntityTNTPrimed extends Entity { +@@ -57,6 +57,13 @@ public class EntityTNTPrimed extends Entity { } this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ); @@ -63,5 +76,5 @@ index 0fbdbd69b..fd0735611 100644 this.motY *= 0.9800000190734863D; this.motZ *= 0.9800000190734863D; -- -2.12.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 02bf76a010..7090d1713d 100644 --- a/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0016-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,4 +1,4 @@ -From 8936094d98b21ebe52e725f7c1ac99e196a8822a Mon Sep 17 00:00:00 2001 +From 2648079c107410003372409a96c7ef61f035b661 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -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 @@ -51,7 +51,8 @@ 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 -@@ -1042,7 +1042,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1046,7 +1046,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs } public String getServerModName() { @@ -33,10 +33,10 @@ 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 -@@ -135,7 +135,7 @@ import net.md_5.bungee.api.chat.BaseComponent; +@@ -134,7 +134,7 @@ import net.md_5.bungee.api.chat.BaseComponent; public final class CraftServer implements Server { private static final Player[] EMPTY_PLAYER_ARRAY = new Player[0]; @@ -80,5 +80,5 @@ index 94a3d4237..3ed983cc0 100644 log.log( Level.SEVERE, "------------------------------" ); // -- -2.12.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch index c39bfb4dcd..1f0c6c2d62 100644 --- a/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0017-Player-affects-spawning-API.patch @@ -1,15 +1,15 @@ -From 3cba9d06727dbd8332e08f22fa33572434be2c51 Mon Sep 17 00:00:00 2001 +From 6ca60e1e0afcb2035f962b12d6079ca9a3347d28 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 1 Mar 2016 14:47:52 -0600 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 -@@ -63,6 +63,7 @@ public abstract class EntityHuman extends EntityLiving { - private final ItemCooldown bV; +@@ -65,6 +65,7 @@ public abstract class EntityHuman extends EntityLiving { + private final ItemCooldown bX; @Nullable public EntityFishingHook hookedFish; + public boolean affectsSpawning = true; @@ -17,10 +17,10 @@ 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 -@@ -618,7 +618,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving { } else { EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D); @@ -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 @@ -99,8 +99,7 @@ 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 @@ -52,7 +52,7 @@ public final class SpawnerCreature { @@ -57,10 +57,10 @@ 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 -@@ -2722,7 +2722,7 @@ public abstract class World implements IBlockAccess { +@@ -2724,7 +2724,7 @@ public abstract class World implements IBlockAccess { for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman = (EntityHuman) this.players.get(i); @@ -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 -@@ -1458,6 +1458,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - +@@ -1456,6 +1456,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + return new CraftAdvancementProgress(craft, data, progress); } -+ @Override + public void setAffectsSpawning(boolean affects) { + this.getHandle().affectsSpawning = affects; + } @@ -91,5 +90,5 @@ index b56ae7a36..6509df573 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.12.1.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0019-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0019-Optimize-TileEntity-Ticking.patch index f90f92f752..addf9eab92 100644 --- a/Spigot-Server-Patches/0019-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0019-Optimize-TileEntity-Ticking.patch @@ -1,11 +1,11 @@ -From 25724130e87f1b906d5143058d200b6d04b59e18 Mon Sep 17 00:00:00 2001 +From ca3dd164ec111c629ea4e92778c786d2d9a61ba2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 22:01:19 -0600 Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 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 @@ -8,17 +8,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -36,7 +36,7 @@ index 28a514a64..60452e83b 100644 @@ -190,6 +190,8 @@ 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 @@ -1,15 +1,17 @@ @@ -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 @@ -186,5 +186,5 @@ index 3d61c2d68..586ceaa67 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0020-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0020-Further-improve-server-tick-loop.patch index 9276176547..e41c737ca6 100644 --- a/Spigot-Server-Patches/0020-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0020-Further-improve-server-tick-loop.patch @@ -1,4 +1,4 @@ -From dff249a4a075a2bab36f65251537d6b8882e0768 Mon Sep 17 00:00:00 2001 +From 46d88a1e4205ca1ee13725c24884d9ad9bf6b600 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:09:29 -0600 Subject: [PATCH] Further improve server tick loop @@ -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 -@@ -113,16 +113,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -113,16 +113,12 @@ 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 -@@ -533,12 +529,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -533,12 +529,54 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.isRunning = false; } @@ -93,7 +93,7 @@ index d9e4f1a9f..c4497aaa6 100644 public void run() { try { -@@ -552,24 +590,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -552,24 +590,41 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // Spigot start Arrays.fill( recentTps, 20 ); @@ -147,10 +147,10 @@ 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 -@@ -1738,6 +1738,17 @@ public final class CraftServer implements Server { +@@ -1724,6 +1724,17 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } @@ -210,5 +210,5 @@ index be2e31dea..6d21c3269 100644 return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0021-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0021-Only-refresh-abilities-if-needed.patch index ae44cf8c9e..4196875cab 100644 --- a/Spigot-Server-Patches/0021-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0021-Only-refresh-abilities-if-needed.patch @@ -1,14 +1,14 @@ -From a876defc63064db6b4c54a0af7cc133dd2479aec Mon Sep 17 00:00:00 2001 +From a84b405e20bf60222b6a5f9608c84a3918686512 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:12:03 -0600 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 -@@ -1174,12 +1174,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1161,12 +1161,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { @@ -24,5 +24,5 @@ index 6509df573..87ac74420 100644 @Override -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0023-Entity-Origin-API.patch b/Spigot-Server-Patches/0023-Entity-Origin-API.patch index 50f220d9c8..045f022e4e 100644 --- a/Spigot-Server-Patches/0023-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0023-Entity-Origin-API.patch @@ -1,14 +1,14 @@ -From 1f83e96b7750ff012aa3510df4eba6f2f25efde8 Mon Sep 17 00:00:00 2001 +From c1ba97de870d45dada1e69a8d76ba8e4e0c12429 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 23:45:08 -0600 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 -@@ -147,6 +147,7 @@ public abstract class Entity implements ICommandListener { +@@ -148,6 +148,7 @@ public abstract class Entity implements ICommandListener { public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper @@ -16,7 +16,7 @@ index 14d23556f..313100aed 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -1513,6 +1514,11 @@ public abstract class Entity implements ICommandListener { +@@ -1539,6 +1540,11 @@ public abstract class Entity implements ICommandListener { } } @@ -28,21 +28,21 @@ index 14d23556f..313100aed 100644 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); -@@ -1657,6 +1663,13 @@ public abstract class Entity implements ICommandListener { +@@ -1683,6 +1689,13 @@ public abstract class Entity implements ICommandListener { } // CraftBukkit end + // 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 + } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1681,6 +1694,7 @@ public abstract class Entity implements ICommandListener { +@@ -1707,6 +1720,7 @@ public abstract class Entity implements ICommandListener { protected abstract void b(NBTTagCompound nbttagcompound); @@ -51,10 +51,10 @@ 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 -@@ -247,6 +247,14 @@ public class EntityFallingBlock extends Entity { +@@ -267,6 +267,14 @@ public class EntityFallingBlock extends Entity { this.block = Blocks.SAND.getBlockData(); } @@ -70,10 +70,10 @@ 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 -@@ -108,6 +108,14 @@ public class EntityTNTPrimed extends Entity { +@@ -109,6 +109,14 @@ public class EntityTNTPrimed extends Entity { protected void a(NBTTagCompound nbttagcompound) { this.setFuseTicks(nbttagcompound.getShort("Fuse")); @@ -88,11 +88,23 @@ 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 +@@ -153,6 +153,7 @@ 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 -@@ -1021,6 +1021,12 @@ public abstract class World implements IBlockAccess { +@@ -1023,6 +1023,12 @@ public abstract class World implements IBlockAccess { int j = MathHelper.floor(entity.locZ / 16.0D); boolean flag = entity.attachedToPlayer; @@ -106,10 +118,10 @@ 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 -@@ -711,4 +711,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -728,4 +728,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return spigot; } // Spigot end @@ -155,5 +167,5 @@ index c493c9c0c..93843aa50 100644 + // Paper end } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch index 957f2ce03f..a0e1c203a9 100644 --- a/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0024-Prevent-tile-entity-and-entity-crashes.patch @@ -1,11 +1,11 @@ -From d19627bd77a6f4f3b3360d3ba224224b206344ce Mon Sep 17 00:00:00 2001 +From 7ba47ec34e529b95814c1ffe95d06319411647bc Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:52:34 -0600 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 @@ -175,7 +175,12 @@ public abstract class TileEntity { @@ -23,10 +23,10 @@ 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 -@@ -1446,10 +1446,12 @@ public abstract class World implements IBlockAccess { +@@ -1448,10 +1448,12 @@ public abstract class World implements IBlockAccess { entity.tickTimer.stopTiming(); // Paper } catch (Throwable throwable1) { entity.tickTimer.stopTiming(); @@ -43,8 +43,8 @@ index 39919ab1c..632d5c760 100644 } } -@@ -1512,10 +1514,13 @@ public abstract class World implements IBlockAccess { - ((ITickable) tileentity).F_(); +@@ -1514,10 +1516,13 @@ public abstract class World implements IBlockAccess { + ((ITickable) tileentity).e(); this.methodProfiler.b(); } catch (Throwable throwable2) { - crashreport1 = CrashReport.a(throwable2, "Ticking block entity"); @@ -62,5 +62,5 @@ index 39919ab1c..632d5c760 100644 // Spigot start finally { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch index 64e5cff1dd..857caf88de 100644 --- a/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch @@ -1,4 +1,4 @@ -From 52e6992f765e671f1ed612870e81947d646aca17 Mon Sep 17 00:00:00 2001 +From 145fbb067892a319be146f8d65e5b89de7f1abb2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:58:50 -0600 Subject: [PATCH] Configurable top of nether void damage @@ -20,10 +20,10 @@ 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 -@@ -442,9 +442,15 @@ public abstract class Entity implements ICommandListener { +@@ -444,9 +444,15 @@ public abstract class Entity implements ICommandListener { this.fallDistance *= 0.5F; } @@ -31,7 +31,7 @@ index 313100aed..7feed2995 100644 + // Extracted to own function + /* if (this.locY < -64.0D) { - this.Y(); + this.ac(); } + */ + this.checkAndDoHeightDamage(); @@ -39,7 +39,7 @@ index 313100aed..7feed2995 100644 if (!this.world.isClientSide) { this.setFlag(0, this.fireTicks > 0); -@@ -454,6 +460,18 @@ public abstract class Entity implements ICommandListener { +@@ -456,6 +462,18 @@ public abstract class Entity implements ICommandListener { this.world.methodProfiler.b(); } @@ -55,19 +55,19 @@ index 313100aed..7feed2995 100644 + } + // Paper end + - protected void H() { + protected void I() { if (this.portalCooldown > 0) { --this.portalCooldown; -@@ -510,6 +528,7 @@ public abstract class Entity implements ICommandListener { +@@ -512,6 +530,7 @@ 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 @@ -204,9 +204,15 @@ 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(); @@ -87,5 +87,5 @@ index fd3337d3f..ca1faa41d 100644 int i; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0026-Check-online-mode-before-converting-and-renaming-pla.patch b/Spigot-Server-Patches/0026-Check-online-mode-before-converting-and-renaming-pla.patch index dfa62fd269..8175c621aa 100644 --- a/Spigot-Server-Patches/0026-Check-online-mode-before-converting-and-renaming-pla.patch +++ b/Spigot-Server-Patches/0026-Check-online-mode-before-converting-and-renaming-pla.patch @@ -1,15 +1,15 @@ -From 3119d5d5e0f90c64083736d6665a65950b605149 Mon Sep 17 00:00:00 2001 +From 1370c5a99e145e2ec03f3b39b3d3498b36184a4f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 00:03:55 -0600 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 @@ -167,7 +167,7 @@ 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() ) @@ -18,5 +18,5 @@ index caec56824..30b54a50e 100644 file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); if ( file.exists() ) -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0028-Lighting-Queue.patch b/Spigot-Server-Patches/0028-Lighting-Queue.patch index b17cec7e97..726c2fc9f6 100644 --- a/Spigot-Server-Patches/0028-Lighting-Queue.patch +++ b/Spigot-Server-Patches/0028-Lighting-Queue.patch @@ -1,4 +1,4 @@ -From ddc58c0259cad56358f0e79c327658a407436af5 Mon Sep 17 00:00:00 2001 +From aeebe23ba3a84e1939ee2919198c8ee307b63ce6 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 00:52:31 -0600 Subject: [PATCH] Lighting Queue @@ -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 @@ -33,6 +33,7 @@ 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 @@ -295,6 +295,7 @@ 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 -@@ -721,7 +721,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -721,7 +721,7 @@ 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) { -@@ -782,6 +782,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -782,6 +782,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.methodProfiler.b(); org.spigotmc.WatchdogThread.tick(); // Spigot @@ -225,10 +225,10 @@ 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 -@@ -387,7 +387,7 @@ public abstract class World implements IBlockAccess { +@@ -389,7 +389,7 @@ public abstract class World implements IBlockAccess { } else { if (iblockdata.c() != iblockdata1.c() || iblockdata.d() != iblockdata1.d()) { this.methodProfiler.a("checkLight"); @@ -238,5 +238,5 @@ index 632d5c760..e6e85e7a8 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0029-Configurable-end-credits.patch b/Spigot-Server-Patches/0029-Configurable-end-credits.patch index ee66e7704e..25d33bafcc 100644 --- a/Spigot-Server-Patches/0029-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0029-Configurable-end-credits.patch @@ -1,4 +1,4 @@ -From c5e40e9bfa3083bdbf6c1eb91991e96b585320f5 Mon Sep 17 00:00:00 2001 +From 3044d2ae539fbe4d31af51351181e00ac6aed4ba Mon Sep 17 00:00:00 2001 From: DoctorDark Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits @@ -20,37 +20,26 @@ 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 -@@ -516,6 +516,15 @@ 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 -@@ -525,7 +534,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + 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; +@@ -603,6 +603,7 @@ 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; + } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0031-Generator-Settings.patch b/Spigot-Server-Patches/0031-Generator-Settings.patch index b4cff3740a..e6ced082bb 100644 --- a/Spigot-Server-Patches/0031-Generator-Settings.patch +++ b/Spigot-Server-Patches/0031-Generator-Settings.patch @@ -1,4 +1,4 @@ -From 886b8af6b9e07e9214c61bf0ba100e8d4c5a0ac3 Mon Sep 17 00:00:00 2001 +From 73b4d3a44527decb181748068a02c35cf587593d Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 02:17:54 -0600 Subject: [PATCH] Generator Settings @@ -38,10 +38,10 @@ 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 -@@ -179,7 +179,7 @@ public abstract class BiomeBase { +@@ -176,7 +176,7 @@ public abstract class BiomeBase { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); for (int l1 = 255; l1 >= 0; --l1) { @@ -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 @@ -99,7 +99,7 @@ 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 @@ -26,7 +26,7 @@ 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 @@ -160,32 +160,32 @@ public class ChunkProviderGenerate implements ChunkGenerator { @@ -191,7 +191,7 @@ index 7ba6b9add..776ebd653 100644 for (k1 = 0; k1 < this.s.t; ++k1) { l1 = this.i.nextInt(16) + 8; i2 = this.i.nextInt(256); -@@ -439,23 +439,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { +@@ -443,23 +443,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { public void recreateStructures(Chunk chunk, int i, int j) { if (this.o) { @@ -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 @@ -151,7 +151,10 @@ public class ChunkProviderHell implements ChunkGenerator { @@ -236,7 +236,7 @@ index f9519d7e1..ca64ae067 100644 IBlockData iblockdata2 = chunksnapshot.a(i1, l1, l); if (iblockdata2.getBlock() != null && iblockdata2.getMaterial() != Material.AIR) { -@@ -380,6 +383,6 @@ public class ChunkProviderHell implements ChunkGenerator { +@@ -384,6 +387,6 @@ public class ChunkProviderHell implements ChunkGenerator { } public void recreateStructures(Chunk chunk, int i, int j) { @@ -245,18 +245,10 @@ 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 -@@ -96,6 +96,7 @@ 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; - } -@@ -124,6 +125,7 @@ public abstract class StructureGenerator extends WorldGenBase { +@@ -128,6 +128,7 @@ public abstract class StructureGenerator extends WorldGenBase { } public boolean a(World world, BlockPosition blockposition) { @@ -265,5 +257,5 @@ index fb350c408..9c1605b14 100644 ObjectIterator objectiterator = this.c.values().iterator(); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0032-Optimize-explosions.patch b/Spigot-Server-Patches/0032-Optimize-explosions.patch index f03334a07a..21512f9b10 100644 --- a/Spigot-Server-Patches/0032-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0032-Optimize-explosions.patch @@ -1,4 +1,4 @@ -From 000f618c3793428ef5abd2cb979e9241f44fcc5a Mon Sep 17 00:00:00 2001 +From c0220cd1bc53c8ddbdc7a4574dcef456037ce806 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 11:59:48 -0600 Subject: [PATCH] Optimize explosions @@ -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 @@ -130,7 +130,7 @@ 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 -@@ -886,6 +886,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -886,6 +886,7 @@ 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 @@ -15,6 +15,7 @@ import javax.annotation.Nullable; @@ -147,7 +147,7 @@ index e6e85e7a8..5f7590e11 100644 import java.util.Map; import org.bukkit.Bukkit; import org.bukkit.block.BlockState; -@@ -134,6 +135,7 @@ public abstract class World implements IBlockAccess { +@@ -136,6 +137,7 @@ public abstract class World implements IBlockAccess { private org.spigotmc.TickLimiter entityLimiter; private org.spigotmc.TickLimiter tileLimiter; private int tileTickPosition; @@ -156,5 +156,5 @@ index e6e85e7a8..5f7590e11 100644 public CraftWorld getWorld() { return this.world; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0036-Add-player-view-distance-API.patch b/Spigot-Server-Patches/0036-Add-player-view-distance-API.patch index 866afc42e7..260d34998c 100644 --- a/Spigot-Server-Patches/0036-Add-player-view-distance-API.patch +++ b/Spigot-Server-Patches/0036-Add-player-view-distance-API.patch @@ -1,14 +1,14 @@ -From 5ef6465bc8b487a3f06e10963e579fde91f5251d Mon Sep 17 00:00:00 2001 +From a3a19d58d3ed3baa6550ad32073c2478eba08ef7 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 14:35:27 -0600 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 -@@ -59,6 +59,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -66,6 +66,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean f; public int ping; public boolean viewingCredits; @@ -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 @@ -47,7 +47,7 @@ public class PlayerChunkMap { @@ -194,10 +194,10 @@ 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 -@@ -1469,6 +1469,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1466,6 +1466,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().affectsSpawning; } @@ -215,5 +215,5 @@ index 87ac74420..16dcaba3f 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0037-Disable-explosion-knockback.patch b/Spigot-Server-Patches/0037-Disable-explosion-knockback.patch index 56ab5cfaea..8700319ba8 100644 --- a/Spigot-Server-Patches/0037-Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/0037-Disable-explosion-knockback.patch @@ -1,4 +1,4 @@ -From 91cdc4554cebe5d6b7ae636e7768ce5fe8365855 Mon Sep 17 00:00:00 2001 +From 7197a213cc0ee3f96c122d16a7f3c9fc46cc75d6 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:48:03 -0600 Subject: [PATCH] Disable explosion knockback @@ -19,10 +19,10 @@ 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 -@@ -893,12 +893,14 @@ public abstract class EntityLiving extends Entity { +@@ -900,6 +900,7 @@ public abstract class EntityLiving extends Entity { } } @@ -30,24 +30,25 @@ 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 { +@@ -916,6 +917,7 @@ 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); } -@@ -922,6 +924,8 @@ public abstract class EntityLiving extends Entity { +@@ -939,6 +941,8 @@ public abstract class EntityLiving extends Entity { } } + 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 @@ -146,7 +146,7 @@ public class Explosion { @@ -69,5 +70,5 @@ index 49fc95e35..d7bc6a0ed 100644 } } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0038-Disable-thunder.patch b/Spigot-Server-Patches/0038-Disable-thunder.patch index 355a37f549..d25def33ff 100644 --- a/Spigot-Server-Patches/0038-Disable-thunder.patch +++ b/Spigot-Server-Patches/0038-Disable-thunder.patch @@ -1,4 +1,4 @@ -From 05106693177445d76ea1325231181bd3404e6da1 Mon Sep 17 00:00:00 2001 +From 27c8181330a79124a88ca63d871b0cc6dbb5569e Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:52:43 -0600 Subject: [PATCH] Disable thunder @@ -19,10 +19,10 @@ 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 -@@ -428,7 +428,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -437,7 +437,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { int l; BlockPosition blockposition; @@ -33,5 +33,5 @@ index 966938997..ce087eb7d 100644 l = this.l >> 2; blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0039-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0039-Disable-ice-and-snow.patch index 869ec2096d..6d2431b2c3 100644 --- a/Spigot-Server-Patches/0039-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0039-Disable-ice-and-snow.patch @@ -1,4 +1,4 @@ -From 84e563f38e936dd47f7390190f080b89f445b76f Mon Sep 17 00:00:00 2001 +From ddfcd21f06dee67cad8b9a3e5357b45188b26b6d Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:57:24 -0600 Subject: [PATCH] Disable ice and snow @@ -19,10 +19,10 @@ 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 -@@ -451,7 +451,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -460,7 +460,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } this.methodProfiler.c("iceandsnow"); @@ -32,5 +32,5 @@ index ce087eb7d..ac8dc5f2f 100644 l = this.l >> 2; blockposition = this.p(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0043-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0043-Configurable-container-update-tick-rate.patch index d417acfc14..0e52b1a298 100644 --- a/Spigot-Server-Patches/0043-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0043-Configurable-container-update-tick-rate.patch @@ -1,4 +1,4 @@ -From 154ee18ea861801364d933168a27c5fcda6d6459 Mon Sep 17 00:00:00 2001 +From 9f3c6605d96924c379901e55a92da9afe5aa0fbf Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 23:34:44 -0600 Subject: [PATCH] Configurable container update tick rate @@ -19,10 +19,10 @@ 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 -@@ -68,6 +68,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -75,6 +75,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.viewDistance = viewDistance; } // Paper end @@ -30,7 +30,7 @@ index b830f833f..bf3e46c35 100644 // CraftBukkit start public String displayName; -@@ -231,7 +232,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -266,7 +267,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { --this.noDamageTicks; } @@ -45,5 +45,5 @@ index b830f833f..bf3e46c35 100644 this.closeInventory(); this.activeContainer = this.defaultContainer; -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0045-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0045-Disable-spigot-tick-limiters.patch index f2c6ede52b..d1bdbe8460 100644 --- a/Spigot-Server-Patches/0045-Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/0045-Disable-spigot-tick-limiters.patch @@ -1,14 +1,14 @@ -From bf5743f31df9d1cd46c219f13808a0063a09e6b0 Mon Sep 17 00:00:00 2001 +From 6a671d7b63704d31fbe9e8516894678c7d38d63c Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 23:45:17 -0600 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 -@@ -1423,10 +1423,10 @@ public abstract class World implements IBlockAccess { +@@ -1425,10 +1425,10 @@ public abstract class World implements IBlockAccess { // CraftBukkit start - Use field for loop variable co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper int entitiesThisCycle = 0; @@ -23,7 +23,7 @@ index 5f7590e11..a1cdcd71b 100644 tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0; entity = (Entity) this.entityList.get(this.tickPosition); // CraftBukkit end -@@ -1492,9 +1492,7 @@ public abstract class World implements IBlockAccess { +@@ -1494,9 +1494,7 @@ public abstract class World implements IBlockAccess { // Spigot start // Iterator iterator = this.tileEntityListTick.iterator(); int tilesThisCycle = 0; @@ -35,5 +35,5 @@ index 5f7590e11..a1cdcd71b 100644 TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); // Spigot start -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0047-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0047-Add-PlayerInitialSpawnEvent.patch index dd0cd845af..5d4402e4da 100644 --- a/Spigot-Server-Patches/0047-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0047-Add-PlayerInitialSpawnEvent.patch @@ -1,4 +1,4 @@ -From 5f5ff59c74f2094741e3cf0f5c615d34d2231005 Mon Sep 17 00:00:00 2001 +From 15eda5f02abe75614df683675329df4080bf6394 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Thu, 3 Mar 2016 00:09:38 -0600 Subject: [PATCH] Add PlayerInitialSpawnEvent @@ -6,10 +6,10 @@ 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 -@@ -104,6 +104,21 @@ public abstract class PlayerList { +@@ -106,6 +106,21 @@ public abstract class PlayerList { } // CraftBukkit end @@ -32,5 +32,5 @@ index 80bf61164..59c7e78b8 100644 entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); String s1 = "local"; -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch index ed38f7e4b5..52a1c2e181 100644 --- a/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0049-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From c121bda3726ac920a54e7d3462c86cc16e114a8c Mon Sep 17 00:00:00 2001 +From 9fc404dab5a61059531f51be43e3ea0a7811a554 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:17:12 -0600 Subject: [PATCH] Ensure commands are not ran async @@ -14,10 +14,10 @@ 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 -@@ -1268,6 +1268,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1279,6 +1279,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } if (!async && s.startsWith("/")) { @@ -48,10 +48,10 @@ 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 -@@ -647,6 +647,29 @@ public final class CraftServer implements Server { +@@ -639,6 +639,29 @@ public final class CraftServer implements Server { Validate.notNull(sender, "Sender cannot be null"); Validate.notNull(commandLine, "CommandLine cannot be null"); @@ -82,5 +82,5 @@ index 0f77d0674..5302bb283 100644 return true; } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0050-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0050-All-chunks-are-slime-spawn-chunks-toggle.patch index 1bb8773509..5113cea57c 100644 --- a/Spigot-Server-Patches/0050-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0050-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -1,4 +1,4 @@ -From 6b81f8f28de16733bff9a2d833a2397f6af7fe9e Mon Sep 17 00:00:00 2001 +From 95af696519a3738b8dd148142fecc34108d3ef7b Mon Sep 17 00:00:00 2001 From: vemacs Date: Thu, 3 Mar 2016 01:19:22 -0600 Subject: [PATCH] All chunks are slime spawn chunks toggle @@ -19,19 +19,20 @@ 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 -@@ -252,7 +252,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { - return super.cM(); +@@ -251,8 +251,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { + 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(); } } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0051-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0051-Optimize-Pathfinding.patch index ddcf2d546f..8aaf8ca96a 100644 --- a/Spigot-Server-Patches/0051-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0051-Optimize-Pathfinding.patch @@ -1,4 +1,4 @@ -From 3cca34b5a315231f82eaf848a700b684e4263560 Mon Sep 17 00:00:00 2001 +From 185916cee82574977ec5fd0b7a038cdcfb3c5317 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:02:07 -0600 Subject: [PATCH] Optimize Pathfinding @@ -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 @@ -118,10 +118,26 @@ public abstract class NavigationAbstract { @@ -38,14 +38,14 @@ index 4f28b8819..43b2be505 100644 public boolean a(@Nullable PathEntity pathentity, double d0) { if (pathentity == null) { -@@ -255,6 +271,7 @@ public abstract class NavigationAbstract { +@@ -256,6 +272,7 @@ public abstract class NavigationAbstract { } - public void o() { + public void p() { + this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0053-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0053-Expose-server-CommandMap.patch index d6b7155d96..eb213b3962 100644 --- a/Spigot-Server-Patches/0053-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0053-Expose-server-CommandMap.patch @@ -1,14 +1,14 @@ -From bf934f8ce2b8aed42e8412904cf5bd84f5163e3d Mon Sep 17 00:00:00 2001 +From f8e285f87b4297e3d5db10f6192c59c69b44b9cd Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 3 Mar 2016 02:15:57 -0600 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 -@@ -1567,6 +1567,7 @@ public final class CraftServer implements Server { +@@ -1545,6 +1545,7 @@ public final class CraftServer implements Server { return helpMap; } @@ -17,5 +17,5 @@ index 5302bb283..cab671d68 100644 return commandMap; } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch index 7f09037aba..33f0d9cf56 100644 --- a/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0055-Player-Tab-List-and-Title-APIs.patch @@ -1,4 +1,4 @@ -From 1de05f6089976c4332bb594dfcae72d598747e42 Mon Sep 17 00:00:00 2001 +From cbcc5dfe43b8a0f3e379ef3deb74d1fe79713850 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 02:32:10 -0600 Subject: [PATCH] Player Tab List and Title APIs @@ -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 @@ -1,5 +1,6 @@ @@ -88,7 +88,7 @@ index c86a48070..0df01186f 100644 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -158,6 +159,85 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -166,6 +167,85 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } @@ -175,5 +175,5 @@ index c86a48070..0df01186f 100644 public String getDisplayName() { return getHandle().displayName; -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0057-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0057-Change-implementation-of-tile-entity-removal-list.patch index 414cc51e04..f7ec45e1a3 100644 --- a/Spigot-Server-Patches/0057-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0057-Change-implementation-of-tile-entity-removal-list.patch @@ -1,17 +1,17 @@ -From 19528dbbeee2a72cb791ff414a47e84fd9e30efb Mon Sep 17 00:00:00 2001 +From be4684520ec4356ba4564281649d047f21d8e4a3 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:39:54 -0600 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 -@@ -121,10 +121,10 @@ public abstract class Entity implements ICommandListener { - private static final DataWatcherObject aB = DataWatcher.a(Entity.class, DataWatcherRegistry.h); +@@ -122,10 +122,10 @@ public abstract class Entity implements ICommandListener { 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 @@ -30,6 +30,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; @@ -53,7 +53,7 @@ index a1cdcd71b..354a7309b 100644 public final List players = Lists.newArrayList(); public final List j = Lists.newArrayList(); protected final IntHashMap entitiesById = new IntHashMap(); -@@ -1394,20 +1399,20 @@ public abstract class World implements IBlockAccess { +@@ -1396,20 +1401,20 @@ public abstract class World implements IBlockAccess { this.entityList.removeAll(this.f); int j; @@ -84,5 +84,5 @@ index a1cdcd71b..354a7309b 100644 this.f.clear(); this.l(); -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0059-Add-velocity-warnings.patch b/Spigot-Server-Patches/0059-Add-velocity-warnings.patch index 5020c623b2..262b20b20d 100644 --- a/Spigot-Server-Patches/0059-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0059-Add-velocity-warnings.patch @@ -1,14 +1,14 @@ -From c310ea8c337901ad0bfa65949f78a0716a7fd0e0 Mon Sep 17 00:00:00 2001 +From 3634e6fefd10b173ebb5bd2c4f66e21c42090fbb Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:48:12 -0600 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 -@@ -173,6 +173,7 @@ public final class CraftServer implements Server { +@@ -172,6 +172,7 @@ public final class CraftServer implements Server { private final UUID invalidUserUUID = UUID.nameUUIDFromBytes("InvalidUsername".getBytes(Charsets.UTF_8)); private final List playerView; public int reloadCount; @@ -17,10 +17,10 @@ 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 -@@ -229,6 +229,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -237,6 +237,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } public void setVelocity(Vector vel) { @@ -58,5 +58,5 @@ index 3ed983cc0..6384d50e7 100644 log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().primaryThread.getId(), Integer.MAX_VALUE ), log ); -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0060-Fix-inter-world-teleportation-glitches.patch b/Spigot-Server-Patches/0060-Fix-inter-world-teleportation-glitches.patch index c116a19892..f90dee74a0 100644 --- a/Spigot-Server-Patches/0060-Fix-inter-world-teleportation-glitches.patch +++ b/Spigot-Server-Patches/0060-Fix-inter-world-teleportation-glitches.patch @@ -1,4 +1,4 @@ -From c91c1828836d0c7465029ed20177dcb79f267005 Mon Sep 17 00:00:00 2001 +From 7c20e7de295ba750b809d3069615637e6d5d337c Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Thu, 3 Mar 2016 02:50:31 -0600 Subject: [PATCH] Fix inter-world teleportation glitches @@ -25,10 +25,10 @@ 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 -@@ -579,7 +579,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -587,7 +587,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.playerConnection.teleport(to); } else { @@ -39,5 +39,5 @@ index 0df01186f..88fcadbfd 100644 return true; } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch index 46f17774c3..5f3d024ca1 100644 --- a/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From cbc43c201ce24ad2ba92a6720ec15fade9c971ef Mon Sep 17 00:00:00 2001 +From f886b587c1e143d75dd7495dca68cde2e3175d1f Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -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 @@ -1,5 +1,6 @@ @@ -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 @@ -12,6 +12,7 @@ import java.util.Iterator; @@ -144,17 +144,18 @@ 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 -@@ -1,5 +1,6 @@ +@@ -1,5 +1,7 @@ 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; -@@ -361,6 +362,7 @@ public class NameReferencingFileConverter { + import com.google.common.collect.Lists; +@@ -361,6 +363,7 @@ public class NameReferencingFileConverter { root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1)); } catch (Exception exception) { exception.printStackTrace(); @@ -162,7 +163,7 @@ index 016c64e82..2ff8a6da0 100644 } if (root != null) { -@@ -374,6 +376,7 @@ public class NameReferencingFileConverter { +@@ -374,6 +377,7 @@ public class NameReferencingFileConverter { NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2)); } catch (Exception exception) { exception.printStackTrace(); @@ -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 @@ -1,5 +1,6 @@ @@ -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 @@ -1,5 +1,6 @@ @@ -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 @@ -7,6 +7,7 @@ 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 @@ -1,5 +1,7 @@ @@ -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 @@ -1,5 +1,7 @@ @@ -301,9 +302,9 @@ 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; -@@ -1454,8 +1456,10 @@ public abstract class World implements IBlockAccess { +@@ -1456,8 +1458,10 @@ public abstract class World implements IBlockAccess { } catch (Throwable throwable1) { entity.tickTimer.stopTiming(); // Paper start - Prevent tile entity and entity crashes @@ -315,7 +316,7 @@ index 354a7309b..cc7369e52 100644 entity.dead = true; continue; // Paper end -@@ -1520,8 +1524,10 @@ public abstract class World implements IBlockAccess { +@@ -1522,8 +1526,10 @@ public abstract class World implements IBlockAccess { this.methodProfiler.b(); } catch (Throwable throwable2) { // Paper start - Prevent tile entity and entity crashes @@ -372,5 +373,5 @@ index 9952b64be..e30cfb7b7 100644 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0063-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0063-Disable-Scoreboards-for-non-players-by-default.patch index 4e8c04d389..8a69ea6a4c 100644 --- a/Spigot-Server-Patches/0063-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0063-Disable-Scoreboards-for-non-players-by-default.patch @@ -1,4 +1,4 @@ -From 60f5daf8819357295a0fe9cbf2c9e6eaed5832d3 Mon Sep 17 00:00:00 2001 +From fe118acf4eb8ef1aa3a14ff4679bbec755960ec7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 8 Mar 2016 23:25:45 -0500 Subject: [PATCH] Disable Scoreboards for non players by default @@ -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 @@ -492,6 +492,7 @@ public class CommandScoreboard extends CommandAbstract { @@ -33,21 +33,21 @@ 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 -@@ -2047,6 +2047,7 @@ public abstract class Entity implements ICommandListener { +@@ -2074,6 +2074,7 @@ 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()); } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch index e570c71530..0c0a4d9b84 100644 --- a/Spigot-Server-Patches/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -1,28 +1,11 @@ -From b8425c39d7e6296671d9ddc5862172ab9da70d57 Mon Sep 17 00:00:00 2001 +From 6d78130c5cdd3c5e947ca2f4cd3c2c4bc9eff7c3 Mon Sep 17 00:00:00 2001 From: mrapple 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 -@@ -1380,10 +1380,12 @@ 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 @@ -572,4 +572,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -33,15 +16,15 @@ 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 } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch index 0c658d1092..07548cc5be 100644 --- a/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0065-Complete-resource-pack-API.patch @@ -1,14 +1,14 @@ -From 258b0dd3501ba87edaadf75dc2bd065a29753105 Mon Sep 17 00:00:00 2001 +From 276acf46a94df17de9758755ef9aee7b7933c0e2 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 4 Apr 2015 23:17:52 -0400 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 -@@ -1029,7 +1029,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1040,7 +1040,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit start public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) { PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.x()); @@ -23,10 +23,10 @@ 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 -@@ -74,6 +74,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -82,6 +82,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double health = 20; private boolean scaledHealth = false; private double healthScale = 20; @@ -37,7 +37,7 @@ index 88fcadbfd..dd8380f71 100644 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1560,6 +1564,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1557,6 +1561,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ((WorldServer) getHandle().world).getPlayerChunkMap().updateViewDistance(getHandle(), viewDistance); } @@ -71,5 +71,5 @@ index 88fcadbfd..dd8380f71 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch index 5c61c385c6..65b19cc300 100644 --- a/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch @@ -1,4 +1,4 @@ -From 6faebb0cebf9a14b2b752145de89394a16604e53 Mon Sep 17 00:00:00 2001 +From 927dcc40693024aad07e9335f4f993d23d0f1e4e Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 4 Mar 2016 18:18:37 -0600 Subject: [PATCH] Chunk save queue improvements @@ -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 -@@ -12,14 +12,17 @@ import java.util.Map; +@@ -12,14 +12,17 @@ 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 @@ -39,11 +39,15 @@ public class FileIOThread implements Runnable { @@ -163,5 +163,5 @@ index acfdd52dc..fdbaf5fbd 100644 if (this.b.isEmpty()) { -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0068-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0068-Default-loading-permissions.yml-before-plugins.patch index 69ac736b4a..70ff7cf225 100644 --- a/Spigot-Server-Patches/0068-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0068-Default-loading-permissions.yml-before-plugins.patch @@ -1,4 +1,4 @@ -From 0c3c5d0949ca3e6635a5935f5e9cb162b6e28fa7 Mon Sep 17 00:00:00 2001 +From bd91198bc1c3e488aaa7eacedf84b180050fde59 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 13:17:38 -0400 Subject: [PATCH] Default loading permissions.yml before plugins @@ -30,10 +30,10 @@ 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 -@@ -318,6 +318,7 @@ public final class CraftServer implements Server { +@@ -317,6 +317,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { helpMap.clear(); helpMap.initializeGeneralTopics(); @@ -41,7 +41,7 @@ index 28da39cbd..9df6c0ebb 100644 } Plugin[] plugins = pluginManager.getPlugins(); -@@ -335,7 +336,7 @@ public final class CraftServer implements Server { +@@ -334,7 +335,7 @@ public final class CraftServer implements Server { setVanillaCommands(false); // Spigot end commandMap.registerServerAliases(); @@ -51,5 +51,5 @@ index 28da39cbd..9df6c0ebb 100644 CraftDefaultPermissions.registerCorePermissions(); helpMap.initializeCommands(); -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0069-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0069-Allow-Reloading-of-Custom-Permissions.patch index 95e3241f43..3e1bc48bf7 100644 --- a/Spigot-Server-Patches/0069-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0069-Allow-Reloading-of-Custom-Permissions.patch @@ -1,4 +1,4 @@ -From 1b592b3b573635540cf12d730926ede918b22e19 Mon Sep 17 00:00:00 2001 +From 5c4d9a3b11c3a72967d23e94299074761a4fce81 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 18 Mar 2016 03:30:17 -0400 Subject: [PATCH] Allow Reloading of Custom Permissions @@ -6,10 +6,10 @@ 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 -@@ -1827,4 +1827,21 @@ public final class CraftServer implements Server { +@@ -1813,4 +1813,21 @@ public final class CraftServer implements Server { { return spigot; } @@ -32,5 +32,5 @@ index 9df6c0ebb..e77307c35 100644 + // Paper end } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0070-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0070-Remove-Metadata-on-reload.patch index 5e4a8d6408..42e72ac6ba 100644 --- a/Spigot-Server-Patches/0070-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0070-Remove-Metadata-on-reload.patch @@ -1,4 +1,4 @@ -From 6ad5adc9ed459e196fc415dba3914509def9b240 Mon Sep 17 00:00:00 2001 +From d4673f5e5b1a04e2bef7bcbf696030a11d663625 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 13:50:14 -0400 Subject: [PATCH] Remove Metadata on reload @@ -7,10 +7,10 @@ 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 -@@ -741,6 +741,14 @@ public final class CraftServer implements Server { +@@ -733,6 +733,14 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } @@ -26,5 +26,5 @@ index e77307c35..4d761d32a 100644 commandMap.clearCommands(); resetRecipes(); -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0071-Undead-horse-leashing.patch b/Spigot-Server-Patches/0071-Undead-horse-leashing.patch index aa718954ef..57e050498c 100644 --- a/Spigot-Server-Patches/0071-Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/0071-Undead-horse-leashing.patch @@ -1,4 +1,4 @@ -From 1e3c4136cd2e9eec214fb9b730c3a01e486d841c Mon Sep 17 00:00:00 2001 +From 0b2c23e0f9ef9496c70ffc151913ad91f1fd1cfe Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 14:19:19 -0400 Subject: [PATCH] Undead horse leashing @@ -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 @@ -115,7 +115,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven @@ -31,7 +31,7 @@ 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) { -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch index 53c1e6c930..a43aaeb560 100644 --- a/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0073-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From 96ff410272199eb91bc1607e2b57ceaa9470b610 Mon Sep 17 00:00:00 2001 +From 15898664587209c5044cc40622c9079734bbbb17 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -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 @@ -4,6 +4,7 @@ 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 @@ -6,13 +6,8 @@ import java.lang.annotation.RetentionPolicy; @@ -181,7 +181,7 @@ index 9d0c05cd0..ab50ee92e 100644 import java.util.logging.Level; import java.util.logging.Logger; import net.minecraft.server.NBTCompressedStreamTools; -@@ -225,7 +228,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -226,7 +229,7 @@ class CraftMetaItem implements ItemMeta, Repairable { private String displayName; private String locName; private List lore; @@ -190,7 +190,7 @@ index 9d0c05cd0..ab50ee92e 100644 private int repairCost; private int hideFlag; private boolean unbreakable; -@@ -233,7 +236,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -234,7 +237,7 @@ class CraftMetaItem implements ItemMeta, Repairable { private static final Set HANDLED_TAGS = Sets.newHashSet(); private NBTTagCompound internalTag; @@ -199,7 +199,7 @@ index 9d0c05cd0..ab50ee92e 100644 CraftMetaItem(CraftMetaItem meta) { if (meta == null) { -@@ -248,7 +251,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -249,7 +252,7 @@ class CraftMetaItem implements ItemMeta, Repairable { } if (meta.enchantments != null) { // Spigot @@ -208,7 +208,7 @@ index 9d0c05cd0..ab50ee92e 100644 } this.repairCost = meta.repairCost; -@@ -469,13 +472,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -470,13 +473,13 @@ class CraftMetaItem implements ItemMeta, Repairable { } } @@ -224,7 +224,7 @@ index 9d0c05cd0..ab50ee92e 100644 for (int i = 0; i < ench.size(); i++) { int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT); -@@ -545,13 +548,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -546,13 +549,13 @@ class CraftMetaItem implements ItemMeta, Repairable { void deserializeInternal(NBTTagCompound tag) { } @@ -240,7 +240,7 @@ index 9d0c05cd0..ab50ee92e 100644 for (Map.Entry entry : ench.entrySet()) { Enchantment enchantment = Enchantment.getByName(entry.getKey().toString()); -@@ -695,12 +698,12 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -696,12 +699,12 @@ class CraftMetaItem implements ItemMeta, Repairable { } public Map getEnchants() { @@ -255,7 +255,7 @@ index 9d0c05cd0..ab50ee92e 100644 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -870,7 +873,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -871,7 +874,7 @@ class CraftMetaItem implements ItemMeta, Repairable { clone.lore = new ArrayList(this.lore); } if (this.enchantments != null) { @@ -264,7 +264,7 @@ index 9d0c05cd0..ab50ee92e 100644 } clone.hideFlag = this.hideFlag; clone.unbreakable = this.unbreakable; -@@ -1027,6 +1030,23 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -1029,6 +1032,23 @@ class CraftMetaItem implements ItemMeta, Repairable { } } @@ -289,5 +289,5 @@ index 9d0c05cd0..ab50ee92e 100644 private final Spigot spigot = new Spigot() { -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0075-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0075-Add-World-Util-Methods.patch index 47e7307023..827394071f 100644 --- a/Spigot-Server-Patches/0075-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0075-Add-World-Util-Methods.patch @@ -1,15 +1,36 @@ -From e6cab2b2737495bda0da7f5bea283749cf2d99be Mon Sep 17 00:00:00 2001 +From 0a7c4b8b28a8d72061bbfc35c2aeb0a9bc05674f Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 20:16:03 -0400 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 +@@ -580,6 +580,7 @@ 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 -@@ -152,6 +152,12 @@ public abstract class World implements IBlockAccess { +@@ -76,7 +76,7 @@ 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; +@@ -154,6 +154,12 @@ public abstract class World implements IBlockAccess { return (CraftServer) Bukkit.getServer(); } @@ -22,7 +43,7 @@ index cc7369e52..1d2d174e8 100644 public Chunk getChunkIfLoaded(int x, int z) { return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z); } -@@ -682,6 +688,41 @@ public abstract class World implements IBlockAccess { +@@ -684,10 +690,46 @@ public abstract class World implements IBlockAccess { } } @@ -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,7 +85,12 @@ index cc7369e52..1d2d174e8 100644 public int getLightLevel(BlockPosition blockposition) { return this.c(blockposition, true); } -@@ -801,6 +842,27 @@ public abstract class World implements IBlockAccess { + ++ 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()) { +@@ -803,6 +845,27 @@ public abstract class World implements IBlockAccess { return this.worldProvider.o()[this.getLightLevel(blockposition)]; } @@ -93,5 +119,5 @@ index cc7369e52..1d2d174e8 100644 // CraftBukkit start - tree generation if (captureTreeGeneration) { -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch index c8eec49f6c..1188287029 100644 --- a/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0076-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From ca1b25eea56895788212adb3ecb23dedc8ae132c Mon Sep 17 00:00:00 2001 +From 4db1c6925294438d675336f3f9193cb7f6589de5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 21:22:56 -0400 Subject: [PATCH] Optimized Light Level Comparisons @@ -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 @@ -118,17 +118,17 @@ 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 @@ -178,7 +178,7 @@ public class EntityZombie extends EntityMonster { @@ -131,5 +131,5 @@ index 897882c97..970fabf71 100644 if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) { this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0078-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0078-Custom-replacement-for-eaten-items.patch index 4893c0baf7..bad27cb843 100644 --- a/Spigot-Server-Patches/0078-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0078-Custom-replacement-for-eaten-items.patch @@ -1,19 +1,19 @@ -From c267a846efc3860d0dd8c2664eb5363fcf2c2f01 Mon Sep 17 00:00:00 2001 +From 8d2c7044a378483beaf90ef87cbd0ecdb5f92215 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 21 Jun 2015 15:07:20 -0400 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 -@@ -2323,12 +2323,13 @@ public abstract class EntityLiving extends Entity { +@@ -2369,12 +2369,13 @@ public abstract class EntityLiving extends Entity { 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) { @@ -23,7 +23,7 @@ index 247224117..9cb3b22fb 100644 world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -2343,9 +2344,21 @@ public abstract class EntityLiving extends Entity { +@@ -2389,9 +2390,21 @@ public abstract class EntityLiving extends Entity { itemstack = this.activeItem.a(this.world, this); } @@ -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)) { @@ -46,5 +46,5 @@ index 247224117..9cb3b22fb 100644 } -- -2.12.2.windows.2 +2.13.0 diff --git a/Spigot-Server-Patches/0079-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0079-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 72be8681f4..315635fcac 100644 --- a/Spigot-Server-Patches/0079-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0079-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -1,14 +1,14 @@ -From cd0818fe9a15de0585fe4ad9816f44521361de2c Mon Sep 17 00:00:00 2001 +From 3d32a01b2bdddf62287fb6e4d45db50f4392299b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 27 Sep 2015 01:18:02 -0400 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 -@@ -481,7 +481,13 @@ public abstract class EntityLiving extends Entity { +@@ -482,7 +482,13 @@ public abstract class EntityLiving extends Entity { } public void a(NBTTagCompound nbttagcompound) { @@ -23,7 +23,7 @@ index 9cb3b22fb..c70f14a15 100644 if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) { GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10)); } -@@ -780,6 +786,10 @@ public abstract class EntityLiving extends Entity { +@@ -785,6 +791,10 @@ public abstract class EntityLiving extends Entity { } public void setHealth(float f) { @@ -34,7 +34,7 @@ index 9cb3b22fb..c70f14a15 100644 // CraftBukkit start - Handle scaled health if (this instanceof EntityPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); -@@ -2211,7 +2221,7 @@ public abstract class EntityLiving extends Entity { +@@ -2257,7 +2267,7 @@ public abstract class EntityLiving extends Entity { } public void setAbsorptionHearts(float f) { @@ -44,10 +44,10 @@ 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 -@@ -1398,6 +1398,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1385,6 +1385,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { @@ -56,5 +56,5 @@ index dd8380f71..0a9e8b9cd 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0084-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0084-Use-a-Shared-Random-for-Entities.patch index 892ec3a2e1..35fe53692c 100644 --- a/Spigot-Server-Patches/0084-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0084-Use-a-Shared-Random-for-Entities.patch @@ -1,4 +1,4 @@ -From af92277b1e36fec281d2486e1b8122f45b1b38b0 Mon Sep 17 00:00:00 2001 +From 973464436acb53d2f606b3007faf0bf176912a26 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Mar 2016 00:33:47 -0400 Subject: [PATCH] Use a Shared Random for Entities @@ -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 @@ -46,6 +46,7 @@ public abstract class Entity implements ICommandListener { @@ -17,15 +17,15 @@ index be54c807b..42bd79b10 100644 static boolean isLevelAtLeast(NBTTagCompound tag, int level) { return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } -@@ -163,7 +164,7 @@ public abstract class Entity implements ICommandListener { - this.width = 0.6F; +@@ -165,7 +166,7 @@ public abstract class Entity implements ICommandListener { this.length = 1.8F; this.ax = 1; + this.ay = 1.0F; - this.random = new Random(); + this.random = SHARED_RANDOM; // Paper this.fireTicks = -this.getMaxFireTicks(); this.justCreated = true; this.uniqueID = MathHelper.a(this.random); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0085-Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/0085-Don-t-teleport-dead-entities.patch index e362281189..df28a8a560 100644 --- a/Spigot-Server-Patches/0085-Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/0085-Don-t-teleport-dead-entities.patch @@ -1,4 +1,4 @@ -From 9a7b6ab52a15652e1563cfd5517ccd2e3d88257e Mon Sep 17 00:00:00 2001 +From d21c30d407d2f865c3bed78c6a195302b44fadd4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Mar 2016 00:55:23 -0400 Subject: [PATCH] Don't teleport dead entities @@ -7,10 +7,10 @@ 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 -@@ -2317,7 +2317,7 @@ public abstract class Entity implements ICommandListener { +@@ -2344,7 +2344,7 @@ public abstract class Entity implements ICommandListener { } public Entity teleportTo(Location exit, boolean portal) { @@ -20,5 +20,5 @@ index 42bd79b10..70a431a63 100644 WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle(); int i = worldserver1.dimension; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0087-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0087-Configurable-spawn-chances-for-skeleton-horses.patch index e8c49f3fae..95e25d4df8 100644 --- a/Spigot-Server-Patches/0087-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0087-Configurable-spawn-chances-for-skeleton-horses.patch @@ -1,4 +1,4 @@ -From 80c0b91baf607f0b1625abbd20588b4be44c80c8 Mon Sep 17 00:00:00 2001 +From d7b87a048189cfd45f61489882361646b9a8cc6d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 22 Mar 2016 12:04:28 -0500 Subject: [PATCH] Configurable spawn chances for skeleton horses @@ -19,10 +19,10 @@ 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 -@@ -436,7 +436,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -445,7 +445,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.D(blockposition); @@ -32,5 +32,5 @@ index 9b059e52c..de900920a 100644 entityhorseskeleton.p(true); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0088-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0088-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index d3ce0f8e17..60fd1c446e 100644 --- a/Spigot-Server-Patches/0088-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0088-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -1,4 +1,4 @@ -From 1979a3eba27bfc1b815da4923498bbe652906e95 Mon Sep 17 00:00:00 2001 +From bc65ae40e324298b8ab016670f728b7731197a31 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:07:55 -0600 Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling @@ -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 @@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable { @@ -52,10 +52,10 @@ 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 -@@ -406,11 +406,26 @@ public class Chunk { +@@ -406,11 +406,27 @@ public class Chunk { return this.a(i, j, k).c(); } @@ -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,10 +99,10 @@ 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 -@@ -273,12 +273,12 @@ public abstract class World implements IBlockAccess { +@@ -275,12 +275,12 @@ public abstract class World implements IBlockAccess { return this.getType(blockposition1); } @@ -118,7 +119,7 @@ index 1d2d174e8..9427fc080 100644 } public boolean isEmpty(BlockPosition blockposition) { -@@ -374,7 +374,7 @@ public abstract class World implements IBlockAccess { +@@ -376,7 +376,7 @@ public abstract class World implements IBlockAccess { return true; } // CraftBukkit end @@ -127,7 +128,7 @@ index 1d2d174e8..9427fc080 100644 return false; } else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { return false; -@@ -691,7 +691,7 @@ public abstract class World implements IBlockAccess { +@@ -693,7 +693,7 @@ public abstract class World implements IBlockAccess { // Paper start - test if meets light level, return faster // logic copied from below public boolean isLightLevel(BlockPosition blockposition, int level) { @@ -136,7 +137,7 @@ index 1d2d174e8..9427fc080 100644 if (this.getType(blockposition).f()) { if (this.c(blockposition.up(), false) >= level) { return true; -@@ -809,7 +809,7 @@ public abstract class World implements IBlockAccess { +@@ -812,7 +812,7 @@ public abstract class World implements IBlockAccess { blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ()); } @@ -145,7 +146,7 @@ index 1d2d174e8..9427fc080 100644 return enumskyblock.c; } else if (!this.isLoaded(blockposition)) { return enumskyblock.c; -@@ -821,7 +821,7 @@ public abstract class World implements IBlockAccess { +@@ -824,7 +824,7 @@ public abstract class World implements IBlockAccess { } public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) { @@ -154,7 +155,7 @@ index 1d2d174e8..9427fc080 100644 if (this.isLoaded(blockposition)) { Chunk chunk = this.getChunkAtWorldCoords(blockposition); -@@ -845,19 +845,19 @@ public abstract class World implements IBlockAccess { +@@ -848,19 +848,19 @@ public abstract class World implements IBlockAccess { // Paper start - reduces need to do isLoaded before getType public IBlockData getTypeIfLoaded(BlockPosition blockposition) { // CraftBukkit start - tree generation @@ -182,7 +183,7 @@ index 1d2d174e8..9427fc080 100644 } return null; } -@@ -865,24 +865,33 @@ public abstract class World implements IBlockAccess { +@@ -868,24 +868,33 @@ public abstract class World implements IBlockAccess { public IBlockData getType(BlockPosition blockposition) { // CraftBukkit start - tree generation @@ -225,9 +226,9 @@ index 1d2d174e8..9427fc080 100644 } + // Paper end - public boolean B() { - return this.J < 4; -@@ -2017,7 +2026,7 @@ public abstract class World implements IBlockAccess { + public boolean D() { + return this.L < 4; +@@ -2020,7 +2029,7 @@ public abstract class World implements IBlockAccess { public Map capturedTileEntities = Maps.newHashMap(); @Nullable public TileEntity getTileEntity(BlockPosition blockposition) { @@ -236,7 +237,7 @@ index 1d2d174e8..9427fc080 100644 return null; } else { // CraftBukkit start -@@ -2058,7 +2067,7 @@ public abstract class World implements IBlockAccess { +@@ -2061,7 +2070,7 @@ public abstract class World implements IBlockAccess { } public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { @@ -245,7 +246,7 @@ index 1d2d174e8..9427fc080 100644 if (tileentity != null && !tileentity.y()) { // CraftBukkit start if (captureBlockStates) { -@@ -2121,7 +2130,7 @@ public abstract class World implements IBlockAccess { +@@ -2124,7 +2133,7 @@ public abstract class World implements IBlockAccess { } public boolean d(BlockPosition blockposition, boolean flag) { @@ -255,5 +256,5 @@ index 1d2d174e8..9427fc080 100644 } else { Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0092-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch b/Spigot-Server-Patches/0092-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch index 44a893438b..8eff760afe 100644 --- a/Spigot-Server-Patches/0092-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch +++ b/Spigot-Server-Patches/0092-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch @@ -1,4 +1,4 @@ -From c80926a9307c1543849b7120dcf44c831275834e Mon Sep 17 00:00:00 2001 +From 3a92a6ebcf07d8b478c345526d2d3896c0df237a Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 19:55:45 -0400 Subject: [PATCH] Option to disable BlockPhysicsEvent for Redstone @@ -25,10 +25,10 @@ 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 -@@ -578,7 +578,7 @@ public abstract class World implements IBlockAccess { +@@ -580,7 +580,7 @@ public abstract class World implements IBlockAccess { try { // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); @@ -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 @@ -34,6 +34,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; @@ -49,7 +49,7 @@ index de900920a..f80647b31 100644 private final MinecraftServer server; public EntityTracker tracker; private final PlayerChunkMap manager; -@@ -727,6 +728,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -726,6 +727,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) { try { @@ -57,7 +57,7 @@ index de900920a..f80647b31 100644 iblockdata.getBlock().b((World) this, nextticklistentry.a, iblockdata, this.random); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Exception while ticking a block"); -@@ -734,7 +736,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -733,7 +735,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { CrashReportSystemDetails.a(crashreportsystemdetails, nextticklistentry.a, iblockdata); throw new ReportedException(crashreport); @@ -67,5 +67,5 @@ index de900920a..f80647b31 100644 timing.stopTiming(); // Paper } else { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0093-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0093-Entity-AddTo-RemoveFrom-World-Events.patch index 91ae57bd1d..291bf46511 100644 --- a/Spigot-Server-Patches/0093-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0093-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,14 +1,14 @@ -From fbb0b9f15da52c572235a4a38164da7fd5aecc5b Mon Sep 17 00:00:00 2001 +From e58bd8dd6ef47687c17109b69e0fcabec2e9a25d Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:32:58 -0400 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 -@@ -1182,6 +1182,7 @@ public abstract class World implements IBlockAccess { +@@ -1185,6 +1185,7 @@ public abstract class World implements IBlockAccess { } entity.valid = true; // CraftBukkit @@ -16,7 +16,7 @@ index 8cbdbda92..f86c64cb2 100644 } protected void c(Entity entity) { -@@ -1189,6 +1190,7 @@ public abstract class World implements IBlockAccess { +@@ -1192,6 +1193,7 @@ public abstract class World implements IBlockAccess { ((IWorldAccess) this.u.get(i)).b(entity); } @@ -25,5 +25,5 @@ index 8cbdbda92..f86c64cb2 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0094-Configurable-Chunk-Inhabited-Timer.patch b/Spigot-Server-Patches/0094-Configurable-Chunk-Inhabited-Timer.patch index 11fa40d3db..71be152e32 100644 --- a/Spigot-Server-Patches/0094-Configurable-Chunk-Inhabited-Timer.patch +++ b/Spigot-Server-Patches/0094-Configurable-Chunk-Inhabited-Timer.patch @@ -1,4 +1,4 @@ -From 898cc9c9a103418974e27f5ed4c82b96f954cef8 Mon Sep 17 00:00:00 2001 +From 4547f644988475da576ddf500a86a4334f875115 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:46:14 -0400 Subject: [PATCH] Configurable Chunk Inhabited Timer @@ -23,10 +23,10 @@ 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 -@@ -1405,7 +1405,7 @@ public class Chunk { +@@ -1407,7 +1407,7 @@ public class Chunk { } public long x() { @@ -36,5 +36,5 @@ index 736fa1f62..61d34fc37 100644 public void c(long i) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0095-EntityPathfindEvent.patch b/Spigot-Server-Patches/0095-EntityPathfindEvent.patch index 53c511170a..ffde63b36b 100644 --- a/Spigot-Server-Patches/0095-EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/0095-EntityPathfindEvent.patch @@ -1,4 +1,4 @@ -From d3c9388de3e0dc2bbc6c1b12eb76d09c48af1d08 Mon Sep 17 00:00:00 2001 +From 41b32f64e3ff49cf3317f8b5e0309ad4a2597dc7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 21:22:26 -0400 Subject: [PATCH] EntityPathfindEvent @@ -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 @@ -4,7 +4,7 @@ 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(); @@ -98,6 +99,7 @@ public abstract class NavigationAbstract { if (this.c != null && !this.c.b() && blockposition.equals(this.q)) { @@ -32,8 +32,8 @@ 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(); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0100-Do-not-load-chunks-for-light-checks.patch b/Spigot-Server-Patches/0100-Do-not-load-chunks-for-light-checks.patch index 0462266b84..b758b7f55c 100644 --- a/Spigot-Server-Patches/0100-Do-not-load-chunks-for-light-checks.patch +++ b/Spigot-Server-Patches/0100-Do-not-load-chunks-for-light-checks.patch @@ -1,4 +1,4 @@ -From ddaa32482b51ab2ef6141ae0e48d26565599be40 Mon Sep 17 00:00:00 2001 +From 9c522bb9ad65ef25793a4b39034ba45e9d7fe8a4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 31 Mar 2016 19:17:58 -0400 Subject: [PATCH] Do not load chunks for light checks @@ -7,10 +7,10 @@ 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 -@@ -759,6 +759,7 @@ public abstract class World implements IBlockAccess { +@@ -762,6 +762,7 @@ public abstract class World implements IBlockAccess { if (blockposition.getY() >= 256) { blockposition = new BlockPosition(blockposition.getX(), 255, blockposition.getZ()); } @@ -19,5 +19,5 @@ index f86c64cb2..7e6459654 100644 Chunk chunk = this.getChunkAtWorldCoords(blockposition); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch index c4f7d41ac0..18bec4a844 100644 --- a/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/0101-Add-PlayerUseUnknownEntityEvent.patch @@ -1,4 +1,4 @@ -From 3ef06b376d5d7091fa982931e4a0a66ff0f76a2d Mon Sep 17 00:00:00 2001 +From e8548ec5455f5fb85d3a3d9fdaf9aabad959d2ba Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 05:09:16 -0400 Subject: [PATCH] Add PlayerUseUnknownEntityEvent @@ -18,10 +18,10 @@ 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 -@@ -1614,6 +1614,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1625,6 +1625,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } } } @@ -39,5 +39,5 @@ index b67837dd2..840448995 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0102-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0102-Fix-reducedDebugInfo-not-initialized-on-client.patch index 0af00b8332..8604935de7 100644 --- a/Spigot-Server-Patches/0102-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0102-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -1,21 +1,21 @@ -From 97885a33964fffa97584963cbe542dccb797b0bc Mon Sep 17 00:00:00 2001 +From f7d4407c751b874ca036f5621c2b9610b6c1bd9d Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 20:37:03 -0400 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 -@@ -154,6 +154,7 @@ public abstract class PlayerList { +@@ -156,6 +156,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities)); 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); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 5d2fd3826d..59172d0f54 100644 --- a/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0104-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From 9f82f1d72fa9ec99080e660e69cee7822085bf44 Mon Sep 17 00:00:00 2001 +From 3f5c4a27566f6700dec08348db62862580e22069 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Sep 2014 23:14:43 -0400 Subject: [PATCH] Configurable Keep Spawn Loaded range per world @@ -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 -@@ -356,8 +356,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -356,8 +356,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs long j = aw(); i = 0; @@ -39,10 +39,10 @@ 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 -@@ -3194,8 +3194,9 @@ public abstract class World implements IBlockAccess { +@@ -3197,8 +3197,9 @@ public abstract class World implements IBlockAccess { int k = i * 16 + 8 - blockposition.getX(); int l = j * 16 + 8 - blockposition.getZ(); boolean flag = true; @@ -54,10 +54,10 @@ 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 -@@ -952,7 +952,7 @@ public final class CraftServer implements Server { +@@ -949,7 +949,7 @@ public final class CraftServer implements Server { System.out.print("Preparing start region for level " + (console.worlds.size() - 1) + " (Seed: " + internal.getSeed() + ")"); if (internal.getWorld().getKeepSpawnInMemory()) { @@ -67,10 +67,10 @@ 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 -@@ -1265,8 +1265,9 @@ public class CraftWorld implements World { +@@ -1273,8 +1273,9 @@ public class CraftWorld implements World { int chunkCoordX = chunkcoordinates.getX() >> 4; int chunkCoordZ = chunkcoordinates.getZ() >> 4; // Cycle through the 25x25 Chunks around it to load/unload the chunks. @@ -83,5 +83,5 @@ index f65611a6a..9965235ab 100644 loadChunk(chunkCoordX + x, chunkCoordZ + z); } else { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0105-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0105-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index 88464f5552..75cc599f5c 100644 --- a/Spigot-Server-Patches/0105-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0105-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -1,14 +1,14 @@ -From 8ae180ad3f8cf80824fe419082538df82a2b0e2a Mon Sep 17 00:00:00 2001 +From 907e7c092e0da791c9f24d9c649391fa30158081 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Apr 2016 17:48:50 -0400 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 -@@ -532,6 +532,7 @@ public abstract class World implements IBlockAccess { +@@ -534,6 +534,7 @@ public abstract class World implements IBlockAccess { } public void applyPhysics(BlockPosition blockposition, Block block, boolean flag) { @@ -17,5 +17,5 @@ index dba3fb167..44108ab9a 100644 this.a(blockposition.east(), block, blockposition); this.a(blockposition.down(), block, blockposition); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch b/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch index 3a6ec1d5f3..17fe759d1f 100644 --- a/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch +++ b/Spigot-Server-Patches/0106-Don-t-spam-reload-spawn-chunks-in-nether-end.patch @@ -1,15 +1,15 @@ -From cc0692ecfec0f490e91b5c5665030027fd1d5843 Mon Sep 17 00:00:00 2001 +From d8fdffcf773a9d75b1b7751a46e1f5bf4e45e56c Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Apr 2016 19:42:22 -0400 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 -@@ -3190,6 +3190,7 @@ public abstract class World implements IBlockAccess { - return this.N; +@@ -3193,6 +3193,7 @@ public abstract class World implements IBlockAccess { + 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 @@ -138,6 +138,6 @@ public abstract class WorldProvider { @@ -29,5 +29,5 @@ index a27512c0f..4691b3d8f 100644 } } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 3bd41fa9e3..1292257f5b 100644 --- a/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0108-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -1,4 +1,4 @@ -From 6f11a33876ceebf398760bcd2bb8915910975f6c Mon Sep 17 00:00:00 2001 +From ff60a18cc8906862956622e06a7b712bf8603d19 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 6 Apr 2016 01:04:23 -0500 Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names @@ -19,22 +19,22 @@ 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 -@@ -2046,6 +2046,7 @@ public abstract class Entity implements ICommandListener { +@@ -2073,6 +2073,7 @@ 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 -@@ -1347,7 +1347,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1358,7 +1358,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { return; } @@ -51,5 +51,5 @@ index 840448995..dfbae01f4 100644 if (((LazyPlayerSet) event.getRecipients()).isLazy()) { for (Object recipient : minecraftServer.getPlayerList().players) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0109-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0109-Workaround-for-setting-passengers-on-players.patch index d343a88956..ae47d22430 100644 --- a/Spigot-Server-Patches/0109-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0109-Workaround-for-setting-passengers-on-players.patch @@ -1,4 +1,4 @@ -From 5f2091113092bb84e8ce6b9e09c5042201d8508d Mon Sep 17 00:00:00 2001 +From 47707ae66e07a5a249d29be95801f530ba0dfec1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 10 Apr 2016 03:23:32 -0500 Subject: [PATCH] Workaround for setting passengers on players @@ -6,10 +6,10 @@ 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 -@@ -589,6 +589,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -597,6 +597,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return true; } @@ -28,5 +28,5 @@ index 0a9e8b9cd..8e06c2140 100644 public void setSneaking(boolean sneak) { getHandle().setSneaking(sneak); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0110-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0110-Remove-unused-World-Tile-Entity-List.patch index fefcd5b261..ca3410ffc1 100644 --- a/Spigot-Server-Patches/0110-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0110-Remove-unused-World-Tile-Entity-List.patch @@ -1,4 +1,4 @@ -From d8532410334ad90c176c7553d1b3bca14f95f54b Mon Sep 17 00:00:00 2001 +From fed630f23449d74c70787fc317255c14d8a5329f Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 00:25:28 -0400 Subject: [PATCH] Remove unused World Tile Entity List @@ -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 @@ -68,7 +68,7 @@ public abstract class World implements IBlockAccess { @@ -18,7 +18,7 @@ index 9bc8ce64c..2f4728b0d 100644 public final List tileEntityListTick = Lists.newArrayList(); private final List b = Lists.newArrayList(); private final Set tileEntityListUnload = Sets.newHashSet(); // Paper -@@ -1568,7 +1568,7 @@ public abstract class World implements IBlockAccess { +@@ -1571,7 +1571,7 @@ public abstract class World implements IBlockAccess { // CraftBukkit start - From below, clean up tile entities before ticking them if (!this.tileEntityListUnload.isEmpty()) { this.tileEntityListTick.removeAll(this.tileEntityListUnload); @@ -27,7 +27,7 @@ index 9bc8ce64c..2f4728b0d 100644 this.tileEntityListUnload.clear(); } // CraftBukkit end -@@ -1619,7 +1619,7 @@ public abstract class World implements IBlockAccess { +@@ -1622,7 +1622,7 @@ public abstract class World implements IBlockAccess { if (tileentity.y()) { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); @@ -36,7 +36,7 @@ index 9bc8ce64c..2f4728b0d 100644 if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition()); } -@@ -1657,7 +1657,7 @@ public abstract class World implements IBlockAccess { +@@ -1660,7 +1660,7 @@ public abstract class World implements IBlockAccess { this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); // CraftBukkit start // From above, don't screw this up - SPIGOT-1746 @@ -45,7 +45,7 @@ index 9bc8ce64c..2f4728b0d 100644 this.a(tileentity1); } // CraftBukkit end -@@ -1677,9 +1677,9 @@ public abstract class World implements IBlockAccess { +@@ -1680,9 +1680,9 @@ public abstract class World implements IBlockAccess { protected void l() {} public boolean a(TileEntity tileentity) { @@ -57,7 +57,7 @@ index 9bc8ce64c..2f4728b0d 100644 this.tileEntityListTick.add(tileentity); } -@@ -2114,7 +2114,7 @@ public abstract class World implements IBlockAccess { +@@ -2117,7 +2117,7 @@ public abstract class World implements IBlockAccess { } else { if (tileentity != null) { this.b.remove(tileentity); @@ -67,5 +67,5 @@ index 9bc8ce64c..2f4728b0d 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0112-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0112-Configurable-Player-Collision.patch index 727b70f4a4..4671c927c1 100644 --- a/Spigot-Server-Patches/0112-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0112-Configurable-Player-Collision.patch @@ -1,4 +1,4 @@ -From c11d79dd373a10c5cc3e190d7ac9f0fe1993463a Mon Sep 17 00:00:00 2001 +From 591afbb70543d86d73dad41a3615fb93cb7dff33 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 02:10:49 -0400 Subject: [PATCH] Configurable Player Collision @@ -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 @@ -183,6 +183,13 @@ 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 -@@ -331,6 +331,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -331,6 +331,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.v.setPlayerFileData(this.worldServer); this.a(this.getDifficulty()); this.l(); @@ -75,10 +75,10 @@ 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 -@@ -71,6 +71,7 @@ public abstract class PlayerList { +@@ -72,6 +72,7 @@ public abstract class PlayerList { // CraftBukkit start private CraftServer cserver; private final Map playersByName = new org.spigotmc.CaseInsensitiveMap(); @@ -86,7 +86,7 @@ index e303b45f0..97322c5da 100644 public PlayerList(MinecraftServer minecraftserver) { this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this); -@@ -228,6 +229,12 @@ public abstract class PlayerList { +@@ -230,6 +231,12 @@ public abstract class PlayerList { } entityplayer.syncInventory(); @@ -99,7 +99,7 @@ index e303b45f0..97322c5da 100644 // CraftBukkit - Moved from above, added world PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")"); } -@@ -400,6 +407,16 @@ public abstract class PlayerList { +@@ -415,6 +422,16 @@ public abstract class PlayerList { entityplayer.playerTick();// SPIGOT-924 // CraftBukkit end @@ -116,7 +116,7 @@ index e303b45f0..97322c5da 100644 this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getVehicle(); -@@ -1314,7 +1331,13 @@ public abstract class PlayerList { +@@ -1337,7 +1354,13 @@ public abstract class PlayerList { player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message } // CraftBukkit end @@ -132,5 +132,5 @@ index e303b45f0..97322c5da 100644 // CraftBukkit start -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0114-Water-mobs-should-only-spawn-in-the-water.patch b/Spigot-Server-Patches/0114-Water-mobs-should-only-spawn-in-the-water.patch index f6d10e17d9..967f4a0641 100644 --- a/Spigot-Server-Patches/0114-Water-mobs-should-only-spawn-in-the-water.patch +++ b/Spigot-Server-Patches/0114-Water-mobs-should-only-spawn-in-the-water.patch @@ -1,17 +1,17 @@ -From a32a3ff851c3d8ff864c9597bd35a0b43dcb1c34 Mon Sep 17 00:00:00 2001 +From 5ca04945098d575cbb62e424747d07ab701eeee0 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 14 Apr 2016 17:48:56 -0500 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 @@ -11,7 +11,15 @@ 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 @@ -26,5 +26,5 @@ index 90d33af95..251555713 100644 public boolean canSpawn() { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0115-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch b/Spigot-Server-Patches/0115-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch index dcd016b4ab..e94ac79657 100644 --- a/Spigot-Server-Patches/0115-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch +++ b/Spigot-Server-Patches/0115-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch @@ -1,4 +1,4 @@ -From 0210004d78643b561dbd88a5916cd55c9aae3dda Mon Sep 17 00:00:00 2001 +From 9a94f770eac122c917dab083c8ba65d68a73381a Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 14 Apr 2016 21:01:39 -0400 Subject: [PATCH] Fix Bugs with Spigot Mob Spawn Logic @@ -14,10 +14,10 @@ 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 -@@ -680,7 +680,7 @@ public class Chunk { +@@ -682,7 +682,7 @@ public class Chunk { i = this.entitySlices.length - 1; } @@ -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 @@ -23,6 +23,15 @@ public final class SpawnerCreature { @@ -56,5 +56,5 @@ index 8749a1879..29d4c0866 100644 Iterator iterator1 = this.b.iterator(); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0117-Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/0117-Prevent-Fire-from-loading-chunks.patch index b58eb95853..86b1706402 100644 --- a/Spigot-Server-Patches/0117-Prevent-Fire-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0117-Prevent-Fire-from-loading-chunks.patch @@ -1,4 +1,4 @@ -From cf26fbf700eb4d7f23c9a35ef6cb56859d52ca39 Mon Sep 17 00:00:00 2001 +From 7959c2a0963e4ee323b9d1f4a6fd4100f86b6f94 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 17 Apr 2016 17:27:09 -0400 Subject: [PATCH] Prevent Fire from loading chunks @@ -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 @@ -164,6 +164,7 @@ public class BlockFire extends Block { @@ -18,16 +18,14 @@ index 94cb9d462..dfc328850 100644 int j1 = this.d(world, blockposition1); if (j1 > 0) { -@@ -232,10 +233,14 @@ public class BlockFire extends Block { +@@ -232,10 +233,13 @@ public class BlockFire extends Block { } 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); @@ -35,17 +33,15 @@ index 94cb9d462..dfc328850 100644 // CraftBukkit start org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -294,7 +299,9 @@ public class BlockFire extends Block { +@@ -294,6 +298,8 @@ public class BlockFire extends Block { 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; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch index 6fd4dbde7b..d25596bebf 100644 --- a/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0118-Implement-PlayerLocaleChangeEvent.patch @@ -1,23 +1,23 @@ -From 543ab4972cabde6a82feebcf5145c143f8d8978f Mon Sep 17 00:00:00 2001 +From ad0cb65019f11a4d6994a21e88fa3b504f60193d Mon Sep 17 00:00:00 2001 From: Isaac Moore Date: Tue, 19 Apr 2016 14:09:31 -0500 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 @@ -31,7 +31,7 @@ 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; public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; -@@ -1105,7 +1105,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1224,7 +1224,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.server.server.getPluginManager().callEvent(event); } // CraftBukkit end @@ -30,14 +30,14 @@ 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 -@@ -1691,7 +1691,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1688,7 +1688,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { @@ -50,5 +50,5 @@ index 8e06c2140..61c32223d 100644 @Override -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0119-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0119-EntityRegainHealthEvent-isFastRegen-API.patch index a8ae4e91af..6e7222d51a 100644 --- a/Spigot-Server-Patches/0119-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0119-EntityRegainHealthEvent-isFastRegen-API.patch @@ -1,4 +1,4 @@ -From 941eca8221f54c49f6bce1728a322e7e0657f08b Mon Sep 17 00:00:00 2001 +From bb2896c078064b96b79ef2c93111c5de084f0663 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 01:43:11 -0500 Subject: [PATCH] EntityRegainHealthEvent isFastRegen API @@ -6,10 +6,10 @@ 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 -@@ -762,10 +762,16 @@ public abstract class EntityLiving extends Entity { +@@ -767,10 +767,16 @@ public abstract class EntityLiving extends Entity { } public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) { @@ -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 @@ -65,7 +65,7 @@ public class FoodMetaData { @@ -41,5 +41,5 @@ index b6e978668..8d95d148f 100644 this.foodTickTimer = 0; } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0121-Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/0121-Vehicle-Event-Cancellation-Changes.patch index 341711e8a3..60ed7eafdc 100644 --- a/Spigot-Server-Patches/0121-Vehicle-Event-Cancellation-Changes.patch +++ b/Spigot-Server-Patches/0121-Vehicle-Event-Cancellation-Changes.patch @@ -1,11 +1,11 @@ -From 9e7656b1f8f69832a1bea2e23c6992bbaed9fe97 Mon Sep 17 00:00:00 2001 +From 5d6a70e63f2dbf871c2c7ed62ee6e6c4245bee15 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 18:20:05 -0500 Subject: [PATCH] Vehicle Event Cancellation Changes diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 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 @@ -70,7 +70,7 @@ public abstract class Entity implements ICommandListener { @@ -17,7 +17,7 @@ index 8908d8b8d..0f4a1b66b 100644 public boolean attachedToPlayer; public World world; public double lastX; -@@ -1928,6 +1928,7 @@ public abstract class Entity implements ICommandListener { +@@ -1955,6 +1955,7 @@ public abstract class Entity implements ICommandListener { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { // CraftBukkit start @@ -25,7 +25,7 @@ index 8908d8b8d..0f4a1b66b 100644 CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); Entity orig = craft == null ? null : craft.getHandle(); if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { -@@ -1943,7 +1944,13 @@ public abstract class Entity implements ICommandListener { +@@ -1970,7 +1971,13 @@ public abstract class Entity implements ICommandListener { } } // CraftBukkit end @@ -41,5 +41,5 @@ index 8908d8b8d..0f4a1b66b 100644 entity.j = 60; } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0123-Improve-Minecraft-Hopper-Performance.patch b/Spigot-Server-Patches/0123-Improve-Minecraft-Hopper-Performance.patch index ce33e0af16..103356c8a4 100644 --- a/Spigot-Server-Patches/0123-Improve-Minecraft-Hopper-Performance.patch +++ b/Spigot-Server-Patches/0123-Improve-Minecraft-Hopper-Performance.patch @@ -1,4 +1,4 @@ -From b90b6e56102b563fc5dedfd20d1cfc5f901201d4 Mon Sep 17 00:00:00 2001 +From 0fd48f8ca0b302871c4bccf779578385e53f8c33 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Apr 2016 22:09:52 -0400 Subject: [PATCH] Improve Minecraft Hopper Performance @@ -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 @@ -33,6 +33,7 @@ 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 @@ -220,11 +220,13 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -68,7 +68,7 @@ index 6acce15e7..44b6ecc5d 100644 } else { iinventory.setItem(i, itemstack1); @@ -459,7 +463,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - boolean flag1 = iinventory1.w_(); + boolean flag1 = iinventory1.x_(); if (itemstack1.isEmpty()) { + IGNORE_TILE_UPDATES = true; // Paper @@ -86,5 +86,5 @@ index 6acce15e7..44b6ecc5d 100644 return this.f > 0; } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0124-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0124-remove-null-possibility-for-getServer-singleton.patch index 598e8fc384..5eac9fc64a 100644 --- a/Spigot-Server-Patches/0124-remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/0124-remove-null-possibility-for-getServer-singleton.patch @@ -1,4 +1,4 @@ -From 0beac52797d106b00aae3d72abf1377f736dbff9 Mon Sep 17 00:00:00 2001 +From 72456dedf5e3b0b1abd45465540107db5ac7175f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 Apr 2016 00:57:27 -0400 Subject: [PATCH] remove null possibility for getServer singleton @@ -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 @@ -52,6 +52,7 @@ 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; -@@ -123,6 +124,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -123,6 +124,7 @@ 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; -@@ -1634,7 +1636,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1633,7 +1635,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // CraftBukkit start @Deprecated public static MinecraftServer getServer() { @@ -35,5 +35,5 @@ index 430168d21..83b62da55 100644 // CraftBukkit end } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 8307c446b7..be0fd97f36 100644 --- a/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0125-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -1,4 +1,4 @@ -From 08d92972cd60988bb13c33c398aa89d95a90bf8a Mon Sep 17 00:00:00 2001 +From e77006067f56fb55e05d1d378412ef6316111889 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Apr 2016 20:02:00 -0400 Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes @@ -13,10 +13,10 @@ 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 -@@ -597,6 +597,12 @@ public abstract class EntityHuman extends EntityLiving { +@@ -549,6 +549,12 @@ public abstract class EntityHuman extends EntityLiving { return null; } // CraftBukkit end @@ -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 @@ -90,11 +90,11 @@ public class EntityTrackerEntry { @@ -48,10 +48,10 @@ 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 -@@ -1219,6 +1219,7 @@ public abstract class World implements IBlockAccess { +@@ -1222,6 +1222,7 @@ public abstract class World implements IBlockAccess { { if ( iter.next().trackee == entity ) { @@ -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 @@ -28,6 +28,7 @@ public class WorldMap extends PersistentBase { @@ -145,5 +145,5 @@ index 256a13178..5768cd512 100644 public RenderData() { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0126-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0126-LootTable-API-Replenishable-Lootables-Feature.patch index e20d088029..b9a9ad4b7f 100644 --- a/Spigot-Server-Patches/0126-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0126-LootTable-API-Replenishable-Lootables-Feature.patch @@ -1,4 +1,4 @@ -From 4bdde79d22ddc115153bde7b44d60857053d79b7 Mon Sep 17 00:00:00 2001 +From 2004f4a874f0c86805f21348b443ea5f0a8222cb Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 1 May 2016 21:19:14 -0400 Subject: [PATCH] LootTable API & Replenishable Lootables Feature @@ -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 @@ -6,17 +6,21 @@ 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 @@ -1,44 +1,50 @@ @@ -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 @@ -1,5 +1,6 @@ @@ -782,5 +782,5 @@ index e9963e21c..acb4dee04 100644 CraftMinecartHopper(CraftServer server, EntityMinecartHopper entity) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0130-Do-not-mark-chunks-as-active-for-neighbor-updates.patch b/Spigot-Server-Patches/0130-Do-not-mark-chunks-as-active-for-neighbor-updates.patch index 81ccda8250..00a5442514 100644 --- a/Spigot-Server-Patches/0130-Do-not-mark-chunks-as-active-for-neighbor-updates.patch +++ b/Spigot-Server-Patches/0130-Do-not-mark-chunks-as-active-for-neighbor-updates.patch @@ -1,4 +1,4 @@ -From 77fa2b88a5c877348527dfa1a8ca29fefaf8c520 Mon Sep 17 00:00:00 2001 +From c1cda881a32b419fc1119bcba3189ec108f0af64 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 12 May 2016 01:55:17 -0400 Subject: [PATCH] Do not mark chunks as active for neighbor updates @@ -6,10 +6,10 @@ 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 -@@ -1004,25 +1004,25 @@ public class Chunk { +@@ -1006,25 +1006,25 @@ public class Chunk { // CraftBukkit end world.timings.syncChunkLoadPostTimer.stopTiming(); // Paper world.timings.syncChunkLoadPopulateNeighbors.startTiming(); // Paper @@ -44,5 +44,5 @@ index a6cf1d83d..3db29161d 100644 if (chunk4 != null) { chunk4.a(chunkgenerator); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0134-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0134-Optimize-UserCache-Thread-Safe.patch index 4b478c45b8..bfca31251a 100644 --- a/Spigot-Server-Patches/0134-Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/0134-Optimize-UserCache-Thread-Safe.patch @@ -1,4 +1,4 @@ -From 0f23636d65d6937af2c1e37f32a255db6850b097 Mon Sep 17 00:00:00 2001 +From dbe6ae53cbd3b831b7f0fc3f3e1705371d89b67f Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 16 May 2016 20:47:41 -0400 Subject: [PATCH] Optimize UserCache / Thread Safe @@ -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 -@@ -527,7 +527,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -527,7 +527,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs // Spigot start if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { LOGGER.info("Saving usercache.json"); @@ -23,10 +23,10 @@ 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 -@@ -108,7 +108,7 @@ public class UserCache { +@@ -109,7 +109,7 @@ public class UserCache { this.a(gameprofile, (Date) null); } @@ -35,7 +35,7 @@ index ccfc755d2..989758cdf 100644 UUID uuid = gameprofile.getId(); if (date == null) { -@@ -122,8 +122,9 @@ public class UserCache { +@@ -123,8 +123,9 @@ public class UserCache { String s = gameprofile.getName().toLowerCase(Locale.ROOT); UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date, null); @@ -46,7 +46,7 @@ index ccfc755d2..989758cdf 100644 this.d.remove(usercache_usercacheentry1.a().getName().toLowerCase(Locale.ROOT)); this.f.remove(gameprofile); -@@ -136,7 +137,7 @@ public class UserCache { +@@ -137,7 +138,7 @@ public class UserCache { } @Nullable @@ -55,7 +55,7 @@ index ccfc755d2..989758cdf 100644 String s1 = s.toLowerCase(Locale.ROOT); UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.d.get(s1); -@@ -165,7 +166,7 @@ public class UserCache { +@@ -166,7 +167,7 @@ public class UserCache { return usercache_usercacheentry == null ? null : usercache_usercacheentry.a(); } @@ -64,7 +64,7 @@ index ccfc755d2..989758cdf 100644 ArrayList arraylist = Lists.newArrayList(this.d.keySet()); return (String[]) arraylist.toArray(new String[arraylist.size()]); -@@ -227,8 +228,15 @@ public class UserCache { +@@ -228,8 +229,15 @@ public class UserCache { } @@ -80,7 +80,7 @@ index ccfc755d2..989758cdf 100644 BufferedWriter bufferedwriter = null; try { -@@ -242,6 +250,14 @@ public class UserCache { +@@ -243,6 +251,14 @@ public class UserCache { } finally { IOUtils.closeQuietly(bufferedwriter); } @@ -96,5 +96,5 @@ index ccfc755d2..989758cdf 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0136-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0136-Optional-TNT-doesn-t-move-in-water.patch new file mode 100644 index 0000000000..a65a0cc95e --- /dev/null +++ b/Spigot-Server-Patches/0136-Optional-TNT-doesn-t-move-in-water.patch @@ -0,0 +1,116 @@ +From 64acbadada6d70f6748c8f415122555db6ec8e0d Mon Sep 17 00:00:00 2001 +From: Zach Brown +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 +@@ -2,7 +2,6 @@ package com.destroystokyo.paper; + + import java.util.List; + +-import org.bukkit.Bukkit; + import org.bukkit.configuration.file.YamlConfiguration; + import org.spigotmc.SpigotWorldConfig; + +@@ -327,4 +326,14 @@ 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 +@@ -1108,6 +1108,11 @@ 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)) { +@@ -2532,6 +2537,11 @@ 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 +@@ -147,4 +147,47 @@ 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 + } +-- +2.13.0 + diff --git a/Spigot-Server-Patches/0136-Optional-old-TNT-cannon-behaviors.patch b/Spigot-Server-Patches/0136-Optional-old-TNT-cannon-behaviors.patch deleted file mode 100644 index a3d99a89fb..0000000000 --- a/Spigot-Server-Patches/0136-Optional-old-TNT-cannon-behaviors.patch +++ /dev/null @@ -1,393 +0,0 @@ -From 05fa0e17dc7ea46a6a78ddf70e0f29d49edf114a Mon Sep 17 00:00:00 2001 -From: Zach Brown -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 -@@ -327,4 +327,12 @@ 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 -@@ -76,6 +76,17 @@ 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; - -@@ -173,6 +184,17 @@ 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 -@@ -52,6 +52,12 @@ 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; - -@@ -66,6 +72,12 @@ 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; - -@@ -78,6 +90,17 @@ 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 -@@ -20,7 +20,7 @@ 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); -@@ -186,6 +186,19 @@ 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; - -@@ -202,6 +215,16 @@ 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 -@@ -29,7 +29,11 @@ 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); -@@ -43,7 +47,11 @@ 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 -@@ -507,7 +507,11 @@ 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 -@@ -1089,6 +1089,12 @@ 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)) { -@@ -1292,6 +1298,12 @@ 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; -@@ -1346,6 +1358,11 @@ 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; -@@ -2505,6 +2522,12 @@ 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 -@@ -280,4 +280,19 @@ 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 -@@ -32,6 +32,7 @@ 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() { -@@ -124,7 +125,7 @@ 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) { -@@ -146,4 +147,58 @@ 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 -@@ -149,9 +149,15 @@ 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; - --- -2.12.2 - diff --git a/Spigot-Server-Patches/0137-Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/0137-Faster-redstone-torch-rapid-clock-removal.patch index efa0e61dbd..4846f758fd 100644 --- a/Spigot-Server-Patches/0137-Faster-redstone-torch-rapid-clock-removal.patch +++ b/Spigot-Server-Patches/0137-Faster-redstone-torch-rapid-clock-removal.patch @@ -1,4 +1,4 @@ -From f4d997da0a100cd7f4d80996a0ec158649a277e6 Mon Sep 17 00:00:00 2001 +From fee9819b52897421317394c759b8a6850fbab9a9 Mon Sep 17 00:00:00 2001 From: Martin Panzer Date: Mon, 23 May 2016 12:12:37 +0200 Subject: [PATCH] Faster redstone torch rapid clock removal @@ -6,10 +6,10 @@ 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 -@@ -117,9 +117,17 @@ public class BlockRedstoneTorch extends BlockTorch { +@@ -94,9 +94,17 @@ public class BlockRedstoneTorch extends BlockTorch { boolean flag = this.g(world, blockposition, iblockdata); List list = (List) BlockRedstoneTorch.g.get(world); @@ -29,7 +29,7 @@ index 741236289..25a2a5d36 100644 // CraftBukkit start org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager(); -@@ -202,7 +210,7 @@ public class BlockRedstoneTorch extends BlockTorch { +@@ -179,7 +187,7 @@ public class BlockRedstoneTorch extends BlockTorch { static class RedstoneUpdateInfo { BlockPosition a; @@ -39,5 +39,5 @@ index 741236289..25a2a5d36 100644 public RedstoneUpdateInfo(BlockPosition blockposition, long i) { this.a = blockposition; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0140-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/0140-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index b832224954..23b661f78e 100644 --- a/Spigot-Server-Patches/0140-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/Spigot-Server-Patches/0140-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -1,4 +1,4 @@ -From 552bbf4ff08db7dc30722e581a6bb019e8ef12cc Mon Sep 17 00:00:00 2001 +From 5b0e458f61ad7845469a3cc9cee4231ae01a896d Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 31 May 2016 22:53:50 -0400 Subject: [PATCH] Only send Dragon/Wither Death sounds to same world @@ -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 @@ -573,8 +573,12 @@ 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,10 +25,10 @@ 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 -@@ -211,8 +211,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -210,8 +210,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity { // CraftBukkit start - Use relative location for far away sounds // this.world.a(1023, new BlockPosition(this), 0); @@ -44,5 +44,5 @@ index 9af34ba60..031507574 100644 double deltaZ = this.locZ - player.locZ; double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0141-Fix-FallingBlocks-being-stuck-on-fences.patch b/Spigot-Server-Patches/0141-Fix-FallingBlocks-being-stuck-on-fences.patch index eae2676b41..8b4f1c01ee 100644 --- a/Spigot-Server-Patches/0141-Fix-FallingBlocks-being-stuck-on-fences.patch +++ b/Spigot-Server-Patches/0141-Fix-FallingBlocks-being-stuck-on-fences.patch @@ -1,4 +1,4 @@ -From 2ffd7565f95c0fe3ddef701c688263469aeb42ae Mon Sep 17 00:00:00 2001 +From 76311e2cf535fc498b5e98604d1ea28dc7e6356f Mon Sep 17 00:00:00 2001 From: Martin Panzer Date: Fri, 3 Jun 2016 23:13:39 +0200 Subject: [PATCH] Fix FallingBlocks being stuck on fences @@ -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 -@@ -335,4 +335,9 @@ public class PaperWorldConfig { - log("Old Cannon Behaviors: This feature may not be working entirely properly at the moment"); - } +@@ -336,4 +336,9 @@ public class PaperWorldConfig { + 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 @@ -71,6 +71,12 @@ 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 -@@ -2,7 +2,9 @@ package net.minecraft.server; - +@@ -3,6 +3,7 @@ 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 -@@ -97,10 +99,9 @@ public class EntityFallingBlock extends Entity { - blockposition = new BlockPosition(this); - if (this.onGround) { +@@ -121,9 +122,9 @@ public class EntityFallingBlock extends Entity { + } 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 @@ -68,7 +65,7 @@ index bb01929e8..8059e6dcd 100644 } this.motX *= 0.699999988079071D; -@@ -159,6 +160,32 @@ public class EntityFallingBlock extends Entity { +@@ -179,6 +180,32 @@ public class EntityFallingBlock extends Entity { } } @@ -102,5 +99,5 @@ index bb01929e8..8059e6dcd 100644 Block block = this.block.getBlock(); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0142-Make-entities-look-for-hoppers.patch b/Spigot-Server-Patches/0142-Make-entities-look-for-hoppers.patch index 3e267a0187..6a13d0ebea 100644 --- a/Spigot-Server-Patches/0142-Make-entities-look-for-hoppers.patch +++ b/Spigot-Server-Patches/0142-Make-entities-look-for-hoppers.patch @@ -1,4 +1,4 @@ -From b6948fdd96baaba6bb2ef88bb94c34a355ffa1b5 Mon Sep 17 00:00:00 2001 +From da00e43894f069931ea9803a4c2d570ae9073e7e Mon Sep 17 00:00:00 2001 From: Techcable Date: Sat, 18 Jun 2016 01:01:37 -0500 Subject: [PATCH] Make entities look for hoppers @@ -78,10 +78,10 @@ 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 -@@ -340,4 +340,9 @@ public class PaperWorldConfig { +@@ -341,4 +341,9 @@ public class PaperWorldConfig { private void altFallingBlockOnGround() { altFallingBlockOnGround = getBoolean("use-alternate-fallingblock-onGround-detection", false); } @@ -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 @@ -80,6 +80,19 @@ 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 @@ -5,8 +5,15 @@ import javax.annotation.Nullable; @@ -179,7 +179,7 @@ index 9742afc65..95ca1b8e4 100644 @@ -56,6 +63,7 @@ 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 @@ -7,6 +7,7 @@ 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 @@ -126,6 +126,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -321,7 +321,7 @@ index 44b6ecc5d..022e64520 100644 @@ -506,18 +524,44 @@ 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 @@ -378,5 +378,5 @@ index 44b6ecc5d..022e64520 100644 if (!list.isEmpty()) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0143-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0143-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 792359d7f5..2657b790ac 100644 --- a/Spigot-Server-Patches/0143-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0143-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -1,4 +1,4 @@ -From a725b4f641d3fd25f235a4d4e4d9ff73ae7e03c3 Mon Sep 17 00:00:00 2001 +From acf6e5cc937888e032399cb90b3ff680196356dc Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 18 Jun 2016 23:22:12 -0400 Subject: [PATCH] Delay Chunk Unloads based on Player Movement @@ -17,10 +17,10 @@ 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 -@@ -345,4 +345,13 @@ public class PaperWorldConfig { +@@ -346,4 +346,13 @@ public class PaperWorldConfig { private void isHopperPushBased() { isHopperPushBased = getBoolean("hopper.push-based", false); } @@ -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 @@ -30,6 +30,7 @@ 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 @@ -315,6 +315,19 @@ 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 @@ -32,8 +32,16 @@ public class PlayerChunk { @@ -127,10 +127,10 @@ 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 -@@ -1558,7 +1558,7 @@ public class CraftWorld implements World { +@@ -1566,7 +1566,7 @@ public class CraftWorld implements World { ChunkProviderServer cps = world.getChunkProviderServer(); for (net.minecraft.server.Chunk chunk : cps.chunks.values()) { // If in use, skip it @@ -140,5 +140,5 @@ index 9965235ab..3f8859a1f 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0144-Toggleable-Elytra-Wall-Damage.patch b/Spigot-Server-Patches/0144-Toggleable-Elytra-Wall-Damage.patch index 6f0ee07839..8589862957 100644 --- a/Spigot-Server-Patches/0144-Toggleable-Elytra-Wall-Damage.patch +++ b/Spigot-Server-Patches/0144-Toggleable-Elytra-Wall-Damage.patch @@ -1,4 +1,4 @@ -From e886fbb60bda14fbb78a182375a6de088da67aaf Mon Sep 17 00:00:00 2001 +From b44a6c7ed51c15e5a7ef671cbe747dc68953d5e4 Mon Sep 17 00:00:00 2001 From: Jadon Fowler Date: Sat, 18 Jun 2016 23:13:59 -0700 Subject: [PATCH] Toggleable Elytra Wall Damage @@ -7,10 +7,10 @@ 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 -@@ -354,4 +354,9 @@ public class PaperWorldConfig { +@@ -355,4 +355,9 @@ public class PaperWorldConfig { delayChunkUnloadsBy *= 1000; } } @@ -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 -@@ -1690,6 +1690,7 @@ public abstract class EntityLiving extends Entity { +@@ -1731,6 +1731,7 @@ 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; } -@@ -1739,6 +1740,7 @@ public abstract class EntityLiving extends Entity { - this.damageEntity(DamageSource.FLY_INTO_WALL, f7); +@@ -1780,6 +1781,7 @@ public abstract class EntityLiving extends Entity { + this.damageEntity(DamageSource.FLY_INTO_WALL, f8); } } + } // Paper end - Elyta Wall Damage if statement @@ -41,5 +41,5 @@ index ec901150d..b8ac99e5d 100644 if (this.onGround && !this.world.isClientSide) { if (getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0145-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0145-Fix-Double-World-Add-issues.patch index 93f656a4c5..b612643873 100644 --- a/Spigot-Server-Patches/0145-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0145-Fix-Double-World-Add-issues.patch @@ -1,4 +1,4 @@ -From 98c65b22db11cb425f4426f1b52114971dcf12f0 Mon Sep 17 00:00:00 2001 +From 5853695491a09dde341b26e3dcec2a64d2c63d98 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 21 Jun 2016 22:54:34 -0400 Subject: [PATCH] Fix Double World Add issues @@ -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 @@ -508,7 +508,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -18,13 +18,13 @@ 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 -@@ -1098,6 +1098,7 @@ public abstract class World implements IBlockAccess { +@@ -1101,6 +1101,7 @@ public abstract class World implements IBlockAccess { public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot if (entity == null) return false; @@ -33,5 +33,5 @@ index 7ed3a0677..7900fca57 100644 int i = MathHelper.floor(entity.locX / 16.0D); int j = MathHelper.floor(entity.locZ / 16.0D); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0146-Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/0146-Fix-Old-Sign-Conversion.patch index 489c4a987d..98a33a524f 100644 --- a/Spigot-Server-Patches/0146-Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/0146-Fix-Old-Sign-Conversion.patch @@ -1,4 +1,4 @@ -From d2dfe71fdaf52ea8e53deeba1362d3db3c40a09d Mon Sep 17 00:00:00 2001 +From 9630abafb8d98c636c2f0c5c20fa9cddb23d3da0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 17 Jun 2016 20:50:11 -0400 Subject: [PATCH] Fix Old Sign Conversion @@ -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 @@ -203,9 +203,11 @@ 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 @@ -11,6 +11,7 @@ import org.bukkit.inventory.InventoryHolder; // CraftBukkit @@ -46,10 +46,10 @@ 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 -@@ -93,13 +93,14 @@ public class TileEntitySign extends TileEntity { +@@ -77,13 +77,14 @@ public class TileEntitySign extends TileEntity { } try { @@ -67,5 +67,5 @@ index 34ade146c..242552c36 100644 try { this.lines[i] = ChatComponentUtils.filterForDisplay(icommandlistener, ichatbasecomponent, (Entity) null); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0147-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/0147-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch index ab34941696..e391c5ebb7 100644 --- a/Spigot-Server-Patches/0147-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch +++ b/Spigot-Server-Patches/0147-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch @@ -1,14 +1,14 @@ -From 150459125f9aefe49a503c6cb1aa048d03291684 Mon Sep 17 00:00:00 2001 +From 2790458a20fcda14067cb339e644baf678aef02b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 16 Jul 2016 19:11:17 -0500 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 -@@ -86,7 +86,7 @@ public class UserCache { +@@ -87,7 +87,7 @@ public class UserCache { }; gameprofilerepository.findProfilesByNames(new String[] { s}, Agent.MINECRAFT, profilelookupcallback); @@ -18,5 +18,5 @@ index 989758cdf..1c619c596 100644 GameProfile gameprofile = new GameProfile(uuid, s); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0148-More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/0148-More-informative-vehicle-moved-wrongly-message.patch index fdcb3005d3..9dad7d8c52 100644 --- a/Spigot-Server-Patches/0148-More-informative-vehicle-moved-wrongly-message.patch +++ b/Spigot-Server-Patches/0148-More-informative-vehicle-moved-wrongly-message.patch @@ -1,22 +1,22 @@ -From 372f6272bcaf410777335b661a2d091b296c12c2 Mon Sep 17 00:00:00 2001 +From c07deef294fa84147dfaf65f385f3ed3e78fc82c Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 28 Jul 2016 17:58:53 -0500 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 @@ -343,7 +343,7 @@ 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 } entity.setLocation(d3, d4, d5, f, f1); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0149-Re-track-players-that-dismount-from-other-players.patch b/Spigot-Server-Patches/0149-Re-track-players-that-dismount-from-other-players.patch index 4da3b93c61..4942fb0293 100644 --- a/Spigot-Server-Patches/0149-Re-track-players-that-dismount-from-other-players.patch +++ b/Spigot-Server-Patches/0149-Re-track-players-that-dismount-from-other-players.patch @@ -1,14 +1,14 @@ -From 470600a7c74fb5ee9f01d43ee827e576c98c722e Mon Sep 17 00:00:00 2001 +From 8a8cc57b3143fb893806580589ec22d297519155 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 31 Jul 2016 16:33:03 -0500 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 -@@ -654,6 +654,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -715,6 +715,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (entity1 != entity && this.playerConnection != null) { this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch); } @@ -23,5 +23,5 @@ index ad1bb7bab..4e8efc549 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0150-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0150-Add-setting-for-proxy-online-mode-status.patch index 343e4f278f..f8df921793 100644 --- a/Spigot-Server-Patches/0150-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0150-Add-setting-for-proxy-online-mode-status.patch @@ -1,4 +1,4 @@ -From c6c96c233b11b2ad11e28e3a11f8a3f7be84440e Mon Sep 17 00:00:00 2001 +From 15f78808f7f1771e1ec4edd29f3fb17bbc2fbf64 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Fri, 5 Aug 2016 01:03:08 +0200 Subject: [PATCH] Add setting for proxy online mode status @@ -19,10 +19,10 @@ 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 -@@ -65,7 +65,8 @@ public class NameReferencingFileConverter { +@@ -66,7 +66,8 @@ public class NameReferencingFileConverter { } }), String.class); @@ -33,10 +33,10 @@ 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 -@@ -1336,7 +1336,8 @@ public final class CraftServer implements Server { +@@ -1314,7 +1314,8 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode @@ -47,5 +47,5 @@ index a958ce998..8ade16865 100644 profile = console.getUserCache().getProfile( name ); } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch index 32469596b0..568d12a94a 100644 --- a/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch +++ b/Spigot-Server-Patches/0153-Fix-AIOOBE-in-inventory-handling.patch @@ -1,14 +1,14 @@ -From 8dae01a4e5890255459de98f20d4bc36d50c0aea Mon Sep 17 00:00:00 2001 +From 08dcbdf8047ae290ac2c4ab36659bf6a1b41823d Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sun, 4 Sep 2016 16:35:43 -0500 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 -@@ -1809,7 +1809,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1816,7 +1816,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { case CLONE: if (packetplayinwindowclick.c() == 2) { click = ClickType.MIDDLE; @@ -18,5 +18,5 @@ index 4b79031f0..060434f32 100644 } else { Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b()); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch index c997561f3b..23879b3a79 100644 --- a/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0154-Configurable-packet-in-spam-threshold.patch @@ -1,4 +1,4 @@ -From b81c66363a4118495a786c69be2c447d6c0c24d7 Mon Sep 17 00:00:00 2001 +From ddf7bf9141ddfb1453d79fbe35f88b1cee457219 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 11 Sep 2016 14:30:57 -0500 Subject: [PATCH] Configurable packet in spam threshold @@ -23,10 +23,10 @@ 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 -@@ -871,13 +871,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -882,13 +882,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // Spigot start - limit place/interactions private int limitedPackets; private long lastLimitedPacket = -1; @@ -44,5 +44,5 @@ index 060434f32..6281fe4d5 100644 limitedPackets = 0; return true; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0155-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0155-Configurable-flying-kick-messages.patch index 4bb2847159..2bbeeb6bf3 100644 --- a/Spigot-Server-Patches/0155-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0155-Configurable-flying-kick-messages.patch @@ -1,4 +1,4 @@ -From 611ccc1d0db15c1a217e6657c25061e186b55fac Mon Sep 17 00:00:00 2001 +From 6e44ed8bac401fbec4992cd29181c000a1473c51 Mon Sep 17 00:00:00 2001 From: kashike Date: Tue, 20 Sep 2016 00:58:01 +0000 Subject: [PATCH] Configurable flying kick messages @@ -21,27 +21,27 @@ 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 @@ -143,7 +143,7 @@ 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 { @@ -162,7 +162,7 @@ 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; } } else { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch b/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch index c243f7732b..1ceab4772c 100644 --- a/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/0156-Auto-Save-Improvements.patch @@ -1,4 +1,4 @@ -From 10bec1ccae8ee9a59d53ee9f8cfd63e25dd672b0 Mon Sep 17 00:00:00 2001 +From e92d02317cc0d4af25558ecd75a66595adb10e22 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Sep 2016 23:16:39 -0400 Subject: [PATCH] Auto Save Improvements @@ -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 @@ -251,4 +251,9 @@ 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 @@ -2,6 +2,7 @@ package com.destroystokyo.paper; @@ -34,10 +34,10 @@ 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; -@@ -359,4 +360,19 @@ public class PaperWorldConfig { + +@@ -360,4 +361,19 @@ public class PaperWorldConfig { private void elytraHitWallDamage() { elytraHitWallDamage = getBoolean("elytra-hit-wall-damage", true); } @@ -58,10 +58,10 @@ 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 -@@ -960,11 +960,9 @@ public class Chunk { +@@ -962,11 +962,9 @@ public class Chunk { if (this.t && this.world.getTime() != this.lastSaved || this.s) { return true; } @@ -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 @@ -1,5 +1,6 @@ @@ -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 @@ -32,6 +32,7 @@ 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 -@@ -118,6 +118,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -118,6 +118,7 @@ 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(); -@@ -765,22 +766,30 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -765,22 +766,30 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs this.q.b().a(agameprofile); } @@ -155,10 +155,10 @@ 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 -@@ -330,6 +330,7 @@ public abstract class PlayerList { +@@ -339,6 +339,7 @@ public abstract class PlayerList { } protected void savePlayerFile(EntityPlayer entityplayer) { @@ -166,7 +166,7 @@ index 97322c5da..58f30fb1d 100644 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) this.o.get(entityplayer.getUniqueID()); -@@ -1207,13 +1208,23 @@ public abstract class PlayerList { +@@ -1230,13 +1231,23 @@ public abstract class PlayerList { } @@ -192,10 +192,10 @@ 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 -@@ -1003,8 +1003,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1002,8 +1002,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { ChunkProviderServer chunkproviderserver = this.getChunkProviderServer(); if (chunkproviderserver.e()) { @@ -206,7 +206,7 @@ index f80647b31..914c20282 100644 if (iprogressupdate != null) { iprogressupdate.a("Saving level"); } -@@ -1013,6 +1014,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1012,6 +1013,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (iprogressupdate != null) { iprogressupdate.c("Saving chunks"); } @@ -215,5 +215,5 @@ index f80647b31..914c20282 100644 timings.worldSaveChunks.startTiming(); // Paper chunkproviderserver.a(flag); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch index ab593e8a4c..678d988cfb 100644 --- a/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0157-Chunk-registration-fixes.patch @@ -1,4 +1,4 @@ -From 5b803f915ccef730653e1ea6967e70338823acfc Mon Sep 17 00:00:00 2001 +From 7030da056719aa24e367550279c56f3b5188c17b Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 22:54:28 -0400 Subject: [PATCH] Chunk registration fixes @@ -8,10 +8,10 @@ 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 -@@ -1763,7 +1763,7 @@ public abstract class World implements IBlockAccess { +@@ -1766,7 +1766,7 @@ public abstract class World implements IBlockAccess { } int k = MathHelper.floor(entity.locX / 16.0D); @@ -21,5 +21,5 @@ index 7900fca57..ec0a28cff 100644 if (!entity.aa || entity.ab != k || entity.ac != l || entity.ad != i1) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0159-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0159-Auto-fix-bad-Y-levels-on-player-login.patch index 08afe0ba10..f95eeb2409 100644 --- a/Spigot-Server-Patches/0159-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0159-Auto-fix-bad-Y-levels-on-player-login.patch @@ -1,4 +1,4 @@ -From d457b6a577beb04924db4c75c5bb610a7cad5172 Mon Sep 17 00:00:00 2001 +From 552adcd953a3950a22637c5b6955d3ef35f05edb Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 23:48:39 -0400 Subject: [PATCH] Auto fix bad Y levels on player login @@ -6,17 +6,17 @@ 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 @@ -131,6 +131,7 @@ 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()); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0160-Raise-string-limit-for-packet-serialization.patch b/Spigot-Server-Patches/0160-Raise-string-limit-for-packet-serialization.patch index 327cd74605..aa30cb5b47 100644 --- a/Spigot-Server-Patches/0160-Raise-string-limit-for-packet-serialization.patch +++ b/Spigot-Server-Patches/0160-Raise-string-limit-for-packet-serialization.patch @@ -1,4 +1,4 @@ -From f01e946cd553cc38c4918261a5ce78b14ca9148f Mon Sep 17 00:00:00 2001 +From f1d70755ff2ee54f353515083dab77f31091bf09 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 23:54:20 -0400 Subject: [PATCH] Raise string limit for packet serialization @@ -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 -@@ -297,8 +297,8 @@ public class PacketDataSerializer extends ByteBuf { +@@ -300,8 +300,8 @@ 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 + ")"); @@ -23,5 +23,5 @@ index 7a6619595..68e8c4671 100644 this.d(abyte.length); this.writeBytes(abyte); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0161-Disable-Vanilla-Chunk-GC.patch b/Spigot-Server-Patches/0161-Disable-Vanilla-Chunk-GC.patch index 330b21ef24..df26dabd92 100644 --- a/Spigot-Server-Patches/0161-Disable-Vanilla-Chunk-GC.patch +++ b/Spigot-Server-Patches/0161-Disable-Vanilla-Chunk-GC.patch @@ -1,4 +1,4 @@ -From 4bbddef682f6f34766f801b6d4d44e708ecbc012 Mon Sep 17 00:00:00 2001 +From 1b745cb137123466e9f4fd393e62c33c19ad377d Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 26 Sep 2016 01:51:30 -0400 Subject: [PATCH] Disable Vanilla Chunk GC @@ -6,10 +6,10 @@ 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 -@@ -1020,7 +1020,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1019,7 +1019,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { chunkproviderserver.a(flag); timings.worldSaveChunks.stopTiming(); // Paper // CraftBukkit - ArrayList -> Collection @@ -18,7 +18,7 @@ index 914c20282..fdec385a7 100644 Iterator iterator = arraylist.iterator(); while (iterator.hasNext()) { -@@ -1029,7 +1029,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -1028,7 +1028,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) { chunkproviderserver.unload(chunk); } @@ -29,5 +29,5 @@ index 914c20282..fdec385a7 100644 } } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0162-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0162-Option-to-remove-corrupt-tile-entities.patch index 6a66669b3b..380a32ca2f 100644 --- a/Spigot-Server-Patches/0162-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0162-Option-to-remove-corrupt-tile-entities.patch @@ -1,14 +1,14 @@ -From c6711570e26da30de8b22ada8efc31c8064332b4 Mon Sep 17 00:00:00 2001 +From f5558d815be093515ab77190d076eb74b3f6a3c2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 5 Oct 2016 16:27:36 -0500 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 -@@ -375,4 +375,9 @@ public class PaperWorldConfig { +@@ -376,4 +376,9 @@ public class PaperWorldConfig { private void maxAutoSaveChunksPerTick() { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -19,10 +19,10 @@ 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 -@@ -783,11 +783,17 @@ public class Chunk { +@@ -785,11 +785,17 @@ public class Chunk { "Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16)); e.printStackTrace(); ServerInternalException.reportInternalException(e); @@ -41,5 +41,5 @@ index 9f7f32dc2..d850dbfc3 100644 if (this.j) { TileEntity tileentity = (TileEntity) this.tileEntities.remove(blockposition); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch index 53a79693a7..7af977f3a5 100644 --- a/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0163-Add-EntityZapEvent.patch @@ -1,14 +1,14 @@ -From 1d895849c5a89f88a05f458af94f6b9d803675d0 Mon Sep 17 00:00:00 2001 +From 5ce7fe5db1d223b1ac36137aff1bd8a1e4461fa2 Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Sun, 16 Oct 2016 23:19:30 -0700 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 -@@ -159,6 +159,12 @@ public class EntityPig extends EntityAnimal { +@@ -158,6 +158,12 @@ public class EntityPig extends EntityAnimal { if (!this.world.isClientSide && !this.dead) { EntityPigZombie entitypigzombie = new EntityPigZombie(this.world); @@ -22,10 +22,10 @@ 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 -@@ -616,6 +616,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -622,6 +622,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { if (!this.world.isClientSide && !this.dead) { EntityWitch entitywitch = new EntityWitch(this.world); @@ -38,7 +38,7 @@ index ee11691bf..4ad75468c 100644 entitywitch.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch); entitywitch.prepare(this.world.D(new BlockPosition(entitywitch)), (GroupDataEntity) null); entitywitch.setAI(this.hasAI()); -@@ -624,7 +630,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -630,7 +636,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { entitywitch.setCustomNameVisible(this.getCustomNameVisible()); } @@ -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 @@ -673,6 +673,14 @@ public class CraftEventFactory { @@ -67,5 +67,5 @@ index 8158c4801..d77eefd6f 100644 HorseJumpEvent event = new HorseJumpEvent((AbstractHorse) horse.getBukkitEntity(), power); horse.getBukkitEntity().getServer().getPluginManager().callEvent(event); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0165-Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/0165-Prevent-Auto-Save-if-Save-Queue-is-full.patch index 684f7b50a5..78a0439d44 100644 --- a/Spigot-Server-Patches/0165-Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/0165-Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -1,4 +1,4 @@ -From e58b0d4d3e4c3ead75b9d947c623d2a4c3f5a2c8 Mon Sep 17 00:00:00 2001 +From 258b2a40f850ae17e9aca913180cd248e3d87dcd Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Nov 2016 21:52:22 -0400 Subject: [PATCH] Prevent Auto Save if Save Queue is full @@ -7,10 +7,10 @@ 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 -@@ -376,6 +376,11 @@ public class PaperWorldConfig { +@@ -377,6 +377,11 @@ public class PaperWorldConfig { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -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 @@ -254,6 +254,14 @@ 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 @@ -32,6 +32,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -64,5 +64,5 @@ index 90d069539..895882b2e 100644 @Nullable public Chunk a(World world, int i, int j) throws IOException { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0167-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/0167-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index 91bfa3f733..fbb5a99185 100644 --- a/Spigot-Server-Patches/0167-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/Spigot-Server-Patches/0167-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -1,14 +1,22 @@ -From 93024000bb59f83c6c3e82e9763eba5932602285 Mon Sep 17 00:00:00 2001 +From 2efeeaec765a535034aa810219995b28d35d627c Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 12 Nov 2016 23:25:22 -0600 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 -@@ -385,4 +385,12 @@ public class PaperWorldConfig { +@@ -3,6 +3,7 @@ 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; + +@@ -386,4 +387,12 @@ public class PaperWorldConfig { private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); } @@ -22,10 +30,10 @@ 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 -@@ -251,6 +251,14 @@ public class EntityFallingBlock extends Entity { +@@ -271,6 +271,14 @@ public class EntityFallingBlock extends Entity { this.block = Block.getById(nbttagcompound.getByte("Tile") & 255).fromLegacyData(i); } @@ -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 @@ -102,7 +102,14 @@ 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")); @@ -61,5 +69,5 @@ index 1a01a57d2..f914ad417 100644 entity.f(nbttagcompound1); } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0169-Optimize-Network-Queue.patch b/Spigot-Server-Patches/0169-Optimize-Network-Queue.patch index 575aeb357f..aab15dd04e 100644 --- a/Spigot-Server-Patches/0169-Optimize-Network-Queue.patch +++ b/Spigot-Server-Patches/0169-Optimize-Network-Queue.patch @@ -1,14 +1,14 @@ -From 6db31d93eadd2ffae7b1d5816003322da14fd719 Mon Sep 17 00:00:00 2001 +From 0f8e81d8128805528f3da4b437cd981e49ef794c Mon Sep 17 00:00:00 2001 From: vemacs Date: Wed, 23 Nov 2016 12:54:56 -0500 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 -@@ -103,7 +103,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -103,7 +103,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs private final GameProfileRepository X; private final UserCache Y; private long Z; @@ -18,5 +18,5 @@ index 8134501c7..8df30e3d0 100644 private long ab = aw(); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0170-Optimise-NetworkManager.patch b/Spigot-Server-Patches/0170-Optimise-NetworkManager.patch index cc8a649f43..9b56149d5b 100644 --- a/Spigot-Server-Patches/0170-Optimise-NetworkManager.patch +++ b/Spigot-Server-Patches/0170-Optimise-NetworkManager.patch @@ -1,11 +1,11 @@ -From 7c2676da97136793b6b5c32c9f7770cdd7433e7e Mon Sep 17 00:00:00 2001 +From f4386bf9889ec25011969dbd83bf9b4fafba8d6d Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Fri, 25 Nov 2016 20:35:05 +0000 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 @@ -62,8 +62,8 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -19,7 +19,7 @@ index 184ef32a8..be14c0b25 100644 public Channel channel; // Spigot Start // PAIL public SocketAddress l; -@@ -141,32 +141,36 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -141,32 +141,14 @@ public class NetworkManager extends SimpleChannelInboundHandler> { if (this.isConnected()) { this.m(); this.a(packet, (GenericFutureListener[]) null); @@ -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,21 +49,10 @@ 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) { -@@ -211,20 +215,22 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -211,20 +193,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } private void m() { @@ -92,26 +70,11 @@ 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() { -@@ -317,7 +323,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -320,7 +289,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } else if (this.i() != null) { this.i().a(new ChatComponentText("Disconnected")); } @@ -121,5 +84,5 @@ index 184ef32a8..be14c0b25 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0171-Optimise-removeQueue.patch b/Spigot-Server-Patches/0171-Optimise-removeQueue.patch index bd42c2de1d..a30d4ee995 100644 --- a/Spigot-Server-Patches/0171-Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/0171-Optimise-removeQueue.patch @@ -1,33 +1,34 @@ -From 590f1a604da843d882d511958377ec6bfa13bb3e Mon Sep 17 00:00:00 2001 +From 900cbba0bf66c04a6f65d358b08f39f7c38f2896 Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Fri, 25 Nov 2016 13:22:40 +0000 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 -@@ -4,7 +4,9 @@ import com.google.common.collect.Lists; - import com.google.common.collect.Sets; +@@ -3,8 +3,10 @@ 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; @@ -38,7 +40,7 @@ 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; -@@ -251,10 +253,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + private final AdvancementDataPlayer bZ; + private final ServerStatisticManager ca; + private float cb = Float.MIN_VALUE; +@@ -286,10 +288,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { Iterator iterator = this.removeQueue.iterator(); int j = 0; @@ -46,20 +47,19 @@ index eca224bdb..58d40f994 100644 this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } -@@ -995,7 +1004,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.lastSentExp = -1; +@@ -1097,7 +1106,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { 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()); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0172-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0172-Allow-Reloading-of-Command-Aliases.patch index a6532b23ef..bc7d375adc 100644 --- a/Spigot-Server-Patches/0172-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0172-Allow-Reloading-of-Command-Aliases.patch @@ -1,4 +1,4 @@ -From 5f05d8d730fadd1de8f2b8a1ffdae85e73f59d47 Mon Sep 17 00:00:00 2001 +From ed2932c761272cd0ce798ba728fa65606a2817ab Mon Sep 17 00:00:00 2001 From: willies952002 Date: Mon, 28 Nov 2016 10:21:52 -0500 Subject: [PATCH] Allow Reloading of Command Aliases @@ -6,10 +6,10 @@ 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 -@@ -1852,5 +1852,24 @@ public final class CraftServer implements Server { +@@ -1838,5 +1838,24 @@ public final class CraftServer implements Server { }); } } @@ -35,5 +35,5 @@ index 8ade16865..326196ce4 100644 // Paper end } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0174-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0174-Optimize-World.isLoaded-BlockPosition-Z.patch index f465838b3a..52ab652ca5 100644 --- a/Spigot-Server-Patches/0174-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0174-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -1,4 +1,4 @@ -From 137eaf141e58f37e6faed980ff5da54fe3af19c8 Mon Sep 17 00:00:00 2001 +From 8ecee9a6e7e72cdb59078d9d9fa46ef93ea1ac8e Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 2 Dec 2016 00:11:43 -0500 Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z @@ -6,10 +6,10 @@ 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 -@@ -286,7 +286,7 @@ public abstract class World implements IBlockAccess { +@@ -288,7 +288,7 @@ public abstract class World implements IBlockAccess { } public boolean isLoaded(BlockPosition blockposition) { @@ -19,5 +19,5 @@ index ec0a28cff..2fa63a27f 100644 public boolean a(BlockPosition blockposition, boolean flag) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch index e2bf832618..c9b7210338 100644 --- a/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0176-Don-t-let-fishinghooks-use-portals.patch @@ -1,14 +1,14 @@ -From eb98988832cfa45d91fdafe9f11e2ad7535a7ad6 Mon Sep 17 00:00:00 2001 +From 23a9480ea73edb509eb133e92e578716a845b593 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 16 Dec 2016 16:03:19 -0600 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 -@@ -143,7 +143,7 @@ public abstract class Entity implements ICommandListener { +@@ -144,7 +144,7 @@ public abstract class Entity implements ICommandListener { public boolean ah; public boolean impulse; public int portalCooldown; @@ -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 @@ -185,6 +185,12 @@ public class EntityFishingHook extends Entity { @@ -35,5 +35,5 @@ index 0c528c699..606160a17 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch index 6326dd4955..ed6632651b 100644 --- a/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0178-Vanished-players-don-t-have-rights.patch @@ -1,11 +1,11 @@ -From 38a9642500cf81514132e024d64d567d2b3c0d06 Mon Sep 17 00:00:00 2001 +From e67671b85aa7f183c588d8c6180081451b532cd8 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 16 Dec 2016 22:10:35 -0600 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 @@ -68,7 +68,7 @@ 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 @@ -20,7 +20,7 @@ public class ItemBlock extends Item { @@ -31,10 +31,10 @@ 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 -@@ -1799,6 +1799,33 @@ public abstract class World implements IBlockAccess { +@@ -1802,6 +1802,33 @@ public abstract class World implements IBlockAccess { return this.a(axisalignedbb, (Entity) null); } @@ -68,7 +68,7 @@ index 2fa63a27f..7af76e14c 100644 public boolean a(AxisAlignedBB axisalignedbb, @Nullable Entity entity) { List list = this.getEntities((Entity) null, axisalignedbb); -@@ -2683,7 +2710,7 @@ public abstract class World implements IBlockAccess { +@@ -2686,7 +2713,7 @@ public abstract class World implements IBlockAccess { AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition); // CraftBukkit start - store default return @@ -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 @@ -799,6 +799,13 @@ public class CraftEventFactory { @@ -96,5 +96,5 @@ index e669f0878..afdd4ab70 100644 return event; } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0179-Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/0179-Prevent-Pathfinding-out-of-World-Border.patch index 774907924c..f46292deb9 100644 --- a/Spigot-Server-Patches/0179-Prevent-Pathfinding-out-of-World-Border.patch +++ b/Spigot-Server-Patches/0179-Prevent-Pathfinding-out-of-World-Border.patch @@ -1,4 +1,4 @@ -From 707e8ba0eb6ac3a183cf727f1c4d50f260bf8202 Mon Sep 17 00:00:00 2001 +From cef4b63524aa2de88749196ee51b6127a72ef518 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Dec 2016 23:07:42 -0500 Subject: [PATCH] Prevent Pathfinding out of World Border @@ -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 @@ -69,6 +69,7 @@ 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; @@ -39,5 +39,5 @@ index 9038d52eb..632eb1c9d 100644 } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0180-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0180-Bound-Treasure-Maps-to-World-Border.patch index e0e8211541..7850f4af75 100644 --- a/Spigot-Server-Patches/0180-Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/0180-Bound-Treasure-Maps-to-World-Border.patch @@ -1,4 +1,4 @@ -From 45d3e0ca5f29f36d42f5accd1002ef28e8154f4c Mon Sep 17 00:00:00 2001 +From acd69117c42f88022a08e265e5e8c9a3364163a7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:15:11 -0500 Subject: [PATCH] Bound Treasure Maps to World Border @@ -11,10 +11,10 @@ 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 -@@ -233,6 +233,9 @@ public abstract class StructureGenerator extends WorldGenBase { +@@ -236,6 +236,9 @@ public abstract class StructureGenerator extends WorldGenBase { WorldGenBase.a(world.getSeed(), random, l2, i3); random.nextInt(); @@ -48,5 +48,5 @@ index 632eb1c9d..1bb172bbf 100644 return (double) chunkcoordintpair.e() > this.b() && (double) chunkcoordintpair.c() < this.d() && (double) chunkcoordintpair.f() > this.c() && (double) chunkcoordintpair.d() < this.e(); } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0181-Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/0181-Configurable-Cartographer-Treasure-Maps.patch index 582d0eb35d..40e2056b56 100644 --- a/Spigot-Server-Patches/0181-Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/0181-Configurable-Cartographer-Treasure-Maps.patch @@ -1,4 +1,4 @@ -From 19688088dfd7942c87b2edf2d023023ce5779d42 Mon Sep 17 00:00:00 2001 +From ae96f169ae42891ad59a56c4b21a4718a7778ce7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:26:27 -0500 Subject: [PATCH] Configurable Cartographer Treasure Maps @@ -9,10 +9,10 @@ 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 -@@ -393,4 +393,14 @@ public class PaperWorldConfig { +@@ -395,4 +395,14 @@ public class PaperWorldConfig { Bukkit.getLogger().warning("Spawn Egg and Armor Stand NBT filtering disabled, this is a potential security risk"); } } @@ -28,19 +28,18 @@ 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 -@@ -761,7 +761,8 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { +@@ -767,7 +767,7 @@ 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); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0182-Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/0182-Optimize-ItemStack.isEmpty.patch index db9d36cf21..8a06093fb1 100644 --- a/Spigot-Server-Patches/0182-Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/0182-Optimize-ItemStack.isEmpty.patch @@ -1,4 +1,4 @@ -From edad739b97db0413196220e110ae87f18f782a13 Mon Sep 17 00:00:00 2001 +From 196a410aab74a69d80257cc6b113de21783a148d Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Dec 2016 03:48:29 -0500 Subject: [PATCH] Optimize ItemStack.isEmpty() @@ -6,10 +6,10 @@ 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 -@@ -120,9 +120,15 @@ public final class ItemStack { +@@ -126,9 +126,15 @@ public final class ItemStack { this.F(); } @@ -27,5 +27,5 @@ index aca63be53..548da18e0 100644 public static void a(DataConverterManager dataconvertermanager) { dataconvertermanager.a(DataConverterTypes.ITEM_INSTANCE, (DataInspector) (new DataInspectorBlockEntity())); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0183-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/0183-Add-API-methods-to-control-if-armour-stands-can-move.patch index 5fb2fb3269..e60ac33610 100644 --- a/Spigot-Server-Patches/0183-Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/0183-Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -1,11 +1,11 @@ -From 7fba4ae4accab404b762be87d632d645c9b067c0 Mon Sep 17 00:00:00 2001 +From 4b4bb09347b4f7639d596d2fa23dfe526741782b Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 21 Dec 2016 11:47:25 -0600 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 @@ -50,6 +50,7 @@ public class EntityArmorStand extends EntityLiving { @@ -16,8 +16,8 @@ index 96bb11005..7738ca385 100644 public EntityArmorStand(World world) { super(world); -@@ -763,4 +764,13 @@ public class EntityArmorStand extends EntityLiving { - public boolean cK() { +@@ -762,4 +763,13 @@ public class EntityArmorStand extends EntityLiving { + public boolean cQ() { return false; } + @@ -50,5 +50,5 @@ index 2b66a08ad..8a06cb165 100644 + } } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0184-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0184-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index e0856ef943..727489c9a7 100644 --- a/Spigot-Server-Patches/0184-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0184-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -1,14 +1,14 @@ -From 46d75afb644e494d0ca3527f0eb81c7ab7cfea93 Mon Sep 17 00:00:00 2001 +From 28d2088321eeca0098213c900e2619bfdcba975f Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 21 Dec 2016 11:52:04 -0600 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 -@@ -403,4 +403,9 @@ public class PaperWorldConfig { +@@ -405,4 +405,9 @@ public class PaperWorldConfig { log("Treasure Maps will return already discovered locations"); } } @@ -19,10 +19,10 @@ 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 -@@ -1331,6 +1331,7 @@ public abstract class World implements IBlockAccess { +@@ -1334,6 +1334,7 @@ public abstract class World implements IBlockAccess { this.a(entity, axisalignedbb, false, arraylist); if (entity != null) { @@ -31,5 +31,5 @@ index 7af76e14c..2028cf81e 100644 for (int i = 0; i < list.size(); ++i) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0185-Add-option-to-remove-invalid-statistics.patch b/Spigot-Server-Patches/0185-Add-option-to-remove-invalid-statistics.patch index 0d3a179c79..57fa96780a 100644 --- a/Spigot-Server-Patches/0185-Add-option-to-remove-invalid-statistics.patch +++ b/Spigot-Server-Patches/0185-Add-option-to-remove-invalid-statistics.patch @@ -1,4 +1,4 @@ -From feb9583705667c98cf1be70c3c4e42a062b96ce8 Mon Sep 17 00:00:00 2001 +From 37adfdc80fd23c11c9626a9225729c691b208258 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 20 Dec 2016 23:09:21 -0600 Subject: [PATCH] Add option to remove invalid statistics @@ -23,10 +23,10 @@ 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 -@@ -104,6 +104,7 @@ public class ServerStatisticManager extends StatisticManager { +@@ -86,6 +86,7 @@ public class ServerStatisticManager extends StatisticManager { JsonObject jsonobject = jsonelement.getAsJsonObject(); HashMap hashmap = Maps.newHashMap(); Iterator iterator = jsonobject.entrySet().iterator(); @@ -34,10 +34,10 @@ index 99466dbde..d1bee0257 100644 while (iterator.hasNext()) { Entry entry = (Entry) iterator.next(); -@@ -137,9 +138,17 @@ public class ServerStatisticManager extends StatisticManager { +@@ -119,9 +120,17 @@ 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 } } @@ -53,5 +53,5 @@ index 99466dbde..d1bee0257 100644 } } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0186-IllegalPacketEvent.patch b/Spigot-Server-Patches/0186-IllegalPacketEvent.patch index d54ae48620..a319090384 100644 --- a/Spigot-Server-Patches/0186-IllegalPacketEvent.patch +++ b/Spigot-Server-Patches/0186-IllegalPacketEvent.patch @@ -1,4 +1,4 @@ -From abc6c09bbf47a3db7b6c4360f253ed58fcfa3148 Mon Sep 17 00:00:00 2001 +From 586ee1ef21797f6f342b7ba3812b8a356d687ef3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 23 Jun 2016 23:33:57 -0400 Subject: [PATCH] IllegalPacketEvent @@ -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 @@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -17,7 +17,7 @@ index 3946ee6e5..4a3b7be2a 100644 import co.aikar.timings.MinecraftTimings; // Paper // CraftBukkit end -@@ -2236,8 +2237,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2316,8 +2317,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit } } catch (Exception exception) { @@ -27,7 +27,7 @@ index 3946ee6e5..4a3b7be2a 100644 } } else { String s1; -@@ -2286,8 +2286,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2366,8 +2366,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit } } catch (Exception exception1) { @@ -37,7 +37,7 @@ index 3946ee6e5..4a3b7be2a 100644 } } else if ("MC|TrSel".equals(s)) { try { -@@ -2298,8 +2297,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2378,8 +2377,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { ((ContainerMerchant) container).d(j); } } catch (Exception exception2) { @@ -47,7 +47,7 @@ index 3946ee6e5..4a3b7be2a 100644 } } else { TileEntity tileentity; -@@ -2440,8 +2438,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2520,8 +2518,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { iinventory.update(); } } catch (Exception exception5) { @@ -57,7 +57,7 @@ index 3946ee6e5..4a3b7be2a 100644 } } } else if ("MC|ItemName".equals(s)) { -@@ -2540,8 +2537,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2620,8 +2617,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(-2, k, this.player.inventory.getItem(k))); this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex)); } catch (Exception exception7) { @@ -68,5 +68,5 @@ index 3946ee6e5..4a3b7be2a 100644 } // CraftBukkit start -- -2.13.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch index 5c4cd47e00..e4c462c91e 100644 --- a/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0187-Properly-fix-item-duplication-bug.patch @@ -1,4 +1,4 @@ -From 9db20c658bcd925e9cb8ba9170bb2f57bedae042 Mon Sep 17 00:00:00 2001 +From 0dcf2c05abc7b96dacaeefcfa8bc51bd693f47e5 Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Tue, 27 Dec 2016 01:57:57 +0000 Subject: [PATCH] Properly fix item duplication bug @@ -6,10 +6,10 @@ 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 -@@ -1346,7 +1346,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1477,7 +1477,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { @@ -19,10 +19,10 @@ 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 -@@ -2580,6 +2580,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2660,6 +2660,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit start - Add "isDisconnected" method public final boolean isDisconnected() { @@ -31,5 +31,5 @@ index 4a3b7be2a..d1b27c220 100644 } } -- -2.13.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0188-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0188-String-based-Action-Bar-API.patch index 57686181b7..2e6d01ab12 100644 --- a/Spigot-Server-Patches/0188-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0188-String-based-Action-Bar-API.patch @@ -1,4 +1,4 @@ -From fae815991d4346aba2ebd7615b6038aa39048961 Mon Sep 17 00:00:00 2001 +From c99f48d9799da82dbce8bf989e775e9159e09c64 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Dec 2016 15:02:42 -0500 Subject: [PATCH] String based Action Bar API @@ -62,16 +62,16 @@ 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 -@@ -165,6 +165,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -173,6 +173,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start @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 @@ -85,5 +85,5 @@ index 61c32223d..072b59125 100644 PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter(); packet.header = header; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0189-Activation-Range-Improvements.patch b/Spigot-Server-Patches/0189-Activation-Range-Improvements.patch index 54ff52e728..139cd06820 100644 --- a/Spigot-Server-Patches/0189-Activation-Range-Improvements.patch +++ b/Spigot-Server-Patches/0189-Activation-Range-Improvements.patch @@ -1,4 +1,4 @@ -From ece09938de2d54fdb086c03f4e266db8e5bfa191 Mon Sep 17 00:00:00 2001 +From 68cdac4d3d6d018abe0cb1a307181b998c784acb Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Dec 2016 22:38:06 -0500 Subject: [PATCH] Activation Range Improvements @@ -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 @@ -10,6 +10,7 @@ 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 @@ -73,7 +73,7 @@ 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 -@@ -363,7 +363,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn +@@ -363,6 +363,7 @@ 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 -@@ -20,7 +20,7 @@ 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; +@@ -294,6 +294,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant { + 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 @@ -20,6 +20,7 @@ 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() ) { @@ -155,5 +153,5 @@ index c8a6ff3d4..428912cbc 100644 { EntityAnimal animal = (EntityAnimal) entity; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0190-Firework-API-s.patch b/Spigot-Server-Patches/0190-Firework-API-s.patch index 019ef30435..effc603ee1 100644 --- a/Spigot-Server-Patches/0190-Firework-API-s.patch +++ b/Spigot-Server-Patches/0190-Firework-API-s.patch @@ -1,11 +1,11 @@ -From 1782bd7ccc4654e2402a73990ec26b47e58c1faf Mon Sep 17 00:00:00 2001 +From 1d664d9326e3b0efc0924d92a47926ab2420661f Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 28 Dec 2016 01:18:33 -0500 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 @@ -2,6 +2,8 @@ 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 @@ -9,6 +9,7 @@ public class ItemFireworks extends Item { @@ -73,10 +73,10 @@ 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 -@@ -103,7 +103,7 @@ public class NBTTagCompound extends NBTBase { +@@ -106,7 +106,7 @@ public class NBTTagCompound extends NBTBase { return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); } @@ -129,5 +129,5 @@ index 99746b3c2..d4fbe31d6 100644 + // Paper end } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0191-Change-Outdated-Build-Download-URL-to-Paper-CI.patch b/Spigot-Server-Patches/0191-Change-Outdated-Build-Download-URL-to-Paper-CI.patch index a9dcd6b0af..7d00b7f40b 100644 --- a/Spigot-Server-Patches/0191-Change-Outdated-Build-Download-URL-to-Paper-CI.patch +++ b/Spigot-Server-Patches/0191-Change-Outdated-Build-Download-URL-to-Paper-CI.patch @@ -1,15 +1,15 @@ -From cc1f75b2bba9893a74cbb47ccf06f69a3b7b304c Mon Sep 17 00:00:00 2001 +From 2fb6c517d2ebeb3622759755b53c1e29712c4c93 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 29 Dec 2016 00:56:51 -0500 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 @@ -200,7 +200,7 @@ 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/ ***"); @@ -18,5 +18,5 @@ index 59d4e2e6f..e4ec213e4 100644 Thread.sleep(TimeUnit.SECONDS.toMillis(15)); } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0192-PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0192-PlayerTeleportEndGatewayEvent.patch index d790121e1e..ff4ca4f2cd 100644 --- a/Spigot-Server-Patches/0192-PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/0192-PlayerTeleportEndGatewayEvent.patch @@ -1,4 +1,4 @@ -From 5ee9d8161b863c2c9885a8cea9b5040eee7ba615 Mon Sep 17 00:00:00 2001 +From dd60ddf86eb7eb05ebc0322131914a4639ab561b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 31 Dec 2016 21:44:50 -0500 Subject: [PATCH] PlayerTeleportEndGatewayEvent @@ -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 @@ -124,7 +124,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick @@ -19,5 +19,5 @@ index 065d0bbfc..ea8992d72 100644 if (teleEvent.isCancelled()) { return; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch b/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch index 966d95f596..f4d5b70b60 100644 --- a/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch +++ b/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch @@ -1,4 +1,4 @@ -From ce7f24eb9d636fa03187f7702aa92477144b4856 Mon Sep 17 00:00:00 2001 +From 2f323655c172118c9ceacf8e7fc3ef927eb5d8f1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 2 Jan 2017 02:07:24 -0500 Subject: [PATCH] MC-111699: Ignore Improper Anvil Item Name Packets @@ -11,10 +11,10 @@ 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 -@@ -2449,7 +2449,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2529,7 +2529,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767)); if (s4.length() <= 30) { @@ -24,5 +24,5 @@ index 7c2d43ac2..cbe5d36d0 100644 } else { containeranvil.a(""); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch b/Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch index be3a240615..83866368f4 100644 --- a/Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch +++ b/Spigot-Server-Patches/0194-MC-112017-Allow-31-instead-of-30-for-item-names.patch @@ -1,14 +1,14 @@ -From 2ec00efd9cad44ca32949b15a31657c0a399e56a Mon Sep 17 00:00:00 2001 +From e02df5ced19ad774237a5a59e10648bdc4221a27 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 2 Jan 2017 02:43:22 -0500 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 -@@ -2448,7 +2448,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2528,7 +2528,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { if (packetplayincustompayload.b() != null && packetplayincustompayload.b().readableBytes() >= 1) { String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767)); @@ -18,5 +18,5 @@ index cbe5d36d0..70af4ebbb 100644 } } else { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0195-ShulkerBox-Dupe-Prevention.patch b/Spigot-Server-Patches/0195-ShulkerBox-Dupe-Prevention.patch index 105814de5a..033b9549cd 100644 --- a/Spigot-Server-Patches/0195-ShulkerBox-Dupe-Prevention.patch +++ b/Spigot-Server-Patches/0195-ShulkerBox-Dupe-Prevention.patch @@ -1,4 +1,4 @@ -From 734e63826e99e2f419b7658200efa0200fb7fc7f Mon Sep 17 00:00:00 2001 +From 70ea5a7f810ccde254307100cb4b3e2468e75b2e Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 2 Jan 2017 16:32:56 -0500 Subject: [PATCH] ShulkerBox Dupe Prevention @@ -7,10 +7,10 @@ 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 -@@ -109,6 +109,7 @@ public class BlockShulkerBox extends BlockTileEntity { +@@ -112,6 +112,7 @@ public class BlockShulkerBox extends BlockTileEntity { } a(world, blockposition, itemstack); @@ -19,5 +19,5 @@ index fcb1a6c66..12fb81635 100644 world.updateAdjacentComparators(blockposition, iblockdata.getBlock()); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0196-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0196-Provide-E-TE-Chunk-count-stat-methods.patch index 351e106193..e07e0503cf 100644 --- a/Spigot-Server-Patches/0196-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0196-Provide-E-TE-Chunk-count-stat-methods.patch @@ -1,4 +1,4 @@ -From afb3ac542cfec82549caa96fcc3dfccacf438cc8 Mon Sep 17 00:00:00 2001 +From d8cac48080c65ec26b73eaa47d099a253fc02677 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 15:24:46 -0500 Subject: [PATCH] Provide E/TE/Chunk count stat methods @@ -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 @@ -78,6 +78,29 @@ public class CraftWorld implements World { @@ -41,5 +41,5 @@ index 3f8859a1f..b42074706 100644 public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0197-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0197-Enforce-Sync-Player-Saves.patch index 068576f0e6..b3ded4b574 100644 --- a/Spigot-Server-Patches/0197-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0197-Enforce-Sync-Player-Saves.patch @@ -1,4 +1,4 @@ -From 5c5c9996f55ce482651fc8040a0c2dac74c855fb Mon Sep 17 00:00:00 2001 +From 705f3fa5e11e66ad53b063acf48c4ac30c964f3f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 15:41:58 -0500 Subject: [PATCH] Enforce Sync Player Saves @@ -7,10 +7,10 @@ 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 -@@ -1214,6 +1214,7 @@ public abstract class PlayerList { +@@ -1237,6 +1237,7 @@ public abstract class PlayerList { } public void savePlayers(Integer interval) { @@ -18,7 +18,7 @@ index 58f30fb1d..034bdb7cf 100644 long now = MinecraftServer.currentTick; MinecraftTimings.savePlayers.startTiming(); // Paper for (int i = 0; i < this.players.size(); ++i) { -@@ -1223,6 +1224,7 @@ public abstract class PlayerList { +@@ -1246,6 +1247,7 @@ public abstract class PlayerList { } } MinecraftTimings.savePlayers.stopTiming(); // Paper @@ -27,5 +27,5 @@ index 58f30fb1d..034bdb7cf 100644 // Paper end -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0198-Enforce-Sync-Chunk-Unloads.patch b/Spigot-Server-Patches/0198-Enforce-Sync-Chunk-Unloads.patch index 11a2ad60a9..b729c21276 100644 --- a/Spigot-Server-Patches/0198-Enforce-Sync-Chunk-Unloads.patch +++ b/Spigot-Server-Patches/0198-Enforce-Sync-Chunk-Unloads.patch @@ -1,4 +1,4 @@ -From b4feab297b843a3dc57696fb729ae04be178ae1b Mon Sep 17 00:00:00 2001 +From 5abfe0bb4d3b82b1e0ae4519f32cd6ad047800da Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 16:06:44 -0500 Subject: [PATCH] Enforce Sync Chunk Unloads @@ -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 @@ -238,6 +238,7 @@ public class CraftWorld implements World { @@ -27,5 +27,5 @@ index b42074706..b837a921c 100644 public boolean regenerateChunk(int x, int z) { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0199-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0199-Don-t-allow-entities-to-ride-themselves-572.patch index b83681702e..02c67d61b6 100644 --- a/Spigot-Server-Patches/0199-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0199-Don-t-allow-entities-to-ride-themselves-572.patch @@ -1,21 +1,21 @@ -From 67d9588c6d98e7b5778165506b5cc23dea4458d5 Mon Sep 17 00:00:00 2001 +From 41e34cb1a54b0b06cdbee8133a921d5ead9f2d56 Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Sun, 8 Jan 2017 04:31:36 +0000 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 -@@ -1917,6 +1917,7 @@ public abstract class Entity implements ICommandListener { +@@ -1932,6 +1932,7 @@ public abstract class Entity implements ICommandListener { } 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 { -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0200-Fix-block-break-desync.patch b/Spigot-Server-Patches/0200-Fix-block-break-desync.patch index 6237f54e61..0f2cb428e5 100644 --- a/Spigot-Server-Patches/0200-Fix-block-break-desync.patch +++ b/Spigot-Server-Patches/0200-Fix-block-break-desync.patch @@ -1,14 +1,14 @@ -From a95785c0f55d02b60c044ddf89ac3c59e68c8c1f Mon Sep 17 00:00:00 2001 +From 04cdbd2f05f55336d24d1c5a7202f432bc1e6fdb Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Sun, 8 Jan 2017 18:50:35 +1100 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 -@@ -830,6 +830,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -841,6 +841,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { double d3 = d0 * d0 + d1 * d1 + d2 * d2; if (d3 > 36.0D) { @@ -17,5 +17,5 @@ index 70af4ebbb..0e2f43b96 100644 } else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) { return; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0201-Assign-the-World-in-WorldGenStronghold.patch b/Spigot-Server-Patches/0201-Assign-the-World-in-WorldGenStronghold.patch index 42f28093a2..875ca684a3 100644 --- a/Spigot-Server-Patches/0201-Assign-the-World-in-WorldGenStronghold.patch +++ b/Spigot-Server-Patches/0201-Assign-the-World-in-WorldGenStronghold.patch @@ -1,4 +1,4 @@ -From b1ccee575e8f9add6c6291635bd8448320047218 Mon Sep 17 00:00:00 2001 +From 2584f2a43ff84bf1511982c31e4aa486a7591648 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 14 Jan 2017 01:22:07 -0600 Subject: [PATCH] Assign the World in WorldGenStronghold @@ -17,5 +17,5 @@ index c93754704..a3b958e01 100644 this.c(); this.b = true; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0202-Add-fromBottle-flag-to-Experience-Orbs.patch b/Spigot-Server-Patches/0202-Add-fromBottle-flag-to-Experience-Orbs.patch index e5ea9fa2b0..463b82163e 100644 --- a/Spigot-Server-Patches/0202-Add-fromBottle-flag-to-Experience-Orbs.patch +++ b/Spigot-Server-Patches/0202-Add-fromBottle-flag-to-Experience-Orbs.patch @@ -1,11 +1,11 @@ -From 4c1854850ad87d0ed98b9d8928f34dc9f0e6b80d Mon Sep 17 00:00:00 2001 +From 63ae5b4d30b267fadb29c296b011b363297ddf3d Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 14 Jan 2017 16:15:26 -0600 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 @@ -15,6 +15,14 @@ public class EntityExperienceOrb extends Entity { @@ -68,5 +68,5 @@ index 3a09cab3d..61e3c6c3e 100644 public EntityExperienceOrb getHandle() { return (EntityExperienceOrb) entity; -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0203-Remove-the-Vanilla-Method-Profiler.patch b/Spigot-Server-Patches/0203-Remove-the-Vanilla-Method-Profiler.patch index a59ca26db4..a4cf914a2b 100644 --- a/Spigot-Server-Patches/0203-Remove-the-Vanilla-Method-Profiler.patch +++ b/Spigot-Server-Patches/0203-Remove-the-Vanilla-Method-Profiler.patch @@ -1,4 +1,4 @@ -From cc3ecd92e74492a59cfe82650919b1217fc5d4c9 Mon Sep 17 00:00:00 2001 +From b935b5011a9c2baba9f8e995eef8aca014cd5c5a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jan 2017 02:00:33 -0500 Subject: [PATCH] Remove the Vanilla Method Profiler @@ -11,10 +11,10 @@ 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 -@@ -33,12 +33,11 @@ public class CommandDebug extends CommandAbstract { +@@ -35,12 +35,11 @@ public class CommandDebug extends CommandAbstract { public void execute(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring) throws CommandException { // CraftBukkit start - only allow use when enabled (so that no blank profile results occur) @@ -30,7 +30,7 @@ index fe58d428f..938f62f83 100644 // CraftBukkit end if (astring.length < 1) { throw new ExceptionUsage("commands.debug.usage", new Object[0]); -@@ -144,7 +143,7 @@ public class CommandDebug extends CommandAbstract { +@@ -146,7 +145,7 @@ public class CommandDebug extends CommandAbstract { return astring[(int) (System.nanoTime() % (long) astring.length)]; } catch (Throwable throwable) { return "Witty comment unavailable :("; @@ -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 @@ -9,8 +9,9 @@ import java.util.List; @@ -79,5 +79,5 @@ index 654652916..276983485 100644 + } +} -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0204-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0204-Cap-Entity-Collisions.patch index 97e6f5e09e..664d95486d 100644 --- a/Spigot-Server-Patches/0204-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0204-Cap-Entity-Collisions.patch @@ -1,4 +1,4 @@ -From 17c4817e7cc69541d08fa475e712265fd57e9447 Mon Sep 17 00:00:00 2001 +From 32eddc734b4f69b74edd9273e924dce86dd14dda Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jan 2017 18:07:56 -0500 Subject: [PATCH] Cap Entity Collisions @@ -12,10 +12,10 @@ 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 -@@ -408,4 +408,10 @@ public class PaperWorldConfig { +@@ -410,4 +410,10 @@ public class PaperWorldConfig { private void armorStandEntityLookups() { armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); } @@ -27,10 +27,10 @@ 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 -@@ -168,6 +168,7 @@ public abstract class Entity implements ICommandListener { +@@ -169,6 +169,7 @@ public abstract class Entity implements ICommandListener { public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; public boolean fromMobSpawner; @@ -39,10 +39,10 @@ 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 -@@ -2132,8 +2132,11 @@ public abstract class EntityLiving extends Entity { +@@ -2182,8 +2182,11 @@ public abstract class EntityLiving extends Entity { } } @@ -56,5 +56,5 @@ index 7242da9cc..53486e205 100644 this.C(entity); } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch b/Spigot-Server-Patches/0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch index d703de1e06..d1384d62b7 100644 --- a/Spigot-Server-Patches/0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch +++ b/Spigot-Server-Patches/0205-Do-not-allow-a-zero-max-height-in-BiomeJungle.patch @@ -1,14 +1,14 @@ -From 08049c0273581d742ce6a120fd981a675e2c2c1f Mon Sep 17 00:00:00 2001 +From ad7da1f8a8c69dde2730efb96e7c0a74c3cd591d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 23 Jan 2017 15:10:25 -0600 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 -@@ -39,7 +39,11 @@ public class BiomeJungle extends BiomeBase { +@@ -40,7 +40,11 @@ public class BiomeJungle extends BiomeBase { super.a(world, random, blockposition); int i = random.nextInt(16) + 8; int j = random.nextInt(16) + 8; @@ -34,5 +34,5 @@ index 6a0b3a62d..38a7af58c 100644 return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2); } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0206-Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/0206-Remove-CraftScheduler-Async-Task-Debugger.patch index 552213109d..7290159919 100644 --- a/Spigot-Server-Patches/0206-Remove-CraftScheduler-Async-Task-Debugger.patch +++ b/Spigot-Server-Patches/0206-Remove-CraftScheduler-Async-Task-Debugger.patch @@ -1,4 +1,4 @@ -From 54c4e8f381c1ff582e949fabafbdec7a9dc9498f Mon Sep 17 00:00:00 2001 +From 7378d1bef77bee51e3373b4f298aebe65af66e38 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 00:04:04 -0500 Subject: [PATCH] Remove CraftScheduler Async Task Debugger @@ -58,5 +58,5 @@ index e30cfb7b7..448c27cc7 100644 @Deprecated -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0207-Shame-on-you-Mojang.patch b/Spigot-Server-Patches/0207-Shame-on-you-Mojang.patch index a1abfa42d8..422637ec8a 100644 --- a/Spigot-Server-Patches/0207-Shame-on-you-Mojang.patch +++ b/Spigot-Server-Patches/0207-Shame-on-you-Mojang.patch @@ -1,4 +1,4 @@ -From 8fc486b100aea685edf375ee4071d2e9107ff13b Mon Sep 17 00:00:00 2001 +From 8c35d14fbafa84a274e7547697ab5e4a3e60fb5a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 19:17:28 -0500 Subject: [PATCH] Shame on you Mojang @@ -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 @@ -62,8 +62,8 @@ public class BlockBeacon extends BlockTileEntity { @@ -55,5 +55,5 @@ index f44f05620..74c371179 100644 } } -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 58e46f48dc..99ff073c8c 100644 --- a/Spigot-Server-Patches/0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0208-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -1,11 +1,11 @@ -From a96e1d9ecd19d5c45174301b0278befb09512587 Mon Sep 17 00:00:00 2001 +From 58c7b942a8da27964a169fa592b4946437e0819e Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 7 Feb 2017 16:55:35 -0600 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 @@ -325,7 +325,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -18,5 +18,5 @@ index dabe4137f..fb4f11958 100644 Iterator iterator = this.unloadQueue.iterator(); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0209-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0209-Do-not-let-armorstands-drown.patch index ca9770eda3..083ae8f125 100644 --- a/Spigot-Server-Patches/0209-Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/0209-Do-not-let-armorstands-drown.patch @@ -1,14 +1,14 @@ -From 52ff66fa79ab7f39930fe8b1ed0ff601c409b391 Mon Sep 17 00:00:00 2001 +From c2a37eb20a4c9821e051f945c3b199f60cd8823d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 18 Feb 2017 19:29:58 -0600 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 -@@ -772,5 +772,10 @@ public class EntityArmorStand extends EntityLiving { +@@ -771,5 +771,10 @@ public class EntityArmorStand extends EntityLiving { super.move(moveType, x, y, z); } } @@ -20,26 +20,26 @@ 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 -@@ -188,6 +188,7 @@ public abstract class EntityLiving extends Entity { +@@ -189,6 +189,7 @@ 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; } -@@ -222,7 +223,7 @@ public abstract class EntityLiving extends Entity { +@@ -223,7 +224,7 @@ 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); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch b/Spigot-Server-Patches/0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch index 0700eaa290..41a47006a7 100644 --- a/Spigot-Server-Patches/0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch +++ b/Spigot-Server-Patches/0210-Fix-NFE-when-attempting-to-read-EMPTY-ItemStack.patch @@ -1,4 +1,4 @@ -From 67c74ec6cf8e9187f0c9a4cca1d976f448e2bc2b Mon Sep 17 00:00:00 2001 +From f2985676a15e56d1c909b738f04c5c039296546b Mon Sep 17 00:00:00 2001 From: kashike Date: Sun, 9 Apr 2017 23:50:15 -0700 Subject: [PATCH] Fix NFE when attempting to read EMPTY ItemStack @@ -6,10 +6,10 @@ 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 -@@ -97,7 +97,7 @@ public final class ItemStack { +@@ -103,7 +103,7 @@ public final class ItemStack { // CraftBukkit - break into own method public void load(NBTTagCompound nbttagcompound) { @@ -19,5 +19,5 @@ index 548da18e0..29902769f 100644 // CraftBukkit start - Route through setData for filtering // this.damage = Math.max(0, nbttagcompound.getShort("Damage")); -- -2.12.2 +2.13.0 diff --git a/Spigot-Server-Patches/0211-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0211-Properly-handle-async-calls-to-restart-the-server.patch index 3f77fc3253..766c0fe9d4 100644 --- a/Spigot-Server-Patches/0211-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0211-Properly-handle-async-calls-to-restart-the-server.patch @@ -1,4 +1,4 @@ -From 2aa53ac9f67c953bdeac7f66834cdf8fb343799d Mon Sep 17 00:00:00 2001 +From 9bc57b8c28b8773512b0edd537e0ea5aa7ad7701 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 12 May 2017 23:34:11 -0500 Subject: [PATCH] Properly handle async calls to restart the server @@ -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 -@@ -1630,6 +1630,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1612,6 +1612,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs return this.ab; } @@ -127,5 +127,5 @@ index 49768734d..35c828805 100644 + // Paper end } -- -2.13.0.windows.1 +2.13.0 diff --git a/Spigot-Server-Patches/0212-Add-system-property-to-disable-book-size-limits.patch b/Spigot-Server-Patches/0212-Add-system-property-to-disable-book-size-limits.patch index c8aab88a94..ff3159fc90 100644 --- a/Spigot-Server-Patches/0212-Add-system-property-to-disable-book-size-limits.patch +++ b/Spigot-Server-Patches/0212-Add-system-property-to-disable-book-size-limits.patch @@ -1,4 +1,4 @@ -From 266c59f458cc4862a706054efa751b6f83c45ee5 Mon Sep 17 00:00:00 2001 +From 3070c87a6a11d298b3182731b7f1f48ffaa0c1e1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 13 May 2017 20:11:21 -0500 Subject: [PATCH] Add system property to disable book size limits @@ -57,5 +57,5 @@ index 5d971f07b..6a7d10344 100644 } -- -2.13.0.windows.1 +2.13.0 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