Gas duct, flare functionallity, asbestos suit (BETA 25X01)

This commit is contained in:
HbmMods 2017-05-29 19:52:38 +02:00
parent 972dd2049d
commit 0f45390bf5
54 changed files with 1044 additions and 43 deletions

View File

@ -162,6 +162,8 @@ tile.oil_duct.name=Ölrohr
tile.oil_duct_solid.name=Verstärktes Ölrohr
tile.machine_flare.name=Abfackelturm
container.gasFlare=Abfackelturm
tile.gas_duct.name=Gasleitung
tile.gas_duct_solid.name=Verstärkter Gasleitung
tile.rail_highspeed.name=Hochgeschwindigkeitsschienen
tile.rail_booster.name=Hochgeschwindigkeits-Boosterschienen
@ -503,6 +505,8 @@ item.canister_fuel.name=Treibstoffkanister
item.canister_kerosene.name=Kerosinkanister
item.canister_napalm.name=Napalm B
item.canister_NITAN.name=NITAN© 100 Oktan Supertreibstoff
item.gas_empty.name=Leerer Gastank
item.gas_full.name=Gastank
item.rod_empty.name=Leerer Brennstab
item.rod_uranium.name=Uranbrennstab
@ -1103,6 +1107,7 @@ item.reer_graar.name=The Reer Graar
item.letter.name=Eilbrief
item.polaroid.name=Das Polaroid
item.book_secret.name=3-596-50802-9
item.crystal_horn.name=Kristallhorn
item.crystal_charred.name=Verkohlter Kristall

View File

@ -162,6 +162,8 @@ tile.oil_duct.name=Oil Pipe
tile.oil_duct_solid.name=Coated Oil Pipe
tile.machine_flare.name=Gas Flare
container.gasFlare=Gas Flare
tile.gas_duct.name=Gas Pipe
tile.gas_duct_solid.name=Coated Gas Pipe
tile.rail_highspeed.name=High Speed Rail
tile.rail_booster.name=High Speed Booster Rail
@ -503,6 +505,8 @@ item.canister_fuel.name=Fuel Canister
item.canister_kerosene.name=Kerosene Canister
item.canister_napalm.name=Napalm B
item.canister_NITAN.name=NITAN© 100 Octane Super Fuel
item.gas_empty.name=Empty Gas Tank
item.gas_full.name=Gas Tank
item.rod_empty.name=Emty Rod
item.rod_uranium.name=Uranium Rod
@ -1103,6 +1107,7 @@ item.reer_graar.name=The Reer Graar
item.letter.name=Express Mail
item.polaroid.name=The Polaroid
item.book_secret.name=3-596-50802-9
item.crystal_horn.name=Crystal Horn
item.crystal_charred.name=Charred Crystal

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 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: 94 B

View File

