Posted July 11, 20169 yr Hello I am trying to prevent ore generation on a per block basis. I looked into OreGenEvent, but there does not seem to be a way to find out what is being generated from the WorldGenerator instance, other than guessing from the class name. My thought would be to "intercept" or look for calls to World#setBlockState that happen in WorldGenerator#generate, check the BlockState being set and use that to cancel the ore generation. Of course, that looks like massive hackery from the deepest pits of coremodding, and I have no clue where to start about that. Any thoughts?
July 11, 20169 yr Author That's an option, although it reduces even more the number of mods that I will be able to handle, since they have to both fire the event and extend WorldGenMinable (even vanilla's BiomeHills$EmeraldGenerator is just a WorldGenerator)
July 14, 20169 yr Author And I suppose an improper way to do this would include hacking into world#setBlockState and checking if the call stack contains WorldGenerator#generate, which I presume would make a lot of things laggy AF and crash the others
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.