how to make player take damage in water

Started by Zardian on

Topic category: Help with modding (Java Edition)

Last seen on 22:36, 27. Apr 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make player take damage in water

I've searched for a while now and I still don't know-how

Last seen on 06:33, 1. May 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
procedure damage_in_water:…
Sat, 03/20/2021 - 11:48

procedure damage_in_water:

On player tick:

if block at (x) (y) (z) is (WATER):

>deal damage to entity (entity) amount:[choose here] type:[choose a type here]

else if block at (x) (y) (z) is F(LOWING_WATER):

>deal damage to entity (entity) amount:[choose here] type:[choose a type here]

comment:if you want to deal damage if only head is in water add everything below otherwise don't

else:

comment:if you want to deal double damage if both feet and head is in water remove the "else"(but not "execute procedure)

>execute procedure (damage_in_water_2) at (x) (y+1) (z)

comment:copy prcedure as damage_in_water_2 and remove the "execute procedure" and "else" statements

Last seen on 06:33, 1. May 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
EDIT:damage_in_water_2…
Sat, 03/20/2021 - 11:49

EDIT:damage_in_water_2 should have NO TRIGGERS(change "on player tick" to "no additional triggers")