[Question] Loading
NielsPilgaard opened this issue · 13 comments
Heya!
Do the ores of this mod get initialized in the postInit phase? I'm not able to set their Harvest Level with the mod Tool Progression, and I'm trying to find out why.
Netherending-Ores-1.12.2-1.1.1
I actually have the same question with a different circumstance.
CraftTweaker isn't able to make changes to or include in recipes the members of the Ore Dict entries associated with the ores in this mod, which usually means that the mod stuff is getting loaded too late.
Harvest level for the blocks is set from an enum, which is inside a subscribed event, I do not see how this could screw up changing it with another mod.
Furnace Recipes (the only recipes) are init, ore dictionary is postinit.
I can check into changing this, just needs to be tested.
Oh and sorry for the lateness on getting back to this.
Fair enough, I wouldn't know.
I wouldn't mind testing out the registration changes.
And no worries :)
For the issues with oredict, nab CraftTweaker and try removing Overworld Quartz from the oreQuartz ore dict entry. It won't work. You may want to reference CT or contact the CT team on how to resolve this. Post Init might be too late? I don't know.
I was told by the dev of Tool Progression that you are currently overriding the method public int getHarvestLevel(IBlockState state)
without also overriding the corresponding setHarvestLevel
appropriately, doing so should fix it.
Yeah I just realised that the HarvestLevel is being inherited as pickaxe level 0 from the parent base block, there is no statement to change it later on. Oddly enough that is sufficient for the harvestlevel to interact correctly in game, just not with other mods.
As for recipes/oredict, I am looking to replace the code with registry events rather than using init events. This should solve it entirely. Registry events are fired "just before" init but after preinit.
Got Tool Progression working properly, used setHarvestLevel when it first loads and removed the getHarvestLevel override (which happens at runtime) as it is not needed.
Have looked at a lot of source code and don't see examples of other modders using registry events to load recipes. Currently experimenting with loading oredict and recipes in that order at init.
If I can't get crafttweaker to work I might just do #4 and have setting the quantity set to 0 disables the oredict entry from being enabled.
Crafttweaker does in fact work with the in dev version, the oredict is triggered at entity load immediately after registering blocks/items, which is as early as can be.