mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge branch 'HbmMods:master' into master
This commit is contained in:
commit
169265e8a1
@ -823,6 +823,7 @@ public class ModBlocks {
|
||||
public static Block struct_soyuz_core;
|
||||
public static Block struct_iter_core;
|
||||
public static Block struct_plasma_core;
|
||||
public static Block struct_watz_core;
|
||||
|
||||
public static Block factory_titanium_hull;
|
||||
@Deprecated public static Block factory_titanium_furnace;
|
||||
@ -1950,6 +1951,7 @@ public class ModBlocks {
|
||||
struct_soyuz_core = new BlockSoyuzStruct(Material.iron).setBlockName("struct_soyuz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_soyuz_core");
|
||||
struct_iter_core = new BlockITERStruct(Material.iron).setBlockName("struct_iter_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_iter_core");
|
||||
struct_plasma_core = new BlockPlasmaStruct(Material.iron).setBlockName("struct_plasma_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_plasma_core");
|
||||
struct_watz_core = new BlockWatzStruct(Material.iron).setBlockName("struct_watz_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_watz_core");
|
||||
|
||||
factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).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.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_furnace");
|
||||
@ -3221,6 +3223,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(struct_soyuz_core, struct_soyuz_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_iter_core, struct_iter_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_plasma_core, struct_plasma_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_watz_core, struct_watz_core.getUnlocalizedName());
|
||||
|
||||
//Absorbers
|
||||
GameRegistry.registerBlock(absorber, absorber.getUnlocalizedName());
|
||||
|
||||
@ -17,9 +17,9 @@ public class BlockITERStruct extends BlockContainer {
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityITERStruct();
|
||||
}
|
||||
|
||||
public boolean isOpaqueCube() {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
25
src/main/java/com/hbm/blocks/machine/BlockWatzStruct.java
Normal file
25
src/main/java/com/hbm/blocks/machine/BlockWatzStruct.java
Normal file
@ -0,0 +1,25 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityWatzStruct;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockWatzStruct extends BlockContainer {
|
||||
|
||||
public BlockWatzStruct(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityWatzStruct();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityWatz;
|
||||
|
||||
@ -31,7 +32,7 @@ public class Watz extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {2, 0, 3, 3, 3, 3};
|
||||
return new int[] {2, 0, 3, 3, 1, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -41,13 +42,22 @@ public class Watz extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o); //TODO
|
||||
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 2, 2, 2, -2}, x, y, z, dir) &&
|
||||
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 2, 2, -2, 2}, x, y, z, dir) &&
|
||||
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 1, 1, 3, -3}, x, y, z, dir) &&
|
||||
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 1, 1, -3, 3}, x, y, z, dir);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 2, 2, 2, -2}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 2, 2, -2, 2}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 1, 1, 3, -3}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[]{2, 0, 1, 1, -3, 3}, this, dir);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
|
||||
@ -59,5 +69,6 @@ public class Watz extends BlockDummyable {
|
||||
this.makeExtra(world, x - 2, y + 2, z);
|
||||
this.makeExtra(world, x, y + 2, z + 2);
|
||||
this.makeExtra(world, x, y + 2, z - 2);
|
||||
this.makeExtra(world, x, y + 2, z);
|
||||
}
|
||||
}
|
||||
|
||||
66
src/main/java/com/hbm/entity/effect/EntityMist.java
Normal file
66
src/main/java/com/hbm/entity/effect/EntityMist.java
Normal file
@ -0,0 +1,66 @@
|
||||
package com.hbm.entity.effect;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous_ART;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Liquid;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Viscous;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMist extends Entity {
|
||||
|
||||
public EntityMist(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
this.dataWatcher.addObject(10, new Integer(0));
|
||||
}
|
||||
|
||||
public EntityMist setFluid(FluidType fluid) {
|
||||
this.dataWatcher.updateObject(10, fluid.getID());
|
||||
return this;
|
||||
}
|
||||
|
||||
public FluidType getType() {
|
||||
return Fluids.fromID(this.dataWatcher.getWatchableObjectInt(10));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
|
||||
}
|
||||
|
||||
public static SprayStyle getStyleFromType(FluidType type) {
|
||||
|
||||
if(type.hasTrait(FT_Viscous.class)) {
|
||||
return SprayStyle.NULL;
|
||||
}
|
||||
|
||||
if(type.hasTrait(FT_Gaseous.class) || type.hasTrait(FT_Gaseous_ART.class)) {
|
||||
return SprayStyle.GAS;
|
||||
}
|
||||
|
||||
if(type.hasTrait(FT_Liquid.class)) {
|
||||
return SprayStyle.MIST;
|
||||
}
|
||||
|
||||
return SprayStyle.NULL;
|
||||
}
|
||||
|
||||
public static enum SprayStyle {
|
||||
MIST, //liquids that have been sprayed into a mist
|
||||
GAS, //things that were already gaseous
|
||||
NULL
|
||||
}
|
||||
}
|
||||
@ -58,10 +58,6 @@ public class EntityChemical extends EntityThrowableNT {
|
||||
* if CORROSIVE: apply extra acid damage, poison effect as well as armor degradation
|
||||
*/
|
||||
|
||||
public double lastClientPosX = -1;
|
||||
public double lastClientPosY = -1;
|
||||
public double lastClientPosZ = -1;
|
||||
|
||||
public EntityChemical(World world) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
|
||||
@ -862,18 +862,19 @@ public class OreDictManager {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String any() { return ANY + groupName; }
|
||||
public String nugget() { return NUGGET + groupName; }
|
||||
public String tiny() { return TINY + groupName; }
|
||||
public String ingot() { return INGOT + groupName; }
|
||||
public String dustTiny() { return DUSTTINY + groupName; }
|
||||
public String dust() { return DUST + groupName; }
|
||||
public String gem() { return GEM + groupName; }
|
||||
public String crystal() { return CRYSTAL + groupName; }
|
||||
public String plate() { return PLATE + groupName; }
|
||||
public String billet() { return BILLET + groupName; }
|
||||
public String block() { return BLOCK + groupName; }
|
||||
public String ore() { return ORE + groupName; }
|
||||
public String any() { return ANY + groupName; }
|
||||
public String nugget() { return NUGGET + groupName; }
|
||||
public String tiny() { return TINY + groupName; }
|
||||
public String ingot() { return INGOT + groupName; }
|
||||
public String dustTiny() { return DUSTTINY + groupName; }
|
||||
public String dust() { return DUST + groupName; }
|
||||
public String gem() { return GEM + groupName; }
|
||||
public String crystal() { return CRYSTAL + groupName; }
|
||||
public String plate() { return PLATE + groupName; }
|
||||
public String plateTriple() { return PLATECAST + groupName; }
|
||||
public String billet() { return BILLET + groupName; }
|
||||
public String block() { return BLOCK + groupName; }
|
||||
public String ore() { return ORE + groupName; }
|
||||
}
|
||||
|
||||
private static void addReRegistration(String original, String additional) {
|
||||
|
||||
@ -123,6 +123,7 @@ public class Fluids {
|
||||
protected static final List<FluidType> metaOrder = new ArrayList();
|
||||
|
||||
public static final FT_Liquid LIQUID = new FT_Liquid();
|
||||
public static final FT_Viscous VISCOUS = new FT_Viscous();
|
||||
public static final FT_Gaseous_ART EVAP = new FT_Gaseous_ART();
|
||||
public static final FT_Gaseous GASEOUS = new FT_Gaseous();
|
||||
public static final FT_Plasma PLASMA = new FT_Plasma();
|
||||
@ -154,19 +155,19 @@ public class Fluids {
|
||||
SUPERHOTSTEAM = new FluidType("SUPERHOTSTEAM", 0xE7B7B7, 4, 0, 0, EnumSymbol.NONE).setTemp(450).setCompression(1D).addTraits(GASEOUS);
|
||||
ULTRAHOTSTEAM = new FluidType("ULTRAHOTSTEAM", 0xE39393, 4, 0, 0, EnumSymbol.NONE).setTemp(600).setCompression(10D).addTraits(GASEOUS);
|
||||
COOLANT = new FluidType("COOLANT", 0xd8fcff, 1, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
LAVA = new FluidType("LAVA", 0xFF3300, 4, 0, 0, EnumSymbol.NOWATER).setTemp(1200).addTraits(LIQUID);
|
||||
LAVA = new FluidType("LAVA", 0xFF3300, 4, 0, 0, EnumSymbol.NOWATER).setTemp(1200).addTraits(LIQUID, VISCOUS);
|
||||
DEUTERIUM = new FluidType("DEUTERIUM", 0x0000FF, 3, 4, 0, EnumSymbol.NONE).addTraits(new FT_Flammable(5_000), new FT_Combustible(FuelGrade.HIGH, 10_000), GASEOUS);
|
||||
TRITIUM = new FluidType("TRITIUM", 0x000099, 3, 4, 0, EnumSymbol.RADIATION).addTraits(new FT_Flammable(5_000), new FT_Combustible(FuelGrade.HIGH, 10_000), GASEOUS, new FT_VentRadiation(0.001F));
|
||||
OIL = new FluidType("OIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID);
|
||||
HOTOIL = new FluidType("HOTOIL", 0x300900, 2, 3, 0, EnumSymbol.NONE).setTemp(350).addTraits(new FT_Flammable(10_000), LIQUID);
|
||||
HEAVYOIL = new FluidType("HEAVYOIL", 0x141312, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x513F39)).addTraits(new FT_Flammable(50_000), new FT_Combustible(FuelGrade.LOW, 25_000), LIQUID);
|
||||
BITUMEN = new FluidType("BITUMEN", 0x1f2426, 2, 0, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x5A5877)).addTraits(LIQUID);
|
||||
SMEAR = new FluidType("SMEAR", 0x190f01, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x624F3B)).addTraits(new FT_Flammable(50_000), LIQUID);
|
||||
HEATINGOIL = new FluidType("HEATINGOIL", 0x211806, 2, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x694235)).addTraits(new FT_Flammable(150_000), new FT_Combustible(FuelGrade.LOW, 100_000), LIQUID);
|
||||
RECLAIMED = new FluidType("RECLAIMED", 0x332b22, 2, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xF65723)).addTraits(new FT_Flammable(100_000), new FT_Combustible(FuelGrade.LOW, 200_000), LIQUID);
|
||||
OIL = new FluidType("OIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID, VISCOUS);
|
||||
HOTOIL = new FluidType("HOTOIL", 0x300900, 2, 3, 0, EnumSymbol.NONE).setTemp(350).addTraits(new FT_Flammable(10_000), LIQUID, VISCOUS);
|
||||
HEAVYOIL = new FluidType("HEAVYOIL", 0x141312, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x513F39)).addTraits(new FT_Flammable(50_000), new FT_Combustible(FuelGrade.LOW, 25_000), LIQUID, VISCOUS);
|
||||
BITUMEN = new FluidType("BITUMEN", 0x1f2426, 2, 0, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x5A5877)).addTraits(LIQUID, VISCOUS);
|
||||
SMEAR = new FluidType("SMEAR", 0x190f01, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x624F3B)).addTraits(new FT_Flammable(50_000), LIQUID, VISCOUS);
|
||||
HEATINGOIL = new FluidType("HEATINGOIL", 0x211806, 2, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x694235)).addTraits(new FT_Flammable(150_000), new FT_Combustible(FuelGrade.LOW, 100_000), LIQUID, VISCOUS);
|
||||
RECLAIMED = new FluidType("RECLAIMED", 0x332b22, 2, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xF65723)).addTraits(new FT_Flammable(100_000), new FT_Combustible(FuelGrade.LOW, 200_000), LIQUID, VISCOUS);
|
||||
PETROIL = new FluidType("PETROIL", 0x44413d, 1, 3, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2369F6)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 300_000), LIQUID);
|
||||
LUBRICANT = new FluidType("LUBRICANT", 0x606060, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xF1CC05)).addTraits(LIQUID);
|
||||
NAPHTHA = new FluidType("NAPHTHA", 0x595744, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x5F6D44)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 200_000), LIQUID);
|
||||
NAPHTHA = new FluidType("NAPHTHA", 0x595744, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x5F6D44)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 200_000), LIQUID, VISCOUS);
|
||||
DIESEL = new FluidType("DIESEL", 0xf2eed5, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xFF2C2C)).addTraits(new FT_Flammable(200_000), new FT_Combustible(FuelGrade.HIGH, 500_000), LIQUID);
|
||||
LIGHTOIL = new FluidType("LIGHTOIL", 0x8c7451, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xB46B52)).addTraits(new FT_Flammable(200_000), new FT_Combustible(FuelGrade.MEDIUM, 500_000), LIQUID);
|
||||
KEROSENE = new FluidType("KEROSENE", 0xffa5d2, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xFF377D)).addTraits(new FT_Flammable(300_000), new FT_Combustible(FuelGrade.AERO, 1_250_000), LIQUID);
|
||||
@ -183,20 +184,20 @@ public class Fluids {
|
||||
AMAT = new FluidType("AMAT", 0x010101, 5, 0, 5, EnumSymbol.ANTIMATTER).addTraits(ANTI, GASEOUS);
|
||||
ASCHRAB = new FluidType("ASCHRAB", 0xb50000, 5, 0, 5, EnumSymbol.ANTIMATTER).addTraits(ANTI, GASEOUS);
|
||||
ACID = new FluidType("ACID", 0xfff7aa, 3, 0, 3, EnumSymbol.OXIDIZER).addTraits(new FT_Corrosive(40), LIQUID);
|
||||
WATZ = new FluidType("WATZ", 0x86653E, 4, 0, 3, EnumSymbol.ACID).addTraits(new FT_Corrosive(60), new FT_VentRadiation(0.1F), LIQUID);
|
||||
CRYOGEL = new FluidType("CRYOGEL", 0x32ffff, 2, 0, 0, EnumSymbol.CROYGENIC).setTemp(-170).addTraits(LIQUID);
|
||||
WATZ = new FluidType("WATZ", 0x86653E, 4, 0, 3, EnumSymbol.ACID).addTraits(new FT_Corrosive(60), new FT_VentRadiation(0.1F), LIQUID, VISCOUS);
|
||||
CRYOGEL = new FluidType("CRYOGEL", 0x32ffff, 2, 0, 0, EnumSymbol.CROYGENIC).setTemp(-170).addTraits(LIQUID, VISCOUS);
|
||||
HYDROGEN = new FluidType("HYDROGEN", 0x4286f4, 3, 4, 0, EnumSymbol.CROYGENIC).setTemp(-260).addContainers(new CD_Gastank(0x4286f4, 0xffffff)).addTraits(new FT_Flammable(5_000), new FT_Combustible(FuelGrade.HIGH, 10_000), LIQUID, EVAP);
|
||||
OXYGEN = new FluidType("OXYGEN", 0x98bdf9, 3, 0, 0, EnumSymbol.CROYGENIC).setTemp(-100).addContainers(new CD_Gastank(0x98bdf9, 0xffffff)).addTraits(LIQUID, EVAP);
|
||||
XENON = new FluidType("XENON", 0xba45e8, 0, 0, 0, EnumSymbol.ASPHYXIANT).addContainers(new CD_Gastank(0x8C21FF, 0x303030)).addTraits(GASEOUS);
|
||||
BALEFIRE = new FluidType("BALEFIRE", 0x28e02e, 4, 4, 3, EnumSymbol.RADIATION).setTemp(1500).addTraits(new FT_Corrosive(50), new FT_Flammable(1_000_000), new FT_Combustible(FuelGrade.HIGH, 2_500_000), LIQUID);
|
||||
BALEFIRE = new FluidType("BALEFIRE", 0x28e02e, 4, 4, 3, EnumSymbol.RADIATION).setTemp(1500).addTraits(new FT_Corrosive(50), new FT_Flammable(1_000_000), new FT_Combustible(FuelGrade.HIGH, 2_500_000), LIQUID, VISCOUS);
|
||||
MERCURY = new FluidType("MERCURY", 0x808080, 2, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, new FT_Poison(false, 2));
|
||||
PAIN = new FluidType("PAIN", 0x938541, 2, 0, 1, EnumSymbol.ACID).setTemp(300).addTraits(new FT_Corrosive(30), new FT_Poison(true, 2), LIQUID);
|
||||
WASTEFLUID = new FluidType("WASTEFLUID", 0x544400, 2, 0, 1, EnumSymbol.RADIATION).addTraits(new FT_VentRadiation(0.5F), NOCON, LIQUID);
|
||||
PAIN = new FluidType("PAIN", 0x938541, 2, 0, 1, EnumSymbol.ACID).setTemp(300).addTraits(new FT_Corrosive(30), new FT_Poison(true, 2), LIQUID, VISCOUS);
|
||||
WASTEFLUID = new FluidType("WASTEFLUID", 0x544400, 2, 0, 1, EnumSymbol.RADIATION).addTraits(new FT_VentRadiation(0.5F), NOCON, LIQUID, VISCOUS);
|
||||
WASTEGAS = new FluidType("WASTEGAS", 0xB8B8B8, 2, 0, 1, EnumSymbol.RADIATION).addTraits(new FT_VentRadiation(0.5F), NOCON, GASEOUS);
|
||||
GASOLINE = new FluidType("GASOLINE", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2F7747)).addTraits(new FT_Flammable(400_000), new FT_Combustible(FuelGrade.HIGH, 1_000_000), LIQUID);
|
||||
COALGAS = new FluidType("COALGAS", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2E155F)).addTraits(new FT_Flammable(75_000), new FT_Combustible(FuelGrade.MEDIUM, 150_000), LIQUID);
|
||||
SPENTSTEAM = new FluidType("SPENTSTEAM", 0x445772, 2, 0, 0, EnumSymbol.NONE).setCompression(1D).addTraits(NOCON, GASEOUS);
|
||||
FRACKSOL = new FluidType("FRACKSOL", 0x798A6B, 1, 3, 3, EnumSymbol.ACID).addContainers(new CD_Canister(0x4F887F)).addTraits(new FT_Corrosive(15), new FT_Poison(false, 0), LIQUID);
|
||||
FRACKSOL = new FluidType("FRACKSOL", 0x798A6B, 1, 3, 3, EnumSymbol.ACID).addContainers(new CD_Canister(0x4F887F)).addTraits(new FT_Corrosive(15), new FT_Poison(false, 0), LIQUID, VISCOUS);
|
||||
PLASMA_DT = new FluidType("PLASMA_DT", 0xF7AFDE, 0, 4, 0, EnumSymbol.RADIATION).setTemp(3250).addTraits(NOCON, NOID, PLASMA);
|
||||
PLASMA_HD = new FluidType("PLASMA_HD", 0xF0ADF4, 0, 4, 0, EnumSymbol.RADIATION).setTemp(2500).addTraits(NOCON, NOID, PLASMA);
|
||||
PLASMA_HT = new FluidType("PLASMA_HT", 0xD1ABF2, 0, 4, 0, EnumSymbol.RADIATION).setTemp(3000).addTraits(NOCON, NOID, PLASMA);
|
||||
@ -205,20 +206,20 @@ public class Fluids {
|
||||
CARBONDIOXIDE = new FluidType("CARBONDIOXIDE", 0x404040, 3, 0, 0, EnumSymbol.ASPHYXIANT).addTraits(GASEOUS);
|
||||
PLASMA_DH3 = new FluidType("PLASMA_DH3", 0xFF83AA, 0, 4, 0, EnumSymbol.RADIATION).setTemp(3480).addTraits(NOCON, NOID, PLASMA);
|
||||
HELIUM3 = new FluidType("HELIUM3", 0xFCF0C4, 3, 4, 0, EnumSymbol.ASPHYXIANT).addTraits(GASEOUS);
|
||||
DEATH = new FluidType("DEATH", 0x717A88, 2, 0, 1, EnumSymbol.ACID).setTemp(300).addTraits(new FT_Corrosive(80), new FT_Poison(true, 4), LEADCON, LIQUID);
|
||||
DEATH = new FluidType("DEATH", 0x717A88, 2, 0, 1, EnumSymbol.ACID).setTemp(300).addTraits(new FT_Corrosive(80), new FT_Poison(true, 4), LEADCON, LIQUID, VISCOUS);
|
||||
ETHANOL = new FluidType("ETHANOL", 0xe0ffff, 2, 3, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xEAFFF3)).addTraits(new FT_Flammable(75_000), new FT_Combustible(FuelGrade.HIGH, 200_000), LIQUID);
|
||||
HEAVYWATER = new FluidType("HEAVYWATER", 0x00a0b0, 1, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
CRACKOIL = new FluidType("CRACKOIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID);
|
||||
COALOIL = new FluidType("COALOIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID);
|
||||
HOTCRACKOIL = new FluidType("HOTCRACKOIL", 0x300900, 2, 3, 0, EnumSymbol.NONE).setTemp(350).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID);
|
||||
NAPHTHA_CRACK = new FluidType("NAPHTHA_CRACK", 0x595744, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x5F6D44)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 200_000), LIQUID);
|
||||
CRACKOIL = new FluidType("CRACKOIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID, VISCOUS);
|
||||
COALOIL = new FluidType("COALOIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID, VISCOUS);
|
||||
HOTCRACKOIL = new FluidType("HOTCRACKOIL", 0x300900, 2, 3, 0, EnumSymbol.NONE).setTemp(350).addContainers(new CD_Canister(0x424242)).addTraits(new FT_Flammable(10_000), LIQUID, VISCOUS);
|
||||
NAPHTHA_CRACK = new FluidType("NAPHTHA_CRACK", 0x595744, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x5F6D44)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 200_000), LIQUID, VISCOUS);
|
||||
LIGHTOIL_CRACK = new FluidType("LIGHTOIL_CRACK", 0x8c7451, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xB46B52)).addTraits(new FT_Flammable(200_000), new FT_Combustible(FuelGrade.MEDIUM, 500_000), LIQUID);
|
||||
DIESEL_CRACK = new FluidType("DIESEL_CRACK", 0xf2eed5, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xFF2C2C)).addTraits(new FT_Flammable(200_000), new FT_Combustible(FuelGrade.HIGH, 450_000), LIQUID);
|
||||
AROMATICS = new FluidType("AROMATICS", 0x68A09A, 1, 4, 1, EnumSymbol.NONE).addTraits(new FT_Flammable(25_000), LIQUID);
|
||||
AROMATICS = new FluidType("AROMATICS", 0x68A09A, 1, 4, 1, EnumSymbol.NONE).addTraits(new FT_Flammable(25_000), LIQUID, VISCOUS);
|
||||
UNSATURATEDS = new FluidType("UNSATURATEDS", 0x628FAE, 1, 4, 1, EnumSymbol.NONE).addTraits(new FT_Flammable(1_000_000), GASEOUS); //acetylene burns as hot as satan's asshole
|
||||
SALIENT = new FluidType("SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE).addTraits(DELICIOUS, LIQUID);
|
||||
XPJUICE = new FluidType("XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
ENDERJUICE = new FluidType("ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
SALIENT = new FluidType("SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE).addTraits(DELICIOUS, LIQUID, VISCOUS);
|
||||
XPJUICE = new FluidType("XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
|
||||
ENDERJUICE = new FluidType("ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
|
||||
PETROIL_LEADED = new FluidType("PETROIL_LEADED", 0x44413d, 1, 3, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2331F6)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 450_000), LIQUID);
|
||||
GASOLINE_LEADED = new FluidType("GASOLINE_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2F775A)).addTraits(new FT_Flammable(400_000), new FT_Combustible(FuelGrade.HIGH, 1_500_000), LIQUID);
|
||||
COALGAS_LEADED = new FluidType("COALGAS_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x1E155F)).addTraits(new FT_Flammable(75_000), new FT_Combustible(FuelGrade.MEDIUM, 250_000), LIQUID);
|
||||
@ -226,31 +227,31 @@ public class Fluids {
|
||||
COOLANT_HOT = new FluidType("COOLANT_HOT", 0x99525E, 1, 0, 0, EnumSymbol.NONE).setTemp(600).addTraits(LIQUID);
|
||||
MUG = new FluidType("MUG", 0x4B2D28, 0, 0, 0, EnumSymbol.NONE).addTraits(DELICIOUS, LIQUID);
|
||||
MUG_HOT = new FluidType("MUG_HOT", 0x6B2A20, 0, 0, 0, EnumSymbol.NONE).setTemp(500).addTraits(DELICIOUS, LIQUID);
|
||||
WOODOIL = new FluidType("WOODOIL", 0x847D54, 2, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xBF7E4F)).addTraits(LIQUID);
|
||||
COALCREOSOTE = new FluidType("COALCREOSOTE", 0x51694F, 3, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x285A3F)).addTraits(LIQUID);
|
||||
SEEDSLURRY = new FluidType("SEEDSLURRY", 0x7CC35E, 0, 0, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x7CC35E)).addTraits(LIQUID);
|
||||
WOODOIL = new FluidType("WOODOIL", 0x847D54, 2, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xBF7E4F)).addTraits(LIQUID, VISCOUS);
|
||||
COALCREOSOTE = new FluidType("COALCREOSOTE", 0x51694F, 3, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x285A3F)).addTraits(LIQUID, VISCOUS);
|
||||
SEEDSLURRY = new FluidType("SEEDSLURRY", 0x7CC35E, 0, 0, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x7CC35E)).addTraits(LIQUID, VISCOUS);
|
||||
NITRIC_ACID = new FluidType("NITRIC_ACID", 0xBB7A1E, 3, 0, 2, EnumSymbol.OXIDIZER).addTraits(LIQUID, new FT_Corrosive(60));
|
||||
SOLVENT = new FluidType("SOLVENT", 0xE4E3EF, 2, 3, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xE4E3EF)).addTraits(LIQUID, new FT_Corrosive(30));
|
||||
BLOOD = new FluidType("BLOOD", 0xB22424, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
BLOOD_HOT = new FluidType("BLOOD_HOT", 0xF22419, 3, 0, 0, EnumSymbol.NONE).addTraits(LIQUID).setTemp(666); //it's funny because it's the satan number
|
||||
BLOOD = new FluidType("BLOOD", 0xB22424, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
|
||||
BLOOD_HOT = new FluidType("BLOOD_HOT", 0xF22419, 3, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS).setTemp(666); //it's funny because it's the satan number
|
||||
SYNGAS = new FluidType("SYNGAS", 0x131313, 1, 4, 2, EnumSymbol.NONE).addContainers(new CD_Gastank(0xFFFFFF, 0x131313)).addTraits(GASEOUS);
|
||||
OXYHYDROGEN = new FluidType("OXYHYDROGEN", 0x483FC1, 0, 4, 2, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
RADIOSOLVENT = new FluidType("RADIOSOLVENT", 0xA4D7DD, 3, 3, 0, EnumSymbol.NONE).addTraits(LIQUID, LEADCON, new FT_Corrosive(50), new FT_VentRadiation(0.01F));
|
||||
CHLORINE = new FluidType("CHLORINE", 0xBAB572, 3, 0, 0, EnumSymbol.OXIDIZER).addContainers(new CD_Gastank(0xBAB572, 0x887B34)).addTraits(GASEOUS, new FT_Corrosive(25), new FT_Poison(true, 1));
|
||||
HEAVYOIL_VACUUM = new FluidType("HEAVYOIL_VACUUM", 0x131214, 2, 1, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0x513F39));
|
||||
REFORMATE = new FluidType("REFORMATE", 0x835472, 2, 2, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0xD180D6));
|
||||
HEAVYOIL_VACUUM = new FluidType("HEAVYOIL_VACUUM", 0x131214, 2, 1, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS).addContainers(new CD_Canister(0x513F39));
|
||||
REFORMATE = new FluidType("REFORMATE", 0x835472, 2, 2, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS).addContainers(new CD_Canister(0xD180D6));
|
||||
LIGHTOIL_VACUUM = new FluidType("LIGHTOIL_VACUUM", 0x8C8851, 1, 2, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0xB46B52));
|
||||
SOURGAS = new FluidType("SOURGAS", 0xC9BE0D, 4, 4, 0, EnumSymbol.ACID).addContainers(new CD_Gastank(0xC9BE0D, 0x303030)).addTraits(GASEOUS, new FT_Corrosive(10), new FT_Poison(false, 1));
|
||||
XYLENE = new FluidType("XYLENE", 0x5C4E76, 2, 3, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0xA380D6));
|
||||
HEATINGOIL_VACUUM = new FluidType("HEATINGOIL_VACUUM", 0x211D06, 2, 2, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0x694235));
|
||||
XYLENE = new FluidType("XYLENE", 0x5C4E76, 2, 3, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS).addContainers(new CD_Canister(0xA380D6));
|
||||
HEATINGOIL_VACUUM = new FluidType("HEATINGOIL_VACUUM", 0x211D06, 2, 2, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS).addContainers(new CD_Canister(0x694235));
|
||||
DIESEL_REFORM = new FluidType("DIESEL_REFORM", 0xCDC3C6, 1, 2, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0xFFC500));
|
||||
DIESEL_CRACK_REFORM = new FluidType("DIESEL_CRACK_REFORM",0xCDC3CC, 1, 2, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0xFFC500));
|
||||
KEROSENE_REFORM = new FluidType("KEROSENE_REFORM", 0xFFA5F3, 1, 2, 0, EnumSymbol.NONE).addTraits(LIQUID).addContainers(new CD_Canister(0xFF377D));
|
||||
REFORMGAS = new FluidType("REFORMGAS", 0x6362AE, 1, 4, 1, EnumSymbol.NONE).addContainers(new CD_Gastank(0x9392FF, 0xFFB992)).addTraits(GASEOUS);
|
||||
COLLOID = new FluidType("COLLOID", 0x787878, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
COLLOID = new FluidType("COLLOID", 0x787878, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
|
||||
PHOSGENE = new FluidType("PHOSGENE", 0xCFC4A4, 4, 0, 1, EnumSymbol.NONE).addContainers(new CD_Gastank(0xCFC4A4, 0x361414)).addTraits(GASEOUS);
|
||||
MUSTARDGAS = new FluidType("MUSTARDGAS", 0xBAB572, 4, 1, 1, EnumSymbol.NONE).addContainers(new CD_Gastank(0xBAB572, 0x361414)).addTraits(GASEOUS);
|
||||
IONGEL = new FluidType(103, "IONGEL", 0xB8FFFF, 1, 0, 4, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
IONGEL = new FluidType(103, "IONGEL", 0xB8FFFF, 1, 0, 4, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
|
||||
|
||||
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
|
||||
@ -12,7 +12,8 @@ public class FluidTraitSimple {
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Gaseous_ART extends FluidTrait { //at room temperature, for cryogenic hydrogen for example
|
||||
/** gaseous at room temperature, for cryogenic hydrogen for example */
|
||||
public static class FT_Gaseous_ART extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Gaseous at Room Temperature]");
|
||||
}
|
||||
@ -24,6 +25,13 @@ public class FluidTraitSimple {
|
||||
}
|
||||
}
|
||||
|
||||
/** to viscous to be sprayed/turned into a mist */
|
||||
public static class FT_Viscous extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Viscous]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Plasma extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[Plasma]");
|
||||
|
||||
@ -4,11 +4,18 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerWatz;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.render.util.GaugeUtil;
|
||||
import com.hbm.render.util.GaugeUtil.Gauge;
|
||||
import com.hbm.tileentity.machine.TileEntityWatz;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIWatz extends GuiInfoContainer {
|
||||
@ -40,16 +47,31 @@ public class GUIWatz extends GuiInfoContainer {
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 93, 4210752);
|
||||
|
||||
String flux = "" + ((int)(watz.fluxDisplay * 10)) / 10.0D;
|
||||
this.fontRendererObj.drawString(flux, 159 - this.fontRendererObj.getStringWidth(flux), 105, 0x00ff00);
|
||||
double scale = 1.25;
|
||||
String flux = String.format("%,.1f", watz.fluxDisplay);
|
||||
GL11.glScaled(1 / scale, 1 / scale, 1);
|
||||
this.fontRendererObj.drawString(flux, (int) (161 * scale - this.fontRendererObj.getStringWidth(flux)), (int)(107 * scale), 0x00ff00);
|
||||
GL11.glScaled(scale, scale, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 142 <= x && guiLeft + 142 + 18 > x && guiTop + 70 < y && guiTop + 70 + 18 >= y) {
|
||||
NBTTagCompound control = new NBTTagCompound();
|
||||
control.setBoolean("lock", true);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, watz.xCoord, watz.yCoord, watz.zCoord));
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1F));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//float col = (float) (Math.sin(System.currentTimeMillis() / 500D) * 0.5 + 0.5);
|
||||
//GL11.glColor4f(1.0F, col, col, 1.0F);
|
||||
float col = MathHelper.clamp_float(1 - (float) Math.log(watz.heat / 100_000D + 1) * 0.4F, 0F, 1F);
|
||||
GL11.glColor4f(1.0F, col, col, 1.0F);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, 131, 122);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
@ -59,6 +81,11 @@ public class GUIWatz extends GuiInfoContainer {
|
||||
drawTexturedModalRect(guiLeft + 105, guiTop + 96, 185, 26, 30, 26);
|
||||
drawTexturedModalRect(guiLeft + 9, guiTop + 96, 184, 0, 26, 26);
|
||||
|
||||
if(watz.isOn) drawTexturedModalRect(guiLeft + 147, guiTop + 8, 176, 0, 8, 8);
|
||||
if(watz.isLocked) drawTexturedModalRect(guiLeft + 142, guiTop + 70, 210, 0, 18, 18);
|
||||
|
||||
GaugeUtil.renderGauge(Gauge.ROUND_SMALL, guiLeft + 13, guiTop + 100, this.zLevel, 1 - col);
|
||||
|
||||
watz.tanks[0].renderTank(guiLeft + 143, guiTop + 69, this.zLevel, 4, 43);
|
||||
watz.tanks[1].renderTank(guiLeft + 149, guiTop + 69, this.zLevel, 4, 43);
|
||||
watz.tanks[2].renderTank(guiLeft + 155, guiTop + 69, this.zLevel, 4, 43);
|
||||
|
||||
@ -304,11 +304,8 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.fusion_motor, 1), new AStack[] {new OreDictStack(TI.ingot(), 4), new OreDictStack(STEEL.ingot(), 2), new ComparableStack(ModItems.motor, 4), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.fusion_heater, 1), new AStack[] {new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate528(), 2), new OreDictStack(OreDictManager.getReflector(), 2), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.magnetron, 1), new ComparableStack(ModItems.wire_advanced_alloy, 4), },150);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_element, 1), new AStack[] {new OreDictStack(W.ingot(), 4), new OreDictStack(ALLOY.plate(), 4), new ComparableStack(ModItems.rod_empty, 2), new ComparableStack(ModItems.wire_magnetized_tungsten, 2), new ComparableStack(ModItems.wire_advanced_alloy, 4), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_control, 1), new AStack[] {new OreDictStack(W.ingot(), 4), new OreDictStack(ALLOY.ingot(), 4), new OreDictStack(PB.ingot(), 2), new ComparableStack(ModItems.wire_magnetized_tungsten, 4), new ComparableStack(ModItems.wire_advanced_alloy, 2), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_cooler, 1), new AStack[] {new OreDictStack(W.ingot(), 2), new OreDictStack(STEEL.ingot(), 2), new OreDictStack(KNO.dust(), 4), },300);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_end, 1), new AStack[] {new OreDictStack(W.ingot(), 2), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.ingot(), 3), },150);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_hatch, 1), new AStack[] {new ComparableStack(ModBlocks.reinforced_brick, 1), new OreDictStack(TI.plate(), 6), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_conductor, 1), new AStack[] {new OreDictStack(W.ingot(), 2), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.ingot(), 2), new ComparableStack(ModItems.wire_red_copper, 6), new ComparableStack(ModItems.wire_magnetized_tungsten, 2), new ComparableStack(ModItems.fuse, 4), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_end, 3), new AStack[] {new OreDictStack(ANY_RESISTANTALLOY.plateTriple()), new OreDictStack(B.ingot(), 3), new OreDictStack(STEEL.plate(), 9), }, 100);
|
||||
makeRecipe(new ComparableStack(ModBlocks.watz_core, 1), new AStack[] {new ComparableStack(ModBlocks.block_meteor, 1), new ComparableStack(ModItems.circuit_gold, 5), new ComparableStack(ModItems.circuit_schrabidium, 2), new ComparableStack(ModItems.wire_magnetized_tungsten, 12), },350);
|
||||
makeRecipe(new ComparableStack(ModBlocks.fwatz_hatch, 1), new AStack[] {new OreDictStack(W.ingot(), 6), new OreDictStack(CMB.plate(), 4), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.fwatz_conductor, 1), new AStack[] {new OreDictStack(CMB.plate(), 2), new ComparableStack(ModItems.coil_magnetized_tungsten, 5), },250);
|
||||
|
||||
@ -50,9 +50,9 @@ public class MixerRecipes extends SerializableRecipe {
|
||||
recipes.put(Fluids.SYNGAS, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.COALOIL, 500)).setStack2(new FluidStack(Fluids.STEAM, 500)));
|
||||
recipes.put(Fluids.OXYHYDROGEN, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.HYDROGEN, 500)).setStack2(new FluidStack(Fluids.OXYGEN, 500)));
|
||||
|
||||
recipes.put(Fluids.PETROIL_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.PETROIL, 800)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
recipes.put(Fluids.GASOLINE_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.GASOLINE, 800)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
recipes.put(Fluids.COALGAS_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.COALGAS, 800)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
recipes.put(Fluids.PETROIL_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.PETROIL, 10_000)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
recipes.put(Fluids.GASOLINE_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.GASOLINE, 10_000)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
recipes.put(Fluids.COALGAS_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.COALGAS, 10_000)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
|
||||
recipes.put(Fluids.DIESEL_REFORM, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.DIESEL, 900)).setStack2(new FluidStack(Fluids.REFORMATE, 100)));
|
||||
recipes.put(Fluids.DIESEL_CRACK_REFORM, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.DIESEL_CRACK, 900)).setStack2(new FluidStack(Fluids.REFORMATE, 100)));
|
||||
|
||||
@ -444,7 +444,7 @@ public class AnvilRecipes {
|
||||
new AStack[] {new ComparableStack(ModItems.nugget_bismuth, 2), new OreDictStack(U238.billet(), 2), new OreDictStack(NB.dust(), 1)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_bismuth, 1))).setTier(4));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 2), new OreDictStack(VOLCANIC.gem(), 1)},
|
||||
new AStack[] {new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new ComparableStack(ModItems.ingot_osmiridium)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_euphemium, 4))).setTier(6));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)},
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -123,6 +124,8 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
EnumWatzType num = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + "Depletion: " + String.format(Locale.US, "%.1f", getDurabilityForDisplay(stack) * 100D) + "%");
|
||||
|
||||
String color = EnumChatFormatting.GOLD + "";
|
||||
String reset = EnumChatFormatting.RESET + "";
|
||||
|
||||
|
||||
@ -314,6 +314,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzStruct.class, new RenderSoyuzMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITERStruct.class, new RenderITERMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPlasmaStruct.class, new RenderPlasmaMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatzStruct.class, new RenderWatzMultiblock());
|
||||
//RBMK
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKControlManual.class, new RenderRBMKControlRod());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKControlAuto.class, new RenderRBMKControlRod());
|
||||
|
||||
@ -29,12 +29,6 @@ public class RenderChemical extends Render {
|
||||
EntityChemical chem = (EntityChemical) entity;
|
||||
ChemicalStyle style = chem.getStyle();
|
||||
|
||||
if(chem.lastClientPosX == -1 && chem.lastClientPosY == -1 && chem.lastClientPosZ == -1) {
|
||||
chem.lastClientPosX = chem.posX - chem.motionX;
|
||||
chem.lastClientPosY = chem.posY - chem.motionY;
|
||||
chem.lastClientPosZ = chem.posZ - chem.motionZ;
|
||||
}
|
||||
|
||||
if(style == ChemicalStyle.AMAT || style == ChemicalStyle.LIGHTNING)
|
||||
renderAmatBeam(chem, f1);
|
||||
|
||||
@ -47,10 +41,6 @@ public class RenderChemical extends Render {
|
||||
this.bindEntityTexture(chem);
|
||||
renderGasFire(chem, f1);
|
||||
}
|
||||
|
||||
chem.lastClientPosX = chem.prevPosX + (chem.posX - chem.prevPosX) * f1;
|
||||
chem.lastClientPosY = chem.prevPosX + (chem.posY - chem.prevPosY) * f1;
|
||||
chem.lastClientPosZ = chem.prevPosX + (chem.posZ - chem.prevPosZ) * f1;
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.render.util.SmallBlockPronter;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderWatzMultiblock extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
|
||||
bindTexture(TextureMap.locationBlocksTexture);
|
||||
SmallBlockPronter.startDrawing();
|
||||
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, 0F, 1F, 0F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, 0F, 2F, 0F);
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 1F, i, 0F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 2F, i, 0F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 0F, i, 1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 0F, i, 2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, -1F, i, 0F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, -2F, i, 0F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 0F, i, -1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 0F, i, -2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 1F, i, 1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, 1F, i, -1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, -1F, i, 1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_element, 0, -1F, i, -1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, 2F, i, 1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, 2F, i, -1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, 1F, i, 2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, -1F, i, 2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, -2F, i, 1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, -2F, i, -1F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, 1F, i, -2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_cooler, 0, -1F, i, -2F);
|
||||
for(int j = -1; j < 2; j++) {
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, 3F, i, j);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, j, i, 3F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, -3F, i, j);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, j, i, -3F);
|
||||
}
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, 2F, i, 2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, 2F, i, -2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, -2F, i, 2F);
|
||||
SmallBlockPronter.drawSmolBlockAt(ModBlocks.watz_end, 0, -2F, i, -2F);
|
||||
}
|
||||
|
||||
SmallBlockPronter.draw();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -2,12 +2,16 @@ package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderWatzPump extends TileEntitySpecialRenderer {
|
||||
public class RenderWatzPump extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
|
||||
@ -26,4 +30,25 @@ public class RenderWatzPump extends TileEntitySpecialRenderer {
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.watz_pump);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -1.5, 0);
|
||||
double scale = 5;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.watz_pump_tex);
|
||||
ResourceManager.watz_pump.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,19 +2,26 @@ package com.hbm.render.util;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class SmallBlockPronter {
|
||||
|
||||
static float pixel = 1F/16F;
|
||||
|
||||
/**
|
||||
* Bind the required texture yourself bruh
|
||||
* Bind the required texture yourself bruh <- ding dong, 2023 bob speaking, fuck this guy
|
||||
* @param loc
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
*/
|
||||
@Deprecated @Spaghetti("this is horseshit")
|
||||
public static void renderSmolBlockAt(float x, float y, float z) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x - 1, y - 1, z);
|
||||
@ -64,4 +71,65 @@ public class SmallBlockPronter {
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
public static void startDrawing() {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
}
|
||||
|
||||
public static void draw() {
|
||||
Tessellator.instance.draw();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
public static void drawSmolBlockAt(Block b, int meta, float x, float y, float z) {
|
||||
|
||||
Tessellator tesseract = Tessellator.instance;
|
||||
IIcon iconTop = b.getIcon(ForgeDirection.UP.ordinal(), meta);
|
||||
IIcon iconBottom = b.getIcon(ForgeDirection.DOWN.ordinal(), meta);
|
||||
IIcon iconNorth = b.getIcon(ForgeDirection.NORTH.ordinal(), meta);
|
||||
IIcon iconSouth = b.getIcon(ForgeDirection.SOUTH.ordinal(), meta);
|
||||
IIcon iconEast = b.getIcon(ForgeDirection.EAST.ordinal(), meta);
|
||||
IIcon iconWest = b.getIcon(ForgeDirection.WEST.ordinal(), meta);
|
||||
|
||||
tesseract.setNormal(0F, 1F, 0F);
|
||||
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconSouth.getMaxU(), iconSouth.getMinV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconSouth.getMinU(), iconSouth.getMinV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconSouth.getMinU(), iconSouth.getMaxV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconSouth.getMaxU(), iconSouth.getMaxV());
|
||||
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 11 * pixel / 2, iconEast.getMaxU(), iconEast.getMinV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconEast.getMinU(), iconEast.getMinV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconEast.getMinU(), iconEast.getMaxV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 11 * pixel / 2, z + 11 * pixel / 2, iconEast.getMaxU(), iconEast.getMaxV());
|
||||
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 11 * pixel / 2, iconNorth.getMaxU(), iconNorth.getMinV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 11 * pixel / 2, iconNorth.getMinU(), iconNorth.getMinV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2,y + 11 * pixel / 2, z + 11 * pixel / 2, iconNorth.getMinU(), iconNorth.getMaxV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 11 * pixel / 2, z + 11 * pixel / 2, iconNorth.getMaxU(), iconNorth.getMaxV());
|
||||
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconWest.getMaxU(), iconWest.getMinV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 11 * pixel / 2, iconWest.getMinU(), iconWest.getMinV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 11 * pixel / 2, z + 11 * pixel / 2, iconWest.getMinU(), iconWest.getMaxV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconWest.getMaxU(), iconWest.getMaxV());
|
||||
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 11 * pixel / 2, iconTop.getMaxU(), iconTop.getMinV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 11 * pixel / 2, iconTop.getMinU(), iconTop.getMinV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconTop.getMinU(), iconTop.getMaxV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 1 - 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconTop.getMaxU(), iconTop.getMaxV());
|
||||
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 11 * pixel / 2, z + 11 * pixel / 2, iconBottom.getMaxU(), iconBottom.getMinV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 11 * pixel / 2, z + 11 * pixel / 2, iconBottom.getMinU(), iconBottom.getMinV());
|
||||
tesseract.addVertexWithUV(x + 1 - 11 * pixel / 2, y + 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconBottom.getMinU(), iconBottom.getMaxV());
|
||||
tesseract.addVertexWithUV(x + 11 * pixel / 2, y + 11 * pixel / 2, z + 1 - 11 * pixel / 2, iconBottom.getMaxU(), iconBottom.getMaxV());
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,6 +168,7 @@ public class TileMappings {
|
||||
put(TileEntityMachineFENSU.class, "tileentity_fensu");
|
||||
put(TileEntityTrappedBrick.class, "tileentity_trapped_brick");
|
||||
put(TileEntityPlasmaStruct.class, "tileentity_plasma_struct");
|
||||
put(TileEntityWatzStruct.class, "tileentity_watz_struct");
|
||||
put(TileEntityHadronDiode.class, "tileentity_hadron_diode");
|
||||
put(TileEntityHadronPower.class, "tileentity_hadron_power");
|
||||
put(TileEntityHadron.class, "tileentity_hadron");
|
||||
|
||||
@ -29,6 +29,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
@ -41,6 +42,7 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
||||
public double fluxLastBase; //flux created by the previous passive emission, only used for display
|
||||
public double fluxLastReaction; //flux created by the previous reaction, used for the next reaction
|
||||
public double fluxDisplay;
|
||||
public boolean isOn;
|
||||
|
||||
/* lock types for item IO */
|
||||
public boolean isLocked = false;
|
||||
@ -106,22 +108,23 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
||||
segment.updateReaction(above, sharedTanks, turnedOn);
|
||||
}
|
||||
|
||||
/* send sync packets (order doesn't matter) */
|
||||
for(TileEntityWatz segment : segments) {
|
||||
segment.isOn = turnedOn;
|
||||
segment.sendPacket(sharedTanks);
|
||||
segment.heat *= 0.99; //cool 1% per tick
|
||||
}
|
||||
|
||||
/* re-distribute fluid from shared tanks back into actual tanks, bottom to top */
|
||||
for(int i = segments.size() - 1; i >= 0; i--) {
|
||||
TileEntityWatz segment = segments.get(i);
|
||||
for(int j = 0; j < 3; j++) {
|
||||
int min = Math.min(segment.tanks[j].getMaxFill(), sharedTanks[j].getFill());
|
||||
segment.tanks[j].setFill(min);
|
||||
sharedTanks[j].setFill(sharedTanks[j].getFill() - min);
|
||||
segment.tanks[j].setFill(min);
|
||||
}
|
||||
}
|
||||
|
||||
/* send sync packets (order doesn't matter) */
|
||||
for(TileEntityWatz segment : segments) {
|
||||
segment.sendPacket(sharedTanks);
|
||||
segment.heat *= 0.99; //cool 1% per tick
|
||||
}
|
||||
|
||||
segments.get(segments.size() - 1).sendOutBottom();
|
||||
}
|
||||
}
|
||||
@ -150,8 +153,8 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
||||
|
||||
int cycles = Math.min(heatCycles, Math.min(hotCycles, coolCycles));
|
||||
this.heat -= cycles * step.heatReq;
|
||||
tanks[0].setFill(tanks[0].getFill() - coolCycles * step.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + hotCycles * step.amountProduced);
|
||||
tanks[0].setFill(tanks[0].getFill() - cycles * step.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + cycles * step.amountProduced);
|
||||
}
|
||||
|
||||
/** enforces strict top to bottom update order (instead of semi-random based on placement) */
|
||||
@ -244,12 +247,25 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("heat", this.heat);
|
||||
data.setBoolean("isOn", isOn);
|
||||
data.setBoolean("lock", isLocked);
|
||||
data.setDouble("flux", this.fluxLastReaction + this.fluxLastBase);
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].writeToNBT(data, "t" + i);
|
||||
}
|
||||
this.networkPack(data, 25);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.heat = nbt.getInteger("heat");
|
||||
this.isOn = nbt.getBoolean("isOn");
|
||||
this.isLocked = nbt.getBoolean("lock");
|
||||
this.fluxDisplay = nbt.getDouble("flux");
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].readFromNBT(nbt, "t" + i);
|
||||
}
|
||||
}
|
||||
|
||||
/** Prevent manual updates when another segment is above this one */
|
||||
public boolean updateLock() {
|
||||
@ -281,14 +297,49 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
||||
new DirPos(xCoord, yCoord - 1, zCoord - 2, ForgeDirection.DOWN)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.heat = nbt.getInteger("heat");
|
||||
this.fluxDisplay = nbt.getDouble("flux");
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].readFromNBT(nbt, "t" + i);
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
NBTTagList list = nbt.getTagList("locks", 10);
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++) {
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length) {
|
||||
locks[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) tanks[i].readFromNBT(nbt, "t" + i);
|
||||
this.fluxLastBase = nbt.getDouble("lastFluxB");
|
||||
this.fluxLastReaction = nbt.getDouble("lastFluxR");
|
||||
|
||||
this.isLocked = nbt.getBoolean("isLocked");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < locks.length; i++) {
|
||||
if(locks[i] != null) {
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte) i);
|
||||
locks[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("locks", list);
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) tanks[i].writeToNBT(nbt, "t" + i);
|
||||
nbt.setDouble("lastFluxB", fluxLastBase);
|
||||
nbt.setDouble("lastFluxR", fluxLastReaction);
|
||||
|
||||
nbt.setBoolean("isLocked", isLocked);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,104 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.Watz;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityWatzStruct extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(worldObj.isRemote) return;
|
||||
if(worldObj.getTotalWorldTime() % 20 != 0) return;
|
||||
|
||||
/*
|
||||
* skeptics may say that his is shit. i don't necessarily disagree, but it was both easy and quick to do
|
||||
* and it remains readable and not terribly long, so who the fuck cares.
|
||||
*/
|
||||
if(!cbr(ModBlocks.watz_cooler, 0, 1, 0)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, 0, 2, 0)) return;
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
if(!cbr(ModBlocks.watz_element, 1, i, 0)) return;
|
||||
if(!cbr(ModBlocks.watz_element, 2, i, 0)) return;
|
||||
if(!cbr(ModBlocks.watz_element, 0, i, 1)) return;
|
||||
if(!cbr(ModBlocks.watz_element, 0, i, 2)) return;
|
||||
if(!cbr(ModBlocks.watz_element, -1, i, 0)) return;
|
||||
if(!cbr(ModBlocks.watz_element, -2, i, 0)) return;
|
||||
if(!cbr(ModBlocks.watz_element, 0, i, -1)) return;
|
||||
if(!cbr(ModBlocks.watz_element, 0, i, -2)) return;
|
||||
if(!cbr(ModBlocks.watz_element, 1, i, 1)) return;
|
||||
if(!cbr(ModBlocks.watz_element, 1, i, -1)) return;
|
||||
if(!cbr(ModBlocks.watz_element, -1, i, 1)) return;
|
||||
if(!cbr(ModBlocks.watz_element, -1, i, -1)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, 2, i, 1)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, 2, i, -1)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, 1, i, 2)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, -1, i, 2)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, -2, i, 1)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, -2, i, -1)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, 1, i, -2)) return;
|
||||
if(!cbr(ModBlocks.watz_cooler, -1, i, -2)) return;
|
||||
|
||||
for(int j = -1; j < 2; j++) {
|
||||
if(!cbr(ModBlocks.watz_end, 3, i, j)) return;
|
||||
if(!cbr(ModBlocks.watz_end, j, i, 3)) return;
|
||||
if(!cbr(ModBlocks.watz_end, -3, i, j)) return;
|
||||
if(!cbr(ModBlocks.watz_end, j, i, -3)) return;
|
||||
}
|
||||
if(!cbr(ModBlocks.watz_end, 2, i, 2)) return;
|
||||
if(!cbr(ModBlocks.watz_end, 2, i, -2)) return;
|
||||
if(!cbr(ModBlocks.watz_end, -2, i, 2)) return;
|
||||
if(!cbr(ModBlocks.watz_end, -2, i, -2)) return;
|
||||
}
|
||||
|
||||
Watz watz = (Watz)ModBlocks.watz;
|
||||
BlockDummyable.safeRem = true;
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.watz, this.getBlockMetadata() + BlockDummyable.offset, 3);
|
||||
watz.fillSpace(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, 0);
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
/** [G]et [B]lock at [R]elative position */
|
||||
private Block gbr(int x, int y, int z) {
|
||||
return worldObj.getBlock(xCoord + x, yCoord + y, zCoord + z);
|
||||
}
|
||||
|
||||
/** [C]heck [B]lock at [R]elative position */
|
||||
private boolean cbr(Block b, int x, int y, int z) {
|
||||
return b == gbr(x, y, z);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 3,
|
||||
yCoord,
|
||||
zCoord - 3,
|
||||
xCoord + 4,
|
||||
yCoord + 3,
|
||||
zCoord + 4
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 549 B |
Binary file not shown.
|
After Width: | Height: | Size: 587 B |
BIN
src/main/resources/assets/hbm/textures/blocks/vent.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/vent.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 547 B |
BIN
src/main/resources/assets/hbm/textures/blocks/vent_side.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/vent_side.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 607 B |
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Loading…
x
Reference in New Issue
Block a user