Clean up more null/nonnull, refactor gui ledgers

This commit is contained in:
mezz committed 2016-12-26 08:08:08 -08:00
1 parent b2d4e6eaba
commit 35f9b95f37
124 files changed
+827 -655

No files matched your search

@@ -27,7 +27,7 @@ public class CrateRegistry implements ICrateRegistry {
private static void registerCrate(ItemStack stack, @Nullable String oreDictName) {
if (stack.isEmpty()) {
Log.warning("Tried to make a crate without an item");
Log.error("Tried to make a crate without an item");
return;
}
@@ -35,7 +35,12 @@ public class CrateRegistry implements ICrateRegistry {
if (oreDictName != null) {
crateName = "crated." + oreDictName;
} else {
String itemName = ItemStackUtil.getStringForItemStack(stack).replace(':', '.');
String stringForItemStack = ItemStackUtil.getStringForItemStack(stack);
if (stringForItemStack == null) {
Log.error("Could not get string name for itemStack {}", stack);
return;
}
String itemName = stringForItemStack.replace(':', '.');
crateName = "crated." + itemName;
}