Jump to content

[1.18.2] How to use blocks from other mods.


TheElementGuy

Recommended Posts

I have a mod with an Ice Sword, and I want it to be when you hit something, the surrounding dirt turns to permafrost, a block in Quark. How can I get that mod from the Quark mod? Any help is appreciated.

Edited by TheElementGuy
Add version.

Please don't put anything from 1.16.5, 1.12.2, 1.14, 1.15, 1.0, or anything not 1.18.x or 1.19.x!

Link to comment
Share on other sites

  • TheElementGuy changed the title to [1.18.2] How to use blocks from other mods.

With ModList#isLoaded you can check if Quark is load.
Then you can use ForgeRegistries.BLOCKS#getValue with the id of the permafrost Block to get the Block. Then you can place the Block in the World (Level).
Note IForgeRegistry#getValue can be return null, it should not be null but it's recommended to handle this case (due Quarks Modul system).

Edited by Luis_ST
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.



×
×
  • Create New...

Important Information

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