Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Apr 3, 2024
1 parent 3cc8e9d commit e6c9f54
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ private void applyShieldCollision(Entity collider, Entity collided) {
if (collided != this) {
collided.applyEntityCollision(collider);
if (collided instanceof EntityLivingBase && super.attackEntityAsMob(collided)) {
((EntityLivingBase)collided).knockBack(collided, 1.5F * 0.5F, (double)MathHelper.sin(this.rotationYaw * ((float)Math.PI / 180F)), (double)(-MathHelper.cos(this.rotationYaw * ((float)Math.PI / 180F))));
((EntityLivingBase)collided).knockBack(collided, 1.5F * 0.5F, (double)MathHelper.sin(this.rotationYaw * ((float)Math.PI / 180.0F)), (double)(-MathHelper.cos(this.rotationYaw * ((float)Math.PI / 180.0F))));
this.playSound(SoundEvents.ENTITY_PLAYER_ATTACK_KNOCKBACK, 1.0F, 1.0F);
this.playSound(MMSounds.EFFECT_GEOMANCY_HIT_SMALL, 1.0F, 1.0F);
}
Expand Down Expand Up @@ -472,8 +472,11 @@ public void incrementSuccessfulDrops() {
@Override
public void doBreathAttack(Entity target) {
target.attackEntityFrom(DamageSource.causeMobDamage(this), BREATH_DAMAGE);
((EntityLivingBase)target).addPotionEffect(new PotionEffect(TFPotions.frosty, 8 * 20, 4)); // 8 seconds
((EntityLivingBase)target).addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 8 * 20, 3)); // 8 seconds

if (target instanceof EntityLivingBase) {
((EntityLivingBase)target).addPotionEffect(new PotionEffect(TFPotions.frosty, 7 * 20, 4)); // 7 seconds
((EntityLivingBase)target).addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 7 * 20, 3)); // 7 seconds
}
}

@Override
Expand Down

0 comments on commit e6c9f54

Please sign in to comment.