Jump to content

[Question] Is it possible to use blocks from other mods?


ColdFox

Recommended Posts

You can use the API of a mod if it has one, but else, you can't (i think)

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

It would also make your mod dependent on the other mod.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

It would also make your mod dependent on the other mod.

 

The way I was imagining it would create the recipes dynamically according with the number of mods.

In this case, I've a basic block with a custom model and its texture depends of the block that you use to craft it. What he suggested was a recipe that you could do with a any block, including blocks from mods. But I'm not worried about this, thanks anw :)

Link to comment
Share on other sites

You can do a soft dependency, its just a lot trickier to get working properly.  And the other mods need to have an exposed API that you can use in your development environment.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Hi

 

If the other mods are properly written, they should register their Blocks & Items in the preinit phase, and you should register your recipes in the load phase, so you are guaranteed that the other mod will have registered its Blocks & Items by the time your recipe is registered.

 

For more info see here

http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html

 

I'm not 100% sure how best to find the blocks registered by the other mod.

I suspect GameRegistry.findBlock will do it for you, but I've never tried it so I'm not certain.

(see http://greyminecraftcoder.blogspot.com.au/2013/12/forge-blocks.html)

 

-TGG

Link to comment
Share on other sites

could you make a separate download for an add-on that uses the other mod's block id's and etc.?

 

You can.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

If the other mods are properly written, they should register their Blocks & Items in the preinit phase

 

Apparently this is debatable. I've moved my stuff between preinit and init 3 or 4 times in the early days because people kept telling me one or the other was the "right" way to do it.

 

A standardized option would be nice, but I think lex & the team themselves would have to say which is truly better.

 

(It's worth noting though I do agree with you; I find having blocks in PreInit and recipes in Init just avoids messy little errors from having things in the wrong order. Just stating as I know it's debated a bit)

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Link to comment
Share on other sites

It also allows other mods to do things with your blocks.  Register them early!

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

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.