package com.arkcraft.module.weapon.common.entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class EntitySimpleBullet extends EntityProjectile { public EntitySimpleBullet(World world) { super(world); setDamage(7); } public EntitySimpleBullet(World world, double d, double d1, double d2) { this(world); setPosition(d, d1, d2); setDamage(7); } public EntitySimpleBullet(World worldIn, EntityLivingBase shooter, float speed, float inaccuracy) { super(worldIn, shooter, speed, inaccuracy); setDamage(7); } @Override public float getGravity() { return 0.005F; } @Override public float getAirResistance() { return 0.98F; } @Override public void onUpdate() { super.onUpdate(); if (ticksInAir > 100) { setDead(); } worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, posX, posY, posZ, 0.0D, 0.0D, 0.0D); } @Override public void onGroundHit(MovingObjectPosition movingobjectposition) { worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, 0.0D, 0.0D, 0.0D); breakGlass(movingobjectposition); this.setDead(); } }