vault door fix, chlorine gas, clouds and cloud grenades

This commit is contained in:
HbmMods 2018-08-19 15:58:40 +02:00
parent 1706b16c22
commit 06baf70c30
51 changed files with 865 additions and 115 deletions

View File

@ -162,6 +162,8 @@ death.attack.broadcast=%1$s wurde das Gehirn geschmolzen.
death.attack.ams=%1$s wurde in tödlichen Teilchen gebadet, die von der Menschheit erst benannt werden müssen.
death.attack.amsCore=%1$s wurde vom Feuer einer Singularität verdampft.
death.attack.bang=%1$s wurde in mundgerechte Stücke zerfetzt.
death.attack.pc=%1$s wurde zu einer Pfütze in der pinken Wolke.
death.attack.cloud=%1$s schmolz wie ein Eis in der Sonne.
item.redstone_sword.name=Redstoneschwert
item.big_sword.name=Großes Schwert
@ -1016,7 +1018,7 @@ item.grenade_frag.name=Splittergranate
item.grenade_fire.name=Brandsplittergranate
item.grenade_shrapnel.name=Schrapnellgranate
item.grenade_cluster.name=Cluster-Bombe
item.grenade_flare.name=Blendgranate
item.grenade_flare.name=Signalfeuer
item.grenade_electric.name=Blitzbombe
item.grenade_poison.name=Giftgranate
item.grenade_gas.name=Gasgranate
@ -1032,6 +1034,8 @@ item.grenade_nuke.name=Mark VI Bohrgranate
item.grenade_nuclear.name=Nuka-Granate
item.grenade_zomg.name=Negativenergie-Paarvernichtungsgranate
item.grenade_black_hole.name=Schwarzes-Loch-Granate
item.grenade_cloud.name=Gefäß voll Wolke
item.grenade_pink_cloud.name=Gefäß voll pinker Wolke
item.ullapool_caber.name=Ullapool'sche Stiel
item.rod_uranium_fuel.name=Urankernbrennstoffzelle
@ -1485,6 +1489,10 @@ tile.machine_converter_he_rf.name=HE zu RF Konverter
tile.machine_converter_rf_he.name=RF zu HE Konverter
tile.machine_transformer.name=Transformator
tile.vent_chlorine.name=Chlorgas-Auslass
tile.vent_cloud.name=Wolken-Auslass
tile.vent_pink_cloud.name=Pinker Wolken-Auslass
item.schrabidium_hammer.name=Schrabidiumhammer
item.shimmer_sledge.name=Shimmer Sledge
item.shimmer_axe.name=Shimmer Axe

View File

@ -162,6 +162,8 @@ death.attack.broadcast=%1$s got their brain melted.
death.attack.ams=%1$s was bathed in deadly particles that have yet to be named by human science.
death.attack.amsCore=%1$s was vaporized in the fire of a singularity.
death.attack.bang=%1$s was blasted into bite-sized pieces.
death.attack.pc=%1$s was reduced to a puddle in the pink cloud.
death.attack.cloud=%1$s melted like a popsicle in the sun.
item.redstone_sword.name=Redstone Sword
item.big_sword.name=Great Sword
@ -1016,7 +1018,7 @@ item.grenade_frag.name=Frag Grenade
item.grenade_fire.name=Flame Frag Grenade
item.grenade_shrapnel.name=Shrapnel Grenade
item.grenade_cluster.name=Cluster Bomb
item.grenade_flare.name=Flare Grenade
item.grenade_flare.name=Signal Flare
item.grenade_electric.name=Lightning Bomb
item.grenade_poison.name=Poison Grenade
item.grenade_gas.name=Gas Grenade
@ -1032,6 +1034,8 @@ item.grenade_nuke.name=Mark VI Drill Grenade
item.grenade_nuclear.name=Nuka Grenade
item.grenade_zomg.name=Negative Energy Pair Annihilation Grenade
item.grenade_black_hole.name=Black Hole Grenade
item.grenade_cloud.name=Jar of Cloud
item.grenade_pink_cloud.name=Jar of Pink Cloud
item.ullapool_caber.name=Ullapool Caber
item.rod_uranium_fuel.name=Uranium Fuel Rod
@ -1485,6 +1489,10 @@ tile.machine_converter_he_rf.name=HE to RF Converter
tile.machine_converter_rf_he.name=RF to HE Converter
tile.machine_transformer.name=Transformer
tile.vent_chlorine.name=Chlorine Vent
tile.vent_cloud.name=Cloud Vent
tile.vent_pink_cloud.name=Pink Cloud Vent
item.schrabidium_hammer.name=Schrabidium Hammer
item.shimmer_sledge.name=Shimmer Sledge
item.shimmer_axe.name=Shimmer Axe

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

View File

