Started by
MamaLuigi
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make a block that basically acts like an anvil, as in it has gravity and it deals damage upon landing on an entitiy
One different thing i want to do is make it always deal 20 points, (or 10 hearts), of damage.
I got the falling part working, but how would i deal the damage?
Is it even possible, and if so how would i do it?
Any help would be greatly appreciated!
Edited by MamaLuigi on Fri, 02/16/2024 - 18:20
I figured out how to do this. You need 2 identical blocks. BlockA does not have gravity but has a trigger that if Y-1 has air or water it replaces itself with BlockB. BlockB does have gravity and has 2 triggers. One is to do damage to entities that come in contact with it, the other is to check on tick update whether the block ay Y-1 is solid and then it replaces itself with BlockA