@ -48,6 +48,7 @@ import com.hbm.blocks.generic.YellowBarrel;
import com.hbm.blocks.machine.BlockCable;
import com.hbm.blocks.machine.BlockConverterHeRf;
import com.hbm.blocks.machine.BlockConverterRfHe;
import com.hbm.blocks.machine.BlockGasDuct;
import com.hbm.blocks.machine.BlockHatch;
import com.hbm.blocks.machine.BlockOilDuct;
import com.hbm.blocks.machine.OilDuctSolid;
@ -65,6 +66,7 @@ import com.hbm.blocks.machine.FactoryCoreTitanium;
import com.hbm.blocks.machine.FactoryHatch;
import com.hbm.blocks.machine.FusionCore;
import com.hbm.blocks.machine.FusionHatch;
import com.hbm.blocks.machine.GasDuctSolid;
import com.hbm.blocks.machine.MachineBattery;
import com.hbm.blocks.machine.MachineCMBFactory;
import com.hbm.blocks.machine.MachineCentrifuge;
@ -341,6 +343,8 @@ public class ModBlocks {
public static Block red_cable;
public static Block oil_duct_solid;
public static Block oil_duct;
public static Block gas_duct_solid;
public static Block gas_duct;
public static Block bomb_multi_large;
public static final int guiID_bomb_multi_large = 18;
@ -685,8 +689,10 @@ public class ModBlocks {
red_wire_coated = new WireCoated(Material.iron).setBlockName("red_wire_coated").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_wire_coated");
red_cable = new BlockCable(Material.iron).setBlockName("red_cable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_cable_icon");
oil_duct_solid = new OilDuctSolid(Material.iron).setBlockName("oil_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_solid");
oil_duct = new BlockOilDuct(Material.iron).setBlockName("oil_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_icon");
oil_duct_solid = new OilDuctSolid(Material.iron).setBlockName("oil_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_solid_alt");
oil_duct = new BlockOilDuct(Material.iron).setBlockName("oil_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_icon_alt");
gas_duct_solid = new GasDuctSolid(Material.iron).setBlockName("gas_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":gas_duct_solid");
gas_duct = new BlockGasDuct(Material.iron).setBlockName("gas_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":gas_duct_icon");
factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull");
factory_titanium_furnace = new FactoryHatch(Material.iron).setBlockName("factory_titanium_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_titanium_furnace");
@ -984,6 +990,8 @@ public class ModBlocks {
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
GameRegistry.registerBlock(oil_duct, oil_duct.getUnlocalizedName());
GameRegistry.registerBlock(oil_duct_solid, oil_duct_solid.getUnlocalizedName());
GameRegistry.registerBlock(gas_duct, gas_duct.getUnlocalizedName());
GameRegistry.registerBlock(gas_duct_solid, gas_duct_solid.getUnlocalizedName());
GameRegistry.registerBlock(machine_battery, machine_battery.getUnlocalizedName());
GameRegistry.registerBlock(machine_converter_he_rf, machine_converter_he_rf.getUnlocalizedName());
GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName());

View File

@ -1,6 +1,7 @@
package com.hbm.blocks.machine;
import com.hbm.tileentity.TileEntityCable;
import com.hbm.tileentity.TileEntityOilDuct;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@ -19,6 +20,7 @@ public class BlockCable extends BlockContainer {
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
if(world.getTileEntity(x, y, z) instanceof TileEntityCable) {
TileEntityCable cable = (TileEntityCable)world.getTileEntity(x, y, z);
if(cable != null)
@ -33,10 +35,12 @@ public class BlockCable extends BlockContainer {
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
}
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
if(world.getTileEntity(x, y, z) instanceof TileEntityCable) {
TileEntityCable cable = (TileEntityCable)world.getTileEntity(x, y, z);
if(cable != null)
@ -51,6 +55,7 @@ public class BlockCable extends BlockContainer {
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
}
}
@Override

View File

@ -0,0 +1,80 @@
package com.hbm.blocks.machine;
import com.hbm.tileentity.TileEntityGasDuct;
import com.hbm.tileentity.TileEntityOilDuct;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockGasDuct extends BlockContainer {
public BlockGasDuct(Material p_i45386_1_) {
super(p_i45386_1_);
float p = 1F/16F;
this.setBlockBounds(11 * p / 2, 11 * p / 2, 11 * p / 2, 1 - 11 * p / 2, 1 - 11 * p / 2, 1 - 11 * p / 2);
this.useNeighborBrightness = true;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
if(world.getTileEntity(x, y, z) instanceof TileEntityGasDuct) {
TileEntityGasDuct cable = (TileEntityGasDuct)world.getTileEntity(x, y, z);
if(cable != null)
{
float p = 1F/16F;
float minX = 11 * p / 2 - (cable.connections[5] != null ? (11 * p / 2) : 0);
float minY = 11 * p / 2 - (cable.connections[1] != null ? (11 * p / 2) : 0);
float minZ = 11 * p / 2 - (cable.connections[2] != null ? (11 * p / 2) : 0);
float maxX = 1 - 11 * p / 2 + (cable.connections[3] != null ? (11 * p / 2) : 0);
float maxY = 1 - 11 * p / 2 + (cable.connections[0] != null ? (11 * p / 2) : 0);
float maxZ = 1 - 11 * p / 2 + (cable.connections[4] != null ? (11 * p / 2) : 0);
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
}
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
if(world.getTileEntity(x, y, z) instanceof TileEntityGasDuct) {
TileEntityGasDuct cable = (TileEntityGasDuct)world.getTileEntity(x, y, z);
if(cable != null)
{
float p = 1F/16F;
float minX = 11 * p / 2 - (cable.connections[5] != null ? (11 * p / 2) : 0);
float minY = 11 * p / 2 - (cable.connections[1] != null ? (11 * p / 2) : 0);
float minZ = 11 * p / 2 - (cable.connections[2] != null ? (11 * p / 2) : 0);
float maxX = 1 - 11 * p / 2 + (cable.connections[3] != null ? (11 * p / 2) : 0);
float maxY = 1 - 11 * p / 2 + (cable.connections[0] != null ? (11 * p / 2) : 0);
float maxZ = 1 - 11 * p / 2 + (cable.connections[4] != null ? (11 * p / 2) : 0);
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
}
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityGasDuct();
}
@Override
public int getRenderType(){
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
}

View File

@ -19,6 +19,7 @@ public class BlockOilDuct extends BlockContainer {
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
if(world.getTileEntity(x, y, z) instanceof TileEntityOilDuct) {
TileEntityOilDuct cable = (TileEntityOilDuct)world.getTileEntity(x, y, z);
if(cable != null)
@ -33,10 +34,12 @@ public class BlockOilDuct extends BlockContainer {
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
}
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
if(world.getTileEntity(x, y, z) instanceof TileEntityOilDuct) {
TileEntityOilDuct cable = (TileEntityOilDuct)world.getTileEntity(x, y, z);
if(cable != null)
@ -51,6 +54,7 @@ public class BlockOilDuct extends BlockContainer {
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
}
}
@Override

View File

@ -0,0 +1,26 @@
package com.hbm.blocks.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
import com.hbm.tileentity.TileEntityGasDuctSolid;
import com.hbm.tileentity.TileEntityOilDuctSolid;
import com.hbm.tileentity.TileEntityWireCoated;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class GasDuctSolid extends BlockContainer {
public GasDuctSolid(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityGasDuctSolid();
}
}

View File

@ -0,0 +1,17 @@
package com.hbm.calc;
import com.hbm.interfaces.IGasSource;
import com.hbm.interfaces.IOilSource;
public class UnionOfTileEntitiesAndBooleansForGas {
public UnionOfTileEntitiesAndBooleansForGas(IGasSource tileentity, boolean bool)
{
source = tileentity;
ticked = bool;
}
public IGasSource source;
public boolean ticked = false;
}

View File

@ -0,0 +1,86 @@
package com.hbm.entity.particle;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.World;
public class EntityGasFlameFX extends EntityModFX
{
float smokeParticleScale;
public int particleAge;
public int maxAge;
private static final String __OBFID = "CL_00000924";
public EntityGasFlameFX(World world) {
super(world, 0, 0, 0);
}
public EntityGasFlameFX(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 EntityGasFlameFX(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 < 30)
{
maxAge = rand.nextInt(13) + 30;
}
this.particleAge++;
if (this.particleAge >= maxAge)
{
this.setDead();
}
this.motionX *= 0.7599999785423279D;
//this.motionY *= 0.7599999785423279D;
this.motionY += 0.0075D;
this.motionZ *= 0.7599999785423279D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
}
@Override
@SideOnly(Side.CLIENT)
public int getBrightnessForRender(float p_70070_1_)
{
return 15728880;
}
}

View File

@ -4,11 +4,13 @@ import java.util.HashSet;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.Library;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -499,8 +501,10 @@ public class ExplosionThermo {
if (d9 < wat && !(entity instanceof EntityOcelot) && entity instanceof EntityLivingBase)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 2 * 60 * 20, 4));
entity.setFire(10);
if(!(entity instanceof EntityPlayer && Library.checkForAsbestos((EntityPlayer) entity))) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 15 * 20, 4));
entity.setFire(10);
}
}
}
}

View File

@ -0,0 +1,11 @@
package com.hbm.interfaces;
public interface IGasAcceptor {
void setGasFill(int i);
int getGasFill();
int getMaxGasFill();
}

View File

@ -1,5 +1,5 @@
package com.hbm.interfaces;
public interface IDuct {
public interface IGasDuct {
}

View File

@ -0,0 +1,17 @@
package com.hbm.interfaces;
import java.util.List;
public interface IGasSource {
void fillGasInit();
void fillGas(int x, int y, int z, boolean newTact);
boolean getTact();
int getGasFill();
void setGasFill(int i);
List<IGasAcceptor> getGasList();
void clearGasList();
}

View File

@ -0,0 +1,5 @@
package com.hbm.interfaces;
public interface IOilDuct {
}

View File

@ -19,6 +19,7 @@ import com.hbm.items.food.ItemPill;
import com.hbm.items.food.ItemSchnitzelVegan;
import com.hbm.items.food.ItemTemFlakes;
import com.hbm.items.food.ItemWaffle;
import com.hbm.items.gear.ArmorAsbestos;
import com.hbm.items.gear.ArmorAustralium;
import com.hbm.items.gear.ArmorEuphemium;
import com.hbm.items.gear.ArmorHazmat;
@ -775,6 +776,10 @@ public class ModItems {
public static Item paa_plate;
public static Item paa_legs;
public static Item paa_boots;
public static Item asbestos_helmet;
public static Item asbestos_plate;
public static Item asbestos_legs;
public static Item asbestos_boots;
public static Item australium_iii;
public static Item australium_iv;
@ -918,6 +923,7 @@ public class ModItems {
public static Item polaroid;
public static Item letter;
public static Item book_secret;
public static Item smoke1;
public static Item smoke2;
@ -959,6 +965,14 @@ public class ModItems {
public static Item gas6;
public static Item gas7;
public static Item gas8;
public static Item gasflame1;
public static Item gasflame2;
public static Item gasflame3;
public static Item gasflame4;
public static Item gasflame5;
public static Item gasflame6;
public static Item gasflame7;
public static Item gasflame8;
public static Item energy_ball;
public static Item discharge;
public static Item empblast;
@ -1686,6 +1700,10 @@ public class ModItems {
paa_plate = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 1).setUnlocalizedName("paa_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_plate");
paa_legs = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 2).setUnlocalizedName("paa_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_legs");
paa_boots = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 3).setUnlocalizedName("paa_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_boots");
asbestos_helmet = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 0).setUnlocalizedName("asbestos_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_helmet");
asbestos_plate = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 1).setUnlocalizedName("asbestos_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_plate");
asbestos_legs = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 2).setUnlocalizedName("asbestos_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_legs");
asbestos_boots = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 3).setUnlocalizedName("asbestos_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_boots");
schrabidium_sword = new SwordSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_sword");
schrabidium_pickaxe = new PickaxeSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_pickaxe");
@ -1779,6 +1797,7 @@ public class ModItems {
polaroid = new ItemPolaroid().setUnlocalizedName("polaroid").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":polaroid_" + MainRegistry.polaroidID);
letter = new ItemStarterKit().setUnlocalizedName("letter").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":letter");
book_secret = new ItemCustomLore().setUnlocalizedName("book_secret").setCreativeTab(MainRegistry.polaroidID == 11 ? MainRegistry.tabNuke : null).setTextureName(RefStrings.MODID + ":book_secret");
smoke1 = new Item().setUnlocalizedName("smoke1").setTextureName(RefStrings.MODID + ":smoke1");
smoke2 = new Item().setUnlocalizedName("smoke2").setTextureName(RefStrings.MODID + ":smoke2");
@ -1820,6 +1839,14 @@ 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");
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");
gasflame4 = new Item().setUnlocalizedName("gasflame4").setTextureName(RefStrings.MODID + ":gasflame4");
gasflame5 = new Item().setUnlocalizedName("gasflame5").setTextureName(RefStrings.MODID + ":gasflame5");
gasflame6 = new Item().setUnlocalizedName("gasflame6").setTextureName(RefStrings.MODID + ":gasflame6");
gasflame7 = new Item().setUnlocalizedName("gasflame7").setTextureName(RefStrings.MODID + ":gasflame7");
gasflame8 = new Item().setUnlocalizedName("gasflame8").setTextureName(RefStrings.MODID + ":gasflame8");
energy_ball = new Item().setUnlocalizedName("energy_ball").setTextureName(RefStrings.MODID + ":energy_ball");
discharge = new Item().setUnlocalizedName("discharge").setTextureName(RefStrings.MODID + ":discharge");
empblast = new Item().setUnlocalizedName("empblast").setTextureName(RefStrings.MODID + ":empblast");
@ -2184,9 +2211,9 @@ public class ModItems {
//Canisters
GameRegistry.registerItem(canister_empty, canister_empty.getUnlocalizedName());
GameRegistry.registerItem(canister_oil, canister_oil.getUnlocalizedName());
GameRegistry.registerItem(canister_smear, canister_smear.getUnlocalizedName());
GameRegistry.registerItem(canister_canola, canister_canola.getUnlocalizedName());
GameRegistry.registerItem(canister_oil, canister_oil.getUnlocalizedName());
GameRegistry.registerItem(canister_fuel, canister_fuel.getUnlocalizedName());
GameRegistry.registerItem(canister_kerosene, canister_kerosene.getUnlocalizedName());
GameRegistry.registerItem(canister_napalm, canister_napalm.getUnlocalizedName());
@ -2668,6 +2695,10 @@ public class ModItems {
GameRegistry.registerItem(paa_plate, paa_plate.getUnlocalizedName());
GameRegistry.registerItem(paa_legs, paa_legs.getUnlocalizedName());
GameRegistry.registerItem(paa_boots, paa_boots.getUnlocalizedName());
GameRegistry.registerItem(asbestos_helmet, asbestos_helmet.getUnlocalizedName());
GameRegistry.registerItem(asbestos_plate, asbestos_plate.getUnlocalizedName());
GameRegistry.registerItem(asbestos_legs, asbestos_legs.getUnlocalizedName());
GameRegistry.registerItem(asbestos_boots, asbestos_boots.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_helmet, schrabidium_helmet.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_plate, schrabidium_plate.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_legs, schrabidium_legs.getUnlocalizedName());
@ -2697,6 +2728,7 @@ public class ModItems {
GameRegistry.registerItem(remote, remote.getUnlocalizedName());
GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName());
GameRegistry.registerItem(polaroid, polaroid.getUnlocalizedName());
GameRegistry.registerItem(book_secret, book_secret.getUnlocalizedName());
//Kits
GameRegistry.registerItem(nuke_starter_kit, nuke_starter_kit.getUnlocalizedName());
@ -2768,6 +2800,14 @@ public class ModItems {
GameRegistry.registerItem(gas6, gas6.getUnlocalizedName());
GameRegistry.registerItem(gas7, gas7.getUnlocalizedName());
GameRegistry.registerItem(gas8, gas8.getUnlocalizedName());
GameRegistry.registerItem(gasflame1, gasflame1.getUnlocalizedName());
GameRegistry.registerItem(gasflame2, gasflame2.getUnlocalizedName());
GameRegistry.registerItem(gasflame3, gasflame3.getUnlocalizedName());
GameRegistry.registerItem(gasflame4, gasflame4.getUnlocalizedName());
GameRegistry.registerItem(gasflame5, gasflame5.getUnlocalizedName());
GameRegistry.registerItem(gasflame6, gasflame6.getUnlocalizedName());
GameRegistry.registerItem(gasflame7, gasflame7.getUnlocalizedName());
GameRegistry.registerItem(gasflame8, gasflame8.getUnlocalizedName());
GameRegistry.registerItem(energy_ball, energy_ball.getUnlocalizedName());
GameRegistry.registerItem(discharge, discharge.getUnlocalizedName());
GameRegistry.registerItem(empblast, empblast.getUnlocalizedName());

View File

@ -0,0 +1,81 @@
package com.hbm.items.gear;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor;
import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
public class ArmorAsbestos extends ItemArmor implements ISpecialArmor {
private String [] armourTypes = new String [] {"asbestos_helmet", "asbestos_plate", "asbestos_legs", "asbestos_boots"};
public ArmorAsbestos(ArmorMaterial armorMaterial, int renderIndex, int armorType) {
super(armorMaterial, renderIndex, armorType);
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
if(stack.getItem().equals(ModItems.asbestos_helmet) || stack.getItem().equals(ModItems.asbestos_plate) || stack.getItem().equals(ModItems.asbestos_boots)) {
return (RefStrings.MODID + ":textures/armor/asbestos_1.png");
}
if(stack.getItem().equals(ModItems.asbestos_legs)) {
return (RefStrings.MODID + ":textures/armor/asbestos_2.png");
}
else return null;
}
@Override
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
if(source.isFireDamage())
{
return new ArmorProperties(1, 1, MathHelper.floor_double(999999999));
}
return new ArmorProperties(0, 0, 0);
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
if(slot == 0)
{
return 3;
}
if(slot == 1)
{
return 8;
}
if(slot == 2)
{
return 6;
}
if(slot == 3)
{
return 3;
}
return 0;
}
@Override
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
stack.damageItem(damage * 1, entity);
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack armor) {
player.extinguish();
}
}

View File

@ -45,6 +45,12 @@ public class ModArmor extends ItemArmor {
if(stack.getItem().equals(ModItems.paa_legs)) {
return (RefStrings.MODID + ":textures/armor/paa_2.png");
}
if(stack.getItem().equals(ModItems.asbestos_helmet) || stack.getItem().equals(ModItems.asbestos_plate) || stack.getItem().equals(ModItems.asbestos_boots)) {
return (RefStrings.MODID + ":textures/armor/asbestos_1.png");
}
if(stack.getItem().equals(ModItems.asbestos_legs)) {
return (RefStrings.MODID + ":textures/armor/asbestos_2.png");
}
else return null;
}

View File

@ -6,18 +6,24 @@ import java.util.UUID;
import com.hbm.blocks.ModBlocks;
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
import com.hbm.entity.mob.EntityHunterChopper;
import com.hbm.entity.projectile.EntityChopperMine;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IDuct;
import com.hbm.interfaces.IGasAcceptor;
import com.hbm.interfaces.IGasDuct;
import com.hbm.interfaces.IGasSource;
import com.hbm.interfaces.IOilDuct;
import com.hbm.interfaces.IOilAcceptor;
import com.hbm.interfaces.IOilSource;
import com.hbm.interfaces.ISource;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.TileEntityCable;
import com.hbm.tileentity.TileEntityGasDuct;
import com.hbm.tileentity.TileEntityGasDuctSolid;
import com.hbm.tileentity.TileEntityLaunchPad;
import com.hbm.tileentity.TileEntityMachineBattery;
import com.hbm.tileentity.TileEntityMachineDeuterium;
@ -220,6 +226,16 @@ public class Library {
return false;
}
public static boolean checkForAsbestos(EntityPlayer player) {
if(checkArmor(player, ModItems.asbestos_helmet, ModItems.asbestos_plate, ModItems.asbestos_legs, ModItems.asbestos_boots))
{
return true;
}
return false;
}
public static boolean checkForGasMask(EntityPlayer player) {
if(checkArmorPiece(player, ModItems.hazmat_helmet, 3))
@ -264,17 +280,18 @@ public class Library {
world.getBlock(x, y, z) == ModBlocks.fwatz_hatch ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_igenerator ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_cyclotron ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well)
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_flare)
{
return true;
}
return false;
}
public static boolean checkDuctConnectables(World world, int x, int y, int z)
public static boolean checkOilConnectables(World world, int x, int y, int z)
{
TileEntity tileentity = world.getTileEntity(x, y, z);
if((tileentity != null && tileentity instanceof IDuct) ||
if((tileentity != null && tileentity instanceof IOilDuct) ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
world.getBlock(x, y, z) == ModBlocks.machine_refinery)
{
@ -283,6 +300,18 @@ public class Library {
return false;
}
public static boolean checkGasConnectables(World world, int x, int y, int z)
{
TileEntity tileentity = world.getTileEntity(x, y, z);
if((tileentity != null && tileentity instanceof IGasDuct) ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_flare)
{
return true;
}
return false;
}
public static boolean checkUnionList(List<UnionOfTileEntitiesAndBooleans> list, ISource that) {
for(UnionOfTileEntitiesAndBooleans union : list)
@ -309,6 +338,19 @@ public class Library {
return false;
}
public static boolean checkGasUnionListForGas(List<UnionOfTileEntitiesAndBooleansForGas> list, IGasSource that) {
for(UnionOfTileEntitiesAndBooleansForGas union : list)
{
if(union.source == that)
{
return true;
}
}
return false;
}
////// ////// ////// ////// ////// //// ////// ////// //////
// // // // // // // // // // //
//// ////// ///// // //// //// //// // // // //
@ -687,7 +729,7 @@ public class Library {
Block block = worldObj.getBlock(x, y, z);
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
if(tileentity instanceof IDuct)
if(tileentity instanceof IOilDuct)
{
if(tileentity instanceof TileEntityOilDuct)
{
@ -768,4 +810,107 @@ public class Library {
that.clearList();
}
}
public static void transmitGas(int x, int y, int z, boolean newTact, IGasSource that, World worldObj) {
Block block = worldObj.getBlock(x, y, z);
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x + 1, y, z) == ModBlocks.machine_flare)
{
tileentity = worldObj.getTileEntity(x + 1, y, z);
}
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x - 1, y, z) == ModBlocks.machine_flare)
{
tileentity = worldObj.getTileEntity(x - 1, y, z);
}
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x, y, z + 1) == ModBlocks.machine_flare)
{
tileentity = worldObj.getTileEntity(x, y, z + 1);
}
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x, y, z - 1) == ModBlocks.machine_flare)
{
tileentity = worldObj.getTileEntity(x, y, z - 1);
}
if(tileentity instanceof IGasDuct)
{
if(tileentity instanceof TileEntityGasDuct)
{
if(Library.checkGasUnionListForGas(((TileEntityGasDuct)tileentity).uoteab, that))
{
for(int i = 0; i < ((TileEntityGasDuct)tileentity).uoteab.size(); i++)
{
if(((TileEntityGasDuct)tileentity).uoteab.get(i).source == that)
{
if(((TileEntityGasDuct)tileentity).uoteab.get(i).ticked != newTact)
{
((TileEntityGasDuct)tileentity).uoteab.get(i).ticked = newTact;
that.fillGas(x, y + 1, z, that.getTact());
that.fillGas(x, y - 1, z, that.getTact());
that.fillGas(x - 1, y, z, that.getTact());
that.fillGas(x + 1, y, z, that.getTact());
that.fillGas(x, y, z - 1, that.getTact());
that.fillGas(x, y, z + 1, that.getTact());
}
}
}
} else {
((TileEntityGasDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForGas(that, newTact));
}
}
if(tileentity instanceof TileEntityGasDuctSolid)
{
if(Library.checkGasUnionListForGas(((TileEntityGasDuctSolid)tileentity).uoteab, that))
{
for(int i = 0; i < ((TileEntityGasDuctSolid)tileentity).uoteab.size(); i++)
{
if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).source == that)
{
if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked != newTact)
{
((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked = newTact;
that.fillGas(x, y + 1, z, that.getTact());
that.fillGas(x, y - 1, z, that.getTact());
that.fillGas(x - 1, y, z, that.getTact());
that.fillGas(x + 1, y, z, that.getTact());
that.fillGas(x, y, z - 1, that.getTact());
that.fillGas(x, y, z + 1, that.getTact());
}
}
}
} else {
((TileEntityGasDuctSolid)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForGas(that, newTact));
}
}
}
if(tileentity instanceof IGasAcceptor && newTact)
{
that.getGasList().add((IGasAcceptor)tileentity);
}
if(!newTact)
{
int size = that.getGasList().size();
if(size > 0)
{
int part = that.getGasFill() / size;
for(IGasAcceptor consume : that.getGasList())
{
if(consume.getGasFill() < consume.getMaxGasFill())
{
if(consume.getMaxGasFill() - consume.getGasFill() >= part)
{
that.setGasFill(that.getGasFill()-part);
consume.setGasFill(consume.getGasFill() + part);
} else {
that.setGasFill(that.getGasFill() - (consume.getMaxGasFill() - consume.getGasFill()));
consume.setGasFill(consume.getMaxGasFill());
}
}
}
}
that.clearGasList();
}
}
}

