Started by
draggo
on
Topic category: Help with Minecraft modding (Java Edition)
Ive tried many ways and tried to find help i cant seem to find any info on it if anyone knows please help out
Topic category: Help with Minecraft modding (Java Edition)
Ive tried many ways and tried to find help i cant seem to find any info on it if anyone knows please help out
Make a procedure with the global trigger 'before entity is hurt.' In that procedure, use an if bracket to check that the event/target entity, (the one being hurt), is a player, and the source entity, (the one attacking), is the desired type of mob. (You can do this using the 'is entity subtype of ' function in the logic tab.) Then, inside the if bracket, use the 'apply potion effect' function to apply your custom effect to the event/target entity.
how do i make a apply potion effect function?
If you make a procedure, you can find the 'apply potion effect' function in the 'entity management' tab. It's a blue code-block that asks for an entity, a duration, and a potion effect, and applies the effect to the entity you provide it with.
If you're really new to making procedures, it may be worth looking into some of NorthWestTree's tutorials on youtube to get a better idea of how they work.