diff --git a/src/main/java/de/dafuqs/spectrum/mixin/LivingEntityMixin.java b/src/main/java/de/dafuqs/spectrum/mixin/LivingEntityMixin.java index 8044e130e5..0a977f2b7b 100644 --- a/src/main/java/de/dafuqs/spectrum/mixin/LivingEntityMixin.java +++ b/src/main/java/de/dafuqs/spectrum/mixin/LivingEntityMixin.java @@ -493,15 +493,16 @@ private float getToughness() { var damage = Float.MAX_VALUE; if (SleepStatusEffect.isImmuneish(entity)) { - if (entity instanceof PlayerEntity player) { + if (entity instanceof PlayerEntity player) damage = entity.getHealth() * 0.95F; - Support.grantAdvancementCriterion((ServerPlayerEntity) player, "lategame/survive_fatal_slumber", "get_slumbered_idiot"); - } - else { + else damage = entity.getMaxHealth() * 0.3F; - } } + entity.damage(SpectrumDamageTypes.sleep(entity.getWorld(), null), damage); + if (entity.isAlive() && entity instanceof ServerPlayerEntity serverPlayerEntity && !serverPlayerEntity.isCreative()) { + Support.grantAdvancementCriterion(serverPlayerEntity, "lategame/survive_fatal_slumber", "survived_fatal_slumber"); + } } } diff --git a/src/main/resources/data/spectrum/advancements/lategame/survive_fatal_slumber.json b/src/main/resources/data/spectrum/advancements/lategame/survive_fatal_slumber.json index 68db325c93..0fbfdd9838 100644 --- a/src/main/resources/data/spectrum/advancements/lategame/survive_fatal_slumber.json +++ b/src/main/resources/data/spectrum/advancements/lategame/survive_fatal_slumber.json @@ -14,7 +14,7 @@ "hidden": true }, "criteria": { - "get_slumbered_idiot": { + "survived_fatal_slumber": { "trigger": "minecraft:impossible" }, "gotten_previous": {