Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Warning: this commit contains more mapping changes from upstream, As always, ensure that you
have working backups and test this build before deployment; Developers working on paper will,
yet again, need to delete their work/Minecraft/1.13.2 folder

Bukkit Changes:
7fca5fd4 SPIGOT-4558: Preserve user order in the face of copied defaults in configurations
15c9b1eb Ignore spurious slot IDs sent by client, e.g. in enchanting tables
5d2a10c5 SPIGOT-3747: Add API for force loaded chunks
d6dd2bb3 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
771db4aa SPIGOT-794: Call EntityPlaceEvent for Minecart placement
55462509 Add InventoryView#getSlotType
2f3ce5b6 Remove EntityTransformEvent and CustomItemTagContainer from draft API
f04ad7b6 Make ProjectileLaunchEvent extend EntitySpawnEvent
ccb85808 Define EntitySpawnEvent
b8cc3ebe Add PlayerItemDamageEvent
184a495d Ease ClassLoader Deadlocks Where Possible
11ac4728 Expand Boolean Prompt Values in Conversation API
aae62d51 Added getAllSessionData() to the Conversation API.
9290ff91 Add InventoryView#getInventory API
995e530f Add API to get / set base arrow damage

CraftBukkit Changes:
c4a67eed SPIGOT-4556: Fix plugins closing inventory during drop events
5be2ddcb Replace version constants with methods to prevent compiler inlining
a5b9c7b3 Use API method to create offset command completions
2bc7d1df SPIGOT-3747: Add API for force loaded chunks
a408f375 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
b54b9409 SPIGOT-2864: Make Arrow / Item setTicksLived behave like FallingBlock
79ded7a8 SPIGOT-1811: Death message not shown on respawn screen
b4a4f15d SPIGOT-943: InventoryCloseEvent called on death regardless of open inventory
0afed592 SPIGOT-794: Call EntityPlaceEvent for Minecart placement
2b2d084a Add InventoryView#getSlotType
01a9959a Do not use deprecated ItemSpawnEvent constructor
9642498d SPIGOT-4547: Call EntitySpawnEvent as general spawn fallback event
963f4a5f Add PlayerItemDamageEvent
63db0445 Add API to get / set base arrow damage
531c25d7 Add CraftMagicNumbers.MAPPINGS_VERSION for use by NMS plugins
d05c8b14 Mappings Update
bd36e200 SPIGOT-4551: Ignore invalid attribute modifier slots

Spigot Changes:
518206a1 Remove redundant trove depend
1959ad21 MC-11211,SPIGOT-4552: Fix placing double slabs at y = 255
29ab5e43 SPIGOT-3661: Allow arguments in restart-script
7cc46316 SPIGOT-852: Growth modifiers for beetroots, potatoes, carrots
82e117e1 Squelch "fatal: Resolve operation not in progress" message
0a1a68e7 Mappings Update & Patch Rebuild
This commit is contained in:
Shane Freeder
2019-01-01 03:15:55 +00:00
parent 8ef9dc94ca
commit 08b01ae4df
363 changed files with 1838 additions and 2537 deletions

View File