View File

@ -3,7 +3,15 @@ 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.24";
public static final String VERSION = "1.0.25 BETA (Astatine-Lyra-X01)";
//HBM's Beta Naming Convention:
//V T (X-Y-Z)
//V -> next release version
//T -> build type
//X -> halogene (or noble gas if we're out of halogenes)
//Y -> some word that sounds cool
//Z -> build number
//Example: 1.0.25 BETA (Astatine-Lyra-X01)
public static final String CLIENTSIDE = "com.hbm.main.ClientProxy";
public static final String SERVERSIDE = "com.hbm.main.ServerProxy";
}

View File

@ -1,14 +0,0 @@
package com.hbm.lib;
public class SPCLStrings {
//Cheeky easter egg
String stringStanley = "54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52";
//Replace e998, universal task
String stringQuestion = "41 4d 20 4e 4f 54 20 4f 46 20 55 4e 44 45 52 53 54 41 4e 44 49 4e 47 20 48 4f 57 20 4d 41 4e 45 20 49 53 20 4f 46 20 57 41 56 49 4e 47";
//Hash value for error reports
String stringError = "T1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVM";
//Hilarious name
String stringCumberbatch = "Bunsenburner Toodlesnoot";
}

View File

@ -58,6 +58,7 @@ import com.hbm.entity.mob.EntityNuclearCreeper;
import com.hbm.entity.particle.EntityBSmokeFX;
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.EntitySSmokeFX;
import com.hbm.entity.particle.EntitySmokeFX;
@ -84,6 +85,7 @@ import com.hbm.items.ModItems;
import com.hbm.render.entity.BSmokeRenderer;
import com.hbm.render.entity.DSmokeRenderer;
import com.hbm.render.entity.ElectricityRenderer;
import com.hbm.render.entity.GasFlameRenderer;
import com.hbm.render.entity.GasRenderer;
import com.hbm.render.entity.ModEffectRenderer;
import com.hbm.render.entity.RenderBaleflare;
@ -164,6 +166,7 @@ import com.hbm.render.tileentity.RenderCyclotron;
import com.hbm.render.tileentity.RenderDecoBlock;
import com.hbm.render.tileentity.RenderDecoBlockAlt;
import com.hbm.render.tileentity.RenderDerrick;
import com.hbm.render.tileentity.RenderGasDuct;
import com.hbm.render.tileentity.RenderGasFlare;
import com.hbm.render.tileentity.RenderIGenerator;
import com.hbm.render.tileentity.RenderLaunchPadTier1;
@ -202,6 +205,7 @@ import com.hbm.tileentity.TileEntityDecoPoleSatelliteReceiver;
import com.hbm.tileentity.TileEntityDecoPoleTop;
import com.hbm.tileentity.TileEntityDecoSteelPoles;
import com.hbm.tileentity.TileEntityDecoTapeRecorder;
import com.hbm.tileentity.TileEntityGasDuct;
import com.hbm.tileentity.TileEntityMachineIGenerator;
import com.hbm.tileentity.TileEntityMachineOilWell;
import com.hbm.tileentity.TileEntityLaunchPad;
@ -383,6 +387,7 @@ public class ClientProxy extends ServerProxy
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCable.class, new RenderCable());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOilDuct.class, new RenderOilDuct());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGasDuct.class, new RenderGasDuct());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileGeneric.class, new RenderMissileGeneric());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileAntiBallistic.class, new RenderMissileGeneric());
@ -433,6 +438,7 @@ public class ClientProxy extends ServerProxy
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));
RenderingRegistry.registerEntityRenderingHandler(EntityGasFlameFX.class, new GasFlameRenderer(ModItems.nuclear_waste));
RenderingRegistry.registerEntityRenderingHandler(EntityCombineBall.class, new RenderSnowball(ModItems.energy_ball));
RenderingRegistry.registerEntityRenderingHandler(EntityDischarge.class, new ElectricityRenderer(ModItems.discharge));
RenderingRegistry.registerEntityRenderingHandler(EntityEMPBlast.class, new RenderEMPBlast());

