Jump to content

[1.12] Get any potion registered


_Bedrockbreaker_

Recommended Posts

How can I get ANY potion registered from "vanilla" minecraft and other mods? I have a food, that applies all the normal ones by generating a random integer from 1 to 28, but if I want it to do the ones from mods, how can I get those? side question: how can I install other mods in my development? like jei, any other mod... side-side question: how could I get any item/block/whatever I want registered to use for diabolical uses?

Edited by _Bedrockbreaker_
added side-side question

Professional Hot Garbage Programmer.

https://github.com/Bedrockbreaker/

Link to comment
Share on other sites

For iterating through potions, just find the registry object for potions and iterate on it. GameRegistry should hold the registry instance. (There could be one in Potion class as well) 

To use the mods on dev env: download deobfuscated version, and add that in the mods folder in the run directory (I'm not sure with this one: for now putting normal mod could work). You can also specify some kind of (optional) dependency with gradle.

 

Also just in case: there are @ObjectHolder which allows access to the registered instances even from other mods.

https://mcforge.readthedocs.io/en/latest/concepts/registries/

Edited by Abastro
Tyypo

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

The Vanilla and Forge registries are stored in the ForgeRegistries class.

 

9 hours ago, Abastro said:

Also just in case: there are @Optional which allows access to the registered instances even from other mods.

 

I think you mean @ObjectHolder.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

7 minutes ago, Choonster said:

The Vanilla and Forge registries are stored in the ForgeRegistries class.

 

 

I think you mean @ObjectHolder.

Well.. right.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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.