Updated Upstream (Bukkit/CraftBukkit)

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

Bukkit Changes:
0969eedc Clarify furnace burn time behaviour as per SPIGOT-844
16453bfd SPIGOT-4503: Add API to insert complete ItemStack into Jukebox

CraftBukkit Changes:
dff66dfc Reduce copying of positions from block states
91cae6ef SPIGOT-4387: Durability looping from cancelled BlockPlaceEvent
24c5e68c SPIGOT-4493: Allow burnt out furnaces to remain lit like Vanilla whilst retaining SPIGOT-844 API
bc943daf Fix Jukebox API not synchronizing playing data with state
fe89a8c1 SPIGOT-4503: Add API to insert complete ItemStack into Jukebox
fc102494 Make CraftBlockState use BlockPosition
89ab4887 SPIGOT-4543: Jukebox playing calls should not use legacy data
6ff5a64c SPIGOT-4541: Cancelled bucket events require inventory update
This commit is contained in:
Shane Freeder 2018-12-23 17:04:13 +00:00
parent ab61364486
commit 8ef9dc94ca
37 changed files with 71 additions and 135 deletions

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Implement furnace cook speed multiplier API
Signed-off-by: Tassu <git@tassu.me>
diff --git a/src/main/java/org/bukkit/block/Furnace.java b/src/main/java/org/bukkit/block/Furnace.java
index ee8a95601..437c7c4fd 100644
index b41e8ffd..e797b060 100644
--- a/src/main/java/org/bukkit/block/Furnace.java
+++ b/src/main/java/org/bukkit/block/Furnace.java
@@ -0,0 +0,0 @@ public interface Furnace extends Container, Nameable {

View file

@ -64,12 +64,12 @@ index d40127075..e7ccee480 100644
switch (material) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 0558cafe3..d4d9c5fc5 100644
index 4f4121adc..082a1b6e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -0,0 +0,0 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
CraftWorld world = (CraftWorld) this.getWorld();
this.tileEntity = tileEntityClass.cast(world.getTileEntityAt(this.getX(), this.getY(), this.getZ()));
this.tileEntity = tileEntityClass.cast(world.getHandle().getTileEntity(this.getPosition()));
+ // Paper start
+ this.snapshotDisabled = DISABLE_SNAPSHOT;

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add hand to bucket events
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index c9e9b45dc..6bb80975e 100644
index 5ac88166f..5874d2993 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -0,0 +0,0 @@ public class EntityCow extends EntityAnimal {
@ -18,7 +18,7 @@ index c9e9b45dc..6bb80975e 100644
if (event.isCancelled()) {
return false;
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java
index 92c596e2c..edd35fe8a 100644
index 6e12bf84f..5d8568a1c 100644
--- a/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/src/main/java/net/minecraft/server/ItemBucket.java
@@ -0,0 +0,0 @@ public class ItemBucket extends Item {
@ -29,7 +29,7 @@ index 92c596e2c..edd35fe8a 100644
+ PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), null, itemstack, dummyFluid.b(), enumhand); // Paper - add enumHand
if (event.isCancelled()) {
return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack);
((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
@@ -0,0 +0,0 @@ public class ItemBucket extends Item {
iblockdata = world.getType(blockposition);
BlockPosition blockposition1 = this.a(iblockdata, blockposition, movingobjectposition);
@ -65,9 +65,9 @@ index 92c596e2c..edd35fe8a 100644
+ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(entityhuman, clicked.getX(), clicked.getY(), clicked.getZ(), enumdirection, itemstack, enumhand); // Paper - add enumHand
if (event.isCancelled()) {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
// TODO: inventory not updated
((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 672c32858..cd6ae3b8e 100644
index 41b05f231..c6cd2f3be 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ public class CraftEventFactory {

View file

@ -20,7 +20,7 @@ index 48920b045..77368b17a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8e436c7f4..5e8c85cfb 100644
index f2f977fff..96db9121b 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 {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index d92b6a6ea..6a1c8e8bd 100644
index 877337eed..48c1ae624 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
@ -17,7 +17,7 @@ index d92b6a6ea..6a1c8e8bd 100644
if (this.world.L() && !this.world.isClientSide) {
float f = this.az();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2b9da597a..d202360bd 100644
index 9fc0d7576..c8a7f5e59 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
@ -29,7 +29,7 @@ index 2b9da597a..d202360bd 100644
return this.G < 4;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ef5a7bc38..10fa12253 100644
index 162ff3414..86e70f236 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Allow chests to be placed with NBT data
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index eea6d9419..4d29cb8d8 100644
index d32ea9c92..d1000805a 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -0,0 +0,0 @@ public final class ItemStack {
@ -25,7 +25,7 @@ index eea6d9419..4d29cb8d8 100644
for (BlockState blockstate : blocks) {
blockstate.update(true, false);
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 9573a4ecd..7594c16e9 100644
index f00c7dade..961e9d62c 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic

View file

@ -8,7 +8,7 @@ This API has more capabilities than .dropItem with the Consumer function
Item can be set inside of the Consumer pre spawn function.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 84bde3ef2..e127cc91e 100644
index d3be0211f..b50785aa0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -458,7 +458,7 @@ index 000000000..8f18c2869
+
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index c3a54576f..6255aa285 100644
index 25e49de19..8246194df 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 {
@ -2019,7 +2019,7 @@ index 1926c902a..1117e4ae2 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 72bb3f862..d736ac63d 100644
index cb09e1052..cd31792b7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@ -2070,7 +2070,7 @@ index 72bb3f862..d736ac63d 100644
Iterator<CraftBlockState> it = capturedBlockStates.iterator();
while (it.hasNext()) {
CraftBlockState previous = it.next();
- if (previous.getX() == blockposition.getX() && previous.getY() == blockposition.getY() && previous.getZ() == blockposition.getZ()) {
- if (previous.getPosition().equals(blockposition)) {
- return previous.getHandle();
+ if (previous.getX() == x && previous.getY() == blockposition.getY() && previous.getZ() == z) {
+ return java.util.concurrent.CompletableFuture.completedFuture(previous.getHandle());
@ -2304,7 +2304,7 @@ index a0f255ff1..eb4b3c7a2 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5552b64fb..c6d033928 100644
index 7ef3c7746..162ff3414 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -22,7 +22,7 @@ index fef899ae0..468aff713 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index bb4498e0f..a9ef84d0e 100644
index 44fabe240..6a99fb6b7 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 {

View file

@ -63,7 +63,7 @@ index eef8d2b5a..cc98b745b 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ceb4102af..02a62d6d7 100644
index 520235d1b..7953d7f99 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
@ -91,7 +91,7 @@ index acd54067e..c655d51ac 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 1676fcc85..b19eef1b1 100644
index 889f99d66..ff1ccbd64 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -43,7 +43,7 @@ index 42d951554..d8f258105 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index f470eba29..86bdd6e7f 100644
index f6bfd6ece..7380c4386 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 {
@ -172,7 +172,7 @@ index 3d17ad646..c3ac66d35 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5d7370029..6f672aa22 100644
index c484493b0..9a0e5342d 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
@ -191,7 +191,7 @@ index 5d7370029..6f672aa22 100644
this.methodProfiler.a(() -> {
return String.valueOf(TileEntityTypes.a(tileentity.C()));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b19eef1b1..f1320f5ac 100644
index ff1ccbd64..3e71cdcdc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5e8c85cfb..bb4498e0f 100644
index 96db9121b..44fabe240 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 {

View file

@ -1,58 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sat, 20 Oct 2018 03:45:34 +0200
Subject: [PATCH] Don't modify item tag if interaction is canceled
The item tag is stored before executing the interaction and restored before handling the
resulting events. If the event was not canceled and the ItemStack is not modified in the
event, the new tag is set back to the new one afterwards. This is similar to the handling
of the item amount.
This fixes a bug where tools lose durability when the interaction is canceled and another bug
where tools become completely repaired when they should break but the interaction was canceled.
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 4d29cb8d8..cb77bc8a5 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -0,0 +0,0 @@ public final class ItemStack {
} else {
// CraftBukkit start - handle all block place event logic here
int oldCount = this.getCount();
+ NBTTagCompound oldTag = this.tag != null ? this.tag.clone() : null; // Paper - capture old tag
World world = itemactioncontext.getWorld();
if (!(this.getItem() instanceof ItemBucket)) { // if not bucket
@@ -0,0 +0,0 @@ public final class ItemStack {
Item item = this.getItem();
EnumInteractionResult enuminteractionresult = item.a(itemactioncontext);
int newCount = this.getCount();
+ NBTTagCompound newTag = this.tag != null ? this.tag.clone() : null; // Paper - capture modified tag
this.setCount(oldCount);
+ this.tag = oldTag; // Paper - restore old tag for the event
world.captureBlockStates = false;
if (enuminteractionresult == EnumInteractionResult.SUCCESS && world.captureTreeGeneration && world.capturedBlockStates.size() > 0) {
world.captureTreeGeneration = false;
@@ -0,0 +0,0 @@ public final class ItemStack {
if (!fertilizeEvent.isCancelled()) {
// Change the stack to its new contents if it hasn't been tampered with.
- if (this.getCount() == oldCount) {
+ if (this.getCount() == oldCount && java.util.Objects.equals(this.tag, oldTag)) { // Paper - compare the tag too
this.setCount(newCount);
+ this.tag = newTag; // Paper - restore modified tag
}
for (BlockState blockstate : blocks) {
blockstate.update(true);
@@ -0,0 +0,0 @@ public final class ItemStack {
}
} else {
// Change the stack to its new contents if it hasn't been tampered with.
- if (this.getCount() == oldCount) {
+ if (this.getCount() == oldCount && java.util.Objects.equals(this.tag, oldTag)) { // Paper - compare the tag too
this.setCount(newCount);
+ this.tag = newTag; // Paper - restore modified tag
}
for (Map.Entry<BlockPosition, TileEntity> e : world.capturedTileEntities.entrySet()) {
--

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e127cc91e..d6f995377 100644
index b50785aa0..142ba2c0a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -34,7 +34,7 @@ index 5f386ff04..55e45dbb1 100644
if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8c4b7aee6..c844c4579 100644
index b4f908164..d3be0211f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -8,7 +8,7 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index fb7688e9e..1bf01000e 100644
index 8aa6ed8d8..b8684f6a2 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 {
@ -28,7 +28,7 @@ index fb7688e9e..1bf01000e 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 3ec3053c7..473773724 100644
index 61b18ca8a..32fd5adc6 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
@ -41,7 +41,7 @@ index 3ec3053c7..473773724 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 2f6fd88ca..dfd6230b2 100644
index 3030dd9c3..404a222b4 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity {
@ -120,7 +120,7 @@ index 2f6fd88ca..dfd6230b2 100644
public void d(EntityHuman entityhuman) {
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 84a9375db..e494552f6 100644
index 45a326779..cccb19589 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
@ -133,7 +133,7 @@ index 84a9375db..e494552f6 100644
// CraftBukkit end
if (itemstack1.getItem().a(TagsItem.FISHES)) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3c6d02e27..83605e7c7 100644
index 162de836e..284e22bbd 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 {
@ -160,7 +160,7 @@ index a5e1939e0..e73dba09a 100644
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index ac81a8d76..a11e66262 100644
index bd799d0c6..f80634d54 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@ -199,7 +199,7 @@ index c8cfa3abe..aa7780eff 100644
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
index a6999f868..4ab6747d4 100644
index bbb4ee3ec..839cccbe3 100644
--- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java
+++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
@@ -0,0 +0,0 @@ import org.bukkit.event.inventory.FurnaceExtractEvent;
@ -221,7 +221,7 @@ index a6999f868..4ab6747d4 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3a30349f4..e1c09452b 100644
index bbe9c5e89..b4f908164 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling
Only process drops when the block is actually going to be removed
diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java
index 9c508caa9..4b762a92c 100644
index ab1ee37a2..852d98a6b 100644
--- a/src/main/java/net/minecraft/server/BlockSponge.java
+++ b/src/main/java/net/minecraft/server/BlockSponge.java
@@ -0,0 +0,0 @@ public class BlockSponge extends Block {

View file

@ -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/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index b9fa5ccc7..50812b70f 100644
index 92f8d0633..dbc9fbd66 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -0,0 +0,0 @@ import com.mojang.brigadier.StringReader;
@ -201,7 +201,7 @@ index 2ef4ac64b..d1a546c8f 100644
static Map<Enchantment, Integer> 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 dfc5bb4fd..c00ced8e8 100644
index 0764a6835..407adbdae 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -0,0 +0,0 @@ import java.lang.reflect.Constructor;

View file

@ -35,7 +35,7 @@ index 469dce5df..f1abcadcc 100644
public float length;
public float J;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f5f1452b7..762ae7366 100644
index 31bc34239..6958f00d7 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
@ -71,7 +71,7 @@ index f5f1452b7..762ae7366 100644
if (entity instanceof EntityInsentient) {
EntityInsentient entityinsentient = (EntityInsentient) entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a41716fd4..20fb157fa 100644
index d9385aa7a..ee2b443dd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -28,7 +28,7 @@ index 12c6d850d..b9371e3ae 100644
Arrays.fill(emptySkyLight, (byte) 0xFF);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 4237e5e3c..d5936eb19 100644
index 5a7857e25..48831e45b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index d6f995377..a05320c90 100644
index 142ba2c0a..d9385aa7a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Implement furnace cook speed multiplier API
Signed-off-by: Tassu <git@tassu.me>
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index 1634b8ce0..324a8431c 100644
index 7ec656ebe..c3c230c21 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -0,0 +0,0 @@ import java.util.Map.Entry;
@ -57,7 +57,7 @@ index 1634b8ce0..324a8431c 100644
this.cookTimeTotal = this.s();
this.burn(irecipe);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
index 469dc4ff2..0ffbe8cd6 100644
index 6ca6a6bf2..cb456f726 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
@@ -0,0 +0,0 @@ public class CraftFurnace extends CraftContainer<TileEntityFurnace> implements F

View file

@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 3de567851..a1ec3879b 100644
index f7ac69456..16d0c2662 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -0,0 +0,0 @@ public final class ItemStack {

View file

@ -520,7 +520,7 @@ index 000000000..d50410532
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e60e8e8fe..3846e36f7 100644
index b39e3ef13..1338eff40 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
@ -532,7 +532,7 @@ index e60e8e8fe..3846e36f7 100644
public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 8945ab275..184809b83 100644
index 520cca48c..e228fc853 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -0,0 +0,0 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@ -591,7 +591,7 @@ index 8945ab275..184809b83 100644
if (this.lootTableSeed == 0L) {
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
index 25328bf41..6e3779c41 100644
index 7d066a18d..c9c29528a 100644
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
@@ -0,0 +0,0 @@ import java.util.Random;
@ -646,7 +646,7 @@ index 25328bf41..6e3779c41 100644
if (this.h == 0L) {
random = new Random();
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index ac9b4297b..0558cafe3 100644
index 8617fac6b..4f4121adc 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -0,0 +0,0 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
@ -659,20 +659,14 @@ index ac9b4297b..0558cafe3 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
index dff5bb517..c3e40aa17 100644
index fa03d17a4..14b5be75f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
@@ -0,0 +0,0 @@
package org.bukkit.craftbukkit.block;
import net.minecraft.server.BlockChest;
+import com.destroystokyo.paper.loottable.PaperLootableBlockInventory; // Paper
import net.minecraft.server.BlockPosition;
import net.minecraft.server.Blocks;
import net.minecraft.server.ITileInventory;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest;
import org.bukkit.inventory.Inventory;
+import com.destroystokyo.paper.loottable.PaperLootableBlockInventory; // Paper
-public class CraftChest extends CraftLootable<TileEntityChest> implements Chest {
+public class CraftChest extends CraftLootable<TileEntityChest> implements Chest, PaperLootableBlockInventory { // Paper

View file

@ -65,7 +65,7 @@ index 50e29464b..880ce16b1 100644
return this.c(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 773a8c52d..5dd08018c 100644
index 40f892b24..22fec8697 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;
@ -290,7 +290,7 @@ index bcdc790ba..339abdc01 100644
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index ac081d230..faae6d09d 100644
index 7047b7c70..92f8d0633 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.TreeType;

View file

@ -31,7 +31,7 @@ index 10efe6b3d..6feea98b6 100644
private void disableSprintInterruptionOnAttack() {
disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 7afcac499..cf1ca505f 100644
index 569f301a2..d32ea9c92 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -0,0 +0,0 @@ public final class ItemStack {

View file

@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 17ae26cb8..2023ee118 100644
index 32aee07d1..55e7dfa17 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati

View file

@ -1140,7 +1140,7 @@ index 0adea6a17..174e84760 100644
iblockdata.a(world, blockposition, 0);
world.setAir(blockposition);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a877d4a6b..d14ee6b9b 100644
index c8a7f5e59..160ef3659 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

View file

@ -7,7 +7,7 @@ ray tracing into an unloaded chunk should be treated as a miss
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 747fda044..bdbacae29 100644
index c702b94ef..26327895b 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

View file

@ -119,7 +119,7 @@ index 10630ac96..b355c3f53 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 20fb157fa..e61dc2c26 100644
index ee2b443dd..5a7857e25 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -20,7 +20,7 @@ think of no reason to use it.
Fixes GH-1571
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index 20dc3f272..3c712fc93 100644
index 458d1561d..c2bcbbbab 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener {

View file

@ -699,7 +699,7 @@ index 63c802d02..4d93a22d8 100644
entityhorseskeleton.s(true);
entityhorseskeleton.setAgeRaw(0);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2d6d4307b..ee1079f80 100644
index 86e70f236..159d6bb73 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Use Vanilla Minecart Speeds
CraftBukkit changed the values on flying speed, restore back to vanilla
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index b52bc659e..cea8cfce2 100644
index e741c7f83..6d21527ea 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -0,0 +0,0 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT

View file

@ -20,7 +20,7 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e4c78c676..ab24ff871 100644
index 9eeb73d67..80db026ea 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
@ -72,7 +72,7 @@ index e4c78c676..ab24ff871 100644
if (event.isCancelled()) {
return false;
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 6aa3a462f..c25a89111 100644
index 53ae1528d..a35301ad5 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 {
@ -90,7 +90,7 @@ index 6aa3a462f..c25a89111 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 34b649dad..4dd24e1d7 100644
index dc277f439..826ddc25c 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 {
@ -110,7 +110,7 @@ index 34b649dad..4dd24e1d7 100644
this.A(entity);
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 1b47d7bd4..7b8dbd00c 100644
index d04570171..82855b3a8 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 {

View file

@ -12,7 +12,7 @@ decrease when set, allowing us to skip further checks earlier on
when looking for an attackable entity
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d14ee6b9b..9bf3f8343 100644
index 160ef3659..c702b94ef 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

@ -1 +1 @@
Subproject commit 78568d11d3ad8bb1f6a90c1b5dff3394f22f12fc
Subproject commit 0969eedc88f58ce58fc03bcd4acdfaa1ac91301c

@ -1 +1 @@
Subproject commit 1b982fd67efd09964d565b9ee71df9d4fb0eb093
Subproject commit dff66dfccd64280d066715340c0692f6e376be0b