@ -489,6 +489,10 @@ public class ModBlocks {
public static Block crystal_pulsar;
public static Block taint;
public static Block vent_chlorine;
public static Block vent_cloud;
public static Block vent_pink_cloud;
public static Block mud_block;
public static Fluid mud_fluid;
public static final Material fluidmud = (new MaterialLiquid(MapColor.adobeColor));
@ -898,6 +902,10 @@ public class ModBlocks {
crystal_pulsar = new CrystalPulsar(Material.iron).setBlockName("crystal_pulsar").setHardness(15.0F).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":crystal_pulsar");
taint = new BlockTaint(Material.iron).setBlockName("taint").setHardness(15.0F).setResistance(10.0F).setCreativeTab(null);
vent_chlorine = new BlockVent(Material.iron).setBlockName("vent_chlorine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_chlorine");
vent_cloud = new BlockVent(Material.iron).setBlockName("vent_cloud").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_cloud");
vent_pink_cloud = new BlockVent(Material.iron).setBlockName("vent_pink_cloud").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_pink_cloud");
statue_elb = new DecoBlockAlt(Material.iron).setBlockName("#null").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
statue_elb_g = new DecoBlockAlt(Material.iron).setBlockName("#void").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
statue_elb_w = new DecoBlockAlt(Material.iron).setBlockName("#ngtv").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
@ -1361,6 +1369,9 @@ public class ModBlocks {
//Other Technical Blocks
GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName());
GameRegistry.registerBlock(drill_pipe, drill_pipe.getUnlocalizedName());
GameRegistry.registerBlock(vent_chlorine, vent_chlorine.getUnlocalizedName());
GameRegistry.registerBlock(vent_cloud, vent_cloud.getUnlocalizedName());
GameRegistry.registerBlock(vent_pink_cloud, vent_pink_cloud.getUnlocalizedName());
//???
GameRegistry.registerBlock(crystal_virus, crystal_virus.getUnlocalizedName());

View File

@ -209,7 +209,7 @@ public class BombMulti extends BlockContainer implements IBomb {
this.poisonRadius += 15;
break;
case 6:
this.gasCloud += 15;
this.gasCloud += 50;
}
switch(entity.return5type())
{
@ -229,7 +229,7 @@ public class BombMulti extends BlockContainer implements IBomb {
this.poisonRadius += 15;
break;
case 6:
this.gasCloud += 15;
this.gasCloud += 50;
}
entity.clearSlots();
@ -255,7 +255,7 @@ public class BombMulti extends BlockContainer implements IBomb {
if(this.gasCloud > 0)
{
ExplosionChaos.poison(world, x, y, z, this.gasCloud);
ExplosionChaos.spawnChlorine(world, x, y, z, this.gasCloud, this.gasCloud / 50, 0);
}
this.clusterCount = 0;

View File

@ -0,0 +1,42 @@
package com.hbm.blocks.generic;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.deco.TileEntityVent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockVent extends BlockContainer {
@SideOnly(Side.CLIENT)
private IIcon iconTop;
public BlockVent(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityVent();
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
super.registerBlockIcons(iconRegister);
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":vent_blank");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon);
}
}

View File

@ -0,0 +1,36 @@
package com.hbm.entity.grenade;
import java.util.Random;
import com.hbm.explosion.ExplosionChaos;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class EntityGrenadeCloud extends EntityGrenadeBase {
public EntityGrenadeCloud(World p_i1773_1_) {
super(p_i1773_1_);
}
public EntityGrenadeCloud(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
super(p_i1774_1_, p_i1774_2_);
}
public EntityGrenadeCloud(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.playAuxSFX(2002, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), 0);
ExplosionChaos.spawnChlorine(worldObj, posX, posY, posZ, 250, 1.5, 1);
}
}
}

View File

@ -8,42 +8,43 @@ import java.util.Random;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
public class EntityGrenadeGas extends EntityGrenadeBase
{
public class EntityGrenadeGas extends EntityGrenadeBase {
private static final String __OBFID = "CL_00001722";
Random rand = new Random();
public EntityGrenadeGas(World p_i1773_1_)
{
public EntityGrenadeGas(World p_i1773_1_) {
super(p_i1773_1_);
}
public EntityGrenadeGas(World p_i1774_1_, EntityLivingBase p_i1774_2_)
{
public EntityGrenadeGas(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
super(p_i1774_1_, p_i1774_2_);
}
public EntityGrenadeGas(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
{
public EntityGrenadeGas(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();
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
ExplosionChaos.poison(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5);
//for(int i = 0; 0 < 15; i++) {
// ExplosionChaos.poison(this.worldObj, (int)this.posX,
// (int)this.posY, (int)this.posZ, 5);
// for(int i = 0; 0 < 15; i++) {
ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50);
ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50);
ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50);
ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50);
/*
* ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ,
* 50); ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY,
* posZ, 50); ExplosionLarge.spawnParticlesRadial(worldObj, posX,
* posY, posZ, 50); ExplosionLarge.spawnParticlesRadial(worldObj,
* posX, posY, posZ, 50);
*/
//}
ExplosionChaos.spawnChlorine(worldObj, posX, posY, posZ, 50, 1.25, 0);
// }
}
}

View File

@ -0,0 +1,34 @@
package com.hbm.entity.grenade;
import com.hbm.explosion.ExplosionChaos;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class EntityGrenadePC extends EntityGrenadeBase {
public EntityGrenadePC(World p_i1773_1_) {
super(p_i1773_1_);
}
public EntityGrenadePC(World p_i1774_1_, EntityLivingBase p_i1774_2_) {
super(p_i1774_1_, p_i1774_2_);
}
public EntityGrenadePC(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.playAuxSFX(2002, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), 0);
ExplosionChaos.spawnChlorine(worldObj, posX, posY, posZ, 500, 2, 2);
}
}
}

View File

@ -0,0 +1,98 @@
package com.hbm.entity.particle;
import com.hbm.explosion.ExplosionChaos;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityChlorineFX extends EntityModFX {
public EntityChlorineFX(World world) {
super(world, 0, 0, 0);
}
public EntityChlorineFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_,
double p_i1225_8_, double p_i1225_10_, double p_i1225_12_) {
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
}
public EntityChlorineFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_,
double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) {
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i1226_8_;
this.motionY += p_i1226_10_;
this.motionZ += p_i1226_12_;
this.particleRed = this.particleGreen = this.particleBlue = (float) (Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= p_i1226_14_;
this.smokeParticleScale = this.particleScale;
// this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
// this.particleMaxAge = (int)((float)this.particleMaxAge *
// p_i1226_14_);
this.noClip = false;
}
/**
* Called to update the entity's position/logic.
*/
@Override
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (maxAge < 700) {
maxAge = rand.nextInt(101) + 700;
}
if (rand.nextInt(50) == 0)
ExplosionChaos.poison(worldObj, (int) posX, (int) posY, (int) posZ, 2);
this.particleAge++;
if (this.particleAge >= maxAge) {
this.setDead();
}
this.motionX *= 0.7599999785423279D;
this.motionY *= 0.7599999785423279D;
this.motionZ *= 0.7599999785423279D;
if (this.onGround) {
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
if(worldObj.isRaining() && worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))) {
this.motionY -= 0.01;
}
double subdivisions = 4;
for(int i = 0; i < subdivisions; i++) {
this.posX += this.motionX/subdivisions;
this.posY += this.motionY/subdivisions;
this.posZ += this.motionZ/subdivisions;
if (worldObj.getBlock((int) posX, (int) posY, (int) posZ).isNormalCube()) {
if(rand.nextInt(5) != 0)
this.setDead();
this.posX -= this.motionX/subdivisions;
this.posY -= this.motionY/subdivisions;
this.posZ -= this.motionZ/subdivisions;
this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;
}
}
}
}

View File

