Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.11.2] Interacting with other mods


Rohzek
 Share

Recommended Posts

I have a mod that changes the way ores generate in the overworld by blocking the vanilla ore generation (using the OreGenEvent#GenerateMinable event), and adds nether and end ores.

 

I know how to make my mod aware of other mods by checking the mod Id with Loader#isModLoaded, and using the @Optional tag, but I'm not sure where to go from here.

The most requested feature is to add support for ores from other mods, but I'm not sure how to go about that exactly. Another thing that got requested recently is for my ore generation to be used in (dynamic?) dimensions added by another mod, and I'm not sure how to go about that either - or can I even do that?

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Link to comment
Share on other sites

As for generating other people's ores: You have to basically copy what they are doing, unless they are exposing their ore generation with some sort of API.

As for generating in other dimensions, you just have to check for the dimension ID (or other properties) in your world generator.

Link to comment
Share on other sites

19 hours ago, diesieben07 said:

You have to basically copy what they are doing, unless they are exposing their ore generation with some sort of API.

I would imagine there would be a way to get the list of ores from the mods and pass those to my own generate methods, but how would I be able to stop their ores from spawning first? I'm assuming when checking for an ore to block, EventType.CUSTOM will block any WorldGenerator extended block that isn't a vanilla one?

 

Developing the Spiral Power Mod .

こんにちは!お元気ですか?

Link to comment
Share on other sites

4 hours ago, Rohzek said:

I would imagine there would be a way to get the list of ores from the mods

There isn't.

 

4 hours ago, Rohzek said:

I'm assuming when checking for an ore to block, EventType.CUSTOM will block any WorldGenerator extended block that isn't a vanilla one?

Mods need to fire this event themselves, not all mods will do so.

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

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.