View File

@ -74,9 +74,10 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_sas3, 1), new Object[] { ModItems.cell_empty, ModItems.powder_schrabidium, "dustSulfur", "dustSulfur" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_sas3, 1), new Object[] { ModItems.cell_empty, ModItems.powder_schrabidium, "sulfur", "sulfur" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.canister_empty, 2), new Object[] { "S ", "AA", "AA", 'S', ModItems.plate_steel, 'A', "plateAluminum" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.canister_empty, 2), new Object[] { "S ", "AA", "AA", 'S', "plateSteel", 'A', "plateAluminum" }));
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_barrel), 1), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.canister_fuel, 'T', ModItems.tank_steel });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.yellow_barrel), 1), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.nuclear_waste, 'T', ModItems.tank_steel });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_empty, 2), new Object[] { "S ", "AA", "AA", 'A', "plateSteel", 'S', "plateCopper" }));
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_aluminium), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_aluminium });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_copper), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_copper });
@ -401,7 +402,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.warhead_mirv, 1), new Object[] { "MMM", "MWM", "MMM", 'M', ModItems.warhead_mirvlet, 'W', ModItems.warhead_generic_large });
GameRegistry.addRecipe(new ItemStack(ModItems.warhead_thermo_endo, 1), new Object[] { " T ", "TBT", "TBT", 'T', ModItems.plate_titanium, 'B', Item.getItemFromBlock(ModBlocks.therm_endo) });
GameRegistry.addRecipe(new ItemStack(ModItems.warhead_thermo_exo, 1), new Object[] { " T ", "TBT", "TBT", 'T', ModItems.plate_titanium, 'B', Item.getItemFromBlock(ModBlocks.therm_exo) });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_small, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', Item.getItemFromBlock(ModBlocks.red_barrel) }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_small, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', ModItems.canister_kerosene }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_medium, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', ModItems.fuel_tank_small }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_large, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', ModItems.fuel_tank_medium }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.thruster_small, 1), new Object[] { "AS ", "AH ", " L ", 'A', ModItems.wire_aluminium, 'S', "plateSteel", 'H', ModItems.hull_small_steel, 'L', ModItems.hull_small_steel }));
@ -455,6 +456,10 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_industrial_generator), 1), new Object[] { "PPP", "FGG", "WSS", 'P', ModItems.board_copper, 'F', ModItems.generator_front, 'G', ModItems.generator_steel, 'W', ModBlocks.red_wire_coated, 'S', ModItems.pedestal_steel });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_wire_coated), 16), new Object[] { "WRW", "RIR", "WRW", 'W', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_cable), 16), new Object[] { "WRW", "RIR", "WRW", 'W', "plateSteel", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.oil_duct_solid), 16), new Object[] { "SPS", "P P", "SPS", 'S', "ingotSteel", 'P', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.oil_duct), 16), new Object[] { "SIS", " ", "SIS", 'S', "plateSteel", 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.gas_duct_solid), 16), new Object[] { "SPS", "P P", "SPS", 'S', "ingotSteel", 'P', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.gas_duct), 16), new Object[] { "SIS", " ", "SIS", 'S', "plateSteel", 'I', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_deuterium), 1), new Object[] { "TIT", "RFR", "CCC", 'T', ModItems.tank_steel, 'I', "ingotTitanium", 'R', ModItems.wire_red_copper, 'F', Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 'C', ModItems.coil_tungsten }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TST", "RIR", "TLT", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TLT", "RIR", "TST", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
@ -469,6 +474,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 1), new Object[] { "UPU", "UWU", "UPU", 'P', "plateSteel", 'U', ModItems.rtg_unit, 'W', ModBlocks.red_wire_coated }));
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_cyclotron), 1), new Object[] { "PTP", "PCP", "WBW", 'P', ModItems.board_copper, 'T', ModItems.cyclotron_tower, 'C', ModBlocks.fusion_core, 'W', ModBlocks.red_wire_coated, 'B', ModBlocks.machine_battery });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_well), 1), new Object[] { "TPM", "GPG", "GDG", 'T', ModItems.tank_steel, 'P', ModItems.pipes_steel, 'M', ModItems.motor, 'G', ModBlocks.steel_scaffold, 'D', ModItems.drill_titanium });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_flare), 1), new Object[] { "UHU", "GPG", "GTG", 'U', ModItems.thermo_element, 'H', ModItems.hull_small_steel, 'G', ModBlocks.steel_scaffold, 'P', ModItems.pipes_steel, 'T', ModItems.tank_steel });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_refinery), 1), new Object[] { "PTP", "CTC", "WFW", 'P', "plateTitanium", 'T', ModItems.tank_steel, 'C', ModItems.coil_tungsten, 'W', ModBlocks.red_wire_coated, 'F', ModBlocks.machine_electric_furnace_off }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 1), new Object[] { "PIP", "I I", "PIP", 'P', "plateTitanium", 'I', "ingotTitanium" }));
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_furnace), 1), new Object[] { "HMH", "MFM", "HMH", 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 'M', ModItems.motor, 'F', Item.getItemFromBlock(Blocks.furnace) });

