diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index a721efc73..268d0cdb6 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -172,6 +172,7 @@ tile.turret_rocket.name=Raketengeschütz tile.turret_flamer.name=Flammenwerfergeschütz tile.turret_tau.name=Tauonengeschütz item.turret_control.name=Geschützsteuerung +item.turret_chip.name=Geschütz-KI-Chip tile.bomb_multi.name=Mehrzweckbombe diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 1f8b70721..dbd40bc39 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -181,6 +181,7 @@ tile.turret_rocket.name=Rocket Turret tile.turret_flamer.name=Flamethrower Turret tile.turret_tau.name=Tauon Turret item.turret_control.name=Turret Controller +item.turret_chip.name=Turret AI-Chip tile.crate.name=Supply Crate tile.marker_structure.name=Multiblock Structure Marker diff --git a/assets/hbm/textures/items/survey_scanner.png b/assets/hbm/textures/items/survey_scanner.png new file mode 100644 index 000000000..00fef0752 Binary files /dev/null and b/assets/hbm/textures/items/survey_scanner.png differ diff --git a/com/hbm/blocks/bomb/BlockCrashedBomb.java b/com/hbm/blocks/bomb/BlockCrashedBomb.java index e1626a12b..1be2c1e2e 100644 --- a/com/hbm/blocks/bomb/BlockCrashedBomb.java +++ b/com/hbm/blocks/bomb/BlockCrashedBomb.java @@ -4,6 +4,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.explosion.ExplosionParticleB; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; @@ -76,7 +77,7 @@ public class BlockCrashedBomb extends BlockContainer implements IBomb { public void explode(World world, int x, int y, int z) { if (!world.isRemote) { - EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(world); entity0.posX = x; entity0.posY = y; entity0.posZ = z; diff --git a/com/hbm/blocks/bomb/NukeBoy.java b/com/hbm/blocks/bomb/NukeBoy.java index 836477f0c..a657c65e3 100644 --- a/com/hbm/blocks/bomb/NukeBoy.java +++ b/com/hbm/blocks/bomb/NukeBoy.java @@ -5,7 +5,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.entity.effect.EntityNukeCloudNoShroom; import com.hbm.entity.effect.EntityNukeCloudSmall; -import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.bomb.TileEntityNukeBoy; @@ -146,7 +146,7 @@ public class NukeBoy extends BlockContainer implements IBomb { * world.spawnEntityInWorld(entity); */ - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); entity.posX = x; entity.posY = y; entity.posZ = z; diff --git a/com/hbm/blocks/bomb/NukeFleija.java b/com/hbm/blocks/bomb/NukeFleija.java index 6e1d1380b..fc4a94d0a 100644 --- a/com/hbm/blocks/bomb/NukeFleija.java +++ b/com/hbm/blocks/bomb/NukeFleija.java @@ -7,6 +7,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.entity.effect.EntityCloudFleija; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.bomb.TileEntityNukeFleija; @@ -142,7 +143,7 @@ public class NukeFleija 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); - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); entity.posX = x; entity.posY = y; entity.posZ = z; diff --git a/com/hbm/blocks/bomb/NukeGadget.java b/com/hbm/blocks/bomb/NukeGadget.java index 8365e3a3f..ffe0e094c 100644 --- a/com/hbm/blocks/bomb/NukeGadget.java +++ b/com/hbm/blocks/bomb/NukeGadget.java @@ -8,6 +8,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.entity.effect.EntityNukeCloudNoShroom; import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.bomb.TileEntityNukeGadget; @@ -158,7 +159,7 @@ public class NukeGadget extends BlockContainer implements IBomb { * world.spawnEntityInWorld(entity); */ - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); entity.posX = x; entity.posY = y; entity.posZ = z; diff --git a/com/hbm/blocks/bomb/NukeMan.java b/com/hbm/blocks/bomb/NukeMan.java index 172c1267d..eee26b256 100644 --- a/com/hbm/blocks/bomb/NukeMan.java +++ b/com/hbm/blocks/bomb/NukeMan.java @@ -8,6 +8,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.entity.effect.EntityNukeCloudNoShroom; import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.bomb.TileEntityNukeMan; @@ -172,7 +173,7 @@ public class NukeMan extends BlockContainer implements IBomb { world.spawnEntityInWorld(entity);*/ - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); entity.posX = x; entity.posY = y; entity.posZ = z; diff --git a/com/hbm/blocks/bomb/NukeMike.java b/com/hbm/blocks/bomb/NukeMike.java index 20fddfa8c..717414896 100644 --- a/com/hbm/blocks/bomb/NukeMike.java +++ b/com/hbm/blocks/bomb/NukeMike.java @@ -9,6 +9,7 @@ import com.hbm.entity.effect.EntityNukeCloudBig; import com.hbm.entity.effect.EntityNukeCloudNoShroom; import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.bomb.TileEntityNukeMike; @@ -140,7 +141,7 @@ public class NukeMike extends BlockContainer implements IBomb { // world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); entity.posX = x; entity.posY = y; entity.posZ = z; diff --git a/com/hbm/blocks/bomb/NukePrototype.java b/com/hbm/blocks/bomb/NukePrototype.java index 997fcc8f9..f2228e1b9 100644 --- a/com/hbm/blocks/bomb/NukePrototype.java +++ b/com/hbm/blocks/bomb/NukePrototype.java @@ -7,6 +7,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.entity.effect.EntityCloudFleija; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; @@ -153,7 +154,7 @@ public class NukePrototype 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); - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); entity.posX = x; entity.posY = y; entity.posZ = z; diff --git a/com/hbm/blocks/bomb/NukeTsar.java b/com/hbm/blocks/bomb/NukeTsar.java index 91483055a..9a461aebb 100644 --- a/com/hbm/blocks/bomb/NukeTsar.java +++ b/com/hbm/blocks/bomb/NukeTsar.java @@ -6,6 +6,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.bomb.TileEntityNukeTsar; @@ -149,7 +150,7 @@ public class NukeTsar extends BlockContainer implements IBomb { //world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); entity.posX = x; entity.posY = y; entity.posZ = z; diff --git a/com/hbm/blocks/bomb/TurretHeavy.java b/com/hbm/blocks/bomb/TurretHeavy.java index 2b7acc869..e1796c83e 100644 --- a/com/hbm/blocks/bomb/TurretHeavy.java +++ b/com/hbm/blocks/bomb/TurretHeavy.java @@ -49,7 +49,7 @@ public class TurretHeavy extends TurretBase { bullet.motionY = vector.yCoord * 3; bullet.motionZ = vector.zCoord * 3; - bullet.damage = rand.nextInt(21) + 60; + bullet.damage = rand.nextInt(26) + 15; world.spawnEntityInWorld(bullet); diff --git a/com/hbm/blocks/bomb/TurretLight.java b/com/hbm/blocks/bomb/TurretLight.java index 993e1cc91..47ff7cae6 100644 --- a/com/hbm/blocks/bomb/TurretLight.java +++ b/com/hbm/blocks/bomb/TurretLight.java @@ -47,7 +47,7 @@ public class TurretLight extends TurretBase { bullet.motionY = vector.yCoord * 3; bullet.motionZ = vector.zCoord * 3; - bullet.damage = rand.nextInt(21) + 10; + bullet.damage = rand.nextInt(11) + 10; world.spawnEntityInWorld(bullet); } diff --git a/com/hbm/blocks/generic/WasteEarth.java b/com/hbm/blocks/generic/WasteEarth.java index 11f9353f7..d1ff7e5cd 100644 --- a/com/hbm/blocks/generic/WasteEarth.java +++ b/com/hbm/blocks/generic/WasteEarth.java @@ -204,6 +204,24 @@ public class WasteEarth extends Block { } } } + + if(rand.nextInt(10) == 0) { + Block b0; + int count = 0; + for(int i = -5; i < 5; i++) { + for(int j = -5; j < 6; j++) { + for(int k = -5; k < 5; k++) { + b0 = world.getBlock(x + i, y + j, z + k); + if(b0 == ModBlocks.mush) + { + count++; + } + } + } + } + if(count < 5) + world.setBlock(x, y + 1, z, ModBlocks.mush); + } } if(this == ModBlocks.waste_earth || this == ModBlocks.waste_mycelium) @@ -216,6 +234,10 @@ public class WasteEarth extends Block { } } } + + if(MainRegistry.enableAutoCleanup && (this == ModBlocks.waste_earth | this == ModBlocks.waste_mycelium)) + if(!world.isRemote) + world.setBlock(x, y, z, Blocks.dirt); } } diff --git a/com/hbm/entity/grenade/EntityGrenadeASchrab.java b/com/hbm/entity/grenade/EntityGrenadeASchrab.java index 748218214..ef3d666db 100644 --- a/com/hbm/entity/grenade/EntityGrenadeASchrab.java +++ b/com/hbm/entity/grenade/EntityGrenadeASchrab.java @@ -2,6 +2,7 @@ package com.hbm.entity.grenade; import com.hbm.entity.effect.EntityCloudFleija; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.main.MainRegistry; import net.minecraft.entity.EntityLivingBase; @@ -31,7 +32,7 @@ public class EntityGrenadeASchrab extends EntityGrenadeBase this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F); - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj); entity.posX = this.posX; entity.posY = this.posY; entity.posZ = this.posZ; diff --git a/com/hbm/entity/grenade/EntityGrenadeNuclear.java b/com/hbm/entity/grenade/EntityGrenadeNuclear.java index bf27f8264..d21704b51 100644 --- a/com/hbm/entity/grenade/EntityGrenadeNuclear.java +++ b/com/hbm/entity/grenade/EntityGrenadeNuclear.java @@ -1,6 +1,7 @@ package com.hbm.entity.grenade; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; import com.hbm.main.MainRegistry; @@ -28,7 +29,7 @@ public class EntityGrenadeNuclear extends EntityGrenadeBase if (!this.worldObj.isRemote) { this.setDead(); - EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj); entity0.posX = this.posX; entity0.posY = this.posY; entity0.posZ = this.posZ; diff --git a/com/hbm/entity/logic/EntityNukeExplosionMK3.java b/com/hbm/entity/logic/EntityNukeExplosionMK3.java new file mode 100644 index 000000000..1e26411a4 --- /dev/null +++ b/com/hbm/entity/logic/EntityNukeExplosionMK3.java @@ -0,0 +1,145 @@ +package com.hbm.entity.logic; + +import com.hbm.entity.effect.EntityFalloutRain; +import com.hbm.explosion.ExplosionFleija; +import com.hbm.explosion.ExplosionNukeAdvanced; +import com.hbm.explosion.ExplosionNukeGeneric; + +import net.minecraft.entity.Entity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class EntityNukeExplosionMK3 extends Entity { + + public int age = 0; + public int destructionRange = 0; + public ExplosionNukeAdvanced exp; + public ExplosionNukeAdvanced wst; + public ExplosionNukeAdvanced vap; + public ExplosionFleija expl; + public int speed = 1; + public float coefficient = 1; + public float coefficient2 = 1; + public boolean did = false; + public boolean did2 = false; + public boolean waste = true; + + @Override + protected void readEntityFromNBT(NBTTagCompound nbt) { + age = nbt.getInteger("age"); + destructionRange = nbt.getInteger("destructionRange"); + speed = nbt.getInteger("speed"); + coefficient = nbt.getFloat("coefficient"); + coefficient2 = nbt.getFloat("coefficient2"); + did = nbt.getBoolean("did"); + did2 = nbt.getBoolean("did2"); + waste = nbt.getBoolean("waste"); + + if(this.waste) + { + exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0); + exp.readFromNbt(nbt, "exp_"); + wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2); + wst.readFromNbt(nbt, "wst_"); + vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1); + vap.readFromNbt(nbt, "vap_"); + } else { + expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); + expl.readFromNbt(nbt, "expl_"); + } + + this.did = true; + + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbt) { + nbt.setInteger("age", age); + nbt.setInteger("destructionRange", destructionRange); + nbt.setInteger("speed", speed); + nbt.setFloat("coefficient", coefficient); + nbt.setFloat("coefficient2", coefficient2); + nbt.setBoolean("did", did); + nbt.setBoolean("did2", did2); + nbt.setBoolean("waste", waste); + + if(exp != null) + exp.saveToNbt(nbt, "exp_"); + if(wst != null) + wst.saveToNbt(nbt, "wst_"); + if(vap != null) + vap.saveToNbt(nbt, "vap_"); + if(expl != null) + expl.saveToNbt(nbt, "expl_"); + + } + + public EntityNukeExplosionMK3(World p_i1582_1_) { + super(p_i1582_1_); + } + + @Override + public void onUpdate() { + super.onUpdate(); + + if(!this.did) + { + if(this.waste) + { + exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0); + wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2); + vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1); + } else { + expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); + } + + this.did = true; + } + + speed = 20; + + boolean flag = false; + boolean flag2 = false; + boolean flag3 = false; + + for(int i = 0; i < this.speed; i++) + { + if(waste) { + flag = exp.update(); + flag2 = wst.update(); + flag3 = vap.update(); + + if(flag3) { + this.setDead(); + } + } else { + if(expl.update()) { + this.setDead(); + } + } + } + + if(!flag) + { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F); + ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2); + } else { + if (!did2 && waste) { + EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.destructionRange * 1.8) * 10); + fallout.posX = this.posX; + fallout.posY = this.posY; + fallout.posZ = this.posZ; + fallout.setScale((int)(this.destructionRange * 1.8)); + + this.worldObj.spawnEntityInWorld(fallout); + + did2 = true; + } + } + + age++; + } + + @Override + protected void entityInit() { } +} diff --git a/com/hbm/entity/missile/EntityMIRV.java b/com/hbm/entity/missile/EntityMIRV.java index 7407e4ff6..aa7546572 100644 --- a/com/hbm/entity/missile/EntityMIRV.java +++ b/com/hbm/entity/missile/EntityMIRV.java @@ -2,6 +2,7 @@ package com.hbm.entity.missile; import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.main.MainRegistry; @@ -38,7 +39,7 @@ public class EntityMIRV extends EntityThrowable { { if(!this.worldObj.isRemote) { - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj); entity.posX = this.posX; entity.posY = this.posY; entity.posZ = this.posZ; diff --git a/com/hbm/entity/missile/EntityMissileMirv.java b/com/hbm/entity/missile/EntityMissileMirv.java index 6e7533e11..979597261 100644 --- a/com/hbm/entity/missile/EntityMissileMirv.java +++ b/com/hbm/entity/missile/EntityMissileMirv.java @@ -2,6 +2,7 @@ package com.hbm.entity.missile; import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; import com.hbm.main.MainRegistry; @@ -22,7 +23,7 @@ public class EntityMissileMirv extends EntityMissileBaseAdvanced { @Override public void onImpact() { - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj); entity.posX = this.posX; entity.posY = this.posY; entity.posZ = this.posZ; diff --git a/com/hbm/entity/missile/EntityMissileNuclear.java b/com/hbm/entity/missile/EntityMissileNuclear.java index 840736920..b13d2e8d3 100644 --- a/com/hbm/entity/missile/EntityMissileNuclear.java +++ b/com/hbm/entity/missile/EntityMissileNuclear.java @@ -2,6 +2,7 @@ package com.hbm.entity.missile; import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.main.MainRegistry; @@ -20,7 +21,7 @@ public class EntityMissileNuclear extends EntityMissileBaseAdvanced { @Override public void onImpact() { - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj); entity.posX = this.posX; entity.posY = this.posY; entity.posZ = this.posZ; diff --git a/com/hbm/entity/mob/EntityNuclearCreeper.java b/com/hbm/entity/mob/EntityNuclearCreeper.java index 1db8f7417..e614e2348 100644 --- a/com/hbm/entity/mob/EntityNuclearCreeper.java +++ b/com/hbm/entity/mob/EntityNuclearCreeper.java @@ -4,7 +4,7 @@ import java.util.HashSet; import java.util.List; import com.hbm.entity.effect.EntityNukeCloudSmall; -import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; import com.hbm.items.ModItems; @@ -452,7 +452,7 @@ public class EntityNuclearCreeper extends EntityMob { this.explosionRadius *= 3; } - EntityNukeExplosionAdvanced explosion = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 explosion = new EntityNukeExplosionMK3(this.worldObj); explosion.speed = 25; explosion.coefficient = 5.0F; explosion.destructionRange = this.explosionRadius; diff --git a/com/hbm/entity/projectile/EntityBaleflare.java b/com/hbm/entity/projectile/EntityBaleflare.java index 0d4be4f54..a4aebe9a6 100644 --- a/com/hbm/entity/projectile/EntityBaleflare.java +++ b/com/hbm/entity/projectile/EntityBaleflare.java @@ -2,7 +2,7 @@ package com.hbm.entity.projectile; import java.util.List; -import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.entity.particle.EntitySSmokeFX; import com.hbm.explosion.ExplosionParticleB; import com.hbm.main.MainRegistry; @@ -243,7 +243,7 @@ public class EntityBaleflare extends Entity implements IProjectile { { if (!this.worldObj.isRemote) { - EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj); entity0.posX = this.posX; entity0.posY = this.posY; entity0.posZ = this.posZ; diff --git a/com/hbm/entity/projectile/EntityMiniMIRV.java b/com/hbm/entity/projectile/EntityMiniMIRV.java index cf5af217b..80bd4f3ea 100644 --- a/com/hbm/entity/projectile/EntityMiniMIRV.java +++ b/com/hbm/entity/projectile/EntityMiniMIRV.java @@ -2,7 +2,7 @@ package com.hbm.entity.projectile; import java.util.List; -import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; @@ -250,7 +250,7 @@ public class EntityMiniMIRV extends Entity implements IProjectile { if (!this.worldObj.isRemote) { - EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj); entity0.posX = this.posX; entity0.posY = this.posY; entity0.posZ = this.posZ; @@ -389,7 +389,7 @@ public class EntityMiniMIRV extends Entity implements IProjectile { if (!this.worldObj.isRemote) { - EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj); entity0.posX = this.posX; entity0.posY = this.posY; entity0.posZ = this.posZ; diff --git a/com/hbm/entity/projectile/EntityMiniNuke.java b/com/hbm/entity/projectile/EntityMiniNuke.java index 885fdad9e..cae8cfc4a 100644 --- a/com/hbm/entity/projectile/EntityMiniNuke.java +++ b/com/hbm/entity/projectile/EntityMiniNuke.java @@ -2,7 +2,7 @@ package com.hbm.entity.projectile; import java.util.List; -import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; import com.hbm.main.MainRegistry; @@ -237,7 +237,7 @@ public class EntityMiniNuke extends Entity implements IProjectile { if (!this.worldObj.isRemote) { - EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj); entity0.posX = this.posX; entity0.posY = this.posY; entity0.posZ = this.posZ; @@ -376,7 +376,7 @@ public class EntityMiniNuke extends Entity implements IProjectile { if (!this.worldObj.isRemote) { - EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(this.worldObj); entity0.posX = this.posX; entity0.posY = this.posY; entity0.posZ = this.posZ; diff --git a/com/hbm/inventory/MachineRecipes.java b/com/hbm/inventory/MachineRecipes.java index b0728efe8..006b21920 100644 --- a/com/hbm/inventory/MachineRecipes.java +++ b/com/hbm/inventory/MachineRecipes.java @@ -1459,10 +1459,10 @@ public class MachineRecipes { List list = new ArrayList(); switch(ItemAssemblyTemplate.EnumAssemblyTemplate.getEnum(stack.getItemDamage())) { - case TEST: - list.add(new ItemStack(Items.iron_ingot, 4)); - list.add(new ItemStack(Items.gold_ingot, 2)); - list.add(new ItemStack(Items.coal, 8)); + case SCHRABIDIUM_HAMMER: + list.add(new ItemStack(ModBlocks.block_schrabidium, 15)); + list.add(new ItemStack(ModItems.ingot_polymer, 128)); + list.add(new ItemStack(Items.nether_star, 2)); break; case MIXED_PLATE: list.add(new ItemStack(ModItems.plate_advanced_alloy, 2)); @@ -2731,8 +2731,8 @@ public class MachineRecipes { ItemStack output = null; switch(ItemAssemblyTemplate.EnumAssemblyTemplate.getEnum(stack.getItemDamage())) { - case TEST: - output = new ItemStack(ModItems.rotor_steel, 2); + case SCHRABIDIUM_HAMMER: + output = new ItemStack(ModItems.schrabidium_hammer, 1); break; case MIXED_PLATE: output = new ItemStack(ModItems.plate_mixed, 6); @@ -3473,11 +3473,6 @@ public class MachineRecipes { List list = new ArrayList(); switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) { - case TEST: - list.add(new ItemStack(Items.iron_ingot, 4)); - list.add(new ItemStack(Items.gold_ingot, 2)); - list.add(new ItemStack(Items.coal, 8)); - break; case CC_OIL: list.add(new ItemStack(Items.coal, 10)); break; @@ -3543,10 +3538,6 @@ public class MachineRecipes { FluidStack[] input = new FluidStack[2]; switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) { - case TEST: - input[0] = new FluidStack(400, FluidType.LAVA); - input[1] = new FluidStack(200, FluidType.KEROSENE); - break; case FP_HEAVYOIL: input[0] = new FluidStack(1000, FluidType.HEAVYOIL); break; @@ -3694,10 +3685,6 @@ public class MachineRecipes { ItemStack[] output = new ItemStack[4]; switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) { - case TEST: - output[0] = new ItemStack(ModItems.ingot_steel); - output[1] = new ItemStack(ModItems.ingot_desh, 2); - break; case ASPHALT: output[0] = new ItemStack(ModBlocks.asphalt, 4); output[1] = new ItemStack(ModBlocks.asphalt, 4); @@ -3791,9 +3778,6 @@ public class MachineRecipes { FluidStack[] input = new FluidStack[2]; switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) { - case TEST: - input[0] = new FluidStack(200, FluidType.WATER); - break; case FP_HEAVYOIL: input[0] = new FluidStack(300, FluidType.BITUMEN); input[1] = new FluidStack(700, FluidType.SMEAR); diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 7e90adf19..71037ea62 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -540,6 +540,7 @@ public class ModItems { public static Item linker; public static Item oil_detector; public static Item geiger_counter; + public static Item survey_scanner; public static Item template_folder; public static Item assembly_template; @@ -1754,6 +1755,7 @@ public class ModItems { turret_control = new ItemTurretControl().setUnlocalizedName("turret_control").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":turret_control"); turret_chip = new ItemTurretChip().setUnlocalizedName("turret_chip").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":turret_chip"); geiger_counter = new ItemGeigerCounter().setUnlocalizedName("geiger_counter").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":geiger_counter"); + survey_scanner = new ItemSurveyScanner().setUnlocalizedName("survey_scanner").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":survey_scanner"); template_folder = new ItemTemplateFolder().setUnlocalizedName("template_folder").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":template_folder"); assembly_template = new ItemAssemblyTemplate().setUnlocalizedName("assembly_template").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":assembly_template"); @@ -2584,6 +2586,7 @@ public class ModItems { GameRegistry.registerItem(turret_chip, turret_chip.getUnlocalizedName()); GameRegistry.registerItem(linker, linker.getUnlocalizedName()); GameRegistry.registerItem(oil_detector, oil_detector.getUnlocalizedName()); + GameRegistry.registerItem(survey_scanner, survey_scanner.getUnlocalizedName()); GameRegistry.registerItem(geiger_counter, geiger_counter.getUnlocalizedName()); //Missiles diff --git a/com/hbm/items/tool/ItemAssemblyTemplate.java b/com/hbm/items/tool/ItemAssemblyTemplate.java index 3ab543c4f..fc7128588 100644 --- a/com/hbm/items/tool/ItemAssemblyTemplate.java +++ b/com/hbm/items/tool/ItemAssemblyTemplate.java @@ -16,7 +16,6 @@ public class ItemAssemblyTemplate extends Item { public enum EnumAssemblyTemplate { - TEST, MIXED_PLATE, HAZMAT_CLOTH, ASBESTOS_CLOTH, @@ -221,7 +220,8 @@ public class ItemAssemblyTemplate extends Item { MIKE_COOLER, FLEIIJA_IGNITER, FLEIJA_CORE, - FLEIJA_PROPELLANT; + FLEIJA_PROPELLANT, + SCHRABIDIUM_HAMMER; //private final int value; //private EnumAssemblyTemplate(int value) { @@ -280,8 +280,6 @@ public class ItemAssemblyTemplate extends Item { EnumAssemblyTemplate enum1 = EnumAssemblyTemplate.getEnum(i); switch (enum1) { - case TEST: - return 200; case MIXED_PLATE: return 50; case HAZMAT_CLOTH: @@ -694,6 +692,8 @@ public class ItemAssemblyTemplate extends Item { return 500; case FLEIJA_PROPELLANT: return 400; + case SCHRABIDIUM_HAMMER: + return 1000; default: return 100; } diff --git a/com/hbm/items/tool/ItemChemistryTemplate.java b/com/hbm/items/tool/ItemChemistryTemplate.java index f2c25b59c..ebb351f3a 100644 --- a/com/hbm/items/tool/ItemChemistryTemplate.java +++ b/com/hbm/items/tool/ItemChemistryTemplate.java @@ -25,7 +25,6 @@ public class ItemChemistryTemplate extends Item { //SF - Solid Fuel Production //BP - Biofuel Production - TEST, FP_HEAVYOIL, FP_SMEAR, FP_NAPHTHA, @@ -120,8 +119,6 @@ public class ItemChemistryTemplate extends Item { EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(i); switch (enum1) { - case TEST: - return 200; case FP_HEAVYOIL: return 50; case FP_SMEAR: diff --git a/com/hbm/items/tool/ItemSurveyScanner.java b/com/hbm/items/tool/ItemSurveyScanner.java new file mode 100644 index 000000000..d4e136a04 --- /dev/null +++ b/com/hbm/items/tool/ItemSurveyScanner.java @@ -0,0 +1,359 @@ +package com.hbm.items.tool; + +import java.util.List; + +import com.hbm.blocks.ModBlocks; +import com.hbm.interfaces.IBomb; + +import net.minecraft.block.Block; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ChatComponentText; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; + +public class ItemSurveyScanner extends Item { + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) + { + list.add("Right click to perform scan."); + list.add("Shift click to change mode."); + list.add("Current mode: " + (getMode(stack) == 0 ? "Resources" : "Structures")); + } + + public int getMode(ItemStack stack) { + if(!stack.hasTagCompound()) { + stack.stackTagCompound = new NBTTagCompound(); + stack.stackTagCompound.setInteger("mode", 0); + return 0; + } else { + return stack.stackTagCompound.getInteger("mode"); + } + } + + public void setMode(ItemStack stack, int mode) { + if(!stack.hasTagCompound()) { + stack.stackTagCompound = new NBTTagCompound(); + } + stack.stackTagCompound.setInteger("mode", mode); + } + + public int getLevel(Block b, int meta, int i) { + + if(i == 0) { + int[] ids = OreDictionary.getOreIDs(new ItemStack(b, 1, meta)); + + for(int j = 0; j < ids.length; j++) { + + String s = OreDictionary.getOreName(ids[j]); + + if(s.length() > 3 && s.substring(0, 3).equals("ore")) + return 1; + } + } else { + if(b == Blocks.planks || b == Blocks.cobblestone || b == Blocks.glass || b == Blocks.stonebrick) + return 1; + if(b instanceof IBomb) + return 100; + if(b instanceof ITileEntityProvider) + return 10; + if(b == Blocks.nether_brick) + return 5; + } + + return 0; + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + + if(player.isSneaking()) { + setMode(stack, (getMode(stack) == 1 ? 0 : 1)); + world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F); + + if(world.isRemote) + { + player.addChatMessage(new ChatComponentText("Mode switched.")); + } + + } else { + + int x = (int)player.posX; + int y = (int)player.posY; + int z = (int)player.posZ; + + int level = 0; + int xOff = -25; + + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + xOff += 5; + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -25), world.getBlockMetadata(x + xOff, i, z + -25), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -20), world.getBlockMetadata(x + xOff, i, z + -20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -15), world.getBlockMetadata(x + xOff, i, z + -15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -10), world.getBlockMetadata(x + xOff, i, z + -10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + -5), world.getBlockMetadata(x + xOff, i, z + -5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 0), world.getBlockMetadata(x + xOff, i, z + 0), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 5), world.getBlockMetadata(x + xOff, i, z + 5), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 10), world.getBlockMetadata(x + xOff, i, z + 10), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 15), world.getBlockMetadata(x + xOff, i, z + 15), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 20), world.getBlockMetadata(x + xOff, i, z + 20), getMode(stack)); + for(int i = y + 15; i > 5; i--) + level += getLevel(world.getBlock(x + xOff, i, z + 25), world.getBlockMetadata(x + xOff, i, z + 25), getMode(stack)); + + world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F); + + if(world.isRemote) + { + player.addChatMessage(new ChatComponentText("Scanned! Result: " + level)); + } + } + + player.swingItem(); + + return stack; + + } +} \ No newline at end of file diff --git a/com/hbm/items/tool/ItemTurretControl.java b/com/hbm/items/tool/ItemTurretControl.java index fbd8a7d9f..2bba82818 100644 --- a/com/hbm/items/tool/ItemTurretControl.java +++ b/com/hbm/items/tool/ItemTurretControl.java @@ -119,8 +119,16 @@ public class ItemTurretControl extends Item { int z = stack.getTagCompound().getInteger("zCoord"); if(world.getBlock(x, y, z) instanceof TurretBase) { + + TileEntity te = world.getTileEntity(x, y, z); - ((TurretBase)world.getBlock(x, y, z)).executeReleaseAction(world, j, player.rotationYaw, player.rotationPitch, x, y, z); + if(te != null && te instanceof TileEntityTurretBase) { + TileEntityTurretBase turret = (TileEntityTurretBase)te; + + if(!turret.isAI) { + ((TurretBase)world.getBlock(x, y, z)).executeReleaseAction(world, j, player.rotationYaw, player.rotationPitch, x, y, z); + } + } } } } @@ -152,8 +160,17 @@ public class ItemTurretControl extends Item { int z = stack.getTagCompound().getInteger("zCoord"); if(world.getBlock(x, y, z) instanceof TurretBase) { + + TileEntity te = world.getTileEntity(x, y, z); - ((TurretBase)world.getBlock(x, y, z)).executeHoldAction(world, stack.getMaxItemUseDuration() - count, player.rotationYaw, player.rotationPitch, x, y, z); + if(te != null && te instanceof TileEntityTurretBase) { + TileEntityTurretBase turret = (TileEntityTurretBase)te; + + if(!turret.isAI) { + ((TurretBase)world.getBlock(x, y, z)).executeHoldAction(world, stack.getMaxItemUseDuration() - count, player.rotationYaw, player.rotationPitch, x, y, z); + + } + } } } } diff --git a/com/hbm/lib/RefStrings.java b/com/hbm/lib/RefStrings.java index 9b6c71e2d..0a4f648a4 100644 --- a/com/hbm/lib/RefStrings.java +++ b/com/hbm/lib/RefStrings.java @@ -3,7 +3,7 @@ package com.hbm.lib; public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech Mod"; - public static final String VERSION = "1.0.26 BETA (Bromine-Lanthanium-X02)"; + public static final String VERSION = "1.0.26 PRE (ME)"; //HBM's Beta Naming Convention: //V T (X-Y-Z) //V -> next release version diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index b3f278a9a..d8ca5f83f 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -947,6 +947,9 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.designator_range, 1), new Object[] { "RRD", "PIC", " P", 'P', "plateSteel", 'R', Items.redstone, 'C', ModItems.circuit_gold, 'D', ModItems.designator, 'I', "ingotSteel" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.linker, 1), new Object[] { "I I", "ICI", "GGG", 'I', "plateIron", 'G', "plateGold", 'C', ModItems.circuit_gold })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.oil_detector, 1), new Object[] { "W I", "WCI", "PPP", 'W', ModItems.wire_gold, 'I', "ingotCopper", 'C', ModItems.circuit_red_copper, 'P', "plateSteel" })); + GameRegistry.addRecipe(new ItemStack(ModItems.turret_chip, 1), new Object[] { "WWW", "CPC", "WWW", 'W', ModItems.wire_gold, 'P', ModItems.ingot_polymer, 'C', ModItems.circuit_gold, }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.survey_scanner, 1), new Object[] { "SWS", " G ", "PCP", 'W', ModItems.wire_gold, 'P', ModItems.ingot_polymer, 'C', ModItems.circuit_gold, 'S', "plateSteel", 'G', "ingotGold" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', ModItems.wire_gold, 'P', ModItems.ingot_polymer, 'C', ModItems.circuit_copper, 'G', "ingotGold", 'S', "plateSteel", 'B', ModItems.ingot_beryllium })); GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_hammer, 1), new Object[] { "BBB", "BBB", " S ", 'B', Item.getItemFromBlock(ModBlocks.block_schrabidium), 'S', Items.stick }); GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', new ItemStack(ModItems.ingot_euphemium, 1, 34), 'S', Items.stick }); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 5ebc0bc06..8b5ec9745 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -63,6 +63,7 @@ import com.hbm.entity.grenade.EntityGrenadeZOMG; import com.hbm.entity.item.EntityMinecartTest; import com.hbm.entity.logic.EntityNukeExplosion; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.entity.logic.EntityNukeExplosionPlus; import com.hbm.entity.missile.EntityBombletSelena; import com.hbm.entity.missile.EntityBombletTheta; @@ -326,6 +327,7 @@ public class MainRegistry public static boolean enableBarrels = false; public static boolean enableNITAN = true; public static boolean enableNukeClouds = true; + public static boolean enableAutoCleanup = false; public static int uraniumSpawn = 7; public static int titaniumSpawn = 8; public static int sulfurSpawn = 5; @@ -580,6 +582,7 @@ public class MainRegistry EntityRegistry.registerModEntity(EntityBombletTheta.class, "entity_theta", 79, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityBombletSelena.class, "entity_selena", 80, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityTSmokeFX.class, "entity_t_smoke_fx", 81, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityNukeExplosionMK3.class, "entity_nuke_mk3", 82, this, 1000, 1, true); EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00); EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72); @@ -916,6 +919,7 @@ public class MainRegistry enableBarrels = config.get(Configuration.CATEGORY_GENERAL, "1.5_enableNuclearBarrelSpawn", false).getBoolean(false); enableNITAN = config.get(Configuration.CATEGORY_GENERAL, "1.6_enableNITANChestSpawn", true).getBoolean(true); enableNukeClouds = config.get(Configuration.CATEGORY_GENERAL, "1.7_enableMushroomClouds", true).getBoolean(true); + enableAutoCleanup = config.get(Configuration.CATEGORY_GENERAL, "1.8_enableAutomaticRadCleanup", false).getBoolean(false); Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.0_uraniumSpawnrate", 7); PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk"; diff --git a/com/hbm/tileentity/bomb/TileEntityNukeCustom.java b/com/hbm/tileentity/bomb/TileEntityNukeCustom.java index 489fe6db7..19585048f 100644 --- a/com/hbm/tileentity/bomb/TileEntityNukeCustom.java +++ b/com/hbm/tileentity/bomb/TileEntityNukeCustom.java @@ -424,17 +424,17 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory } // if(item == ModItems.nuclear_waste) { - this.amatStrength *= 1.05F; + this.dirtyStrength *= 1.05F; } if(item == Item.getItemFromBlock(ModBlocks.yellow_barrel)) { - this.amatStrength *= 1.05F; - this.amatStrength *= 1.05F; - this.amatStrength *= 1.05F; - this.amatStrength *= 1.05F; - this.amatStrength *= 1.05F; - this.amatStrength *= 1.05F; - this.amatStrength *= 1.05F; - this.amatStrength *= 1.05F; + this.dirtyStrength *= 1.05F; + this.dirtyStrength *= 1.05F; + this.dirtyStrength *= 1.05F; + this.dirtyStrength *= 1.05F; + this.dirtyStrength *= 1.05F; + this.dirtyStrength *= 1.05F; + this.dirtyStrength *= 1.05F; + this.dirtyStrength *= 1.05F; } } } diff --git a/com/hbm/tileentity/machine/TileEntityMachineAssembler.java b/com/hbm/tileentity/machine/TileEntityMachineAssembler.java index 676d18544..805354c55 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineAssembler.java +++ b/com/hbm/tileentity/machine/TileEntityMachineAssembler.java @@ -315,6 +315,18 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve tryFillContainer(hopper, 5); } + if(te != null && te instanceof TileEntityCrateIron) { + TileEntityCrateIron hopper = (TileEntityCrateIron)te; + + tryFillContainer(hopper, 5); + } + + if(te != null && te instanceof TileEntityCrateSteel) { + TileEntityCrateSteel hopper = (TileEntityCrateSteel)te; + + tryFillContainer(hopper, 5); + } + te = null; if(meta == 2) { te = worldObj.getTileEntity(xCoord + 3, yCoord, zCoord - 1); @@ -344,6 +356,22 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve if(tryFillAssembler(hopper, i)) break; } + + if(te != null && te instanceof TileEntityCrateIron) { + TileEntityCrateIron hopper = (TileEntityCrateIron)te; + + for(int i = 0; i < hopper.getSizeInventory(); i++) + if(tryFillAssembler(hopper, i)) + break; + } + + if(te != null && te instanceof TileEntityCrateSteel) { + TileEntityCrateSteel hopper = (TileEntityCrateSteel)te; + + for(int i = 0; i < hopper.getSizeInventory(); i++) + if(tryFillAssembler(hopper, i)) + break; + } PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, rotation, isProgressing)); PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord)); diff --git a/com/hbm/tileentity/machine/TileEntityMachineChemplant.java b/com/hbm/tileentity/machine/TileEntityMachineChemplant.java index bbe4fadf9..27dc9e645 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineChemplant.java +++ b/com/hbm/tileentity/machine/TileEntityMachineChemplant.java @@ -372,6 +372,20 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve tryFillContainer(hopper, i); } + if(te != null && te instanceof TileEntityCrateIron) { + TileEntityCrateIron hopper = (TileEntityCrateIron)te; + + for(int i = 5; i < 9; i++) + tryFillContainer(hopper, i); + } + + if(te != null && te instanceof TileEntityCrateSteel) { + TileEntityCrateSteel hopper = (TileEntityCrateSteel)te; + + for(int i = 5; i < 9; i++) + tryFillContainer(hopper, i); + } + te = null; if(meta == 2) { te = worldObj.getTileEntity(xCoord + 3, yCoord, zCoord - 1); @@ -402,6 +416,22 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve break; } + if(te != null && te instanceof TileEntityCrateIron) { + TileEntityCrateIron chest = (TileEntityCrateIron)te; + + for(int i = 0; i < chest.getSizeInventory(); i++) + if(tryFillAssembler(chest, i)) + break; + } + + if(te != null && te instanceof TileEntityCrateSteel) { + TileEntityCrateSteel hopper = (TileEntityCrateSteel)te; + + for(int i = 0; i < hopper.getSizeInventory(); i++) + if(tryFillAssembler(hopper, i)) + break; + } + PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, rotation, isProgressing)); PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord)); } diff --git a/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java b/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java index c81e4a3e7..bc368080e 100644 --- a/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java +++ b/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java @@ -7,7 +7,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.machine.MachineGenerator; -import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.explosion.ExplosionParticle; import com.hbm.handler.FluidTypeHandler.FluidType; @@ -659,7 +659,7 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv this.slots[i] = null; } - EntityNukeExplosionAdvanced explosion = new EntityNukeExplosionAdvanced(this.worldObj); + EntityNukeExplosionMK3 explosion = new EntityNukeExplosionMK3(this.worldObj); explosion.speed = 25; explosion.coefficient = 5.0F; explosion.destructionRange = 35; diff --git a/com/hbm/tileentity/machine/TileEntityWatzCore.java b/com/hbm/tileentity/machine/TileEntityWatzCore.java index fd43ab7cb..0f6fd33b0 100644 --- a/com/hbm/tileentity/machine/TileEntityWatzCore.java +++ b/com/hbm/tileentity/machine/TileEntityWatzCore.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Random; import com.hbm.blocks.ModBlocks; -import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.IReactor; import com.hbm.interfaces.ISource; @@ -662,7 +662,7 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "game.neutral.swim.splash", 3.0F, 0.5F); this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "random.explode", 3.0F, 0.75F); } else { - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(worldObj); + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(worldObj); entity.posX = this.xCoord; entity.posY = this.yCoord; entity.posZ = this.zCoord;