new battery textures, nuclear fog, nuclear 84mm rocket, potato battery

This commit is contained in:
HbmMods 2019-02-11 19:21:41 +01:00
parent 377b271df0
commit 75799a7c96
46 changed files with 1795 additions and 347 deletions

View File

@ -1392,6 +1392,7 @@ item.ammo_rocket_shrapnel.name=84mm Rakete (Schrapnell)
item.ammo_rocket_emp.name=84mm Rakete (Impuls)
item.ammo_rocket_glare.name=84mm Rakete (Roter Schein)
item.ammo_rocket_sleek.name=84mm Rakete (IF-R&D)
item.ammo_rocket_nuclear.name=84mm Rakete (Привет)
item.ammo_grenade.name=40mm Granate
item.ammo_grenade_he.name=40mm Granate (HE)
item.ammo_grenade_incendiary.name=40mm Granate (Brand)

File diff suppressed because it is too large Load Diff

View File

@ -1392,6 +1392,7 @@ item.ammo_rocket_shrapnel.name=84mm Rocket (Shrapnel)
item.ammo_rocket_emp.name=84mm Rocket (Pulse)
item.ammo_rocket_glare.name=84mm Rocket (Red Glare)
item.ammo_rocket_sleek.name=84mm Rocket (IF-R&D)
item.ammo_rocket_nuclear.name=84mm Rocket (Привет)
item.ammo_grenade.name=40mm Grenade
item.ammo_grenade_he.name=40mm Grenade (HE)
item.ammo_grenade_incendiary.name=40mm Grenade (Incendiary)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@ -330,6 +330,7 @@ public class ModBlocks {
//public static Block machine_deuterium;
public static final int guiID_machine_deuterium = 20;
public static Block machine_battery_potato;
public static Block machine_battery;
public static Block machine_lithium_battery;
public static Block machine_schrabidium_battery;
@ -852,6 +853,7 @@ public class ModBlocks {
//machine_deuterium = new MachineDeuterium(Material.iron).setBlockName("machine_deuterium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_battery_potato = new MachineBattery(Material.iron, 10000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_battery = new MachineBattery(Material.iron, 1000000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_lithium_battery = new MachineBattery(Material.iron, 15000000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_schrabidium_battery = new MachineBattery(Material.iron, 500000000).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
@ -1407,6 +1409,7 @@ public class ModBlocks {
GameRegistry.registerBlock(gas_duct, gas_duct.getUnlocalizedName());
GameRegistry.registerBlock(gas_duct_solid, gas_duct_solid.getUnlocalizedName());
GameRegistry.registerBlock(fluid_duct, fluid_duct.getUnlocalizedName());
GameRegistry.registerBlock(machine_battery_potato, machine_battery_potato.getUnlocalizedName());
GameRegistry.registerBlock(machine_battery, machine_battery.getUnlocalizedName());
GameRegistry.registerBlock(machine_lithium_battery, machine_lithium_battery.getUnlocalizedName());
GameRegistry.registerBlock(machine_schrabidium_battery, machine_schrabidium_battery.getUnlocalizedName());

View File

@ -33,6 +33,8 @@ public class MachineBattery extends BlockContainer {
private static boolean keepInventory;
public long maxPower;
@SideOnly(Side.CLIENT)
private IIcon iconTop;
@SideOnly(Side.CLIENT)
private IIcon iconFront;
@ -46,18 +48,27 @@ public class MachineBattery extends BlockContainer {
public void registerBlockIcons(IIconRegister iconRegister) {
if(this == ModBlocks.machine_battery) {
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":battery_front_alt");
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":battery_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":battery_side_alt");
}
if(this == ModBlocks.machine_battery_potato) {
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":battery_potato_front");
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":battery_potato_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":battery_potato_side");
}
if(this == ModBlocks.machine_lithium_battery) {
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":battery_lithium_front");
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":battery_lithium_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":battery_lithium_side");
}
if(this == ModBlocks.machine_schrabidium_battery) {
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":battery_schrabidium_front");
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":battery_schrabidium_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":battery_schrabidium_side");
}
if(this == ModBlocks.machine_dineutronium_battery) {
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":battery_dineutronium_front");
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":battery_dineutronium_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":battery_dineutronium_side");
}
}
@ -65,6 +76,10 @@ public class MachineBattery extends BlockContainer {
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
if(side == 0 || side == 1)
return iconTop;
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
}

View File

