Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EntityTesterBolt extends EntityThrowable {
- EntityLivingBase thrower;
- public EntityTesterBolt(World p_i1777_1_, EntityLivingBase p_i1777_2_) {
- super(p_i1777_1_, p_i1777_2_);
- this.setSize(3, 3);
- thrower = p_i1777_2_;
- // TODO Auto-generated constructor stub
- }
- @Override
- protected void onImpact(MovingObjectPosition mop) {
- // TODO Auto-generated method stub
- if (mop.entityHit != null && mop.entityHit != thrower) {
- mop.entityHit.attackEntityFrom(ModDamageSource.causeEnergyDamage(this, thrower), 4F);
- this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2, false);
- this.setDead();
- return;
- }
- this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2, false);
- this.setDead();
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement