Posted July 3, 20196 yr Hello, I'm new to modding and still trying to figure out what I can and cannot do. I want to make a new potion effect that can be given to the player, whether with commands or with an actual potion item. The goal is to just create a Poison Resistance effect that negates any damage done to the player from poison. Can anybody point me in the right direction to do this?
September 12, 20196 yr Full code examples would be useful. Any chance you can link one? (bonus points if it's 1.14 specific) Edited September 12, 20196 yr by Spanospy
September 13, 20196 yr 14 hours ago, Spanospy said: Full code examples would be useful. Any chance you can link one? (bonus points if it's 1.14 specific) Just make the subclass and override the necessary methods. Then make a registry class (which could be inside this one, doesn't matter) with @EventBusSubscriber annotation. Then, in this class, subscribe to Register<Potion> event, where you'd use the provided methods to register the option effect. It's similar to making normal items and blocks. Edited September 13, 20196 yr by Differentiation
September 13, 20196 yr Let me know if you can follow your own instructions. Anyway, I used Botania's 1.14 branch as a guide in order to create a potion effect. Unsure about how to throw it into a potion item though, but I'll figure it out when I can be bothered.
September 13, 20196 yr 37 minutes ago, Spanospy said: Let me know if you can follow your own instructions. I can follow both of their instructions. It's just that I think diesieben was using "Potion" because of 1.14.4 when you are using 1.12.2 37 minutes ago, Spanospy said: Unsure about how to throw it into a potion item though, but I'll figure it out when I can be bothered. If you mean create a Potion Item that uses your Potion instance. It should be automatic after you've registered your PotionType. Brewing them in another question. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.