Skip to content

Commit

Permalink
Fixed a bug with a spider web
Browse files Browse the repository at this point in the history
  • Loading branch information
OldSerpskiStalker committed Oct 26, 2024
1 parent 599f314 commit ac0b3d9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
Expand Down Expand Up @@ -63,8 +64,10 @@ protected void onImpact(RayTraceResult result)

if (result.entityHit != null && result.entityHit != thrower)
{
result.entityHit.attackEntityFrom(DamageSource.
causeThrownDamage(this, thrower), 0.f);
if (!(result.entityHit instanceof EntitySpider))
{
result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, thrower), 0.f);
}
}

if (result.typeOfHit != RayTraceResult.Type.MISS)
Expand Down

0 comments on commit ac0b3d9

Please sign in to comment.