Hbm-s-Nuclear-Tech-GIT/com/hbm/entity/grenade/EntityGrenadeElectric.java
2017-07-23 12:10:52 +02:00

33 lines
901 B
Java

package com.hbm.entity.grenade;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.world.World;
public class EntityGrenadeElectric extends EntityGrenadeBase
{
private static final String __OBFID = "CL_00001722";
public EntityGrenadeElectric(World p_i1773_1_)
{
super(p_i1773_1_);
}
public EntityGrenadeElectric(World p_i1774_1_, EntityLivingBase p_i1774_2_)
{
super(p_i1774_1_, p_i1774_2_);
}
@Override
public void explode() {
if (!this.worldObj.isRemote)
{
this.setDead();
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
}
this.worldObj.spawnEntityInWorld(new EntityLightningBolt(this.worldObj, this.posX, this.posY, this.posZ));
}
}