@ -0,0 +1,91 @@
package com.hbm.entity.particle;
import com.hbm.explosion.ExplosionChaos;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityCloudFX extends EntityModFX {
public EntityCloudFX(World world) {
super(world, 0, 0, 0);
}
public EntityCloudFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
{
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
}
public EntityCloudFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
{
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i1226_8_;
this.motionY += p_i1226_10_;
this.motionZ += p_i1226_12_;
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= p_i1226_14_;
this.smokeParticleScale = this.particleScale;
this.noClip = false;
}
@Override
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (maxAge < 900) {
maxAge = rand.nextInt(301) + 900;
}
if (!worldObj.isRemote && rand.nextInt(50) == 0)
ExplosionChaos.c(worldObj, (int) posX, (int) posY, (int) posZ, 2);
this.particleAge++;
if (this.particleAge >= maxAge) {
this.setDead();
}
this.motionX *= 0.7599999785423279D;
this.motionY *= 0.7599999785423279D;
this.motionZ *= 0.7599999785423279D;
if (this.onGround) {
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
if(worldObj.isRaining() && worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))) {
this.motionY -= 0.01;
}
double subdivisions = 4;
for(int i = 0; i < subdivisions; i++) {
this.posX += this.motionX/subdivisions;
this.posY += this.motionY/subdivisions;
this.posZ += this.motionZ/subdivisions;
if (worldObj.getBlock((int) posX, (int) posY, (int) posZ).isNormalCube()) {
if(rand.nextInt(5) != 0)
this.setDead();
this.posX -= this.motionX/subdivisions;
this.posY -= this.motionY/subdivisions;
this.posZ -= this.motionZ/subdivisions;
this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;
}
}
}
}

View File

