Started by
ShadowPlayer51
on
Topic category: Help with MCreator software
I wanted to know if there was some sort of code block that could change the "amount" dependency in the "Before entity is hurt" global trigger. Like if the player was holding a certain item before the damage, you could set the amount to 0.75 what it would have been, or something like that.
Sorry, bumping this. This is important for me too.
I might be necro, But I also would like to know
chatgpt + custom code snippet lets you do (almost) everything as long as you know what you're doing
((net.minecraftforge.event.entity.living.LivingHurtEvent) event).setAmount((float) dmg);
inteded for forge 1.18.2 "Before entity is hurt" global trigger but it might work for more versions, just ask chatgpt something like "Can you make this code work on [modloader] [version] [code]"
(chatgpt code aint the best but we all gotta do what we gotta do)
Actually, I think this feature was added without needing custom code at all in the newest MCreator version.