@ -48,8 +48,9 @@ public class EntityNukeExplosionMK4 extends Entity {
if(!worldObj.isRemote && fallout && explosion != null) {
RadiationSavedData data = RadiationSavedData.getData(worldObj);
float radMax = (float) (length / 2F * Math.pow(length, 2) / 35F);
//float radMax = (float) (length / 2F * Math.pow(length, 2) / 35F);
float radMax = Math.min((float) (length / 2F * Math.pow(length, 1.5) / 35F), 15000);
//System.out.println(radMax);
float rad = radMax / 4F;
data.incrementRad(worldObj, (int)this.posX, (int)this.posZ, rad, radMax);

View File

@ -0,0 +1,69 @@
package com.hbm.entity.particle;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.World;
public class EntityFogFX extends EntityModFX {
public EntityFogFX(World world) {
super(world, 0, 0, 0);
}
public EntityFogFX(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 EntityFogFX(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 < 400)
{
maxAge = 400;
}
this.particleAge++;
if (this.particleAge >= maxAge)
{
this.setDead();
}
this.motionX *= 0.9599999785423279D;
this.motionY *= 0.9599999785423279D;
this.motionZ *= 0.9599999785423279D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
}
}

View File

@ -53,6 +53,7 @@ public class BulletConfigSyncingUtil {
public static final int ROCKET_EMP = 0x24;
public static final int ROCKET_GLARE = 0x25;
public static final int ROCKET_SLEEK = 0x26;
public static final int ROCKET_NUKE = 0x27;
public static final int GRENADE_NORMAL = 0x30;
public static final int GRENADE_HE = 0x31;
@ -120,6 +121,7 @@ public class BulletConfigSyncingUtil {
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketEMPConfig(), ROCKET_EMP));
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketGlareConfig(), ROCKET_GLARE));
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketSleekConfig(), ROCKET_SLEEK));
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketNukeConfig(), ROCKET_NUKE));
configSet.add(new ConfigKeyPair(GunGrenadeFactory.getGrenadeConfig(), GRENADE_NORMAL));
configSet.add(new ConfigKeyPair(GunGrenadeFactory.getGrenadeHEConfig(), GRENADE_HE));

View File

@ -42,6 +42,7 @@ public class GunRocketFactory {
config.config.add(BulletConfigSyncingUtil.ROCKET_EMP);
config.config.add(BulletConfigSyncingUtil.ROCKET_GLARE);
config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK);
config.config.add(BulletConfigSyncingUtil.ROCKET_NUKE);
config.durability = 140;
return config;
@ -147,5 +148,22 @@ public class GunRocketFactory {
return bullet;
}
public static BulletConfiguration getRocketNukeConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_nuclear;
bullet.velocity = 1.5F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.wear = 35;
bullet.explosive = 0;
bullet.incendiary = 0;
bullet.trail = 7;
bullet.nuke = 25;
return bullet;
}
}

View File

