Started by
MamaLuigi
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make a block where when you land on it, you will take double the damage you would’ve taken from fall damage
For example, if you fall onto it and you would've only taken 1 heart of fall damage, you would have taken another heart of damage from the block or 2 hearts in total
How would i do this?
You can run a procedure on the 'when entity falls trigger,' and then just deal additional damage to them if there's a custom block below them. The problem is that this only triggers once the entity has landed, meaning you probably can't make it proportional to how far the entity's fallen, but this would be really simple to get working.
If you're willing to make something a little more resource intensive, you can run a procedure on loaded entity update tick instead, that checks if an entity's fall distance, (the amount they've fallen), is over the damage threshold, and, if it is, and there's a block below it, deals the same amount of damage they would take from falling normally, before they actually finish falling. (Which would effectively double fall damage.)
This should do what you're looking for, just place it in you're blocks update tick. if you want to add more then one block below, use in the logic tab the bracket where you can do and/or/= and change it to AND and duplicate get block, and place it into the bracket. change the y-1 to y-2. now it checks for both y-1 AND y-2. Or you could put an OR to say like either one is fine.
Hope this helps