Started by
ninjapirate1031
on
Topic category: Help with Minecraft modding (Java Edition)
I'm working on a feature in which a player will click a button, and it will give them a random potion effect. I've worked out how the random number is generated and the potion effects and such, but it's telling me that I need the Entity dependency. How can I make it so that the potion effect only applies to the player who used the keybind/hit the button?
Maybe set a global variable to set "get display name of provided" on the button-block's right click?
I'm sorry, I should have been more specific. When I said "button" I meant it as in Keyboard Key. I was trying to use a keybind to activate it (ie: When the player presses "R", it randomly generates and applies one of the potions i have)
Try setting the global variable within the "on key pressed" procedure