mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
gutted all explosion types except mk3 and mk5, recipe improvements, dust
This commit is contained in:
parent
6c317ceb44
commit
f02232b079
@ -3,7 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -77,7 +77,7 @@ public class ExplosiveCharge extends Block implements IBomb, IDetConnectible {
|
||||
ExplosionLarge.spawnParticles(world, x, y, z, ExplosionLarge.cloudFunction(15));
|
||||
}
|
||||
if(this == ModBlocks.det_nuke) {
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.missileRadius * 0.005F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeBoy;
|
||||
@ -123,7 +123,7 @@ public class NukeBoy extends BlockContainer implements IBomb {
|
||||
tetn.clearSlots();
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.boyRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.boyRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeCloudSmall.statFac(world, x, y, z, BombConfig.boyRadius));
|
||||
}
|
||||
return false;
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.projectile.EntityFallingNuke;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
@ -178,7 +178,7 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
||||
hydro = Math.min(hydro, maxHydro);
|
||||
dirty *= 0.25F;
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)hydro, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).moreFallout((int)dirty));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.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));
|
||||
|
||||
/// NUCLEAR ///
|
||||
@ -187,7 +187,7 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
||||
nuke += tnt / 2;
|
||||
nuke = Math.min(nuke, maxNuke);
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)nuke, xCoord + 0.5, yCoord + 5, zCoord + 0.5).moreFallout((int)dirty));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.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));
|
||||
|
||||
/// NON-NUCLEAR ///
|
||||
@ -195,7 +195,7 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
||||
|
||||
tnt = Math.min(tnt, maxTnt);
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFacNoRad(worldObj, (int)tnt, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFacNoRad(worldObj, (int)tnt, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5));
|
||||
worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFac(worldObj, xCoord + 0.5, yCoord + 5, zCoord + 0.5, tnt));
|
||||
} else if(tnt > 0) {
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeGadget;
|
||||
@ -130,7 +130,7 @@ public class NukeGadget extends BlockContainer implements IBomb {
|
||||
tetn.clearSlots();
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.gadgetRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.gadgetRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.gadgetRadius * 0.005F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeMan;
|
||||
@ -123,7 +123,7 @@ public class NukeMan extends BlockContainer implements IBomb {
|
||||
tetn.clearSlots();
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.manRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.manRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.manRadius * 0.005F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -7,7 +7,7 @@ import com.hbm.config.BombConfig;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudNoShroom;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeMike;
|
||||
@ -132,7 +132,7 @@ public class NukeMike extends BlockContainer implements IBomb {
|
||||
// world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0);
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.mikeRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.mikeRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, r * 0.005F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN2;
|
||||
@ -119,7 +119,7 @@ public class NukeN2 extends BlockContainer implements IBomb {
|
||||
if(!world.isRemote) {
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFacNoRad(world, r, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFacNoRad(world, r, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, r * 0.005F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeTsar;
|
||||
@ -130,7 +130,7 @@ public class NukeTsar extends BlockContainer implements IBomb {
|
||||
// world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0);
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, r, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, r, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, r * 0.005F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.hbm.blocks.test;
|
||||
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionNT;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -4,7 +4,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -26,7 +26,7 @@ public class TestCore extends Block {
|
||||
if(meta >= 6) {
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.missileRadius * 0.005F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -20,7 +20,7 @@ public class BombConfig {
|
||||
public static int nukaRadius = 25;
|
||||
public static int aSchrabRadius = 20;
|
||||
|
||||
public static int mk4 = 1024;
|
||||
public static int mk5 = 50;
|
||||
public static int blastSpeed = 1024;
|
||||
public static int falloutRange = 100;
|
||||
public static int fDelay = 4;
|
||||
@ -83,9 +83,9 @@ public class BombConfig {
|
||||
propBlastSpeed.comment = "Base speed of MK3 system (old and schrabidium) detonations (Blocks / tick)";
|
||||
blastSpeed = propBlastSpeed.getInt();
|
||||
// new explosion speed
|
||||
Property propFalloutRange = config.get(CATEGORY_NUKE, "6.02_blastSpeedNew", 1024);
|
||||
propFalloutRange.comment = "Base speed of MK4 system (new) detonations (Blocks / tick)";
|
||||
mk4 = propFalloutRange.getInt();
|
||||
Property propFalloutRange = config.get(CATEGORY_NUKE, "6.02_mk5BlastTime", 50);
|
||||
propFalloutRange.comment = "Minimum amount of milliseconds per tick allocated for mk5 chunk processing";
|
||||
mk5 = propFalloutRange.getInt();
|
||||
// fallout range
|
||||
Property falloutRangeProp = config.get(CATEGORY_NUKE, "6.03_falloutRange", 100);
|
||||
falloutRangeProp.comment = "Radius of fallout area (base radius * value in percent)";
|
||||
|
||||
@ -25,6 +25,8 @@ public class PowderRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_c4, 4), new Object[] { Fluids.UNSATURATEDS.getDict(1000), KNO.dust(), KEY_TOOL_CHEMISTRYSET });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_semtex_mix, 3), new Object[] { ModItems.solid_fuel, ModItems.cordite, KNO.dust() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_semtex_mix, 1), new Object[] { ModItems.solid_fuel, ModItems.ballistite, KNO.dust() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(Items.clay_ball, 4), new Object[] { KEY_SAND, ModItems.dust, ModItems.dust, Fluids.WATER.getDict(1_000) });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(Items.clay_ball, 4), new Object[] { Blocks.clay }); //clay uncrafting because placing and breaking it isn't worth anyone's time
|
||||
|
||||
//Other
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_steel_dusted, 1), new Object[] { STEEL.ingot(), COAL.dust() });
|
||||
|
||||
@ -29,8 +29,6 @@ public class EntityMappings {
|
||||
public static void writeMappings() {
|
||||
|
||||
addEntity(EntityRocket.class, "entity_rocket", 250);
|
||||
addEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 250);
|
||||
addEntity(EntityNukeExplosionAdvanced.class, "entity_nuke_explosion_advanced", 250);
|
||||
addEntity(EntityGrenadeGeneric.class, "entity_grenade_generic", 250);
|
||||
addEntity(EntityGrenadeStrong.class, "entity_grenade_strong", 250);
|
||||
addEntity(EntityGrenadeFrag.class, "entity_grenade_frag", 250);
|
||||
@ -87,7 +85,6 @@ public class EntityMappings {
|
||||
addEntity(EntityLN2.class, "entity_LN2", 1000);
|
||||
addEntity(EntityNightmareBlast.class, "entity_ominous_bullet", 1000);
|
||||
addEntity(EntityGrenadePulse.class, "entity_grenade_pulse", 1000);
|
||||
addEntity(EntityNukeExplosionPlus.class, "entity_nuke_explosion_advanced", 250);
|
||||
addEntity(EntityLaserBeam.class, "entity_laser_beam", 1000);
|
||||
addEntity(EntityMinerBeam.class, "entity_miner_beam", 1000);
|
||||
addEntity(EntityRubble.class, "entity_rubble", 1000);
|
||||
@ -113,7 +110,6 @@ public class EntityMappings {
|
||||
addEntity(EntityBoxcar.class, "entity_boxcar", 1000);
|
||||
addEntity(EntityMissileTaint.class, "entity_missile_taint", 1000);
|
||||
addEntity(EntityGrenadeGascan.class, "entity_grenade_gascan", 1000);
|
||||
addEntity(EntityNukeExplosionMK4.class, "entity_nuke_mk4", 1000);
|
||||
addEntity(EntityNukeExplosionMK5.class, "entity_nuke_mk5", 1000);
|
||||
addEntity(EntityCloudFleijaRainbow.class, "entity_cloud_rainbow", 1000);
|
||||
addEntity(EntityExplosiveBeam.class, "entity_beam_bomb", 1000);
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -37,17 +36,8 @@ public class EntityDeathBlast extends Entity {
|
||||
|
||||
if(this.ticksExisted >= maxAge && !worldObj.isRemote) {
|
||||
this.setDead();
|
||||
|
||||
/*new ExplosionNT(worldObj, null, posX, posY, posZ, 35).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
new ExplosionNT(worldObj, null, posX + 10, posY, posZ, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
new ExplosionNT(worldObj, null, posX - 10, posY, posZ, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
new ExplosionNT(worldObj, null, posX, posY, posZ + 10, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
new ExplosionNT(worldObj, null, posX, posY, posZ - 10, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
|
||||
for(int k = 1; k < 6; k++)
|
||||
new ExplosionNT(worldObj, null, posX, posY - k * 7, posZ, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode();*/
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFacNoRad(worldObj, 40, posX, posY, posZ).mute());
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFacNoRad(worldObj, 40, posX, posY, posZ).mute());
|
||||
|
||||
int count = 100;
|
||||
for(int i = 0; i < count; i++) {
|
||||
@ -70,24 +60,20 @@ public class EntityDeathBlast extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getBrightnessForRender(float p_70070_1_)
|
||||
{
|
||||
return 15728880;
|
||||
}
|
||||
public int getBrightnessForRender(float p_70070_1_) {
|
||||
return 15728880;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness(float p_70013_1_)
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public float getBrightness(float p_70013_1_) {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 25000;
|
||||
}
|
||||
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return distance < 25000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,124 +0,0 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProviderEnd;
|
||||
|
||||
public class EntityMissileTest extends Entity
|
||||
{
|
||||
/** Used to create the rotation animation when rendering the crystal. */
|
||||
public int innerRotation;
|
||||
public int health;
|
||||
private static final String __OBFID = "CL_00001658";
|
||||
|
||||
public EntityMissileTest(World p_i1698_1_)
|
||||
{
|
||||
super(p_i1698_1_);
|
||||
this.preventEntitySpawning = true;
|
||||
this.setSize(2.0F, 2.0F);
|
||||
this.yOffset = this.height / 2.0F;
|
||||
this.health = 5;
|
||||
this.innerRotation = this.rand.nextInt(100000);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EntityMissileTest(World p_i1699_1_, double p_i1699_2_, double p_i1699_4_, double p_i1699_6_)
|
||||
{
|
||||
this(p_i1699_1_);
|
||||
this.setPosition(p_i1699_2_, p_i1699_4_, p_i1699_6_);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
|
||||
* prevent them from trampling crops
|
||||
*/
|
||||
protected boolean canTriggerWalking()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void entityInit()
|
||||
{
|
||||
this.dataWatcher.addObject(8, Integer.valueOf(this.health));
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
++this.innerRotation;
|
||||
this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
|
||||
int i = MathHelper.floor_double(this.posX);
|
||||
int j = MathHelper.floor_double(this.posY);
|
||||
int k = MathHelper.floor_double(this.posZ);
|
||||
|
||||
if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k) != Blocks.fire)
|
||||
{
|
||||
this.worldObj.setBlock(i, j, k, Blocks.fire);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if other Entities should be prevented from moving through this Entity.
|
||||
*/
|
||||
public boolean canBeCollidedWith()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the entity is attacked.
|
||||
*/
|
||||
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_)
|
||||
{
|
||||
if (this.isEntityInvulnerable())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!this.isDead && !this.worldObj.isRemote)
|
||||
{
|
||||
this.health = 0;
|
||||
|
||||
if (this.health <= 0)
|
||||
{
|
||||
this.setDead();
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.worldObj.createExplosion((Entity)null, this.posX, this.posY, this.posZ, 6.0F, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,118 +0,0 @@
|
||||
/*package com.hbm.entity;
|
||||
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityNukeExplosion extends Entity {
|
||||
|
||||
public int age = 0;
|
||||
public int action = 0;
|
||||
public int rangeOfDestruction = 100;
|
||||
|
||||
public EntityNukeExplosion(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(this.action > this.rangeOfDestruction)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
if(this.age % 10 == 0)
|
||||
{
|
||||
this.action++;
|
||||
ExplosionNukeGeneric.detonateTestBomb(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.action);
|
||||
}
|
||||
|
||||
this.age++;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityNukeExplosion extends Entity {
|
||||
|
||||
public int age = 0;
|
||||
public double action = 0;
|
||||
public int counter = 0;
|
||||
public int destructionRange = 0;
|
||||
public int vaporRange = 0;
|
||||
public int wasteRange = 0;
|
||||
public int damageRange = 0;
|
||||
final int steps = 35;
|
||||
|
||||
public EntityNukeExplosion(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(this.counter >= steps)
|
||||
{
|
||||
this.action = this.wasteRange / 20 * this.counter;
|
||||
ExplosionNukeGeneric.waste(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, (int)this.action);
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
{
|
||||
this.counter++;
|
||||
this.action = this.destructionRange / steps * this.counter;
|
||||
ExplosionNukeGeneric.detonateTestBomb(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, (int)this.action);
|
||||
|
||||
this.action = this.vaporRange / steps * this.counter;
|
||||
ExplosionNukeGeneric.vapor(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, (int)this.action);
|
||||
|
||||
this.action = this.damageRange / steps * this.counter;
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, (int)this.action);
|
||||
|
||||
}
|
||||
|
||||
this.age++;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,156 +0,0 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityNukeExplosionAdvanced extends Entity {
|
||||
|
||||
//public int age = 0;
|
||||
public int destructionRange = 0;
|
||||
//public ExplosionNukeAdvanced exp;
|
||||
//public ExplosionNukeAdvanced wst;
|
||||
//public ExplosionNukeAdvanced vap;
|
||||
//public ExplosionFleija expl;
|
||||
public int speed = 1;
|
||||
public float coefficient = 1;
|
||||
public float coefficient2 = 1;
|
||||
//public boolean did = false;
|
||||
//public boolean did2 = false;
|
||||
public boolean waste = true;
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
/*age = nbt.getInteger("age");
|
||||
destructionRange = nbt.getInteger("destructionRange");
|
||||
speed = nbt.getInteger("speed");
|
||||
coefficient = nbt.getFloat("coefficient");
|
||||
coefficient2 = nbt.getFloat("coefficient2");
|
||||
did = nbt.getBoolean("did");
|
||||
did2 = nbt.getBoolean("did2");
|
||||
waste = nbt.getBoolean("waste");*/
|
||||
|
||||
/*if(this.waste)
|
||||
{
|
||||
exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0);
|
||||
exp.readFromNbt(nbt, "exp_");
|
||||
wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2);
|
||||
wst.readFromNbt(nbt, "wst_");
|
||||
vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1);
|
||||
vap.readFromNbt(nbt, "vap_");
|
||||
} else {
|
||||
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
|
||||
expl.readFromNbt(nbt, "expl_");
|
||||
}
|
||||
|
||||
this.did = true;
|
||||
|
||||
System.out.println(posX);
|
||||
System.out.println(posY);
|
||||
System.out.println(posZ);
|
||||
System.out.println(age);
|
||||
System.out.println(destructionRange);
|
||||
System.out.println(speed);
|
||||
System.out.println(coefficient);
|
||||
System.out.println(coefficient2);
|
||||
System.out.println(did);
|
||||
System.out.println(did2);
|
||||
System.out.println(waste);*/
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
/*nbt.setInteger("age", age);
|
||||
nbt.setInteger("destructionRange", destructionRange);
|
||||
nbt.setInteger("speed", speed);
|
||||
nbt.setFloat("coefficient", coefficient);
|
||||
nbt.setFloat("coefficient2", coefficient2);
|
||||
nbt.setBoolean("did", did);
|
||||
nbt.setBoolean("did2", did2);
|
||||
nbt.setBoolean("waste", waste);*/
|
||||
|
||||
/*if(exp != null)
|
||||
exp.saveToNbt(nbt, "exp_");
|
||||
if(wst != null)
|
||||
wst.saveToNbt(nbt, "wst_");
|
||||
if(vap != null)
|
||||
vap.saveToNbt(nbt, "vap_");
|
||||
if(expl != null)
|
||||
expl.saveToNbt(nbt, "expl_");*/
|
||||
|
||||
}
|
||||
|
||||
public EntityNukeExplosionAdvanced(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
//@Override
|
||||
//public void onUpdate() {
|
||||
/*super.onUpdate();
|
||||
|
||||
if(!this.did)
|
||||
{
|
||||
if(this.waste)
|
||||
{
|
||||
exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0);
|
||||
wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2);
|
||||
vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1);
|
||||
} else {
|
||||
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
|
||||
}
|
||||
|
||||
this.did = true;
|
||||
}
|
||||
|
||||
speed = 5;
|
||||
|
||||
boolean flag = false;
|
||||
boolean flag2 = false;
|
||||
boolean flag3 = false;
|
||||
|
||||
for(int i = 0; i < this.speed; i++)
|
||||
{
|
||||
if(waste) {
|
||||
flag = exp.update();
|
||||
flag2 = wst.update();
|
||||
flag3 = vap.update();
|
||||
|
||||
if(flag3) {
|
||||
//this.setDead();
|
||||
//System.out.println("DIED!!!");
|
||||
}
|
||||
} else {
|
||||
if(expl.update()) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!flag)
|
||||
{
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2);
|
||||
} else {
|
||||
if (!did2 && waste) {
|
||||
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.destructionRange * 1.8) * 10);
|
||||
fallout.posX = this.posX;
|
||||
fallout.posY = this.posY;
|
||||
fallout.posZ = this.posZ;
|
||||
fallout.setScale((int)(this.destructionRange * 1.8));
|
||||
|
||||
this.worldObj.spawnEntityInWorld(fallout);
|
||||
|
||||
did2 = true;
|
||||
}
|
||||
}
|
||||
|
||||
age++;*/
|
||||
//}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,224 +0,0 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.effect.EntityFalloutRain;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.explosion.ExplosionNukeRay;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityNukeExplosionMK4 extends Entity {
|
||||
|
||||
//Strength of the blast
|
||||
public int strength;
|
||||
//How many rays should be created
|
||||
public int count;
|
||||
//How many rays are calculated per tick
|
||||
public int speed;
|
||||
public int length;
|
||||
|
||||
public boolean mute = false;
|
||||
|
||||
public boolean fallout = true;
|
||||
private int falloutAdd = 0;
|
||||
|
||||
ExplosionNukeRay explosion;
|
||||
|
||||
public EntityNukeExplosionMK4(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityNukeExplosionMK4(World world, int strength, int count, int speed, int length) {
|
||||
super(world);
|
||||
this.strength = strength;
|
||||
this.count = count;
|
||||
this.speed = speed;
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(strength == 0) {
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
for(Object player : this.worldObj.playerEntities)
|
||||
((EntityPlayer)player).triggerAchievement(MainRegistry.achManhattan);
|
||||
|
||||
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
|
||||
|
||||
radiate(500_000, this.length * 2);
|
||||
|
||||
/*float radMax = Math.min((float) (length / 2F * Math.pow(length, 1.5) / 35F), 15000);
|
||||
float rad = radMax / 4F;
|
||||
ChunkRadiationManager.proxy.incrementRad(worldObj, (int) Math.floor(posX), (int) Math.floor(posY), (int) Math.floor(posZ), rad);*/
|
||||
}
|
||||
|
||||
if(!mute) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
if(rand.nextInt(5) == 0)
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.length * 2);
|
||||
|
||||
if(explosion == null) {
|
||||
explosion = new ExplosionNukeRay(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.strength, this.count, this.speed, this.length);
|
||||
}
|
||||
|
||||
if(!explosion.isAusf3Complete) {
|
||||
explosion.collectTipMk4_5(speed * 10);
|
||||
} else if(explosion.getStoredSize() > 0) {
|
||||
explosion.processTip(BombConfig.mk4);
|
||||
} else if(fallout) {
|
||||
|
||||
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj);
|
||||
fallout.posX = this.posX;
|
||||
fallout.posY = this.posY;
|
||||
fallout.posZ = this.posZ;
|
||||
fallout.setScale((int)(this.length * 2.5 + falloutAdd) * BombConfig.falloutRange / 100);
|
||||
|
||||
this.worldObj.spawnEntityInWorld(fallout);
|
||||
|
||||
this.setDead();
|
||||
} else {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
private void radiate(float rads, double range) {
|
||||
|
||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(range, range, range));
|
||||
|
||||
for(EntityLivingBase e : entities) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(e.posX - posX, (e.posY + e.getEyeHeight()) - posY, e.posZ - posZ);
|
||||
double len = vec.lengthVector();
|
||||
vec = vec.normalize();
|
||||
|
||||
float res = 0;
|
||||
|
||||
for(int i = 1; i < len; i++) {
|
||||
|
||||
int ix = (int)Math.floor(posX + vec.xCoord * i);
|
||||
int iy = (int)Math.floor(posY + vec.yCoord * i);
|
||||
int iz = (int)Math.floor(posZ + vec.zCoord * i);
|
||||
|
||||
res += worldObj.getBlock(ix, iy, iz).getExplosionResistance(null);
|
||||
}
|
||||
|
||||
if(res < 1)
|
||||
res = 1;
|
||||
|
||||
float eRads = rads;
|
||||
eRads /= (float)res;
|
||||
eRads /= (float)(len * len);
|
||||
|
||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() { }
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
this.ticksExisted = nbt.getInteger("ticksExisted");
|
||||
|
||||
/*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
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("ticksExisted", this.ticksExisted);
|
||||
}
|
||||
|
||||
public static EntityNukeExplosionMK4 statFac(World world, int r, double x, double y, double z) {
|
||||
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
if(r == 0)
|
||||
r = 25;
|
||||
|
||||
r *= 2;
|
||||
|
||||
EntityNukeExplosionMK4 mk4 = new EntityNukeExplosionMK4(world);
|
||||
mk4.strength = (int)(r);
|
||||
mk4.count = (int)(4 * Math.PI * Math.pow(mk4.strength, 2) * 25);
|
||||
mk4.speed = (int)Math.ceil(100000 / mk4.strength);
|
||||
mk4.setPosition(x, y, z);
|
||||
mk4.length = mk4.strength / 2;
|
||||
return mk4;
|
||||
}
|
||||
|
||||
public static EntityNukeExplosionMK4 statFacExperimental(World world, int r, double x, double y, double z) {
|
||||
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized eX explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
r *= 2;
|
||||
|
||||
EntityNukeExplosionMK4 mk4 = new EntityNukeExplosionMK4(world);
|
||||
mk4.strength = (int)(r);
|
||||
mk4.count = (int)(4 * Math.PI * Math.pow(mk4.strength, 2) * 25);
|
||||
mk4.speed = (int)Math.ceil(100000 / mk4.strength);
|
||||
mk4.setPosition(x, y, z);
|
||||
mk4.length = mk4.strength / 2;
|
||||
return mk4;
|
||||
}
|
||||
|
||||
public static EntityNukeExplosionMK4 statFacNoRad(World world, int r, double x, double y, double z) {
|
||||
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized nR explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
r *= 2;
|
||||
|
||||
EntityNukeExplosionMK4 mk4 = new EntityNukeExplosionMK4(world);
|
||||
mk4.strength = (int)(r);
|
||||
mk4.count = (int)(4 * Math.PI * Math.pow(mk4.strength, 2) * 25);
|
||||
mk4.speed = (int)Math.ceil(100000 / mk4.strength);
|
||||
mk4.setPosition(x, y, z);
|
||||
mk4.length = mk4.strength / 2;
|
||||
mk4.fallout = false;
|
||||
return mk4;
|
||||
}
|
||||
|
||||
public EntityNukeExplosionMK4 moreFallout(int fallout) {
|
||||
falloutAdd = fallout;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EntityNukeExplosionMK4 mute() {
|
||||
this.mute = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -8,10 +8,7 @@ import com.hbm.config.BombConfig;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.effect.EntityFalloutRain;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.explosion.ExplosionNukeRay;
|
||||
import com.hbm.explosion.ExplosionNukeRayBatched;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
@ -22,7 +19,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -30,8 +26,6 @@ public class EntityNukeExplosionMK5 extends Entity {
|
||||
|
||||
//Strength of the blast
|
||||
public int strength;
|
||||
//How many rays should be created
|
||||
public int count;
|
||||
//How many rays are calculated per tick
|
||||
public int speed;
|
||||
public int length;
|
||||
@ -47,10 +41,9 @@ public class EntityNukeExplosionMK5 extends Entity {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityNukeExplosionMK5(World world, int strength, int count, int speed, int length) {
|
||||
public EntityNukeExplosionMK5(World world, int strength, int speed, int length) {
|
||||
super(world);
|
||||
this.strength = strength;
|
||||
this.count = count;
|
||||
this.speed = speed;
|
||||
this.length = length;
|
||||
}
|
||||
@ -63,28 +56,24 @@ public class EntityNukeExplosionMK5 extends Entity {
|
||||
return;
|
||||
}
|
||||
|
||||
for(Object player : this.worldObj.playerEntities)
|
||||
for(Object player : this.worldObj.playerEntities) {
|
||||
((EntityPlayer)player).triggerAchievement(MainRegistry.achManhattan);
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
|
||||
|
||||
radiate(500_000, this.length * 2);
|
||||
|
||||
/*float radMax = Math.min((float) (length / 2F * Math.pow(length, 1.5) / 35F), 15000);
|
||||
float rad = radMax / 4F;
|
||||
ChunkRadiationManager.proxy.incrementRad(worldObj, (int) Math.floor(posX), (int) Math.floor(posY), (int) Math.floor(posZ), rad);*/
|
||||
}
|
||||
|
||||
if(!mute) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
if(rand.nextInt(5) == 0)
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
if(rand.nextInt(5) == 0)
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.length * 2);
|
||||
|
||||
if(explosion == null) {
|
||||
explosion = new ExplosionNukeRayBatched(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.strength, this.count, this.speed, this.length);
|
||||
explosion = new ExplosionNukeRayBatched(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.strength, this.speed, this.length);
|
||||
}
|
||||
|
||||
if(!explosion.isAusf3Complete) {
|
||||
@ -92,7 +81,7 @@ public class EntityNukeExplosionMK5 extends Entity {
|
||||
} else if(explosion.perChunk.size() > 0) {
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
while(explosion.perChunk.size() > 0 && System.currentTimeMillis() < start + 50) explosion.processChunk(BombConfig.mk4);
|
||||
while(explosion.perChunk.size() > 0 && System.currentTimeMillis() < start + BombConfig.mk5) explosion.processChunk();
|
||||
|
||||
} else if(fallout) {
|
||||
|
||||
@ -107,7 +96,6 @@ public class EntityNukeExplosionMK5 extends Entity {
|
||||
this.setDead();
|
||||
} else {
|
||||
this.setDead();
|
||||
System.out.println("STOPPING");
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,48 +154,19 @@ public class EntityNukeExplosionMK5 extends Entity {
|
||||
|
||||
r *= 2;
|
||||
|
||||
EntityNukeExplosionMK5 mk4 = new EntityNukeExplosionMK5(world);
|
||||
mk4.strength = (int)(r);
|
||||
mk4.count = (int)(4 * Math.PI * Math.pow(mk4.strength, 2) * 25);
|
||||
mk4.speed = (int)Math.ceil(100000 / mk4.strength);
|
||||
mk4.setPosition(x, y, z);
|
||||
mk4.length = mk4.strength / 2;
|
||||
return mk4;
|
||||
}
|
||||
|
||||
public static EntityNukeExplosionMK5 statFacExperimental(World world, int r, double x, double y, double z) {
|
||||
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized eX explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
r *= 2;
|
||||
|
||||
EntityNukeExplosionMK5 mk4 = new EntityNukeExplosionMK5(world);
|
||||
mk4.strength = (int)(r);
|
||||
mk4.count = (int)(4 * Math.PI * Math.pow(mk4.strength, 2) * 25);
|
||||
mk4.speed = (int)Math.ceil(100000 / mk4.strength);
|
||||
mk4.setPosition(x, y, z);
|
||||
mk4.length = mk4.strength / 2;
|
||||
return mk4;
|
||||
EntityNukeExplosionMK5 mk5 = new EntityNukeExplosionMK5(world);
|
||||
mk5.strength = (int)(r);
|
||||
mk5.speed = (int)Math.ceil(100000 / mk5.strength);
|
||||
mk5.setPosition(x, y, z);
|
||||
mk5.length = mk5.strength / 2;
|
||||
return mk5;
|
||||
}
|
||||
|
||||
public static EntityNukeExplosionMK5 statFacNoRad(World world, int r, double x, double y, double z) {
|
||||
|
||||
System.out.println("STARTING");
|
||||
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized nR explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
r *= 2;
|
||||
|
||||
EntityNukeExplosionMK5 mk4 = new EntityNukeExplosionMK5(world);
|
||||
mk4.strength = (int)(r);
|
||||
mk4.count = (int)(4 * Math.PI * Math.pow(mk4.strength, 2) * 25);
|
||||
mk4.speed = (int)Math.ceil(100000 / mk4.strength);
|
||||
mk4.setPosition(x, y, z);
|
||||
mk4.length = mk4.strength / 2;
|
||||
mk4.fallout = false;
|
||||
return mk4;
|
||||
EntityNukeExplosionMK5 mk5 = statFac(world, r, x, y ,z);
|
||||
mk5.fallout = false;
|
||||
return mk5;
|
||||
}
|
||||
|
||||
public EntityNukeExplosionMK5 moreFallout(int fallout) {
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import com.hbm.explosion.nt.IExplosionLogic;
|
||||
import com.hbm.explosion.nt.Mark5;
|
||||
import com.hbm.explosion.nt.Mark5Ausf2;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@Deprecated
|
||||
public class EntityNukeExplosionNT extends Entity {
|
||||
|
||||
private IExplosionLogic explosion;
|
||||
|
||||
@ -1,107 +0,0 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import com.hbm.entity.effect.EntityFalloutRain;
|
||||
import com.hbm.explosion.ExplosionFleija;
|
||||
import com.hbm.explosion.ExplosionNukeAdvanced;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityNukeExplosionPlus extends Entity {
|
||||
|
||||
public int age = 0;
|
||||
public int destructionRange = 0;
|
||||
public int wasteRange = 0;
|
||||
public ExplosionNukeAdvanced exp;
|
||||
public ExplosionNukeAdvanced wst;
|
||||
public ExplosionNukeAdvanced vap;
|
||||
public ExplosionFleija expl;
|
||||
public int speed = 1;
|
||||
public float coefficient = 1;
|
||||
public float coefficient2 = 1;
|
||||
public boolean did = false;
|
||||
public boolean did2 = false;
|
||||
public boolean waste = true;
|
||||
|
||||
public EntityNukeExplosionPlus(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!this.did)
|
||||
{
|
||||
if(this.waste)
|
||||
{
|
||||
exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0);
|
||||
wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (this.wasteRange), this.coefficient, 2);
|
||||
vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.wasteRange * 1.5), this.coefficient, 1);
|
||||
} else {
|
||||
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
|
||||
}
|
||||
|
||||
this.did = true;
|
||||
}
|
||||
|
||||
speed = 160;
|
||||
|
||||
boolean flag = false;
|
||||
boolean flag3 = false;
|
||||
|
||||
for(int i = 0; i < this.speed; i++)
|
||||
{
|
||||
if(waste) {
|
||||
flag = exp.update();
|
||||
wst.update();
|
||||
flag3 = vap.update();
|
||||
|
||||
if(flag3) {
|
||||
this.setDead();
|
||||
}
|
||||
} else {
|
||||
if(expl.update()) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!flag)
|
||||
{
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.destructionRange * 2);
|
||||
} else {
|
||||
if (!did2 && waste) {
|
||||
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (this.wasteRange) * 10);
|
||||
fallout.posX = this.posX;
|
||||
fallout.posY = this.posY;
|
||||
fallout.posZ = this.posZ;
|
||||
fallout.setScale((this.wasteRange));
|
||||
|
||||
this.worldObj.spawnEntityInWorld(fallout);
|
||||
|
||||
did2 = true;
|
||||
}
|
||||
}
|
||||
|
||||
age++;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,7 @@ package com.hbm.entity.missile;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -36,7 +36,7 @@ public class EntityMIRV extends EntityThrowable {
|
||||
|
||||
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) {
|
||||
if(!this.worldObj.isRemote) {
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.mirvRadius, posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.mirvRadius, posX, posY, posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, BombConfig.mirvRadius * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
|
||||
@ -7,7 +7,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.BlockTaint;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.logic.IChunkLoader;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
@ -326,7 +326,7 @@ public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarD
|
||||
break;
|
||||
case NUCLEAR:
|
||||
case TX:
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int) strength, posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, (int) strength, posX, posY, posZ));
|
||||
EntityNukeCloudSmall nuke = new EntityNukeCloudSmall(worldObj, 1000, strength * 0.005F);
|
||||
nuke.posX = posX;
|
||||
nuke.posY = posY;
|
||||
@ -343,7 +343,7 @@ public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarD
|
||||
worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFacBale(worldObj, posX, posY + 5, posZ, strength * 1.5F, 1000));
|
||||
break;
|
||||
case N2:
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFacNoRad(worldObj, (int) strength, posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFacNoRad(worldObj, (int) strength, posX, posY, posZ));
|
||||
EntityNukeCloudSmall n2 = new EntityNukeCloudSmall(worldObj, 1000, strength * 0.005F);
|
||||
n2.posX = posX;
|
||||
n2.posY = posY;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -24,7 +24,7 @@ public class EntityMissileMirv extends EntityMissileBaseAdvanced {
|
||||
@Override
|
||||
public void onImpact() {
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.missileRadius * 2, posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.missileRadius * 2, posX, posY, posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, BombConfig.missileRadius * 2 * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -24,7 +24,7 @@ public class EntityMissileNuclear extends EntityMissileBaseAdvanced {
|
||||
@Override
|
||||
public void onImpact() {
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.missileRadius, posX, posY, posZ));
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.missileRadius, posX, posY, posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, BombConfig.missileRadius * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.entity.mob;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.mob.ai.EntityAINuclearCreeperSwell;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
@ -317,7 +317,7 @@ public class EntityNuclearCreeper extends EntityMob {
|
||||
worldObj.playSoundEffect(posX, posY + 0.5, posZ, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
|
||||
|
||||
if(flag) {
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, 50, posX, posY, posZ).mute());
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, 50, posX, posY, posZ).mute());
|
||||
} else {
|
||||
ExplosionNukeGeneric.dealDamage(worldObj, posX, posY + 0.5, posZ, 100);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
@ -63,7 +63,7 @@ public class EntityBombletZeta extends EntityThrowable {
|
||||
ExplosionChaos.spawnChlorine(worldObj, this.posX + 0.5F - motionX, this.posY + 0.5F - motionY, this.posZ + 0.5F - motionZ, 75, 2, 0);
|
||||
}
|
||||
if(type == 4) {
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int) (BombConfig.fatmanRadius * 1.5), posX, posY, posZ).mute());
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, (int) (BombConfig.fatmanRadius * 1.5), posX, posY, posZ).mute());
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "muke");
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.blocks.generic.RedBarrel;
|
||||
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
|
||||
import com.hbm.entity.effect.EntityEMPBlast;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
@ -554,7 +554,7 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
}
|
||||
|
||||
if(config.nuke > 0 && !worldObj.isRemote) {
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, config.nuke, posX, posY, posZ).mute());
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, config.nuke, posX, posY, posZ).mute());
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "muke");
|
||||
if(MainRegistry.polaroidID == 11 || rand.nextInt(100) == 0) data.setBoolean("balefire", true);
|
||||
|
||||
@ -10,7 +10,7 @@ import com.hbm.entity.effect.EntityRagingVortex;
|
||||
import com.hbm.entity.effect.EntityVortex;
|
||||
import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
@ -489,7 +489,7 @@ public class EntityModBeam extends Entity implements IProjectile {
|
||||
} else {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.gadgetRadius, posX, posY, posZ));
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.gadgetRadius, posX, posY, posZ));
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFac(worldObj, posX, posY, posZ, BombConfig.gadgetRadius));
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,17 +6,13 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.EnchantmentProtection;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings.GameType;
|
||||
@ -24,7 +20,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.grenade.EntityGrenadeASchrab;
|
||||
import com.hbm.entity.grenade.EntityGrenadeNuclear;
|
||||
@ -35,7 +30,6 @@ import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
@ -45,52 +39,6 @@ public class ExplosionNukeGeneric {
|
||||
|
||||
private final static Random random = new Random();
|
||||
|
||||
public static void detonateTestBomb(World world, int x, int y, int z, int bombStartStrength) {
|
||||
int r = bombStartStrength;
|
||||
int r2 = r * r;
|
||||
int r22 = r2 / 2;
|
||||
for (int xx = -r; xx < r; xx++) {
|
||||
int X = xx + x;
|
||||
int XX = xx * xx;
|
||||
for (int yy = -r; yy < r; yy++) {
|
||||
int Y = yy + y;
|
||||
int YY = XX + yy * yy;
|
||||
for (int zz = -r; zz < r; zz++) {
|
||||
int Z = zz + z;
|
||||
int ZZ = YY + zz * zz;
|
||||
if (r22 >= 25) {
|
||||
if (ZZ < r22 + world.rand.nextInt(r22 / 25)) {
|
||||
if (Y >= y)
|
||||
destruction(world, X, Y, Z);
|
||||
}
|
||||
} else {
|
||||
if (ZZ < r22) {
|
||||
if (Y >= y)
|
||||
destruction(world, X, Y, Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int xx = -r; xx < r; xx++) {
|
||||
int X = xx + x;
|
||||
int XX = xx * xx;
|
||||
for (int yy = -r; yy < r; yy++) {
|
||||
int Y = yy + y;
|
||||
int YY = XX + yy * yy * 50;
|
||||
for (int zz = -r; zz < r; zz++) {
|
||||
int Z = zz + z;
|
||||
int ZZ = YY + zz * zz;
|
||||
if (ZZ < r22/* +world.rand.nextInt(r22) */) {
|
||||
if (Y < y)
|
||||
destruction(world, X, Y, Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void empBlast(World world, int x, int y, int z, int bombStartStrength) {
|
||||
int r = bombStartStrength;
|
||||
int r2 = r * r;
|
||||
@ -173,119 +121,6 @@ public class ExplosionNukeGeneric {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void succ(World world, int x, int y, int z, int radius) {
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
double d5;
|
||||
double d6;
|
||||
double d7;
|
||||
double wat = radius/** 2 */
|
||||
;
|
||||
|
||||
// bombStartStrength *= 2.0F;
|
||||
i = MathHelper.floor_double(x - wat - 1.0D);
|
||||
j = MathHelper.floor_double(x + wat + 1.0D);
|
||||
k = MathHelper.floor_double(y - wat - 1.0D);
|
||||
int i2 = MathHelper.floor_double(y + wat + 1.0D);
|
||||
int l = MathHelper.floor_double(z - wat - 1.0D);
|
||||
int j2 = MathHelper.floor_double(z + wat + 1.0D);
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
|
||||
|
||||
for (int i1 = 0; i1 < list.size(); ++i1) {
|
||||
Entity entity = (Entity) list.get(i1);
|
||||
|
||||
if(entity instanceof EntityBlackHole)
|
||||
continue;
|
||||
|
||||
double d4 = entity.getDistance(x, y, z) / radius;
|
||||
|
||||
if (d4 <= 1.0D) {
|
||||
d5 = entity.posX - x;
|
||||
d6 = entity.posY + entity.getEyeHeight() - y;
|
||||
d7 = entity.posZ - z;
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat && !(entity instanceof EntityPlayer
|
||||
&& ArmorUtil.checkArmor((EntityPlayer) entity, ModItems.euphemium_helmet,
|
||||
ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots))) {
|
||||
d5 /= d9;
|
||||
d6 /= d9;
|
||||
d7 /= d9;
|
||||
|
||||
if (!(entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode)) {
|
||||
double d8 = 0.125 + (random.nextDouble() * 0.25);
|
||||
entity.motionX -= d5 * d8;
|
||||
entity.motionY -= d6 * d8;
|
||||
entity.motionZ -= d7 * d8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean dedify(World world, int x, int y, int z, int radius) {
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
double d5;
|
||||
double d6;
|
||||
double d7;
|
||||
double wat = radius/** 2 */
|
||||
;
|
||||
|
||||
// bombStartStrength *= 2.0F;
|
||||
i = MathHelper.floor_double(x - wat - 1.0D);
|
||||
j = MathHelper.floor_double(x + wat + 1.0D);
|
||||
k = MathHelper.floor_double(y - wat - 1.0D);
|
||||
int i2 = MathHelper.floor_double(y + wat + 1.0D);
|
||||
int l = MathHelper.floor_double(z - wat - 1.0D);
|
||||
int j2 = MathHelper.floor_double(z + wat + 1.0D);
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
|
||||
|
||||
for (int i1 = 0; i1 < list.size(); ++i1) {
|
||||
Entity entity = (Entity) list.get(i1);
|
||||
double d4 = entity.getDistance(x, y, z) / radius;
|
||||
|
||||
if (d4 <= 1.0D) {
|
||||
d5 = entity.posX - x;
|
||||
d6 = entity.posY + entity.getEyeHeight() - y;
|
||||
d7 = entity.posZ - z;
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat && !(entity instanceof EntityPlayer
|
||||
&& ArmorUtil.checkArmor((EntityPlayer) entity, ModItems.euphemium_helmet,
|
||||
ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots))) {
|
||||
d5 /= d9;
|
||||
d6 /= d9;
|
||||
d7 /= d9;
|
||||
// double d10 = (double)world.getBlockDensity(vec3,
|
||||
// entity.boundingBox);
|
||||
// if(d10 > 0) isOccupied = true;
|
||||
|
||||
if(entity instanceof EntityItem && ((EntityItem)entity).getEntityItem().getItem() == ModItems.flame_pony) {
|
||||
entity.setDead();
|
||||
return true;
|
||||
}
|
||||
if(entity instanceof EntityItem && ((EntityItem)entity).getEntityItem().getItem() == ModItems.pellet_antimatter) {
|
||||
entity.setDead();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(entity instanceof EntityPlayerMP
|
||||
&& ((EntityPlayerMP) entity).theItemInWorldManager.getGameType() == GameType.CREATIVE)) {
|
||||
entity.attackEntityFrom(ModDamageSource.blackhole, 1000F);
|
||||
}
|
||||
|
||||
if(!(entity instanceof EntityLivingBase) && !(entity instanceof EntityPlayerMP) && !(entity instanceof EntityBlackHole)) {
|
||||
if(random.nextInt(8) == 0)
|
||||
entity.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void vapor(World world, int x, int y, int z, int bombStartStrength) {
|
||||
int r = bombStartStrength * 2;
|
||||
int r2 = r * r;
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
@ -34,7 +33,7 @@ public class ExplosionNukeRayBatched {
|
||||
|
||||
public boolean isAusf3Complete = false;
|
||||
|
||||
public ExplosionNukeRayBatched(World world, int x, int y, int z, int strength, int count, int speed, int length) {
|
||||
public ExplosionNukeRayBatched(World world, int x, int y, int z, int strength, int speed, int length) {
|
||||
this.world = world;
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
@ -75,7 +74,6 @@ public class ExplosionNukeRayBatched {
|
||||
return Vec3.createVectorHelper(dx, dy, dz);
|
||||
}
|
||||
|
||||
//currently used by mk4
|
||||
public void collectTip(int count) {
|
||||
|
||||
int amountProcessed = 0;
|
||||
@ -145,6 +143,7 @@ public class ExplosionNukeRayBatched {
|
||||
isAusf3Complete = true;
|
||||
}
|
||||
|
||||
/** little comparator for roughly sorting chunks by distance to the center */
|
||||
public class CoordComparator implements Comparator<ChunkCoordIntPair> {
|
||||
|
||||
@Override
|
||||
@ -160,7 +159,7 @@ public class ExplosionNukeRayBatched {
|
||||
}
|
||||
}
|
||||
|
||||
public void processChunk(int count) {
|
||||
public void processChunk() {
|
||||
|
||||
if(this.perChunk.isEmpty()) return;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.explosion;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
@ -53,7 +53,7 @@ public class ExplosionNukeSmall {
|
||||
}
|
||||
|
||||
} else if(size == high) {
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.fatmanRadius, posX, posY, posZ).mute());
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.fatmanRadius, posX, posY, posZ).mute());
|
||||
}
|
||||
|
||||
//radiation is 50 RAD/s in the epicenter, times the radMod
|
||||
|
||||
@ -15,6 +15,7 @@ import net.minecraft.world.World;
|
||||
* Ausf3 will use the same approach as MK4 but with some optimizations regarding setBlock redundancy and getBlock operations
|
||||
* See: docvt7
|
||||
*/
|
||||
@Deprecated
|
||||
public class Mark5Ausf2 implements IExplosionLogic {
|
||||
|
||||
//holds rays after being calculated up to where the blocks get removed
|
||||
|
||||
@ -22,21 +22,21 @@ public class FuelHandler implements IFuelHandler {
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto_triplet_bf)) return single * 2000;
|
||||
if(fuel.getItem().equals(ModItems.rocket_fuel)) return single * 32;
|
||||
|
||||
if(fuel.getItem().equals(ModItems.biomass)) return 800;
|
||||
if(fuel.getItem().equals(ModItems.biomass_compressed)) return 2400;
|
||||
if(fuel.getItem().equals(ModItems.powder_coal)) return 1600;
|
||||
if(fuel.getItem().equals(ModItems.scrap)) return 800;
|
||||
if(fuel.getItem().equals(ModItems.dust)) return 400;
|
||||
if(fuel.getItem().equals(ModItems.powder_fire)) return 6400;
|
||||
if(fuel.getItem().equals(Item.getItemFromBlock(ModBlocks.block_scrap))) return 4000;
|
||||
if(fuel.getItem() == ModItems.lignite) return 1200;
|
||||
if(fuel.getItem() == ModItems.powder_lignite) return 1200;
|
||||
if(fuel.getItem() == ModItems.briquette_lignite) return 1600;
|
||||
if(fuel.getItem() == ModItems.coke) return 3200;
|
||||
if(fuel.getItem() == ModItems.book_guide) return 800;
|
||||
if(fuel.getItem() == ModItems.coal_infernal) return 4800;
|
||||
if(fuel.getItem() == ModItems.crystal_coal) return 6400;
|
||||
if(fuel.getItem() == ModItems.powder_sawdust) return 100;
|
||||
if(fuel.getItem() == ModItems.biomass) return single * 2;
|
||||
if(fuel.getItem() == ModItems.biomass_compressed) return single * 4;
|
||||
if(fuel.getItem() == ModItems.powder_coal) return single * 8;
|
||||
if(fuel.getItem() == ModItems.scrap) return single / 2;
|
||||
if(fuel.getItem() == ModItems.dust) return single / 2;
|
||||
if(fuel.getItem() == Item.getItemFromBlock(ModBlocks.block_scrap)) return single * 2;
|
||||
if(fuel.getItem() == ModItems.powder_fire) return 6400;
|
||||
if(fuel.getItem() == ModItems.lignite) return 1200;
|
||||
if(fuel.getItem() == ModItems.powder_lignite) return 1200;
|
||||
if(fuel.getItem() == ModItems.briquette_lignite) return 1600;
|
||||
if(fuel.getItem() == ModItems.coke) return 3200;
|
||||
if(fuel.getItem() == ModItems.book_guide) return single;
|
||||
if(fuel.getItem() == ModItems.coal_infernal) return 4800;
|
||||
if(fuel.getItem() == ModItems.crystal_coal) return 6400;
|
||||
if(fuel.getItem() == ModItems.powder_sawdust) return single / 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -194,6 +194,13 @@ public class ShredderRecipes extends SerializableRecipe {
|
||||
ShredderRecipes.setRecipe(Items.fermented_spider_eye, new ItemStack(ModItems.powder_poison, 3));
|
||||
ShredderRecipes.setRecipe(Items.poisonous_potato, new ItemStack(ModItems.powder_poison, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.ore_tektite_osmiridium, new ItemStack(ModItems.powder_tektite, 1));
|
||||
ShredderRecipes.setRecipe(Blocks.dirt, new ItemStack(ModItems.dust, 1));
|
||||
|
||||
List<ItemStack> logs = OreDictionary.getOres("logWood");
|
||||
List<ItemStack> planks = OreDictionary.getOres("plankWood");
|
||||
|
||||
for(ItemStack log : logs) ShredderRecipes.setRecipe(log, new ItemStack(ModItems.powder_sawdust, 4));
|
||||
for(ItemStack plank : planks) ShredderRecipes.setRecipe(plank, new ItemStack(ModItems.powder_sawdust, 1));
|
||||
|
||||
List<ItemStack> silicon = OreDictionary.getOres("itemSilicon");
|
||||
if(!silicon.isEmpty()) {
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.items.special;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -48,7 +48,7 @@ public class ItemUnstable extends Item {
|
||||
this.setTimer(stack, this.getTimer(stack) + 1);
|
||||
|
||||
if(this.getTimer(stack) == timer && !world.isRemote) {
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, radius, entity.posX, entity.posY, entity.posZ));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, radius, entity.posX, entity.posY, entity.posZ));
|
||||
world.playSoundAtEntity(entity, "hbm:entity.oldExplosion", 1.0F, 1.0F);
|
||||
entity.attackEntityFrom(ModDamageSource.nuclearBlast, 10000);
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.logic.EntityTomBlast;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeTunneler;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.projectile.EntityRubble;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -151,7 +151,7 @@ public class WeaponSpecial extends ItemSword {
|
||||
|
||||
if(entityPlayer.fallDistance >= 20 && !((EntityPlayer)entityPlayer).capabilities.isCreativeMode) {
|
||||
if(!world.isRemote) {
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, 100, entity.posX, entity.posY, entity.posZ));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, 100, entity.posX, entity.posY, entity.posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, 100 * 0.005F);
|
||||
entity2.posX = entity.posX;
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.projectile.EntityArtilleryShell;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
@ -247,7 +247,7 @@ public class ItemAmmoArty extends Item {
|
||||
/* FULL NUKE */
|
||||
this.itemTypes[NUKE] = new ArtilleryShell("ammo_arty_nuke") {
|
||||
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) {
|
||||
shell.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(shell.worldObj, BombConfig.missileRadius, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord));
|
||||
shell.worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(shell.worldObj, BombConfig.missileRadius, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord));
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(shell.worldObj, 1000, BombConfig.missileRadius * 0.005F);
|
||||
entity2.posX = mop.hitVec.xCoord;
|
||||
entity2.posY = mop.hitVec.yCoord;
|
||||
|
||||
@ -657,7 +657,6 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRagingVortex.class, new RenderBlackHole());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityQuasar.class, new RenderQuasar());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDeathBlast.class, new RenderDeathBlast());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNukeExplosionAdvanced.class, new RenderSnowball(ModItems.energy_ball));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySpear.class, new RenderSpear());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNukeTorex.class, new RenderTorex());
|
||||
//minecarts
|
||||
|
||||
@ -232,7 +232,7 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.pill_herbal), new Object[] { COAL.dust(), Items.poisonous_potato, Items.nether_wart, DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.FOXGLOVE) });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE, 1), new Object[] { Items.string, Items.string, Items.string });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE, 4), new Object[] { "W", "W", "W", 'W', DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.WEED) });
|
||||
addRecipeAuto(new ItemStack(ModItems.rag, 16), new Object[] { "WW", "WW", 'W', DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.WEED) });
|
||||
addShapelessAuto(new ItemStack(Items.string, 3), new Object[] { DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.WEED) });
|
||||
addRecipeAuto(new ItemStack(Items.paper, 3), new Object[] { "SSS", 'S', ModItems.powder_sawdust });
|
||||
|
||||
ItemStack infinity = new ItemStack(Items.enchanted_book);
|
||||
@ -361,12 +361,12 @@ public class CraftingManager {
|
||||
Item[] bricks = new Item[] {Items.brick, Items.netherbrick};
|
||||
|
||||
for(Item brick : bricks) {
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_stone_flat, 1), new Object[] { " R ", "III", "SSS", 'R', REDSTONE.dust(), 'I', brick, 'S', "stone" });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_iron_flat, 1), new Object[] { " R ", "III", "SSS", 'R', REDSTONE.dust(), 'I', brick, 'S', IRON.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_steel_flat, 1), new Object[] { " R ", "III", "SSS", 'R', REDSTONE.dust(), 'I', brick, 'S', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_titanium_flat, 1), new Object[] { " R ", "III", "SSS", 'R', REDSTONE.dust(), 'I', brick, 'S', TI.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_obsidian_flat, 1), new Object[] { " R ", "III", "SSS", 'R', REDSTONE.dust(), 'I', brick, 'S', Blocks.obsidian });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_schrabidium_flat, 1), new Object[] { " R ", "III", "SSS", 'R', REDSTONE.dust(), 'I', brick, 'S', SA326.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_stone_flat, 1), new Object[] { "III", "SSS", 'I', brick, 'S', "stone" });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_iron_flat, 1), new Object[] { "III", "SSS", 'I', brick, 'S', IRON.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_steel_flat, 1), new Object[] { "III", "SSS", 'I', brick, 'S', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_titanium_flat, 1), new Object[] { "III", "SSS", 'I', brick, 'S', TI.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_obsidian_flat, 1), new Object[] { "III", "SSS", 'I', brick, 'S', Blocks.obsidian });
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_schrabidium_flat, 1), new Object[] { "III", "SSS", 'I', brick, 'S', SA326.ingot() });
|
||||
}
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_desh_flat), "DSD", "III", "DSD", 'D', DESH.block(), 'I', BIGMT.ingot(), 'S', ModItems.stamp_schrabidium_flat);
|
||||
@ -374,10 +374,10 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_desh_wire), "DSD", "III", "DSD", 'D', DESH.block(), 'I', BIGMT.ingot(), 'S', ModItems.stamp_schrabidium_wire);
|
||||
addRecipeAuto(new ItemStack(ModItems.stamp_desh_circuit), "DSD", "III", "DSD", 'D', DESH.block(), 'I', BIGMT.ingot(), 'S', ModItems.stamp_schrabidium_circuit);
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_revolver_1, 1), new Object[] { " II", "ICA", "IKW", 'I', IRON.plate(), 'C', CU.ingot(), 'A', AL.ingot(), 'K', ModItems.wire_copper, 'W', ModItems.wire_aluminium });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_revolver_2, 1), new Object[] { " II", "ICA", "IKW", 'I', ALLOY.plate(), 'C', DURA.ingot(), 'A', W.ingot(), 'K', ModItems.bolt_dura_steel, 'W', ModItems.bolt_tungsten });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_1, 1), new Object[] { "ICI", "CMA", "IAM", 'I', IRON.plate(), 'C', CU.ingot(), 'A', AL.ingot(), 'M', ModItems.mechanism_revolver_1 });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_2, 1), new Object[] { "ICI", "CMA", "IAM", 'I', ALLOY.plate(), 'C', DURA.ingot(), 'A', W.ingot(), 'M', ModItems.mechanism_revolver_2 });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_revolver_1, 1), new Object[] { "ICI", "CAC", "ICI", 'I', IRON.plate(), 'C', CU.ingot(), 'A', AL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_revolver_2, 1), new Object[] { "ATA", "TDT", "ATA", 'A', ALLOY.plate(), 'T', W.ingot(), 'D', DURA.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_1, 1), new Object[] { "ICI", "MAM", "ICI", 'I', IRON.plate(), 'C', CU.ingot(), 'A', AL.ingot(), 'M', ModItems.mechanism_revolver_1 });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_2, 1), new Object[] { "ATA", "MDM", "ATA", 'A', ALLOY.plate(), 'T', W.ingot(), 'D', DURA.ingot(), 'M', ModItems.mechanism_revolver_2 });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_1, 1), new Object[] { "TTT", "SSS", "BBI", 'T', TI.plate(), 'S', STEEL.ingot(), 'B', ModItems.bolt_tungsten, 'I', MINGRADE.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_2, 1), new Object[] { "TTT", "SSS", "BBI", 'T', ALLOY.plate(), 'S', ANY_PLASTIC.ingot(), 'B', ModItems.bolt_dura_steel, 'I', DESH.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_special, 1), new Object[] { "PCI", "ISS", "PCI", 'P', ModItems.plate_desh, 'C', ModItems.coil_advanced_alloy, 'I', STAR.ingot(), 'S', ModItems.circuit_targeting_tier3 });
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
@ -256,7 +256,7 @@ public class TileEntityNukeN45 extends TileEntity implements ISidedInventory {
|
||||
ExplosionLarge.explode(world, x, y, z, 15, true, false, false);
|
||||
break;
|
||||
case 4:
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, (int)(BombConfig.missileRadius * 0.75F), x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, (int)(BombConfig.missileRadius * 0.75F), x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.missileRadius * 0.005F * 0.75F);
|
||||
entity2.posX = x;
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionThermo;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
@ -203,7 +203,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
||||
|
||||
if(rand < 2) {
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)(BombConfig.fatmanRadius * 1.5), xCoord + 0.5, yCoord + 1.5, zCoord + 0.5).mute());
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, (int)(BombConfig.fatmanRadius * 1.5), xCoord + 0.5, yCoord + 1.5, zCoord + 0.5).mute());
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "muke");
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Loading…
x
Reference in New Issue
Block a user