Posted June 15, 201312 yr Can you override default blocks without being a core-mod? If so, then how would I do that? http://achievecraft.com/cimage/7989efq/ModderWizardDude/Both+kinds+of+Java%21/mca.png[/img]
June 15, 201312 yr Yes. Modify Block.blocksList[]. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 15, 201312 yr Author Thank you! http://achievecraft.com/cimage/7989efq/ModderWizardDude/Both+kinds+of+Java%21/mca.png[/img]
June 16, 201312 yr I know this thread is marked as solved. but is there anywhere/anything i should be looking for to elaborate a bit further? This is a problem that has plagued me for a long time, so long so that i stopped coding because there was no direct or explained answer. I've scowered over the forge forums, going back years. Looked at everything from access transformers and reflections (both way above me) to core mods (which there doesn't seem to be any direct information about them). I'm new, obviously. but i intend to code things the right way. I know where the block ID's are found. So I would just create my own class that extends blocks and create a method that just removes it(how given that the Block[] blocksList, is a final)? I'm not 100% sure on what that would look like and an example would be nice. Furthermore, assuming the ID is number order its stored in wouldn't the block actually be stored at -1 since an array starts at 0? or is it possible to somehow catch the ore at generation in the biomedecorator and extend that for the access to the private values?
June 16, 201312 yr I know this thread is marked as solved. but is there anywhere/anything i should be looking for to elaborate a bit further? This is a problem that has plagued me for a long time, so long so that i stopped coding because there was no direct or explained answer. I've scowered over the forge forums, going back years. Looked at everything from access transformers and reflections (both way above me) to core mods (which there doesn't seem to be any direct information about them). I'm new, obviously. but i intend to code things the right way. I know where the block ID's are found. So I would just create my own class that extends blocks and create a method that just removes it(how given that the Block[] blocksList, is a final)? I'm not 100% sure on what that would look like and an example would be nice. Furthermore, assuming the ID is number order its stored in wouldn't the block actually be stored at -1 since an array starts at 0? or is it possible to somehow catch the ore at generation in the biomedecorator and extend that for the access to the private values? Naw. A Java array is final, but you can change an individual element. Just do block.blocksList[blah] = new MyReplacedBlock(); BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 16, 201312 yr Interesting, I remember reading a leaves block override issue. Could you also put the leaf blocks in the array?
June 16, 201312 yr Interesting, I remember reading a leaves block override issue. Could you also put the leaf blocks in the array? I remember that too. In fact, I think that was one of the suggested solutions... And yes, you can. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
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.