Started by
Xanderz_1001
on
Topic category: Help with Minecraft modding (Java Edition)
I want a custom weapon to inflict vulnerability to an entity on hit, basically like negative resistance for a few seconds, where it is more prone to taking damage. I've tried just adding negative resistance, but it seems to have no effect. Any help is appreciated.
Create a way for the entity to get a potion effect (the debuff).
Then make this procedure:
This basicly causes the entity to take increased damage when they take damage form attacks (or "before entity hurt", then it is all damage).
For some reason my game crashes whenever the effect is inflicted and the entity is hit again. Either it's a bug or I did something wrong.
I made a procedure by itself (not under anything, don't think I'm supposed to) and put the "flat amount of damage" block in it, as well as a procedure under a custom sword where when the sword attacks an entity it inflicts it with the effect.
It might be from the game trying to deal damage twice in a row when an entity is only supposed to be hit once before its invulnerability frames are up, at least that's my best guess.
I was thinking, is possible to just set the entity's health to -2 of what its current health is instead of dealing damage? If it's a bug then that might fix it.
This procedure has nothing that can cause problems, i tried it out and it crashed aswell. I am using the latest snapshot so it most likely is a bug because i have made similar procedures before, so we will have to use a makeshift one in the meantime as "deal damage" seems to be bugged. So here is a new procedure untill deal damage is fixed:
Replace the 2 with the damage you want. This is to be expected with test versions, that is if you are using the snapshot aswell.
Thanks, this works!
Also, how could I make it deal more damage if the effect is a higher level?
Np, use the "get effect level/amplifier of potion --- for event/target entity" where "if level 0 do 2 damage" and a bunch of else ifs for each level. Should work.
Thx!!!
Hey Guys, So I'm trying to make the Jarate from Team Fortress 2 but your procedure does not work for me, it just kills and entities instantly and I was wondering if you could help me. I'm also trying to make the Dead Ringer as well so any help on that is also appreciated.
Sure! First, make the effect. The only thing you should change in the triggers section is the "Active tick condition", which should be set to (always). Then, make a procedure. Here's what it should look like:
https://imgur.com/a/RrsZHM6
Note: this is definitely not the most optimized, as you would need to make more procedures for each level, but if that doesn't matter too much and you only plan on using a few different levels of the effect, then it shouldn't be much of a problem.
Oh right, and to add this to a weapon, create a procedure under "When living entity is hit with tool", and add this procedure inside it:
https://imgur.com/a/2wGH5YU
Thank you so much for that, I have yet to test it and I only plan on adding one level for Jarate. But do you think you could help me with the Dead Ringer?
Hey Again, Ive just tested out your Procedure for the Jarate and it just kills the entities instantly, even me in creative Mode. I dont know if I have done something wrong or?
I have figured it out, but I take damage when the potion lands on me and I am applied with it. I changed the procedure to "On Effect active Tick" to "When effect started/Applied" I think its good enough for now so thank you for your help and would really appreciate anyting else for the Dead Ringer. Cheers
Hello Again, I have figured out how to fix the Dead Ringer so I will no longer need help but thankyou for all the help you have provided me with.