mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 15:36:18 +00:00
Clean up more null/nonnull, refactor gui ledgers
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user