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 ItemStack itemStack = new ItemStack(item, 1, damageDropped(blockState));
|
||||||
final NBTTagCompound tagCompound = new NBTTagCompound();
|
final NBTTagCompound tagCompound = new NBTTagCompound();
|
||||||
((TileEntityAbstractBase) tileEntity).writeItemDropNBT(tagCompound);
|
((TileEntityAbstractBase) tileEntity).writeItemDropNBT(tagCompound);
|
||||||
|
if (!tagCompound.isEmpty()) {
|
||||||
itemStack.setTagCompound(tagCompound);
|
itemStack.setTagCompound(tagCompound);
|
||||||
|
}
|
||||||
drops.add(itemStack);
|
drops.add(itemStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,6 +226,7 @@ public abstract class TileEntityAbstractBase extends TileEntity implements IBloc
|
||||||
|
|
||||||
public NBTTagCompound writeItemDropNBT(final NBTTagCompound tagCompound) {
|
public NBTTagCompound writeItemDropNBT(final NBTTagCompound tagCompound) {
|
||||||
writeToNBT(tagCompound);
|
writeToNBT(tagCompound);
|
||||||
|
tagCompound.removeTag("id");
|
||||||
tagCompound.removeTag("x");
|
tagCompound.removeTag("x");
|
||||||
tagCompound.removeTag("y");
|
tagCompound.removeTag("y");
|
||||||
tagCompound.removeTag("z");
|
tagCompound.removeTag("z");
|
||||||
|
|
Loading…
Add table
Reference in a new issue