@ -2,21 +2,20 @@ package com.hbm.entity.particle;
import net.minecraft.world.World;
public class EntityDSmokeFX extends EntityModFX
{
public class EntityDSmokeFX extends EntityModFX {
private static final String __OBFID = "CL_00000924";
public EntityDSmokeFX(World world) {
super(world, 0, 0, 0);
}
public EntityDSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
{
public EntityDSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_,
double p_i1225_10_, double p_i1225_12_) {
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
}
public EntityDSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
{
public EntityDSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_,
double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) {
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
@ -24,12 +23,13 @@ public class EntityDSmokeFX extends EntityModFX
this.motionX += p_i1226_8_;
this.motionY += p_i1226_10_;
this.motionZ += p_i1226_12_;
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
this.particleRed = this.particleGreen = this.particleBlue = (float) (Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= p_i1226_14_;
this.smokeParticleScale = this.particleScale;
//this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
//this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_);
// this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
// this.particleMaxAge = (int)((float)this.particleMaxAge *
// p_i1226_14_);
this.noClip = false;
}
@ -38,21 +38,18 @@ public class EntityDSmokeFX extends EntityModFX
*/
@Override
public void onUpdate()
{
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if(maxAge < 100)
{
if (maxAge < 100) {
maxAge = rand.nextInt(21) + 65;
}
this.particleAge++;
if (this.particleAge >= maxAge)
{
if (this.particleAge >= maxAge) {
this.setDead();
}
@ -60,8 +57,7 @@ public class EntityDSmokeFX extends EntityModFX
this.motionY *= 0.7599999785423279D;
this.motionZ *= 0.7599999785423279D;
if (this.onGround)
{
if (this.onGround) {
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}

View File

@ -0,0 +1,98 @@
package com.hbm.entity.particle;
import com.hbm.blocks.ModBlocks;
import com.hbm.explosion.ExplosionChaos;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityPinkCloudFX extends EntityModFX {
public EntityPinkCloudFX(World world) {
super(world, 0, 0, 0);
}
public EntityPinkCloudFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
{
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
}
public EntityPinkCloudFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
{
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i1226_8_;
this.motionY += p_i1226_10_;
this.motionZ += p_i1226_12_;
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= p_i1226_14_;
this.smokeParticleScale = this.particleScale;
this.noClip = false;
}
@Override
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (maxAge < 900) {
maxAge = rand.nextInt(301) + 900;
}
if (!worldObj.isRemote && rand.nextInt(50) == 0)
ExplosionChaos.pc(worldObj, (int) posX, (int) posY, (int) posZ, 2);
this.particleAge++;
if (this.particleAge >= maxAge) {
this.setDead();
}
this.motionX *= 0.7599999785423279D;
this.motionY *= 0.7599999785423279D;
this.motionZ *= 0.7599999785423279D;
if (this.onGround) {
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
if(worldObj.isRaining() && worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))) {
this.motionY -= 0.01;
}
double subdivisions = 4;
for(int i = 0; i < subdivisions; i++) {
this.posX += this.motionX/subdivisions;
this.posY += this.motionY/subdivisions;
this.posZ += this.motionZ/subdivisions;
if(worldObj.getBlock((int) posX, (int) posY, (int) posZ) == ModBlocks.radiorec) {
this.setDead();
int meta = worldObj.getBlockMetadata((int) posX, (int) posY, (int) posZ);
worldObj.setBlock((int) posX, (int) posY, (int) posZ, ModBlocks.broadcaster_pc, meta, 2);
}
if (worldObj.getBlock((int) posX, (int) posY, (int) posZ).isNormalCube()) {
if(rand.nextInt(5) != 0)
this.setDead();
this.posX -= this.motionX/subdivisions;
this.posY -= this.motionY/subdivisions;
this.posZ -= this.motionZ/subdivisions;
this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;
}
}
}
}

View File

@ -10,6 +10,11 @@ import com.hbm.entity.grenade.EntityGrenadeZOMG;
import com.hbm.entity.missile.EntityMIRV;
import com.hbm.entity.missile.EntityMissileAntiBallistic;
import com.hbm.entity.missile.EntityMissileBase;
import com.hbm.entity.particle.EntityChlorineFX;
import com.hbm.entity.particle.EntityCloudFX;
import com.hbm.entity.particle.EntityDSmokeFX;
import com.hbm.entity.particle.EntityModFX;
import com.hbm.entity.particle.EntityPinkCloudFX;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.entity.projectile.EntityMiniNuke;
import com.hbm.entity.projectile.EntityRainbow;
@ -20,6 +25,7 @@ import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.ISource;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@ -348,6 +354,27 @@ public class ExplosionChaos {
}
public static void spawnChlorine(World world, double x, double y, double z, int count, double speed, int type) {
for(int i = 0; i < count; i++) {
EntityModFX fx = null;
if(type == 0) {
fx = new EntityChlorineFX(world, x, y, z, 0.0, 0.0, 0.0);
} else if(type == 1) {
fx = new EntityCloudFX(world, x, y, z, 0.0, 0.0, 0.0);
} else {
fx = new EntityPinkCloudFX(world, x, y, z, 0.0, 0.0, 0.0);
}
fx.motionY = rand.nextGaussian() * speed;
fx.motionX = rand.nextGaussian() * speed;
fx.motionZ = rand.nextGaussian() * speed;
world.spawnEntityInWorld(fx);
}
}
public static void destruction(World world, int x, int y, int z) {
if (world.getBlock(x, y, z) == Blocks.bedrock || world.getBlock(x, y, z) == ModBlocks.reinforced_brick
@ -596,19 +623,121 @@ public class ExplosionChaos {
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
if (d9 < wat) {
if (entity instanceof EntityPlayer && Library.checkForGasMask((EntityPlayer) entity)) {
// Library.damageSuit(((EntityPlayer)entity), 3);
Library.damageSuit((EntityPlayer)entity, 3, rand.nextInt(2));
} else if (entity instanceof EntityLivingBase) {
((EntityLivingBase) entity)
.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 15 * 20, 0));
.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 5 * 20, 0));
((EntityLivingBase) entity)
.addPotionEffect(new PotionEffect(Potion.poison.getId(), 2 * 60 * 20, 2));
.addPotionEffect(new PotionEffect(Potion.poison.getId(), 20 * 20, 2));
((EntityLivingBase) entity)
.addPotionEffect(new PotionEffect(Potion.wither.getId(), 30 * 20, 5));
.addPotionEffect(new PotionEffect(Potion.wither.getId(), 1 * 20, 1));
((EntityLivingBase) entity)
.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 2 * 60 * 20, 2));
.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30 * 20, 1));
((EntityLivingBase) entity)
.addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 2 * 60 * 20, 2));
.addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 30 * 20, 2));
}
}
}
}
bombStartStrength = (int) f;
}
public static void pc(World world, int x, int y, int z, int bombStartStrength) {
float f = bombStartStrength;
HashSet hashset = new HashSet();
int i;
int j;
int k;
double d5;
double d6;
double d7;
double wat = bombStartStrength * 2;
boolean isOccupied = false;
bombStartStrength *= 2.0F;
i = MathHelper.floor_double(x - wat - 1.0D);
j = MathHelper.floor_double(x + wat + 1.0D);
k = MathHelper.floor_double(y - wat - 1.0D);
int i2 = MathHelper.floor_double(y + wat + 1.0D);
int l = MathHelper.floor_double(z - wat - 1.0D);
int j2 = MathHelper.floor_double(z + wat + 1.0D);
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
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) / bombStartStrength;
if (d4 <= 1.0D) {
d5 = entity.posX - x;
d6 = entity.posY + entity.getEyeHeight() - y;
d7 = entity.posZ - z;
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
if (d9 < wat) {
if (entity instanceof EntityPlayer) {
Library.damageSuit((EntityPlayer)entity, 0, 25);
Library.damageSuit((EntityPlayer)entity, 1, 25);
Library.damageSuit((EntityPlayer)entity, 2, 25);
Library.damageSuit((EntityPlayer)entity, 3, 25);
}
entity.attackEntityFrom(ModDamageSource.pc, 5);
}
}
}
bombStartStrength = (int) f;
}
public static void c(World world, int x, int y, int z, int bombStartStrength) {
float f = bombStartStrength;
HashSet hashset = new HashSet();
int i;
int j;
int k;
double d5;
double d6;
double d7;
double wat = bombStartStrength * 2;
boolean isOccupied = false;
bombStartStrength *= 2.0F;
i = MathHelper.floor_double(x - wat - 1.0D);
j = MathHelper.floor_double(x + wat + 1.0D);
k = MathHelper.floor_double(y - wat - 1.0D);
int i2 = MathHelper.floor_double(y + wat + 1.0D);
int l = MathHelper.floor_double(z - wat - 1.0D);
int j2 = MathHelper.floor_double(z + wat + 1.0D);
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
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) / bombStartStrength;
if (d4 <= 1.0D) {
d5 = entity.posX - x;
d6 = entity.posY + entity.getEyeHeight() - y;
d7 = entity.posZ - z;
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
if (d9 < wat) {
if (entity instanceof EntityPlayer) {
Library.damageSuit((EntityPlayer)entity, 0, 5);
Library.damageSuit((EntityPlayer)entity, 1, 5);
Library.damageSuit((EntityPlayer)entity, 2, 5);
Library.damageSuit((EntityPlayer)entity, 3, 5);
}
if (entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer) entity)) { } else {
entity.attackEntityFrom(ModDamageSource.cloud, 3);
}
}
}

View File