View File

@ -82,6 +82,7 @@ import com.hbm.entity.mob.EntityNuclearCreeper;
import com.hbm.entity.particle.EntityBSmokeFX;
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.EntitySSmokeFX;
import com.hbm.entity.particle.EntitySmokeFX;
@ -128,6 +129,8 @@ import com.hbm.tileentity.TileEntityDiFurnace;
import com.hbm.tileentity.TileEntityDummy;
import com.hbm.tileentity.TileEntityFWatzCore;
import com.hbm.tileentity.TileEntityFusionMultiblock;
import com.hbm.tileentity.TileEntityGasDuct;
import com.hbm.tileentity.TileEntityGasDuctSolid;
import com.hbm.tileentity.TileEntityHatch;
import com.hbm.tileentity.TileEntityMachineIGenerator;
import com.hbm.tileentity.TileEntityMachineOilWell;
@ -392,6 +395,8 @@ public class MainRegistry
GameRegistry.registerTileEntity(TileEntityMachineRefinery.class, "tileentity_refinery");
GameRegistry.registerTileEntity(TileEntityOilDuct.class, "tileentity_oil_duct");
GameRegistry.registerTileEntity(TileEntityOilDuctSolid.class, "tileentity_oil_duct_solid");
GameRegistry.registerTileEntity(TileEntityGasDuct.class, "tileentity_gas_duct");
GameRegistry.registerTileEntity(TileEntityGasDuctSolid.class, "tileentity_gas_duct_solid");
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
@ -468,6 +473,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityOilSpillFX.class, "entity_spill_fx", 72, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityOilSpill.class, "entity_oil_spill", 73, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityGasFX.class, "entity_spill_fx", 74, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityGasFlameFX.class, "entity_gasflame_fx", 75, 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);

