diff --git a/Spigot-API-Patches/POM-changes.patch b/Spigot-API-Patches/POM-changes.patch index 6ff7d66de0..f683c4c839 100644 --- a/Spigot-API-Patches/POM-changes.patch +++ b/Spigot-API-Patches/POM-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 4118252f..0a61b4d9 100644 +index 75681af7..ec6e4d14 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -22,7 +22,7 @@ index 4118252f..0a61b4d9 100644 + + com.destroystokyo.paper + paper-api - 1.14-pre5-SNAPSHOT + 1.14-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-Server-Patches/Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/Add-BeaconEffectEvent.patch index fb1f795896..c9ebe73a71 100644 --- a/Spigot-Server-Patches/Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/Add-BeaconEffectEvent.patch @@ -5,23 +5,22 @@ Subject: [PATCH] Add BeaconEffectEvent diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java -index fecd65ddb8..c6bd54a2c9 100644 +index 8837dc4542..87f77bb86b 100644 --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java -@@ -0,0 +0,0 @@ import org.bukkit.entity.HumanEntity; +@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil; + import org.bukkit.entity.HumanEntity; import org.bukkit.potion.PotionEffect; // CraftBukkit end - +// Paper start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.entity.Player; +import com.destroystokyo.paper.event.block.BeaconEffectEvent; +// Paper end -+ - public class TileEntityBeacon extends TileEntityContainer implements IWorldInventory, ITickable { - public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}}; -@@ -0,0 +0,0 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven + public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable { + +@@ -0,0 +0,0 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic } private void applyEffect(List list, MobEffectList effects, int i, int b0) { @@ -54,7 +53,7 @@ index fecd65ddb8..c6bd54a2c9 100644 } } } -@@ -0,0 +0,0 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven +@@ -0,0 +0,0 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic int i = getLevel(); List list = getHumansInRange(); diff --git a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch index 2b9410af4a..555c484709 100644 --- a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch @@ -19,7 +19,7 @@ index 2e79b0b5ff..f38179e983 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cec990f357..d636965800 100644 +index 0819f56a62..89e54089c2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityPortalEvent; @@ -65,7 +65,7 @@ index cec990f357..d636965800 100644 protected abstract void a(NBTTagCompound nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 0f2604a3d5..fae259ac70 100644 +index 65ad9243f8..9aed0d6b82 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ public class EntityTypes { @@ -92,7 +92,7 @@ index 0000000000..743142d030 + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index df46dbcacc..319be67501 100644 +index 888c9605c8..94fbf228d2 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -103,7 +103,7 @@ index df46dbcacc..319be67501 100644 +public abstract class TileEntity implements KeyedObject { // Paper public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot - private static final Logger a = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); - private final TileEntityTypes b; + private final TileEntityTypes b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER @Nullable diff --git a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch index 25ccdf1e98..d686c39f9f 100644 --- a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch @@ -6,13 +6,14 @@ 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 3a83819d56..c2061e9596 100644 +index 7939208a5a..f904e1c28d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { } // CraftBukkit end +- entityplayer.spawnIn(worldserver); + // Paper start - support PlayerInitialSpawnEvent + Location originalLoc = new Location(entityplayer.world.getWorld(), entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); + com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(entityplayer.getBukkitEntity(), originalLoc); @@ -28,7 +29,8 @@ index 3a83819d56..c2061e9596 100644 + entityplayer.dimension = ((CraftWorld) newLoc.getWorld()).getHandle().dimension; + // Paper end + - entityplayer.spawnIn(this.server.getWorldServer(entityplayer.dimension)); ++ entityplayer.spawnIn(((CraftWorld) newLoc.getWorld()).getHandle()); entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); String s1 = "local"; + -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Add-player-view-distance-API.patch b/Spigot-Server-Patches/Add-player-view-distance-API.patch deleted file mode 100644 index ba8ea6487a..0000000000 --- a/Spigot-Server-Patches/Add-player-view-distance-API.patch +++ /dev/null @@ -1,278 +0,0 @@ -From 0000000000000000000000000000000000000000 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/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 58e037e13b..e97bb2305c 100644 ---- a/src/main/java/net/minecraft/server/EntityHuman.java -+++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - // Paper start - public boolean affectsSpawning = true; - // Paper end -+ // Paper start - Player view distance API -+ private int viewDistance = -1; -+ public int getViewDistance() { -+ return viewDistance == -1 ? ((WorldServer) world).getPlayerChunkMap().getViewDistance() : viewDistance; -+ } -+ public void setViewDistance(int viewDistance) { -+ this.viewDistance = viewDistance; -+ } -+ // Paper end - - // CraftBukkit start - public boolean fauxSleeping; -diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index 45ab33d1ae..3854ae9769 100644 ---- a/src/main/java/net/minecraft/server/EntityTracker.java -+++ b/src/main/java/net/minecraft/server/EntityTracker.java -@@ -0,0 +0,0 @@ public class EntityTracker { - - } - -+ public void updatePlayer(EntityPlayer entityplayer) { a(entityplayer); } // Paper - OBFHELPER - public void a(EntityPlayer entityplayer) { - Iterator iterator = this.c.iterator(); - -diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index d00401ce14..dd6c84b4a2 100644 ---- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java -+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -@@ -0,0 +0,0 @@ public class EntityTrackerEntry { - public boolean c(EntityPlayer entityplayer) { - double d0 = entityplayer.locX - (double) this.xLoc / 4096.0D; - double d1 = entityplayer.locZ - (double) this.zLoc / 4096.0D; -- int i = Math.min(this.e, this.f); -+ int i = Math.min(this.e, (entityplayer.getViewDistance() - 1) * 16); // Paper - Use player view distance API - - return d0 >= (double) (-i) && d0 <= (double) i && d1 >= (double) (-i) && d1 <= (double) i && this.tracker.a(entityplayer); - } -diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index e01222ad2b..55161af9c9 100644 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java -+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -0,0 +0,0 @@ public class PlayerChunkMap { - private final List g = Lists.newLinkedList(); - private final List h = Lists.newLinkedList(); - private final List i = Lists.newArrayList(); -- private int j; -+ private int j;public int getViewDistance() { return j; } // Paper OBFHELPER - private long k; - private boolean l = true; - private boolean m = true; -@@ -0,0 +0,0 @@ public class PlayerChunkMap { - // CraftBukkit start - Load nearby chunks first - List chunkList = new LinkedList(); - -- for (int k = i - this.j; k <= i + this.j; ++k) { -- for (int l = j - this.j; l <= j + this.j; ++l) { -+ // Paper start - Player view distance API -+ int viewDistance = entityplayer.getViewDistance(); -+ for (int k = i - viewDistance; k <= i + viewDistance; ++k) { -+ for (int l = j - viewDistance; l <= j + viewDistance; ++l) { -+ // Paper end - chunkList.add(new ChunkCoordIntPair(k, l)); - } - } -@@ -0,0 +0,0 @@ public class PlayerChunkMap { - int i = (int) entityplayer.d >> 4; - int j = (int) entityplayer.e >> 4; - -- for (int k = i - this.j; k <= i + this.j; ++k) { -- for (int l = j - this.j; l <= j + this.j; ++l) { -+ // Paper start - Player view distance API -+ int viewDistance = entityplayer.getViewDistance(); -+ for (int k = i - viewDistance; k <= i + viewDistance; ++k) { -+ for (int l = j - viewDistance; l <= j + viewDistance; ++l) { -+ // Paper end - PlayerChunk playerchunk = this.getChunk(k, l); - - if (playerchunk != null) { -@@ -0,0 +0,0 @@ public class PlayerChunkMap { - if (d2 >= 64.0D) { - int k = (int) entityplayer.d >> 4; - int l = (int) entityplayer.e >> 4; -- int i1 = this.j; -+ int i1 = entityplayer.getViewDistance(); // Paper - Player view distance API -+ - int j1 = i - k; - int k1 = j - l; - -@@ -0,0 +0,0 @@ public class PlayerChunkMap { - return playerchunk != null && playerchunk.d(entityplayer) && playerchunk.e(); - } - -+ public final void setViewDistanceForAll(int viewDistance) { this.a(viewDistance); } // Paper - OBFHELPER -+ // Paper start - Separate into two methods - public void a(int i) { - i = MathHelper.clamp(i, 3, 32); - if (i != this.j) { -@@ -0,0 +0,0 @@ public class PlayerChunkMap { - - while (iterator.hasNext()) { - EntityPlayer entityplayer = (EntityPlayer) iterator.next(); -- int k = (int) entityplayer.locX >> 4; -- int l = (int) entityplayer.locZ >> 4; -- int i1; -- int j1; -- -- if (j > 0) { -- for (i1 = k - i; i1 <= k + i; ++i1) { -- for (j1 = l - i; j1 <= l + i; ++j1) { -- PlayerChunk playerchunk = this.c(i1, j1); -- -- if (!playerchunk.d(entityplayer)) { -- playerchunk.a(entityplayer); -- } -+ this.setViewDistance(entityplayer, i, false); // Paper - Split, don't mark sort pending, we'll handle it after -+ } -+ -+ this.j = i; -+ this.e(); -+ } -+ } -+ -+ public void setViewDistance(EntityPlayer entityplayer, int i) { -+ this.setViewDistance(entityplayer, i, true); // Mark sort pending by default so we don't have to remember to do so all the time -+ } -+ -+ // Copied from above with minor changes -+ public void setViewDistance(EntityPlayer entityplayer, int i, boolean markSort) { -+ i = MathHelper.clamp(i, 3, 32); -+ int oldViewDistance = entityplayer.getViewDistance(); -+ if (i != oldViewDistance) { -+ int j = i - oldViewDistance; -+ -+ int k = (int) entityplayer.locX >> 4; -+ int l = (int) entityplayer.locZ >> 4; -+ int i1; -+ int j1; -+ -+ if (j > 0) { -+ for (i1 = k - i; i1 <= k + i; ++i1) { -+ for (j1 = l - i; j1 <= l + i; ++j1) { -+ PlayerChunk playerchunk = this.c(i1, j1); -+ -+ if (!playerchunk.d(entityplayer)) { -+ playerchunk.a(entityplayer); - } - } -- } else { -- for (i1 = k - this.j; i1 <= k + this.j; ++i1) { -- for (j1 = l - this.j; j1 <= l + this.j; ++j1) { -- if (!this.a(i1, j1, k, l, i)) { -- this.c(i1, j1).b(entityplayer); -- } -+ } -+ } else { -+ for (i1 = k - oldViewDistance; i1 <= k + oldViewDistance; ++i1) { -+ for (j1 = l - oldViewDistance; j1 <= l + oldViewDistance; ++j1) { -+ if (!this.a(i1, j1, k, l, i)) { -+ this.c(i1, j1).b(entityplayer); - } - } - } -+ if (markSort) { -+ this.e(); -+ } - } -- -- this.j = i; -- this.e(); - } - } -+ // Paper end - - private void e() { - this.l = true; -@@ -0,0 +0,0 @@ public class PlayerChunkMap { - } - } - // CraftBukkit end -+ -+ // Paper start - Player view distance API -+ public void updateViewDistance(EntityPlayer player, int distanceIn) { -+ final int oldViewDistance = player.getViewDistance(); -+ -+ // This represents the view distance that we will set on the player -+ // It can exist as a negative value -+ int playerViewDistance = MathHelper.clamp(distanceIn, 3, 32); -+ -+ // This value is the one we actually use to update the chunk map -+ // We don't ever want this to be a negative -+ int toSet = playerViewDistance; -+ -+ if (distanceIn < 0) { -+ playerViewDistance = -1; -+ toSet = world.getPlayerChunkMap().getViewDistance(); -+ } -+ -+ if (toSet != oldViewDistance) { -+ // Order matters -+ this.setViewDistance(player, toSet); -+ player.setViewDistance(playerViewDistance); -+ -+ //Force update entity trackers -+ this.getWorld().getTracker().updatePlayer(player); -+ } -+ } -+ // Paper end - } -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 4eaa5d93b4..6720a9648e 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -0,0 +0,0 @@ public final class SpawnerCreature { - boolean flag3 = true; - // Spigot Start - byte b0 = worldserver.spigotConfig.mobSpawnRange; -- b0 = ( b0 > worldserver.spigotConfig.viewDistance ) ? (byte) worldserver.spigotConfig.viewDistance : b0; -+ b0 = ( b0 > entityhuman.getViewDistance() ) ? (byte) entityhuman.getViewDistance() : b0; // Paper - Use player view distance API - b0 = ( b0 > 8 ) ? 8 : b0; - - for (int i1 = -b0; i1 <= b0; ++i1) { -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0ee063bcd3..5496fae409 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - public boolean getAffectsSpawning() { - return this.getHandle().affectsSpawning; - } -+ -+ @Override -+ public int getViewDistance() { -+ return getHandle().getViewDistance(); -+ } -+ -+ @Override -+ public void setViewDistance(int viewDistance) { -+ ((WorldServer) getHandle().world).getPlayerChunkMap().updateViewDistance(getHandle(), viewDistance); -+ } - // Paper end - - @Override -diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index a95f93eb76..09df00e94b 100644 ---- a/src/main/java/org/spigotmc/ActivationRange.java -+++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -0,0 +0,0 @@ public class ActivationRange - - int maxRange = Math.max( monsterActivationRange, animalActivationRange ); - maxRange = Math.max( maxRange, miscActivationRange ); -- maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange ); -+ //maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange ); Paper - Use player view distance API below instead - - for ( EntityHuman player : world.players ) - { -- -+ int playerMaxRange = maxRange = Math.min( ( player.getViewDistance() << 4 ) - 8, maxRange ); // Paper - Use player view distance API - player.activatedTick = MinecraftServer.currentTick; -- maxBB = player.getBoundingBox().grow( maxRange, 256, maxRange ); -+ maxBB = player.getBoundingBox().grow( playerMaxRange, 256, playerMaxRange ); // Paper - Use player view distance API - miscBB = player.getBoundingBox().grow( miscActivationRange, 256, miscActivationRange ); - animalBB = player.getBoundingBox().grow( animalActivationRange, 256, animalActivationRange ); - monsterBB = player.getBoundingBox().grow( monsterActivationRange, 256, monsterActivationRange ); --- \ No newline at end of file diff --git a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch index 22f4124ab4..294fc68a50 100644 --- a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch @@ -5,7 +5,7 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4641eaf2f8..05d2d50e54 100644 +index 2782970393..be91b11242 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,16 +19,16 @@ index 4641eaf2f8..05d2d50e54 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index aa23cdff12..f92bf02b87 100644 +index 3140a49e1c..8115b1e4ec 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster { } ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition); -- boolean flag1 = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot -+ boolean flag1 = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - add allChunksAreSlime +- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot ++ boolean flag = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - if (this.random.nextInt(10) == 0 && flag1 && this.locY < 40.0D) { - return super.a(generatoraccess, flag); + if (this.random.nextInt(10) == 0 && flag && this.locY < 40.0D) { + return super.a(generatoraccess, enummobspawn); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch index 646720da0f..94b2e7017b 100644 --- a/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch +++ b/Spigot-Server-Patches/Configurable-Disabling-Cat-Chest-Detection.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection Offers a gameplay feature to stop cats from blocking chests diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4266a87fe3..4641eaf2f8 100644 +index d663b15ceb..2782970393 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -20,19 +20,19 @@ index 4266a87fe3..4641eaf2f8 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 5e1a3df2b3..e94786138e 100644 +index 6b1c64e8f3..ee9d91a8c1 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC +@@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity implements IBlockWaterlogged { } - private boolean b(World world, BlockPosition blockposition) { + private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) { + // Paper start - Option to disable chest cat detection -+ if (world.paperConfig.disableChestCatDetection) { ++ if (((World) generatoraccess).paperConfig.disableChestCatDetection) { + return false; + } + // Paper end - List list = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))); + List list = generatoraccess.a(EntityCat.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))); if (!list.isEmpty()) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch index bafd189459..332212c32e 100644 --- a/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/Configurable-container-update-tick-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable container update tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7c16ec9970..4266a87fe3 100644 +index e4e00e2e1c..d663b15ceb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,11 +19,11 @@ index 7c16ec9970..4266a87fe3 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index c4a55c6a1f..2665faa6c5 100644 +index fbde752052..dbb9a9a694 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - public boolean f; + public boolean e; public int ping; public boolean viewingCredits; + private int containerUpdateDelay; // Paper @@ -34,10 +34,10 @@ index c4a55c6a1f..2665faa6c5 100644 --this.noDamageTicks; } -- this.activeContainer.b(); +- this.activeContainer.c(); + // Paper start - Configurable container update tick rate + if (--containerUpdateDelay <= 0) { -+ this.activeContainer.b(); ++ this.activeContainer.c(); + containerUpdateDelay = world.paperConfig.containerUpdateTickRate; + } + // Paper end diff --git a/Spigot-Server-Patches/Configurable-mob-spawner-tick-rate.patch b/Spigot-Server-Patches/Configurable-mob-spawner-tick-rate.patch index 2585762933..652e8f53aa 100644 --- a/Spigot-Server-Patches/Configurable-mob-spawner-tick-rate.patch +++ b/Spigot-Server-Patches/Configurable-mob-spawner-tick-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable mob spawner tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 8b3c7b05c3..7c16ec9970 100644 +index 8db5c3f3fe..e4e00e2e1c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 8b3c7b05c3..7c16ec9970 100644 + } } diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index cc0371b4aa..ce43b4bc52 100644 +index 4db5fd641f..6499d27e63 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { @@ -42,8 +42,8 @@ index cc0371b4aa..ce43b4bc52 100644 this.f = this.e; } else { @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { - this.a().addParticle(Particles.M, d0, d1, d2, 0.0D, 0.0D, 0.0D); - this.a().addParticle(Particles.y, d0, d1, d2, 0.0D, 0.0D, 0.0D); + world.addParticle(Particles.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D); + world.addParticle(Particles.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D); if (this.spawnDelay > 0) { - --this.spawnDelay; + this.spawnDelay -= tickDelay; // Paper diff --git a/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch index 04ee2a3bc1..746f4db548 100644 --- a/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch @@ -29,7 +29,7 @@ index 1ed58f4bba..a797a57671 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c813b59af5..494c6cb4aa 100644 +index af019fc3f1..49245b5c5f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Disable-explosion-knockback.patch b/Spigot-Server-Patches/Disable-explosion-knockback.patch index da1e58addf..5ddff859f2 100644 --- a/Spigot-Server-Patches/Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/Disable-explosion-knockback.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable explosion knockback diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a39451c69a..65a99b2a4b 100644 +index a5ec0bc0e0..6a307d5dd6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index a39451c69a..65a99b2a4b 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b092b0fa23..c5cc0b471b 100644 +index 85567a7072..d85172e728 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -45,10 +45,10 @@ index b092b0fa23..c5cc0b471b 100644 + if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback + if (this.getHealth() <= 0.0F) { - if (!this.e(damagesource)) { - SoundEffect soundeffect = this.cs(); + if (!this.f(damagesource)) { + SoundEffect soundeffect = this.getSoundDeath(); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 3e44b2d549..5591ccb3b0 100644 +index bcff117619..6eeff4ce59 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -0,0 +0,0 @@ public class Explosion { @@ -59,13 +59,12 @@ index 3e44b2d549..5591ccb3b0 100644 + d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback } - entity.motX += d8 * d14; -@@ -0,0 +0,0 @@ public class Explosion { + entity.setMot(entity.getMot().add(d8 * d14, d9 * d14, d10 * d14)); if (entity instanceof EntityHuman) { EntityHuman entityhuman = (EntityHuman) entity; -- if (!entityhuman.isSpectator() && (!entityhuman.u() || !entityhuman.abilities.isFlying)) { -+ if (!entityhuman.isSpectator() && (!entityhuman.u() && !world.paperConfig.disableExplosionKnockback || !entityhuman.abilities.isFlying)) { // Paper - Disable explosion knockback +- if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.abilities.isFlying)) { ++ if (!entityhuman.isSpectator() && (!entityhuman.isCreative() && !world.paperConfig.disableExplosionKnockback || !entityhuman.abilities.isFlying)) { // Paper - Disable explosion knockback this.l.put(entityhuman, new Vec3D(d8 * d13, d9 * d13, d10 * d13)); } } diff --git a/Spigot-Server-Patches/Disable-ice-and-snow.patch b/Spigot-Server-Patches/Disable-ice-and-snow.patch index 588dd34a35..0eb35e62d2 100644 --- a/Spigot-Server-Patches/Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/Disable-ice-and-snow.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable ice and snow diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0ba604ffcf..8b3c7b05c3 100644 +index bf0cd6a8b4..8db5c3f3fe 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,16 +19,16 @@ index 0ba604ffcf..8b3c7b05c3 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 716c3ddb8c..ed6f3afcfe 100644 +index 3b90e8b613..e176c63fed 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - } +@@ -0,0 +0,0 @@ public class WorldServer extends World { + } - this.methodProfiler.exitEnter("iceandsnow"); -- if (this.random.nextInt(16) == 0) { -+ if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow - this.m = this.m * 3 + 1013904223; - l = this.m >> 2; - blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); + gameprofilerfiller.exitEnter("iceandsnow"); +- if (this.random.nextInt(16) == 0) { ++ if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow + blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, this.a(j, 0, k, 15)); + BlockPosition blockposition1 = blockposition.down(); + BiomeBase biomebase = this.getBiome(blockposition); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch index 56aaefe292..0b14eb321f 100644 --- a/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/Disable-spigot-tick-limiters.patch @@ -5,25 +5,10 @@ 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 20990cbfdd..a80acbb6a5 100644 +index ee953c880e..48360c2b47 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc - // CraftBukkit start - Use field for loop variable - co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper - int entitiesThisCycle = 0; -- if (tickPosition < 0) tickPosition = 0; -- for (entityLimiter.initTick(); -- entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue()); -- tickPosition++, entitiesThisCycle++) { -+ // Paper start - Disable tick limiters -+ //if (tickPosition < 0) tickPosition = 0; -+ for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) { -+ // Paper end - tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0; - entity = (Entity) this.entityList.get(this.tickPosition); - // CraftBukkit end -@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose // Spigot start // Iterator iterator = this.tileEntityListTick.iterator(); int tilesThisCycle = 0; diff --git a/Spigot-Server-Patches/Disable-thunder.patch b/Spigot-Server-Patches/Disable-thunder.patch index e0baf9efa1..3cb7197f6a 100644 --- a/Spigot-Server-Patches/Disable-thunder.patch +++ b/Spigot-Server-Patches/Disable-thunder.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable thunder diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 65a99b2a4b..0ba604ffcf 100644 +index 6a307d5dd6..bf0cd6a8b4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,16 +19,16 @@ index 65a99b2a4b..0ba604ffcf 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 5a7087c758..716c3ddb8c 100644 +index d54d58e1ee..3b90e8b613 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { - int l; - BlockPosition blockposition; +@@ -0,0 +0,0 @@ public class WorldServer extends World { + gameprofilerfiller.enter("thunder"); + BlockPosition blockposition; -- if (flag && flag1 && this.random.nextInt(100000) == 0) { -+ if (!this.paperConfig.disableThunder && flag && flag1 && this.random.nextInt(100000) == 0) { // Paper - Disable thunder - this.m = this.m * 3 + 1013904223; - l = this.m >> 2; - blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); +- if (flag && this.U() && this.random.nextInt(100000) == 0) { ++ if (!this.paperConfig.disableThunder && flag && this.U() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder + blockposition = this.a(this.a(j, 0, k, 15)); + if (this.isRainingAt(blockposition)) { + DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch index d9a2645e8f..d9e3008f5f 100644 --- a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -24,7 +24,7 @@ index 3f734327c0..1ed58f4bba 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2d07bfa879..7191861e81 100644 +index 114a851f0f..ca21afc199 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch index d180331095..8b0af67385 100644 --- a/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/Ensure-commands-are-not-ran-async.patch @@ -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 b9e6a3275c..9a83e5fc0b 100644 +index 287bba3f6c..9d7bbafe02 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (!async && s.startsWith("/")) { @@ -45,10 +45,10 @@ index b9e6a3275c..9a83e5fc0b 100644 + } + // Paper End this.handleCommand(s); - } else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) { + } else if (this.player.getChatFlags() == 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 7b4af7a904..c6e6ae4fe7 100644 +index de592ae851..9c54d151df 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -82,7 +82,7 @@ index 7b4af7a904..c6e6ae4fe7 100644 return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index a0cdd2317c..984df4083d 100644 +index ddef523ea8..70f8d42992 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -0,0 +0,0 @@ public class ServerShutdownThread extends Thread { @@ -90,11 +90,11 @@ index a0cdd2317c..984df4083d 100644 try { org.spigotmc.AsyncCatcher.enabled = false; // Spigot + org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper - server.stop(); - } catch (ExceptionWorldConflict ex) { - ex.printStackTrace(); + server.close(); + } finally { + try { diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 4b3aa85c97..e44c230165 100644 +index aeed769725..9f7d2ef932 100644 --- a/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java @@ -0,0 +0,0 @@ public class AsyncCatcher @@ -106,7 +106,7 @@ index 4b3aa85c97..e44c230165 100644 public static void catchOp(String reason) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index f4e088c134..944151d140 100644 +index e7b953ca31..ccea803f58 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -0,0 +0,0 @@ public class RestartCommand extends Command diff --git a/Spigot-Server-Patches/Entity-Origin-API.patch b/Spigot-Server-Patches/Entity-Origin-API.patch index abad3b4d49..03925c6b08 100644 --- a/Spigot-Server-Patches/Entity-Origin-API.patch +++ b/Spigot-Server-Patches/Entity-Origin-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7191861e81..c813b59af5 100644 +index ca21afc199..af019fc3f1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index 81ce960a99..694d35df18 100644 --- a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 89ad19e59c..7dfe1f0a3c 100644 +index 33e8030def..48286867fe 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> e() { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index dc823e88a5..3745f66de5 100644 +index f0ff70980d..dd47e9cbe4 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - @Immutable - public class BlockPosition extends BaseBlockPosition implements MinecraftSerializable { - -- private static final Logger b = LogManager.getLogger(); -+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used - public static final BlockPosition ZERO = new BlockPosition(0, 0, 0); - private static final int c = 1 + MathHelper.e(MathHelper.c(30000000)); - private static final int d = BlockPosition.c; @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali OfInt ofint = dynamic.asIntStream().spliterator(); int[] aint = new int[3]; @@ -149,7 +140,7 @@ index 4cb78c6a3f..e15d286710 100644 this.f = 0; diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index 096277de1c..d484e626d2 100644 +index b251a1d7d9..3c5b3fe101 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -0,0 +0,0 @@ public class WorldPersistentData { diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 6c1a9364cd..5b75872961 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -20,7 +20,7 @@ index 2f2b103641..b1900ba364 100644 void b(UUID uuid); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 3745f66de5..01061f219f 100644 +index dd47e9cbe4..c927d524a8 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -57,13 +57,13 @@ index 3745f66de5..01061f219f 100644 return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2d40f03b1a..0f031e862b 100644 +index fc54888fa0..8f789c91f7 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.CreatureSpawnEvent; public class Chunk implements IChunkAccess { - private static final Logger b = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); - public static final ChunkSection a = null; + public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER private final ChunkSection[] sections; @@ -189,7 +189,7 @@ index 4720632641..afa03ce6f2 100644 // CraftBukkit start - fire event setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3e16632e24..d31c1c989c 100644 +index c1bb7a88ae..f86e6a4c51 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -213,7 +213,7 @@ index 6ab4c78b35..76142d5dc2 100644 super(entitytypes, world); this.f = 5; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 2ee4069173..0f2604a3d5 100644 +index 01d9ed69c5..65ad9243f8 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ import com.mojang.datafixers.types.Type; @@ -225,13 +225,13 @@ index 2ee4069173..0f2604a3d5 100644 import java.util.function.Function; import java.util.stream.Stream; diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index cc9851edbc..80a2da51da 100644 +index e975265a28..aa6a58dd88 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import org.bukkit.event.world.StructureGrowEvent; public final class ItemStack { - private static final Logger c = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); - public static final ItemStack a = new ItemStack((Item) null); + public static final ItemStack a = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = a; // Paper - OBFHELPER public static final DecimalFormat b = F(); @@ -606,12 +606,12 @@ index 0000000000..c97e116aaf + } +} diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index dfa33f0336..cc25ea7401 100644 +index e16a579b55..3f6d2676e7 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { - private static final Logger f = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+"); - private final Map map = Maps.newHashMap(); + public final Map map = Maps.newHashMap(); // Paper @@ -635,7 +635,7 @@ index dfa33f0336..cc25ea7401 100644 return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 94e6a3db4c..fca496a00a 100644 +index fe6854d0e4..2db7229e91 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -688,13 +688,13 @@ index db2fe836c2..0d67676f7d 100644 for (int j = 1; j < 5; ++j) { if ((i & -1 << j * 7) == 0) { diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index d54177bdcc..2aa805eef1 100644 +index 90223deae3..63c4dbd327 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java @@ -0,0 +0,0 @@ public class PacketEncoder extends MessageToByteEncoder> { packet.b(packetdataserializer); } catch (Throwable throwable) { - PacketEncoder.a.error(throwable); + PacketEncoder.LOGGER.error(throwable); + throwable.printStackTrace(); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE? if (packet.a()) { throw new SkipEncodeException(throwable); @@ -784,7 +784,7 @@ index 4efcb8b595..60948afa4e 100644 return this.b.size(); } diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index ea90a01830..59e7d907ef 100644 +index 41a5d1dc29..7060402126 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java @@ -0,0 +0,0 @@ public class SystemUtils { diff --git a/Spigot-Server-Patches/Optimize-Pathfinding.patch b/Spigot-Server-Patches/Optimize-Pathfinding.patch index f0537295df..a80debd724 100644 --- a/Spigot-Server-Patches/Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/Optimize-Pathfinding.patch @@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 2d788ef663..60b5068e32 100644 +index ca30e08ff4..2ced8dedd1 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { @@ -41,7 +41,7 @@ index 2d788ef663..60b5068e32 100644 @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { } - public void q() { + public void o() { + this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; } diff --git a/Spigot-Server-Patches/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index 24c8ed1850..a9b2457ff9 100644 --- a/Spigot-Server-Patches/POM-Changes.patch +++ b/Spigot-Server-Patches/POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 3b89529f28..9d5a4ce991 100644 +index 982ac22e8e..099d7218c9 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -16,9 +16,9 @@ index 3b89529f28..9d5a4ce991 100644 - spigot + paper jar - 1.14-pre5-SNAPSHOT + 1.14-R0.1-SNAPSHOT - Spigot -- http://www.spigotmc.org +- https://www.spigotmc.org/ + Paper + https://papermc.io @@ -27,7 +27,7 @@ index 3b89529f28..9d5a4ce991 100644 + UTF-8 unknown - 1.14-pre5 + 1.14 @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Paper-config-files.patch b/Spigot-Server-Patches/Paper-config-files.patch index 30013d3114..f2a52ca98a 100644 --- a/Spigot-Server-Patches/Paper-config-files.patch +++ b/Spigot-Server-Patches/Paper-config-files.patch @@ -535,7 +535,7 @@ index e1ba833f3e..b60956218d 100644 this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 43dc487eaa..cec990f357 100644 +index bc9894f84e..0819f56a62 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -552,7 +552,7 @@ index 43dc487eaa..cec990f357 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index e2a844c786..2ee4069173 100644 +index ee43aa24d2..01d9ed69c5 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ import com.mojang.datafixers.DataFixUtils; @@ -575,7 +575,7 @@ index e2a844c786..2ee4069173 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f31f407fa1..28fa346b7f 100644 +index 84155573df..83fdea893c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -596,7 +596,7 @@ index f31f407fa1..28fa346b7f 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 83ab4245da..93246f464b 100644 +index dcdd3b002d..9021ab34fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -651,7 +651,7 @@ index 83ab4245da..93246f464b 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index b61c06e32a..e34abd0c1f 100644 +index ae320c2bb1..fd02ba1916 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/Send-absolute-position-the-first-time-an-entity-is-s.patch index 18673f8bfc..6fe9dcde88 100644 --- a/Spigot-Server-Patches/Send-absolute-position-the-first-time-an-entity-is-s.patch +++ b/Spigot-Server-Patches/Send-absolute-position-the-first-time-an-entity-is-s.patch @@ -5,19 +5,32 @@ Subject: [PATCH] Send absolute position the first time an entity is seen diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index dd6c84b4a2..de0cf6b735 100644 +index 315c3d9165..aaf3a54b08 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java +@@ -0,0 +0,0 @@ package net.minecraft.server; + + import java.util.Collection; + import java.util.Collections; ++import java.util.HashSet; + import java.util.Iterator; + import java.util.List; + import java.util.Set; @@ -0,0 +0,0 @@ public class EntityTrackerEntry { - private boolean x; - private boolean y; - public boolean b; -- public final Set trackedPlayers = Sets.newHashSet(); + private final Entity tracker; + private final int d; + private final boolean e; +- private final Consumer> f; ++ private final Consumer> f; private Consumer> getPacketConsumer() { return f; } // Paper - OBFHELPER + private long xLoc; + private long yLoc; + private long zLoc; +@@ -0,0 +0,0 @@ public class EntityTrackerEntry { + private boolean r; + // CraftBukkit start + private final Set trackedPlayers; + // Paper start -+ // Replace trackedPlayers Set with a Map. The value is true until the player receives -+ // their first update (which is forced to have absolute coordinates), false afterward. -+ public java.util.Map trackedPlayerMap = new java.util.HashMap(); -+ public Set trackedPlayers = trackedPlayerMap.keySet(); ++ private java.util.Map trackedPlayerMap = null; + + /** + * Requested in https://github.com/PaperMC/Paper/issues/1537 to allow intercepting packets @@ -25,35 +38,25 @@ index dd6c84b4a2..de0cf6b735 100644 + public void sendPlayerPacket(EntityPlayer player, Packet packet) { + player.playerConnection.sendPacket(packet); + } -+ // Paper end ++ ++ public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer> consumer, java.util.Map trackedPlayers) { ++ this(worldserver, entity, i, flag, consumer, trackedPlayers.keySet()); ++ trackedPlayerMap = trackedPlayers; ++ } - public EntityTrackerEntry(Entity entity, int i, int j, int k, boolean flag) { - this.tracker = entity; -@@ -0,0 +0,0 @@ public class EntityTrackerEntry { - boolean flag1 = l1 * l1 + i2 * i2 + j2 * j2 >= 128L || this.a % 60 == 0; - boolean flag2 = Math.abs(j1 - this.yRot) >= 1 || Math.abs(k1 - this.xRot) >= 1; - -+ if (this.a > 0 || this.tracker instanceof EntityArrow) { // Paper - Moved up - // CraftBukkit start - Code moved from below - if (flag1) { - this.xLoc = k; -@@ -0,0 +0,0 @@ public class EntityTrackerEntry { - } - // CraftBukkit end - -- if (this.a > 0 || this.tracker instanceof EntityArrow) { - if (l1 >= -32768L && l1 < 32768L && i2 >= -32768L && i2 < 32768L && j2 >= -32768L && j2 < 32768L && this.v <= 400 && !this.x && this.y == this.tracker.onGround) { - if ((!flag1 || !flag2) && !(this.tracker instanceof EntityArrow)) { - if (flag1) { + public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer> consumer, Set trackedPlayers) { ++ // Paper end + this.trackedPlayers = trackedPlayers; + // CraftBukkit end + this.m = Vec3D.a; @@ -0,0 +0,0 @@ public class EntityTrackerEntry { } if (packet1 != null) { -- this.broadcast((Packet) packet1); -+ // Paper start - ensure fresh viewers get an absolute position on their first update, -+ // since we can't be certain what position they received in the spawn packet. -+ if (packet1 instanceof PacketPlayOutEntityTeleport) { -+ this.broadcast((Packet) packet1); +- this.f.accept(packet1); ++ // paper start ++ if (trackedPlayerMap == null || packet1 instanceof PacketPlayOutEntityTeleport) { ++ this.f.accept((packet1)); + } else { + PacketPlayOutEntityTeleport teleportPacket = null; + @@ -65,21 +68,42 @@ index dd6c84b4a2..de0cf6b735 100644 + } + sendPlayerPacket(viewer.getKey(), teleportPacket); + } else { -+ sendPlayerPacket(viewer.getKey(), (Packet) packet1); ++ sendPlayerPacket(viewer.getKey(), packet1); + } + } + } + // Paper end } - this.d(); -@@ -0,0 +0,0 @@ public class EntityTrackerEntry { + this.c(); +diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java +index c08a1a6e51..528d0f0cd2 100644 +--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java ++++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private final Entity tracker; + private final int trackingDistance; + private SectionPosition e; +- public final Set trackedPlayers = Sets.newHashSet(); ++ // Paper start ++ // Replace trackedPlayers Set with a Map. The value is true until the player receives ++ // their first update (which is forced to have absolute coordinates), false afterward. ++ public java.util.Map trackedPlayerMap = new java.util.HashMap<>(); ++ public Set trackedPlayers = trackedPlayerMap.keySet(); + public EntityTracker(Entity entity, int i, int j, boolean flag) { +- this.trackerEntry = new EntityTrackerEntry(PlayerChunkMap.this.world, entity, j, flag, this::broadcast, trackedPlayers); // CraftBukkit ++ this.trackerEntry = new EntityTrackerEntry(PlayerChunkMap.this.world, entity, j, flag, this::broadcast, trackedPlayerMap); // CraftBukkit // Paper + this.tracker = entity; + this.trackingDistance = i; + this.e = SectionPosition.a(entity); +@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); // CraftBukkit end -- this.trackedPlayers.add(entityplayer); -+ this.trackedPlayerMap.put(entityplayer, true); // Paper - Packet packet = this.e(); - entityplayer.playerConnection.sendPacket(packet); +- if (flag1 && this.trackedPlayers.add(entityplayer)) { ++ if (flag1 && this.trackedPlayerMap.put(entityplayer, true) == null) { // Paper + this.trackerEntry.b(entityplayer); + } + } else if (this.trackedPlayers.remove(entityplayer)) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 13d687bb17..cee6599125 100644 --- a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index d05fee962a..61c02c530b 100644 +index 3f35a28ba1..cf00f35a5b 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -0,0 +0,0 @@ public class EULA { @@ -19,7 +19,7 @@ index d05fee962a..61c02c530b 100644 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7b102e155d..89ad19e59c 100644 +index 277fa64e24..33e8030def 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant blockStateList; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2b29fe837b..89bce93c61 100644 +index 9cce929c3e..1a2cc0258a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -369,7 +369,7 @@ index 2b29fe837b..89bce93c61 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 416f8e080c..5ee9824ba2 100644 +index 845ad7427b..4f0fbe4a0d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { @@ -406,7 +406,7 @@ index 416f8e080c..5ee9824ba2 100644 @Override diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index c91347c644..8ac0e67e35 100644 +index d084d24a01..0fed039f34 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ @@ -480,7 +480,7 @@ index 46e7737ca3..a3ef943066 100644 return this.b; } diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java -index ed4b189d7e..2d2a4c9825 100644 +index 42e01136d9..b7c1d7671e 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java @@ -0,0 +0,0 @@ public class CustomFunctionData implements IResourcePackListener { @@ -546,7 +546,7 @@ index b60956218d..19e2df3098 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 e2b37ed1a0..2d07bfa879 100644 +index 53f8e6811a..114a851f0f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender; @@ -585,7 +585,7 @@ index e2b37ed1a0..2d07bfa879 100644 protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d31c1c989c..d89dbf1745 100644 +index f86e6a4c51..85567a7072 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -661,7 +661,7 @@ index d31c1c989c..d89dbf1745 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e35d4808bf..7b102e155d 100644 +index 741105fb6c..277fa64e24 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ @@ -789,7 +789,7 @@ index e35d4808bf..7b102e155d 100644 this.methodProfiler.exit(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 95ba254479..5d13e7ad36 100644 +index 4d8491c760..c08a1a6e51 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ @@ -961,7 +961,7 @@ index c8d2c81c58..aefc3eb19c 100644 throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 993306e8e7..e6c03908cb 100644 +index b0c6b1385d..7939208a5a 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ @@ -1038,7 +1038,7 @@ index 537e610797..b48e5b51a0 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 12f359a6ba..b5e0ba3909 100644 +index 42303f5b39..456afbf079 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; @@ -1054,11 +1054,11 @@ index 12f359a6ba..b5e0ba3909 100644 - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot + public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper - private static final Logger a = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); private final TileEntityTypes b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER @Nullable diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 28fa346b7f..eabcab0244 100644 +index 83fdea893c..738d9da8ce 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ @@ -1122,7 +1122,7 @@ index 28fa346b7f..eabcab0244 100644 // Spigot end } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1ec8272ff3..4fdbb8cd57 100644 +index 20900593af..d54d58e1ee 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ @@ -1199,7 +1199,7 @@ index 1ec8272ff3..4fdbb8cd57 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 93246f464b..95d0075d57 100644 +index 9021ab34fa..672a647960 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch index ce15b901e3..a6d94536c8 100644 --- a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch +++ b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch @@ -5,17 +5,9 @@ Subject: [PATCH] Use UserCache for player heads diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 210c10b317..2ad3acf43b 100644 +index 63ec8d06e4..f270532763 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -0,0 +0,0 @@ import net.minecraft.server.GameProfileSerializer; - import net.minecraft.server.NBTBase; - import net.minecraft.server.NBTTagCompound; - import net.minecraft.server.TileEntitySkull; -+import net.minecraft.server.*; - - import org.bukkit.Bukkit; - import org.bukkit.Material; @@ -0,0 +0,0 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { if (name == null) { profile = null; @@ -23,7 +15,7 @@ index 210c10b317..2ad3acf43b 100644 - profile = new GameProfile(null, name); + // Paper start - Use Online Players Skull + GameProfile newProfile = null; -+ EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name); ++ net.minecraft.server.EntityPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayer(name); + if (player != null) newProfile = player.getProfile(); + if (newProfile == null) newProfile = new GameProfile(null, name); + profile = newProfile; diff --git a/scripts/remap.sh b/scripts/remap.sh index 3765142085..0d9d64d4bb 100755 --- a/scripts/remap.sh +++ b/scripts/remap.sh @@ -54,7 +54,7 @@ fi echo "Applying member mappings..." if [ ! -f "$jarpath-m.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-member LOGGER --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to apply member mappings." exit 1 diff --git a/work/BuildData b/work/BuildData index 601818a24e..df66507184 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 601818a24e1d39ea5c09cbf82932fad6031c44b7 +Subproject commit df665071847a0ace1b4b7149f504e5bb8eca992c diff --git a/work/Bukkit b/work/Bukkit index 3735f9d0ad..73c2356795 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 3735f9d0ad8295565d59db84f49446589f580da0 +Subproject commit 73c235679573768d11aca47ce7e9bc4051004f19 diff --git a/work/CraftBukkit b/work/CraftBukkit index 364b6fbb73..724ec10f33 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 364b6fbb73176d276a110f4ce4217979ad7ee6a4 +Subproject commit 724ec10f3358924e348e96fe51dffe41c91780e5 diff --git a/work/Spigot b/work/Spigot index 6dbf995f13..066994b8ae 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 6dbf995f13ca29e311d686e963973905388a29b3 +Subproject commit 066994b8aef9c7e7c0bf800e346eb30efa76835a