Started by
Noxvern
on
Topic category: Help with Minecraft modding (Java Edition)
Hello everyone I need help with a procedure,
My intention is to create a power that causes the player to hit the keybind (as long as he has a certain item in his inventory) and is looking at a mob / player, the mob / the player (he is looking at) gets the effects of X potion. Is that possible with procedures?
I alredy created the keybind to use that power and I know with the "if / do" procedure I can do the item requeriment. But I dont know how to do the rest ^^'
Edited by Noxvern on Sun, 09/05/2021 - 22:20
You could use raytrace look position to get coordinates player is looking at.
To target entity at coordinates, you will need to wait for 2020.4: https://mcreator.net/tracker/issue/47617
So for now I can't do what I describe? I'll have to whait then :c
You could save the coordinates where you are looking in global variables and create a procedure on the mob at entity tick that will verify if its coordinates correspond to the ones you are looking, then apply him poison
Yeah but what about the players? I want to make this a power and the player can used eveytime he want, no an especific mob on an especific place ^^'
You can constantly update the global variables to know which position player is looking and if you want to affect any mob you have to do if entity is subtype of ... do, you just need to add ORs for every mob you want the power to affect