mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
89 lines
4.1 KiB
Java
89 lines
4.1 KiB
Java
package com.hbm.entity.missile;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import com.hbm.entity.logic.EntityEMP;
|
|
import com.hbm.explosion.ExplosionChaos;
|
|
import com.hbm.explosion.ExplosionLarge;
|
|
import com.hbm.items.ModItems;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
|
|
public abstract class EntityMissileTier2 extends EntityMissileBaseNT {
|
|
|
|
public EntityMissileTier2(World world) { super(world); }
|
|
public EntityMissileTier2(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
|
|
|
@Override
|
|
public List<ItemStack> getDebris() {
|
|
List<ItemStack> list = new ArrayList<ItemStack>();
|
|
|
|
list.add(new ItemStack(ModItems.plate_steel, 10));
|
|
list.add(new ItemStack(ModItems.plate_titanium, 6));
|
|
list.add(new ItemStack(ModItems.thruster_medium, 1));
|
|
list.add(new ItemStack(ModItems.circuit_targeting_tier2, 1));
|
|
|
|
return list;
|
|
}
|
|
|
|
@Override
|
|
public RadarTargetType getTargetType() {
|
|
return RadarTargetType.MISSILE_TIER2;
|
|
}
|
|
|
|
public static class EntityMissileStrong extends EntityMissileTier2 {
|
|
public EntityMissileStrong(World world) { super(world); }
|
|
public EntityMissileStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
|
@Override public void onImpact() { ExplosionLarge.explode(worldObj, posX, posY, posZ, 25.0F, true, true, true); }
|
|
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_medium); }
|
|
}
|
|
|
|
public static class EntityMissileIncendiaryStrong extends EntityMissileTier2 {
|
|
public EntityMissileIncendiaryStrong(World world) { super(world); }
|
|
public EntityMissileIncendiaryStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
|
@Override public void onImpact() {
|
|
ExplosionLarge.explodeFire(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 25.0F, true, true, true);
|
|
ExplosionChaos.flameDeath(this.worldObj, (int)((float)this.posX + 0.5F), (int)((float)this.posY + 0.5F), (int)((float)this.posZ + 0.5F), 25);
|
|
}
|
|
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_incendiary_medium); }
|
|
}
|
|
|
|
public static class EntityMissileClusterStrong extends EntityMissileTier2 {
|
|
public EntityMissileClusterStrong(World world) { super(world); }
|
|
public EntityMissileClusterStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); this.isCluster = true; }
|
|
@Override public void onImpact() {
|
|
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 15F, true);
|
|
ExplosionChaos.cluster(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 50, 100);
|
|
}
|
|
@Override public void cluster() { this.onImpact(); }
|
|
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_cluster_medium); }
|
|
}
|
|
|
|
public static class EntityMissileBusterStrong extends EntityMissileTier2 {
|
|
public EntityMissileBusterStrong(World world) { super(world); }
|
|
public EntityMissileBusterStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
|
@Override public void onImpact() {
|
|
for(int i = 0; i < 20; i++) this.worldObj.createExplosion(this, this.posX, this.posY - i, this.posZ, 7.5F, true);
|
|
ExplosionLarge.spawnParticles(worldObj, this.posX, this.posY, this.posZ, 8);
|
|
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 8);
|
|
ExplosionLarge.spawnRubble(worldObj, this.posX, this.posY, this.posZ, 8);
|
|
}
|
|
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_buster_medium); }
|
|
}
|
|
|
|
public static class EntityMissileEMPStrong extends EntityMissileTier2 {
|
|
public EntityMissileEMPStrong(World world) { super(world); }
|
|
public EntityMissileEMPStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
|
@Override public void onImpact() {
|
|
EntityEMP emp = new EntityEMP(worldObj);
|
|
emp.posX = posX;
|
|
emp.posY = posY;
|
|
emp.posZ = posZ;
|
|
worldObj.spawnEntityInWorld(emp);
|
|
}
|
|
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_medium); }
|
|
}
|
|
}
|