Compare commits
6 commits
95cb00efb6
...
master
Author | SHA1 | Date | |
---|---|---|---|
4472b68eca | |||
f351d614d6 | |||
1131b22447 | |||
43915e43f0 | |||
f61b166f77 | |||
4938dbac5c |
6 changed files with 177 additions and 101 deletions
13
LICENSE
Normal file
13
LICENSE
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
0
gradlew
vendored
Normal file → Executable file
0
gradlew
vendored
Normal file → Executable file
|
@ -45,13 +45,28 @@ import trinity.handler.Vec3;
|
||||||
import trinity.init.ModBlocks;
|
import trinity.init.ModBlocks;
|
||||||
|
|
||||||
public class EntityShockwave extends Entity {
|
public class EntityShockwave extends Entity {
|
||||||
|
|
||||||
private static final DataParameter<Integer> SCALE = EntityDataManager.<Integer>createKey(EntityShockwave.class, DataSerializers.VARINT);
|
private static final DataParameter<Integer> SCALE = EntityDataManager.<Integer>createKey(EntityShockwave.class, DataSerializers.VARINT);
|
||||||
|
|
||||||
|
|
||||||
public int revProgress;
|
public int revProgress;
|
||||||
public int radProgress;
|
public int radProgress;
|
||||||
|
|
||||||
|
private int iCounter = 0;
|
||||||
|
private boolean needsInit = true;
|
||||||
|
|
||||||
|
private int blastState = 0; // Not started
|
||||||
|
private int blastCount = 0;
|
||||||
|
|
||||||
|
private MutableBlockPos pos;
|
||||||
|
private MutableBlockPos pos2;
|
||||||
|
private MutableBlockPos pos3;
|
||||||
|
private MutableBlockPos pos4;
|
||||||
|
private MutableBlockPos pos5;
|
||||||
|
|
||||||
|
private double dist;
|
||||||
|
private double circum;
|
||||||
|
|
||||||
public EntityShockwave(World p_i1582_1_) {
|
public EntityShockwave(World p_i1582_1_) {
|
||||||
super(p_i1582_1_);
|
super(p_i1582_1_);
|
||||||
this.setSize(0, 0);
|
this.setSize(0, 0);
|
||||||
|
@ -83,87 +98,117 @@ public class EntityShockwave extends Entity {
|
||||||
return bb;
|
return bb;
|
||||||
//return this.getEntityBoundingBox();
|
//return this.getEntityBoundingBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate() {
|
public void onUpdate() {
|
||||||
|
|
||||||
if(!world.isRemote) {
|
if(!world.isRemote) {
|
||||||
MutableBlockPos pos = new BlockPos.MutableBlockPos();
|
if(needsInit) {
|
||||||
MutableBlockPos pos2 = new BlockPos.MutableBlockPos();
|
pos = new BlockPos.MutableBlockPos();
|
||||||
MutableBlockPos pos3 = new BlockPos.MutableBlockPos();
|
pos2 = new BlockPos.MutableBlockPos();
|
||||||
MutableBlockPos pos4 = new BlockPos.MutableBlockPos();
|
pos3 = new BlockPos.MutableBlockPos();
|
||||||
MutableBlockPos pos5 = new BlockPos.MutableBlockPos();
|
pos4 = new BlockPos.MutableBlockPos();
|
||||||
for(int i = 0; i < 512; i++) {
|
pos5 = new BlockPos.MutableBlockPos();
|
||||||
|
needsInit = false;
|
||||||
Vec3 vec = Vec3.createVectorHelper(radProgress * 0.5, 0, 0);
|
}
|
||||||
double circum = radProgress * 2 * Math.PI * 2;
|
if(iCounter < 512*3) {
|
||||||
|
if(blastState == 0) { // Not started
|
||||||
///
|
Vec3 vec = Vec3.createVectorHelper(radProgress * 0.5, 0, 0);
|
||||||
if(circum == 0)
|
circum = radProgress * 2 * Math.PI * 2;
|
||||||
circum = 1;
|
|
||||||
///
|
///
|
||||||
|
if(circum == 0)
|
||||||
double part = 360D / circum;
|
circum = 1;
|
||||||
|
///
|
||||||
vec.rotateAroundY((float) (part * revProgress));
|
|
||||||
|
double part = 360D / circum;
|
||||||
int x = (int) (posX + vec.xCoord);
|
|
||||||
int z = (int) (posZ + vec.zCoord);
|
vec.rotateAroundY((float) (part * revProgress));
|
||||||
|
|
||||||
double dist = radProgress * 100 / getScale() * 0.5;
|
int x = (int) (posX + vec.xCoord);
|
||||||
pos.setPos(x, posY, z);
|
int z = (int) (posZ + vec.zCoord);
|
||||||
pos2.setPos(x-1, posY, z);
|
|
||||||
pos3.setPos(x+1, posY, z);
|
dist = radProgress * 100 / getScale() * 0.5;
|
||||||
pos4.setPos(x, posY, z-1);
|
pos.setPos(x, posY, z);
|
||||||
pos5.setPos(x, posY, z-1);
|
pos2.setPos(x-1, posY, z);
|
||||||
blast(pos, dist);
|
pos3.setPos(x+1, posY, z);
|
||||||
blast(pos2, dist);
|
pos4.setPos(x, posY, z-1);
|
||||||
blast(pos3, dist);
|
pos5.setPos(x, posY, z-1);
|
||||||
blast(pos4, dist);
|
blastState = 1;
|
||||||
blast(pos5, dist);
|
} else if(blastState == 1) {
|
||||||
|
switch(blastCount) {
|
||||||
revProgress++;
|
case 0:
|
||||||
|
blast(pos, dist);
|
||||||
if(revProgress > circum) {
|
blastCount++;
|
||||||
revProgress = 0;
|
break;
|
||||||
radProgress++;
|
case 1:
|
||||||
}
|
blast(pos2, dist);
|
||||||
|
blastCount++;
|
||||||
if(radProgress > getScale() * 2D) {
|
break;
|
||||||
|
case 2:
|
||||||
this.setDead();
|
blast(pos3, dist);
|
||||||
}
|
blastCount++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
blast(pos4, dist);
|
||||||
|
blastCount++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
blast(pos5, dist);
|
||||||
|
blastCount++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
blastState = 2;
|
||||||
|
blastCount = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if(blastState == 2) {
|
||||||
|
revProgress++;
|
||||||
|
|
||||||
|
if(revProgress > circum) {
|
||||||
|
revProgress = 0;
|
||||||
|
radProgress++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(radProgress > getScale() * 2D) {
|
||||||
|
|
||||||
|
this.setDead();
|
||||||
|
blastState = 4;
|
||||||
|
}
|
||||||
|
blastState = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
iCounter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void blast(MutableBlockPos pos, double dist) {
|
private void blast(MutableBlockPos pos, double dist) {
|
||||||
|
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
|
|
||||||
int topBlock =world.getTopSolidOrLiquidBlock(pos).getY();
|
int topBlock =world.getTopSolidOrLiquidBlock(pos).getY();
|
||||||
|
|
||||||
for(int y = (topBlock-8); y <= topBlock+48; y++) {
|
for(int y = (topBlock-8); y <= topBlock+48; y++) {
|
||||||
pos.setY(y);
|
pos.setY(y);
|
||||||
IBlockState b = world.getBlockState(pos);
|
IBlockState b = world.getBlockState(pos);
|
||||||
//int meta = world.getBlockMetadata(x, y, z);
|
//int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BlockPos left = new BlockPos(pos.getX()+1,pos.getY(),pos.getZ());
|
BlockPos left = new BlockPos(pos.getX()+1,pos.getY(),pos.getZ());
|
||||||
BlockPos right = new BlockPos(pos.getX()-1,pos.getY(),pos.getZ());
|
BlockPos right = new BlockPos(pos.getX()-1,pos.getY(),pos.getZ());
|
||||||
BlockPos up = new BlockPos(pos.getX(),pos.getY()+1,pos.getZ());
|
BlockPos up = new BlockPos(pos.getX(),pos.getY()+1,pos.getZ());
|
||||||
//BlockPos down = pos.add(0, -1, 0);
|
//BlockPos down = pos.add(0, -1, 0);
|
||||||
BlockPos down2 = new BlockPos(pos.getX(),pos.getY()-1,pos.getZ());
|
BlockPos down2 = new BlockPos(pos.getX(),pos.getY()-1,pos.getZ());
|
||||||
BlockPos front = pos.add(0, 0, 1);
|
BlockPos front = pos.add(0, 0, 1);
|
||||||
BlockPos back = pos.add(0, 0, -1);
|
BlockPos back = pos.add(0, 0, -1);
|
||||||
|
|
||||||
boolean LR = (world.isAirBlock(left) && world.isAirBlock(right));
|
boolean LR = (world.isAirBlock(left) && world.isAirBlock(right));
|
||||||
//boolean UD = (world.isAirBlock(up) && world.isAirBlock(down));
|
//boolean UD = (world.isAirBlock(up) && world.isAirBlock(down));
|
||||||
boolean FB = (world.isAirBlock(front) && world.isAirBlock(back));
|
boolean FB = (world.isAirBlock(front) && world.isAirBlock(back));
|
||||||
|
|
||||||
IBlockState bd = world.getBlockState(down2);
|
IBlockState bd = world.getBlockState(down2);
|
||||||
|
|
||||||
if((b.getMaterial() != Material.AIR || (b.getBlock()instanceof BlockFluidClassic)) && bd.getMaterial() == Material.AIR)
|
if((b.getMaterial() != Material.AIR || (b.getBlock()instanceof BlockFluidClassic)) && bd.getMaterial() == Material.AIR)
|
||||||
{
|
{
|
||||||
if(b.getBlock().getExplosionResistance(null)<=100)
|
if(b.getBlock().getExplosionResistance(null)<=100)
|
||||||
|
@ -174,13 +219,13 @@ public class EntityShockwave extends Entity {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(b.getMaterial() != Material.AIR && (LR || FB))
|
if(b.getMaterial() != Material.AIR && (LR || FB))
|
||||||
{
|
{
|
||||||
world.setBlockToAir(pos);
|
world.setBlockToAir(pos);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(b.getMaterial() == Material.AIR)
|
if(b.getMaterial() == Material.AIR)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -206,7 +251,7 @@ public class EntityShockwave extends Entity {
|
||||||
p_70014_1_.setInteger("scale", getScale());
|
p_70014_1_.setInteger("scale", getScale());
|
||||||
p_70014_1_.setInteger("revProgress", revProgress);
|
p_70014_1_.setInteger("revProgress", revProgress);
|
||||||
p_70014_1_.setInteger("radProgress", radProgress);
|
p_70014_1_.setInteger("radProgress", radProgress);
|
||||||
|
|
||||||
}
|
}
|
||||||
public void setScale(int i) {
|
public void setScale(int i) {
|
||||||
|
|
||||||
|
@ -216,7 +261,7 @@ public class EntityShockwave extends Entity {
|
||||||
public int getScale() {
|
public int getScale() {
|
||||||
|
|
||||||
int scale = this.dataManager.get(SCALE);
|
int scale = this.dataManager.get(SCALE);
|
||||||
|
|
||||||
return scale == 0 ? 1 : scale;
|
return scale == 0 ? 1 : scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@ package trinity.entities;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
//import icbm.classic.api.ExplosiveRefs;
|
import icbm.classic.api.refs.ICBMExplosives;
|
||||||
//import icbm.classic.content.blast.BlastEMP;
|
import icbm.classic.content.blast.BlastEMP;
|
||||||
//import icbm.classic.content.blast.threaded.BlastNuclear;
|
// import icbm.classic.content.blast.threaded.BlastNuclear;
|
||||||
import nc.init.NCBlocks;
|
import nc.init.NCBlocks;
|
||||||
import nc.worldgen.biome.NCBiomes;
|
import nc.worldgen.biome.NCBiomes;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -65,6 +65,7 @@ public class EntityThermonuclearBlast extends Entity {
|
||||||
|
|
||||||
public int age = 0;
|
public int age = 0;
|
||||||
public int destructionRange = 0;
|
public int destructionRange = 0;
|
||||||
|
public int falloutIntensity = 0;
|
||||||
//public ExplosionBalefire exp;
|
//public ExplosionBalefire exp;
|
||||||
public int speed = 1;
|
public int speed = 1;
|
||||||
public boolean did = false;
|
public boolean did = false;
|
||||||
|
@ -73,6 +74,7 @@ public class EntityThermonuclearBlast extends Entity {
|
||||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||||
age = nbt.getInteger("age");
|
age = nbt.getInteger("age");
|
||||||
destructionRange = nbt.getInteger("destructionRange");
|
destructionRange = nbt.getInteger("destructionRange");
|
||||||
|
falloutIntensity = nbt.getInteger("falloutIntensity");
|
||||||
speed = nbt.getInteger("speed");
|
speed = nbt.getInteger("speed");
|
||||||
did = nbt.getBoolean("did");
|
did = nbt.getBoolean("did");
|
||||||
|
|
||||||
|
@ -88,6 +90,7 @@ public class EntityThermonuclearBlast extends Entity {
|
||||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||||
nbt.setInteger("age", age);
|
nbt.setInteger("age", age);
|
||||||
nbt.setInteger("destructionRange", destructionRange);
|
nbt.setInteger("destructionRange", destructionRange);
|
||||||
|
nbt.setInteger("falloutIntensity", falloutIntensity);
|
||||||
nbt.setInteger("speed", speed);
|
nbt.setInteger("speed", speed);
|
||||||
nbt.setBoolean("did", did);
|
nbt.setBoolean("did", did);
|
||||||
|
|
||||||
|
@ -108,29 +111,53 @@ public class EntityThermonuclearBlast extends Entity {
|
||||||
{
|
{
|
||||||
//if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
//if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||||
// MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized BF explosion at " + posX + " / " + posY + " / " + posZ + " with strength " + destructionRange + "!");
|
// MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized BF explosion at " + posX + " / " + posY + " / " + posZ + " with strength " + destructionRange + "!");
|
||||||
|
|
||||||
exp = new ExplosionThermonuclear((int)this.posX, (int)this.posY, (int)this.posZ, this.world, this.destructionRange);
|
exp = new ExplosionThermonuclear((int)this.posX, (int)this.posY, (int)this.posZ, this.world, getScale());
|
||||||
|
|
||||||
|
EntityFalloutRain fallout = new EntityFalloutRain(this.world);
|
||||||
|
fallout.posX = this.posX;
|
||||||
|
fallout.posY = this.posY;
|
||||||
|
fallout.posZ = this.posZ;
|
||||||
|
fallout.setScale((int)(this.getScale() * TrinityConfig.fallout_multiplier));
|
||||||
|
fallout.setThermonuclear(true);
|
||||||
|
fallout.setIntensity(this.getIntensity());
|
||||||
|
this.world.spawnEntity(fallout);
|
||||||
|
|
||||||
|
EntityShockwave shock = new EntityShockwave(this.world);
|
||||||
|
shock.posX = this.posX;
|
||||||
|
shock.posY = this.posY;
|
||||||
|
shock.posZ = this.posZ;
|
||||||
|
shock.setScale(this.getScale() * 2);
|
||||||
|
this.world.spawnEntity(shock);
|
||||||
|
|
||||||
|
if(Trinity.ICBMLoaded)
|
||||||
|
{
|
||||||
|
new BlastEMP().setBlastWorld(this.world).setBlastSource(this).setBlastPosition(this.posX, this.posY, this.posZ)
|
||||||
|
.setBlastSize(getScale()*2)
|
||||||
|
.setExplosiveData(ICBMExplosives.EMP)
|
||||||
|
.buildBlast().runBlast();
|
||||||
|
}
|
||||||
|
|
||||||
this.did = true;
|
this.did = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
speed += 1; //increase speed to keep up with expansion
|
speed += 1; //increase speed to keep up with expansion
|
||||||
|
|
||||||
boolean flag = false;
|
boolean shouldDie = false;
|
||||||
|
|
||||||
for(int i = 0; i < this.speed; i++)
|
for(int i = 0; i < this.speed; i++)
|
||||||
{
|
{
|
||||||
flag = exp.update();
|
shouldDie = exp.update();
|
||||||
|
|
||||||
if(flag) {
|
if(shouldDie) {
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rand.nextInt(5) == 0)
|
if(rand.nextInt(5) == 0)
|
||||||
this.world.playSound(null, this.posX, this.posY, this.posZ, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.AMBIENT, 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
this.world.playSound(null, this.posX, this.posY, this.posZ, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.AMBIENT, 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||||
|
|
||||||
if(!flag)
|
if(!shouldDie)
|
||||||
{
|
{
|
||||||
this.world.playSound(null, this.posX, this.posY, this.posZ, SoundEvents.ENTITY_LIGHTNING_THUNDER, SoundCategory.AMBIENT, 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
this.world.playSound(null, this.posX, this.posY, this.posZ, SoundEvents.ENTITY_LIGHTNING_THUNDER, SoundCategory.AMBIENT, 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||||
ExplosionNukeGeneric.dealDamage(this.world, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2);
|
ExplosionNukeGeneric.dealDamage(this.world, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2);
|
||||||
|
@ -338,33 +365,24 @@ public class EntityThermonuclearBlast extends Entity {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
public void setIntensity(int i) {
|
public void setIntensity(int i) {
|
||||||
|
this.falloutIntensity = i;
|
||||||
this.dataManager.set(INTENSITY, Integer.valueOf(i));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIntensity() {
|
public int getIntensity() {
|
||||||
|
|
||||||
int intensity = this.dataManager.get(INTENSITY);
|
int intensity = this.falloutIntensity;
|
||||||
|
|
||||||
return intensity == 0 ? 1 : intensity;
|
return intensity == 0 ? 1 : intensity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScale(int i) {
|
|
||||||
|
|
||||||
this.dataManager.set(SCALE, Integer.valueOf(i));
|
public void setScale(int i) {
|
||||||
/*if(Trinity.ICBMLoaded)
|
this.destructionRange = i;
|
||||||
{
|
|
||||||
new BlastEMP().setBlastWorld(this.world).setBlastSource(this).setBlastPosition(this.posX, this.posY, this.posZ)
|
|
||||||
.setBlastSize(i*2)
|
|
||||||
.setExplosiveData(ExplosiveRefs.EMP)
|
|
||||||
.buildBlast().runBlast();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getScale() {
|
public int getScale() {
|
||||||
|
|
||||||
int scale = this.dataManager.get(SCALE);
|
int scale = this.destructionRange;
|
||||||
|
|
||||||
return scale == 0 ? 1 : scale;
|
return scale == 0 ? 1 : scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ package trinity.init;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import icbm.classic.api.EnumTier;
|
import icbm.classic.api.EnumTier;
|
||||||
import icbm.classic.api.ExplosiveRefs;
|
import icbm.classic.api.refs.ICBMExplosives;
|
||||||
import icbm.classic.content.blast.BlastEMP;
|
import icbm.classic.content.blast.BlastEMP;
|
||||||
import icbm.classic.content.blast.threaded.BlastAntimatter;
|
import icbm.classic.content.blast.threaded.BlastAntimatter;
|
||||||
import icbm.classic.content.blast.threaded.BlastNuclear;
|
import icbm.classic.content.blast.threaded.BlastNuclear;
|
||||||
|
@ -41,7 +41,7 @@ public class ICBMEvents {
|
||||||
Item item = stack.getItem();
|
Item item = stack.getItem();
|
||||||
if(item instanceof ItemBlockExplosive || item instanceof ItemMissile)
|
if(item instanceof ItemBlockExplosive || item instanceof ItemMissile)
|
||||||
{
|
{
|
||||||
if(stack.getItemDamage() == ExplosiveRefs.NUCLEAR.getRegistryID())
|
if(stack.getItemDamage() == ICBMExplosives.NUCLEAR.getRegistryID())
|
||||||
{
|
{
|
||||||
addNukeTooltip(event.getToolTip(), stack);
|
addNukeTooltip(event.getToolTip(), stack);
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ public class ICBMEvents {
|
||||||
// world.setBlockToAir(pos);
|
// world.setBlockToAir(pos);
|
||||||
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.getExplosivePlacedBy()).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.getExplosivePlacedBy()).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
||||||
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
||||||
.setExplosiveData(ExplosiveRefs.EMP)
|
.setExplosiveData(ICBMExplosives.EMP)
|
||||||
.buildBlast().runBlast();
|
.buildBlast().runBlast();
|
||||||
ExplosionNukeGeneric.irradiate(world, (int)position.x, (int)position.y, (int)position.z, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius)*2);
|
ExplosionNukeGeneric.irradiate(world, (int)position.x, (int)position.y, (int)position.z, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius)*2);
|
||||||
world.spawnEntity(EntityNuclearExplosion.statFac(world, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius), position.x, position.y, position.z));
|
world.spawnEntity(EntityNuclearExplosion.statFac(world, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius), position.x, position.y, position.z));
|
||||||
|
@ -98,7 +98,7 @@ public class ICBMEvents {
|
||||||
world.spawnEntity(EntityNuclearExplosion.statFacAntimatter(world, Math.min(TrinityConfig.antimatter_radius,TrinityConfig.max_radius), position.x, position.y, position.z));
|
world.spawnEntity(EntityNuclearExplosion.statFacAntimatter(world, Math.min(TrinityConfig.antimatter_radius,TrinityConfig.max_radius), position.x, position.y, position.z));
|
||||||
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.getExplosivePlacedBy()).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.getExplosivePlacedBy()).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
||||||
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
||||||
.setExplosiveData(ExplosiveRefs.EMP)
|
.setExplosiveData(ICBMExplosives.EMP)
|
||||||
.buildBlast().runBlast();
|
.buildBlast().runBlast();
|
||||||
//System.out.println("If you are seeing this line, this means your blast detector is at least partially working.");
|
//System.out.println("If you are seeing this line, this means your blast detector is at least partially working.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
//import icbm.classic.api.EnumTier;
|
//import icbm.classic.api.EnumTier;
|
||||||
//import icbm.classic.api.ExplosiveRefs;
|
//import icbm.classic.api.refs.ICBMExplosives;
|
||||||
//import icbm.classic.content.blast.BlastEMP;
|
//import icbm.classic.content.blast.BlastEMP;
|
||||||
//import icbm.classic.content.blast.threaded.BlastAntimatter;
|
//import icbm.classic.content.blast.threaded.BlastAntimatter;
|
||||||
//import icbm.classic.content.blast.threaded.BlastNuclear;
|
//import icbm.classic.content.blast.threaded.BlastNuclear;
|
||||||
|
@ -189,7 +189,7 @@ public class ModEvents {
|
||||||
Item item = stack.getItem();
|
Item item = stack.getItem();
|
||||||
if(item instanceof ItemBlockExplosive || item instanceof ItemMissile)
|
if(item instanceof ItemBlockExplosive || item instanceof ItemMissile)
|
||||||
{
|
{
|
||||||
if(stack.getItemDamage() == ExplosiveRefs.NUCLEAR.getRegistryID())
|
if(stack.getItemDamage() == ICBMExplosives.NUCLEAR.getRegistryID())
|
||||||
{
|
{
|
||||||
addNukeTooltip(event.getToolTip(), stack);
|
addNukeTooltip(event.getToolTip(), stack);
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ public class ModEvents {
|
||||||
// exp.world.setBlockToAir(pos);
|
// exp.world.setBlockToAir(pos);
|
||||||
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.exploder).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.exploder).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
||||||
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
||||||
.setExplosiveData(ExplosiveRefs.EMP)
|
.setExplosiveData(ICBMExplosives.EMP)
|
||||||
.buildBlast().runBlast();
|
.buildBlast().runBlast();
|
||||||
ExplosionNukeGeneric.irradiate(exp.world, (int)exp.x, (int)exp.y, (int)exp.z, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius)*2);
|
ExplosionNukeGeneric.irradiate(exp.world, (int)exp.x, (int)exp.y, (int)exp.z, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius)*2);
|
||||||
exp.world.spawnEntity(EntityNuclearExplosion.statFac(exp.world, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius), exp.x + 0.0, exp.y + 0.0, exp.z + 0.0));
|
exp.world.spawnEntity(EntityNuclearExplosion.statFac(exp.world, Math.min(TrinityConfig.icbm_radius,TrinityConfig.max_radius), exp.x + 0.0, exp.y + 0.0, exp.z + 0.0));
|
||||||
|
@ -245,7 +245,7 @@ public class ModEvents {
|
||||||
exp.world.spawnEntity(EntityNuclearExplosion.statFacAntimatter(exp.world, Math.min(TrinityConfig.antimatter_radius,TrinityConfig.max_radius), exp.x + 0.0, exp.y + 0.0, exp.z + 0.0));
|
exp.world.spawnEntity(EntityNuclearExplosion.statFacAntimatter(exp.world, Math.min(TrinityConfig.antimatter_radius,TrinityConfig.max_radius), exp.x + 0.0, exp.y + 0.0, exp.z + 0.0));
|
||||||
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.exploder).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
new BlastEMP().setBlastWorld(event.getWorld()).setBlastSource(exp.exploder).setBlastPosition(((BlastNuclear) exp).location.x(), ((BlastNuclear) exp).location.y(), ((BlastNuclear) exp).location.z())
|
||||||
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
.setBlastSize(((BlastNuclear) exp).getBlastRadius()*2)
|
||||||
.setExplosiveData(ExplosiveRefs.EMP)
|
.setExplosiveData(ICBMExplosives.EMP)
|
||||||
.buildBlast().runBlast();
|
.buildBlast().runBlast();
|
||||||
//System.out.println("If you are seeing this line, this means your blast detector is at least partially working.");
|
//System.out.println("If you are seeing this line, this means your blast detector is at least partially working.");
|
||||||
//}
|
//}
|
||||||
|
|
Loading…
Reference in a new issue