View File

@ -58,6 +58,7 @@ public class NEIConfig implements IConfigureNEI {
API.hideItem(new ItemStack(ModItems.watch));
API.hideItem(new ItemStack(ModItems.rod_quad_euphemium));
API.hideItem(new ItemStack(ModItems.rod_euphemium));
API.hideItem(new ItemStack(ModItems.book_secret));
}
@Override

View File

@ -0,0 +1,125 @@
package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.entity.particle.EntityGasFX;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.particle.EntityOilSpillFX;
import com.hbm.items.ModItems;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
public class GasFlameRenderer extends Render {
private Item field_94151_a;
private int field_94150_f;
private static final String __OBFID = "CL_00001008";
public GasFlameRenderer(Item p_i1259_1_, int p_i1259_2_) {
this.field_94151_a = p_i1259_1_;
this.field_94150_f = p_i1259_2_;
}
public GasFlameRenderer(Item p_i1260_1_) {
this(p_i1260_1_, 0);
}
/**
* Actually renders the given argument. This is a synthetic bridge method,
* always casting down its argument and then handing it off to a worker
* function which does the actual work. In all probabilty, the class Render
* is generic (Render<T extends Entity) and this method has signature public
* void func_76986_a(T entity, double d, double d1, double d2, float f,
* float f1). But JAD is pre 1.5 so doesn't do that.
*/
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_) {
if (p_76986_1_ instanceof EntityGasFlameFX) {
EntityGasFlameFX fx = (EntityGasFlameFX) p_76986_1_;
if (fx.particleAge <= fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7) {
field_94151_a = ModItems.gasflame8;
}
if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) {
field_94151_a = ModItems.gasflame7;
}
if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) {
field_94151_a = ModItems.gasflame6;
}
if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) {
field_94151_a = ModItems.gasflame5;
}
if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) {
field_94151_a = ModItems.gasflame4;
}
if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) {
field_94151_a = ModItems.gasflame3;
}
if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) {
field_94151_a = ModItems.gasflame2;
}
if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) {
field_94151_a = ModItems.gasflame1;
}
IIcon iicon = field_94151_a.getIconFromDamage(0);
if (iicon != null) {
GL11.glPushMatrix();
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glScalef(7.5F, 7.5F, 7.5F);
//
GL11.glScalef(0.35F, 0.35F, 0.35F);
//
this.bindEntityTexture(p_76986_1_);
Tessellator tessellator = Tessellator.instance;
this.func_77026_a(tessellator, iicon);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
}
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called
* unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return TextureMap.locationItemsTexture;
}
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) {
float f = p_77026_2_.getMinU();
float f1 = p_77026_2_.getMaxU();
float f2 = p_77026_2_.getMinV();
float f3 = p_77026_2_.getMaxV();
float f4 = 1.0F;
float f5 = 0.5F;
float f6 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
p_77026_1_.startDrawingQuads();
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (0.0F - f6), 0.0D, (double) f, (double) f3);
p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (0.0F - f6), 0.0D, (double) f1, (double) f3);
p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (f4 - f6), 0.0D, (double) f1, (double) f2);
p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (f4 - f6), 0.0D, (double) f, (double) f2);
p_77026_1_.draw();
}
}

