Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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 xD. 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!

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.