mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Setting an entity's shedding item to an empty value while not setting the rate to -1 will no longer crash the game when opening that entity's page in the shedding entry. Closes #813. Note to SoundLogic, java strings aren't comparable with !=
This commit is contained in:
1 parent
8f82e05b02
commit
11009b4fc2
1 file changed
+3
-3
@@ -116,15 +116,15 @@ public final class SheddingHandler {
|
||||
lexiconSize = defaultPattern.lexiconSize;
|
||||
}
|
||||
|
||||
Property prop=config.get("Shedding", key + ".item", itemName);
|
||||
Property prop = config.get("Shedding", key + ".item", itemName);
|
||||
prop.comment = "Configuration of Shedding for "+key;
|
||||
itemName = prop.getString();
|
||||
rate = config.get("Shedding", key + ".rate", rate).getInt();
|
||||
metadata = config.get("Shedding", key + ".metadata", metadata).getInt();
|
||||
lexiconSize = config.get("Shedding", key + ".lexiconDisplaySize", lexiconSize).getInt();
|
||||
|
||||
if(itemName != "" && rate != -1)
|
||||
patterns.add(new ShedPattern((Class)EntityList.stringToClassMapping.get(key), new ItemStack((Item) Item.itemRegistry.getObject(itemName), 1, metadata), rate, lexiconSize));
|
||||
if(itemName != null && !itemName.isEmpty() && rate != -1)
|
||||
patterns.add(new ShedPattern((Class<?>) EntityList.stringToClassMapping.get(key), new ItemStack((Item) Item.itemRegistry.getObject(itemName), 1, metadata), rate, lexiconSize));
|
||||
}
|
||||
|
||||
public static class ShedPattern {
|
||||
|
||||
Reference in new issue
Block a user