Posted April 28, 201411 yr Okay so first off I know what I'am trying to do is WRONG you don't have to remind me. One of my mods I'am trying to port from 1.6.4 I had it get the vanilla ores from the block list and set them to null "Block.blocksList[block.oreIron.blockID] = null;" like that, then I re added my own version of the ore with a custom texture etc.. and added it to the forge oreDict. Everything worked out fine no crashes, all the ores I changed worked with every mod etc.. I can't seem to figure out how to do the same in [1.7.2]. Since ID's are "gone" now I realize that other mods might not like how I did that before, now. So if I can somehow change the vanilla ore's texture without having to give out a resource pack with my mod, that could work for now if its possable. But I still wouldn't mind figuring out how to do what I did before, now. P.S. Sorry if I explained this weird.
April 28, 201411 yr If you simply want to change the textures, why not create a Resource Pack like all other texture pack makers? http://i.imgur.com/NdrFdld.png[/img]
April 28, 201411 yr Author Well I had some other changes before besides the textures, and I can work around that kind-of, but I wouldn't mind a built in way to do it instead of a separate resource pack.
April 28, 201411 yr Well I had some other changes before besides the textures, and I can work around that kind-of, but I wouldn't mind a built in way to do it instead of a separate resource pack. Ok. Well, the Block list no longer exists as it was, but it's much easier since you can access the blocks directly using "Blocks.{block_name}". I suppose you could say that "Blocks" IS "blocksList", just not in array form. http://i.imgur.com/NdrFdld.png[/img]
April 28, 201411 yr Author Okay so I figured out what I did wrong on how to just change the texture. But as for completely replacing the block, I got nothing. I probable will end up not needing to do it but it would be nice to learn how it would be done.
April 28, 201411 yr Well I had some other changes before besides the textures, and I can work around that kind-of, but I wouldn't mind a built in way to do it instead of a separate resource pack. Ok. Well, the Block list no longer exists as it was, but it's much easier since you can access the blocks directly using "Blocks.{block_name}". I suppose you could say that "Blocks" IS "blocksList", just not in array form. however, you can't set them to null, since every field in there is final. The only way I see here is to utilize ASM transformers and hook into RegistrySimple.getObject(Object par1Obj) Block.registerBlocks() and replace the constructor calls with your own ones. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
April 28, 201411 yr Author however, you can't set them to null, since every field in there is final. The only way I see here is to utilize ASM transformers and hook into RegistrySimple.getObject(Object par1Obj) Block.registerBlocks() and replace the constructor calls with your own ones. Yeah I kinda had a hunch I would have to use something like that.. Way over my head . I will have to go read up on transformers. But its not in my top list of priorities atm, but Thank you for showing me were to start!
April 28, 201411 yr You can still do quite a lot to change the fields of vanilla blocks without reassigning them: // change texture name: Blocks.acacia_stairs.setBlockTextureName("modid:new_texture_name"); // set new hardness: block.setHardness(10.0F); // etc. lots of public setter methods are available http://i.imgur.com/NdrFdld.png[/img]
April 28, 201411 yr Well I had some other changes before besides the textures, and I can work around that kind-of, but I wouldn't mind a built in way to do it instead of a separate resource pack. You can change vanilla textures inside your mod package. Mods are loaded like resource packs. Just add assets/minecraft/...
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.