Started by
Mymann
on
Topic category: Help with Minecraft modding (Java Edition)
Current I set in the Entity is hurt trigger that if it got hurt, it will have a 50% chance to summon a minion to help it, but the problem is that I only want the damage source type by from mobs in order to cause it to spawn more mobs, there is currently a bug in my 2023.3 version that even if the entity has fire resistance, standing in fire/lava will also trigger the procedure, the /kill command will also trigger the procedure also, with all of the above, I need to have the damage source be specified clearly that it need to be from another mob or the player for the procedure to carry out.
Edited by Mymann on Thu, 07/18/2024 - 03:08
I solved it, just need to specified the source entity damage was from a "Mob Entity", that will exclude stuff like fire damage, drowning, fall damage and the /kill command.
Okay, so upon further testing, it seems that the procedure still apply even if you damage the mob using a ranged weapon such as a bow, anyone know how can I specify the damage to only be melee damage for the effect to activate? This is my procedure so far.
As you can see, the procedure is set to heal the player when they deal critical hit to a mob, but testing proves that even normal punching damage or ranged attack will cause the effect to activate.
To detect if the hit Is critical go in advanced tab and search for "logic dependency", and write in it "isvanillacritical", then :
-If Is Logic deprndency: isvanillacritical = true
-Do........
Later I'll see if i can help with the melee damage problem
turns out that if you use isvanillacritical it counts only melee critical attacks, so that should be enough to solve both of your problems
thank you, I will try it out when I got the chance.
You're welcome
Okay so this is the ne procedure for detecting vanilla crits with the dependency, is this format of detecting the logic dependency correct? bc I tested mine out and it still apply the effects when using bows
It should work, I even tested your whole procedure and it works for me, try making it in another workspace and check if it works there
Yeah, it did worked, the problwm to why it seems didn't for me was because I forgot I have another procedure dedicated to the helmet to apply its effect on mobs that is wearing it, and that somehow mistake players for a mob, no worry, I fixed it now and tested it out too, it now worked as intended.
Alright