@ -814,6 +814,8 @@ public class ModItems {
public static Item grenade_nuclear;
public static Item grenade_zomg;
public static Item grenade_black_hole;
public static Item grenade_cloud;
public static Item grenade_pink_cloud;
public static Item ullapool_caber;
public static Item weaponized_starblaster_cell;
@ -1222,6 +1224,30 @@ public class ModItems {
public static Item gas6;
public static Item gas7;
public static Item gas8;
public static Item chlorine1;
public static Item chlorine2;
public static Item chlorine3;
public static Item chlorine4;
public static Item chlorine5;
public static Item chlorine6;
public static Item chlorine7;
public static Item chlorine8;
public static Item pc1;
public static Item pc2;
public static Item pc3;
public static Item pc4;
public static Item pc5;
public static Item pc6;
public static Item pc7;
public static Item pc8;
public static Item cloud1;
public static Item cloud2;
public static Item cloud3;
public static Item cloud4;
public static Item cloud5;
public static Item cloud6;
public static Item cloud7;
public static Item cloud8;
public static Item gasflame1;
public static Item gasflame2;
public static Item gasflame3;
@ -2004,6 +2030,8 @@ public class ModItems {
grenade_nuclear = new ItemGrenade().setUnlocalizedName("grenade_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_nuclear");
grenade_zomg = new ItemGrenade().setUnlocalizedName("grenade_zomg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_zomg");
grenade_black_hole = new ItemGrenade().setUnlocalizedName("grenade_black_hole").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_black_hole");
grenade_cloud = new ItemGrenade().setUnlocalizedName("grenade_cloud").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_cloud");
grenade_pink_cloud = new ItemGrenade().setUnlocalizedName("grenade_pink_cloud").setCreativeTab(null).setTextureName(RefStrings.MODID + ":grenade_pink_cloud");
ullapool_caber = new WeaponSpecial(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("ullapool_caber").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ullapool_caber");
weaponized_starblaster_cell = new WeaponizedCell().setUnlocalizedName("weaponized_starblaster_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_weaponized");
@ -2433,6 +2461,30 @@ public class ModItems {
gas6 = new Item().setUnlocalizedName("gas6").setTextureName(RefStrings.MODID + ":gas6");
gas7 = new Item().setUnlocalizedName("gas7").setTextureName(RefStrings.MODID + ":gas7");
gas8 = new Item().setUnlocalizedName("gas8").setTextureName(RefStrings.MODID + ":gas8");
chlorine1 = new Item().setUnlocalizedName("chlorine1").setTextureName(RefStrings.MODID + ":chlorine1");
chlorine2 = new Item().setUnlocalizedName("chlorine2").setTextureName(RefStrings.MODID + ":chlorine2");
chlorine3 = new Item().setUnlocalizedName("chlorine3").setTextureName(RefStrings.MODID + ":chlorine3");
chlorine4 = new Item().setUnlocalizedName("chlorine4").setTextureName(RefStrings.MODID + ":chlorine4");
chlorine5 = new Item().setUnlocalizedName("chlorine5").setTextureName(RefStrings.MODID + ":chlorine5");
chlorine6 = new Item().setUnlocalizedName("chlorine6").setTextureName(RefStrings.MODID + ":chlorine6");
chlorine7 = new Item().setUnlocalizedName("chlorine7").setTextureName(RefStrings.MODID + ":chlorine7");
chlorine8 = new Item().setUnlocalizedName("chlorine8").setTextureName(RefStrings.MODID + ":chlorine8");
pc1 = new Item().setUnlocalizedName("pc1").setTextureName(RefStrings.MODID + ":pc1");
pc2 = new Item().setUnlocalizedName("pc2").setTextureName(RefStrings.MODID + ":pc2");
pc3 = new Item().setUnlocalizedName("pc3").setTextureName(RefStrings.MODID + ":pc3");
pc4 = new Item().setUnlocalizedName("pc4").setTextureName(RefStrings.MODID + ":pc4");
pc5 = new Item().setUnlocalizedName("pc5").setTextureName(RefStrings.MODID + ":pc5");
pc6 = new Item().setUnlocalizedName("pc6").setTextureName(RefStrings.MODID + ":pc6");
pc7 = new Item().setUnlocalizedName("pc7").setTextureName(RefStrings.MODID + ":pc7");
pc8 = new Item().setUnlocalizedName("pc8").setTextureName(RefStrings.MODID + ":pc8");
cloud1 = new Item().setUnlocalizedName("cloud1").setTextureName(RefStrings.MODID + ":cloud1");
cloud2 = new Item().setUnlocalizedName("cloud2").setTextureName(RefStrings.MODID + ":cloud2");
cloud3 = new Item().setUnlocalizedName("cloud3").setTextureName(RefStrings.MODID + ":cloud3");
cloud4 = new Item().setUnlocalizedName("cloud4").setTextureName(RefStrings.MODID + ":cloud4");
cloud5 = new Item().setUnlocalizedName("cloud5").setTextureName(RefStrings.MODID + ":cloud5");
cloud6 = new Item().setUnlocalizedName("cloud6").setTextureName(RefStrings.MODID + ":cloud6");
cloud7 = new Item().setUnlocalizedName("cloud7").setTextureName(RefStrings.MODID + ":cloud7");
cloud8 = new Item().setUnlocalizedName("cloud8").setTextureName(RefStrings.MODID + ":cloud8");
gasflame1 = new Item().setUnlocalizedName("gasflame1").setTextureName(RefStrings.MODID + ":gasflame1");
gasflame2 = new Item().setUnlocalizedName("gasflame2").setTextureName(RefStrings.MODID + ":gasflame2");
gasflame3 = new Item().setUnlocalizedName("gasflame3").setTextureName(RefStrings.MODID + ":gasflame3");
@ -3401,6 +3453,8 @@ public class ModItems {
GameRegistry.registerItem(grenade_electric, grenade_electric.getUnlocalizedName());
GameRegistry.registerItem(grenade_poison, grenade_poison.getUnlocalizedName());
GameRegistry.registerItem(grenade_gas, grenade_gas.getUnlocalizedName());
GameRegistry.registerItem(grenade_cloud, grenade_cloud.getUnlocalizedName());
GameRegistry.registerItem(grenade_pink_cloud, grenade_pink_cloud.getUnlocalizedName());
GameRegistry.registerItem(grenade_pulse, grenade_pulse.getUnlocalizedName());
GameRegistry.registerItem(grenade_plasma, grenade_plasma.getUnlocalizedName());
GameRegistry.registerItem(grenade_tau, grenade_tau.getUnlocalizedName());
@ -3748,6 +3802,30 @@ public class ModItems {
GameRegistry.registerItem(gas6, gas6.getUnlocalizedName());
GameRegistry.registerItem(gas7, gas7.getUnlocalizedName());
GameRegistry.registerItem(gas8, gas8.getUnlocalizedName());
GameRegistry.registerItem(chlorine1, chlorine1.getUnlocalizedName());
GameRegistry.registerItem(chlorine2, chlorine2.getUnlocalizedName());
GameRegistry.registerItem(chlorine3, chlorine3.getUnlocalizedName());
GameRegistry.registerItem(chlorine4, chlorine4.getUnlocalizedName());
GameRegistry.registerItem(chlorine5, chlorine5.getUnlocalizedName());
GameRegistry.registerItem(chlorine6, chlorine6.getUnlocalizedName());
GameRegistry.registerItem(chlorine7, chlorine7.getUnlocalizedName());
GameRegistry.registerItem(chlorine8, chlorine8.getUnlocalizedName());
GameRegistry.registerItem(pc1, pc1.getUnlocalizedName());
GameRegistry.registerItem(pc2, pc2.getUnlocalizedName());
GameRegistry.registerItem(pc3, pc3.getUnlocalizedName());
GameRegistry.registerItem(pc4, pc4.getUnlocalizedName());
GameRegistry.registerItem(pc5, pc5.getUnlocalizedName());
GameRegistry.registerItem(pc6, pc6.getUnlocalizedName());
GameRegistry.registerItem(pc7, pc7.getUnlocalizedName());
GameRegistry.registerItem(pc8, pc8.getUnlocalizedName());
GameRegistry.registerItem(cloud1, cloud1.getUnlocalizedName());
GameRegistry.registerItem(cloud2, cloud2.getUnlocalizedName());
GameRegistry.registerItem(cloud3, cloud3.getUnlocalizedName());
GameRegistry.registerItem(cloud4, cloud4.getUnlocalizedName());
GameRegistry.registerItem(cloud5, cloud5.getUnlocalizedName());
GameRegistry.registerItem(cloud6, cloud6.getUnlocalizedName());
GameRegistry.registerItem(cloud7, cloud7.getUnlocalizedName());
GameRegistry.registerItem(cloud8, cloud8.getUnlocalizedName());
GameRegistry.registerItem(gasflame1, gasflame1.getUnlocalizedName());
GameRegistry.registerItem(gasflame2, gasflame2.getUnlocalizedName());
GameRegistry.registerItem(gasflame3, gasflame3.getUnlocalizedName());

View File

@ -242,6 +242,8 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_electric, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_poison, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_gas, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_cloud, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_pink_cloud, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_pulse, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_plasma, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_tau, 16));

View File

@ -2,6 +2,7 @@ package com.hbm.items.weapon;
import com.hbm.entity.grenade.EntityGrenadeASchrab;
import com.hbm.entity.grenade.EntityGrenadeBlackHole;
import com.hbm.entity.grenade.EntityGrenadeCloud;
import com.hbm.entity.grenade.EntityGrenadeCluster;
import com.hbm.entity.grenade.EntityGrenadeElectric;
import com.hbm.entity.grenade.EntityGrenadeFire;
@ -14,6 +15,7 @@ import com.hbm.entity.grenade.EntityGrenadeLemon;
import com.hbm.entity.grenade.EntityGrenadeMk2;
import com.hbm.entity.grenade.EntityGrenadeNuclear;
import com.hbm.entity.grenade.EntityGrenadeNuke;
import com.hbm.entity.grenade.EntityGrenadePC;
import com.hbm.entity.grenade.EntityGrenadePlasma;
import com.hbm.entity.grenade.EntityGrenadePoison;
import com.hbm.entity.grenade.EntityGrenadePulse;
@ -115,6 +117,12 @@ public class ItemGrenade extends Item {
if (this == ModItems.grenade_gascan) {
p_77659_2_.spawnEntityInWorld(new EntityGrenadeGascan(p_77659_2_, p_77659_3_));
}
if (this == ModItems.grenade_cloud) {
p_77659_2_.spawnEntityInWorld(new EntityGrenadeCloud(p_77659_2_, p_77659_3_));
}
if (this == ModItems.grenade_pink_cloud) {
p_77659_2_.spawnEntityInWorld(new EntityGrenadePC(p_77659_2_, p_77659_3_));
}
}
return p_77659_1_;
@ -123,11 +131,11 @@ public class ItemGrenade extends Item {
@Override
public EnumRarity getRarity(ItemStack p_77613_1_) {
if (this == ModItems.grenade_schrabidium || this == ModItems.grenade_aschrab) {
if (this == ModItems.grenade_schrabidium || this == ModItems.grenade_aschrab || this == ModItems.grenade_cloud) {
return EnumRarity.rare;
}
if (this == ModItems.grenade_plasma || this == ModItems.grenade_zomg || this == ModItems.grenade_black_hole) {
if (this == ModItems.grenade_plasma || this == ModItems.grenade_zomg || this == ModItems.grenade_black_hole || this == ModItems.grenade_pink_cloud) {
return EnumRarity.epic;
}

View File

@ -206,12 +206,15 @@ public class Library {
return false;
}
public static void damageSuit(EntityPlayer player, int slot) {
public static void damageSuit(EntityPlayer player, int slot, int amount) {
if(player.inventory.armorInventory[slot] == null)
return;
int j = player.inventory.armorInventory[slot].getItemDamage();
player.inventory.armorInventory[slot].setItemDamage(j += 1);
player.inventory.armorInventory[slot].setItemDamage(j += amount);
if(player.inventory.armorInventory[slot].getItemDamage() == player.inventory.armorInventory[slot].getMaxDamage())
if(player.inventory.armorInventory[slot].getItemDamage() >= player.inventory.armorInventory[slot].getMaxDamage())
{
player.inventory.armorInventory[slot] = null;
}

View File

@ -37,6 +37,8 @@ public class ModDamageSource extends DamageSource {
public static DamageSource amsCore = (new DamageSource("amsCore")).setDamageIsAbsolute().setDamageBypassesArmor();
public static DamageSource broadcast = (new DamageSource("broadcast")).setDamageIsAbsolute().setDamageBypassesArmor();
public static DamageSource bang = (new DamageSource("bang")).setDamageIsAbsolute().setDamageBypassesArmor();
public static DamageSource pc = (new DamageSource("pc")).setDamageIsAbsolute().setDamageBypassesArmor();
public static DamageSource cloud = (new DamageSource("cloud")).setDamageIsAbsolute().setDamageBypassesArmor();
public ModDamageSource(String p_i1566_1_) {
super(p_i1566_1_);

View File

@ -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.27 BETA (2863)";
public static final String VERSION = "1.0.27 BETA (2870)";
//HBM's Beta Naming Convention:
//V T (X-Y-Z)
//V -> next release version

View File

@ -135,6 +135,8 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeShrapnel.class, new RenderSnowball(ModItems.grenade_shrapnel));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeBlackHole.class, new RenderSnowball(ModItems.grenade_black_hole));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeGascan.class, new RenderSnowball(ModItems.grenade_gascan));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeCloud.class, new RenderSnowball(ModItems.grenade_cloud));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadePC.class, new RenderSnowball(ModItems.grenade_pink_cloud));
RenderingRegistry.registerEntityRenderingHandler(EntitySchrab.class, new RenderFlare());
@ -330,6 +332,9 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntitySmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.smoke1, ModItems.smoke2, ModItems.smoke3, ModItems.smoke4, ModItems.smoke5, ModItems.smoke6, ModItems.smoke7, ModItems.smoke8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.b_smoke1, ModItems.b_smoke2, ModItems.b_smoke3, ModItems.b_smoke4, ModItems.b_smoke5, ModItems.b_smoke6, ModItems.b_smoke7, ModItems.b_smoke8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityDSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.d_smoke1, ModItems.d_smoke2, ModItems.d_smoke3, ModItems.d_smoke4, ModItems.d_smoke5, ModItems.d_smoke6, ModItems.d_smoke7, ModItems.d_smoke8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityChlorineFX.class, new MultiCloudRenderer(new Item[] { ModItems.chlorine1, ModItems.chlorine2, ModItems.chlorine3, ModItems.chlorine4, ModItems.chlorine5, ModItems.chlorine6, ModItems.chlorine7, ModItems.chlorine8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityPinkCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.pc1, ModItems.pc2, ModItems.pc3, ModItems.pc4, ModItems.pc5, ModItems.pc6, ModItems.pc7, ModItems.pc8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.cloud1, ModItems.cloud2, ModItems.cloud3, ModItems.cloud4, ModItems.cloud5, ModItems.cloud6, ModItems.cloud7, ModItems.cloud8 }));
RenderingRegistry.registerEntityRenderingHandler(EntitySSmokeFX.class, new SSmokeRenderer(ModItems.nuclear_waste));
RenderingRegistry.registerEntityRenderingHandler(EntityOilSpillFX.class, new SpillRenderer(ModItems.nuclear_waste));
RenderingRegistry.registerEntityRenderingHandler(EntityGasFX.class, new GasRenderer(ModItems.nuclear_waste));

View File

@ -705,6 +705,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "IIM", "WPH", 'S', "plateSteel", 'I', "ingotSteel", 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'M', ModItems.mechanism_launcher_2 }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman_ammo, 2), new Object[] { " S ", "SPS", "ITI", 'S', "plateSteel", 'P', ModItems.ingot_pu239, 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', "plateSteel", 'L', "plateLead", 'W', ModItems.wire_gold, 'F', ModItems.gun_fatman }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_proto, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_polymer, 'L', "plateDesh", 'W', ModItems.wire_tungsten, 'F', ModItems.gun_fatman }));
//GameRegistry.addRecipe(new ItemStack(ModItems.gun_mirv_ammo, 1), new Object[] { "NNN", "NSN", "NNN", 'S', ModItems.hull_small_steel, 'N', ModItems.gun_fatman_ammo });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bf, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_paa, 'L', "plateDenseLead", 'W', ModItems.wire_advanced_alloy, 'F', ModItems.gun_mirv }));
GameRegistry.addRecipe(new ItemStack(ModItems.gun_bf_ammo, 1), new Object[] { "AEA", "SHS", "AEA", 'H', ModItems.hull_small_steel, 'A', ModItems.cell_antimatter, 'S', ModItems.cell_anti_schrabidium, 'E', ModItems.powder_power });
@ -1228,6 +1229,14 @@ public class CraftingManager {
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle_sparkle), new Object[] { ModItems.bottle_quantum, Items.carrot, Items.gold_nugget });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_nuke), new Object[] { "CGC", "CGC", "PAP", 'C', ModBlocks.det_charge, 'G', ModItems.grenade_mk2, 'P', "plateAdvanced", 'A', Blocks.anvil }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.radiobox), new Object[] { "-C-", "8OI", "EUE", '-', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier4, '8', ModItems.coil_gold, 'O', ModItems.pellet_rtg, 'I', ModItems.fuse, 'E', "plateSteel", 'U', ModItems.rtg_unit }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.radiorec), new Object[] { " W", "PCP", "PIP", 'W', ModItems.wire_copper, 'P', "plateSteel", 'C', ModItems.circuit_red_copper, 'I', "ingotPolymer" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jackt), new Object[] { "S S", "LIL", "LIL", 'S', "plateSteel", 'L', Items.leather, 'I', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jackt2), new Object[] { "S S", "LIL", "III", 'S', "plateSteel", 'L', Items.leather, 'I', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_cloud), new Object[] { "SPS", "CAC", "SPS", 'S', "dustSulfur", 'P', ModItems.powder_poison, 'C', "dustCopper", 'A', new ItemStack(ModItems.fluid_tank_full, 1, FluidType.ACID.getID()) }));
GameRegistry.addRecipe(new ItemStack(ModItems.grenade_pink_cloud), new Object[] { " S ", "ECE", " E ", 'S', ModItems.powder_spark_mix, 'E', ModItems.powder_magic, 'C', ModItems.grenade_cloud });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_chlorine), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.pellet_gas, 'D', Blocks.dispenser }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_cloud, 'D', Blocks.dispenser }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_pink_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_pink_cloud, 'D', Blocks.dispenser }));
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.assembly_template, 1, OreDictionary.WILDCARD_VALUE) });
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.chemistry_template, 1, OreDictionary.WILDCARD_VALUE) });

