Fixed Wrench in Dismantling Mode voiding Storage Block contents

This commit is contained in:
raoulvdberge
2017-02-14 19:33:19 +01:00
parent aa3e59b910
commit 4455dc3f62
2 changed files with 7 additions and 7 deletions

View File

@@ -129,13 +129,12 @@ public class ItemWrench extends ItemBase {
((TileNode) tile).writeConfiguration(data);
ItemStack tileStack = new ItemStack(
state.getBlock(),
1,
state.getBlock().getMetaFromState(state)
);
ItemStack tileStack = state.getBlock().getDrops(world, pos, state, 0).get(0);
if (!tileStack.hasTagCompound()) {
tileStack.setTagCompound(new NBTTagCompound());
}
tileStack.setTagCompound(new NBTTagCompound());
tileStack.getTagCompound().setTag(BlockNode.NBT_REFINED_STORAGE_DATA, data);
world.setBlockToAir(pos);