mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
60 lines
1.2 KiB
Java
60 lines
1.2 KiB
Java
package com.hbm.entity.logic;
|
|
|
|
import com.hbm.explosion.ExplosionLarge;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
import net.minecraft.world.World;
|
|
|
|
public class EntityDeathBlast extends Entity {
|
|
|
|
public static final int maxAge = 60;
|
|
|
|
public EntityDeathBlast(World p_i1582_1_) {
|
|
super(p_i1582_1_);
|
|
this.ignoreFrustumCheck = true;
|
|
}
|
|
|
|
@Override
|
|
protected void entityInit() { }
|
|
|
|
@Override
|
|
protected void readEntityFromNBT(NBTTagCompound nbt) { }
|
|
|
|
@Override
|
|
protected void writeEntityToNBT(NBTTagCompound nbt) { }
|
|
|
|
@Override
|
|
public void onUpdate() {
|
|
|
|
if(this.ticksExisted >= maxAge && !worldObj.isRemote) {
|
|
this.setDead();
|
|
|
|
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 25, true, true, true);
|
|
}
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public int getBrightnessForRender(float p_70070_1_)
|
|
{
|
|
return 15728880;
|
|
}
|
|
|
|
@Override
|
|
public float getBrightness(float p_70013_1_)
|
|
{
|
|
return 1.0F;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public boolean isInRangeToRenderDist(double distance)
|
|
{
|
|
return distance < 25000;
|
|
}
|
|
|
|
}
|