View File

@ -66,6 +66,7 @@ import com.hbm.entity.effect.EntityRagingVortex;
import com.hbm.entity.effect.EntityVortex;
import com.hbm.entity.grenade.EntityGrenadeASchrab;
import com.hbm.entity.grenade.EntityGrenadeBlackHole;
import com.hbm.entity.grenade.EntityGrenadeCloud;
import com.hbm.entity.grenade.EntityGrenadeCluster;
import com.hbm.entity.grenade.EntityGrenadeElectric;
import com.hbm.entity.grenade.EntityGrenadeFire;
@ -78,6 +79,7 @@ import com.hbm.entity.grenade.EntityGrenadeLemon;
import com.hbm.entity.grenade.EntityGrenadeMk2;
import com.hbm.entity.grenade.EntityGrenadeNuclear;
import com.hbm.entity.grenade.EntityGrenadeNuke;
import com.hbm.entity.grenade.EntityGrenadePC;
import com.hbm.entity.grenade.EntityGrenadePlasma;
import com.hbm.entity.grenade.EntityGrenadePoison;
import com.hbm.entity.grenade.EntityGrenadePulse;
@ -127,10 +129,13 @@ import com.hbm.entity.mob.EntityCyberCrab;
import com.hbm.entity.mob.EntityHunterChopper;
import com.hbm.entity.mob.EntityNuclearCreeper;
import com.hbm.entity.particle.EntityBSmokeFX;
import com.hbm.entity.particle.EntityChlorineFX;
import com.hbm.entity.particle.EntityCloudFX;
import com.hbm.entity.particle.EntityDSmokeFX;
import com.hbm.entity.particle.EntityGasFX;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.particle.EntityOilSpillFX;
import com.hbm.entity.particle.EntityPinkCloudFX;
import com.hbm.entity.particle.EntitySSmokeFX;
import com.hbm.entity.particle.EntitySmokeFX;
import com.hbm.entity.particle.EntityTSmokeFX;
@ -765,6 +770,11 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityMissileBHole.class, "entity_missile_blackhole", 100, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityMissileSchrabidium.class, "entity_missile_schrabidium", 101, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityMissileEMP.class, "entity_missile_emp", 102, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityChlorineFX.class, "entity_d_smoke_fx", 103, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityPinkCloudFX.class, "entity_pink_cloud_fx", 104, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityCloudFX.class, "entity_cloud_fx", 105, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityGrenadePC.class, "entity_grenade_pink_cloud", 106, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityGrenadeCloud.class, "entity_grenade_cloud", 107, this, 250, 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);
@ -936,6 +946,20 @@ public class MainRegistry
{
return new EntityGrenadeGascan(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ());
}
});
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.grenade_cloud, new BehaviorProjectileDispense() {
protected IProjectile getProjectileEntity(World p_82499_1_, IPosition p_82499_2_)
{
return new EntityGrenadeCloud(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ());
}
});
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.grenade_pink_cloud, new BehaviorProjectileDispense() {
protected IProjectile getProjectileEntity(World p_82499_1_, IPosition p_82499_2_)
{
return new EntityGrenadePC(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ());
}
});
}

