Added a config option for block swapped by reversing hoe#178
Added a config option for block swapped by reversing hoe#178Spaghetti-OberNub wants to merge 5 commits into
Conversation
| setTextureName("utilitiesinexcess:reversing_hoe"); | ||
| setUnlocalizedName("reversing_hoe"); | ||
| if (ReversingHoeConfig.unbreakable) setMaxDamage(0); | ||
|
|
There was a problem hiding this comment.
Config parsing needs to happen after postInit(), and the item constructor is called during preInit(). Otherwise conversions involving blocks from other mods won't work (verified with test config utilitiesinexcess:giga_torch->ExtraUtilities:magnumTorch), since they haven't been added to the registry yet.
Either the parsing can be added to a method that's called in postInit or the parsing can happen the first time it's used. postInit method is probably cleaner.
There was a problem hiding this comment.
I did it on first time of onItemUse (not sure how to cleanly get the Hoe class instance in postInit)
| String[] parts = transformation.split("->"); | ||
| Block sourceBlock = Block.getBlockFromName(parts[0].trim()); | ||
| Block targetBlock = Block.getBlockFromName(parts[1].trim()); |
There was a problem hiding this comment.
You should add a way to also set the block meta
There was a problem hiding this comment.
Reference destruction pickaxe
also added wheat, carrots and potatoes to the crop reversal options
Closes Issue 160