3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/Block.patch
2019-12-11 09:00:00 +11:00

31 Zeilen
990 B
Diff

--- a/net/minecraft/server/Block.java
+++ b/net/minecraft/server/Block.java
@@ -489,7 +489,13 @@
EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + d0, (double) blockposition.getY() + d1, (double) blockposition.getZ() + d2, itemstack);
entityitem.defaultPickupDelay();
- world.addEntity(entityitem);
+ // CraftBukkit start
+ if (world.captureDrops != null) {
+ world.captureDrops.add(entityitem);
+ } else {
+ world.addEntity(entityitem);
+ }
+ // CraftBukkit end
}
}
@@ -682,6 +688,12 @@
return "Block{" + IRegistry.BLOCK.getKey(this) + "}";
}
+ // CraftBukkit start
+ public int getExpDrop(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
+ return 0;
+ }
+ // CraftBukkit end
+
public static enum EnumRandomOffset {
NONE, XZ, XYZ;