View File

@ -0,0 +1,155 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.TileEntityCable;
import com.hbm.tileentity.TileEntityGasDuct;
import com.hbm.tileentity.TileEntityOilDuct;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
public class RenderGasDuct extends TileEntitySpecialRenderer {
public ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/blocks/gas_duct.png");
float pixel = 1F/16F;
float textureP = 1F / 32F;
@Override
public void renderTileEntityAt(TileEntity tileentity, double offsetX, double offsetY, double offsetZ, float f) {
GL11.glTranslated(offsetX, offsetY, offsetZ);
GL11.glDisable(GL11.GL_LIGHTING);
this.bindTexture(texture);
drawCore(tileentity);
TileEntityGasDuct cable = (TileEntityGasDuct) tileentity;
for(int i = 0; i < cable.connections.length; i++)
{
if(cable.connections[i] != null)
{
drawConnection(cable.connections[i]);
}
}
GL11.glTranslated(-offsetX, -offsetY, -offsetZ);
GL11.glEnable(GL11.GL_LIGHTING);
}
public void drawCore(TileEntity tileentity) {
Tessellator tesseract = Tessellator.instance;
tesseract.startDrawingQuads();
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
tesseract.draw();
}
public void drawConnection(ForgeDirection direction)
{
Tessellator tesseract = Tessellator.instance;
tesseract.startDrawingQuads();
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
if(direction.equals(ForgeDirection.UP))
{
}
if(direction.equals(ForgeDirection.DOWN))
{
GL11.glRotatef(180, 1, 0, 0);
}
if(direction.equals(ForgeDirection.NORTH))
{
GL11.glRotatef(270, 1, 0, 0);
}
if(direction.equals(ForgeDirection.SOUTH))
{
GL11.glRotatef(90, 1, 0, 0);
}
if(direction.equals(ForgeDirection.EAST))
{
GL11.glRotatef(270, 0, 0, 1);
}
if(direction.equals(ForgeDirection.WEST))
{
GL11.glRotatef(90, 0, 0, 1);
}
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 5 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 0 * textureP);
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 5 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 0 * textureP);
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
tesseract.draw();
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
if(direction.equals(ForgeDirection.UP))
{
}
if(direction.equals(ForgeDirection.DOWN))
{
GL11.glRotatef(-180, 1, 0, 0);
}
if(direction.equals(ForgeDirection.NORTH))
{
GL11.glRotatef(-270, 1, 0, 0);
}
if(direction.equals(ForgeDirection.SOUTH))
{
GL11.glRotatef(-90, 1, 0, 0);
}
if(direction.equals(ForgeDirection.EAST))
{
GL11.glRotatef(-270, 0, 0, 1);
}
if(direction.equals(ForgeDirection.WEST))
{
GL11.glRotatef(-90, 0, 0, 1);
}
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
}
}

View File

