@Override protected void onImpact(RayTraceResult movingObjectPosition) { BlockPos pos = new BlockPos(MathHelper.floor(posX), MathHelper.floor(posY), MathHelper.floor(posZ)); if (movingObjectPosition.entityHit != null) { if (!getEntityWorld().isRemote) if (movingObjectPosition.entityHit instanceof EntityLivingBase) { ((EntityLivingBase) movingObjectPosition.entityHit).addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 2 * 20, 0)); getEntityWorld().playEvent(null, 2001, pos, Block.getIdFromBlock(Blocks.SAND)); } if (!movingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, getThrower()), (float) (ConfigHandler.INSTANCE.mobAttackDamageMultiplier < 2 ? 4D : 4D * ConfigHandler.INSTANCE.mobAttackDamageMultiplier))) ; } else if (movingObjectPosition.entityHit == null && Blocks.SAND.canPlaceBlockAt(getEntityWorld(), pos)) if (!getEntityWorld().isRemote) { setDead(); getEntityWorld().setBlockState(pos, Blocks.SAND.getDefaultState()); } if (!getEntityWorld().isRemote) { setDead(); } }