@@ -297,7 +297,7 @@ index 255b8bed0..fe148495b 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index a30b21ad2..83b1ef0fc 100644
index c09961be9..dbf1089ba 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -0,0 +0,0 @@ public class Block implements IMaterial {
@@ -317,7 +317,7 @@ index a30b21ad2..83b1ef0fc 100644
private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 4d04fdda7..9970a58ed 100644
index 23dee9b56..eca1284cc 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
@@ -357,7 +357,7 @@ index df2711a5f..732c8793e 100644
return chunk1;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index b859a5b9e..60abc5f28 100644
index 0397ce610..44c1dfe92 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -366,9 +366,9 @@ index b859a5b9e..60abc5f28 100644
if (flag) {
- try {
+ try (co.aikar.timings.Timing timing = world.timings.syncChunkLoadTimer.startTiming()) { // Paper
// CraftBukkit - decompile error
chunk = this.chunkLoader.a(this.world, i, j, (chunk1) -> {
chunk1.setLastSaved(this.world.getTime());
this.chunks.put(ChunkCoordIntPair.a(i, j), chunk1);
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
this.asyncTaskHandler.postToMainThread(chunk::addEntities);
return chunk;
@@ -378,7 +378,7 @@ index b859a5b9e..60abc5f28 100644
+ try (co.aikar.timings.Timing timing = world.timings.chunkGeneration.startTiming()) { // Paper
this.batchScheduler.b();
this.batchScheduler.a(new ChunkCoordIntPair(i, j));
CompletableFuture<ProtoChunk> completablefuture = this.batchScheduler.c(); // CraftBukkit - decompile error
CompletableFuture<ProtoChunk> completablefuture = this.batchScheduler.c();
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
} catch (RuntimeException runtimeexception) {
throw this.a(i, j, (Throwable) runtimeexception);
@@ -398,7 +398,7 @@ index b859a5b9e..60abc5f28 100644
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 1b8c28096..62a63dfa8 100644
index e7ed23453..63533d237 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -0,0 +0,0 @@
@@ -445,7 +445,7 @@ index 1b8c28096..62a63dfa8 100644
}
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
index cc9e8465c..1bd3a0f77 100644
index 65574eb2e..bc87cfc4b 100644
--- a/src/main/java/net/minecraft/server/CustomFunction.java
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
@@ -0,0 +0,0 @@ public class CustomFunction {
@@ -472,7 +472,7 @@ index cc9e8465c..1bd3a0f77 100644
return this.b;
}
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index b8a626dd4..323b2e6dc 100644
index f28f4f3cd..6b417be1d 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -0,0 +0,0 @@ public class CustomFunctionData implements ITickable, IResourcePackListener {
@@ -485,7 +485,7 @@ index b8a626dd4..323b2e6dc 100644
int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index b5e5c385d..7f4c76669 100644
index 197d116c6..0ebada490 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Level;
@@ -538,7 +538,7 @@ index b5e5c385d..7f4c76669 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 50176b97b..f960db23d 100644
index 48ec5e047..f36ab639f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender;
@@ -577,7 +577,7 @@ index 50176b97b..f960db23d 100644
protected float ab() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 14c481220..92a55bdf6 100644
index ed859ccf9..31bbbbd96 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@@ -653,15 +653,15 @@ index 14c481220..92a55bdf6 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index 22db1fad1..d7f33bd53 100644
index cd462f7df..45ab33d1a 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -0,0 +0,0 @@ public class EntityTracker {
public void updatePlayers() {
ArrayList arraylist = Lists.newArrayList();
List<EntityPlayer> list = Lists.newArrayList();
Iterator iterator = this.c.iterator();
-
+ world.timings.tracker1.startTiming(); // Spigot
+ world.timings.tracker1.startTiming(); // Paper
while (iterator.hasNext()) {
EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry) iterator.next();
@@ -669,22 +669,22 @@ index 22db1fad1..d7f33bd53 100644
}
}
}
+ world.timings.tracker1.stopTiming(); // Spigot
+ world.timings.tracker1.stopTiming(); // Paper
+ world.timings.tracker2.startTiming(); // Spigot
for (int i = 0; i < arraylist.size(); ++i) {
EntityPlayer entityplayer = (EntityPlayer) arraylist.get(i);
+ world.timings.tracker2.startTiming(); // Paper
for (int i = 0; i < list.size(); ++i) {
EntityPlayer entityplayer = (EntityPlayer) list.get(i);
Iterator iterator1 = this.c.iterator();
@@ -0,0 +0,0 @@ public class EntityTracker {
}
}
}
+ world.timings.tracker2.stopTiming(); // Spigot
+ world.timings.tracker2.stopTiming(); // Paper
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 37211c33a..97690499f 100644
index 963c7e777..edb1748fd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@
@@ -837,7 +837,7 @@ index 37211c33a..97690499f 100644
this.methodProfiler.exit();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index ceac52fe5..29e24940f 100644
index c24f4a8fe..e01222ad2 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -0,0 +0,0 @@
@@ -877,9 +877,8 @@ index ceac52fe5..29e24940f 100644
if (this.l && i % 4L == 0L) {
this.l = false;
+ try (Timing ignored = world.timings.doChunkMapSortMissing.startTiming()) { // Paper
// CraftBukkit start
Collections.sort(this.h, (playerchunkx, playerchunk1x) -> {
return ComparisonChain.start().compare(playerchunkx.g(), playerchunk1x.g()).result();
Collections.sort(this.h, (playerchunk1, playerchunk2) -> {
return ComparisonChain.start().compare(playerchunk1.g(), playerchunk2.g()).result();
});
+ } // Paper timing
}
@@ -887,11 +886,10 @@ index ceac52fe5..29e24940f 100644
if (this.m && i % 4L == 2L) {
this.m = false;
+ try (Timing ignored = world.timings.doChunkMapSortSendToPlayers.startTiming()) { // Paper
Collections.sort(this.g, (playerchunkx, playerchunk1x) -> {
return ComparisonChain.start().compare(playerchunkx.g(), playerchunk1x.g()).result();
Collections.sort(this.g, (playerchunk1, playerchunk2) -> {
return ComparisonChain.start().compare(playerchunk1.g(), playerchunk2.g()).result();
});
+ } // Paper timing
// CraftBukkit end
}
if (!this.h.isEmpty()) {
@@ -931,7 +929,7 @@ index ceac52fe5..29e24940f 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2b6c797ce..0a887789a 100644
index f0e87416e..723fce204 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory;
@@ -986,7 +984,7 @@ index 2b6c797ce..0a887789a 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index 616797dc6..3a5daf670 100644
index 6c88d0c86..8bf94c1b9 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -0,0 +0,0 @@
@@ -996,18 +994,19 @@ index 616797dc6..3a5daf670 100644
+import co.aikar.timings.Timing; // Paper
+
public class PlayerConnectionUtils {
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T packetlistener, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException {
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException {
if (!iasynctaskhandler.isMainThread()) {
+ Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper
iasynctaskhandler.postToMainThread(() -> {
+ try (Timing ignored = timing.startTiming()) { // Paper
packet.a(packetlistener);
+ }
+ try (Timing ignored = timing.startTiming()) { // Paper
packet.a(t0);
+ } // Paper - timings
});
throw CancelledPacketHandleException.INSTANCE;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 9db7d7e30..aef650774 100644
index 8d90b674a..aab49bf68 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@
@@ -1031,7 +1030,7 @@ index 9db7d7e30..aef650774 100644
public WhiteList getWhitelist() {
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
index 0d0b4d873..774134103 100644
index 0da57948a..6571fc595 100644
--- a/src/main/java/net/minecraft/server/TickListServer.java
+++ b/src/main/java/net/minecraft/server/TickListServer.java
@@ -0,0 +0,0 @@ public class TickListServer<T> implements TickList<T> {
@@ -1105,7 +1104,7 @@ index c69209497..68ac014aa 100644
private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0920ef2d1..230517907 100644
index 5531f5205..209091a9c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@
@@ -1115,7 +1114,7 @@ index 0920ef2d1..230517907 100644
import com.google.common.base.MoreObjects;
import com.google.common.collect.Lists;
import it.unimi.dsi.fastutil.longs.LongSet;
@@ -0,0 +0,0 @@ import com.google.common.collect.Maps;
@@ -0,0 +0,0 @@ import java.util.ArrayList;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.block.BlockState;
@@ -1123,13 +1122,6 @@ index 0920ef2d1..230517907 100644
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.block.CraftBlockState;
import org.bukkit.craftbukkit.block.data.CraftBlockData;
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
+import org.bukkit.craftbukkit.util.LongHashSet; // Paper
import org.bukkit.event.block.BlockCanBuildEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
@@ -1220,7 +1212,7 @@ index 0920ef2d1..230517907 100644
public boolean a(@Nullable Entity entity, VoxelShape voxelshape) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 23c80f80a..2450421d4 100644
index 0a32a767e..60939cc33 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@
@@ -1231,20 +1223,16 @@ index 23c80f80a..2450421d4 100644
import com.google.common.collect.Maps;
import com.google.common.util.concurrent.ListenableFuture;
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
IRegistry<Block> iregistry1 = IRegistry.BLOCK; // CraftBukkit - decompile error
IRegistry.BLOCK.getClass();
- this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b); // CraftBukkit - decompile error
+ this.nextTickListBlock = new TickListServer<>(this, predicate, function, iregistry1::getOrDefault, this::b, "Blocks"); // CraftBukkit - decompile error // Paper - Timings v2
Predicate<FluidType> predicate2 = (fluidtype) -> { // CraftBukkit - decompile error
return fluidtype == null || fluidtype == FluidTypes.a;
};
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
function = iregistry::getKey;
IRegistry<FluidType> iregistry2 = IRegistry.FLUID; // CraftBukkit - decompile error
IRegistry.FLUID.getClass();
- this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a); // CraftBukkit - decompile error
+ this.nextTickListFluid = new TickListServer<>(this, predicate2, function, iregistry2::getOrDefault, this::a, "Fluids"); // CraftBukkit - decompile error // Paper - Timings v2
// CraftBukkit end
this.nextTickListBlock = new TickListServer<>(this, (block) -> {
return block == null || block.getBlockData().isAir();
- }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::getOrDefault, this::b);
+ }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::getOrDefault, this::b, "Blocks"); // Paper - timings
+
this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> {
return fluidtype == null || fluidtype == FluidTypes.EMPTY;
- }, IRegistry.FLUID::getKey, IRegistry.FLUID::getOrDefault, this::a);
+ }, IRegistry.FLUID::getKey, IRegistry.FLUID::getOrDefault, this::a, "Fluids"); // Paper - timings
this.siegeManager = new VillageSiege(this);
this.d = new ObjectLinkedOpenHashSet();
this.server = minecraftserver;
@@ -1298,8 +1286,8 @@ index 23c80f80a..2450421d4 100644
chunkproviderserver.a(flag);
+ timings.worldSaveChunks.stopTiming(); // Paper
// CraftBukkit - ArrayList -> Collection
java.util.Collection arraylist = chunkproviderserver.a();
Iterator iterator = arraylist.iterator();
java.util.Collection<Chunk> list = chunkproviderserver.a();
Iterator iterator = list.iterator();
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.unload(chunk);
}
@@ -1577,7 +1565,7 @@ index 413dd35f0..52a8c48fa 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b1a5937b1..b5afd5d1c 100644
index ab944fc67..7993581c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {