mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-20 04:19:50 +00:00
Better fix for #312, null checking for the chisel item in the GUI
This commit is contained in:
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());
|
||||
|
||||
Reference in new issue
Block a user