mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
salient green: the wonder of life in liquid, sticky form
This commit is contained in:
parent
274262436d
commit
9002a295df
@ -79,6 +79,7 @@ public class Fluids {
|
|||||||
public static FluidType DEATH; //osmiridium solution
|
public static FluidType DEATH; //osmiridium solution
|
||||||
public static FluidType ETHANOL;
|
public static FluidType ETHANOL;
|
||||||
public static FluidType HEAVYWATER;
|
public static FluidType HEAVYWATER;
|
||||||
|
public static FluidType SALIENT;
|
||||||
|
|
||||||
private static final HashMap<Integer, FluidType> idMapping = new HashMap();
|
private static final HashMap<Integer, FluidType> idMapping = new HashMap();
|
||||||
private static final HashMap<String, FluidType> nameMapping = new HashMap();
|
private static final HashMap<String, FluidType> nameMapping = new HashMap();
|
||||||
@ -168,6 +169,7 @@ public class Fluids {
|
|||||||
DIESEL_CRACK = new FluidTypeCombustible( "DIESEL_CRACK", 0xf2eed5, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 450_000);
|
DIESEL_CRACK = new FluidTypeCombustible( "DIESEL_CRACK", 0xf2eed5, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 450_000);
|
||||||
AROMATICS = new FluidTypeFlammable( "AROMATICS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE);
|
AROMATICS = new FluidTypeFlammable( "AROMATICS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE);
|
||||||
UNSATURATEDS = new FluidTypeFlammable( "UNSATURATEDS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE);
|
UNSATURATEDS = new FluidTypeFlammable( "UNSATURATEDS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE);
|
||||||
|
SALIENT = new FluidType( "SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE);
|
||||||
|
|
||||||
|
|
||||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||||
@ -205,7 +207,6 @@ public class Fluids {
|
|||||||
metaOrder.add(COALOIL);
|
metaOrder.add(COALOIL);
|
||||||
metaOrder.add(HOTOIL);
|
metaOrder.add(HOTOIL);
|
||||||
metaOrder.add(HOTCRACKOIL);
|
metaOrder.add(HOTCRACKOIL);
|
||||||
//metaOrder.add(HOTCOALOIL);
|
|
||||||
metaOrder.add(HEAVYOIL);
|
metaOrder.add(HEAVYOIL);
|
||||||
metaOrder.add(NAPHTHA);
|
metaOrder.add(NAPHTHA);
|
||||||
metaOrder.add(NAPHTHA_CRACK);
|
metaOrder.add(NAPHTHA_CRACK);
|
||||||
@ -233,6 +234,7 @@ public class Fluids {
|
|||||||
metaOrder.add(NITAN);
|
metaOrder.add(NITAN);
|
||||||
metaOrder.add(BALEFIRE);
|
metaOrder.add(BALEFIRE);
|
||||||
//processing fluids
|
//processing fluids
|
||||||
|
metaOrder.add(SALIENT);
|
||||||
metaOrder.add(ACID);
|
metaOrder.add(ACID);
|
||||||
metaOrder.add(UF6);
|
metaOrder.add(UF6);
|
||||||
metaOrder.add(PUF6);
|
metaOrder.add(PUF6);
|
||||||
|
|||||||
@ -4,12 +4,17 @@ import org.lwjgl.opengl.GL11;
|
|||||||
|
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.container.ContainerMachineRefinery;
|
import com.hbm.inventory.container.ContainerMachineRefinery;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.packet.NBTControlPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;
|
import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineRefinery extends GuiInfoContainer {
|
public class GUIMachineRefinery extends GuiInfoContainer {
|
||||||
@ -37,6 +42,18 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 70 - 52, 16, 52, refinery.power, refinery.maxPower);
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 70 - 52, 16, 52, refinery.power, refinery.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClicked(int x, int y, int i) {
|
||||||
|
super.mouseClicked(x, y, i);
|
||||||
|
|
||||||
|
if(guiLeft + 64 <= x && guiLeft + 76 > x && guiTop + 20 < y && guiTop + 46 >= y) {
|
||||||
|
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
data.setBoolean("toggle", true); //we only need to send one bit, so boolean it is
|
||||||
|
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, refinery.xCoord, refinery.yCoord, refinery.zCoord));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.refinery.hasCustomInventoryName() ? this.refinery.getInventoryName() : I18n.format(this.refinery.getInventoryName());
|
String name = this.refinery.hasCustomInventoryName() ? this.refinery.getInventoryName() : I18n.format(this.refinery.getInventoryName());
|
||||||
@ -51,6 +68,9 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||||
|
|
||||||
|
if(refinery.tanks[0].getTankType() == Fluids.HOTCRACKOIL)
|
||||||
|
drawTexturedModalRect(guiLeft + 64, guiTop + 20, 192, 0, 12, 26);
|
||||||
|
|
||||||
int j = (int)refinery.getPowerScaled(52);
|
int j = (int)refinery.getPowerScaled(52);
|
||||||
drawTexturedModalRect(guiLeft + 8, guiTop + 70 - j, 176, 52 - j, 16, j);
|
drawTexturedModalRect(guiLeft + 8, guiTop + 70 - j, 176, 52 - j, 16, j);
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.machine.ItemCassette;
|
import com.hbm.items.machine.ItemCassette;
|
||||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||||
import com.hbm.items.machine.ItemStamp;
|
import com.hbm.items.machine.ItemStamp;
|
||||||
|
import com.hbm.items.machine.ItemChemistryTemplate.EnumChemistryTemplate;
|
||||||
import com.hbm.items.machine.ItemStamp.StampType;
|
import com.hbm.items.machine.ItemStamp.StampType;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.packet.ItemFolderPacket;
|
import com.hbm.packet.ItemFolderPacket;
|
||||||
@ -80,7 +81,10 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
|||||||
}
|
}
|
||||||
// Chemistry Templates
|
// Chemistry Templates
|
||||||
for(int i = 0; i < ItemChemistryTemplate.EnumChemistryTemplate.values().length; i++) {
|
for(int i = 0; i < ItemChemistryTemplate.EnumChemistryTemplate.values().length; i++) {
|
||||||
allStacks.add(new ItemStack(ModItems.chemistry_template, 1, i));
|
EnumChemistryTemplate chem = EnumChemistryTemplate.getEnum(i);
|
||||||
|
if(!chem.isDisabled()) {
|
||||||
|
allStacks.add(new ItemStack(ModItems.chemistry_template, 1, i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import com.hbm.items.machine.ItemFluidIcon;
|
|||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemFood;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class LiquefactionRecipes {
|
public class LiquefactionRecipes {
|
||||||
@ -62,6 +63,12 @@ public class LiquefactionRecipes {
|
|||||||
return recipes.get(key);
|
return recipes.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(stack.getItem() instanceof ItemFood) {
|
||||||
|
ItemFood food = (ItemFood) stack.getItem();
|
||||||
|
float saturation = food.func_150905_g(stack) * food.func_150906_h(stack) * 20; //food val * saturation mod * 2 (constant) * 10 (quanta)
|
||||||
|
return new FluidStack(Fluids.SALIENT, (int) saturation);
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1190,8 +1190,12 @@ public class MachineRecipes {
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||||
|
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||||
|
|
||||||
switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) {
|
if(chem.isDisabled())
|
||||||
|
return list;
|
||||||
|
|
||||||
|
switch(chem) {
|
||||||
case CC_OIL:
|
case CC_OIL:
|
||||||
list.add(new ItemStack(ModItems.powder_coal, 8));
|
list.add(new ItemStack(ModItems.powder_coal, 8));
|
||||||
list.add(new ItemStack(ModItems.oil_tar, 4));
|
list.add(new ItemStack(ModItems.oil_tar, 4));
|
||||||
@ -1381,7 +1385,12 @@ public class MachineRecipes {
|
|||||||
|
|
||||||
FluidStack[] input = new FluidStack[2];
|
FluidStack[] input = new FluidStack[2];
|
||||||
|
|
||||||
switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) {
|
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||||
|
|
||||||
|
if(chem.isDisabled())
|
||||||
|
return input;
|
||||||
|
|
||||||
|
switch(chem) {
|
||||||
case FP_HEAVYOIL:
|
case FP_HEAVYOIL:
|
||||||
input[0] = new FluidStack(1000, Fluids.HEAVYOIL);
|
input[0] = new FluidStack(1000, Fluids.HEAVYOIL);
|
||||||
break;
|
break;
|
||||||
@ -1639,7 +1648,12 @@ public class MachineRecipes {
|
|||||||
|
|
||||||
ItemStack[] output = new ItemStack[4];
|
ItemStack[] output = new ItemStack[4];
|
||||||
|
|
||||||
switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) {
|
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||||
|
|
||||||
|
if(chem.isDisabled())
|
||||||
|
return output;
|
||||||
|
|
||||||
|
switch(chem) {
|
||||||
case ASPHALT:
|
case ASPHALT:
|
||||||
output[0] = new ItemStack(ModBlocks.asphalt, 4);
|
output[0] = new ItemStack(ModBlocks.asphalt, 4);
|
||||||
output[1] = new ItemStack(ModBlocks.asphalt, 4);
|
output[1] = new ItemStack(ModBlocks.asphalt, 4);
|
||||||
@ -1808,7 +1822,12 @@ public class MachineRecipes {
|
|||||||
|
|
||||||
FluidStack[] output = new FluidStack[2];
|
FluidStack[] output = new FluidStack[2];
|
||||||
|
|
||||||
switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) {
|
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||||
|
|
||||||
|
if(chem.isDisabled())
|
||||||
|
return output;
|
||||||
|
|
||||||
|
switch(chem) {
|
||||||
case FP_HEAVYOIL:
|
case FP_HEAVYOIL:
|
||||||
output[0] = new FluidStack(RefineryRecipes.heavy_frac_bitu * 10, Fluids.BITUMEN);
|
output[0] = new FluidStack(RefineryRecipes.heavy_frac_bitu * 10, Fluids.BITUMEN);
|
||||||
output[1] = new FluidStack(RefineryRecipes.heavy_frac_smear * 10, Fluids.SMEAR);
|
output[1] = new FluidStack(RefineryRecipes.heavy_frac_smear * 10, Fluids.SMEAR);
|
||||||
|
|||||||
@ -119,6 +119,10 @@ public class RefineryRecipes {
|
|||||||
cracking.put(Fluids.KEROSENE, new Pair(new FluidStack(Fluids.PETROLEUM, kero_crack_petro), new FluidStack(Fluids.NONE, 0)));
|
cracking.put(Fluids.KEROSENE, new Pair(new FluidStack(Fluids.PETROLEUM, kero_crack_petro), new FluidStack(Fluids.NONE, 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> getRefinery(FluidType oil) {
|
||||||
|
return refinery.get(oil);
|
||||||
|
}
|
||||||
|
|
||||||
public static Pair<FluidStack, FluidStack> getFractions(FluidType oil) {
|
public static Pair<FluidStack, FluidStack> getFractions(FluidType oil) {
|
||||||
return fractions.get(oil);
|
return fractions.get(oil);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,6 +53,7 @@ public class SolidificationRecipes {
|
|||||||
registerRecipe(LAVA, 1000, Blocks.obsidian);
|
registerRecipe(LAVA, 1000, Blocks.obsidian);
|
||||||
registerRecipe(MERCURY, 125, ModItems.ingot_mercury);
|
registerRecipe(MERCURY, 125, ModItems.ingot_mercury);
|
||||||
registerRecipe(BIOGAS, 250, ModItems.biomass_compressed);
|
registerRecipe(BIOGAS, 250, ModItems.biomass_compressed);
|
||||||
|
registerRecipe(SALIENT, 1280, new ItemStack(ModItems.bio_wafer, 8)); //4 (food val) * 2 (sat mod) * 2 (constant) * 10 (quanta) * 8 (batch size)
|
||||||
|
|
||||||
registerRecipe(OIL, SF_OIL, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE));
|
registerRecipe(OIL, SF_OIL, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE));
|
||||||
registerRecipe(CRACKOIL, SF_OIL, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK));
|
registerRecipe(CRACKOIL, SF_OIL, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK));
|
||||||
|
|||||||
@ -492,6 +492,7 @@ public class ModItems {
|
|||||||
|
|
||||||
public static Item biomass;
|
public static Item biomass;
|
||||||
public static Item biomass_compressed;
|
public static Item biomass_compressed;
|
||||||
|
public static Item bio_wafer;
|
||||||
|
|
||||||
public static Item coil_copper;
|
public static Item coil_copper;
|
||||||
public static Item coil_copper_torus;
|
public static Item coil_copper_torus;
|
||||||
@ -2938,6 +2939,7 @@ public class ModItems {
|
|||||||
|
|
||||||
biomass = new Item().setUnlocalizedName("biomass").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":biomass");
|
biomass = new Item().setUnlocalizedName("biomass").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":biomass");
|
||||||
biomass_compressed = new Item().setUnlocalizedName("biomass_compressed").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":biomass_compressed");
|
biomass_compressed = new Item().setUnlocalizedName("biomass_compressed").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":biomass_compressed");
|
||||||
|
bio_wafer = new ItemLemon(4, 2F, false).setUnlocalizedName("bio_wafer").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bio_wafer");
|
||||||
|
|
||||||
coil_copper = new Item().setUnlocalizedName("coil_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_copper");
|
coil_copper = new Item().setUnlocalizedName("coil_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_copper");
|
||||||
coil_copper_torus = new Item().setUnlocalizedName("coil_copper_torus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_copper_torus");
|
coil_copper_torus = new Item().setUnlocalizedName("coil_copper_torus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_copper_torus");
|
||||||
@ -5884,6 +5886,8 @@ public class ModItems {
|
|||||||
//Things that look like rotten flesh but aren't
|
//Things that look like rotten flesh but aren't
|
||||||
GameRegistry.registerItem(biomass, biomass.getUnlocalizedName());
|
GameRegistry.registerItem(biomass, biomass.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(biomass_compressed, biomass_compressed.getUnlocalizedName());
|
GameRegistry.registerItem(biomass_compressed, biomass_compressed.getUnlocalizedName());
|
||||||
|
//delicious!
|
||||||
|
GameRegistry.registerItem(bio_wafer, bio_wafer.getUnlocalizedName());
|
||||||
|
|
||||||
//Nuggets
|
//Nuggets
|
||||||
GameRegistry.registerItem(nugget_uranium, nugget_uranium.getUnlocalizedName());
|
GameRegistry.registerItem(nugget_uranium, nugget_uranium.getUnlocalizedName());
|
||||||
|
|||||||
@ -36,31 +36,31 @@ public class ItemChemistryTemplate extends Item {
|
|||||||
FP_LIGHTOIL,
|
FP_LIGHTOIL,
|
||||||
FR_REOIL,
|
FR_REOIL,
|
||||||
FR_PETROIL,
|
FR_PETROIL,
|
||||||
FC_BITUMEN,
|
FC_BITUMEN(true),
|
||||||
FC_I_NAPHTHA,
|
FC_I_NAPHTHA(true),
|
||||||
FC_GAS_PETROLEUM,
|
FC_GAS_PETROLEUM(true),
|
||||||
FC_DIESEL_KEROSENE,
|
FC_DIESEL_KEROSENE(true),
|
||||||
FC_KEROSENE_PETROLEUM,
|
FC_KEROSENE_PETROLEUM(true),
|
||||||
CC_OIL,
|
CC_OIL(true),
|
||||||
CC_I,
|
CC_I(true),
|
||||||
CC_HEATING,
|
CC_HEATING(true),
|
||||||
CC_HEAVY,
|
CC_HEAVY(true),
|
||||||
CC_NAPHTHA,
|
CC_NAPHTHA(true),
|
||||||
SF_OIL,
|
SF_OIL(true),
|
||||||
SF_HEAVYOIL,
|
SF_HEAVYOIL(true),
|
||||||
SF_SMEAR,
|
SF_SMEAR(true),
|
||||||
SF_HEATINGOIL,
|
SF_HEATINGOIL(true),
|
||||||
SF_RECLAIMED,
|
SF_RECLAIMED(true),
|
||||||
SF_PETROIL,
|
SF_PETROIL(true),
|
||||||
SF_LUBRICANT,
|
SF_LUBRICANT(true),
|
||||||
SF_NAPHTHA,
|
SF_NAPHTHA(true),
|
||||||
SF_DIESEL,
|
SF_DIESEL(true),
|
||||||
SF_LIGHTOIL,
|
SF_LIGHTOIL(true),
|
||||||
SF_KEROSENE,
|
SF_KEROSENE(true),
|
||||||
SF_GAS,
|
SF_GAS(true),
|
||||||
SF_PETROLEUM,
|
SF_PETROLEUM(true),
|
||||||
SF_BIOGAS,
|
SF_BIOGAS(true),
|
||||||
SF_BIOFUEL,
|
SF_BIOFUEL(true),
|
||||||
BP_BIOGAS,
|
BP_BIOGAS,
|
||||||
BP_BIOFUEL,
|
BP_BIOFUEL,
|
||||||
LPG,
|
LPG,
|
||||||
@ -111,6 +111,15 @@ public class ItemChemistryTemplate extends Item {
|
|||||||
HEAVY_ELECTROLYSIS,
|
HEAVY_ELECTROLYSIS,
|
||||||
DUCRETE;
|
DUCRETE;
|
||||||
|
|
||||||
|
private boolean disabled = false;
|
||||||
|
|
||||||
|
private EnumChemistryTemplate() { }
|
||||||
|
|
||||||
|
/** Alternate ctor for disabling recipes to prevent recipe shifting armageddon */
|
||||||
|
private EnumChemistryTemplate(boolean disabled) {
|
||||||
|
this.disabled = disabled;
|
||||||
|
}
|
||||||
|
|
||||||
public static EnumChemistryTemplate getEnum(int i) {
|
public static EnumChemistryTemplate getEnum(int i) {
|
||||||
if(i < EnumChemistryTemplate.values().length)
|
if(i < EnumChemistryTemplate.values().length)
|
||||||
return EnumChemistryTemplate.values()[i];
|
return EnumChemistryTemplate.values()[i];
|
||||||
@ -121,252 +130,183 @@ public class ItemChemistryTemplate extends Item {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return this.toString();
|
return this.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDisabled() {
|
||||||
|
return this.disabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemChemistryTemplate()
|
public ItemChemistryTemplate() {
|
||||||
{
|
this.setHasSubtypes(true);
|
||||||
this.setHasSubtypes(true);
|
this.setMaxDamage(0);
|
||||||
this.setMaxDamage(0);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public String getItemStackDisplayName(ItemStack stack)
|
public String getItemStackDisplayName(ItemStack stack) {
|
||||||
{
|
EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
|
||||||
String s1 = ("" + StatCollector.translateToLocal("chem." + EnumChemistryTemplate.getEnum(stack.getItemDamage()).name())).trim();
|
|
||||||
|
|
||||||
if (s1 != null)
|
if(enum1.isDisabled()) {
|
||||||
{
|
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
||||||
s = s + " " + s1;
|
} else {
|
||||||
}
|
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||||
|
String s1 = ("" + StatCollector.translateToLocal("chem." + enum1.name())).trim();
|
||||||
|
|
||||||
return s;
|
if(s1 != null) {
|
||||||
}
|
s = s + " " + s1;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
return s;
|
||||||
@SideOnly(Side.CLIENT)
|
}
|
||||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
}
|
||||||
{
|
|
||||||
for (int i = 0; i < EnumChemistryTemplate.values().length; ++i)
|
|
||||||
{
|
|
||||||
list.add(new ItemStack(item, 1, i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getProcessTime(ItemStack stack) {
|
|
||||||
|
|
||||||
if(!(stack.getItem() instanceof ItemChemistryTemplate))
|
|
||||||
return 100;
|
|
||||||
|
|
||||||
int i = stack.getItemDamage();
|
|
||||||
EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(i);
|
|
||||||
|
|
||||||
switch (enum1) {
|
|
||||||
case FP_HEAVYOIL:
|
|
||||||
return 50;
|
|
||||||
case FP_SMEAR:
|
|
||||||
return 50;
|
|
||||||
case FP_NAPHTHA:
|
|
||||||
return 50;
|
|
||||||
case FP_LIGHTOIL:
|
|
||||||
return 50;
|
|
||||||
case FR_REOIL:
|
|
||||||
return 30;
|
|
||||||
case FR_PETROIL:
|
|
||||||
return 30;
|
|
||||||
case OIL_SAND:
|
|
||||||
return 200;
|
|
||||||
case FC_BITUMEN:
|
|
||||||
return 100;
|
|
||||||
case FC_I_NAPHTHA:
|
|
||||||
return 150;
|
|
||||||
case FC_GAS_PETROLEUM:
|
|
||||||
return 100;
|
|
||||||
case FC_DIESEL_KEROSENE:
|
|
||||||
return 150;
|
|
||||||
case FC_KEROSENE_PETROLEUM:
|
|
||||||
return 150;
|
|
||||||
case CC_OIL:
|
|
||||||
return 150;
|
|
||||||
case CC_I:
|
|
||||||
return 200;
|
|
||||||
case CC_HEATING:
|
|
||||||
return 250;
|
|
||||||
case CC_HEAVY:
|
|
||||||
return 200;
|
|
||||||
case CC_NAPHTHA:
|
|
||||||
return 300;
|
|
||||||
case ASPHALT:
|
|
||||||
return 100;
|
|
||||||
case COOLANT:
|
|
||||||
return 50;
|
|
||||||
case CRYOGEL:
|
|
||||||
return 50;
|
|
||||||
case DESH:
|
|
||||||
return 300;
|
|
||||||
case NITAN:
|
|
||||||
return 50;
|
|
||||||
case PEROXIDE:
|
|
||||||
return 50;
|
|
||||||
case CIRCUIT_4:
|
|
||||||
return 200;
|
|
||||||
case CIRCUIT_5:
|
|
||||||
return 250;
|
|
||||||
case SF_OIL:
|
|
||||||
return 20;
|
|
||||||
case SF_HEAVYOIL:
|
|
||||||
return 20;
|
|
||||||
case SF_SMEAR:
|
|
||||||
return 20;
|
|
||||||
case SF_HEATINGOIL:
|
|
||||||
return 20;
|
|
||||||
case SF_RECLAIMED:
|
|
||||||
return 20;
|
|
||||||
case SF_PETROIL:
|
|
||||||
return 20;
|
|
||||||
case SF_LUBRICANT:
|
|
||||||
return 20;
|
|
||||||
case SF_NAPHTHA:
|
|
||||||
return 20;
|
|
||||||
case SF_DIESEL:
|
|
||||||
return 20;
|
|
||||||
case SF_LIGHTOIL:
|
|
||||||
return 20;
|
|
||||||
case SF_KEROSENE:
|
|
||||||
return 20;
|
|
||||||
case SF_GAS:
|
|
||||||
return 20;
|
|
||||||
case SF_PETROLEUM:
|
|
||||||
return 20;
|
|
||||||
case SF_BIOGAS:
|
|
||||||
return 20;
|
|
||||||
case SF_BIOFUEL:
|
|
||||||
return 20;
|
|
||||||
case POLYMER:
|
|
||||||
return 100;
|
|
||||||
case DEUTERIUM:
|
|
||||||
return 200;
|
|
||||||
case STEAM:
|
|
||||||
return 20;
|
|
||||||
case BP_BIOGAS:
|
|
||||||
return 200;
|
|
||||||
case BP_BIOFUEL:
|
|
||||||
return 100;
|
|
||||||
case LPG:
|
|
||||||
return 100;
|
|
||||||
case YELLOWCAKE:
|
|
||||||
return 250;
|
|
||||||
case UF6:
|
|
||||||
return 100;
|
|
||||||
case PUF6:
|
|
||||||
return 150;
|
|
||||||
case SAS3:
|
|
||||||
return 200;
|
|
||||||
case DYN_SCHRAB:
|
|
||||||
return 1*60*20;
|
|
||||||
case DYN_EUPH:
|
|
||||||
return 3*60*20;
|
|
||||||
case DYN_DNT:
|
|
||||||
return 5*60*20;
|
|
||||||
case CORDITE:
|
|
||||||
return 40;
|
|
||||||
case KEVLAR:
|
|
||||||
return 40;
|
|
||||||
case CONCRETE:
|
|
||||||
return 100;
|
|
||||||
case CONCRETE_ASBESTOS:
|
|
||||||
return 100;
|
|
||||||
case SOLID_FUEL:
|
|
||||||
return 200;
|
|
||||||
case ELECTROLYSIS:
|
|
||||||
return 150;
|
|
||||||
case XENON:
|
|
||||||
return 300;
|
|
||||||
case XENON_OXY:
|
|
||||||
return 20;
|
|
||||||
case SATURN:
|
|
||||||
return 60;
|
|
||||||
case BALEFIRE:
|
|
||||||
return 100;
|
|
||||||
case SCHRABIDIC:
|
|
||||||
return 100;
|
|
||||||
case SCHRABIDATE:
|
|
||||||
return 150;
|
|
||||||
case COLTAN_CLEANING:
|
|
||||||
return 60;
|
|
||||||
case COLTAN_PAIN:
|
|
||||||
return 120;
|
|
||||||
case COLTAN_CRYSTAL:
|
|
||||||
return 80;
|
|
||||||
case VIT_LIQUID:
|
|
||||||
return 100;
|
|
||||||
case VIT_GAS:
|
|
||||||
return 100;
|
|
||||||
case TEL:
|
|
||||||
return 40;
|
|
||||||
case GASOLINE:
|
|
||||||
return 40;
|
|
||||||
case FRACKSOL:
|
|
||||||
return 20;
|
|
||||||
case HELIUM3:
|
|
||||||
return 200;
|
|
||||||
case OSMIRIDIUM_DEATH:
|
|
||||||
return 240;
|
|
||||||
case ETHANOL:
|
|
||||||
return 50;
|
|
||||||
case METH:
|
|
||||||
return 30;
|
|
||||||
case CO2:
|
|
||||||
return 60;
|
|
||||||
case HEAVY_ELECTROLYSIS:
|
|
||||||
return 150;
|
|
||||||
case DUCRETE:
|
|
||||||
return 150;
|
|
||||||
default:
|
|
||||||
return 100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool)
|
@SideOnly(Side.CLIENT)
|
||||||
{
|
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||||
|
for(int i = 0; i < EnumChemistryTemplate.values().length; ++i) {
|
||||||
|
EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(i);
|
||||||
|
|
||||||
if(!(stack.getItem() instanceof ItemChemistryTemplate))
|
if(!enum1.isDisabled()) {
|
||||||
return;
|
list.add(new ItemStack(item, 1, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<ItemStack> stacks = MachineRecipes.getChemInputFromTempate(stack);
|
public static int getProcessTime(ItemStack stack) {
|
||||||
FluidStack[] inF = MachineRecipes.getFluidInputFromTempate(stack);
|
|
||||||
ItemStack[] out = MachineRecipes.getChemOutputFromTempate(stack);
|
if(!(stack.getItem() instanceof ItemChemistryTemplate))
|
||||||
FluidStack[] outF = MachineRecipes.getFluidOutputFromTempate(stack);
|
return 100;
|
||||||
|
|
||||||
|
int i = stack.getItemDamage();
|
||||||
|
EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(i);
|
||||||
|
|
||||||
|
switch(enum1) {
|
||||||
|
case FP_HEAVYOIL: return 50;
|
||||||
|
case FP_SMEAR: return 50;
|
||||||
|
case FP_NAPHTHA: return 50;
|
||||||
|
case FP_LIGHTOIL: return 50;
|
||||||
|
case FR_REOIL: return 30;
|
||||||
|
case FR_PETROIL: return 30;
|
||||||
|
case OIL_SAND: return 200;
|
||||||
|
case FC_BITUMEN: return 100;
|
||||||
|
case FC_I_NAPHTHA: return 150;
|
||||||
|
case FC_GAS_PETROLEUM: return 100;
|
||||||
|
case FC_DIESEL_KEROSENE: return 150;
|
||||||
|
case FC_KEROSENE_PETROLEUM: return 150;
|
||||||
|
case CC_OIL: return 150;
|
||||||
|
case CC_I: return 200;
|
||||||
|
case CC_HEATING: return 250;
|
||||||
|
case CC_HEAVY: return 200;
|
||||||
|
case CC_NAPHTHA: return 300;
|
||||||
|
case ASPHALT: return 100;
|
||||||
|
case COOLANT: return 50;
|
||||||
|
case CRYOGEL: return 50;
|
||||||
|
case DESH: return 300;
|
||||||
|
case NITAN: return 50;
|
||||||
|
case PEROXIDE: return 50;
|
||||||
|
case CIRCUIT_4: return 200;
|
||||||
|
case CIRCUIT_5: return 250;
|
||||||
|
case SF_OIL: return 20;
|
||||||
|
case SF_HEAVYOIL: return 20;
|
||||||
|
case SF_SMEAR: return 20;
|
||||||
|
case SF_HEATINGOIL: return 20;
|
||||||
|
case SF_RECLAIMED: return 20;
|
||||||
|
case SF_PETROIL: return 20;
|
||||||
|
case SF_LUBRICANT: return 20;
|
||||||
|
case SF_NAPHTHA: return 20;
|
||||||
|
case SF_DIESEL: return 20;
|
||||||
|
case SF_LIGHTOIL: return 20;
|
||||||
|
case SF_KEROSENE: return 20;
|
||||||
|
case SF_GAS: return 20;
|
||||||
|
case SF_PETROLEUM: return 20;
|
||||||
|
case SF_BIOGAS: return 20;
|
||||||
|
case SF_BIOFUEL: return 20;
|
||||||
|
case POLYMER: return 100;
|
||||||
|
case DEUTERIUM: return 200;
|
||||||
|
case STEAM: return 20;
|
||||||
|
case BP_BIOGAS: return 200;
|
||||||
|
case BP_BIOFUEL: return 100;
|
||||||
|
case LPG: return 100;
|
||||||
|
case YELLOWCAKE: return 250;
|
||||||
|
case UF6: return 100;
|
||||||
|
case PUF6: return 150;
|
||||||
|
case SAS3: return 200;
|
||||||
|
case DYN_SCHRAB: return 1 * 60 * 20;
|
||||||
|
case DYN_EUPH: return 3 * 60 * 20;
|
||||||
|
case DYN_DNT: return 5 * 60 * 20;
|
||||||
|
case CORDITE: return 40;
|
||||||
|
case KEVLAR: return 40;
|
||||||
|
case CONCRETE: return 100;
|
||||||
|
case CONCRETE_ASBESTOS: return 100;
|
||||||
|
case SOLID_FUEL: return 200;
|
||||||
|
case ELECTROLYSIS: return 150;
|
||||||
|
case XENON: return 300;
|
||||||
|
case XENON_OXY: return 20;
|
||||||
|
case SATURN: return 60;
|
||||||
|
case BALEFIRE: return 100;
|
||||||
|
case SCHRABIDIC: return 100;
|
||||||
|
case SCHRABIDATE: return 150;
|
||||||
|
case COLTAN_CLEANING: return 60;
|
||||||
|
case COLTAN_PAIN: return 120;
|
||||||
|
case COLTAN_CRYSTAL: return 80;
|
||||||
|
case VIT_LIQUID: return 100;
|
||||||
|
case VIT_GAS: return 100;
|
||||||
|
case TEL: return 40;
|
||||||
|
case GASOLINE: return 40;
|
||||||
|
case FRACKSOL: return 20;
|
||||||
|
case HELIUM3: return 200;
|
||||||
|
case OSMIRIDIUM_DEATH: return 240;
|
||||||
|
case ETHANOL: return 50;
|
||||||
|
case METH: return 30;
|
||||||
|
case CO2: return 60;
|
||||||
|
case HEAVY_ELECTROLYSIS: return 150;
|
||||||
|
case DUCRETE: return 150;
|
||||||
|
default: return 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||||
|
|
||||||
|
if(!(stack.getItem() instanceof ItemChemistryTemplate))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(EnumChemistryTemplate.getEnum(stack.getItemDamage()).isDisabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ItemStack> stacks = MachineRecipes.getChemInputFromTempate(stack);
|
||||||
|
FluidStack[] inF = MachineRecipes.getFluidInputFromTempate(stack);
|
||||||
|
ItemStack[] out = MachineRecipes.getChemOutputFromTempate(stack);
|
||||||
|
FluidStack[] outF = MachineRecipes.getFluidOutputFromTempate(stack);
|
||||||
|
|
||||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
||||||
list.add("");
|
list.add("");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out_p"));
|
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out_p"));
|
||||||
for(int i = 0; i < 4; i++)
|
for(int i = 0; i < 4; i++)
|
||||||
if(out[i] != null)
|
if(out[i] != null)
|
||||||
list.add(out[i].stackSize + "x " + out[i].getDisplayName());
|
list.add(out[i].stackSize + "x " + out[i].getDisplayName());
|
||||||
|
|
||||||
for(int i = 0; i < 2; i++)
|
for(int i = 0; i < 2; i++)
|
||||||
if(outF[i] != null)
|
if(outF[i] != null)
|
||||||
list.add(outF[i].fill + "mB " + I18n.format(outF[i].type.getUnlocalizedName()));
|
list.add(outF[i].fill + "mB " + I18n.format(outF[i].type.getUnlocalizedName()));
|
||||||
|
|
||||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_in_p"));
|
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_in_p"));
|
||||||
|
|
||||||
if(stacks != null)
|
if(stacks != null)
|
||||||
for(int i = 0; i < stacks.size(); i++)
|
for(int i = 0; i < stacks.size(); i++)
|
||||||
list.add(stacks.get(i).stackSize + "x " + stacks.get(i).getDisplayName());
|
list.add(stacks.get(i).stackSize + "x " + stacks.get(i).getDisplayName());
|
||||||
|
|
||||||
for(int i = 0; i < 2; i++)
|
for(int i = 0; i < 2; i++)
|
||||||
if(inF[i] != null)
|
if(inF[i] != null)
|
||||||
list.add(inF[i].fill + "mB " + I18n.format(inF[i].type.getUnlocalizedName()));
|
list.add(inF[i].fill + "mB " + I18n.format(inF[i].type.getUnlocalizedName()));
|
||||||
|
|
||||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_time"));
|
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_time"));
|
||||||
list.add(Math.floor((float)(getProcessTime(stack)) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
list.add(Math.floor((float) (getProcessTime(stack)) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
list.add("###INVALID###");
|
list.add("###INVALID###");
|
||||||
list.add("0x334077-0x6A298F-0xDF3795-0x334077");
|
list.add("0x334077-0x6A298F-0xDF3795-0x334077");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,12 @@ package com.hbm.tileentity.machine.oil;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.interfaces.IControlReceiver;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidContainerRegistry;
|
import com.hbm.inventory.FluidContainerRegistry;
|
||||||
|
import com.hbm.inventory.FluidStack;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
@ -15,6 +17,7 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
import com.hbm.util.Tuple.Quintet;
|
||||||
|
|
||||||
import api.hbm.energy.IBatteryItem;
|
import api.hbm.energy.IBatteryItem;
|
||||||
import api.hbm.energy.IEnergyUser;
|
import api.hbm.energy.IEnergyUser;
|
||||||
@ -28,8 +31,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
|
||||||
public class TileEntityMachineRefinery extends TileEntityMachineBase implements IEnergyUser, IFluidContainer, IFluidAcceptor, IFluidSource {
|
public class TileEntityMachineRefinery extends TileEntityMachineBase implements IEnergyUser, IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver {
|
||||||
|
|
||||||
public long power = 0;
|
public long power = 0;
|
||||||
public int sulfur = 0;
|
public int sulfur = 0;
|
||||||
@ -174,6 +178,56 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
|||||||
this.power = nbt.getLong("power");
|
this.power = nbt.getLong("power");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void refine() {
|
||||||
|
Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> refinery = RefineryRecipes.getRefinery(tanks[0].getTankType());
|
||||||
|
|
||||||
|
if(refinery == null) //usually not possible
|
||||||
|
return;
|
||||||
|
|
||||||
|
FluidStack[] stacks = new FluidStack[] {refinery.getV(), refinery.getW(), refinery.getX(), refinery.getY()};
|
||||||
|
|
||||||
|
for(int i = 0; i < stacks.length; i++)
|
||||||
|
tanks[i + 1].setTankType(stacks[i].type);
|
||||||
|
|
||||||
|
if(power < 5 || tanks[0].getFill() < 100)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for(int i = 0; i < stacks.length; i++) {
|
||||||
|
if(tanks[i + 1].getFill() + stacks[i].fill > tanks[i + 1].getMaxFill()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tanks[0].setFill(tanks[0].getFill() - 100);
|
||||||
|
|
||||||
|
for(int i = 0; i < stacks.length; i++)
|
||||||
|
tanks[i + 1].setFill(tanks[i + 1].getFill() + stacks[i].fill);
|
||||||
|
|
||||||
|
this.sulfur++;
|
||||||
|
|
||||||
|
if(this.sulfur >= maxSulfur) {
|
||||||
|
this.sulfur -= maxSulfur;
|
||||||
|
|
||||||
|
ItemStack out = refinery.getZ();
|
||||||
|
|
||||||
|
if(out != null) {
|
||||||
|
|
||||||
|
if(slots[11] == null) {
|
||||||
|
slots[11] = out.copy();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(out.getItem() == slots[11].getItem() && out.getItemDamage() == slots[11].getItemDamage() && slots[11].stackSize + out.stackSize <= slots[11].getMaxStackSize()) {
|
||||||
|
slots[11].stackSize += out.stackSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.markDirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.power -= 5;
|
||||||
|
}
|
||||||
|
|
||||||
private void updateConnections() {
|
private void updateConnections() {
|
||||||
this.trySubscribe(worldObj, xCoord + 2, yCoord, zCoord + 1, Library.POS_X);
|
this.trySubscribe(worldObj, xCoord + 2, yCoord, zCoord + 1, Library.POS_X);
|
||||||
this.trySubscribe(worldObj, xCoord + 2, yCoord, zCoord - 1, Library.POS_X);
|
this.trySubscribe(worldObj, xCoord + 2, yCoord, zCoord - 1, Library.POS_X);
|
||||||
@ -310,4 +364,22 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
|||||||
public double getMaxRenderDistanceSquared() {
|
public double getMaxRenderDistanceSquared() {
|
||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPermission(EntityPlayer player) {
|
||||||
|
return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void receiveControl(NBTTagCompound data) {
|
||||||
|
|
||||||
|
if(data.hasKey("toggle")) {
|
||||||
|
|
||||||
|
if(tanks[0].getTankType() == Fluids.HOTOIL) {
|
||||||
|
tanks[0].setTankType(Fluids.HOTCRACKOIL);
|
||||||
|
} else {
|
||||||
|
tanks[0].setTankType(Fluids.HOTOIL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -286,19 +286,15 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type == tanks[0].getTankType()) return this.list1;
|
||||||
return this.list1;
|
if(type == tanks[1].getTankType()) return this.list2;
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
|
||||||
return this.list2;
|
|
||||||
return new ArrayList<IFluidAcceptor>();
|
return new ArrayList<IFluidAcceptor>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidType type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type == tanks[0].getTankType()) list1.clear();
|
||||||
list1.clear();
|
if(type == tanks[1].getTankType()) list2.clear();
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
|
||||||
list2.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -503,6 +503,7 @@ hbmfluid.plasma_ht=Wasserstoff-Tritium-Plasma
|
|||||||
hbmfluid.plasma_xm=Xenon-Quecksilber-Plasma
|
hbmfluid.plasma_xm=Xenon-Quecksilber-Plasma
|
||||||
hbmfluid.puf6=Plutoniumhexafluorid
|
hbmfluid.puf6=Plutoniumhexafluorid
|
||||||
hbmfluid.reclaimed=Wiederaufbetreitetes Industrieöl
|
hbmfluid.reclaimed=Wiederaufbetreitetes Industrieöl
|
||||||
|
hbmfluid.salient=Saftiges Grün
|
||||||
hbmfluid.sas3=Schrabidiumtrisulfat
|
hbmfluid.sas3=Schrabidiumtrisulfat
|
||||||
hbmfluid.schrabidic=Schrabidische Säure
|
hbmfluid.schrabidic=Schrabidische Säure
|
||||||
hbmfluid.smear=Industrieöl
|
hbmfluid.smear=Industrieöl
|
||||||
@ -854,6 +855,7 @@ item.billet_zfb_am_mix.name=Reaktorfähiges ZFB-Billet
|
|||||||
item.billet_zfb_bismuth.name=Bismut ZFB-Billet
|
item.billet_zfb_bismuth.name=Bismut ZFB-Billet
|
||||||
item.billet_zfb_pu241.name=Pu-241 ZFB-Billet
|
item.billet_zfb_pu241.name=Pu-241 ZFB-Billet
|
||||||
item.billet_zirconium.name=Zirkoniumbillet
|
item.billet_zirconium.name=Zirkoniumbillet
|
||||||
|
item.bio_wafer.name=Algenwaffel
|
||||||
item.biomass.name=Biomasse
|
item.biomass.name=Biomasse
|
||||||
item.biomass_compressed.name=Verdichtete Biomasse
|
item.biomass_compressed.name=Verdichtete Biomasse
|
||||||
item.bismuth_pickaxe.name=Bismutspitzhacke
|
item.bismuth_pickaxe.name=Bismutspitzhacke
|
||||||
|
|||||||
@ -657,6 +657,7 @@ hbmfluid.plasma_ht=Hydrogen-Tritium Plasma
|
|||||||
hbmfluid.plasma_xm=Xenon-Mercury Plasma
|
hbmfluid.plasma_xm=Xenon-Mercury Plasma
|
||||||
hbmfluid.puf6=Plutonium Hexafluoride
|
hbmfluid.puf6=Plutonium Hexafluoride
|
||||||
hbmfluid.reclaimed=Reclaimed Industrial Oil
|
hbmfluid.reclaimed=Reclaimed Industrial Oil
|
||||||
|
hbmfluid.salient=Salient Green
|
||||||
hbmfluid.sas3=Schrabidium Trisulfide
|
hbmfluid.sas3=Schrabidium Trisulfide
|
||||||
hbmfluid.schrabidic=Schrabidic Acid
|
hbmfluid.schrabidic=Schrabidic Acid
|
||||||
hbmfluid.smear=Industrial Oil
|
hbmfluid.smear=Industrial Oil
|
||||||
@ -1020,6 +1021,7 @@ item.billet_zfb_am_mix.name=Reactor Grade Americium ZFB Billet
|
|||||||
item.billet_zfb_bismuth.name=Bismuth ZFB Billet
|
item.billet_zfb_bismuth.name=Bismuth ZFB Billet
|
||||||
item.billet_zfb_pu241.name=Pu-241 ZFB Billet
|
item.billet_zfb_pu241.name=Pu-241 ZFB Billet
|
||||||
item.billet_zirconium.name=Zirconium Billet
|
item.billet_zirconium.name=Zirconium Billet
|
||||||
|
item.bio_wafer.name=Algae Wafer
|
||||||
item.biomass.name=Biomass
|
item.biomass.name=Biomass
|
||||||
item.biomass_compressed.name=Compressed Biomass
|
item.biomass_compressed.name=Compressed Biomass
|
||||||
item.bismuth_pickaxe.name=Bismuth Pickaxe
|
item.bismuth_pickaxe.name=Bismuth Pickaxe
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
src/main/resources/assets/hbm/textures/items/bio_wafer.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/bio_wafer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 301 B |
Loading…
x
Reference in New Issue
Block a user