Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

  • 2 months later...

Full code examples would be useful. Any chance you can link one? (bonus points if it's 1.14 specific)

Edited by Spanospy

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 by Differentiation

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.

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.