Removed extraneous NBT from item stack drop

This commit is contained in:
Unknown 2019-05-21 04:19:43 +02:00
parent 0a8d7ce741
commit 784fa90a7d
2 changed files with 4 additions and 1 deletions

View file

@ -175,7 +175,9 @@ public abstract class BlockAbstractContainer extends BlockContainer implements I
final ItemStack itemStack = new ItemStack(item, 1, damageDropped(blockState));
final NBTTagCompound tagCompound = new NBTTagCompound();
((TileEntityAbstractBase) tileEntity).writeItemDropNBT(tagCompound);
if (!tagCompound.isEmpty()) {
itemStack.setTagCompound(tagCompound);
}
drops.add(itemStack);
}
}

View file

@ -226,6 +226,7 @@ public abstract class TileEntityAbstractBase extends TileEntity implements IBloc
public NBTTagCompound writeItemDropNBT(final NBTTagCompound tagCompound) {
writeToNBT(tagCompound);
tagCompound.removeTag("id");
tagCompound.removeTag("x");
tagCompound.removeTag("y");
tagCompound.removeTag("z");