mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
variable contamination range for MK4 explosion
This commit is contained in:
parent
7af43a14fa
commit
e035b20dd3
@ -179,8 +179,9 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
|||||||
|
|
||||||
hydro += nuke / 2 + tnt / 4;
|
hydro += nuke / 2 + tnt / 4;
|
||||||
hydro = Math.min(hydro, 350);
|
hydro = Math.min(hydro, 350);
|
||||||
|
dirty *= 0.25F;
|
||||||
|
|
||||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)hydro, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5));
|
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)hydro, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).moreFallout((int)dirty));
|
||||||
worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFac(worldObj, xCoord + 0.5, yCoord + 5, zCoord + 0.5, hydro));
|
worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFac(worldObj, xCoord + 0.5, yCoord + 5, zCoord + 0.5, hydro));
|
||||||
|
|
||||||
/// NUCLEAR ///
|
/// NUCLEAR ///
|
||||||
@ -189,7 +190,7 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
|||||||
nuke += tnt / 2;
|
nuke += tnt / 2;
|
||||||
nuke = Math.min(nuke, 200);
|
nuke = Math.min(nuke, 200);
|
||||||
|
|
||||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)nuke, xCoord + 0.5, yCoord + 5, zCoord + 0.5));
|
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)nuke, xCoord + 0.5, yCoord + 5, zCoord + 0.5).moreFallout((int)dirty));
|
||||||
worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFac(worldObj, xCoord + 0.5, yCoord + 5, zCoord + 0.5, nuke));
|
worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFac(worldObj, xCoord + 0.5, yCoord + 5, zCoord + 0.5, nuke));
|
||||||
|
|
||||||
/// NON-NUCLEAR ///
|
/// NON-NUCLEAR ///
|
||||||
|
|||||||
@ -23,6 +23,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
|||||||
public int length;
|
public int length;
|
||||||
|
|
||||||
public boolean fallout = true;
|
public boolean fallout = true;
|
||||||
|
private int falloutAdd = 0;
|
||||||
|
|
||||||
ExplosionNukeRay explosion;
|
ExplosionNukeRay explosion;
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
|||||||
fallout.posX = this.posX;
|
fallout.posX = this.posX;
|
||||||
fallout.posY = this.posY;
|
fallout.posY = this.posY;
|
||||||
fallout.posZ = this.posZ;
|
fallout.posZ = this.posZ;
|
||||||
fallout.setScale((int)(this.length * 1.8) * MainRegistry.falloutRange / 100);
|
fallout.setScale((int)(this.length * 1.8 + falloutAdd) * MainRegistry.falloutRange / 100);
|
||||||
|
|
||||||
this.worldObj.spawnEntityInWorld(fallout);
|
this.worldObj.spawnEntityInWorld(fallout);
|
||||||
|
|
||||||
@ -108,14 +109,20 @@ public class EntityNukeExplosionMK4 extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||||
|
|
||||||
|
/*strength = nbt.getInteger("strength");
|
||||||
|
count = nbt.getInteger("count");
|
||||||
|
speed = nbt.getInteger("speed");
|
||||||
|
length = nbt.getInteger("length");
|
||||||
|
fallout = nbt.getBoolean("fallout");
|
||||||
|
falloutAdd = nbt.getInteger("falloutAdd");*/
|
||||||
|
|
||||||
|
//TODO: implement NBT functionality for MK4 explosion logic
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
protected void writeEntityToNBT(NBTTagCompound nbt) { }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EntityNukeExplosionMK4 statFac(World world, int r, double x, double y, double z) {
|
public static EntityNukeExplosionMK4 statFac(World world, int r, double x, double y, double z) {
|
||||||
|
|
||||||
@ -168,5 +175,10 @@ public class EntityNukeExplosionMK4 extends Entity {
|
|||||||
mk4.fallout = false;
|
mk4.fallout = false;
|
||||||
return mk4;
|
return mk4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EntityNukeExplosionMK4 moreFallout(int fallout) {
|
||||||
|
falloutAdd = fallout;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user