metadata canisters, more leaded fuels, more certus quartz yield
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.FluidType.ExtContainer;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
@ -84,6 +85,9 @@ public class FluidContainerRegistry {
|
||||
|
||||
FluidType type = fluids[i];
|
||||
|
||||
if(type.containers.contains(ExtContainer.CANISTER))
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.canister_full, 1, i), new ItemStack(ModItems.canister_empty), Fluids.fromID(i), 1000));
|
||||
|
||||
if(type.hasNoContainer())
|
||||
continue;
|
||||
|
||||
|
||||
@ -2,7 +2,9 @@ package com.hbm.inventory.fluid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -18,6 +20,7 @@ public class FluidType {
|
||||
private int id;
|
||||
//Approximate HEX Color of the fluid, used for pipe rendering
|
||||
private int color;
|
||||
private int containerColor = 0xffffff;
|
||||
//Unlocalized string ID of the fluid
|
||||
private String unlocalized;
|
||||
|
||||
@ -26,6 +29,7 @@ public class FluidType {
|
||||
public int reactivity;
|
||||
public EnumSymbol symbol;
|
||||
public int temperature;
|
||||
public Set<ExtContainer> containers = new HashSet();
|
||||
public List<FluidTrait> traits = new ArrayList();
|
||||
private String stringId;
|
||||
|
||||
@ -57,6 +61,12 @@ public class FluidType {
|
||||
return this;
|
||||
}
|
||||
|
||||
public FluidType addContainers(int color, ExtContainer... containers) {
|
||||
this.containerColor = color;
|
||||
Collections.addAll(this.containers, containers);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FluidType addTraits(FluidTrait... traits) {
|
||||
Collections.addAll(this.traits, traits);
|
||||
return this;
|
||||
@ -73,6 +83,10 @@ public class FluidType {
|
||||
public int getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
public int getContainerColor() {
|
||||
return this.containerColor;
|
||||
}
|
||||
public ResourceLocation getTexture() {
|
||||
return this.texture;
|
||||
}
|
||||
@ -145,6 +159,10 @@ public class FluidType {
|
||||
NO_ID;
|
||||
}
|
||||
|
||||
public static enum ExtContainer {
|
||||
CANISTER
|
||||
}
|
||||
|
||||
//shitty wrapper delegates, go!
|
||||
//only used for compatibility purposes, these will be removed soon
|
||||
//don't use these, dumbfuck
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType.ExtContainer;
|
||||
import com.hbm.inventory.fluid.FluidType.FluidTrait;
|
||||
import com.hbm.inventory.fluid.FluidTypeCombustible.FuelGrade;
|
||||
import com.hbm.render.util.EnumSymbol;
|
||||
@ -30,7 +31,6 @@ public class Fluids {
|
||||
public static FluidType SMEAR;
|
||||
public static FluidType HEATINGOIL;
|
||||
public static FluidType RECLAIMED;
|
||||
public static FluidType PETROIL;
|
||||
public static FluidType LUBRICANT;
|
||||
public static FluidType NAPHTHA;
|
||||
public static FluidType NAPHTHA_CRACK;
|
||||
@ -64,8 +64,12 @@ public class Fluids {
|
||||
public static FluidType PAIN; //tantalite solution
|
||||
public static FluidType WASTEFLUID;
|
||||
public static FluidType WASTEGAS;
|
||||
public static FluidType GASOLINE; //gasoline, leaded
|
||||
public static FluidType PETROIL;
|
||||
public static FluidType PETROIL_LEADED;
|
||||
public static FluidType GASOLINE;
|
||||
public static FluidType GASOLINE_LEADED;
|
||||
public static FluidType COALGAS; //coal-based gasoline
|
||||
public static FluidType COALGAS_LEADED;
|
||||
public static FluidType SPENTSTEAM;
|
||||
public static FluidType FRACKSOL;
|
||||
public static FluidType PLASMA_DT;
|
||||
@ -112,12 +116,12 @@ public class Fluids {
|
||||
LAVA = new FluidType( "LAVA", 0xFF3300, 4, 0, 0, EnumSymbol.NOWATER).setTemp(1200);
|
||||
DEUTERIUM = new FluidTypeCombustible( "DEUTERIUM", 0x0000FF, 3, 4, 0, EnumSymbol.NONE);
|
||||
TRITIUM = new FluidTypeCombustible( "TRITIUM", 0x000099, 3, 4, 0, EnumSymbol.RADIATION);
|
||||
OIL = new FluidTypeFlammable( "OIL", 0x020202, 2, 1, 0, EnumSymbol.NONE);
|
||||
OIL = new FluidTypeFlammable( "OIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(0x101010, ExtContainer.CANISTER);
|
||||
HOTOIL = new FluidTypeFlammable( "HOTOIL", 0x300900, 2, 3, 0, EnumSymbol.NONE).setTemp(350);
|
||||
HEAVYOIL = new FluidTypeFlammable( "HEAVYOIL", 0x141312, 2, 1, 0, EnumSymbol.NONE);
|
||||
BITUMEN = new FluidType( "BITUMEN", 0x1f2426, 2, 0, 0, EnumSymbol.NONE);
|
||||
SMEAR = new FluidTypeFlammable( "SMEAR", 0x190f01, 2, 1, 0, EnumSymbol.NONE);
|
||||
HEATINGOIL = new FluidTypeCombustible( "HEATINGOIL", 0x211806, 2, 2, 0, EnumSymbol.NONE);
|
||||
HEAVYOIL = new FluidTypeFlammable( "HEAVYOIL", 0x141312, 2, 1, 0, EnumSymbol.NONE).addContainers(0x808000, ExtContainer.CANISTER);
|
||||
BITUMEN = new FluidType( "BITUMEN", 0x1f2426, 2, 0, 0, EnumSymbol.NONE).addContainers(0x101080, ExtContainer.CANISTER);
|
||||
SMEAR = new FluidTypeFlammable( "SMEAR", 0x190f01, 2, 1, 0, EnumSymbol.NONE).addContainers(0x808030, ExtContainer.CANISTER);
|
||||
HEATINGOIL = new FluidTypeCombustible( "HEATINGOIL", 0x211806, 2, 2, 0, EnumSymbol.NONE).addContainers(0x404000, ExtContainer.CANISTER); //TODO: and so forth
|
||||
RECLAIMED = new FluidTypeCombustible( "RECLAIMED", 0x332b22, 2, 2, 0, EnumSymbol.NONE);
|
||||
PETROIL = new FluidTypeCombustible( "PETROIL", 0x44413d, 1, 3, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 300_000);
|
||||
LUBRICANT = new FluidType( "LUBRICANT", 0x606060, 2, 1, 0, EnumSymbol.NONE);
|
||||
@ -148,7 +152,7 @@ public class Fluids {
|
||||
PAIN = new FluidType( "PAIN", 0x938541, 2, 0, 1, EnumSymbol.ACID).setTemp(300).addTraits(FluidTrait.CORROSIVE);
|
||||
WASTEFLUID = new FluidType( "WASTEFLUID", 0x544400, 2, 0, 1, EnumSymbol.RADIATION).addTraits(FluidTrait.NO_CONTAINER);
|
||||
WASTEGAS = new FluidType( "WASTEGAS", 0xB8B8B8, 2, 0, 1, EnumSymbol.RADIATION).addTraits(FluidTrait.NO_CONTAINER);
|
||||
GASOLINE = new FluidTypeCombustible( "GASOLINE", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_500_000);
|
||||
GASOLINE = new FluidTypeCombustible( "GASOLINE", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_000_000);
|
||||
COALGAS = new FluidTypeCombustible( "COALGAS", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 150_000);
|
||||
SPENTSTEAM = new FluidType( "SPENTSTEAM", 0x445772, 2, 0, 0, EnumSymbol.NONE).addTraits(FluidTrait.NO_CONTAINER);
|
||||
FRACKSOL = new FluidType( "FRACKSOL", 0x798A6B, 1, 3, 3, EnumSymbol.ACID).addTraits(FluidTrait.CORROSIVE);
|
||||
@ -174,6 +178,9 @@ public class Fluids {
|
||||
SALIENT = new FluidType(69, "SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE);
|
||||
XPJUICE = new FluidType( "XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE);
|
||||
ENDERJUICE = new FluidType( "ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE);
|
||||
PETROIL_LEADED = new FluidTypeCombustible( "PETROIL_LEADED", 0x44413d, 1, 3, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 450_000);
|
||||
GASOLINE_LEADED = new FluidTypeCombustible( "GASOLINE_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_500_000);
|
||||
COALGAS_LEADED = new FluidTypeCombustible( "COALGAS_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 250_000);
|
||||
|
||||
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
@ -230,8 +237,11 @@ public class Fluids {
|
||||
metaOrder.add(DIESEL_CRACK);
|
||||
metaOrder.add(KEROSENE);
|
||||
metaOrder.add(PETROIL);
|
||||
metaOrder.add(PETROIL_LEADED);
|
||||
metaOrder.add(GASOLINE);
|
||||
metaOrder.add(GASOLINE_LEADED);
|
||||
metaOrder.add(COALGAS);
|
||||
metaOrder.add(COALGAS_LEADED);
|
||||
metaOrder.add(BIOGAS);
|
||||
metaOrder.add(BIOFUEL);
|
||||
metaOrder.add(ETHANOL);
|
||||
|
||||
@ -279,12 +279,13 @@ public class CentrifugeRecipes {
|
||||
|
||||
if(quartz != null && !quartz.isEmpty()) {
|
||||
ItemStack qItem = quartz.get(0).copy();
|
||||
qItem.stackSize = 2;
|
||||
|
||||
recipes.put("oreCertusQuartz", new ItemStack[] {
|
||||
qItem,
|
||||
qItem,
|
||||
qItem,
|
||||
qItem });
|
||||
qItem.copy(),
|
||||
qItem.copy(),
|
||||
qItem.copy(),
|
||||
qItem.copy() });
|
||||
}
|
||||
|
||||
recipes.put(new ComparableStack(Items.blaze_rod), new ItemStack[] {new ItemStack(Items.blaze_powder, 1), new ItemStack(Items.blaze_powder, 1), new ItemStack(ModItems.powder_fire, 1), new ItemStack(ModItems.powder_fire, 1) });
|
||||
|
||||
@ -275,10 +275,21 @@ public class ChemplantRecipes {
|
||||
new FluidStack(Fluids.PETROLEUM, 100),
|
||||
new FluidStack(Fluids.STEAM, 1000))
|
||||
.outputItems(new ItemStack(ModItems.antiknock)));
|
||||
recipes.add(new ChemRecipe(71, "GASOLINE", 40)
|
||||
recipes.add(new ChemRecipe(86, "PETROIL_LEADED", 40)
|
||||
.inputItems(new ComparableStack(ModItems.antiknock))
|
||||
.inputFluids(new FluidStack(Fluids.PETROIL, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.GASOLINE, 12_000)));
|
||||
.outputFluids(new FluidStack(Fluids.PETROIL_LEADED, 12_000)));
|
||||
recipes.add(new ChemRecipe(71, "GASOLINE", 40)
|
||||
.inputFluids(new FluidStack(Fluids.NAPHTHA, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.GASOLINE, 800)));
|
||||
recipes.add(new ChemRecipe(85, "GASOLINE_LEADED", 40)
|
||||
.inputItems(new ComparableStack(ModItems.antiknock))
|
||||
.inputFluids(new FluidStack(Fluids.GASOLINE, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.GASOLINE_LEADED, 12_000)));
|
||||
recipes.add(new ChemRecipe(87, "COALGAS_LEADED", 40)
|
||||
.inputItems(new ComparableStack(ModItems.antiknock))
|
||||
.inputFluids(new FluidStack(Fluids.COALGAS, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.COALGAS_LEADED, 12_000)));
|
||||
recipes.add(new ChemRecipe(72, "FRACKSOL", 20)
|
||||
.inputItems(new OreDictStack(S.dust()))
|
||||
.inputFluids(
|
||||
|
||||
@ -89,7 +89,7 @@ public class CrystallizerRecipes {
|
||||
|
||||
if(quartz != null && !quartz.isEmpty()) {
|
||||
ItemStack qItem = quartz.get(0).copy();
|
||||
qItem.stackSize = 6;
|
||||
qItem.stackSize = 12;
|
||||
recipes.put("oreCertusQuartz", qItem);
|
||||
}
|
||||
|
||||
|
||||
@ -848,8 +848,9 @@ public class ModItems {
|
||||
public static Item inf_water_mk2;
|
||||
|
||||
public static Item antiknock;
|
||||
|
||||
|
||||
public static Item canister_empty;
|
||||
public static Item canister_full;
|
||||
public static Item canister_smear;
|
||||
public static Item canister_canola;
|
||||
public static Item canister_oil;
|
||||
@ -3276,24 +3277,25 @@ public class ModItems {
|
||||
antiknock = new Item().setUnlocalizedName("antiknock").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":antiknock");
|
||||
|
||||
canister_empty = new ItemCustomLore().setUnlocalizedName("canister_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":canister_empty");
|
||||
canister_smear = new ItemCustomLore().setUnlocalizedName("canister_smear").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_smear");
|
||||
canister_canola = new ItemCustomLore().setUnlocalizedName("canister_canola").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_canola");
|
||||
canister_oil = new ItemCustomLore().setUnlocalizedName("canister_oil").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_oil");
|
||||
canister_fuel = new ItemCustomLore().setUnlocalizedName("canister_fuel").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fuel");
|
||||
canister_kerosene = new ItemCustomLore().setUnlocalizedName("canister_kerosene").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_kerosene");
|
||||
canister_reoil = new ItemCustomLore().setUnlocalizedName("canister_reoil").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_reoil");
|
||||
canister_petroil = new ItemCustomLore().setUnlocalizedName("canister_petroil").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_petroil");
|
||||
canister_napalm = new ItemCustomLore().setUnlocalizedName("canister_napalm").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_napalm");
|
||||
canister_gasoline = new ItemCustomLore().setUnlocalizedName("canister_gasoline").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_gasoline");
|
||||
canister_fracksol = new ItemCustomLore().setUnlocalizedName("canister_fracksol").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fracksol");
|
||||
canister_NITAN = new ItemCustomLore().setUnlocalizedName("canister_NITAN").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_superfuel");
|
||||
canister_heavyoil = new ItemCustomLore().setUnlocalizedName("canister_heavyoil").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_heavyoil");
|
||||
canister_bitumen = new ItemCustomLore().setUnlocalizedName("canister_bitumen").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_bitumen");
|
||||
canister_heatingoil = new ItemCustomLore().setUnlocalizedName("canister_heatingoil").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_heatingoil");
|
||||
canister_naphtha = new ItemCustomLore().setUnlocalizedName("canister_naphtha").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_naphtha");
|
||||
canister_lightoil = new ItemCustomLore().setUnlocalizedName("canister_lightoil").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_lightoil");
|
||||
canister_biofuel = new ItemCustomLore().setUnlocalizedName("canister_biofuel").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_biofuel");
|
||||
canister_ethanol = new ItemCustomLore().setUnlocalizedName("canister_ethanol").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_ethanol");
|
||||
canister_full = new ItemCanister().setUnlocalizedName("canister_full").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_full");
|
||||
canister_smear = new ItemCustomLore().setUnlocalizedName("canister_smear").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_smear");
|
||||
canister_canola = new ItemCustomLore().setUnlocalizedName("canister_canola").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_canola");
|
||||
canister_oil = new ItemCustomLore().setUnlocalizedName("canister_oil").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_oil");
|
||||
canister_fuel = new ItemCustomLore().setUnlocalizedName("canister_fuel").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fuel");
|
||||
canister_kerosene = new ItemCustomLore().setUnlocalizedName("canister_kerosene").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_kerosene");
|
||||
canister_reoil = new ItemCustomLore().setUnlocalizedName("canister_reoil").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_reoil");
|
||||
canister_petroil = new ItemCustomLore().setUnlocalizedName("canister_petroil").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_petroil");
|
||||
canister_napalm = new ItemCustomLore().setUnlocalizedName("canister_napalm").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_napalm");
|
||||
canister_gasoline = new ItemCustomLore().setUnlocalizedName("canister_gasoline").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_gasoline");
|
||||
canister_fracksol = new ItemCustomLore().setUnlocalizedName("canister_fracksol").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fracksol");
|
||||
canister_NITAN = new ItemCustomLore().setUnlocalizedName("canister_NITAN").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_superfuel");
|
||||
canister_heavyoil = new ItemCustomLore().setUnlocalizedName("canister_heavyoil").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_heavyoil");
|
||||
canister_bitumen = new ItemCustomLore().setUnlocalizedName("canister_bitumen").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_bitumen");
|
||||
canister_heatingoil = new ItemCustomLore().setUnlocalizedName("canister_heatingoil").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_heatingoil");
|
||||
canister_naphtha = new ItemCustomLore().setUnlocalizedName("canister_naphtha").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_naphtha");
|
||||
canister_lightoil = new ItemCustomLore().setUnlocalizedName("canister_lightoil").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_lightoil");
|
||||
canister_biofuel = new ItemCustomLore().setUnlocalizedName("canister_biofuel").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_biofuel");
|
||||
canister_ethanol = new ItemCustomLore().setUnlocalizedName("canister_ethanol").setCreativeTab(null).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_ethanol");
|
||||
gas_empty = new Item().setUnlocalizedName("gas_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":gas_empty");
|
||||
gas_full = new Item().setUnlocalizedName("gas_full").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.gas_empty).setTextureName(RefStrings.MODID + ":gas_full");
|
||||
gas_petroleum = new Item().setUnlocalizedName("gas_petroleum").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.gas_empty).setTextureName(RefStrings.MODID + ":gas_petroleum");
|
||||
|
||||
74
src/main/java/com/hbm/items/machine/ItemCanister.java
Normal file
@ -0,0 +1,74 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.FluidType.ExtContainer;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemCanister extends Item {
|
||||
|
||||
IIcon overlayIcon;
|
||||
|
||||
public ItemCanister() {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
|
||||
FluidType[] order = Fluids.getInNiceOrder();
|
||||
for(int i = 1; i < order.length; ++i) {
|
||||
FluidType type = order[i];
|
||||
|
||||
if(type.containers.contains(ExtContainer.CANISTER)) {
|
||||
list.add(new ItemStack(item, 1, type.getID()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
super.registerIcons(reg);
|
||||
this.overlayIcon = reg.registerIcon("hbm:canister_overlay");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int p_77618_1_, int p_77618_2_) {
|
||||
return p_77618_2_ == 1 ? this.overlayIcon : super.getIconFromDamageForRenderPass(p_77618_1_, p_77618_2_);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int p_82790_2_) {
|
||||
if(p_82790_2_ == 0) {
|
||||
return 16777215;
|
||||
} else {
|
||||
int j = Fluids.fromID(stack.getItemDamage()).getContainerColor();
|
||||
|
||||
if(j < 0) {
|
||||
j = 16777215;
|
||||
}
|
||||
|
||||
return j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -549,7 +549,7 @@ public class ModEventHandlerClient {
|
||||
int breeder = TileEntityNukeFurnace.getFuelValue(stack);
|
||||
|
||||
if(breeder != 0) {
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.furnace", (breeder * 5)));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.furnace", breeder));
|
||||
}
|
||||
|
||||
/// CUSTOM NUKE ///
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/gui/fluids/coalgas.png
Normal file
|
After Width: | Height: | Size: 501 B |
|
After Width: | Height: | Size: 548 B |
BIN
src/main/resources/assets/hbm/textures/gui/fluids/coaloil.png
Normal file
|
After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 591 B |
|
After Width: | Height: | Size: 641 B |
|
After Width: | Height: | Size: 514 B |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 592 B |
|
After Width: | Height: | Size: 591 B |
|
After Width: | Height: | Size: 581 B |