How can I make a fluid damage the player? #1614
Replies: 1 comment 1 reply
-
I think you mean lava. There is special handling for that tag and powdered snow.
The other one is the correct method to override on your liquid block I thought your problem might be that it checks the block's collision shape (since you can walk through liquids). Without more information than "it does not work" it is hard to say what you are doing wrong. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I made a liquid, but I want it to damage the player.
I tried a lot of things:
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) { entity.damage(DamageSource.IN_WALL, 1); }
But nothing works.
I also tried to put change the tag of the liquid from water to water. It works, but I don't want it to do fire damage.
What can I do?
Edit:
Yeah, I meant water to lava, not water to water lol
Beta Was this translation helpful? Give feedback.
All reactions