View File

@ -71,7 +71,8 @@ public class TEVaultPacket implements IMessage {
TileEntityVaultDoor vault = (TileEntityVaultDoor) te;
vault.isOpening = m.isOpening;
vault.state = m.state;
vault.sysTime = m.sysTime;
if(m.sysTime == 1)
vault.sysTime = System.currentTimeMillis();
vault.type = m.type;
}
} catch (Exception x) {

View File

@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.entity.particle.EntityBSmokeFX;
import com.hbm.entity.particle.EntityChlorineFX;
import com.hbm.entity.particle.EntityModFX;
import com.hbm.items.ModItems;
import net.minecraft.client.renderer.Tessellator;
@ -87,6 +88,12 @@ public class MultiCloudRenderer extends Render {
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glScalef(7.5F, 7.5F, 7.5F);
////
Random randy = new Random(p_76986_1_.hashCode());
double d = randy.nextInt(10) * 0.05;
GL11.glColor3d(1 - d, 1 - d, 1 - d);
////
Random rand = new Random(100);
for(int i = 0; i < 5; i++) {

View File

@ -41,6 +41,7 @@ public class RenderFlare extends Render {
GL11.glDepthMask(false);
GL11.glPushMatrix();
//GL11.glTranslatef(0.0F, -1.0F, -2.0F);
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
//for (int i = 0; (float)i < (f1 + f1 * f1) / 2.0F * 60.0F; ++i)
@ -64,6 +65,7 @@ public class RenderFlare extends Render {
tessellator.addVertex(0.866D * f4, f3, -0.5F * f4);
tessellator.addVertex(0.0D, f3, 1.0F * f4);
tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4);
GL11.glScalef(0.99F, 0.99F, 0.99F);
tessellator.draw();
}

View File

@ -0,0 +1,57 @@
package com.hbm.tileentity.deco;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.particle.EntityChlorineFX;
import com.hbm.entity.particle.EntityCloudFX;
import com.hbm.entity.particle.EntityPinkCloudFX;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
public class TileEntityVent extends TileEntity {
Random rand = new Random();
public void updateEntity() {
if(!worldObj.isRemote) {
Block b = worldObj.getBlock(xCoord, yCoord, zCoord);
if(b == ModBlocks.vent_chlorine) {
//if(rand.nextInt(1) == 0) {
double x = rand.nextGaussian() * 1.5;
double y = rand.nextGaussian() * 1.5;
double z = rand.nextGaussian() * 1.5;
if(!worldObj.getBlock(xCoord + (int)x, yCoord + (int)y, zCoord + (int)z).isNormalCube()) {
worldObj.spawnEntityInWorld(new EntityChlorineFX(worldObj, xCoord + (int)x, yCoord + (int)y, zCoord + (int)z, x/2, y/2, z/2));
}
//}
}
if(b == ModBlocks.vent_cloud) {
//if(rand.nextInt(50) == 0) {
double x = rand.nextGaussian() * 1.75;
double y = rand.nextGaussian() * 1.75;
double z = rand.nextGaussian() * 1.75;
if(!worldObj.getBlock(xCoord + (int)x, yCoord + (int)y, zCoord + (int)z).isNormalCube()) {
worldObj.spawnEntityInWorld(new EntityCloudFX(worldObj, xCoord + (int)x, yCoord + (int)y, zCoord + (int)z, x/2, y/2, z/2));
}
//}
}
if(b == ModBlocks.vent_pink_cloud) {
//if(rand.nextInt(65) == 0) {
double x = rand.nextGaussian() * 2;
double y = rand.nextGaussian() * 2;
double z = rand.nextGaussian() * 2;
if(!worldObj.getBlock(xCoord + (int)x, yCoord + (int)y, zCoord + (int)z).isNormalCube()) {
worldObj.spawnEntityInWorld(new EntityPinkCloudFX(worldObj, xCoord + (int)x, yCoord + (int)y, zCoord + (int)z, x/2, y/2, z/2));
}
//}
}
}
}
}

View File

@ -97,13 +97,13 @@ public class TileEntityVaultDoor extends TileEntity {
}
}
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, sysTime, type));
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 0, type));
}
}
public void open() {
if(state == 0) {
sysTime = System.currentTimeMillis();
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type));
isOpening = true;
state = 1;
@ -118,7 +118,7 @@ public class TileEntityVaultDoor extends TileEntity {
public void close() {
if(state == 2) {
sysTime = System.currentTimeMillis();
PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type));
isOpening = false;
state = 1;