Better fix for #312, null checking for the chisel item in the GUI

This commit is contained in:
tterrag1098 committed 2015-05-28 13:42:07 -04:00
1 parent daf95276af
commit 74bb2b700d
5 files changed
+11 -8

No files matched your search

@@ -126,6 +126,10 @@ public class General {
private static final String MODE_KEY = "chiselMode";
public static IChiselMode getChiselMode(ItemStack chisel) {
if (chisel == null) {
return ChiselMode.SINGLE;
}
if (chisel.stackTagCompound == null || Strings.isNullOrEmpty(chisel.stackTagCompound.getString(MODE_KEY))) {
initTag(chisel);
chisel.stackTagCompound.setString(MODE_KEY, ChiselMode.SINGLE.name());