mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 16:12:18 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,32 +1,31 @@
|
||||
--- a/net/minecraft/server/BlockShulkerBox.java
|
||||
+++ b/net/minecraft/server/BlockShulkerBox.java
|
||||
@@ -92,7 +92,32 @@
|
||||
|
||||
@@ -81,7 +81,31 @@
|
||||
super.a(world, blockposition, iblockdata, entityhuman);
|
||||
}
|
||||
|
||||
- public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) {}
|
||||
- public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, float f, int i) {}
|
||||
+ // CraftBukkit start - override to prevent duplication when dropping
|
||||
+ public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) {
|
||||
+ TileEntity tileentity = world.getTileEntity(blockposition);
|
||||
+ @Override
|
||||
+ public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, float f, int i) {
|
||||
+ if (true) {
|
||||
+ TileEntity tileentity = world.getTileEntity(blockposition);
|
||||
+
|
||||
+ if (tileentity instanceof TileEntityShulkerBox) {
|
||||
+ TileEntityShulkerBox tileentityshulkerbox = (TileEntityShulkerBox) tileentity;
|
||||
+ if (tileentity instanceof TileEntityShulkerBox) {
|
||||
+ TileEntityShulkerBox tileentityshulkerbox = (TileEntityShulkerBox) tileentity;
|
||||
+
|
||||
+ if (!tileentityshulkerbox.r() && tileentityshulkerbox.F()) {
|
||||
+ ItemStack itemstack = new ItemStack(Item.getItemOf(this));
|
||||
+ NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
+ NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
+ if (!tileentityshulkerbox.s() && tileentityshulkerbox.G()) {
|
||||
+ ItemStack itemstack = new ItemStack(this);
|
||||
+
|
||||
+ nbttagcompound.set("BlockEntityTag", ((TileEntityShulkerBox) tileentity).f(nbttagcompound1));
|
||||
+ itemstack.setTag(nbttagcompound);
|
||||
+ if (tileentityshulkerbox.hasCustomName()) {
|
||||
+ itemstack.g(tileentityshulkerbox.getName());
|
||||
+ tileentityshulkerbox.setCustomName("");
|
||||
+ itemstack.getOrCreateTag().set("BlockEntityTag", ((TileEntityShulkerBox) tileentity).g(new NBTTagCompound()));
|
||||
+ if (tileentityshulkerbox.hasCustomName()) {
|
||||
+ itemstack.a(tileentityshulkerbox.getCustomName());
|
||||
+ tileentityshulkerbox.setCustomName((IChatBaseComponent) null);
|
||||
+ }
|
||||
+
|
||||
+ a(world, blockposition, itemstack);
|
||||
+ }
|
||||
+
|
||||
+ a(world, blockposition, itemstack);
|
||||
+ }
|
||||
+
|
||||
+ world.updateAdjacentComparators(blockposition, iblockdata.getBlock());
|
||||
+ }
|
||||
+ }
|
||||
@@ -34,22 +33,22 @@
|
||||
|
||||
public void postPlace(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving, ItemStack itemstack) {
|
||||
if (itemstack.hasName()) {
|
||||
@@ -108,7 +133,7 @@
|
||||
public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
TileEntity tileentity = world.getTileEntity(blockposition);
|
||||
@@ -98,7 +122,7 @@
|
||||
if (iblockdata.getBlock() != iblockdata1.getBlock()) {
|
||||
TileEntity tileentity = world.getTileEntity(blockposition);
|
||||
|
||||
- if (tileentity instanceof TileEntityShulkerBox) {
|
||||
+ if (false && tileentity instanceof TileEntityShulkerBox) { // CraftBukkit - moved up
|
||||
TileEntityShulkerBox tileentityshulkerbox = (TileEntityShulkerBox) tileentity;
|
||||
- if (tileentity instanceof TileEntityShulkerBox) {
|
||||
+ if (false && tileentity instanceof TileEntityShulkerBox) { // CraftBukkit - moved up
|
||||
TileEntityShulkerBox tileentityshulkerbox = (TileEntityShulkerBox) tileentity;
|
||||
|
||||
if (!tileentityshulkerbox.r() && tileentityshulkerbox.F()) {
|
||||
@@ -126,8 +151,8 @@
|
||||
a(world, blockposition, itemstack);
|
||||
if (!tileentityshulkerbox.s() && tileentityshulkerbox.G()) {
|
||||
@@ -113,8 +137,8 @@
|
||||
a(world, blockposition, itemstack);
|
||||
}
|
||||
|
||||
- world.updateAdjacentComparators(blockposition, iblockdata.getBlock());
|
||||
}
|
||||
+ world.updateAdjacentComparators(blockposition, iblockdata.getBlock()); // CraftBukkit - moved down
|
||||
|
||||
- world.updateAdjacentComparators(blockposition, iblockdata.getBlock());
|
||||
super.remove(iblockdata, world, blockposition, iblockdata1, flag);
|
||||
}
|
||||
+ world.updateAdjacentComparators(blockposition, iblockdata.getBlock()); // CraftBukkit - moved down
|
||||
|
||||
super.remove(world, blockposition, iblockdata);
|
||||
}
|
||||
|
Reference in New Issue
Block a user