Started by
WhoAteMyCheerios
on
Topic category: Help with Minecraft modding (Java Edition)
Hi,
I've been trying to make a weapon that puts an effect on an enemy when it is hit with said weapon. I've tried a few different things but nothing has worked out in my favor. I'm relatively new to the whole procedure shenaniganry so I'm sorry if I'm missing something obvious.
It's pretty easy; You need to connect a procedure to it, and that procedure should be the "entity attacked" trigger. How I usually do it for this sort of thing is go into the "template library" and grab the "Add potion if entity has specific item in hand" template. You can put that under the trigger block, and finally choose your potion effect (You can make custom ones too ;).
If you wish, you can grab the other potion block from the entity procedure tab that includes whether you can see potion particles and whether it's ambient.
-Happy modding ;)
I tried that but it isn't working for some reason, when I hit the enemy nothing happens. If you have a solution can you please reply.
@Jasperagoose how about that one: