Jump to content

Item giving potion effect while in the player's inventory! - 1.12.2


UM3 F0R TH3 W1N

Recommended Posts

Hey guys, I am making this post because a friend of mine asked me how to make his item give the player a potion effect if it is in the player's inventory, however neither of us knew how to do this, so for this reason I have come here for some insight on how to do this. I am assuming it will involve an event but I could be wrong. If it does use an event, I am clueless of which one. Thanks for the help in advance!

Link to comment
Share on other sites

1 minute ago, diesieben07 said:
  1. If you do not know basic Java you should not be writing mods.
  2. if statements, instanceof operator, casting. Those are the tools you need.

I figured it out while you were typing this, sorry, I have been working a lot with lua and python lately and not much on java at all so I was getting confused lmao. but thx for the help.

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.

Announcements



×
×
  • Create New...

Important Information

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