@ -856,6 +856,7 @@ public class ModItems {
public static Item ammo_rocket_emp;
public static Item ammo_rocket_glare;
public static Item ammo_rocket_sleek;
public static Item ammo_rocket_nuclear;
public static Item ammo_grenade;
public static Item ammo_grenade_he;
public static Item ammo_grenade_incendiary;
@ -2310,6 +2311,7 @@ public class ModItems {
ammo_rocket_emp = new ItemAmmo().setUnlocalizedName("ammo_rocket_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_emp");
ammo_rocket_glare = new ItemAmmo().setUnlocalizedName("ammo_rocket_glare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_glare");
ammo_rocket_sleek = new ItemAmmo().setUnlocalizedName("ammo_rocket_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_sleek");
ammo_rocket_nuclear = new ItemAmmo().setUnlocalizedName("ammo_rocket_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_nuclear");
ammo_grenade = new ItemAmmo().setUnlocalizedName("ammo_grenade").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade");
ammo_grenade_he = new ItemAmmo().setUnlocalizedName("ammo_grenade_he").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_he");
ammo_grenade_incendiary = new ItemAmmo().setUnlocalizedName("ammo_grenade_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_incendiary");
@ -4050,6 +4052,7 @@ public class ModItems {
GameRegistry.registerItem(ammo_rocket_emp, ammo_rocket_emp.getUnlocalizedName());
GameRegistry.registerItem(ammo_rocket_glare, ammo_rocket_glare.getUnlocalizedName());
GameRegistry.registerItem(ammo_rocket_sleek, ammo_rocket_sleek.getUnlocalizedName());
GameRegistry.registerItem(ammo_rocket_nuclear, ammo_rocket_nuclear.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade, ammo_grenade.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade_he, ammo_grenade_he.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade_incendiary, ammo_grenade_incendiary.getUnlocalizedName());

View File

@ -149,6 +149,10 @@ public class ItemAmmo extends Item {
list.add(EnumChatFormatting.BLUE + "+ Not affected by gravity");
list.add(EnumChatFormatting.YELLOW + "* Jolt");
}
if(this == ModItems.ammo_rocket_nuclear) {
list.add(EnumChatFormatting.BLUE + "+ Nuclear");
list.add(EnumChatFormatting.RED + "- Very highly increased wear");
}
//40mm GRENADES
if(this == ModItems.ammo_grenade_he) {

View File

@ -395,6 +395,7 @@ public class ClientProxy extends ServerProxy
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(EntityOrangeFX.class, new MultiCloudRenderer(new Item[] { ModItems.orange1, ModItems.orange2, ModItems.orange3, ModItems.orange4, ModItems.orange5, ModItems.orange6, ModItems.orange7, ModItems.orange8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityFogFX.class, new FogRenderer());
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

@ -154,6 +154,7 @@ 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.EntityFogFX;
import com.hbm.entity.particle.EntityGasFX;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.particle.EntityOilSpillFX;
@ -901,6 +902,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityFallingNuke.class, "entity_falling_bomb", 130, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityBulletBase.class, "entity_bullet_mk2", 131, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityMinerRocket.class, "entity_miner_lander", 132, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityFogFX.class, "entity_nuclear_fog", 133, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);

View File

@ -165,6 +165,10 @@ public class ModEventHandler
eData.worldObj = event.world;
}
if(data.worldObj == null) {
data.worldObj = event.world;
}
for(Object o : event.world.playerEntities) {
EntityPlayer player = (EntityPlayer)o;

View File

@ -0,0 +1,98 @@
package com.hbm.render.entity;
import java.util.Random;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.entity.particle.EntityModFX;
import com.hbm.lib.RefStrings;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
public class FogRenderer extends Render {
@Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_LIGHTING);
//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);
////
EntityModFX particle = (EntityModFX)p_76986_1_;
float alpha = 0;
alpha = (float) Math.sin(particle.particleAge * Math.PI / (400F)) * 0.25F;
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glColor4f(0.85F, 0.9F, 0.5F, alpha);
//GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(false);
Random rand = new Random(50);
for(int i = 0; i < 25; i++) {
double dX = (rand.nextGaussian() - 1D) * 0.5D;
double dY = (rand.nextGaussian() - 1D) * 0.15D;
double dZ = (rand.nextGaussian() - 1D) * 0.5D;
double size = rand.nextDouble() * 0.5D + 0.25D;
GL11.glTranslatef((float) dX, (float) dY, (float) dZ);
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(180 - this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
GL11.glScaled(size, size, size);
GL11.glPushMatrix();
this.bindEntityTexture(p_76986_1_);
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
tess.addVertexWithUV(-1, -1, 0, 1, 0);
tess.addVertexWithUV(-1, 1, 0, 0, 0);
tess.addVertexWithUV(1, 1, 0, 0, 1);
tess.addVertexWithUV(1, -1, 0, 1, 1);
tess.draw();
GL11.glPopMatrix();
GL11.glScaled(1/size, 1/size, 1/size);
GL11.glRotatef(-180 + this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(-180.0F + this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef((float) -dX, (float) -dY, (float) -dZ);
}
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
//GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return new ResourceLocation(RefStrings.MODID + ":" + "textures/particle/fog.png");
}
}

View File

@ -99,6 +99,8 @@ public class RenderBullet extends Render {
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketGlare.png")); break;
case 6:
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketSleek.png")); break;
case 7:
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketNuclear.png")); break;
}
rocket.renderAll(0.0625F);

View File

@ -3,6 +3,8 @@ package com.hbm.saveddata;
import java.util.ArrayList;
import java.util.List;
import com.hbm.entity.particle.EntityFogFX;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraft.world.WorldSavedData;
@ -12,7 +14,7 @@ public class RadiationSavedData extends WorldSavedData {
public List<RadiationSaveStructure> contamination = new ArrayList();
private World worldObj;
public World worldObj;
public RadiationSavedData(String p_i2141_1_) {
super(p_i2141_1_);
@ -97,12 +99,25 @@ public class RadiationSavedData extends WorldSavedData {
if(struct.radiation != 0) {
struct.radiation *= 0.999F;
//struct.radiation *= 0.999F;
struct.radiation *= 0.99F;
struct.radiation -= 0.5F;
if(struct.radiation <= 0) {
struct.radiation = 0;
}
if(struct.radiation > 100 && worldObj != null && worldObj.rand.nextInt(10) == 0 && worldObj.getChunkFromChunkCoords(struct.chunkX, struct.chunkY).isChunkLoaded) {
int x = struct.chunkX * 16 + worldObj.rand.nextInt(16);
int z = struct.chunkY * 16 + worldObj.rand.nextInt(16);
int y = worldObj.getHeightValue(x, z) + worldObj.rand.nextInt(10);
EntityFogFX fog = new EntityFogFX(worldObj);
fog.setPosition(x, y, z);
//System.out.println(x + " " + y + " " + z);
worldObj.spawnEntityInWorld(fog);
}
if(struct.radiation > 1) {