fix: more potion effect desync fixed

This commit is contained in:
WinDanesz
2026-05-12 15:12:13 +00:00
parent 255d5add29
commit ae7064f5be
24 changed files with 58 additions and 54 deletions
@@ -32,11 +32,11 @@ public class EntityHuskMinion extends EntityZombieMinion {
boolean flag = super.attackEntityAsMob(target);
if(flag && this.getHeldItemMainhand().isEmpty() && target instanceof EntityLivingBase){
if(flag && !this.world.isRemote && this.getHeldItemMainhand().isEmpty() && target instanceof EntityLivingBase){
float f = this.world.getDifficultyForLocation(new BlockPos(this)).getAdditionalDifficulty();
((EntityLivingBase)target).addPotionEffect(new PotionEffect(MobEffects.HUNGER, 140 * (int)f));
}
return flag;
}
}
}