Fixed Wrench clearing NBT data when reset causing problems with Morph O Tool, fixes #706

This commit is contained in:
Raoul Van den Berge
2016-12-04 03:30:35 +01:00
parent bbd51d55d0
commit 830dc497d6
2 changed files with 7 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
### 1.3.2 ### 1.3.2
- Fixed being able to exceed max stack size while shift clicking (raoulvdberge) - Fixed being able to exceed max stack size while shift clicking (raoulvdberge)
- Fixed Wrench clearing NBT data when reset causing problems with Morph O Tool (raoulvdberge)
### 1.3.1 ### 1.3.1
- Updated Forge to 2180 (raoulvdberge) - Updated Forge to 2180 (raoulvdberge)

View File

@@ -127,7 +127,12 @@ public class ItemWrench extends ItemBase {
WrenchMode mode = WrenchMode.readFromNBT(stack.getTagCompound()); WrenchMode mode = WrenchMode.readFromNBT(stack.getTagCompound());
stack.setTagCompound(new NBTTagCompound()); if (stack.hasTagCompound()) {
stack.getTagCompound().removeTag(NBT_WRENCHED_TILE);
stack.getTagCompound().removeTag(NBT_WRENCHED_DATA);
} else {
stack.setTagCompound(new NBTTagCompound());
}
WrenchMode next = mode.cycle(); WrenchMode next = mode.cycle();