Started by
Dorianohero76
on
Topic category: Help with Minecraft modding (Java Edition)
I want to create a weapon that has a special right click ability that deals a certain amount of damage ( can get reduced when the target entities wear armor ) to all entities in a 5 block radius ( not the user of the ability ) but how do I do that
I'm resurrecting this topic for this poor dude who never got an answer as i have the same issue :
i created a right click ability for 1.19.2 minecraft. i managed to have it deal damage. the only problem is my right click ability happens ON me and not on the monster i clicked. Here is what i have, can you please help me make this ability trigger on air, and not on me but in front of me ? Please, i need explanation, cause people have been answering like "you have to make it hit the air" kind of stuff but i don't know how to do it, please help me set it up...
(Right now i placed my trigger on right click (entity pos))
this is the image of where I am actually : https://ibb.co/N78qy34
Alright so basically @Raito099 you would have to have the block For each entity as {entity itirator} at {x} {y} {z} in a square cube of size {[whatever size you want]} then do an If statement that says (if) (not) ({event/target entity} = {entity itarator}) then do [rest of your code]. this should target all entitys within a box of whatever size you want that isn't the event/target entity, which is basically the player that activated it. Entity itirator is basically an engine that will store the information or target for each entity that was selected, in this case ew told the engine to store the data of all of the entities within a certain box, then we bascially said in the if statement: in all cases of a new entity in the engine except the event/target entity, do this to them.