TheGreyGhost / MinecraftByExample

Working sample code for the basic concepts in Minecraft and Forge.
Other
1.24k stars 187 forks source link

[Suggestion] How to add new potion effects #39

Open Seraphaestus opened 6 years ago

Seraphaestus commented 6 years ago

How to add new potion effects. There are a lot of examples of this being done in other mods but not really any tutorial resources on it, to my knowledge. It might help me and others to have it, if you think it's a good idea.

TheGreyGhost commented 6 years ago

Hi Thanks for the idea, I like it and I think it could be something other folks would find useful.

I'll look at adding it in the future, it probably won't be for a while (perhaps months :( ) depending on what other things I'm working on. If in the meantime you get potions working yourself, please let me know and we can incorporate it into the tutorial...

Cheers TGG

Seraphaestus commented 6 years ago

Ah, I actually did just manage to get it working by looking at the source code of other mods like Extra Utilities 2 and Immersive Engineering!

Mod repository: https://github.com/Seraphaestus/HistoricizedMedicine Relevant texture file: https://github.com/Seraphaestus/HistoricizedMedicine/blob/master/HistoricizedMedicine/src/main/resources/assets/historicizedmedicine/textures/effects.png Relevant code: https://github.com/Seraphaestus/HistoricizedMedicine/tree/master/HistoricizedMedicine/src/main/java/seraphaestus/historicizedmedicine/Effect

jackokring commented 4 years ago

Not sure if it works yet, but jackokring/MinecraftMod repo. I made a potion item with parent Minecraft:potion and the added custom potion info. I wasn't expecting to change the effect beyond duration, and custom allows for colouring bottle. Then just added it as a crafting result. Not yet sure how the brewery works, so ...

More into redstone at the moment from the ground up.