Carpet

Carpet

3M Downloads

scarpet event __on_player_takes_damage no longer works

WerLunar opened this issue ยท 4 comments

commented

carpet version 1.4.161
__on_player_takes_damage event will not be triggered when player takes damage.

commented
  1. What Minecraft version are you running? What other mods do you have installed?
  2. How are you taking damage?
  3. Does your "damage taken" statistic increase upon taking damage?
  4. Is the __on_player_takes_damage event mapped to call a function with user-visible effects?
commented
  1. What Minecraft version are you running? What other mods do you have installed?
  2. How are you taking damage?
  3. Does your "damage taken" statistic increase upon taking damage?
  4. Is the __on_player_takes_damage event mapped to call a function with user-visible effects?

Thanks for your quick reply, I clicked create before I had done writting :')

  1. 1.21.4
  2. fall damage, damage potion, bee attack. Those are the tested.
  3. Yes the statistic increases.
  4. Yes, I tested with a script like this:
    __on_player_takes_damage(player, amount, source, source_entity) -> (
    print('damaged');
    );
commented

Do you instantly die upon taking any damage after running this script?

__on_player_takes_damage(player, amount, source, source_entity) -> modify(player, 'health', 0);
commented

Do you instantly die upon taking any damage after running this script?

__on_player_takes_damage(player, amount, source, source_entity) -> modify(player, 'health', 0);

Nope, the player still takes normal damage.
Also I forgot to mention that I'm testing only with carpet mod installed.
I dug into this issue because the carried_totem.sc scarpet script stopped working after updating to 1.21.4 from 1.20.2, and narrowed down to this potential issue.