diff --git a/src/main/java/org/infernalstudios/miningmaster/mixin/MixinAbstractArrow.java b/src/main/java/org/infernalstudios/miningmaster/mixin/MixinAbstractArrow.java index 4a3bf6e..2a4238e 100644 --- a/src/main/java/org/infernalstudios/miningmaster/mixin/MixinAbstractArrow.java +++ b/src/main/java/org/infernalstudios/miningmaster/mixin/MixinAbstractArrow.java @@ -53,7 +53,7 @@ private void MM_setEnchantsOnCreation(EntityType entityType, LivingEntity shoote private void MM_dealArrowEnchants(EntityHitResult hitResult, CallbackInfo ci) { if (this.freezingLevel > 0) { if (hitResult.getEntity() instanceof LivingEntity livingEntity && !livingEntity.level.isClientSide()) { - livingEntity.setTicksFrozen(livingEntity.getTicksFrozen() + livingEntity.getTicksRequiredToFreeze() + 120 * this.freezingLevel); + livingEntity.setTicksFrozen(Math.max(livingEntity.getTicksFrozen(), livingEntity.getTicksRequiredToFreeze() + 120 * this.freezingLevel)); } } diff --git a/src/main/java/org/infernalstudios/miningmaster/mixin/MixinPlayer.java b/src/main/java/org/infernalstudios/miningmaster/mixin/MixinPlayer.java index 03da2e1..dc56fc3 100644 --- a/src/main/java/org/infernalstudios/miningmaster/mixin/MixinPlayer.java +++ b/src/main/java/org/infernalstudios/miningmaster/mixin/MixinPlayer.java @@ -56,7 +56,7 @@ private void MM_calculateEnchantEffects(Entity targetEntity, CallbackInfo ci, fl private void applyFreezingEffects(Entity targetEntity, int level) { if (targetEntity instanceof LivingEntity livingTarget && !livingTarget.level.isClientSide()) { - livingTarget.setTicksFrozen(livingTarget.getTicksFrozen() + livingTarget.getTicksRequiredToFreeze() + 120 * level); + livingTarget.setTicksFrozen(Math.max(livingTarget.getTicksFrozen(), livingTarget.getTicksRequiredToFreeze() + 120 * level)); } }