Removed extraneous NBT from item stack drop
This commit is contained in:
parent
0a8d7ce741
commit
784fa90a7d
2 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
itemStack.setTagCompound(tagCompound);
|
||||
if (!tagCompound.isEmpty()) {
|
||||
itemStack.setTagCompound(tagCompound);
|
||||
}
|
||||
drops.add(itemStack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue