
EnderIO creates some ItemStacks with null Items during startup
mezz opened this issue ยท 1 comments
I was messing around looking for null items from Forestry and found some in EnderIO too. These are hard to debug when things go wrong so I figured I should pass on the info!
Make sure to check that the block has a corresponding item. For one example, when subclass RubberTreeRamerIC2
is init, GameRegistry.findBlock
actually returns Blocks.AIR by default (ugh), which has no item. This affects the sapling items and wood items.
https://github.com/SleepyTrousers/EnderIO/blob/1.8.9-exp/src/main/java/crazypants/enderio/machine/farm/farmers/TreeFarmer.java#L41-L46
Similar issue detected here:
https://github.com/SleepyTrousers/EnderIO/blob/1.8.9-exp/src/main/java/crazypants/enderio/machine/farm/farmers/FlowerPicker.java#L27
and here, use Items.CARROT, Items.POTATO, Items.NETHER_WART, Items.WHEAT_SEEDS,
https://github.com/SleepyTrousers/EnderIO/blob/1.8.9-exp/src/main/java/crazypants/enderio/machine/farm/FarmStationContainer.java#L47-L55
Thx, but actually:
PS: Carrots, potatoes, nether wart should use the items, yes. Somehow nobody ever cleans up code I put a "this needs cleanup" comment on. g