@ -14,7 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class RenderOilDuct extends TileEntitySpecialRenderer {
public ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/blocks/oil_duct.png");
public ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/blocks/oil_duct_alt.png");
float pixel = 1F/16F;
float textureP = 1F / 32F;

View File

@ -0,0 +1,58 @@
package com.hbm.tileentity;
import java.util.ArrayList;
import java.util.List;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IGasDuct;
import com.hbm.interfaces.IOilDuct;
import com.hbm.interfaces.IOilAcceptor;
import com.hbm.lib.Library;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityGasDuct extends TileEntity implements IGasDuct {
public ForgeDirection[] connections = new ForgeDirection[6];
public List<UnionOfTileEntitiesAndBooleansForGas> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForGas>();
public TileEntityGasDuct() {
}
public void updateEntity() {
this.updateConnections();
}
public void updateConnections() {
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP;
else connections[0] = null;
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN;
else connections[1] = null;
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH;
else connections[2] = null;
if(Library.checkGasConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST;
else connections[3] = null;
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH;
else connections[4] = null;
if(Library.checkGasConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST;
else connections[5] = null;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared()
{
return 65536.0D;
}
}

View File

@ -0,0 +1,17 @@
package com.hbm.tileentity;
import java.util.ArrayList;
import java.util.List;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
import com.hbm.interfaces.IGasDuct;
import com.hbm.interfaces.IOilDuct;
import net.minecraft.tileentity.TileEntity;
public class TileEntityGasDuctSolid extends TileEntity implements IGasDuct {
public List<UnionOfTileEntitiesAndBooleansForGas> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForGas>();
}

View File

@ -5,8 +5,12 @@ import java.util.List;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.particle.EntityGasFX;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionThermo;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IGasAcceptor;
import com.hbm.interfaces.IOilAcceptor;
import com.hbm.interfaces.IOilSource;
import com.hbm.interfaces.ISource;
@ -27,14 +31,14 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.oredict.OreDictionary;
public class TileEntityMachineGasFlare extends TileEntity implements ISidedInventory, ISource {
public class TileEntityMachineGasFlare extends TileEntity implements ISidedInventory, ISource, IGasAcceptor {
private ItemStack slots[];
public int gas;
public int power;
public static final int maxPower = 100000;
public static final int maxGas = 640;
public static final int maxGas = 64 * 50;
public int age = 0;
public List<IConsumer> list = new ArrayList();
@ -223,6 +227,35 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven
ffgeuaInit();
if(!worldObj.isRemote) {
if(slots[1] != null && slots[1].getItem() == ModItems.gas_full && gas + 50 <= maxGas) {
if(slots[2] == null) {
gas += 50;
slots[1].stackSize--;
if(slots[1].stackSize <= 0)
slots[1] = null;
slots[2] = new ItemStack(ModItems.gas_empty);
}else if(slots[2] != null && slots[2].getItem() == ModItems.gas_empty && slots[2].stackSize < slots[2].getMaxStackSize()) {
gas += 50;
slots[1].stackSize--;
if(slots[1].stackSize <= 0)
slots[1] = null;
slots[2].stackSize++;
}
}
if(gas >= 0) {
gas--;
power += 5;
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, this.xCoord + 0.5F, this.yCoord + 11F, this.zCoord + 0.5F, 0.0, 0.0, 0.0));
ExplosionThermo.setEntitiesOnFire(worldObj, this.xCoord, this.yCoord + 11, zCoord, 5);
if(age % 5 == 0)
this.worldObj.playSoundEffect(this.xCoord, this.yCoord + 11, this.zCoord, "hbm:weapon.flamethrowerShoot", 1.5F, 1F);
}
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
}
}
@ -281,4 +314,19 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven
public List<IConsumer> getList() {
return this.list;
}
@Override
public void setGasFill(int i) {
this.gas = i;
}
@Override
public int getGasFill() {
return this.gas;
}
@Override
public int getMaxGasFill() {
return this.maxGas;
}
}

View File

@ -11,6 +11,8 @@ import com.hbm.entity.particle.EntityOilSpillFX;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.handler.ShredderRecipeHandler;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IGasAcceptor;
import com.hbm.interfaces.IGasSource;
import com.hbm.interfaces.IOilAcceptor;
import com.hbm.interfaces.IOilSource;
import com.hbm.inventory.MachineRecipes;
@ -33,7 +35,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary;
public class TileEntityMachineOilWell extends TileEntity implements ISidedInventory, IConsumer, IOilSource {
public class TileEntityMachineOilWell extends TileEntity implements ISidedInventory, IConsumer, IOilSource, IGasSource {
private ItemStack slots[];
@ -48,6 +50,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
public int age = 0;
public int age2 = 0;
public List<IOilAcceptor> aclist = new ArrayList();
public List<IGasAcceptor> gaslist = new ArrayList();
private static final int[] slots_top = new int[] {1};
private static final int[] slots_bottom = new int[] {2, 0};
@ -243,8 +246,10 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
age -= timer;
if(age2 >= 20)
age2 -= 20;
if(age2 == 9 || age2 == 19)
if(age2 == 9 || age2 == 19) {
fillInit();
fillGasInit();
}
if(!worldObj.isRemote) {
@ -307,6 +312,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
if(b == Blocks.air || b == Blocks.grass || b == Blocks.dirt ||
b == Blocks.stone || b == Blocks.sand || b == Blocks.sandstone ||
b == Blocks.clay || b == Blocks.hardened_clay || b == Blocks.stained_hardened_clay ||
b == Blocks.gravel || isOre(b, worldObj.getBlockMetadata(xCoord, i, zCoord)) ||
b.isReplaceable(worldObj, xCoord, i, zCoord)) {
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
@ -485,6 +491,19 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
Library.transmitOil(x, y, z, newTact, this, worldObj);
}
@Override
public void fillGasInit() {
fillGas(this.xCoord + 2, this.yCoord, this.zCoord, getTact());
fillGas(this.xCoord - 2, this.yCoord, this.zCoord, getTact());
fillGas(this.xCoord, this.yCoord, this.zCoord + 2, getTact());
fillGas(this.xCoord, this.yCoord, this.zCoord - 2, getTact());
}
@Override
public void fillGas(int x, int y, int z, boolean newTact) {
Library.transmitGas(x, y, z, newTact, this, worldObj);
}
@Override
public boolean getTact() {
if (age2 >= 0 && age2 < 10) {
@ -514,4 +533,24 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
this.aclist.clear();
}
@Override
public int getGasFill() {
return this.gas;
}
@Override
public void setGasFill(int i) {
this.gas = i;
}
@Override
public List<IGasAcceptor> getGasList() {
return this.gaslist;
}
@Override
public void clearGasList() {
this.gaslist.clear();
}
}

View File

@ -6,7 +6,7 @@ import java.util.List;
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IDuct;
import com.hbm.interfaces.IOilDuct;
import com.hbm.interfaces.IOilAcceptor;
import com.hbm.lib.Library;
@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityOilDuct extends TileEntity implements IDuct {
public class TileEntityOilDuct extends TileEntity implements IOilDuct {
public ForgeDirection[] connections = new ForgeDirection[6];
@ -30,22 +30,22 @@ public class TileEntityOilDuct extends TileEntity implements IDuct {
}
public void updateConnections() {
if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP;
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP;
else connections[0] = null;
if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN;
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN;
else connections[1] = null;
if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH;
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH;
else connections[2] = null;
if(Library.checkDuctConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST;
if(Library.checkOilConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST;
else connections[3] = null;
if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH;
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH;
else connections[4] = null;
if(Library.checkDuctConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST;
if(Library.checkOilConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST;
else connections[5] = null;
}

View File

@ -4,11 +4,11 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
import com.hbm.interfaces.IDuct;
import com.hbm.interfaces.IOilDuct;
import net.minecraft.tileentity.TileEntity;
public class TileEntityOilDuctSolid extends TileEntity implements IDuct {
public class TileEntityOilDuctSolid extends TileEntity implements IOilDuct {
public List<UnionOfTileEntitiesAndBooleansForOil> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForOil>();