mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
cleaned up configs, blacklistable tool abilities
This commit is contained in:
parent
fbf5ba8439
commit
36a03b2d70
@ -3,18 +3,24 @@ package api.hbm.entity;
|
||||
public interface IRadarDetectable {
|
||||
|
||||
public static enum RadarTargetType {
|
||||
MISSILE_TIER0, //tier 0 missile (micro missile assemblies)
|
||||
MISSILE_TIER1, //tier 1 missiles
|
||||
MISSILE_TIER2, //tier 2 missiles
|
||||
MISSILE_TIER3, //tier 3 missiles
|
||||
MISSILE_TIER4, //tier 4 missiles (nuclear, thermo, doomsday)
|
||||
MISSILE_10, //size 10 custom missiles
|
||||
MISSILE_10_15, //size 10/15 custom missiles
|
||||
MISSILE_15, //size 15 custom missiles
|
||||
MISSILE_15_20, //size 15/20 custom missiles
|
||||
MISSILE_20, //size 20 custom missiles
|
||||
MISSILE_AB, //anti ballistic missile
|
||||
PLAYER, //airborne players
|
||||
MISSILE_TIER0("Micro Missile"), //tier 0 missile (micro missile assemblies)
|
||||
MISSILE_TIER1("Tier 1 Missile"), //tier 1 missiles
|
||||
MISSILE_TIER2("Tier 2 Missile"), //tier 2 missiles
|
||||
MISSILE_TIER3("Tier 3 Missile"), //tier 3 missiles
|
||||
MISSILE_TIER4("Tier 4 Missile"), //tier 4 missiles (nuclear, thermo, doomsday)
|
||||
MISSILE_10("Size 10 Custom Missile"), //size 10 custom missiles
|
||||
MISSILE_10_15("Size 10/15 Custom Missile"), //size 10/15 custom missiles
|
||||
MISSILE_15("Size 15 Custom Missile"), //size 15 custom missiles
|
||||
MISSILE_15_20("Size 15/20 Custom Missile"), //size 15/20 custom missiles
|
||||
MISSILE_20("Size 20 Custom Missile"), //size 20 custom missiles
|
||||
MISSILE_AB("Anti-Ballistic Missile"), //anti ballistic missile
|
||||
PLAYER("Player"); //airborne players
|
||||
|
||||
public String name;
|
||||
|
||||
private RadarTargetType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public RadarTargetType getTargetType();
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -103,7 +104,7 @@ public class BlockCrashedBomb extends BlockContainer implements IBomb {
|
||||
bf.posX = x;
|
||||
bf.posY = y;
|
||||
bf.posZ = z;
|
||||
bf.destructionRange = (int) (MainRegistry.fatmanRadius * 1.25);
|
||||
bf.destructionRange = (int) (BombConfig.fatmanRadius * 1.25);
|
||||
world.spawnEntityInWorld(bf);
|
||||
ExplosionParticleB.spawnMush(world, x, y, z);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -36,7 +37,7 @@ public class CheaterVirus extends Block {
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(MainRegistry.enableVirus){
|
||||
if(GeneralConfig.enableVirus){
|
||||
if(world.getBlock(x + 1, y, z) != ModBlocks.cheater_virus && world.getBlock(x + 1, y, z) != Blocks.air && world.getBlock(x + 1, y, z) != ModBlocks.cheater_virus) {
|
||||
world.setBlock(x + 1, y, z, ModBlocks.cheater_virus);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -23,7 +24,7 @@ public class CheaterVirusSeed extends Block {
|
||||
|
||||
super.breakBlock(world, x, y, z, block, i);
|
||||
|
||||
if(!MainRegistry.enableVirus)
|
||||
if(!GeneralConfig.enableVirus)
|
||||
return;
|
||||
|
||||
if((world.getBlock(x + 1, y, z) == Blocks.air || world.getBlock(x + 1, y, z) == ModBlocks.cheater_virus || world.getBlock(x + 1, y, z) == ModBlocks.cheater_virus_seed) &&
|
||||
@ -42,7 +43,7 @@ public class CheaterVirusSeed extends Block {
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!MainRegistry.enableVirus)
|
||||
if(!GeneralConfig.enableVirus)
|
||||
return;
|
||||
|
||||
if((world.getBlock(x + 1, y, z) == Blocks.air || world.getBlock(x + 1, y, z) == ModBlocks.cheater_virus || world.getBlock(x + 1, y, z) == ModBlocks.cheater_virus_seed) &&
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -20,7 +21,7 @@ public class CrystalVirus extends Block {
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(MainRegistry.enableVirus) {
|
||||
if(GeneralConfig.enableVirus) {
|
||||
if(world.getBlock(x + 1, y, z) != ModBlocks.crystal_virus && world.getBlock(x + 1, y, z) != Blocks.air && world.getBlock(x + 1, y, z) != ModBlocks.crystal_hardened && world.getBlock(x + 1, y, z) != ModBlocks.crystal_pulsar) {
|
||||
world.setBlock(x + 1, y, z, ModBlocks.crystal_virus);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
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.explosion.ExplosionLarge;
|
||||
@ -82,9 +83,9 @@ public class DetCord extends Block implements IBomb {
|
||||
ExplosionLarge.explode(world, x, y, z, 15, true, false, false);
|
||||
}
|
||||
if(this == ModBlocks.det_nuke) {
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, MainRegistry.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, MainRegistry.missileRadius * 0.005F);
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.missileRadius * 0.005F);
|
||||
entity2.posX = x;
|
||||
entity2.posY = y;
|
||||
entity2.posZ = z;
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
@ -175,7 +176,7 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
}
|
||||
if (this == ModBlocks.mine_fat) {
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, MainRegistry.fatmanRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.fatmanRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
if(MainRegistry.polaroidID == 11) {
|
||||
ExplosionParticleB.spawnMush(world, x + 0.5, y - 3, z + 0.5);
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Random;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.missile.EntityCarrier;
|
||||
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||
import com.hbm.entity.missile.EntityMissileBHole;
|
||||
@ -225,7 +226,7 @@ public class LaunchPad extends BlockContainer implements IBomb {
|
||||
xCoord += 1;
|
||||
}
|
||||
|
||||
if(MainRegistry.enableExtendedLogging)
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[MISSILE] Tried to launch missile at " + x + " / " + y + " / " + z + " to " + xCoord + " / " + zCoord + "!");
|
||||
|
||||
if(entity.slots[0] != null && entity.slots[0].getItem() == ModItems.missile_generic && entity.power >= 75000)
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudNoShroom;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
@ -30,7 +31,6 @@ public class NukeBoy extends BlockContainer implements IBomb {
|
||||
|
||||
private static boolean keepInventory = false;
|
||||
private final static Random field_149933_a = new Random();
|
||||
private boolean isExploding = false;
|
||||
|
||||
public NukeBoy(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -126,39 +126,12 @@ public class NukeBoy extends BlockContainer implements IBomb {
|
||||
|
||||
public boolean igniteTestBomb(World world, int x, int y, int z) {
|
||||
if (!world.isRemote) {
|
||||
tetn.clearSlots();
|
||||
// world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns
|
||||
// a huge explosion particle
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); // x,y,z,sound,volume,pitch
|
||||
/*
|
||||
* ExplosionNukeGeneric.detonateTestBomb(world, x, y, z, 120);
|
||||
* ExplosionNukeGeneric.vapor(world, x, y, z, 200);
|
||||
* ExplosionNukeGeneric.waste(world, x, y, z, 150);
|
||||
* ExplosionNukeGeneric.dealDamage(world, x, y, z, 150);
|
||||
*/
|
||||
|
||||
/*
|
||||
* EntityNukeExplosion entity = new EntityNukeExplosion(world);
|
||||
* entity.posX = x; entity.posY = y; entity.posZ = z;
|
||||
* entity.destructionRange = 120; entity.vaporRange = 200;
|
||||
* entity.wasteRange = 150; entity.damageRange = 150;
|
||||
*
|
||||
* world.spawnEntityInWorld(entity);
|
||||
*/
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, MainRegistry.boyRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
// ExplosionNukeAdvanced.mush(world, x, y, z);
|
||||
|
||||
if (MainRegistry.enableNukeClouds) {
|
||||
world.spawnEntityInWorld(EntityNukeCloudSmall.statFac(world, x, y, z, MainRegistry.boyRadius));
|
||||
} else {
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudNoShroom(world, 3000);
|
||||
entity2.posX = x;
|
||||
entity2.posY = y - 11;
|
||||
entity2.posZ = z;
|
||||
world.spawnEntityInWorld(entity2);
|
||||
}
|
||||
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(EntityNukeCloudSmall.statFac(world, x, y, z, BombConfig.boyRadius));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
||||
@ -155,7 +156,7 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
||||
EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(worldObj);
|
||||
entity.setPosition(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5);
|
||||
entity.destructionRange = (int) schrab;
|
||||
entity.speed = MainRegistry.blastSpeed;
|
||||
entity.speed = BombConfig.blastSpeed;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
worldObj.spawnEntityInWorld(entity);
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -31,7 +32,6 @@ public class NukeFleija extends BlockContainer implements IBomb {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory = false;
|
||||
private Map field_77288_k = new HashMap();
|
||||
|
||||
public NukeFleija(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -129,7 +129,7 @@ public class NukeFleija extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.fleijaRadius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.fleijaRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -146,7 +146,7 @@ public class NukeFleija extends BlockContainer implements IBomb {
|
||||
entity.posY = y;
|
||||
entity.posZ = z;
|
||||
entity.destructionRange = r;
|
||||
entity.speed = MainRegistry.blastSpeed;
|
||||
entity.speed = BombConfig.blastSpeed;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
@ -209,7 +209,7 @@ public class NukeFleija extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.fleijaRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.fleijaRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.effect.EntityNukeCloudNoShroom;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -32,8 +30,6 @@ public class NukeGadget extends BlockContainer implements IBomb {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory = false;
|
||||
private Map field_77288_k = new HashMap();
|
||||
private boolean isExploding = false;
|
||||
|
||||
public NukeGadget(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -130,159 +126,22 @@ public class NukeGadget extends BlockContainer implements IBomb {
|
||||
|
||||
public boolean igniteTestBomb(World world, int x, int y, int z) {
|
||||
if (!world.isRemote) {
|
||||
/*
|
||||
* dealDamage(world,x,y,z, 30); detonateTestBomb(world,x,y,z, 30);
|
||||
* vapor(world,x,y,z, 30); dealDamage(world,x,y,z, 60);
|
||||
* detonateTestBomb(world,x,y,z, 60); vapor(world,x,y,z, 60);
|
||||
* dealDamage(world,x,y,z, 90); detonateTestBomb(world,x,y,z, 90);
|
||||
* vapor(world,x,y,z, 90); dealDamage(world,x,y,z, 120);
|
||||
* detonateTestBomb(world,x,y,z, 120); vapor(world,x,y,z, 120);
|
||||
*/
|
||||
|
||||
tetn.clearSlots();
|
||||
// world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns
|
||||
// a huge explosion particle
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); // x,y,z,sound,volume,pitch
|
||||
/*
|
||||
* ExplosionNukeGeneric.detonateTestBomb(world, x, y, z, 150);
|
||||
* ExplosionNukeGeneric.vapor(world, x, y, z, 170);
|
||||
* ExplosionNukeGeneric.waste(world, x, y, z, 225);
|
||||
* ExplosionNukeGeneric.dealDamage(world, x, y, z, 170);
|
||||
*/
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
/*
|
||||
* EntityNukeExplosion entity = new EntityNukeExplosion(world);
|
||||
* entity.posX = x; entity.posY = y; entity.posZ = z;
|
||||
* entity.destructionRange = 150; entity.vaporRange = 200;
|
||||
* entity.wasteRange = 225; entity.damageRange = 170;
|
||||
*
|
||||
* world.spawnEntityInWorld(entity);
|
||||
*/
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, MainRegistry.gadgetRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
// ExplosionNukeAdvanced.mush(world, x, y, z);
|
||||
|
||||
if (MainRegistry.enableNukeClouds) {
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, MainRegistry.gadgetRadius * 0.005F);
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.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;
|
||||
entity2.posY = y;
|
||||
entity2.posZ = z;
|
||||
world.spawnEntityInWorld(entity2);
|
||||
} else {
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudNoShroom(world, 1000);
|
||||
entity2.posX = x;
|
||||
entity2.posY = y - 15;
|
||||
entity2.posZ = z;
|
||||
world.spawnEntityInWorld(entity2);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* public void detonateTestBomb(World world, int x, int y, int z, int
|
||||
* bombStartStrength) { //Rodol's awesome destruction code int r =
|
||||
* bombStartStrength; //radius of explosion (change this to bigger numbers
|
||||
* for more epicness) int r2 = r*r; //radius^2, for faster distance checks.
|
||||
* (No sqrt needed for pythagoras) int r22 = r2/2; //half of r^2,
|
||||
* calculations outside the loop only get called once. Always pull out as
|
||||
* many things from the loop as possible. for (int xx = -r; xx < r; xx++) {
|
||||
* int X = xx+x; //x coordinate we are working on int XX = xx*xx; //more
|
||||
* stuff for a faster distance check for (int yy = -r; yy < r; yy++) { int Y
|
||||
* = yy+y; //y coord int YY = XX+yy*yy; for (int zz = -r; zz < r; zz++) {
|
||||
* int Z = zz+z; //z coord int ZZ = YY+zz*zz; //final= x*x+y*y+z*z. remind
|
||||
* you of anything? if (ZZ<r22+world.rand.nextInt(r22/25)) //and the
|
||||
* distance check. x*x+y*y+z*z < radius^2 is the same as sqrt(x*x+y*y+z*z) <
|
||||
* radius, the distance formula. Here we use a random number between r^2 and
|
||||
* r^2/2 for a jagged explosion. { //but since sqrt is slow we optimize the
|
||||
* algorithm for super fast explosions! Yay! //faster explosions means more
|
||||
* explosions per second! if(Y >= y) destruction(world, X, Y, Z); //destroy
|
||||
* the block if its within the radius ...and if it's not bedrock :D } //you
|
||||
* can change the if statement to if (ZZ<r2) for a smoother explosion
|
||||
* crater. } } }
|
||||
*
|
||||
* 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); } } } }
|
||||
*
|
||||
*
|
||||
*
|
||||
* //Particle creation: coming soon!
|
||||
*
|
||||
* //spawnMush(world, x, y, z);
|
||||
*
|
||||
* }
|
||||
*
|
||||
* public void dealDamage(World world, int x, int y, int z, int
|
||||
* bombStartStrength) { //BlockTNT.class Damage code float f =
|
||||
* bombStartStrength; HashSet hashset = new HashSet(); int i; int j; int
|
||||
* k; double d5; double d6; double d7; double wat = bombStartStrength*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((double)i, (double)k, (double)l,
|
||||
* (double)j, (double)i2, (double)j2)); Vec3 vec3 =
|
||||
* Vec3.createVectorHelper(x, y, z);
|
||||
*
|
||||
* for (int i1 = 0; i1 < list.size(); ++i1) { Entity entity =
|
||||
* (Entity)list.get(i1); double d4 = entity.getDistance(x, y, z) /
|
||||
* (double)bombStartStrength;
|
||||
*
|
||||
* if (d4 <= 1.0D) { d5 = entity.posX - x; d6 = entity.posY +
|
||||
* (double)entity.getEyeHeight() - y; d7 = entity.posZ - z; double d9 =
|
||||
* (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 <
|
||||
* wat) { d5 /= d9; d6 /= d9; d7 /= d9; double d10 =
|
||||
* (double)world.getBlockDensity(vec3, entity.boundingBox); double d11 =
|
||||
* (1.0D - d4);// * d10; entity.attackEntityFrom(DamageSource.generic,
|
||||
* (float)((int)((d11 * d11 + d11) / 2.0D * 8.0D *
|
||||
* (double)bombStartStrength + 1.0D))); double d8 =
|
||||
* EnchantmentProtection.func_92092_a(entity, d11); entity.motionX += d5
|
||||
* * d8; entity.motionY += d6 * d8; entity.motionZ += d7 * d8;
|
||||
*
|
||||
* if (entity instanceof EntityPlayer) {
|
||||
* this.field_77288_k.put((EntityPlayer)entity,
|
||||
* Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); } } /* if(d9
|
||||
* < bombStartStrength) { d5 /= d9; d6 /= d9; d7 /= d9; double d10 =
|
||||
* (double)world.getBlockDensity(vec3, entity.boundingBox); double d11 =
|
||||
* (1.0D - d4);// * d10; if (!entity.worldObj.isRemote) {
|
||||
* entity.setDead(); entity = null; }/* double d8 =
|
||||
* EnchantmentProtection.func_92092_a(entity, d11); entity.motionX += d5
|
||||
* * d8; entity.motionY += d6 * d8; entity.motionZ += d7 * d8;
|
||||
*
|
||||
* if (entity instanceof EntityPlayer) {
|
||||
* this.field_77288_k.put((EntityPlayer)entity,
|
||||
* Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); } }
|
||||
*//*
|
||||
* } }
|
||||
*
|
||||
* bombStartStrength = (int)f; }
|
||||
*
|
||||
* public void vapor(World world, int x, int y, int z, int
|
||||
* bombStartStrength) { int r = bombStartStrength * 2; 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 (ZZ<r22) vaporDest(world, X, Y, Z); } } } }
|
||||
*
|
||||
* public void spawnMush(World world, int x, int y, int z) { for(int m =
|
||||
* 0; m < 10; m++) { //world.spawnParticle("largesmoke", x, y + m, z, 0,
|
||||
* 0, 0); world.setBlock(x, y + m, z, ModBlocks.event_tester, 0, 0); }
|
||||
* for(int m = -4; m < 6; m++) { for(int n = -6; n < 4; n++) {
|
||||
* //world.spawnParticle("largesmoke", x + m, y + 10, z + n, 0, 0, 0);
|
||||
* world.setBlock(x + m, y + 10, z + n, ModBlocks.event_tester, 0, 0); }
|
||||
* } }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
@ -316,38 +175,6 @@ public class NukeGadget extends BlockContainer implements IBomb {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* public void destruction(World world, int x, int y, int z) { int rand;
|
||||
*
|
||||
* if(world.getBlock(x, y, z) != Blocks.bedrock && world.getBlock(x, y, z)
|
||||
* != ModBlocks.reinforced_brick && world.getBlock(x, y, z) !=
|
||||
* ModBlocks.reinforced_glass && world.getBlock(x, y, z) !=
|
||||
* ModBlocks.reinforced_light && world.getBlock(x, y, z) !=
|
||||
* ModBlocks.reinforced_sand && world.getBlock(x, y, z) !=
|
||||
* ModBlocks.reinforced_lamp_off && world.getBlock(x, y, z) !=
|
||||
* ModBlocks.reinforced_lamp_on) { if(world.getBlock(x, y, z) ==
|
||||
* ModBlocks.brick_concrete) { rand = field_149933_a.nextInt(8); if(rand ==
|
||||
* 0) { world.setBlock(x, y, z, Blocks.air, 0, 3); } }else
|
||||
* if(world.getBlock(x, y, z) == ModBlocks.brick_light) { rand =
|
||||
* field_149933_a.nextInt(2); if(rand == 0) { world.setBlock(x, y, z,
|
||||
* Blocks.air, 0, 3); } }else if(world.getBlock(x, y, z) ==
|
||||
* ModBlocks.brick_obsidian) { rand = field_149933_a.nextInt(20); if(rand ==
|
||||
* 0) { world.setBlock(x, y, z, Blocks.air, 0, 3); } }else{
|
||||
* world.setBlock(x, y, z, Blocks.air, 0, 3); } } }
|
||||
*
|
||||
* public void vaporDest(World world, int x, int y, int z) {
|
||||
* if(world.getBlock(x, y, z) == Blocks.water || world.getBlock(x, y, z) ==
|
||||
* Blocks.flowing_water || world.getBlock(x, y, z) == Blocks.tallgrass ||
|
||||
* world.getBlock(x, y, z) == Blocks.leaves || world.getBlock(x, y, z) ==
|
||||
* Blocks.leaves2 || world.getBlock(x, y, z) == Blocks.double_plant ||
|
||||
* world.getBlock(x, y, z) == Blocks.cactus) { world.setBlock(x, y, z,
|
||||
* Blocks.air); }
|
||||
*
|
||||
* if(world.getBlock(x, y, z).isFlammable(world, x, y, z, ForgeDirection.UP)
|
||||
* && world.getBlock(x, y + 1, z) == Blocks.air) { world.setBlock(x, y + 1,
|
||||
* z, Blocks.fire); } }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void explode(World world, int x, int y, int z) {
|
||||
TileEntityNukeGadget entity = (TileEntityNukeGadget) world.getTileEntity(x, y, z);
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.effect.EntityNukeCloudNoShroom;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -32,7 +30,6 @@ public class NukeMan extends BlockContainer implements IBomb {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory = false;
|
||||
private Map field_77288_k = new HashMap();
|
||||
|
||||
public NukeMan(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -138,238 +135,22 @@ public class NukeMan extends BlockContainer implements IBomb {
|
||||
|
||||
public boolean igniteTestBomb(World world, int x, int y, int z)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
/*
|
||||
dealDamage(world,x,y,z, 30);
|
||||
detonateTestBomb(world,x,y,z, 30);
|
||||
vapor(world,x,y,z, 30);
|
||||
dealDamage(world,x,y,z, 60);
|
||||
detonateTestBomb(world,x,y,z, 60);
|
||||
vapor(world,x,y,z, 60);
|
||||
dealDamage(world,x,y,z, 90);
|
||||
detonateTestBomb(world,x,y,z, 90);
|
||||
vapor(world,x,y,z, 90);
|
||||
dealDamage(world,x,y,z, 120);
|
||||
detonateTestBomb(world,x,y,z, 120);
|
||||
vapor(world,x,y,z, 120);
|
||||
*/
|
||||
tetn.clearSlots();
|
||||
//world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns a huge explosion particle
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); //x,y,z,sound,volume,pitch
|
||||
/*ExplosionNukeGeneric.detonateTestBomb(world, x, y, z, 175);
|
||||
ExplosionNukeGeneric.vapor(world, x, y, z, 195);
|
||||
ExplosionNukeGeneric.waste(world, x, y, z, 250);
|
||||
ExplosionNukeGeneric.dealDamage(world, x, y, z, 195);*/
|
||||
if(!world.isRemote) {
|
||||
tetn.clearSlots();
|
||||
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
/*EntityNukeExplosion entity = new EntityNukeExplosion(world);
|
||||
entity.posX = x;
|
||||
entity.posY = y;
|
||||
entity.posZ = z;
|
||||
entity.destructionRange = 175;
|
||||
entity.vaporRange = 195;
|
||||
entity.wasteRange = 250;
|
||||
entity.damageRange = 195;
|
||||
|
||||
world.spawnEntityInWorld(entity);*/
|
||||
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, MainRegistry.manRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
//ExplosionNukeAdvanced.mush(world, x, y, z);
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.manRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
if (MainRegistry.enableNukeClouds) {
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, MainRegistry.manRadius * 0.005F);
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.manRadius * 0.005F);
|
||||
entity2.posX = x;
|
||||
entity2.posY = y;
|
||||
entity2.posZ = z;
|
||||
world.spawnEntityInWorld(entity2);
|
||||
} else {
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudNoShroom(world, 1000);
|
||||
entity2.posX = x;
|
||||
entity2.posY = y - 17;
|
||||
entity2.posZ = z;
|
||||
world.spawnEntityInWorld(entity2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*public void detonateTestBomb(World world, int x, int y, int z, int bombStartStrength)
|
||||
{
|
||||
//Rodol's awesome destruction code
|
||||
int r = bombStartStrength; //radius of explosion (change this to bigger numbers for more epicness)
|
||||
int r2 = r*r; //radius^2, for faster distance checks. (No sqrt needed for pythagoras)
|
||||
int r22 = r2/2; //half of r^2, calculations outside the loop only get called once. Always pull out as many things from the loop as possible.
|
||||
for (int xx = -r; xx < r; xx++)
|
||||
{
|
||||
int X = xx+x; //x coordinate we are working on
|
||||
int XX = xx*xx; //more stuff for a faster distance check
|
||||
for (int yy = -r; yy < r; yy++)
|
||||
{
|
||||
int Y = yy+y; //y coord
|
||||
int YY = XX+yy*yy;
|
||||
for (int zz = -r; zz < r; zz++)
|
||||
{
|
||||
int Z = zz+z; //z coord
|
||||
int ZZ = YY+zz*zz; //final= x*x+y*y+z*z. remind you of anything?
|
||||
if (ZZ<r22+world.rand.nextInt(r22/25)) //and the distance check. x*x+y*y+z*z < radius^2 is the same as sqrt(x*x+y*y+z*z) < radius, the distance formula. Here we use a random number between r^2 and r^2/2 for a jagged explosion.
|
||||
{ //but since sqrt is slow we optimize the algorithm for super fast explosions! Yay!
|
||||
//faster explosions means more explosions per second!
|
||||
if(Y >= y) destruction(world, X, Y, Z); //destroy the block if its within the radius ...and if it's not bedrock :D
|
||||
} //you can change the if statement to if (ZZ<r2) for a smoother explosion crater.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Particle creation: coming soon!
|
||||
|
||||
//spawnMush(world, x, y, z);
|
||||
|
||||
}
|
||||
|
||||
public void dealDamage(World world, int x, int y, int z, int bombStartStrength) {
|
||||
//BlockTNT.class Damage code
|
||||
float f = bombStartStrength;
|
||||
HashSet hashset = new HashSet();
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
double d5;
|
||||
double d6;
|
||||
double d7;
|
||||
double wat = bombStartStrength*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((double)i, (double)k, (double)l, (double)j, (double)i2, (double)j2));
|
||||
Vec3 vec3 = Vec3.createVectorHelper(x, y, z);
|
||||
|
||||
for (int i1 = 0; i1 < list.size(); ++i1)
|
||||
{
|
||||
Entity entity = (Entity)list.get(i1);
|
||||
double d4 = entity.getDistance(x, y, z) / (double)bombStartStrength;
|
||||
|
||||
if (d4 <= 1.0D)
|
||||
{
|
||||
d5 = entity.posX - x;
|
||||
d6 = entity.posY + (double)entity.getEyeHeight() - y;
|
||||
d7 = entity.posZ - z;
|
||||
double d9 = (double)MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat)
|
||||
{
|
||||
d5 /= d9;
|
||||
d6 /= d9;
|
||||
d7 /= d9;
|
||||
double d10 = (double)world.getBlockDensity(vec3, entity.boundingBox);
|
||||
double d11 = (1.0D - d4);// * d10;
|
||||
entity.attackEntityFrom(DamageSource.generic, (float)((int)((d11 * d11 + d11) / 2.0D * 8.0D * (double)bombStartStrength + 1.0D)));
|
||||
double d8 = EnchantmentProtection.func_92092_a(entity, d11);
|
||||
entity.motionX += d5 * d8;
|
||||
entity.motionY += d6 * d8;
|
||||
entity.motionZ += d7 * d8;
|
||||
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
this.field_77288_k.put((EntityPlayer)entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11));
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(d9 < bombStartStrength)
|
||||
{
|
||||
d5 /= d9;
|
||||
d6 /= d9;
|
||||
d7 /= d9;
|
||||
double d10 = (double)world.getBlockDensity(vec3, entity.boundingBox);
|
||||
double d11 = (1.0D - d4);// * d10;
|
||||
if (!entity.worldObj.isRemote)
|
||||
{
|
||||
entity.setDead();
|
||||
entity = null;
|
||||
}/*
|
||||
double d8 = EnchantmentProtection.func_92092_a(entity, d11);
|
||||
entity.motionX += d5 * d8;
|
||||
entity.motionY += d6 * d8;
|
||||
entity.motionZ += d7 * d8;
|
||||
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
this.field_77288_k.put((EntityPlayer)entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11));
|
||||
}
|
||||
}*//*
|
||||
}
|
||||
}
|
||||
|
||||
bombStartStrength = (int)f;
|
||||
}
|
||||
|
||||
public void vapor(World world, int x, int y, int z, int bombStartStrength) {
|
||||
int r = bombStartStrength * 2;
|
||||
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 (ZZ<r22)
|
||||
vaporDest(world, X, Y, Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void spawnMush(World world, int x, int y, int z)
|
||||
{
|
||||
for(int m = 0; m < 10; m++)
|
||||
{
|
||||
//world.spawnParticle("largesmoke", x, y + m, z, 0, 0, 0);
|
||||
world.setBlock(x, y + m, z, ModBlocks.event_tester, 0, 0);
|
||||
}
|
||||
for(int m = -4; m < 6; m++)
|
||||
{
|
||||
for(int n = -6; n < 4; n++)
|
||||
{
|
||||
//world.spawnParticle("largesmoke", x + m, y + 10, z + n, 0, 0, 0);
|
||||
world.setBlock(x + m, y + 10, z + n, ModBlocks.event_tester, 0, 0);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return -1;
|
||||
@ -405,59 +186,7 @@ public class NukeMan extends BlockContainer implements IBomb {
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
}/*
|
||||
|
||||
public void destruction(World world, int x, int y, int z)
|
||||
{
|
||||
int rand;
|
||||
|
||||
if(world.getBlock(x, y, z) != Blocks.bedrock && world.getBlock(x, y, z) != ModBlocks.reinforced_brick && world.getBlock(x, y, z) != ModBlocks.reinforced_glass && world.getBlock(x, y, z) != ModBlocks.reinforced_light && world.getBlock(x, y, z) != ModBlocks.reinforced_sand && world.getBlock(x, y, z) != ModBlocks.reinforced_lamp_off && world.getBlock(x, y, z) != ModBlocks.reinforced_lamp_on)
|
||||
{
|
||||
if(world.getBlock(x, y, z) == ModBlocks.brick_concrete)
|
||||
{
|
||||
rand = field_149933_a.nextInt(8);
|
||||
if(rand == 0)
|
||||
{
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 3);
|
||||
}
|
||||
}else if(world.getBlock(x, y, z) == ModBlocks.brick_light)
|
||||
{
|
||||
rand = field_149933_a.nextInt(2);
|
||||
if(rand == 0)
|
||||
{
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 3);
|
||||
}
|
||||
}else if(world.getBlock(x, y, z) == ModBlocks.brick_obsidian)
|
||||
{
|
||||
rand = field_149933_a.nextInt(20);
|
||||
if(rand == 0)
|
||||
{
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 3);
|
||||
}
|
||||
}else{
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void vaporDest(World world, int x, int y, int z)
|
||||
{
|
||||
if(world.getBlock(x, y, z) == Blocks.water ||
|
||||
world.getBlock(x, y, z) == Blocks.flowing_water ||
|
||||
world.getBlock(x, y, z) == Blocks.tallgrass ||
|
||||
world.getBlock(x, y, z) == Blocks.leaves ||
|
||||
world.getBlock(x, y, z) == Blocks.leaves2 ||
|
||||
world.getBlock(x, y, z) == Blocks.double_plant ||
|
||||
world.getBlock(x, y, z) == Blocks.cactus)
|
||||
{
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
|
||||
if(world.getBlock(x, y, z).isFlammable(world, x, y, z, ForgeDirection.UP) && world.getBlock(x, y + 1, z) == Blocks.air)
|
||||
{
|
||||
world.setBlock(x, y + 1, z, Blocks.fire);
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void explode(World world, int x, int y, int z) {
|
||||
|
||||
@ -5,6 +5,8 @@ import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
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;
|
||||
@ -121,14 +123,14 @@ public class NukeMike extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.manRadius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.manRadius);
|
||||
}
|
||||
|
||||
if (entity.isFilled()) {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.mikeRadius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.mikeRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -139,9 +141,9 @@ 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, MainRegistry.mikeRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, BombConfig.mikeRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
if (MainRegistry.enableNukeClouds) {
|
||||
if (GeneralConfig.enableNukeClouds) {
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, r * 0.005F);
|
||||
entity2.posX = x;
|
||||
entity2.posY = y;
|
||||
@ -203,14 +205,14 @@ public class NukeMike extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.manRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.manRadius);
|
||||
}
|
||||
|
||||
if (entity.isFilled()) {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.mikeRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.mikeRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
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.interfaces.IBomb;
|
||||
@ -124,7 +125,7 @@ public class NukeN2 extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.n2Radius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.n2Radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -194,7 +195,7 @@ public class NukeN2 extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.fleijaRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.fleijaRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -113,7 +114,7 @@ public class NukePrototype extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.prototypeRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.prototypeRadius);
|
||||
}
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
@ -140,7 +141,7 @@ public class NukePrototype extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.prototypeRadius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.prototypeRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -158,7 +159,7 @@ public class NukePrototype extends BlockContainer implements IBomb {
|
||||
entity.posY = y;
|
||||
entity.posZ = z;
|
||||
entity.destructionRange = r;
|
||||
entity.speed = MainRegistry.blastSpeed;
|
||||
entity.speed = BombConfig.blastSpeed;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
@ -221,7 +222,7 @@ public class NukePrototype extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.prototypeRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.prototypeRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityCloudSolinium;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -127,7 +128,7 @@ public class NukeSolinium extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.soliniumRadius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.soliniumRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -143,7 +144,7 @@ public class NukeSolinium extends BlockContainer implements IBomb {
|
||||
entity.posY = y;
|
||||
entity.posZ = z;
|
||||
entity.destructionRange = r;
|
||||
entity.speed = MainRegistry.blastSpeed;
|
||||
entity.speed = BombConfig.blastSpeed;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
entity.extType = 1;
|
||||
@ -207,7 +208,7 @@ public class NukeSolinium extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.fleijaRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.fleijaRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Map;
|
||||
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.interfaces.IBomb;
|
||||
@ -129,7 +130,7 @@ public class NukeTsar extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.manRadius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.manRadius);
|
||||
}
|
||||
|
||||
if(entity.isFilled())
|
||||
@ -137,7 +138,7 @@ public class NukeTsar extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
p_149695_1_.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, MainRegistry.tsarRadius);
|
||||
igniteTestBomb(p_149695_1_, x, y, z, BombConfig.tsarRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -211,7 +212,7 @@ public class NukeTsar extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.manRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.manRadius);
|
||||
}
|
||||
|
||||
if(entity.isFilled())
|
||||
@ -219,7 +220,7 @@ public class NukeTsar extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, MainRegistry.tsarRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.tsarRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -53,7 +54,7 @@ public class TurretCIWS extends TurretBase {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
rayShot(world, vector, x + vector.xCoord * 2.5 + 0.5, y + vector.yCoord * 2.5 + 0.5, z + vector.zCoord * 2.5 + 0.5, 100, 10.0F, MainRegistry.ciwsHitrate);
|
||||
rayShot(world, vector, x + vector.xCoord * 2.5 + 0.5, y + vector.yCoord * 2.5 + 0.5, z + vector.zCoord * 2.5 + 0.5, 100, 10.0F, WeaponConfig.ciwsHitrate);
|
||||
|
||||
EntityGasFlameFX smoke = new EntityGasFlameFX(world);
|
||||
smoke.posX = x + vector.xCoord * 2.5 + 0.5;
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.generic;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.world.feature.HugeMush;
|
||||
|
||||
@ -125,7 +126,7 @@ public class BlockMush extends Block implements IGrowable {
|
||||
public void updateTick(World world, int x, int y, int z, Random rand)
|
||||
{
|
||||
this.checkAndDropBlock(world, x, y, z);
|
||||
if(MainRegistry.enableMycelium && world.getBlock(x, y - 1, z) == ModBlocks.waste_earth && rand.nextInt(5) == 0)
|
||||
if(GeneralConfig.enableMycelium && world.getBlock(x, y - 1, z) == ModBlocks.waste_earth && rand.nextInt(5) == 0)
|
||||
{
|
||||
world.setBlock(x, y - 1, z, ModBlocks.waste_mycelium);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.generic;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
@ -127,7 +128,7 @@ public class WasteEarth extends Block {
|
||||
world.setBlock(x, y + 1, z, ModBlocks.mush);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.waste_mycelium && MainRegistry.enableMycelium)
|
||||
if(this == ModBlocks.waste_mycelium && GeneralConfig.enableMycelium)
|
||||
{
|
||||
for(int i = -1; i < 2; i++) {
|
||||
for(int j = -1; j < 2; j++) {
|
||||
@ -172,7 +173,7 @@ public class WasteEarth extends Block {
|
||||
}
|
||||
}
|
||||
|
||||
if(MainRegistry.enableAutoCleanup && (this == ModBlocks.waste_earth | this == ModBlocks.waste_mycelium))
|
||||
if(GeneralConfig.enableAutoCleanup && (this == ModBlocks.waste_earth | this == ModBlocks.waste_mycelium))
|
||||
if(!world.isRemote)
|
||||
world.setBlock(x, y, z, Blocks.dirt);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadar;
|
||||
|
||||
@ -42,7 +43,7 @@ public class MachineRadar extends BlockContainer {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(y < MainRegistry.radarAltitude) {
|
||||
if(y < WeaponConfig.radarAltitude) {
|
||||
if(world.isRemote)
|
||||
player.addChatMessage(new ChatComponentText("[Radar] Error: Radar altitude not sufficient."));
|
||||
return true;
|
||||
|
||||
96
src/main/java/com/hbm/config/BombConfig.java
Normal file
96
src/main/java/com/hbm/config/BombConfig.java
Normal file
@ -0,0 +1,96 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class BombConfig {
|
||||
|
||||
public static int gadgetRadius = 150;
|
||||
public static int boyRadius = 120;
|
||||
public static int manRadius = 175;
|
||||
public static int mikeRadius = 250;
|
||||
public static int tsarRadius = 500;
|
||||
public static int prototypeRadius = 150;
|
||||
public static int fleijaRadius = 50;
|
||||
public static int soliniumRadius = 75;
|
||||
public static int n2Radius = 100;
|
||||
public static int missileRadius = 100;
|
||||
public static int mirvRadius = 100;
|
||||
public static int fatmanRadius = 35;
|
||||
public static int nukaRadius = 25;
|
||||
public static int aSchrabRadius = 20;
|
||||
|
||||
public static int mk4 = 1024;
|
||||
public static int blastSpeed = 1024;
|
||||
public static int falloutRange = 100;
|
||||
public static int fSpeed = 256;
|
||||
public static int limitExplosionLifespan = 0;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_NUKES = "03_nukes";
|
||||
Property propGadget = config.get(CATEGORY_NUKES, "3.00_gadgetRadius", 150);
|
||||
propGadget.comment = "Radius of the Gadget";
|
||||
gadgetRadius = propGadget.getInt();
|
||||
Property propBoy = config.get(CATEGORY_NUKES, "3.01_boyRadius", 120);
|
||||
propBoy.comment = "Radius of Little Boy";
|
||||
boyRadius = propBoy.getInt();
|
||||
Property propMan = config.get(CATEGORY_NUKES, "3.02_manRadius", 175);
|
||||
propMan.comment = "Radius of Fat Man";
|
||||
manRadius = propMan.getInt();
|
||||
Property propMike = config.get(CATEGORY_NUKES, "3.03_mikeRadius", 250);
|
||||
propMike.comment = "Radius of Ivy Mike";
|
||||
mikeRadius = propMike.getInt();
|
||||
Property propTsar = config.get(CATEGORY_NUKES, "3.04_tsarRadius", 500);
|
||||
propTsar.comment = "Radius of the Tsar Bomba";
|
||||
tsarRadius = propTsar.getInt();
|
||||
Property propPrototype = config.get(CATEGORY_NUKES, "3.05_prototypeRadius", 150);
|
||||
propPrototype.comment = "Radius of the Prototype";
|
||||
prototypeRadius = propPrototype.getInt();
|
||||
Property propFleija = config.get(CATEGORY_NUKES, "3.06_fleijaRadius", 50);
|
||||
propFleija.comment = "Radius of F.L.E.I.J.A.";
|
||||
fleijaRadius = propFleija.getInt();
|
||||
Property propMissile = config.get(CATEGORY_NUKES, "3.07_missileRadius", 100);
|
||||
propMissile.comment = "Radius of the nuclear missile";
|
||||
missileRadius = propMissile.getInt();
|
||||
Property propMirv = config.get(CATEGORY_NUKES, "3.08_mirvRadius", 100);
|
||||
propMirv.comment = "Radius of a MIRV";
|
||||
mirvRadius = propMirv.getInt();
|
||||
Property propFatman = config.get(CATEGORY_NUKES, "3.09_fatmanRadius", 35);
|
||||
propFatman.comment = "Radius of the Fatman Launcher";
|
||||
fatmanRadius = propFatman.getInt();
|
||||
Property propNuka = config.get(CATEGORY_NUKES, "3.10_nukaRadius", 25);
|
||||
propNuka.comment = "Radius of the nuka grenade";
|
||||
nukaRadius = propNuka.getInt();
|
||||
Property propASchrab = config.get(CATEGORY_NUKES, "3.11_aSchrabRadius", 20);
|
||||
propASchrab.comment = "Radius of dropped anti schrabidium";
|
||||
aSchrabRadius = propASchrab.getInt();
|
||||
Property propSolinium = config.get(CATEGORY_NUKES, "3.12_soliniumRadius", 75);
|
||||
propSolinium.comment = "Radius of the blue rinse";
|
||||
soliniumRadius = propSolinium.getInt();
|
||||
Property propN2 = config.get(CATEGORY_NUKES, "3.13_n2Radius", 130);
|
||||
propN2.comment = "Radius of the N2 mine";
|
||||
n2Radius = propN2.getInt();
|
||||
|
||||
final String CATEGORY_NUKE = "06_explosions";
|
||||
Property propLimitExplosionLifespan = config.get(CATEGORY_NUKE, "6.00_limitExplosionLifespan", 0);
|
||||
propLimitExplosionLifespan.comment = "How long an explosion can be unloaded until it dies in seconds. Based of system time. 0 disables the effect";
|
||||
limitExplosionLifespan = propLimitExplosionLifespan.getInt();
|
||||
// explosion speed
|
||||
Property propBlastSpeed = config.get(CATEGORY_NUKE, "6.01_blastSpeed", 1024);
|
||||
propBlastSpeed.comment = "Base speed of MK3 system (old and schrabidium) detonations (Blocks / tick)";
|
||||
blastSpeed = propBlastSpeed.getInt();
|
||||
// fallout range
|
||||
Property propFalloutRange = config.get(CATEGORY_NUKE, "6.02_blastSpeedNew", 1024);
|
||||
propFalloutRange.comment = "Base speed of MK4 system (new) detonations (Blocks / tick)";
|
||||
mk4 = propFalloutRange.getInt();
|
||||
// fallout speed
|
||||
Property falloutRangeProp = config.get(CATEGORY_NUKE, "6.03_falloutRange", 100);
|
||||
falloutRangeProp.comment = "Radius of fallout area (base radius * value in percent)";
|
||||
falloutRange = falloutRangeProp.getInt();
|
||||
// new explosion speed
|
||||
Property falloutSpeed = config.get(CATEGORY_NUKE, "6.04_falloutSpeed", 256);
|
||||
falloutSpeed.comment = "Blocks processed per tick by the fallout rain";
|
||||
fSpeed = falloutSpeed.getInt();
|
||||
}
|
||||
}
|
||||
42
src/main/java/com/hbm/config/CommonConfig.java
Normal file
42
src/main/java/com/hbm/config/CommonConfig.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class CommonConfig {
|
||||
|
||||
public static int setDef(int value, int def) {
|
||||
|
||||
if(value <= 0) {
|
||||
MainRegistry.logger.error("Fatal error config: Randomizer value has been set to zero, despite bound having to be positive integer!");
|
||||
MainRegistry.logger.error(String.format("Errored value will default back to %d, PLEASE REVIEW CONFIGURATION DESCRIPTION BEFORE MEDDLING WITH VALUES!", def));
|
||||
return def;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public static int createConfigInt(Configuration config, String category, String name, String comment, int def) {
|
||||
|
||||
Property prop = config.get(category, name, def);
|
||||
prop.comment = comment;
|
||||
return prop.getInt();
|
||||
}
|
||||
|
||||
public static boolean createConfigBool(Configuration config, String category, String name, String comment, boolean def) {
|
||||
|
||||
Property prop = config.get(category, name, def);
|
||||
prop.comment = comment;
|
||||
return prop.getBoolean();
|
||||
}
|
||||
|
||||
public static String[] createConfigStringList(Configuration config, String category, String name, String comment) {
|
||||
|
||||
Property prop = config.get(category, name, new String[] { "PLACEHOLDER" });
|
||||
prop.comment = comment;
|
||||
return prop.getStringList();
|
||||
}
|
||||
|
||||
}
|
||||
58
src/main/java/com/hbm/config/GeneralConfig.java
Normal file
58
src/main/java/com/hbm/config/GeneralConfig.java
Normal file
@ -0,0 +1,58 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class GeneralConfig {
|
||||
|
||||
public static boolean enableDebugMode = true;
|
||||
public static boolean enableMycelium = false;
|
||||
public static boolean enablePlutoniumOre = false;
|
||||
public static boolean enableDungeons = true;
|
||||
public static boolean enableMDOres = true;
|
||||
public static boolean enableMines = true;
|
||||
public static boolean enableRad = true;
|
||||
public static boolean enableNITAN = true;
|
||||
public static boolean enableNukeClouds = true;
|
||||
public static boolean enableAutoCleanup = false;
|
||||
public static boolean enableMeteorStrikes = true;
|
||||
public static boolean enableMeteorShowers = true;
|
||||
public static boolean enableMeteorTails = true;
|
||||
public static boolean enableSpecialMeteors = true;
|
||||
public static boolean enableBomberShortMode = false;
|
||||
public static boolean enableVaults = true;
|
||||
public static boolean enableRads = true;
|
||||
public static boolean enableCataclysm = false;
|
||||
public static boolean enableExtendedLogging = false;
|
||||
public static boolean enableHardcoreTaint = false;
|
||||
public static boolean enableGuns = true;
|
||||
public static boolean enableVirus = true;
|
||||
public static boolean enableCrosshairs = true;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_GENERAL = "01_general";
|
||||
enableDebugMode = config.get(CATEGORY_GENERAL, "1.00_enableDebugMode", false).getBoolean(false);
|
||||
enableMycelium = config.get(CATEGORY_GENERAL, "1.01_enableMyceliumSpread", false).getBoolean(false);
|
||||
enablePlutoniumOre = config.get(CATEGORY_GENERAL, "1.02_enablePlutoniumNetherOre", false).getBoolean(false);
|
||||
enableDungeons = config.get(CATEGORY_GENERAL, "1.03_enableDungeonSpawn", true).getBoolean(true);
|
||||
enableMDOres = config.get(CATEGORY_GENERAL, "1.04_enableOresInModdedDimensions", true).getBoolean(true);
|
||||
enableMines = config.get(CATEGORY_GENERAL, "1.05_enableLandmineSpawn", true).getBoolean(true);
|
||||
enableRad = config.get(CATEGORY_GENERAL, "1.06_enableRadHotspotSpawn", true).getBoolean(true);
|
||||
enableNITAN = config.get(CATEGORY_GENERAL, "1.07_enableNITANChestSpawn", true).getBoolean(true);
|
||||
enableNukeClouds = config.get(CATEGORY_GENERAL, "1.08_enableMushroomClouds", true).getBoolean(true);
|
||||
enableAutoCleanup = config.get(CATEGORY_GENERAL, "1.09_enableAutomaticRadCleanup", false).getBoolean(false);
|
||||
enableMeteorStrikes = config.get(CATEGORY_GENERAL, "1.10_enableMeteorStrikes", true).getBoolean(true);
|
||||
enableMeteorShowers = config.get(CATEGORY_GENERAL, "1.11_enableMeteorShowers", true).getBoolean(true);
|
||||
enableMeteorTails = config.get(CATEGORY_GENERAL, "1.12_enableMeteorTails", true).getBoolean(true);
|
||||
enableSpecialMeteors = config.get(CATEGORY_GENERAL, "1.13_enableSpecialMeteors", false).getBoolean(false);
|
||||
enableBomberShortMode = config.get(CATEGORY_GENERAL, "1.14_enableBomberShortMode", false).getBoolean(false);
|
||||
enableVaults = config.get(CATEGORY_GENERAL, "1.15_enableVaultSpawn", true).getBoolean(true);
|
||||
enableRads = config.get(CATEGORY_GENERAL, "1.16_enableNewRadiation", true).getBoolean(true);
|
||||
enableCataclysm = config.get(CATEGORY_GENERAL, "1.17_enableCataclysm", false).getBoolean(false);
|
||||
enableExtendedLogging = config.get(CATEGORY_GENERAL, "1.18_enableExtendedLogging", false).getBoolean(false);
|
||||
enableHardcoreTaint = config.get(CATEGORY_GENERAL, "1.19_enableHardcoreTaint", false).getBoolean(false);
|
||||
enableGuns = config.get(CATEGORY_GENERAL, "1.20_enableGuns", true).getBoolean(true);
|
||||
enableVirus = config.get(CATEGORY_GENERAL, "1.21_enableVirus", false).getBoolean(false);
|
||||
enableCrosshairs = config.get(CATEGORY_GENERAL, "1.22_enableCrosshairs", true).getBoolean(true);
|
||||
}
|
||||
}
|
||||
12
src/main/java/com/hbm/config/MachineConfig.java
Normal file
12
src/main/java/com/hbm/config/MachineConfig.java
Normal file
@ -0,0 +1,12 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class MachineConfig {
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_MACHINE = "09_machines";
|
||||
}
|
||||
|
||||
}
|
||||
30
src/main/java/com/hbm/config/PotionConfig.java
Normal file
30
src/main/java/com/hbm/config/PotionConfig.java
Normal file
@ -0,0 +1,30 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class PotionConfig {
|
||||
|
||||
public static int taintID = 62;
|
||||
public static int radiationID = 63;
|
||||
public static int bangID = 64;
|
||||
public static int mutationID = 65;
|
||||
public static int radxID = 66;
|
||||
public static int leadID = 67;
|
||||
public static int radawayID = 68;
|
||||
public static int telekinesisID = 69;
|
||||
public static int phosphorusID = 70;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_POTION = "08_potion_effects";
|
||||
taintID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.00_taintPotionID", "What potion ID the taint effect will have", 62);
|
||||
radiationID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.01_radiationPotionID", "What potion ID the radiation effect will have", 63);
|
||||
bangID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.02_bangPotionID", "What potion ID the B93 timebomb effect will have", 64);
|
||||
mutationID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.03_mutationPotionID", "What potion ID the taint mutation effect will have", 65);
|
||||
radxID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.04_radxPotionID", "What potion ID the Rad-X effect will have", 66);
|
||||
leadID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.05_leadPotionID", "What potion ID the lead poisoning effect will have", 67);
|
||||
radawayID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.06_radawayPotionID", "What potion ID the radaway effect will have", 68);
|
||||
telekinesisID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.07_telekinesisPotionID", "What potion ID the telekinesis effect will have", 69);
|
||||
phosphorusID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.08_phosphorusPotionID", "What potion ID the phosphorus effect will have", 70);
|
||||
}
|
||||
}
|
||||
40
src/main/java/com/hbm/config/RadiationConfig.java
Normal file
40
src/main/java/com/hbm/config/RadiationConfig.java
Normal file
@ -0,0 +1,40 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class RadiationConfig {
|
||||
|
||||
public static int rain = 0;
|
||||
public static int cont = 0;
|
||||
public static int fogRad = 100;
|
||||
public static int fogCh = 20;
|
||||
public static float hellRad = 0.1F;
|
||||
public static int worldRad = 10;
|
||||
public static int worldRadThreshold = 20;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_NUKE = "06_explosions";
|
||||
|
||||
Property radRain = config.get(CATEGORY_NUKE, "6.05_falloutRainDuration", 0);
|
||||
radRain.comment = "Duration of the thunderstorm after fallout in ticks (only large explosions)";
|
||||
rain = radRain.getInt();
|
||||
Property rainCont = config.get(CATEGORY_NUKE, "6.06_falloutRainRadiation", 0);
|
||||
rainCont.comment = "Radiation in 100th RADs created by fallout rain";
|
||||
cont = rainCont.getInt();
|
||||
Property fogThresh = config.get(CATEGORY_NUKE, "6.07_fogThreshold", 100);
|
||||
fogThresh.comment = "Radiation in RADs required for fog to spawn";
|
||||
fogRad = fogThresh.getInt();
|
||||
Property fogChance = config.get(CATEGORY_NUKE, "6.08_fogChance", 10);
|
||||
fogChance.comment = "1:n chance of fog spawning every second";
|
||||
fogCh = fogChance.getInt();
|
||||
Property netherRad = config.get(CATEGORY_NUKE, "6.09_netherRad", 10);
|
||||
netherRad.comment = "RAD/s in the nether in hundredths";
|
||||
hellRad = netherRad.getInt() * 0.01F;
|
||||
worldRad = CommonConfig.createConfigInt(config, CATEGORY_NUKE, "6.10_worldRadCount", "How many block operations radiation can perform per tick", 10);
|
||||
worldRadThreshold = CommonConfig.createConfigInt(config, CATEGORY_NUKE, "6.11_worldRadThreshold", "The least amount of RADs required for block modification to happen", 20);
|
||||
|
||||
fogCh = CommonConfig.setDef(fogCh, 20);
|
||||
}
|
||||
}
|
||||
36
src/main/java/com/hbm/config/ToolConfig.java
Normal file
36
src/main/java/com/hbm/config/ToolConfig.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ToolConfig {
|
||||
|
||||
public static int recursionDepth = 500;
|
||||
public static boolean recursiveStone = true;
|
||||
public static boolean recursiveNetherrack = true;
|
||||
|
||||
public static boolean abilityHammer = true;
|
||||
public static boolean abilityVein = true;
|
||||
public static boolean abilityLuck = true;
|
||||
public static boolean abilitySilk = true;
|
||||
public static boolean abilityFurnace = true;
|
||||
public static boolean abilityShredder = true;
|
||||
public static boolean abilityCentrifuge = true;
|
||||
public static boolean abilityCrystallizer = true;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_TOOLS = "11_tools";
|
||||
recursionDepth = CommonConfig.createConfigInt(config, CATEGORY_TOOLS, "11.00_recursionDepth", "Limits veinminer's recursive function. Usually not an issue, unless you're using bukkit which is especially sensitive for some reason.", 1000);
|
||||
recursiveStone = CommonConfig.createConfigBool(config, CATEGORY_TOOLS, "11.01_recursionDepth", "Determines whether veinminer can break stone", false);
|
||||
recursiveNetherrack = CommonConfig.createConfigBool(config, CATEGORY_TOOLS, "11.02_recursionDepth", "Determines whether veinminer can break netherrack", false);
|
||||
|
||||
abilityHammer = config.get(CATEGORY_TOOLS, "11.03_hammerAbility", true).getBoolean(true);
|
||||
abilityVein = config.get(CATEGORY_TOOLS, "11.04_abilityVein", true).getBoolean(true);
|
||||
abilityLuck = config.get(CATEGORY_TOOLS, "11.05_abilityLuck", true).getBoolean(true);
|
||||
abilitySilk = config.get(CATEGORY_TOOLS, "11.06_abilitySilk", true).getBoolean(true);
|
||||
abilityFurnace = config.get(CATEGORY_TOOLS, "11.07_abilityFurnace", true).getBoolean(true);
|
||||
abilityShredder = config.get(CATEGORY_TOOLS, "11.08_abilityShredder", true).getBoolean(true);
|
||||
abilityCentrifuge = config.get(CATEGORY_TOOLS, "11.09_abilityCentrifuge", true).getBoolean(true);
|
||||
abilityCrystallizer = config.get(CATEGORY_TOOLS, "11.10_abilityCrystallizer", true).getBoolean(true);
|
||||
}
|
||||
}
|
||||
42
src/main/java/com/hbm/config/WeaponConfig.java
Normal file
42
src/main/java/com/hbm/config/WeaponConfig.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class WeaponConfig {
|
||||
|
||||
public static int radarRange = 1000;
|
||||
public static int radarBuffer = 30;
|
||||
public static int radarAltitude = 55;
|
||||
public static int ciwsHitrate = 50;
|
||||
|
||||
public static boolean dropCell = true;
|
||||
public static boolean dropSing = true;
|
||||
public static boolean dropStar = true;
|
||||
public static boolean dropCrys = true;
|
||||
public static boolean dropDead = true;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_MISSILE = "07_missile_machines";
|
||||
Property propRadarRange = config.get(CATEGORY_MISSILE, "7.00_radarRange", 1000);
|
||||
propRadarRange.comment = "Range of the radar, 50 will result in 100x100 block area covered";
|
||||
radarRange = propRadarRange.getInt();
|
||||
Property propRadarBuffer = config.get(CATEGORY_MISSILE, "7.01_radarBuffer", 30);
|
||||
propRadarBuffer.comment = "How high entities have to be above the radar to be detected";
|
||||
radarBuffer = propRadarBuffer.getInt();
|
||||
Property propRadarAltitude = config.get(CATEGORY_MISSILE, "7.02_radarAltitude", 55);
|
||||
propRadarAltitude.comment = "Y height required for the radar to work";
|
||||
radarAltitude = propRadarAltitude.getInt();
|
||||
Property propCiwsHitrate = config.get(CATEGORY_MISSILE, "7.03_ciwsAccuracy", 50);
|
||||
propCiwsHitrate.comment = "Additional modifier for CIWS accuracy";
|
||||
ciwsHitrate = propRadarAltitude.getInt();
|
||||
|
||||
final String CATEGORY_DROPS = "10_dangerous_drops";
|
||||
dropCell = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.00_dropCell", "Whether antimatter cells should explode when dropped", true);
|
||||
dropSing = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.01_dropBHole", "Whether singularities and blaack holes should spawn when dropped", true);
|
||||
dropStar = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.02_dropStar", "Whether rigged star blaster cells should explode when dropped", true);
|
||||
dropCrys = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.04_dropCrys", "Whether xen crystals should move blocks when dropped", true);
|
||||
dropDead = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.05_dropDead", "Whether dead man's explosives should explode when dropped", true);
|
||||
}
|
||||
}
|
||||
129
src/main/java/com/hbm/config/WorldConfig.java
Normal file
129
src/main/java/com/hbm/config/WorldConfig.java
Normal file
@ -0,0 +1,129 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class WorldConfig {
|
||||
|
||||
public static int uraniumSpawn = 6;
|
||||
public static int thoriumSpawn = 7;
|
||||
public static int titaniumSpawn = 8;
|
||||
public static int sulfurSpawn = 5;
|
||||
public static int aluminiumSpawn = 7;
|
||||
public static int copperSpawn = 12;
|
||||
public static int fluoriteSpawn = 6;
|
||||
public static int niterSpawn = 6;
|
||||
public static int tungstenSpawn = 10;
|
||||
public static int leadSpawn = 6;
|
||||
public static int berylliumSpawn = 6;
|
||||
public static int ligniteSpawn = 2;
|
||||
public static int asbestosSpawn = 2;
|
||||
|
||||
public static int radioStructure = 500;
|
||||
public static int antennaStructure = 250;
|
||||
public static int atomStructure = 500;
|
||||
public static int vertibirdStructure = 500;
|
||||
public static int dungeonStructure = 64;
|
||||
public static int relayStructure = 500;
|
||||
public static int satelliteStructure = 500;
|
||||
public static int bunkerStructure = 1000;
|
||||
public static int siloStructure = 1000;
|
||||
public static int factoryStructure = 1000;
|
||||
public static int dudStructure = 500;
|
||||
public static int spaceshipStructure = 1000;
|
||||
public static int barrelStructure = 5000;
|
||||
public static int geyserWater = 3000;
|
||||
public static int geyserChlorine = 3000;
|
||||
public static int geyserVapor = 500;
|
||||
public static int meteorStructure = 15000;
|
||||
public static int capsuleStructure = 100;
|
||||
|
||||
public static int broadcaster = 5000;
|
||||
public static int minefreq = 64;
|
||||
public static int radfreq = 5000;
|
||||
public static int vaultfreq = 2500;
|
||||
|
||||
public static int meteorStrikeChance = 20 * 60 * 180;
|
||||
public static int meteorShowerChance = 20 * 60 * 5;
|
||||
public static int meteorShowerDuration = 6000;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_OREGEN = "02_ores";
|
||||
uraniumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.00_uraniumSpawnrate", "Ammount of uranium ore veins per chunk", 7);
|
||||
titaniumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.01_titaniumSpawnrate", "Ammount of titanium ore veins per chunk", 8);
|
||||
sulfurSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.02_sulfurSpawnrate", "Ammount of sulfur ore veins per chunk", 5);
|
||||
aluminiumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.03_aluminiumSpawnrate", "Ammount of aluminium ore veins per chunk", 7);
|
||||
copperSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.04_copperSpawnrate", "Ammount of copper ore veins per chunk", 12);
|
||||
fluoriteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.05_fluoriteSpawnrate", "Ammount of fluorite ore veins per chunk", 6);
|
||||
niterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.06_niterSpawnrate", "Ammount of niter ore veins per chunk", 6);
|
||||
tungstenSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.07_tungstenSpawnrate", "Ammount of tungsten ore veins per chunk", 10);
|
||||
leadSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.08_leadSpawnrate", "Ammount of lead ore veins per chunk", 6);
|
||||
berylliumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.09_berylliumSpawnrate", "Ammount of beryllium ore veins per chunk", 6);
|
||||
thoriumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.10_thoriumSpawnrate", "Ammount of thorium ore veins per chunk", 7);
|
||||
ligniteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.11_ligniteSpawnrate", "Ammount of lignite ore veins per chunk", 2);
|
||||
asbestosSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.12_asbestosSpawnRate", "Ammount of asbestos ore veins per chunk", 2);
|
||||
|
||||
final String CATEGORY_DUNGEON = "04_dungeons";
|
||||
radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500);
|
||||
antennaStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.01_antennaSpawn", "Spawn antenna on every nTH chunk", 250);
|
||||
atomStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.02_atomSpawn", "Spawn power plant on every nTH chunk", 500);
|
||||
vertibirdStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.03_vertibirdSpawn", "Spawn vertibird on every nTH chunk", 500);
|
||||
dungeonStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.04_dungeonSpawn", "Spawn library dungeon on every nTH chunk", 64);
|
||||
relayStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.05_relaySpawn", "Spawn relay on every nTH chunk", 500);
|
||||
satelliteStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.06_satelliteSpawn", "Spawn satellite dish on every nTH chunk", 500);
|
||||
bunkerStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.07_bunkerSpawn", "Spawn bunker on every nTH chunk", 1000);
|
||||
siloStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.08_siloSpawn", "Spawn missile silo on every nTH chunk", 1000);
|
||||
factoryStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.09_factorySpawn", "Spawn factory on every nTH chunk", 1000);
|
||||
dudStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.10_dudSpawn", "Spawn dud on every nTH chunk", 500);
|
||||
spaceshipStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.11_spaceshipSpawn", "Spawn spaceship on every nTH chunk", 1000);
|
||||
barrelStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.12_barrelSpawn", "Spawn waste tank on every nTH chunk", 5000);
|
||||
broadcaster = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.13_broadcasterSpawn", "Spawn corrupt broadcaster on every nTH chunk", 5000);
|
||||
minefreq = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.14_landmineSpawn", "Spawn AP landmine on every nTH chunk", 64);
|
||||
radfreq = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.15_radHotsoptSpawn", "Spawn radiation hotspot on every nTH chunk", 5000);
|
||||
vaultfreq = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.16_vaultSpawn", "Spawn locked safe on every nTH chunk", 2500);
|
||||
geyserWater = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.17_geyserWaterSpawn", "Spawn water geyser on every nTH chunk", 3000);
|
||||
geyserChlorine = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.18_geyserChlorineSpawn", "Spawn poison geyser on every nTH chunk", 3000);
|
||||
geyserVapor = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.19_geyserVaporSpawn", "Spawn vapor geyser on every nTH chunk", 500);
|
||||
meteorStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.20_meteorSpawn", "Spawn meteor dungeon on every nTH chunk", 15000);
|
||||
capsuleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.21_capsuleSpawn", "Spawn landing capsule on every nTH chunk", 100);
|
||||
|
||||
final String CATEGORY_METEOR = "05_meteors";
|
||||
Property propMeteorStrikeChance = config.get(CATEGORY_METEOR, "5.00_meteorStrikeChance", 20 * 60 * 60 * 5);
|
||||
propMeteorStrikeChance.comment = "The probability of a meteor spawning (an average of once every nTH ticks)";
|
||||
meteorStrikeChance = propMeteorStrikeChance.getInt();
|
||||
Property propMeteorShowerChance = config.get(CATEGORY_METEOR, "5.01_meteorShowerChance", 20 * 60 * 15);
|
||||
propMeteorShowerChance.comment = "The probability of a meteor spawning during meteor shower (an average of once every nTH ticks)";
|
||||
meteorShowerChance = propMeteorShowerChance.getInt();
|
||||
Property propMeteorShowerDuration = config.get(CATEGORY_METEOR, "5.02_meteorShowerDuration", 20 * 60 * 30);
|
||||
propMeteorShowerDuration.comment = "Max duration of meteor shower in ticks";
|
||||
meteorShowerDuration = propMeteorShowerDuration.getInt();
|
||||
|
||||
radioStructure = CommonConfig.setDef(radioStructure, 1000);
|
||||
antennaStructure = CommonConfig.setDef(antennaStructure, 1000);
|
||||
atomStructure = CommonConfig.setDef(atomStructure, 1000);
|
||||
vertibirdStructure = CommonConfig.setDef(vertibirdStructure, 1000);
|
||||
dungeonStructure = CommonConfig.setDef(dungeonStructure, 1000);
|
||||
relayStructure = CommonConfig.setDef(relayStructure, 1000);
|
||||
satelliteStructure = CommonConfig.setDef(satelliteStructure, 1000);
|
||||
bunkerStructure = CommonConfig.setDef(bunkerStructure, 1000);
|
||||
siloStructure = CommonConfig.setDef(siloStructure, 1000);
|
||||
factoryStructure = CommonConfig.setDef(factoryStructure, 1000);
|
||||
dudStructure = CommonConfig.setDef(dudStructure, 1000);
|
||||
spaceshipStructure = CommonConfig.setDef(spaceshipStructure, 1000);
|
||||
barrelStructure = CommonConfig.setDef(barrelStructure, 1000);
|
||||
geyserWater = CommonConfig.setDef(geyserWater, 1000);
|
||||
geyserChlorine = CommonConfig.setDef(geyserChlorine, 1000);
|
||||
geyserVapor = CommonConfig.setDef(geyserVapor, 1000);
|
||||
broadcaster = CommonConfig.setDef(broadcaster, 1000);
|
||||
minefreq = CommonConfig.setDef(minefreq, 1000);
|
||||
radfreq = CommonConfig.setDef(radfreq, 1000);
|
||||
vaultfreq = CommonConfig.setDef(vaultfreq, 1000);
|
||||
meteorStructure = CommonConfig.setDef(meteorStructure, 15000);
|
||||
capsuleStructure = CommonConfig.setDef(capsuleStructure, 100);
|
||||
|
||||
meteorStrikeChance = CommonConfig.setDef(meteorStrikeChance, 1000);
|
||||
meteorShowerChance = CommonConfig.setDef(meteorShowerChance, 1000);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.entity.effect;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.saveddata.AuxSavedData;
|
||||
|
||||
@ -36,7 +38,7 @@ public class EntityFalloutRain extends Entity {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
for(int i = 0; i < MainRegistry.fSpeed; i++) {
|
||||
for(int i = 0; i < BombConfig.fSpeed; i++) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(radProgress * 0.5, 0, 0);
|
||||
double circum = radProgress * 2 * Math.PI * 2;
|
||||
@ -75,12 +77,12 @@ public class EntityFalloutRain extends Entity {
|
||||
}
|
||||
|
||||
if(this.isDead) {
|
||||
if(MainRegistry.rain > 0 && getScale() > 150) {
|
||||
if(RadiationConfig.rain > 0 && getScale() > 150) {
|
||||
worldObj.getWorldInfo().setRaining(true);
|
||||
worldObj.getWorldInfo().setThundering(true);
|
||||
worldObj.getWorldInfo().setRainTime(MainRegistry.rain);
|
||||
worldObj.getWorldInfo().setThunderTime(MainRegistry.rain);
|
||||
AuxSavedData.setThunder(worldObj, MainRegistry.rain);
|
||||
worldObj.getWorldInfo().setRainTime(RadiationConfig.rain);
|
||||
worldObj.getWorldInfo().setThunderTime(RadiationConfig.rain);
|
||||
AuxSavedData.setThunder(worldObj, RadiationConfig.rain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
package com.hbm.entity.grenade;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeASchrab extends EntityGrenadeBase {
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
|
||||
public EntityGrenadeASchrab(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
@ -33,14 +32,14 @@ public class EntityGrenadeASchrab extends EntityGrenadeBase {
|
||||
entity.posX = this.posX;
|
||||
entity.posY = this.posY;
|
||||
entity.posZ = this.posZ;
|
||||
entity.destructionRange = MainRegistry.aSchrabRadius;
|
||||
entity.destructionRange = BombConfig.aSchrabRadius;
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
this.worldObj.spawnEntityInWorld(entity);
|
||||
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(this.worldObj, MainRegistry.aSchrabRadius);
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(this.worldObj, BombConfig.aSchrabRadius);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity.grenade;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -11,9 +12,7 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class EntityGrenadeBase extends EntityThrowable
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public abstract class EntityGrenadeBase extends EntityThrowable {
|
||||
|
||||
public EntityGrenadeBase(World p_i1773_1_)
|
||||
{
|
||||
@ -41,7 +40,7 @@ public abstract class EntityGrenadeBase extends EntityThrowable
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
if(MainRegistry.enableExtendedLogging) {
|
||||
if(GeneralConfig.enableExtendedLogging) {
|
||||
|
||||
String s = "null";
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity.grenade;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -214,7 +215,7 @@ public abstract class EntityGrenadeBouncyBase extends Entity implements IProject
|
||||
if(thrower != null && thrower instanceof EntityPlayer)
|
||||
s = ((EntityPlayer)thrower).getDisplayName();
|
||||
|
||||
if(MainRegistry.enableExtendedLogging)
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[GREN] Set off grenade at " + ((int)posX) + " / " + ((int)posY) + " / " + ((int)posZ) + " by " + s + "!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,26 +9,23 @@ import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeMk2 extends EntityGrenadeBouncyBase {
|
||||
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
|
||||
public EntityGrenadeMk2(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeMk2(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeMk2(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeMk2(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeMk2(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote) {
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 7.5F, true, false, false);
|
||||
}
|
||||
|
||||
@ -1,57 +1,43 @@
|
||||
package com.hbm.entity.grenade;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGrenade;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeNuclear extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public class EntityGrenadeNuclear extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadeNuclear(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadeNuclear(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeNuclear(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeNuclear(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeNuclear(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeNuclear(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
/*EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj);
|
||||
entity0.posX = this.posX;
|
||||
entity0.posY = this.posY;
|
||||
entity0.posZ = this.posZ;
|
||||
entity0.destructionRange = MainRegistry.nukaRadius;
|
||||
entity0.speed = 25;
|
||||
entity0.coefficient = 10.0F;*/
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.nukaRadius, posX, posY, posZ));
|
||||
if(rand.nextInt(100) == 0)
|
||||
{
|
||||
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ);
|
||||
} else {
|
||||
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.nukaRadius, posX, posY, posZ));
|
||||
if(rand.nextInt(100) == 0) {
|
||||
ExplosionParticleB.spawnMush(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ);
|
||||
} else {
|
||||
ExplosionParticle.spawnMush(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -3,34 +3,28 @@ package com.hbm.entity.grenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeNuke extends EntityGrenadeBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public int count = 2;
|
||||
public class EntityGrenadeNuke extends EntityGrenadeBase {
|
||||
public int count = 2;
|
||||
|
||||
public EntityGrenadeNuke(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadeNuke(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeNuke(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeNuke(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeNuke(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeNuke(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
//this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 30F, true);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
// this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 30F, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,35 +7,29 @@ import com.hbm.items.weapon.ItemGrenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadePlasma extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public class EntityGrenadePlasma extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadePlasma(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadePlasma(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadePlasma(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadePlasma(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadePlasma(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadePlasma(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
ExplosionChaos.plasma(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 7 );
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
ExplosionChaos.plasma(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, 7);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -7,36 +7,29 @@ import com.hbm.items.weapon.ItemGrenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadePoison extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public class EntityGrenadePoison extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadePoison(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadePoison(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadePoison(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadePoison(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadePoison(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadePoison(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
ExplosionNukeGeneric.wasteNoSchrab(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10);
|
||||
}
|
||||
}
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
ExplosionNukeGeneric.wasteNoSchrab(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, 10);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -7,35 +7,29 @@ import com.hbm.items.weapon.ItemGrenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeSchrabidium extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public class EntityGrenadeSchrabidium extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadeSchrabidium(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadeSchrabidium(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeSchrabidium(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeSchrabidium(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeSchrabidium(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeSchrabidium(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
ExplosionChaos.schrab(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 50, 50);
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1.5F, true);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
ExplosionChaos.schrab(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, 50, 50);
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1.5F, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -8,38 +8,32 @@ import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGrenade;
|
||||
|
||||
public class EntityGrenadeShrapnel extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public Entity shooter;
|
||||
public class EntityGrenadeShrapnel extends EntityGrenadeBouncyBase {
|
||||
public Entity shooter;
|
||||
|
||||
public EntityGrenadeShrapnel(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadeShrapnel(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeShrapnel(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeShrapnel(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeShrapnel(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeShrapnel(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
for(int i = 0; i < 5; i++) {
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
for(int i = 0; i < 5; i++) {
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -7,34 +7,28 @@ import com.hbm.items.weapon.ItemGrenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeStrong extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public class EntityGrenadeStrong extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadeStrong(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadeStrong(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeStrong(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeStrong(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeStrong(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeStrong(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5.0F, true, false, false);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5.0F, true, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -7,35 +7,29 @@ import com.hbm.items.weapon.ItemGrenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeTau extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public class EntityGrenadeTau extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadeTau(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadeTau(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeTau(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeTau(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeTau(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeTau(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
ExplosionChaos.tauMeSinPi(this.worldObj, this.posX, this.posY, this.posZ, 100, this.getThrower(), this);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
ExplosionChaos.tauMeSinPi(this.worldObj, this.posX, this.posY, this.posZ, 100, this.getThrower(), this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -7,34 +7,28 @@ import com.hbm.items.weapon.ItemGrenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeZOMG extends EntityGrenadeBouncyBase
|
||||
{
|
||||
private static final String __OBFID = "CL_00001722";
|
||||
public class EntityGrenadeZOMG extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadeZOMG(World p_i1773_1_)
|
||||
{
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
public EntityGrenadeZOMG(World p_i1773_1_) {
|
||||
super(p_i1773_1_);
|
||||
}
|
||||
|
||||
public EntityGrenadeZOMG(World p_i1774_1_, EntityLivingBase p_i1774_2_)
|
||||
{
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
public EntityGrenadeZOMG(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
|
||||
super(p_i1774_1_, p_i1774_2_);
|
||||
}
|
||||
|
||||
public EntityGrenadeZOMG(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
|
||||
{
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
public EntityGrenadeZOMG(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) {
|
||||
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.setDead();
|
||||
ExplosionChaos.zomgMeSinPi(this.worldObj, this.posX, this.posY, this.posZ, 20, this.getThrower(), this);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void explode() {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
ExplosionChaos.zomgMeSinPi(this.worldObj, this.posX, this.posY, this.posZ, 20, this.getThrower(), this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity.logic;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.explosion.ExplosionBalefire;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -55,7 +56,7 @@ public class EntityBalefire extends Entity {
|
||||
|
||||
if(!this.did)
|
||||
{
|
||||
if(MainRegistry.enableExtendedLogging && !worldObj.isRemote)
|
||||
if(GeneralConfig.enableExtendedLogging && !worldObj.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized BF explosion at " + posX + " / " + posY + " / " + posZ + " with strength " + destructionRange + "!");
|
||||
|
||||
exp = new ExplosionBalefire((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange);
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.entity.logic;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.entity.projectile.EntityBombletZeta;
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
@ -209,8 +210,8 @@ public class EntityBomber extends Entity implements IChunkLoader {
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(world.rand.nextDouble() - 0.5, 0, world.rand.nextDouble() - 0.5);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= MainRegistry.enableBomberShortMode ? 1 : 2;
|
||||
vector.zCoord *= MainRegistry.enableBomberShortMode ? 1 : 2;
|
||||
vector.xCoord *= GeneralConfig.enableBomberShortMode ? 1 : 2;
|
||||
vector.zCoord *= GeneralConfig.enableBomberShortMode ? 1 : 2;
|
||||
|
||||
this.setLocationAndAngles(x - vector.xCoord * 100, y + 50, z - vector.zCoord * 100, 0.0F, 0.0F);
|
||||
this.loadNeighboringChunks((int)(x / 16), (int)(z / 16));
|
||||
@ -512,5 +513,4 @@ public class EntityBomber extends Entity implements IChunkLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@ package com.hbm.entity.logic;
|
||||
|
||||
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.ExplosionFleija;
|
||||
import com.hbm.explosion.ExplosionHurtUtil;
|
||||
@ -48,7 +50,7 @@ public class EntityNukeExplosionMK3 extends Entity {
|
||||
|
||||
long time = nbt.getLong("milliTime");
|
||||
|
||||
if(MainRegistry.limitExplosionLifespan > 0 && System.currentTimeMillis() - time > MainRegistry.limitExplosionLifespan * 1000)
|
||||
if(BombConfig.limitExplosionLifespan > 0 && System.currentTimeMillis() - time > BombConfig.limitExplosionLifespan * 1000)
|
||||
this.setDead();
|
||||
|
||||
if(this.waste)
|
||||
@ -112,7 +114,7 @@ public class EntityNukeExplosionMK3 extends Entity {
|
||||
|
||||
if(!this.did)
|
||||
{
|
||||
if(MainRegistry.enableExtendedLogging && !worldObj.isRemote)
|
||||
if(GeneralConfig.enableExtendedLogging && !worldObj.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized mk3 explosion at " + posX + " / " + posY + " / " + posZ + " with strength " + destructionRange + "!");
|
||||
|
||||
if(this.waste)
|
||||
|
||||
@ -2,6 +2,8 @@ package com.hbm.entity.logic;
|
||||
|
||||
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;
|
||||
@ -84,7 +86,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
} else if(explosion.getStoredSize() > 0) {
|
||||
//if(!worldObj.isRemote)
|
||||
//MainRegistry.logger.info(explosion.getProgress() + " / " + count / length);
|
||||
explosion.processTip(MainRegistry.mk4);
|
||||
explosion.processTip(BombConfig.mk4);
|
||||
} else if(fallout) {
|
||||
|
||||
//MainRegistry.logger.info("STOP: " + System.currentTimeMillis());
|
||||
@ -93,7 +95,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
fallout.posX = this.posX;
|
||||
fallout.posY = this.posY;
|
||||
fallout.posZ = this.posZ;
|
||||
fallout.setScale((int)(this.length * 1.8 + falloutAdd) * MainRegistry.falloutRange / 100);
|
||||
fallout.setScale((int)(this.length * 1.8 + falloutAdd) * BombConfig.falloutRange / 100);
|
||||
|
||||
this.worldObj.spawnEntityInWorld(fallout);
|
||||
|
||||
@ -126,7 +128,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
|
||||
public static EntityNukeExplosionMK4 statFac(World world, int r, double x, double y, double z) {
|
||||
|
||||
if(MainRegistry.enableExtendedLogging && !world.isRemote)
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
if(r == 0)
|
||||
@ -145,7 +147,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
|
||||
public static EntityNukeExplosionMK4 statFacExperimental(World world, int r, double x, double y, double z) {
|
||||
|
||||
if(MainRegistry.enableExtendedLogging && !world.isRemote)
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized eX explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
r *= 2;
|
||||
@ -161,7 +163,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
|
||||
public static EntityNukeExplosionMK4 statFacNoRad(World world, int r, double x, double y, double z) {
|
||||
|
||||
if(MainRegistry.enableExtendedLogging && !world.isRemote)
|
||||
if(GeneralConfig.enableExtendedLogging && !world.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized nR explosion at " + x + " / " + y + " / " + z + " with strength " + r + "!");
|
||||
|
||||
r *= 2;
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity.logic;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.explosion.ExplosionTom;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -11,7 +12,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityTomBlast extends Entity {
|
||||
|
||||
|
||||
public int age = 0;
|
||||
public int destructionRange = 0;
|
||||
public ExplosionTom exp;
|
||||
@ -24,12 +25,12 @@ public class EntityTomBlast extends Entity {
|
||||
destructionRange = nbt.getInteger("destructionRange");
|
||||
speed = nbt.getInteger("speed");
|
||||
did = nbt.getBoolean("did");
|
||||
|
||||
exp = new ExplosionTom((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange);
|
||||
|
||||
exp = new ExplosionTom((int) this.posX, (int) this.posY, (int) this.posZ, this.worldObj, this.destructionRange);
|
||||
exp.readFromNbt(nbt, "exp_");
|
||||
|
||||
this.did = true;
|
||||
|
||||
|
||||
this.did = true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -38,54 +39,53 @@ public class EntityTomBlast extends Entity {
|
||||
nbt.setInteger("destructionRange", destructionRange);
|
||||
nbt.setInteger("speed", speed);
|
||||
nbt.setBoolean("did", did);
|
||||
|
||||
|
||||
if(exp != null)
|
||||
exp.saveToNbt(nbt, "exp_");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public EntityTomBlast(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!this.did)
|
||||
{
|
||||
if(MainRegistry.enableExtendedLogging && !worldObj.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized TOM explosion at " + posX + " / " + posY + " / " + posZ + " with strength " + destructionRange + "!");
|
||||
|
||||
exp = new ExplosionTom((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange);
|
||||
|
||||
this.did = true;
|
||||
}
|
||||
|
||||
speed += 1; //increase speed to keep up with expansion
|
||||
|
||||
boolean flag = false;
|
||||
for(int i = 0; i < this.speed; i++)
|
||||
{
|
||||
flag = exp.update();
|
||||
|
||||
if(flag) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
age++;
|
||||
}
|
||||
super.onUpdate();
|
||||
|
||||
if(!this.did) {
|
||||
|
||||
if(GeneralConfig.enableExtendedLogging && !worldObj.isRemote)
|
||||
MainRegistry.logger.log(Level.INFO, "[NUKE] Initialized TOM explosion at " + posX + " / " + posY + " / " + posZ + " with strength " + destructionRange + "!");
|
||||
|
||||
exp = new ExplosionTom((int) this.posX, (int) this.posY, (int) this.posZ, this.worldObj, this.destructionRange);
|
||||
|
||||
this.did = true;
|
||||
}
|
||||
|
||||
speed += 1; // increase speed to keep up with expansion
|
||||
|
||||
boolean flag = false;
|
||||
for(int i = 0; i < this.speed; i++) {
|
||||
flag = exp.update();
|
||||
|
||||
if(flag) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
age++;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() { }
|
||||
protected void entityInit() {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
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.particle.EntitySmokeFX;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -19,74 +19,67 @@ public class EntityMIRV extends EntityThrowable {
|
||||
super(p_i1582_1_);
|
||||
this.ignoreFrustumCheck = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
|
||||
|
||||
this.motionY -= 0.03;
|
||||
|
||||
this.rotation();
|
||||
|
||||
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
|
||||
{
|
||||
if(!this.worldObj.isRemote)
|
||||
{
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.mirvRadius, posX, posY, posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, MainRegistry.mirvRadius * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
entity2.posY = this.posY;
|
||||
entity2.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(entity2);
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
this.rotation();
|
||||
|
||||
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));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, BombConfig.mirvRadius * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
entity2.posY = this.posY;
|
||||
entity2.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(entity2);
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
}
|
||||
|
||||
|
||||
protected void rotation() {
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
{
|
||||
;
|
||||
}
|
||||
for(this.rotationPitch = (float) (Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {
|
||||
;
|
||||
}
|
||||
|
||||
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
|
||||
{
|
||||
this.prevRotationPitch += 360.0F;
|
||||
}
|
||||
while(this.rotationPitch - this.prevRotationPitch >= 180.0F) {
|
||||
this.prevRotationPitch += 360.0F;
|
||||
}
|
||||
|
||||
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
|
||||
{
|
||||
this.prevRotationYaw -= 360.0F;
|
||||
}
|
||||
while(this.rotationYaw - this.prevRotationYaw < -180.0F) {
|
||||
this.prevRotationYaw -= 360.0F;
|
||||
}
|
||||
|
||||
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
|
||||
{
|
||||
this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
while(this.rotationYaw - this.prevRotationYaw >= 180.0F) {
|
||||
this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition p_70184_1_) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 500000;
|
||||
}
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return distance < 500000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,8 +14,11 @@ import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.handler.MissileStruct;
|
||||
import com.hbm.items.weapon.ItemMissile;
|
||||
import com.hbm.items.weapon.ItemMissile.FuelType;
|
||||
import com.hbm.items.weapon.ItemMissile.PartSize;
|
||||
import com.hbm.items.weapon.ItemMissile.WarheadType;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -31,7 +34,7 @@ import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarDetectable {
|
||||
|
||||
int startX;
|
||||
int startZ;
|
||||
@ -426,4 +429,26 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
|
||||
ItemMissile part = (ItemMissile) Item.getItemById(this.dataWatcher.getWatchableObjectInt(10));
|
||||
|
||||
PartSize top = part.top;
|
||||
PartSize bottom = part.bottom;
|
||||
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_10)
|
||||
return RadarTargetType.MISSILE_10;
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_15)
|
||||
return RadarTargetType.MISSILE_10_15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_15)
|
||||
return RadarTargetType.MISSILE_15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_20)
|
||||
return RadarTargetType.MISSILE_15_20;
|
||||
if(top == PartSize.SIZE_20 && bottom == PartSize.SIZE_20)
|
||||
return RadarTargetType.MISSILE_20;
|
||||
|
||||
return RadarTargetType.PLAYER;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,13 +3,13 @@ package com.hbm.entity.missile;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -25,33 +25,22 @@ public class EntityMissileMicro extends EntityMissileBaseAdvanced {
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
/*EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj);
|
||||
entity0.posX = this.posX;
|
||||
entity0.posY = this.posY;
|
||||
entity0.posZ = this.posZ;
|
||||
entity0.destructionRange = MainRegistry.fatmanRadius;
|
||||
entity0.speed = MainRegistry.blastSpeed;
|
||||
entity0.coefficient = 10.0F;*/
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.fatmanRadius, posX, posY, posZ));
|
||||
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
if(rand.nextInt(100) >= 0)
|
||||
{
|
||||
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
|
||||
} else {
|
||||
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
|
||||
}
|
||||
else
|
||||
if(rand.nextInt(100) == 0)
|
||||
{
|
||||
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
|
||||
} else {
|
||||
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
|
||||
}
|
||||
}
|
||||
if(!this.worldObj.isRemote) {
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.fatmanRadius, posX, posY, posZ));
|
||||
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
if(rand.nextInt(100) >= 0) {
|
||||
ExplosionParticleB.spawnMush(this.worldObj, (int) this.posX, (int) this.posY - 3, (int) this.posZ);
|
||||
} else {
|
||||
ExplosionParticle.spawnMush(this.worldObj, (int) this.posX, (int) this.posY - 3, (int) this.posZ);
|
||||
}
|
||||
else if(rand.nextInt(100) == 0) {
|
||||
ExplosionParticleB.spawnMush(this.worldObj, (int) this.posX, (int) this.posY - 3, (int) this.posZ);
|
||||
} else {
|
||||
ExplosionParticle.spawnMush(this.worldObj, (int) this.posX, (int) this.posY - 3, (int) this.posZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -63,7 +52,7 @@ public class EntityMissileMicro extends EntityMissileBaseAdvanced {
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.ducttape, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,11 @@ package com.hbm.entity.missile;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -25,9 +24,9 @@ public class EntityMissileMirv extends EntityMissileBaseAdvanced {
|
||||
@Override
|
||||
public void onImpact() {
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.missileRadius * 2, posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.missileRadius * 2, posX, posY, posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, MainRegistry.missileRadius * 2 * 0.005F);
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, BombConfig.missileRadius * 2 * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
entity2.posY = this.posY - 9;
|
||||
entity2.posZ = this.posZ;
|
||||
|
||||
@ -3,12 +3,11 @@ package com.hbm.entity.missile;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -24,21 +23,14 @@ public class EntityMissileNuclear extends EntityMissileBaseAdvanced {
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
/*EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj);
|
||||
entity.posX = this.posX;
|
||||
entity.posY = this.posY;
|
||||
entity.posZ = this.posZ;
|
||||
entity.destructionRange = MainRegistry.missileRadius;
|
||||
entity.speed = MainRegistry.blastSpeed;
|
||||
entity.coefficient = 10.0F;*/
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.missileRadius, posX, posY, posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, MainRegistry.missileRadius * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
entity2.posY = this.posY/* - 9*/;
|
||||
entity2.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(entity2);
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.missileRadius, posX, posY, posZ));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, BombConfig.missileRadius * 0.005F);
|
||||
entity2.posX = this.posX;
|
||||
entity2.posY = this.posY;
|
||||
entity2.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(entity2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -50,7 +42,7 @@ public class EntityMissileNuclear extends EntityMissileBaseAdvanced {
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 12));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,11 @@ package com.hbm.entity.missile;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -24,25 +23,24 @@ public class EntityMissileSchrabidium extends EntityMissileBaseAdvanced {
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
if(!this.worldObj.isRemote) {
|
||||
EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj);
|
||||
entity.posX = this.posX;
|
||||
entity.posY = this.posY;
|
||||
entity.posZ = this.posZ;
|
||||
entity.destructionRange = MainRegistry.aSchrabRadius;
|
||||
entity.destructionRange = BombConfig.aSchrabRadius;
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
this.worldObj.spawnEntityInWorld(entity);
|
||||
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(this.worldObj, MainRegistry.aSchrabRadius);
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(this.worldObj, BombConfig.aSchrabRadius);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(cloud);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,7 +52,7 @@ public class EntityMissileSchrabidium extends EntityMissileBaseAdvanced {
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.ducttape, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@ -22,12 +22,12 @@ import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisplayData {
|
||||
|
||||
public int courseChangeCooldown;
|
||||
public double waypointX;
|
||||
public double waypointY;
|
||||
public double waypointZ;
|
||||
private Entity targetedEntity;
|
||||
private int aggroCooldown;
|
||||
public int prevAttackCounter;
|
||||
public int attackCounter;
|
||||
public int mineDropCounter;
|
||||
@ -151,10 +151,6 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
|
||||
// this.worldObj.getClosestVulnerablePlayerToEntity(this,
|
||||
// 100.0D);
|
||||
this.targetedEntity = Library.getClosestEntityForChopper(worldObj, this.posX, this.posY, this.posZ, 250);
|
||||
|
||||
if (this.targetedEntity != null) {
|
||||
this.aggroCooldown = 20;
|
||||
}
|
||||
}
|
||||
|
||||
double d4 = 64.0D;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package com.hbm.entity.mob;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.mob.ai.EntityAITaintedCreeperSwell;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -29,352 +29,257 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityTaintedCreeper extends EntityMob {
|
||||
/**
|
||||
* Time when this creeper was last in an active state (Messed up code here, probably causes creeper animation to go
|
||||
* weird)
|
||||
*/
|
||||
private int lastActiveTime;
|
||||
/** The amount of time since the creeper was close enough to the player to ignite */
|
||||
private int timeSinceIgnited;
|
||||
private int fuseTime = 30;
|
||||
/** Explosion radius for this creeper. */
|
||||
private int explosionRadius = 20;
|
||||
private static final String __OBFID = "CL_00001684";
|
||||
|
||||
public EntityTaintedCreeper(World p_i1733_1_)
|
||||
{
|
||||
super(p_i1733_1_);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, new EntityAITaintedCreeperSwell(this));
|
||||
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, false));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 0.8D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
|
||||
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
|
||||
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityOcelot.class, 0, true));
|
||||
}
|
||||
private int lastActiveTime;
|
||||
private int timeSinceIgnited;
|
||||
private int fuseTime = 30;
|
||||
private int explosionRadius = 20;
|
||||
|
||||
@Override
|
||||
protected void applyEntityAttributes()
|
||||
{
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(15.0D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.35D);
|
||||
}
|
||||
public EntityTaintedCreeper(World p_i1733_1_) {
|
||||
super(p_i1733_1_);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, new EntityAITaintedCreeperSwell(this));
|
||||
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, false));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 0.8D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
|
||||
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
|
||||
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityOcelot.class, 0, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the newer Entity AI code should be run
|
||||
*/
|
||||
@Override
|
||||
public boolean isAIEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(15.0D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.35D);
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of iterations PathFinder.getSafePoint will execute before giving up.
|
||||
*/
|
||||
@Override
|
||||
public int getMaxSafePointTries()
|
||||
{
|
||||
return this.getAttackTarget() == null ? 3 : 3 + (int)(this.getHealth() - 1.0F);
|
||||
}
|
||||
@Override
|
||||
public boolean isAIEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the mob is falling. Calculates and applies fall damage.
|
||||
*/
|
||||
@Override
|
||||
protected void fall(float p_70069_1_)
|
||||
{
|
||||
super.fall(p_70069_1_);
|
||||
this.timeSinceIgnited = (int)(this.timeSinceIgnited + p_70069_1_ * 1.5F);
|
||||
@Override
|
||||
public int getMaxSafePointTries() {
|
||||
return this.getAttackTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
|
||||
}
|
||||
|
||||
if (this.timeSinceIgnited > this.fuseTime - 5)
|
||||
{
|
||||
this.timeSinceIgnited = this.fuseTime - 5;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void fall(float p_70069_1_) {
|
||||
super.fall(p_70069_1_);
|
||||
this.timeSinceIgnited = (int) (this.timeSinceIgnited + p_70069_1_ * 1.5F);
|
||||
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte) - 1));
|
||||
this.dataWatcher.addObject(17, Byte.valueOf((byte)0));
|
||||
this.dataWatcher.addObject(18, Byte.valueOf((byte)0));
|
||||
}
|
||||
if(this.timeSinceIgnited > this.fuseTime - 5) {
|
||||
this.timeSinceIgnited = this.fuseTime - 5;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
|
||||
{
|
||||
super.writeEntityToNBT(p_70014_1_);
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte) -1));
|
||||
this.dataWatcher.addObject(17, Byte.valueOf((byte) 0));
|
||||
this.dataWatcher.addObject(18, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
if (this.dataWatcher.getWatchableObjectByte(17) == 1)
|
||||
{
|
||||
p_70014_1_.setBoolean("powered", true);
|
||||
}
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
super.writeEntityToNBT(p_70014_1_);
|
||||
|
||||
p_70014_1_.setShort("Fuse", (short)this.fuseTime);
|
||||
p_70014_1_.setByte("ExplosionRadius", (byte)this.explosionRadius);
|
||||
p_70014_1_.setBoolean("ignited", this.func_146078_ca());
|
||||
}
|
||||
if(this.dataWatcher.getWatchableObjectByte(17) == 1) {
|
||||
p_70014_1_.setBoolean("powered", true);
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
|
||||
{
|
||||
super.readEntityFromNBT(p_70037_1_);
|
||||
this.dataWatcher.updateObject(17, Byte.valueOf((byte)(p_70037_1_.getBoolean("powered") ? 1 : 0)));
|
||||
p_70014_1_.setShort("Fuse", (short) this.fuseTime);
|
||||
p_70014_1_.setByte("ExplosionRadius", (byte) this.explosionRadius);
|
||||
p_70014_1_.setBoolean("ignited", this.func_146078_ca());
|
||||
}
|
||||
|
||||
if (p_70037_1_.hasKey("Fuse", 99))
|
||||
{
|
||||
this.fuseTime = p_70037_1_.getShort("Fuse");
|
||||
}
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
super.readEntityFromNBT(p_70037_1_);
|
||||
this.dataWatcher.updateObject(17, Byte.valueOf((byte) (p_70037_1_.getBoolean("powered") ? 1 : 0)));
|
||||
|
||||
if (p_70037_1_.hasKey("ExplosionRadius", 99))
|
||||
{
|
||||
this.explosionRadius = p_70037_1_.getByte("ExplosionRadius");
|
||||
}
|
||||
if(p_70037_1_.hasKey("Fuse", 99)) {
|
||||
this.fuseTime = p_70037_1_.getShort("Fuse");
|
||||
}
|
||||
|
||||
if (p_70037_1_.getBoolean("ignited"))
|
||||
{
|
||||
this.func_146079_cb();
|
||||
}
|
||||
}
|
||||
if(p_70037_1_.hasKey("ExplosionRadius", 99)) {
|
||||
this.explosionRadius = p_70037_1_.getByte("ExplosionRadius");
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
if (this.isEntityAlive())
|
||||
{
|
||||
this.lastActiveTime = this.timeSinceIgnited;
|
||||
if(p_70037_1_.getBoolean("ignited")) {
|
||||
this.func_146079_cb();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.func_146078_ca())
|
||||
{
|
||||
this.setCreeperState(1);
|
||||
}
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
if(this.isEntityAlive()) {
|
||||
this.lastActiveTime = this.timeSinceIgnited;
|
||||
|
||||
int i = this.getCreeperState();
|
||||
if(this.func_146078_ca()) {
|
||||
this.setCreeperState(1);
|
||||
}
|
||||
|
||||
if (i > 0 && this.timeSinceIgnited == 0)
|
||||
{
|
||||
this.playSound("creeper.primed", 1.0F * 30 / 75, 0.5F);
|
||||
}
|
||||
int i = this.getCreeperState();
|
||||
|
||||
this.timeSinceIgnited += i;
|
||||
if(i > 0 && this.timeSinceIgnited == 0) {
|
||||
this.playSound("creeper.primed", 1.0F * 30 / 75, 0.5F);
|
||||
}
|
||||
|
||||
if (this.timeSinceIgnited < 0)
|
||||
{
|
||||
this.timeSinceIgnited = 0;
|
||||
}
|
||||
this.timeSinceIgnited += i;
|
||||
|
||||
if (this.timeSinceIgnited >= this.fuseTime)
|
||||
{
|
||||
this.timeSinceIgnited = this.fuseTime;
|
||||
this.func_146077_cc();
|
||||
}
|
||||
}
|
||||
if(this.timeSinceIgnited < 0) {
|
||||
this.timeSinceIgnited = 0;
|
||||
}
|
||||
|
||||
super.onUpdate();
|
||||
|
||||
if(this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0)
|
||||
{
|
||||
this.heal(1.0F);
|
||||
}
|
||||
}
|
||||
if(this.timeSinceIgnited >= this.fuseTime) {
|
||||
this.timeSinceIgnited = this.fuseTime;
|
||||
this.func_146077_cc();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the sound this mob makes when it is hurt.
|
||||
*/
|
||||
@Override
|
||||
protected String getHurtSound()
|
||||
{
|
||||
return "mob.creeper.say";
|
||||
}
|
||||
super.onUpdate();
|
||||
|
||||
/**
|
||||
* Returns the sound this mob makes on death.
|
||||
*/
|
||||
@Override
|
||||
protected String getDeathSound()
|
||||
{
|
||||
return "mob.creeper.death";
|
||||
}
|
||||
if(this.getHealth() < this.getMaxHealth() && this.ticksExisted % 10 == 0) {
|
||||
this.heal(1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the mob's health reaches 0.
|
||||
*/
|
||||
@Override
|
||||
public void onDeath(DamageSource p_70645_1_)
|
||||
{
|
||||
super.onDeath(p_70645_1_);
|
||||
}
|
||||
@Override
|
||||
protected String getHurtSound() {
|
||||
return "mob.creeper.say";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity p_70652_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected String getDeathSound() {
|
||||
return "mob.creeper.death";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the creeper is powered by a lightning bolt.
|
||||
*/
|
||||
public boolean getPowered()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(17) == 1;
|
||||
}
|
||||
@Override
|
||||
public void onDeath(DamageSource p_70645_1_) {
|
||||
super.onDeath(p_70645_1_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Params: (Float)Render tick. Returns the intensity of the creeper's flash when it is ignited.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getCreeperFlashIntensity(float p_70831_1_)
|
||||
{
|
||||
return (this.lastActiveTime + (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (this.fuseTime - 2);
|
||||
}
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity p_70652_1_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Item getDropItem()
|
||||
{
|
||||
return Item.getItemFromBlock(Blocks.tnt);
|
||||
}
|
||||
public boolean getPowered() {
|
||||
return this.dataWatcher.getWatchableObjectByte(17) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current state of creeper, -1 is idle, 1 is 'in fuse'
|
||||
*/
|
||||
public int getCreeperState()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(16);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getCreeperFlashIntensity(float p_70831_1_) {
|
||||
return (this.lastActiveTime + (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (this.fuseTime - 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the state of creeper, -1 to idle and 1 to be 'in fuse'
|
||||
*/
|
||||
public void setCreeperState(int p_70829_1_)
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte)p_70829_1_));
|
||||
}
|
||||
@Override
|
||||
protected Item getDropItem() {
|
||||
return Item.getItemFromBlock(Blocks.tnt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a lightning bolt hits the entity.
|
||||
*/
|
||||
@Override
|
||||
public void onStruckByLightning(EntityLightningBolt p_70077_1_)
|
||||
{
|
||||
super.onStruckByLightning(p_70077_1_);
|
||||
this.dataWatcher.updateObject(17, Byte.valueOf((byte)1));
|
||||
}
|
||||
public int getCreeperState() {
|
||||
return this.dataWatcher.getWatchableObjectByte(16);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
|
||||
*/
|
||||
@Override
|
||||
protected boolean interact(EntityPlayer p_70085_1_)
|
||||
{
|
||||
ItemStack itemstack = p_70085_1_.inventory.getCurrentItem();
|
||||
public void setCreeperState(int p_70829_1_) {
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte) p_70829_1_));
|
||||
}
|
||||
|
||||
if (itemstack != null && itemstack.getItem() == Items.flint_and_steel)
|
||||
{
|
||||
this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.ignite", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F);
|
||||
p_70085_1_.swingItem();
|
||||
@Override
|
||||
public void onStruckByLightning(EntityLightningBolt p_70077_1_) {
|
||||
super.onStruckByLightning(p_70077_1_);
|
||||
this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1));
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.func_146079_cb();
|
||||
itemstack.damageItem(1, p_70085_1_);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected boolean interact(EntityPlayer p_70085_1_) {
|
||||
ItemStack itemstack = p_70085_1_.inventory.getCurrentItem();
|
||||
|
||||
return super.interact(p_70085_1_);
|
||||
}
|
||||
if(itemstack != null && itemstack.getItem() == Items.flint_and_steel) {
|
||||
this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.ignite", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F);
|
||||
p_70085_1_.swingItem();
|
||||
|
||||
private void func_146077_cc()
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing");
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.func_146079_cb();
|
||||
itemstack.damageItem(1, p_70085_1_);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getPowered())
|
||||
{
|
||||
this.explosionRadius *= 3;
|
||||
}
|
||||
|
||||
worldObj.newExplosion(this, posX, posY, posZ, 5.0F, false, false);
|
||||
|
||||
if(this.getPowered())
|
||||
{
|
||||
|
||||
for(int i = 0; i < 255; i++) {
|
||||
int a = rand.nextInt(15) + (int)posX - 7;
|
||||
int b = rand.nextInt(15) + (int)posY - 7;
|
||||
int c = rand.nextInt(15) + (int)posZ - 7;
|
||||
if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) {
|
||||
|
||||
if(!MainRegistry.enableHardcoreTaint)
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 5, 2);
|
||||
else
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3), 2);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
for(int i = 0; i < 85; i++) {
|
||||
int a = rand.nextInt(7) + (int)posX - 3;
|
||||
int b = rand.nextInt(7) + (int)posY - 3;
|
||||
int c = rand.nextInt(7) + (int)posZ - 3;
|
||||
if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) {
|
||||
|
||||
if(!MainRegistry.enableHardcoreTaint)
|
||||
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(6) + 10, 2);
|
||||
else
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 4, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.interact(p_70085_1_);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean hasPosNeightbour(World world, int x, int y, int z) {
|
||||
Block b0 = world.getBlock(x + 1, y, z);
|
||||
Block b1 = world.getBlock(x, y + 1, z);
|
||||
Block b2 = world.getBlock(x, y, z + 1);
|
||||
Block b3 = world.getBlock(x - 1, y, z);
|
||||
Block b4 = world.getBlock(x, y - 1, z);
|
||||
Block b5 = world.getBlock(x, y, z - 1);
|
||||
boolean b = (b0.renderAsNormalBlock() && b0.getMaterial().isOpaque()) ||
|
||||
(b1.renderAsNormalBlock() && b1.getMaterial().isOpaque()) ||
|
||||
(b2.renderAsNormalBlock() && b2.getMaterial().isOpaque()) ||
|
||||
(b3.renderAsNormalBlock() && b3.getMaterial().isOpaque()) ||
|
||||
(b4.renderAsNormalBlock() && b4.getMaterial().isOpaque()) ||
|
||||
(b5.renderAsNormalBlock() && b5.getMaterial().isOpaque());
|
||||
return b;
|
||||
}
|
||||
private void func_146077_cc() {
|
||||
if(!this.worldObj.isRemote) {
|
||||
this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing");
|
||||
|
||||
public boolean func_146078_ca()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(18) != 0;
|
||||
}
|
||||
if(this.getPowered()) {
|
||||
this.explosionRadius *= 3;
|
||||
}
|
||||
|
||||
public void func_146079_cb()
|
||||
{
|
||||
this.dataWatcher.updateObject(18, Byte.valueOf((byte)1));
|
||||
}
|
||||
|
||||
public void setPowered(int power) {
|
||||
this.dataWatcher.updateObject(17, power);
|
||||
}
|
||||
worldObj.newExplosion(this, posX, posY, posZ, 5.0F, false, false);
|
||||
|
||||
if(this.getPowered()) {
|
||||
|
||||
for(int i = 0; i < 255; i++) {
|
||||
int a = rand.nextInt(15) + (int) posX - 7;
|
||||
int b = rand.nextInt(15) + (int) posY - 7;
|
||||
int c = rand.nextInt(15) + (int) posZ - 7;
|
||||
if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) {
|
||||
|
||||
if(!GeneralConfig.enableHardcoreTaint)
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 5, 2);
|
||||
else
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3), 2);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
for(int i = 0; i < 85; i++) {
|
||||
int a = rand.nextInt(7) + (int) posX - 3;
|
||||
int b = rand.nextInt(7) + (int) posY - 3;
|
||||
int c = rand.nextInt(7) + (int) posZ - 3;
|
||||
if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && hasPosNeightbour(worldObj, a, b, c)) {
|
||||
|
||||
if(!GeneralConfig.enableHardcoreTaint)
|
||||
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(6) + 10, 2);
|
||||
else
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint, rand.nextInt(3) + 4, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean hasPosNeightbour(World world, int x, int y, int z) {
|
||||
Block b0 = world.getBlock(x + 1, y, z);
|
||||
Block b1 = world.getBlock(x, y + 1, z);
|
||||
Block b2 = world.getBlock(x, y, z + 1);
|
||||
Block b3 = world.getBlock(x - 1, y, z);
|
||||
Block b4 = world.getBlock(x, y - 1, z);
|
||||
Block b5 = world.getBlock(x, y, z - 1);
|
||||
boolean b = (b0.renderAsNormalBlock() && b0.getMaterial().isOpaque()) || (b1.renderAsNormalBlock() && b1.getMaterial().isOpaque()) || (b2.renderAsNormalBlock() && b2.getMaterial().isOpaque()) || (b3.renderAsNormalBlock() && b3.getMaterial().isOpaque()) || (b4.renderAsNormalBlock() && b4.getMaterial().isOpaque()) || (b5.renderAsNormalBlock() && b5.getMaterial().isOpaque());
|
||||
return b;
|
||||
}
|
||||
|
||||
public boolean func_146078_ca() {
|
||||
return this.dataWatcher.getWatchableObjectByte(18) != 0;
|
||||
}
|
||||
|
||||
public void func_146079_cb() {
|
||||
this.dataWatcher.updateObject(18, Byte.valueOf((byte) 1));
|
||||
}
|
||||
|
||||
public void setPowered(int power) {
|
||||
this.dataWatcher.updateObject(17, power);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity.projectile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.entity.particle.EntitySSmokeFX;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
@ -46,7 +47,6 @@ public class EntityBaleflare extends Entity implements IProjectile {
|
||||
private double damage = 2.0D;
|
||||
/** The amount of knockback an arrow applies when it hits a mob. */
|
||||
private int knockbackStrength;
|
||||
private static final String __OBFID = "CL_00001715";
|
||||
|
||||
public EntityBaleflare(World p_i1753_1_)
|
||||
{
|
||||
@ -247,7 +247,7 @@ public class EntityBaleflare extends Entity implements IProjectile {
|
||||
bf.posX = this.posX;
|
||||
bf.posY = this.posY;
|
||||
bf.posZ = this.posZ;
|
||||
bf.destructionRange = MainRegistry.fatmanRadius;
|
||||
bf.destructionRange = BombConfig.fatmanRadius;
|
||||
worldObj.spawnEntityInWorld(bf);
|
||||
|
||||
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
@ -69,7 +70,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) (MainRegistry.fatmanRadius * 1.5), posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int) (BombConfig.fatmanRadius * 1.5), posX, posY, posZ));
|
||||
|
||||
if(rand.nextInt(100) == 0)
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.world.feature.Meteorite;
|
||||
@ -47,7 +48,7 @@ public class EntityMeteor extends EntityThrowable {
|
||||
{
|
||||
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5 + rand.nextFloat(), true);
|
||||
|
||||
if(MainRegistry.enableMeteorTails) {
|
||||
if(GeneralConfig.enableMeteorTails) {
|
||||
ExplosionLarge.spawnParticles(worldObj, posX, posY + 5, posZ, 75);
|
||||
ExplosionLarge.spawnParticles(worldObj, posX + 5, posY, posZ, 75);
|
||||
ExplosionLarge.spawnParticles(worldObj, posX - 5, posY, posZ, 75);
|
||||
@ -61,7 +62,7 @@ public class EntityMeteor extends EntityThrowable {
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
if(MainRegistry.enableMeteorTails && worldObj.isRemote) {
|
||||
if(GeneralConfig.enableMeteorTails && worldObj.isRemote) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "exhaust");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@ package com.hbm.entity.projectile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
@ -47,7 +48,6 @@ public class EntityMiniNuke extends Entity implements IProjectile
|
||||
private double damage = 2.0D;
|
||||
/** The amount of knockback an arrow applies when it hits a mob. */
|
||||
private int knockbackStrength;
|
||||
private static final String __OBFID = "CL_00001715";
|
||||
|
||||
|
||||
public EntityMiniNuke(World p_i1753_1_)
|
||||
@ -237,7 +237,7 @@ public class EntityMiniNuke extends Entity implements IProjectile
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.fatmanRadius, posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.fatmanRadius, posX, posY, posZ));
|
||||
|
||||
//Perma-baleflare mode if the polaroid's glitched
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
@ -378,7 +378,7 @@ public class EntityMiniNuke extends Entity implements IProjectile
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.fatmanRadius, posX, posY, posZ));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, BombConfig.fatmanRadius, posX, posY, posZ));
|
||||
|
||||
if(rand.nextInt(100) == 0)
|
||||
{
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity.projectile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
@ -11,7 +12,6 @@ import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -30,471 +30,405 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityModBeam extends Entity implements IProjectile
|
||||
{
|
||||
private int field_145791_d = -1;
|
||||
private int field_145792_e = -1;
|
||||
private int field_145789_f = -1;
|
||||
public double gravity = 0.0D;
|
||||
private Block field_145790_g;
|
||||
private int inData;
|
||||
private boolean inGround;
|
||||
/** 1 if the player can pick up the arrow */
|
||||
public int canBePickedUp;
|
||||
/** Seems to be some sort of timer for animating an arrow. */
|
||||
public int arrowShake;
|
||||
/** The owner of this arrow. */
|
||||
public Entity shootingEntity;
|
||||
private int ticksInGround;
|
||||
private int ticksInAir;
|
||||
private double damage = 2.0D;
|
||||
/** The amount of knockback an arrow applies when it hits a mob. */
|
||||
private int knockbackStrength;
|
||||
private static final String __OBFID = "CL_00001715";
|
||||
public int mode = 0;
|
||||
|
||||
|
||||
public EntityModBeam(World p_i1753_1_)
|
||||
{
|
||||
super(p_i1753_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
}
|
||||
|
||||
public EntityModBeam(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_)
|
||||
{
|
||||
super(p_i1754_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_);
|
||||
this.yOffset = 0.0F;
|
||||
}
|
||||
|
||||
public EntityModBeam(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_)
|
||||
{
|
||||
super(p_i1755_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1755_2_;
|
||||
|
||||
if (p_i1755_2_ instanceof EntityPlayer)
|
||||
{
|
||||
this.canBePickedUp = 1;
|
||||
}
|
||||
|
||||
this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D;
|
||||
double d0 = p_i1755_3_.posX - p_i1755_2_.posX;
|
||||
double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY;
|
||||
double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ;
|
||||
double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2);
|
||||
|
||||
if (d3 >= 1.0E-7D)
|
||||
{
|
||||
float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
|
||||
float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI));
|
||||
double d4 = d0 / d3;
|
||||
double d5 = d2 / d3;
|
||||
this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3);
|
||||
this.yOffset = 0.0F;
|
||||
float f4 = (float)d3 * 0.2F;
|
||||
this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_);
|
||||
}
|
||||
}
|
||||
public class EntityModBeam extends Entity implements IProjectile {
|
||||
|
||||
private int field_145791_d = -1;
|
||||
private int field_145792_e = -1;
|
||||
private int field_145789_f = -1;
|
||||
public double gravity = 0.0D;
|
||||
private Block field_145790_g;
|
||||
private int inData;
|
||||
private boolean inGround;
|
||||
public int canBePickedUp;
|
||||
public int arrowShake;
|
||||
public Entity shootingEntity;
|
||||
private int ticksInGround;
|
||||
private int ticksInAir;
|
||||
private double damage = 2.0D;
|
||||
public int mode = 0;
|
||||
|
||||
public EntityModBeam(World p_i1753_1_) {
|
||||
super(p_i1753_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
}
|
||||
|
||||
public EntityModBeam(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) {
|
||||
super(p_i1754_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_);
|
||||
this.yOffset = 0.0F;
|
||||
}
|
||||
|
||||
public EntityModBeam(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) {
|
||||
super(p_i1755_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1755_2_;
|
||||
|
||||
if(p_i1755_2_ instanceof EntityPlayer) {
|
||||
this.canBePickedUp = 1;
|
||||
}
|
||||
|
||||
this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D;
|
||||
double d0 = p_i1755_3_.posX - p_i1755_2_.posX;
|
||||
double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY;
|
||||
double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ;
|
||||
double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2);
|
||||
|
||||
if(d3 >= 1.0E-7D) {
|
||||
float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
|
||||
float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI));
|
||||
double d4 = d0 / d3;
|
||||
double d5 = d2 / d3;
|
||||
this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3);
|
||||
this.yOffset = 0.0F;
|
||||
float f4 = (float) d3 * 0.2F;
|
||||
this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_);
|
||||
}
|
||||
}
|
||||
|
||||
public EntityModBeam(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, EntityGrenadeZOMG grenade) {
|
||||
super(p_i1756_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1756_2_;
|
||||
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setLocationAndAngles(grenade.posX, grenade.posY + grenade.getEyeHeight(), grenade.posZ,
|
||||
grenade.rotationYaw, grenade.rotationPitch);
|
||||
this.setLocationAndAngles(grenade.posX, grenade.posY + grenade.getEyeHeight(), grenade.posZ, grenade.rotationYaw, grenade.rotationPitch);
|
||||
this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||
this.posY -= 0.10000000149011612D;
|
||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.yOffset = 0.0F;
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI)
|
||||
* MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI)
|
||||
* MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
|
||||
}
|
||||
|
||||
public EntityModBeam(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_)
|
||||
{
|
||||
super(p_i1756_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1756_2_;
|
||||
public EntityModBeam(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) {
|
||||
super(p_i1756_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1756_2_;
|
||||
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch);
|
||||
this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
this.posY -= 0.10000000149011612D;
|
||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.yOffset = 0.0F;
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI);
|
||||
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
|
||||
}
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch);
|
||||
this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||
this.posY -= 0.10000000149011612D;
|
||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.yOffset = 0.0F;
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
|
||||
}
|
||||
|
||||
public EntityModBeam(World world, int x, int y, int z, double mx, double my, double mz, double grav) {
|
||||
super(world);
|
||||
this.posX = x + 0.5F;
|
||||
this.posY = y + 0.5F;
|
||||
this.posZ = z + 0.5F;
|
||||
|
||||
this.motionX = mx;
|
||||
this.motionY = my;
|
||||
this.motionZ = mz;
|
||||
|
||||
this.gravity = grav;
|
||||
}
|
||||
public EntityModBeam(World world, int x, int y, int z, double mx, double my, double mz, double grav) {
|
||||
super(world);
|
||||
this.posX = x + 0.5F;
|
||||
this.posY = y + 0.5F;
|
||||
this.posZ = z + 0.5F;
|
||||
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
|
||||
}
|
||||
this.motionX = mx;
|
||||
this.motionY = my;
|
||||
this.motionZ = mz;
|
||||
|
||||
/**
|
||||
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
|
||||
*/
|
||||
@Override
|
||||
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
|
||||
{
|
||||
float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_);
|
||||
p_70186_1_ /= f2;
|
||||
p_70186_3_ /= f2;
|
||||
p_70186_5_ /= f2;
|
||||
p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_;
|
||||
p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_;
|
||||
p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_;
|
||||
p_70186_1_ *= p_70186_7_;
|
||||
p_70186_3_ *= p_70186_7_;
|
||||
p_70186_5_ *= p_70186_7_;
|
||||
this.motionX = p_70186_1_;
|
||||
this.motionY = p_70186_3_;
|
||||
this.motionZ = p_70186_5_;
|
||||
float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
this.gravity = grav;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
|
||||
* posY, posZ, yaw, pitch
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z
|
||||
* direction.
|
||||
*/
|
||||
@Override
|
||||
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) {
|
||||
float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_);
|
||||
p_70186_1_ /= f2;
|
||||
p_70186_3_ /= f2;
|
||||
p_70186_5_ /= f2;
|
||||
p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_;
|
||||
p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_;
|
||||
p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_;
|
||||
p_70186_1_ *= p_70186_7_;
|
||||
p_70186_3_ *= p_70186_7_;
|
||||
p_70186_5_ *= p_70186_7_;
|
||||
this.motionX = p_70186_1_;
|
||||
this.motionY = p_70186_3_;
|
||||
this.motionZ = p_70186_5_;
|
||||
float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the position and rotation. Only difference from the other one is no
|
||||
* bounding on the rotation. Args: posX, posY, posZ, yaw, pitch
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_)
|
||||
{
|
||||
this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
|
||||
this.setRotation(p_70056_7_, p_70056_8_);
|
||||
}
|
||||
public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) {
|
||||
this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
|
||||
this.setRotation(p_70056_7_, p_70056_8_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the velocity to the args. Args: x, y, z
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* Sets the velocity to the args. Args: x, y, z
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
|
||||
{
|
||||
this.motionX = p_70016_1_;
|
||||
this.motionY = p_70016_3_;
|
||||
this.motionZ = p_70016_5_;
|
||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) {
|
||||
this.motionX = p_70016_1_;
|
||||
this.motionY = p_70016_3_;
|
||||
this.motionZ = p_70016_5_;
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch;
|
||||
this.prevRotationYaw = this.rotationYaw;
|
||||
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
}
|
||||
if(this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
|
||||
float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(p_70016_3_, f) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch;
|
||||
this.prevRotationYaw = this.rotationYaw;
|
||||
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
//@Override
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if(this.ticksExisted > 100)
|
||||
this.setDead();
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
// @Override
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
//this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
|
||||
}
|
||||
if(this.ticksExisted > 100)
|
||||
this.setDead();
|
||||
|
||||
Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
if(this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
|
||||
MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
// this.prevRotationPitch = this.rotationPitch =
|
||||
// (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
|
||||
}
|
||||
|
||||
if (block.getMaterial() != Material.air)
|
||||
{
|
||||
block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.setDead();
|
||||
explode();
|
||||
}
|
||||
Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
|
||||
if (this.arrowShake > 0)
|
||||
{
|
||||
--this.arrowShake;
|
||||
}
|
||||
else
|
||||
{
|
||||
++this.ticksInAir;
|
||||
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
|
||||
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
if(block.getMaterial() != Material.air) {
|
||||
block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.setDead();
|
||||
explode();
|
||||
}
|
||||
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
if(this.arrowShake > 0) {
|
||||
--this.arrowShake;
|
||||
} else {
|
||||
++this.ticksInAir;
|
||||
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
|
||||
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
|
||||
Entity entity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
double d0 = 0.0D;
|
||||
int i;
|
||||
float f1;
|
||||
if(movingobjectposition != null) {
|
||||
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
|
||||
for (i = 0; i < list.size(); ++i)
|
||||
{
|
||||
Entity entity1 = (Entity)list.get(i);
|
||||
Entity entity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
double d0 = 0.0D;
|
||||
int i;
|
||||
float f1;
|
||||
|
||||
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
|
||||
{
|
||||
f1 = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
|
||||
for(i = 0; i < list.size(); ++i) {
|
||||
Entity entity1 = (Entity) list.get(i);
|
||||
|
||||
if (movingobjectposition1 != null)
|
||||
{
|
||||
double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
|
||||
if(entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
|
||||
f1 = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
|
||||
|
||||
if (d1 < d0 || d0 == 0.0D)
|
||||
{
|
||||
entity = entity1;
|
||||
d0 = d1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(movingobjectposition1 != null) {
|
||||
double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
if(d1 < d0 || d0 == 0.0D) {
|
||||
entity = entity1;
|
||||
d0 = d1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit;
|
||||
|
||||
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
|
||||
{
|
||||
movingobjectposition = null;
|
||||
}
|
||||
}
|
||||
if(entity != null) {
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
|
||||
float f2;
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
if (movingobjectposition.entityHit != null && movingobjectposition.entityHit != this.shootingEntity)
|
||||
{
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
int k = MathHelper.ceiling_double_int(f2 * this.damage);
|
||||
if(movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
|
||||
|
||||
if (this.getIsCritical())
|
||||
{
|
||||
k += this.rand.nextInt(k / 2 + 2);
|
||||
}
|
||||
|
||||
if(movingobjectposition.entityHit instanceof EntityLivingBase) {
|
||||
((EntityLivingBase)movingobjectposition.entityHit).addPotionEffect(new PotionEffect(HbmPotion.bang.id, 60, 0));
|
||||
} else {
|
||||
explode();
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_145791_d = movingobjectposition.blockX;
|
||||
this.field_145792_e = movingobjectposition.blockY;
|
||||
this.field_145789_f = movingobjectposition.blockZ;
|
||||
this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
}
|
||||
}
|
||||
if(entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) {
|
||||
movingobjectposition = null;
|
||||
}
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
float f2;
|
||||
if(movingobjectposition != null) {
|
||||
if(movingobjectposition.entityHit != null && movingobjectposition.entityHit != this.shootingEntity) {
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
int k = MathHelper.ceiling_double_int(f2 * this.damage);
|
||||
|
||||
f1 = 0.05F;
|
||||
if(this.getIsCritical()) {
|
||||
k += this.rand.nextInt(k / 2 + 2);
|
||||
}
|
||||
|
||||
if (this.isInWater())
|
||||
{
|
||||
this.setDead();
|
||||
explode();
|
||||
}
|
||||
if(movingobjectposition.entityHit instanceof EntityLivingBase) {
|
||||
((EntityLivingBase) movingobjectposition.entityHit).addPotionEffect(new PotionEffect(HbmPotion.bang.id, 60, 0));
|
||||
} else {
|
||||
explode();
|
||||
}
|
||||
|
||||
if (this.isWet())
|
||||
{
|
||||
this.extinguish();
|
||||
}
|
||||
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.func_145775_I();
|
||||
}
|
||||
}
|
||||
this.setDead();
|
||||
} else {
|
||||
this.field_145791_d = movingobjectposition.blockX;
|
||||
this.field_145792_e = movingobjectposition.blockY;
|
||||
this.field_145789_f = movingobjectposition.blockZ;
|
||||
this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
|
||||
{
|
||||
p_70014_1_.setShort("xTile", (short)this.field_145791_d);
|
||||
p_70014_1_.setShort("yTile", (short)this.field_145792_e);
|
||||
p_70014_1_.setShort("zTile", (short)this.field_145789_f);
|
||||
p_70014_1_.setShort("life", (short)this.ticksInGround);
|
||||
p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g));
|
||||
p_70014_1_.setByte("inData", (byte)this.inData);
|
||||
p_70014_1_.setByte("shake", (byte)this.arrowShake);
|
||||
p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0));
|
||||
p_70014_1_.setByte("pickup", (byte)this.canBePickedUp);
|
||||
p_70014_1_.setDouble("damage", this.damage);
|
||||
p_70014_1_.setInteger("mode", this.mode);
|
||||
}
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
|
||||
{
|
||||
this.field_145791_d = p_70037_1_.getShort("xTile");
|
||||
this.field_145792_e = p_70037_1_.getShort("yTile");
|
||||
this.field_145789_f = p_70037_1_.getShort("zTile");
|
||||
this.ticksInGround = p_70037_1_.getShort("life");
|
||||
this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
|
||||
this.inData = p_70037_1_.getByte("inData") & 255;
|
||||
this.arrowShake = p_70037_1_.getByte("shake") & 255;
|
||||
this.inGround = p_70037_1_.getByte("inGround") == 1;
|
||||
this.mode = p_70037_1_.getInteger("mode");
|
||||
f1 = 0.05F;
|
||||
|
||||
if (p_70037_1_.hasKey("damage", 99))
|
||||
{
|
||||
this.damage = p_70037_1_.getDouble("damage");
|
||||
}
|
||||
if(this.isInWater()) {
|
||||
this.setDead();
|
||||
explode();
|
||||
}
|
||||
|
||||
if (p_70037_1_.hasKey("pickup", 99))
|
||||
{
|
||||
this.canBePickedUp = p_70037_1_.getByte("pickup");
|
||||
}
|
||||
else if (p_70037_1_.hasKey("player", 99))
|
||||
{
|
||||
this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
|
||||
}
|
||||
}
|
||||
if(this.isWet()) {
|
||||
this.extinguish();
|
||||
}
|
||||
|
||||
/**
|
||||
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
|
||||
* prevent them from trampling crops
|
||||
*/
|
||||
@Override
|
||||
protected boolean canTriggerWalking()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.func_145775_I();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
p_70014_1_.setShort("xTile", (short) this.field_145791_d);
|
||||
p_70014_1_.setShort("yTile", (short) this.field_145792_e);
|
||||
p_70014_1_.setShort("zTile", (short) this.field_145789_f);
|
||||
p_70014_1_.setShort("life", (short) this.ticksInGround);
|
||||
p_70014_1_.setByte("inTile", (byte) Block.getIdFromBlock(this.field_145790_g));
|
||||
p_70014_1_.setByte("inData", (byte) this.inData);
|
||||
p_70014_1_.setByte("shake", (byte) this.arrowShake);
|
||||
p_70014_1_.setByte("inGround", (byte) (this.inGround ? 1 : 0));
|
||||
p_70014_1_.setByte("pickup", (byte) this.canBePickedUp);
|
||||
p_70014_1_.setDouble("damage", this.damage);
|
||||
p_70014_1_.setInteger("mode", this.mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
this.field_145791_d = p_70037_1_.getShort("xTile");
|
||||
this.field_145792_e = p_70037_1_.getShort("yTile");
|
||||
this.field_145789_f = p_70037_1_.getShort("zTile");
|
||||
this.ticksInGround = p_70037_1_.getShort("life");
|
||||
this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
|
||||
this.inData = p_70037_1_.getByte("inData") & 255;
|
||||
this.arrowShake = p_70037_1_.getByte("shake") & 255;
|
||||
this.inGround = p_70037_1_.getByte("inGround") == 1;
|
||||
this.mode = p_70037_1_.getInteger("mode");
|
||||
|
||||
if(p_70037_1_.hasKey("damage", 99)) {
|
||||
this.damage = p_70037_1_.getDouble("damage");
|
||||
}
|
||||
|
||||
if(p_70037_1_.hasKey("pickup", 99)) {
|
||||
this.canBePickedUp = p_70037_1_.getByte("pickup");
|
||||
} else if(p_70037_1_.hasKey("player", 99)) {
|
||||
this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* returns if this entity triggers Block.onEntityWalking on the blocks they
|
||||
* walk on. used for spiders and wolves to prevent them from trampling crops
|
||||
*/
|
||||
@Override
|
||||
protected boolean canTriggerWalking() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
public float getShadowSize() {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
public void setDamage(double p_70239_1_)
|
||||
{
|
||||
this.damage = p_70239_1_;
|
||||
}
|
||||
public void setDamage(double p_70239_1_) {
|
||||
this.damage = p_70239_1_;
|
||||
}
|
||||
|
||||
public double getDamage()
|
||||
{
|
||||
return this.damage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the amount of knockback the arrow applies when it hits a mob.
|
||||
*/
|
||||
public void setKnockbackStrength(int p_70240_1_)
|
||||
{
|
||||
this.knockbackStrength = p_70240_1_;
|
||||
}
|
||||
|
||||
/**
|
||||
* If returns false, the item will not inflict any damage against entities.
|
||||
*/
|
||||
@Override
|
||||
public boolean canAttackWithItem()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public void setIsCritical(boolean p_70243_1_)
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
|
||||
if (p_70243_1_)
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public boolean getIsCritical()
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
return (b0 & 1) != 0;
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(mode == 0) {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, false);
|
||||
} else if( mode == 1) {
|
||||
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 10, true, false, false);
|
||||
} else if(mode == 2) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ,
|
||||
"random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
public double getDamage() {
|
||||
return this.damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttackWithItem() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind
|
||||
* it.
|
||||
*/
|
||||
public void setIsCritical(boolean p_70243_1_) {
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
|
||||
if(p_70243_1_) {
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1)));
|
||||
} else {
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind
|
||||
* it.
|
||||
*/
|
||||
public boolean getIsCritical() {
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
return (b0 & 1) != 0;
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(mode == 0) {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, false);
|
||||
} else if(mode == 1) {
|
||||
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 10, true, false, false);
|
||||
} else if(mode == 2) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj);
|
||||
entity.posX = this.posX;
|
||||
entity.posY = this.posY;
|
||||
@ -503,18 +437,17 @@ public class EntityModBeam extends Entity implements IProjectile
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
|
||||
this.worldObj.spawnEntityInWorld(entity);
|
||||
|
||||
EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(this.worldObj, 10);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(cloud);
|
||||
} else if(mode == 3) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ,
|
||||
"random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
|
||||
EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(this.worldObj, 10);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(cloud);
|
||||
} else if(mode == 3) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj);
|
||||
entity.posX = this.posX;
|
||||
entity.posY = this.posY;
|
||||
@ -523,66 +456,60 @@ public class EntityModBeam extends Entity implements IProjectile
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
|
||||
this.worldObj.spawnEntityInWorld(entity);
|
||||
|
||||
EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(this.worldObj, 20);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(cloud);
|
||||
} else if(mode == 4) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ,
|
||||
"random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityVortex vortex = new EntityVortex(this.worldObj, 1F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 5) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ,
|
||||
"random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityVortex vortex = new EntityVortex(this.worldObj, 2.5F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 6) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ,
|
||||
"random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityRagingVortex vortex = new EntityRagingVortex(this.worldObj, 2.5F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 7) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ,
|
||||
"random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityRagingVortex vortex = new EntityRagingVortex(this.worldObj, 5F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 8) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ,
|
||||
"random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityBlackHole vortex = new EntityBlackHole(this.worldObj, 2F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} 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, MainRegistry.gadgetRadius, posX, posY, posZ));
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFac(worldObj, posX, posY, posZ, MainRegistry.gadgetRadius));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(this.worldObj, 20);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(cloud);
|
||||
} else if(mode == 4) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityVortex vortex = new EntityVortex(this.worldObj, 1F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 5) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityVortex vortex = new EntityVortex(this.worldObj, 2.5F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 6) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityRagingVortex vortex = new EntityRagingVortex(this.worldObj, 2.5F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 7) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityRagingVortex vortex = new EntityRagingVortex(this.worldObj, 5F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} else if(mode == 8) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
EntityBlackHole vortex = new EntityBlackHole(this.worldObj, 2F);
|
||||
vortex.posX = this.posX;
|
||||
vortex.posY = this.posY;
|
||||
vortex.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(vortex);
|
||||
} 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(EntityNukeCloudSmall.statFac(worldObj, posX, posY, posZ, BombConfig.gadgetRadius));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,12 +6,12 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.config.ToolConfig;
|
||||
import com.hbm.inventory.CentrifugeRecipes;
|
||||
import com.hbm.inventory.CrystallizerRecipes;
|
||||
import com.hbm.inventory.ShredderRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.IItemAbility;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.EnchantmentUtil;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -48,9 +48,9 @@ public abstract class ToolAbility {
|
||||
|
||||
Block b = world.getBlock(x, y, z);
|
||||
|
||||
if(b == Blocks.stone && !MainRegistry.recursiveStone)
|
||||
if(b == Blocks.stone && !ToolConfig.recursiveStone)
|
||||
return;
|
||||
if(b == Blocks.netherrack && !MainRegistry.recursiveNetherrack)
|
||||
if(b == Blocks.netherrack && !ToolConfig.recursiveNetherrack)
|
||||
return;
|
||||
|
||||
List<Integer> indices = Arrays.asList(new Integer[] {0, 1, 2, 3, 4, 5});
|
||||
@ -77,7 +77,7 @@ public abstract class ToolAbility {
|
||||
|
||||
depth += 1;
|
||||
|
||||
if(depth > MainRegistry.recursionDepth)
|
||||
if(depth > ToolConfig.recursionDepth)
|
||||
return;
|
||||
|
||||
pos.add(new ThreeInts(x, y, z));
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.handler.guncfg;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.particle.EntityBSmokeFX;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.ArmorUtil;
|
||||
@ -238,7 +239,7 @@ public class BulletConfigFactory {
|
||||
bullet.bounceMod = 1.0;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.nuke = 35;
|
||||
bullet.nuke = BombConfig.fatmanRadius;
|
||||
bullet.style = BulletConfiguration.STYLE_NUKE;
|
||||
bullet.plink = BulletConfiguration.PLINK_GRENADE;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
@ -171,7 +172,7 @@ public class GunFatmanFactory {
|
||||
bf.posX = x;
|
||||
bf.posY = y;
|
||||
bf.posZ = z;
|
||||
bf.destructionRange = (int) (MainRegistry.fatmanRadius * 1.25);
|
||||
bf.destructionRange = (int) (BombConfig.fatmanRadius * 1.25);
|
||||
bullet.worldObj.spawnEntityInWorld(bf);
|
||||
ExplosionParticleB.spawnMush(bullet.worldObj, x, y, z);
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -41,7 +42,7 @@ public class MachineRecipes {
|
||||
if(item == null || item2 == null)
|
||||
return null;
|
||||
|
||||
if (MainRegistry.enableDebugMode) {
|
||||
if (GeneralConfig.enableDebugMode) {
|
||||
if (item.getItem() == Items.iron_ingot && item2.getItem() == Items.quartz
|
||||
|| item.getItem() == Items.quartz && item2.getItem() == Items.iron_ingot) {
|
||||
return new ItemStack(ModBlocks.test_render, 1);
|
||||
@ -723,7 +724,7 @@ public class MachineRecipes {
|
||||
public Map<Object[], Object> getAlloyRecipes() {
|
||||
Map<Object[], Object> recipes = new HashMap<Object[], Object>();
|
||||
|
||||
if (MainRegistry.enableDebugMode) {
|
||||
if (GeneralConfig.enableDebugMode) {
|
||||
recipes.put(new ItemStack[] { new ItemStack(Items.iron_ingot), new ItemStack(Items.quartz) },
|
||||
new ItemStack(Item.getItemFromBlock(ModBlocks.test_render)));
|
||||
}
|
||||
|
||||
@ -4,11 +4,13 @@ import java.util.Arrays;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.inventory.container.ContainerMachineRadar;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadar;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@ -35,33 +37,14 @@ public class GUIMachineRadar extends GuiInfoContainer {
|
||||
|
||||
if(!diFurnace.nearbyMissiles.isEmpty()) {
|
||||
for(int[] m : diFurnace.nearbyMissiles) {
|
||||
int x = guiLeft + (int)((m[0] - diFurnace.xCoord) / ((double)MainRegistry.radarRange * 2 + 1) * (200D - 8D)) + 108;
|
||||
int z = guiTop + (int)((m[1] - diFurnace.zCoord) / ((double)MainRegistry.radarRange * 2 + 1) * (200D - 8D)) + 117;
|
||||
int x = guiLeft + (int)((m[0] - diFurnace.xCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) + 108;
|
||||
int z = guiTop + (int)((m[1] - diFurnace.zCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) + 117;
|
||||
|
||||
if(mouseX + 4 > x && mouseX - 4 < x &&
|
||||
mouseY + 4 > z && mouseY - 4 < z) {
|
||||
|
||||
|
||||
String[] text = new String[] { "Error." };
|
||||
|
||||
if(m[2] == 0)
|
||||
text = new String[] { "Tier 1 Missile", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
else if(m[2] == 1)
|
||||
text = new String[] { "Tier 2 Missile", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
else if(m[2] == 2)
|
||||
text = new String[] { "Tier 3 Missile", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
else if(m[2] == 3)
|
||||
text = new String[] { "Tier 4 Missile", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
else if(m[2] == 4)
|
||||
text = new String[] { "Anti Ballistic Missile", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
else if(m[2] == 5)
|
||||
text = new String[] { "Player", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
/*else if(m[2] == 6)
|
||||
text = new String[] { "Stinger Missile", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
else if(m[2] == 7)
|
||||
text = new String[] { "Sky Stinger Missile", m[0] + " / " + m[1], "Alt.: " + m[3] };*/
|
||||
else
|
||||
text = new String[] { "Unknown Force", m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
String[] text = new String[] { RadarTargetType.values()[m[2]].name, m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
|
||||
this.func_146283_a(Arrays.asList(text), x, z);
|
||||
|
||||
@ -91,8 +74,8 @@ public class GUIMachineRadar extends GuiInfoContainer {
|
||||
|
||||
if(!diFurnace.nearbyMissiles.isEmpty()) {
|
||||
for(int[] m : diFurnace.nearbyMissiles) {
|
||||
int x = (int)((m[0] - diFurnace.xCoord) / ((double)MainRegistry.radarRange * 2 + 1) * (200D - 8D)) - 4;
|
||||
int z = (int)((m[1] - diFurnace.zCoord) / ((double)MainRegistry.radarRange * 2 + 1) * (200D - 8D)) - 4;
|
||||
int x = (int)((m[0] - diFurnace.xCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) - 4;
|
||||
int z = (int)((m[1] - diFurnace.zCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) - 4;
|
||||
int t = m[2];
|
||||
|
||||
drawTexturedModalRect(guiLeft + 108 + x, guiTop + 117 + z, 216, 8 * t, 8, 8);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items.food;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -18,7 +19,7 @@ public class ItemWaffle extends ItemFood {
|
||||
@Override
|
||||
public void onFoodEaten(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, (int)(MainRegistry.fatmanRadius * 1.5), player.posX, player.posY, player.posZ));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, (int)(BombConfig.fatmanRadius * 1.5), player.posX, player.posY, player.posZ));
|
||||
|
||||
ExplosionParticle.spawnMush(world, (int)player.posX, (int)player.posY - 3, (int)player.posZ);
|
||||
}
|
||||
|
||||
@ -4,6 +4,9 @@ import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.effect.EntityRagingVortex;
|
||||
@ -47,7 +50,7 @@ public class ItemDrop extends Item {
|
||||
{
|
||||
((IBomb)entityItem.worldObj.getBlock(x, y, z)).explode(entityItem.worldObj, x, y, z);
|
||||
|
||||
if(MainRegistry.enableExtendedLogging)
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by dead man's switch!");
|
||||
}
|
||||
}
|
||||
@ -59,11 +62,11 @@ public class ItemDrop extends Item {
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.detonator_de) {
|
||||
if (!entityItem.worldObj.isRemote && MainRegistry.dropDead) {
|
||||
if (!entityItem.worldObj.isRemote && WeaponConfig.dropDead) {
|
||||
entityItem.worldObj.createExplosion(entityItem, entityItem.posX, entityItem.posY,
|
||||
entityItem.posZ, 15.0F, true);
|
||||
|
||||
if(MainRegistry.enableExtendedLogging)
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[DET] Detonated dead man's explosive at " + ((int)entityItem.posX) + " / " + ((int)entityItem.posY) + " / " + ((int)entityItem.posZ) + "!");
|
||||
}
|
||||
|
||||
@ -72,19 +75,19 @@ public class ItemDrop extends Item {
|
||||
|
||||
if (entityItem.onGround) {
|
||||
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.cell_antimatter && MainRegistry.dropCell) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.cell_antimatter && WeaponConfig.dropCell) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
entityItem.worldObj.createExplosion(entityItem, entityItem.posX, entityItem.posY,
|
||||
entityItem.posZ, 10.0F, true);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.pellet_antimatter && MainRegistry.dropCell) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.pellet_antimatter && WeaponConfig.dropCell) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
ExplosionLarge.explodeFire(entityItem.worldObj, entityItem.posX, entityItem.posY,
|
||||
entityItem.posZ, 100, true, true, true);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.cell_anti_schrabidium && MainRegistry.dropCell) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.cell_anti_schrabidium && WeaponConfig.dropCell) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
entityItem.worldObj.playSoundEffect(entityItem.posX, entityItem.posY, entityItem.posZ,
|
||||
"random.explode", 100.0f, entityItem.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
@ -93,21 +96,21 @@ public class ItemDrop extends Item {
|
||||
entity.posX = entityItem.posX;
|
||||
entity.posY = entityItem.posY;
|
||||
entity.posZ = entityItem.posZ;
|
||||
entity.destructionRange = MainRegistry.aSchrabRadius;
|
||||
entity.destructionRange = BombConfig.aSchrabRadius;
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
entityItem.worldObj.spawnEntityInWorld(entity);
|
||||
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(entityItem.worldObj, MainRegistry.aSchrabRadius);
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(entityItem.worldObj, BombConfig.aSchrabRadius);
|
||||
cloud.posX = entityItem.posX;
|
||||
cloud.posY = entityItem.posY;
|
||||
cloud.posZ = entityItem.posZ;
|
||||
entityItem.worldObj.spawnEntityInWorld(cloud);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity && MainRegistry.dropSing) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity && WeaponConfig.dropSing) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
|
||||
EntityVortex bl = new EntityVortex(entityItem.worldObj, 1.5F);
|
||||
@ -117,7 +120,7 @@ public class ItemDrop extends Item {
|
||||
entityItem.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity_counter_resonant && MainRegistry.dropSing) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity_counter_resonant && WeaponConfig.dropSing) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
|
||||
EntityVortex bl = new EntityVortex(entityItem.worldObj, 2.5F);
|
||||
@ -127,7 +130,7 @@ public class ItemDrop extends Item {
|
||||
entityItem.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity_super_heated && MainRegistry.dropSing) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity_super_heated && WeaponConfig.dropSing) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
|
||||
EntityVortex bl = new EntityVortex(entityItem.worldObj, 2.5F);
|
||||
@ -137,7 +140,7 @@ public class ItemDrop extends Item {
|
||||
entityItem.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.black_hole && MainRegistry.dropSing) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.black_hole && WeaponConfig.dropSing) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
/*entityItem.worldObj.playSoundEffect(entityItem.posX, entityItem.posY, entityItem.posZ,
|
||||
"random.explode", 100.0f, entityItem.worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||
@ -161,7 +164,7 @@ public class ItemDrop extends Item {
|
||||
entityItem.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity_spark && MainRegistry.dropSing) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.singularity_spark && WeaponConfig.dropSing) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
EntityRagingVortex bl = new EntityRagingVortex(entityItem.worldObj, 3.5F);
|
||||
bl.posX = entityItem.posX ;
|
||||
@ -170,7 +173,7 @@ public class ItemDrop extends Item {
|
||||
entityItem.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
}
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.crystal_xen && MainRegistry.dropCrys) {
|
||||
if (stack.getItem() != null && stack.getItem() == ModItems.crystal_xen && WeaponConfig.dropCrys) {
|
||||
if (!entityItem.worldObj.isRemote) {
|
||||
ExplosionChaos.floater(entityItem.worldObj, (int)entityItem.posX, (int)entityItem.posY, (int)entityItem.posZ, 25, 75);
|
||||
ExplosionChaos.move(entityItem.worldObj, (int)entityItem.posX, (int)entityItem.posY, (int)entityItem.posZ, 25, 0, 75, 0);
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -75,7 +76,7 @@ public class ItemDetonator extends Item {
|
||||
{
|
||||
((IBomb)world.getBlock(x, y, z)).explode(world, x, y, z);
|
||||
|
||||
if(MainRegistry.enableExtendedLogging)
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!");
|
||||
}
|
||||
if(world.isRemote)
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -37,7 +38,7 @@ public class ItemLaserDetonator extends Item {
|
||||
if(world.getBlock(x, y, z) instanceof IBomb) {
|
||||
((IBomb)world.getBlock(x, y, z)).explode(world, x, y, z);
|
||||
|
||||
if(MainRegistry.enableExtendedLogging)
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!");
|
||||
|
||||
player.addChatMessage(new ChatComponentText("Detonated!"));
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -89,7 +90,7 @@ public class ItemMultiDetonator extends Item {
|
||||
if (!world.isRemote) {
|
||||
((IBomb) world.getBlock(x, y, z)).explode(world, x, y, z);
|
||||
|
||||
if(MainRegistry.enableExtendedLogging)
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[DET] Tried to detonate block at " + x + " / " + y + " / " + z + " by " + player.getDisplayName() + "!");
|
||||
}
|
||||
|
||||
|
||||
@ -8,8 +8,9 @@ import java.util.Set;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.hbm.config.ToolConfig;
|
||||
import com.hbm.handler.ToolAbility;
|
||||
import com.hbm.handler.ToolAbility.SilkAbility;
|
||||
import com.hbm.handler.ToolAbility.*;
|
||||
import com.hbm.handler.WeaponAbility;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -31,6 +32,7 @@ import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
||||
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
@ -290,13 +292,26 @@ public class ItemToolAbility extends ItemTool implements IItemAbility {
|
||||
|
||||
setAbility(stack, i % this.breakAbility.size());
|
||||
|
||||
while(!isAbilityAllowed(getCurrentAbility(stack))) {
|
||||
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentText("[Ability ")
|
||||
.appendSibling(new ChatComponentTranslation(getCurrentAbility(stack).getName(), new Object[0]))
|
||||
.appendSibling(new ChatComponentText(getCurrentAbility(stack).getExtension() + " is blacklisted!]"))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
|
||||
i++;
|
||||
setAbility(stack, i % this.breakAbility.size());
|
||||
}
|
||||
|
||||
if(getCurrentAbility(stack) != null) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentText("[Enabled ")
|
||||
.appendSibling(new ChatComponentTranslation(getCurrentAbility(stack).getName(), new Object[0]))
|
||||
.appendSibling(new ChatComponentText(getCurrentAbility(stack).getExtension() + "]")));
|
||||
.appendSibling(new ChatComponentText(getCurrentAbility(stack).getExtension() + "]"))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
} else {
|
||||
player.addChatComponentMessage(new ChatComponentText("[Tool ability deactivated]"));
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GOLD + "[Tool ability deactivated]"));
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "random.orb", 0.25F, getCurrentAbility(stack) == null ? 0.75F : 1.25F);
|
||||
@ -304,6 +319,30 @@ public class ItemToolAbility extends ItemTool implements IItemAbility {
|
||||
return stack;
|
||||
}
|
||||
|
||||
//TODO: integrate "isAllowed" into the ability class
|
||||
private boolean isAbilityAllowed(ToolAbility ability) {
|
||||
|
||||
if(ability instanceof HammerAbility)
|
||||
return ToolConfig.abilityHammer;
|
||||
if(ability instanceof RecursionAbility)
|
||||
return ToolConfig.abilityVein;
|
||||
if(ability instanceof LuckAbility)
|
||||
return ToolConfig.abilityLuck;
|
||||
if(ability instanceof SilkAbility)
|
||||
return ToolConfig.abilitySilk;
|
||||
if(ability instanceof SmelterAbility)
|
||||
return ToolConfig.abilityFurnace;
|
||||
if(ability instanceof ShredderAbility)
|
||||
return ToolConfig.abilityShredder;
|
||||
if(ability instanceof CentrifugeAbility)
|
||||
return ToolConfig.abilityCentrifuge;
|
||||
if(ability instanceof CrystallizerAbility)
|
||||
return ToolConfig.abilityCrystallizer;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private ToolAbility getCurrentAbility(ItemStack stack) {
|
||||
|
||||
int ability = getAbility(stack) % this.breakAbility.size();
|
||||
|
||||
@ -5,6 +5,8 @@ import java.util.List;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
@ -120,7 +122,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
|
||||
setIsAltDown(stack, false);
|
||||
}
|
||||
|
||||
if(MainRegistry.enableGuns && mainConfig.firingMode == 1 && getIsMouseDown(stack) && tryShoot(stack, world, player, isCurrentItem)) {
|
||||
if(GeneralConfig.enableGuns && mainConfig.firingMode == 1 && getIsMouseDown(stack) && tryShoot(stack, world, player, isCurrentItem)) {
|
||||
|
||||
fire(stack, world, player);
|
||||
setDelay(stack, mainConfig.rateOfFire);
|
||||
@ -499,7 +501,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
}
|
||||
|
||||
if(MainRegistry.enableExtendedLogging) {
|
||||
if(GeneralConfig.enableExtendedLogging) {
|
||||
list.add("");
|
||||
list.add("Type: " + getMagType(stack));
|
||||
list.add("Is Reloading: " + getIsReloading(stack));
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.weapon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -22,7 +23,7 @@ public class WeaponizedCell extends Item {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
if(MainRegistry.dropStar) {
|
||||
if(WeaponConfig.dropStar) {
|
||||
|
||||
world.playSoundEffect(item.posX, item.posY, item.posZ, "random.explode", 100.0f, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.lib;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.WorldConfig;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntitySafe;
|
||||
@ -52,7 +54,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
case 1:
|
||||
generateEnd(world, rand, chunkX * 16, chunkZ * 16); break;
|
||||
default:
|
||||
if(MainRegistry.enableMDOres)
|
||||
if(GeneralConfig.enableMDOres)
|
||||
generateSurface(world, rand, chunkX * 16, chunkZ * 16); break;
|
||||
}
|
||||
|
||||
@ -60,7 +62,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
private void generateSurface(World world, Random rand, int i, int j) {
|
||||
// Ore stains per chunk
|
||||
for (int k = 0; k < MainRegistry.uraniumSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.uraniumSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
// Max height of generation
|
||||
int randPosY = rand.nextInt(25);
|
||||
@ -70,7 +72,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_uranium, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.thoriumSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.thoriumSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
// Max height of generation
|
||||
int randPosY = rand.nextInt(30);
|
||||
@ -80,7 +82,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_thorium, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.titaniumSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.titaniumSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -88,7 +90,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_titanium, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.sulfurSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.sulfurSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -96,7 +98,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_sulfur, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.aluminiumSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.aluminiumSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(45);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -104,7 +106,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_aluminium, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.copperSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.copperSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(50);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -112,7 +114,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_copper, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.fluoriteSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.fluoriteSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(40);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -120,7 +122,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_fluorite, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.niterSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.niterSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -128,7 +130,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_niter, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.tungstenSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.tungstenSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -136,7 +138,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_tungsten, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.leadSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.leadSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -144,7 +146,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_lead, 9)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.berylliumSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.berylliumSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -206,7 +208,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_verticium, 16)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.niterSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.niterSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(25);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -214,7 +216,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_rare, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.ligniteSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.ligniteSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(25) + 35;
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -222,7 +224,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_lignite, 24)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < MainRegistry.asbestosSpawn; k++) {
|
||||
for (int k = 0; k < WorldConfig.asbestosSpawn; k++) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(16) + 16;
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -240,12 +242,12 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}*/
|
||||
|
||||
if (MainRegistry.enableDungeons) {
|
||||
if (GeneralConfig.enableDungeons) {
|
||||
|
||||
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(i, j);
|
||||
|
||||
if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) {
|
||||
if (MainRegistry.radioStructure > 0 && rand.nextInt(MainRegistry.radioStructure) == 0) {
|
||||
if (WorldConfig.radioStructure > 0 && rand.nextInt(WorldConfig.radioStructure) == 0) {
|
||||
for (int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -258,7 +260,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if (biome == BiomeGenBase.plains || biome == BiomeGenBase.forest || biome == BiomeGenBase.desert
|
||||
|| biome == BiomeGenBase.swampland || biome == BiomeGenBase.extremeHills) {
|
||||
if (MainRegistry.antennaStructure > 0 && rand.nextInt(MainRegistry.antennaStructure) == 0) {
|
||||
if (WorldConfig.antennaStructure > 0 && rand.nextInt(WorldConfig.antennaStructure) == 0) {
|
||||
for (int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -271,7 +273,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if (biome == BiomeGenBase.desert || biome == BiomeGenBase.beach || biome == BiomeGenBase.mesa
|
||||
|| biome == BiomeGenBase.mesaPlateau) {
|
||||
if (MainRegistry.atomStructure > 0 && rand.nextInt(MainRegistry.atomStructure) == 0) {
|
||||
if (WorldConfig.atomStructure > 0 && rand.nextInt(WorldConfig.atomStructure) == 0) {
|
||||
for (int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -283,7 +285,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
|
||||
if (biome == BiomeGenBase.desert) {
|
||||
if (MainRegistry.vertibirdStructure > 0 && rand.nextInt(MainRegistry.vertibirdStructure) == 0) {
|
||||
if (WorldConfig.vertibirdStructure > 0 && rand.nextInt(WorldConfig.vertibirdStructure) == 0) {
|
||||
for (int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -299,7 +301,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if (MainRegistry.dungeonStructure > 0 && rand.nextInt(MainRegistry.dungeonStructure) == 0) {
|
||||
if (WorldConfig.dungeonStructure > 0 && rand.nextInt(WorldConfig.dungeonStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int y = rand.nextInt(256);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -307,7 +309,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
|
||||
if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) {
|
||||
if (MainRegistry.relayStructure > 0 && rand.nextInt(MainRegistry.relayStructure) == 0) {
|
||||
if (WorldConfig.relayStructure > 0 && rand.nextInt(WorldConfig.relayStructure) == 0) {
|
||||
for (int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -318,7 +320,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) {
|
||||
if (MainRegistry.satelliteStructure > 0 && rand.nextInt(MainRegistry.satelliteStructure) == 0) {
|
||||
if (WorldConfig.satelliteStructure > 0 && rand.nextInt(WorldConfig.satelliteStructure) == 0) {
|
||||
for (int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -340,7 +342,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if (MainRegistry.bunkerStructure > 0 && rand.nextInt(MainRegistry.bunkerStructure) == 0) {
|
||||
if (WorldConfig.bunkerStructure > 0 && rand.nextInt(WorldConfig.bunkerStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -348,7 +350,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Bunker().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.siloStructure > 0 && rand.nextInt(MainRegistry.siloStructure) == 0) {
|
||||
if (WorldConfig.siloStructure > 0 && rand.nextInt(WorldConfig.siloStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -356,7 +358,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Silo().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.factoryStructure > 0 && rand.nextInt(MainRegistry.factoryStructure) == 0) {
|
||||
if (WorldConfig.factoryStructure > 0 && rand.nextInt(WorldConfig.factoryStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -364,7 +366,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Factory().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.dudStructure > 0 && rand.nextInt(MainRegistry.dudStructure) == 0) {
|
||||
if (WorldConfig.dudStructure > 0 && rand.nextInt(WorldConfig.dudStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -372,7 +374,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Dud().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.spaceshipStructure > 0 && rand.nextInt(MainRegistry.spaceshipStructure) == 0) {
|
||||
if (WorldConfig.spaceshipStructure > 0 && rand.nextInt(WorldConfig.spaceshipStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -380,7 +382,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Spaceship().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.barrelStructure > 0 && biome == BiomeGenBase.desert && rand.nextInt(MainRegistry.barrelStructure) == 0) {
|
||||
if (WorldConfig.barrelStructure > 0 && biome == BiomeGenBase.desert && rand.nextInt(WorldConfig.barrelStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -388,7 +390,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Barrel().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.broadcaster > 0 && rand.nextInt(MainRegistry.broadcaster) == 0) {
|
||||
if (WorldConfig.broadcaster > 0 && rand.nextInt(WorldConfig.broadcaster) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -396,12 +398,12 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
if(world.getBlock(x, y - 1, z).canPlaceTorchOnTop(world, x, y - 1, z)) {
|
||||
world.setBlock(x, y, z, ModBlocks.broadcaster_pc, rand.nextInt(4) + 2, 2);
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned corrupted broadcaster at " + x + " " + (y) +" " + z);
|
||||
}
|
||||
}
|
||||
|
||||
if (MainRegistry.minefreq > 0 && MainRegistry.enableMines && rand.nextInt(MainRegistry.minefreq) == 0) {
|
||||
if (WorldConfig.minefreq > 0 && GeneralConfig.enableMines && rand.nextInt(WorldConfig.minefreq) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -409,12 +411,12 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
if(world.getBlock(x, y - 1, z).canPlaceTorchOnTop(world, x, y - 1, z)) {
|
||||
world.setBlock(x, y, z, ModBlocks.mine_ap);
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned landmine at " + x + " " + (y) +" " + z);
|
||||
}
|
||||
}
|
||||
|
||||
if (MainRegistry.radfreq > 0 && MainRegistry.enableRad && rand.nextInt(MainRegistry.radfreq) == 0 && biome == BiomeGenBase.desert) {
|
||||
if (WorldConfig.radfreq > 0 && GeneralConfig.enableRad && rand.nextInt(WorldConfig.radfreq) == 0 && biome == BiomeGenBase.desert) {
|
||||
|
||||
for (int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
@ -427,12 +429,12 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
new Sellafield().generate(world, x, z, r, r * 0.35D);
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned raditation hotspot at " + x + " " + z);
|
||||
}
|
||||
}
|
||||
|
||||
if (MainRegistry.geyserWater > 0 && biome == BiomeGenBase.plains && rand.nextInt(MainRegistry.geyserWater) == 0) {
|
||||
if (WorldConfig.geyserWater > 0 && biome == BiomeGenBase.plains && rand.nextInt(WorldConfig.geyserWater) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -441,7 +443,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Geyser().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.geyserChlorine > 0 && biome == BiomeGenBase.desert && rand.nextInt(MainRegistry.geyserChlorine) == 0) {
|
||||
if (WorldConfig.geyserChlorine > 0 && biome == BiomeGenBase.desert && rand.nextInt(WorldConfig.geyserChlorine) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -450,7 +452,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new GeyserLarge().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (MainRegistry.capsuleStructure > 0 && biome == BiomeGenBase.beach && rand.nextInt(MainRegistry.capsuleStructure) == 0) {
|
||||
if (WorldConfig.capsuleStructure > 0 && biome == BiomeGenBase.beach && rand.nextInt(WorldConfig.capsuleStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z) - 4;
|
||||
@ -465,12 +467,12 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
cap.setInventorySlotContents(rand.nextInt(cap.getSizeInventory()), new ItemStack(ModItems.record_glass));
|
||||
}
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned capsule at " + x + " " + z);
|
||||
}
|
||||
}
|
||||
|
||||
if (MainRegistry.geyserVapor > 0 && rand.nextInt(MainRegistry.geyserVapor) == 0) {
|
||||
if (WorldConfig.geyserVapor > 0 && rand.nextInt(WorldConfig.geyserVapor) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -492,11 +494,11 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(MainRegistry.enableDebugMode && done)
|
||||
if(GeneralConfig.enableDebugMode && done)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned pink tree at " + x + " " + z);
|
||||
}
|
||||
|
||||
if (MainRegistry.vaultfreq > 0 && MainRegistry.enableVaults && rand.nextInt(MainRegistry.vaultfreq) == 0) {
|
||||
if (WorldConfig.vaultfreq > 0 && GeneralConfig.enableVaults && rand.nextInt(WorldConfig.vaultfreq) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -537,19 +539,19 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
break;
|
||||
}
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned safe at " + x + " " + (y + 1) +" " + z);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (MainRegistry.meteorStructure > 0 && rand.nextInt(MainRegistry.meteorStructure) == 0) {
|
||||
if (WorldConfig.meteorStructure > 0 && rand.nextInt(WorldConfig.meteorStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
|
||||
CellularDungeonFactory.meteor.generate(world, x, 10, z, rand);
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("[Debug] Successfully spawned meteor dungeon at " + x + " 10 " + z);
|
||||
|
||||
int y = world.getHeightValue(x, z);
|
||||
@ -583,7 +585,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
OilBubble.spawnOil(world, randPosX, randPosY, randPosZ, 7 + rand.nextInt(9));
|
||||
}
|
||||
|
||||
if (MainRegistry.enableNITAN) {
|
||||
if (GeneralConfig.enableNITAN) {
|
||||
|
||||
if (i <= 10000 && i + 16 >= 10000 && j <= 10000 && j + 16 >= 10000) {
|
||||
if (world.getBlock(10000, 250, 10000) == Blocks.air) {
|
||||
@ -671,7 +673,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
(new WorldGenMinable(ModBlocks.ore_nether_uranium, 6, Blocks.netherrack)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
if(MainRegistry.enablePlutoniumOre)
|
||||
if(GeneralConfig.enablePlutoniumOre)
|
||||
{
|
||||
for (int k = 0; k < 6; k++)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,9 @@ import java.util.Random;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.config.WorldConfig;
|
||||
import com.hbm.entity.missile.EntityMissileBaseAdvanced;
|
||||
import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.entity.projectile.EntityBurningFOEQ;
|
||||
@ -91,7 +94,7 @@ public class ModEventHandler
|
||||
if(event.entity.worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if(MainRegistry.enableCataclysm) {
|
||||
if(GeneralConfig.enableCataclysm) {
|
||||
EntityBurningFOEQ foeq = new EntityBurningFOEQ(event.entity.worldObj);
|
||||
foeq.setPositionAndRotation(event.entity.posX, 500, event.entity.posZ, 0.0F, 0.0F);
|
||||
event.entity.worldObj.spawnEntityInWorld(foeq);
|
||||
@ -166,8 +169,8 @@ public class ModEventHandler
|
||||
/////
|
||||
|
||||
/// METEOR SHOWER START ///
|
||||
if(event.world != null && !event.world.isRemote && event.world.provider.isSurfaceWorld() && MainRegistry.enableMeteorStrikes) {
|
||||
if(event.world.rand.nextInt(meteorShower > 0 ? MainRegistry.meteorShowerChance : MainRegistry.meteorStrikeChance) == 0) {
|
||||
if(event.world != null && !event.world.isRemote && event.world.provider.isSurfaceWorld() && GeneralConfig.enableMeteorStrikes) {
|
||||
if(event.world.rand.nextInt(meteorShower > 0 ? WorldConfig.meteorShowerChance : WorldConfig.meteorStrikeChance) == 0) {
|
||||
if(!event.world.playerEntities.isEmpty()) {
|
||||
EntityPlayer p = (EntityPlayer)event.world.playerEntities.get(event.world.rand.nextInt(event.world.playerEntities.size()));
|
||||
|
||||
@ -186,23 +189,23 @@ public class ModEventHandler
|
||||
|
||||
if(meteorShower > 0) {
|
||||
meteorShower--;
|
||||
if(meteorShower == 0 && MainRegistry.enableDebugMode)
|
||||
if(meteorShower == 0 && GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("Ended meteor shower.");
|
||||
}
|
||||
|
||||
if(event.world.rand.nextInt(MainRegistry.meteorStrikeChance * 100) == 0 && MainRegistry.enableMeteorShowers) {
|
||||
if(event.world.rand.nextInt(WorldConfig.meteorStrikeChance * 100) == 0 && GeneralConfig.enableMeteorShowers) {
|
||||
meteorShower =
|
||||
(int)(MainRegistry.meteorShowerDuration * 0.75 +
|
||||
MainRegistry.meteorShowerDuration * 0.25 * event.world.rand.nextFloat());
|
||||
(int)(WorldConfig.meteorShowerDuration * 0.75 +
|
||||
WorldConfig.meteorShowerDuration * 0.25 * event.world.rand.nextFloat());
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
MainRegistry.logger.info("Started meteor shower! Duration: " + meteorShower);
|
||||
}
|
||||
}
|
||||
/// METEOR SHOWER END ///
|
||||
|
||||
/// RADIATION STUFF START ///
|
||||
if(event.world != null && !event.world.isRemote && MainRegistry.enableRads) {
|
||||
if(event.world != null && !event.world.isRemote && GeneralConfig.enableRads) {
|
||||
|
||||
int thunder = AuxSavedData.getThunder(event.world);
|
||||
|
||||
@ -243,17 +246,17 @@ public class ModEventHandler
|
||||
Chunk chunk = entity.worldObj.getChunkFromBlockCoords((int)entity.posX, (int)entity.posZ);
|
||||
float rad = data.getRadNumFromCoord(chunk.xPosition, chunk.zPosition);
|
||||
|
||||
if(event.world.provider.isHellWorld && MainRegistry.hellRad > 0 && rad < MainRegistry.hellRad)
|
||||
rad = MainRegistry.hellRad;
|
||||
if(event.world.provider.isHellWorld && RadiationConfig.hellRad > 0 && rad < RadiationConfig.hellRad)
|
||||
rad = RadiationConfig.hellRad;
|
||||
|
||||
if(rad > 0) {
|
||||
ContaminationUtil.applyRadData(entity, rad / 2);
|
||||
}
|
||||
|
||||
if(entity.worldObj.isRaining() && MainRegistry.cont > 0 && AuxSavedData.getThunder(entity.worldObj) > 0 &&
|
||||
if(entity.worldObj.isRaining() && RadiationConfig.cont > 0 && AuxSavedData.getThunder(entity.worldObj) > 0 &&
|
||||
entity.worldObj.canBlockSeeTheSky(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY), MathHelper.floor_double(entity.posZ))) {
|
||||
|
||||
ContaminationUtil.applyRadData(entity, MainRegistry.cont * 0.005F);
|
||||
ContaminationUtil.applyRadData(entity, RadiationConfig.cont * 0.005F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -645,31 +648,31 @@ public class ModEventHandler
|
||||
|
||||
//let's start from the back:
|
||||
|
||||
//this part means that the message's first character has to equal a '!': -------------------------+
|
||||
// |
|
||||
//this is a logical AND operator: -------------------------------------------------------------+ |
|
||||
// | |
|
||||
//this is a reference to a field in | |
|
||||
//Library.java containing a reference UUID: --------------------------------------+ | |
|
||||
// | | |
|
||||
//this will compare said UUID with | | |
|
||||
//the string representation of the | | |
|
||||
//current player's UUID: ----------+ | | |
|
||||
// | | | |
|
||||
//another AND operator: --------+ | | | |
|
||||
// | | | | |
|
||||
//this is a reference to a | | | | |
|
||||
//boolean called | | | | |
|
||||
//'enableDebugMode' which is | | | | |
|
||||
//only set once by the mod's | | | | |
|
||||
//config and is disabled by | | | | |
|
||||
//default. "debug" is not a | | | | |
|
||||
//substring of the message, nor | | | | |
|
||||
//something that can be toggled | | | | |
|
||||
//in any other way except for | | | | |
|
||||
//the config file: | | | | | |
|
||||
// V V V V V V
|
||||
if(MainRegistry.enableDebugMode && player.getUniqueID().toString().equals(Library.HbMinecraft) && message.startsWith("!")) {
|
||||
//this part means that the message's first character has to equal a '!': --------------------------+
|
||||
// |
|
||||
//this is a logical AND operator: --------------------------------------------------------------+ |
|
||||
// | |
|
||||
//this is a reference to a field in | |
|
||||
//Library.java containing a reference UUID: ---------------------------------------+ | |
|
||||
// | | |
|
||||
//this will compare said UUID with | | |
|
||||
//the string representation of the | | |
|
||||
//current player's UUID: -----------+ | | |
|
||||
// | | | |
|
||||
//another AND operator: ---------+ | | | |
|
||||
// | | | | |
|
||||
//this is a reference to a | | | | |
|
||||
//boolean called | | | | |
|
||||
//'enableDebugMode' which is | | | | |
|
||||
//only set once by the mod's | | | | |
|
||||
//config and is disabled by | | | | |
|
||||
//default. "debug" is not a | | | | |
|
||||
//substring of the message, nor | | | | |
|
||||
//something that can be toggled | | | | |
|
||||
//in any other way except for | | | | |
|
||||
//the config file: | | | | | |
|
||||
// V V V V V V
|
||||
if(GeneralConfig.enableDebugMode && player.getUniqueID().toString().equals(Library.HbMinecraft) && message.startsWith("!")) {
|
||||
|
||||
String[] msg = message.split(" ");
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.main;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.mob.EntityHunterChopper;
|
||||
import com.hbm.entity.projectile.EntityChopperMine;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
@ -106,7 +107,7 @@ public class ModEventHandlerClient {
|
||||
}
|
||||
|
||||
/// HANDLE CUSTOM CROSSHAIRS ///
|
||||
if(event.type == ElementType.CROSSHAIRS && player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IHoldableWeapon && MainRegistry.enableCrosshairs) {
|
||||
if(event.type == ElementType.CROSSHAIRS && player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IHoldableWeapon && GeneralConfig.enableCrosshairs) {
|
||||
event.setCanceled(true);
|
||||
|
||||
if(!(player.getHeldItem().getItem() instanceof ItemGunBase && ((ItemGunBase)player.getHeldItem().getItem()).mainConfig.hasSights && player.isSneaking()))
|
||||
|
||||
@ -4,11 +4,12 @@ import java.lang.reflect.Field;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.BlockTaint;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.PotionConfig;
|
||||
import com.hbm.entity.mob.EntityTaintCrab;
|
||||
import com.hbm.entity.mob.EntityTaintedCreeper;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
@ -37,15 +38,15 @@ public class HbmPotion extends Potion {
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
taint = registerPotion(MainRegistry.taintID, true, 8388736, "potion.hbm_taint", 0, 0);
|
||||
radiation = registerPotion(MainRegistry.radiationID, true, 8700200, "potion.hbm_radiation", 1, 0);
|
||||
bang = registerPotion(MainRegistry.bangID, true, 1118481, "potion.hbm_bang", 3, 0);
|
||||
mutation = registerPotion(MainRegistry.mutationID, false, 8388736, "potion.hbm_mutation", 2, 0);
|
||||
radx = registerPotion(MainRegistry.radxID, false, 0xBB4B00, "potion.hbm_radx", 5, 0);
|
||||
lead = registerPotion(MainRegistry.leadID, true, 0x767682, "potion.hbm_lead", 6, 0);
|
||||
radaway = registerPotion(MainRegistry.radawayID, false, 0xBB4B00, "potion.hbm_radaway", 7, 0);
|
||||
telekinesis = registerPotion(MainRegistry.telekinesisID, true, 0x00F3FF, "potion.hbm_telekinesis", 0, 1);
|
||||
phosphorus = registerPotion(MainRegistry.phosphorusID, true, 0xFFFF00, "potion.hbm_phosphorus", 1, 1);
|
||||
taint = registerPotion(PotionConfig.taintID, true, 8388736, "potion.hbm_taint", 0, 0);
|
||||
radiation = registerPotion(PotionConfig.radiationID, true, 8700200, "potion.hbm_radiation", 1, 0);
|
||||
bang = registerPotion(PotionConfig.bangID, true, 1118481, "potion.hbm_bang", 3, 0);
|
||||
mutation = registerPotion(PotionConfig.mutationID, false, 8388736, "potion.hbm_mutation", 2, 0);
|
||||
radx = registerPotion(PotionConfig.radxID, false, 0xBB4B00, "potion.hbm_radx", 5, 0);
|
||||
lead = registerPotion(PotionConfig.leadID, true, 0x767682, "potion.hbm_lead", 6, 0);
|
||||
radaway = registerPotion(PotionConfig.radawayID, false, 0xBB4B00, "potion.hbm_radaway", 7, 0);
|
||||
telekinesis = registerPotion(PotionConfig.telekinesisID, true, 0x00F3FF, "potion.hbm_telekinesis", 0, 1);
|
||||
phosphorus = registerPotion(PotionConfig.phosphorusID, true, 0xFFFF00, "potion.hbm_phosphorus", 1, 1);
|
||||
}
|
||||
|
||||
public static HbmPotion registerPotion(int id, boolean isBad, int color, String name, int x, int y) {
|
||||
@ -92,7 +93,7 @@ public class HbmPotion extends Potion {
|
||||
if(!(entity instanceof EntityTaintedCreeper) && !(entity instanceof EntityTaintCrab) && entity.worldObj.rand.nextInt(40) == 0)
|
||||
entity.attackEntityFrom(ModDamageSource.taint, (level + 1));
|
||||
|
||||
if(MainRegistry.enableHardcoreTaint && !entity.worldObj.isRemote) {
|
||||
if(GeneralConfig.enableHardcoreTaint && !entity.worldObj.isRemote) {
|
||||
|
||||
int x = (int)(entity.posX - 1);
|
||||
int y = (int)entity.posY;
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.saveddata;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -75,7 +77,7 @@ public class RadiationSavedData extends WorldSavedData {
|
||||
rad = 0;
|
||||
}
|
||||
|
||||
if(rad > MainRegistry.fogRad && worldObj != null && worldObj.rand.nextInt(MainRegistry.fogCh) == 0 && worldObj.getChunkFromChunkCoords(struct.getKey().chunkXPos, struct.getKey().chunkZPos).isChunkLoaded) {
|
||||
if(rad > RadiationConfig.fogRad && worldObj != null && worldObj.rand.nextInt(RadiationConfig.fogCh) == 0 && worldObj.getChunkFromChunkCoords(struct.getKey().chunkXPos, struct.getKey().chunkZPos).isChunkLoaded) {
|
||||
|
||||
int x = struct.getKey().chunkXPos * 16 + worldObj.rand.nextInt(16);
|
||||
int z = struct.getKey().chunkZPos * 16 + worldObj.rand.nextInt(16);
|
||||
@ -125,7 +127,7 @@ public class RadiationSavedData extends WorldSavedData {
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
|
||||
if(!MainRegistry.enableRads) {
|
||||
if(!GeneralConfig.enableRads) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -3,11 +3,11 @@ package com.hbm.tileentity.bomb;
|
||||
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.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
@ -256,9 +256,9 @@ 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)(MainRegistry.missileRadius * 0.75F), x + 0.5, y + 0.5, z + 0.5));
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, (int)(BombConfig.missileRadius * 0.75F), x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, MainRegistry.missileRadius * 0.005F * 0.75F);
|
||||
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000, BombConfig.missileRadius * 0.005F * 0.75F);
|
||||
entity2.posX = x;
|
||||
entity2.posY = y;
|
||||
entity2.posZ = z;
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
@ -277,7 +278,7 @@ public class TileEntityMachineCyclotron extends TileEntity implements ISidedInve
|
||||
ExplosionLarge.explodeFire(worldObj, xCoord, yCoord, zCoord, 35 + rand.nextInt(21), true, true, true);
|
||||
}
|
||||
if(i == 1) {
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)(MainRegistry.fatmanRadius * 1.5), xCoord, yCoord, zCoord));
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int)(BombConfig.fatmanRadius * 1.5), xCoord, yCoord, zCoord));
|
||||
ExplosionParticleB.spawnMush(worldObj, xCoord, yCoord - 3, zCoord);
|
||||
}
|
||||
if(i == 2) {
|
||||
|
||||
@ -3,9 +3,9 @@ package com.hbm.tileentity.machine;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.Untested;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
@ -51,7 +51,7 @@ public class TileEntityMachineRadar extends TileEntityTickingBase implements ICo
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(this.yCoord < MainRegistry.radarAltitude)
|
||||
if(this.yCoord < WeaponConfig.radarAltitude)
|
||||
return;
|
||||
|
||||
int lastPower = getRedPower();
|
||||
@ -87,15 +87,15 @@ public class TileEntityMachineRadar extends TileEntityTickingBase implements ICo
|
||||
|
||||
nearbyMissiles.clear();
|
||||
|
||||
List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(xCoord + 0.5 - MainRegistry.radarRange, 0, zCoord + 0.5 - MainRegistry.radarRange, xCoord + 0.5 + MainRegistry.radarRange, 5000, zCoord + 0.5 + MainRegistry.radarRange));
|
||||
List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(xCoord + 0.5 - WeaponConfig.radarRange, 0, zCoord + 0.5 - WeaponConfig.radarRange, xCoord + 0.5 + WeaponConfig.radarRange, 5000, zCoord + 0.5 + WeaponConfig.radarRange));
|
||||
|
||||
for(Entity e : list) {
|
||||
|
||||
if(e instanceof EntityPlayer && e.posY >= yCoord + MainRegistry.radarBuffer) {
|
||||
if(e instanceof EntityPlayer && e.posY >= yCoord + WeaponConfig.radarBuffer) {
|
||||
nearbyMissiles.add(new int[] { (int)e.posX, (int)e.posZ, RadarTargetType.PLAYER.ordinal(), (int)e.posY });
|
||||
}
|
||||
|
||||
if(e instanceof IRadarDetectable && e.posY >= yCoord + MainRegistry.radarBuffer) {
|
||||
if(e instanceof IRadarDetectable && e.posY >= yCoord + WeaponConfig.radarBuffer) {
|
||||
nearbyMissiles.add(new int[] { (int)e.posX, (int)e.posZ, ((IRadarDetectable)e).getTargetType().ordinal(), (int)e.posY });
|
||||
}
|
||||
}
|
||||
@ -105,7 +105,7 @@ public class TileEntityMachineRadar extends TileEntityTickingBase implements ICo
|
||||
|
||||
if(!nearbyMissiles.isEmpty()) {
|
||||
|
||||
double maxRange = MainRegistry.radarRange * Math.sqrt(2D);
|
||||
double maxRange = WeaponConfig.radarRange * Math.sqrt(2D);
|
||||
|
||||
int power = 0;
|
||||
|
||||
|
||||
@ -20,8 +20,6 @@ public class TileEntityMachineReactor extends TileEntityMachineBase {
|
||||
private static final int[] slots_bottom = new int[] { 2, 0 };
|
||||
private static final int[] slots_side = new int[] { 0 };
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineReactor() {
|
||||
super(3);
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
@ -672,7 +673,7 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
||||
entity.posX = this.xCoord;
|
||||
entity.posY = this.yCoord;
|
||||
entity.posZ = this.zCoord;
|
||||
entity.destructionRange = MainRegistry.fleijaRadius;
|
||||
entity.destructionRange = BombConfig.fleijaRadius;
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 1.0F;
|
||||
entity.waste = false;
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -270,7 +271,7 @@ public class Antenna extends WorldGenerator
|
||||
world.setBlock(x + 0, y + 20, z + 2, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 1, y + 20, z + 2, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 2, y + 20, z + 2, Blocks.air, 0, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned antenna at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -403,7 +404,7 @@ public class Barrel extends WorldGenerator {
|
||||
world.setBlock(x + 2, y + 8, z + 5, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 2, y + 9, z + 5, Blocks.ladder, 3, 3);
|
||||
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned waste tank at " + x + " " + y +" " + z + "\n");
|
||||
|
||||
return true;
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -1598,7 +1599,7 @@ public class Bunker extends WorldGenerator
|
||||
world.setBlock(x + 6, y + -19, z + 10, Blocks.bed, 8, 3);
|
||||
world.setBlock(x + 8, y + -19, z + 10, Blocks.bed, 8, 3);
|
||||
world.setBlock(x + 10, y + -19, z + 10, Blocks.bed, 8, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned bunker at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -417,7 +418,7 @@ public class CrashedVertibird extends WorldGenerator
|
||||
|
||||
world.setBlock(x + 4, y + 1 - yOffset, z + 1, Blocks.lever, 3, 3);
|
||||
world.setBlock(x + 6, y + 1 - yOffset, z + 1, Blocks.lever, 3, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned crashed Vertibird at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -1767,7 +1768,7 @@ public class DesertAtom003
|
||||
world.setBlock(x + 22, y + 5, z + 14, Blocks.lever, 2, 3);
|
||||
world.setBlock(x + 8, y + 8, z + 21, Blocks.wall_sign, 2, 3);
|
||||
world.setBlock(x + 8, y + 9, z + 21, Blocks.wall_sign, 2, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned abandoned Power Plant at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -3133,7 +3134,7 @@ public class Factory extends WorldGenerator
|
||||
world.setBlock(x + 17, y + 43, z + 10, Blocks.web, 0, 3);
|
||||
world.setBlock(x + 18, y + 43, z + 10, Blocks.web, 0, 3);
|
||||
world.setBlock(x + 17, y + 43, z + 11, Blocks.web, 0, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned abandoned factory at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import static net.minecraftforge.common.ChestGenHooks.DUNGEON_CHEST;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -1055,7 +1056,7 @@ public class LibraryDungeon extends WorldGenerator
|
||||
world.setBlock(x + 3, y + 5, z + 3, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 3, y + 5, z + 6, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 4, y + 5, z + 7, Blocks.air, 0, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned library at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -2172,7 +2173,7 @@ public class Radio02
|
||||
world.setBlock(x + 8, y + 23, z + 25, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 9, y + 23, z + 25, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 10, y + 23, z + 25, Blocks.air, 0, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned abandoned Radio station at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -1658,7 +1659,7 @@ public class Relay extends WorldGenerator
|
||||
|
||||
world.setBlock(x + 5, y + 1, z + 11, Blocks.torch, 1, 3);
|
||||
world.setBlock(x + 3, y + 1, z + 12, Blocks.wall_sign, 4, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned relay tower at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -2586,7 +2587,7 @@ public class Satellite extends WorldGenerator
|
||||
world.setBlock(x + 16, y + 19, z + 12, Blocks.torch, 2, 3);
|
||||
world.setBlock(x + 22, y + 19, z + 12, Blocks.torch, 1, 3);
|
||||
world.setBlock(x + 19, y + 19, z + 15, Blocks.torch, 3, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned satellite dish at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -2521,7 +2522,7 @@ public class Silo extends WorldGenerator
|
||||
world.setBlock(x + 9, y + -1, z + 2, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 9, y + 0, z + 2, Blocks.ladder, 3, 3);
|
||||
world.setBlock(x + 9, y + 1, z + 2, Blocks.ladder, 3, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned missile silo at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ package com.hbm.world.dungeon;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -445,7 +446,7 @@ public class Spaceship2
|
||||
world.setBlock(x + 7, y + 4, z + 6, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 8, y + 4, z + 6, Blocks.air, 0, 3);
|
||||
world.setBlock(x + 7, y + 4, z + 7, Blocks.air, 0, 3);
|
||||
if(MainRegistry.enableDebugMode)
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned spaceship at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user