oil oil oil oil oil
13
changelog
@ -3,6 +3,12 @@
|
||||
* Custom machines now have a neutron acceptor which allows them to use flux from the breeding reactor in recipes
|
||||
* There is now a heat acceptor which can accept heat from things like fireboxes or electric heaters
|
||||
* Also added a config option to create pollution
|
||||
* Hydrotreater
|
||||
* Tier 3 oil machine (on the same level as vacuum oil and reforming)
|
||||
* Can de-sulfurize oil, which allows extraction of sour gas directly from crude oil
|
||||
* Using desulfurized oil skips the (rather destructive) desulfurization process of the standard refinery, yielding higher-quality oils
|
||||
* Hydrotreating also allows cracked diesel variants to turn into their normal counterparts
|
||||
* Can convert coal oil directly into coal gasoline
|
||||
|
||||
## Changed
|
||||
* Deco bocks now drop all of the time, but they drop themselves instead of ingots
|
||||
@ -21,6 +27,8 @@
|
||||
* Remodeled all tier 0 missiles
|
||||
* Tier 0 missiles now have a much thinner contrail to match their size better
|
||||
* Covneyor ejectors can now eject sulfur out of the side ports of refineries
|
||||
* Refineries and vacuum refineries now have fluid ID slots for changing the recipe
|
||||
* Removed the remaining old oil separation recipes from the chemical plant
|
||||
|
||||
## Fixed
|
||||
* Fixed dupe caused by shift-clicking ashes out of the bricked furnace
|
||||
@ -29,4 +37,7 @@
|
||||
* Fixed fast-moving missiles spawning too few particles, causing holes in the contrail
|
||||
* Fixed coker units creating soot when not processing anything
|
||||
* Foundry molds can no longer be removed from basins when there's still material in them, fixing a bug where doing so would void the material
|
||||
* Fixed molds not saving when cooling off, allowing to dupe metal when leaving and rejoining
|
||||
* Fixed molds not saving when cooling off, allowing to dupe metal when leaving and rejoining
|
||||
* Fixed normal drones loading chunks
|
||||
* Fixed chunk-loading drones not loading chunks
|
||||
* Fixed several chemistry templates missing names
|
||||
@ -1,17 +1,25 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCatalyticReformer;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineCatalyticReformer extends BlockDummyable {
|
||||
public class MachineCatalyticReformer extends BlockDummyable implements IPersistentInfoProvider {
|
||||
|
||||
public MachineCatalyticReformer(Material mat) {
|
||||
super(mat);
|
||||
@ -61,4 +69,14 @@ public class MachineCatalyticReformer extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "" + i);
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,24 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineHydrotreater;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineHydrotreater extends BlockDummyable {
|
||||
public class MachineHydrotreater extends BlockDummyable implements IPersistentInfoProvider {
|
||||
|
||||
public MachineHydrotreater(Material mat) {
|
||||
super(mat);
|
||||
@ -40,4 +48,14 @@ public class MachineHydrotreater extends BlockDummyable {
|
||||
this.makeExtra(world, x - dir.offsetX - 1, y, z - dir.offsetZ + 1);
|
||||
this.makeExtra(world, x - dir.offsetX - 1, y, z - dir.offsetZ - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "" + i);
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,8 +21,8 @@ public class EntityDeliveryDrone extends EntityDroneBase implements IInventory,
|
||||
protected ItemStack[] slots = new ItemStack[this.getSizeInventory()];
|
||||
public FluidStack fluid;
|
||||
|
||||
protected boolean chunkLoading = false;
|
||||
private Ticket loaderTicket;
|
||||
public boolean isChunkLoading = false;
|
||||
|
||||
public EntityDeliveryDrone(World world) {
|
||||
super(world);
|
||||
@ -36,6 +36,7 @@ public class EntityDeliveryDrone extends EntityDroneBase implements IInventory,
|
||||
|
||||
public EntityDeliveryDrone setChunkLoading() {
|
||||
init(ForgeChunkManager.requestTicket(MainRegistry.instance, worldObj, Type.ENTITY));
|
||||
this.chunkLoading = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -77,6 +78,7 @@ public class EntityDeliveryDrone extends EntityDroneBase implements IInventory,
|
||||
}
|
||||
|
||||
nbt.setByte("load", this.dataWatcher.getWatchableObjectByte(11));
|
||||
nbt.setBoolean("chunkLoading", chunkLoading);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -100,6 +102,7 @@ public class EntityDeliveryDrone extends EntityDroneBase implements IInventory,
|
||||
}
|
||||
|
||||
this.dataWatcher.updateObject(11, nbt.getByte("load"));
|
||||
if(nbt.getBoolean("chunkLoading")) this.setChunkLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -17,7 +17,7 @@ public class ContainerMachineRefinery extends Container {
|
||||
public ContainerMachineRefinery(InventoryPlayer invPlayer, TileEntityMachineRefinery tedf) {
|
||||
|
||||
testNuke = tedf;
|
||||
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 8, 90));
|
||||
//Canister Input
|
||||
@ -42,17 +42,16 @@ public class ContainerMachineRefinery extends Container {
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 10, 134, 108));
|
||||
//Sulfur Output
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 11, 152, 36));
|
||||
//Fluid ID
|
||||
this.addSlotToContainer(new Slot(tedf, 12, 8, 108));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
@ -71,8 +70,8 @@ public class ContainerMachineRefinery extends Container {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 11) {
|
||||
if(!this.mergeItemStack(var5, 12, this.inventorySlots.size(), true)) {
|
||||
if(par2 <= 12) {
|
||||
if(!this.mergeItemStack(var5, 13, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if(!this.mergeItemStack(var5, 0, 1, false))
|
||||
|
||||
@ -40,6 +40,8 @@ public class ContainerMachineVacuumDistill extends Container {
|
||||
this.addSlotToContainer(new Slot(tedf, 9, 134, 90));
|
||||
//Petroleum Output
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 10, 134, 108));
|
||||
//Fluid ID
|
||||
this.addSlotToContainer(new Slot(tedf, 11, 26, 108));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
|
||||
@ -124,7 +124,6 @@ public class Fluids {
|
||||
public static FluidType SOLVENT; //oranic solvent in fact
|
||||
public static FluidType BLOOD; //BLOOD ORB! BLOOD ORB! BLOOD ORB!
|
||||
public static FluidType BLOOD_HOT;
|
||||
|
||||
public static FluidType PHEROMONE;
|
||||
public static FluidType PHEROMONE_M;
|
||||
public static FluidType SYNGAS;
|
||||
|
||||
@ -5,15 +5,11 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.inventory.container.ContainerMachineRefinery;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;
|
||||
|
||||
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.ResourceLocation;
|
||||
|
||||
public class GUIMachineRefinery extends GuiInfoContainer {
|
||||
@ -40,18 +36,6 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
||||
refinery.tanks[4].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 70 - 52, 16, 52);
|
||||
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
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
|
||||
@ -38,7 +38,6 @@ public class ChemplantRecipes extends SerializableRecipe {
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
registerFuelProcessing();
|
||||
//6-30, formerly oil cracking, coal liquefaction and solidifciation
|
||||
registerOtherOil();
|
||||
|
||||
@ -314,7 +313,7 @@ public class ChemplantRecipes extends SerializableRecipe {
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PETROLEUM, 100),
|
||||
new FluidStack(Fluids.STEAM, 1000))
|
||||
.outputItems(new ItemStack(ModItems.antiknock)));
|
||||
.outputItems(new ItemStack(ModItems.fuel_additive)));
|
||||
recipes.add(new ChemRecipe(4, "FR_REOIL", 30)
|
||||
.inputFluids(new FluidStack(1000, Fluids.SMEAR))
|
||||
.outputFluids(new FluidStack(800, Fluids.RECLAIMED)));
|
||||
@ -324,18 +323,18 @@ public class ChemplantRecipes extends SerializableRecipe {
|
||||
new FluidStack(200, Fluids.LUBRICANT))
|
||||
.outputFluids(new FluidStack(1000, Fluids.PETROIL)));
|
||||
recipes.add(new ChemRecipe(86, "PETROIL_LEADED", 40)
|
||||
.inputItems(new ComparableStack(ModItems.antiknock))
|
||||
.inputItems(new ComparableStack(ModItems.fuel_additive))
|
||||
.inputFluids(new FluidStack(Fluids.PETROIL, 10_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))
|
||||
.inputItems(new ComparableStack(ModItems.fuel_additive))
|
||||
.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))
|
||||
.inputItems(new ComparableStack(ModItems.fuel_additive))
|
||||
.inputFluids(new FluidStack(Fluids.COALGAS, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.COALGAS_LEADED, 12_000)));
|
||||
recipes.add(new ChemRecipe(72, "FRACKSOL", 20)
|
||||
@ -418,33 +417,6 @@ public class ChemplantRecipes extends SerializableRecipe {
|
||||
.outputFluids(new FluidStack(Fluids.SALIENT, 250)));
|
||||
|
||||
}
|
||||
|
||||
public static void registerFuelProcessing() {
|
||||
recipes.add(new ChemRecipe(0, "FP_HEAVYOIL", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.HEAVYOIL))
|
||||
.outputFluids(
|
||||
new FluidStack(FractionRecipes.heavy_frac_bitu * 10, Fluids.BITUMEN),
|
||||
new FluidStack(FractionRecipes.heavy_frac_smear * 10, Fluids.SMEAR)
|
||||
));
|
||||
recipes.add(new ChemRecipe(1, "FP_SMEAR", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.SMEAR))
|
||||
.outputFluids(
|
||||
new FluidStack(FractionRecipes.smear_frac_heat * 10, Fluids.HEATINGOIL),
|
||||
new FluidStack(FractionRecipes.smear_frac_lube * 10, Fluids.LUBRICANT)
|
||||
));
|
||||
recipes.add(new ChemRecipe(2, "FP_NAPHTHA", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.NAPHTHA))
|
||||
.outputFluids(
|
||||
new FluidStack(FractionRecipes.napht_frac_heat * 10, Fluids.HEATINGOIL),
|
||||
new FluidStack(FractionRecipes.napht_frac_diesel * 10, Fluids.DIESEL)
|
||||
));
|
||||
recipes.add(new ChemRecipe(3, "FP_LIGHTOIL", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.LIGHTOIL))
|
||||
.outputFluids(
|
||||
new FluidStack(FractionRecipes.light_frac_diesel * 10, Fluids.DIESEL),
|
||||
new FluidStack(FractionRecipes.light_frac_kero * 10, Fluids.KEROSENE)
|
||||
));
|
||||
}
|
||||
|
||||
public static void registerOtherOil() {
|
||||
recipes.add(new ChemRecipe(31, "BP_BIOGAS", 60)
|
||||
|
||||
@ -19,50 +19,28 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class FractionRecipes extends SerializableRecipe {
|
||||
|
||||
public static final int heavy_frac_bitu = 30;
|
||||
public static final int heavy_frac_smear = 70;
|
||||
public static final int smear_frac_heat = 60;
|
||||
public static final int smear_frac_lube = 40;
|
||||
public static final int napht_frac_heat = 40;
|
||||
public static final int napht_frac_diesel = 60;
|
||||
public static final int light_frac_diesel = 40;
|
||||
public static final int light_frac_kero = 60;
|
||||
|
||||
public static final int ncrack_frac_heat = 30;
|
||||
public static final int ncrack_frac_diesel = 70;
|
||||
public static final int lcrack_frac_kero = 70;
|
||||
public static final int lcrack_frac_petro = 30;
|
||||
public static final int coal_frac_coalgas = 30;
|
||||
public static final int coal_frac_oil = 70;
|
||||
public static final int creo_frac_coaloil = 10;
|
||||
public static final int creo_frac_bitu = 90;
|
||||
public static final int reform_frac_arom = 40;
|
||||
public static final int reform_frac_xyle = 60;
|
||||
public static final int hvac_frac_smear = 40;
|
||||
public static final int hvac_frac_heat = 60;
|
||||
public static final int lvac_frac_kero = 70;
|
||||
public static final int lvac_frac_gas = 30;
|
||||
|
||||
private static Map<FluidType, Pair<FluidStack, FluidStack>> fractions = new HashMap();
|
||||
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
fractions.put(Fluids.HEAVYOIL, new Pair(new FluidStack(Fluids.BITUMEN, heavy_frac_bitu), new FluidStack(Fluids.SMEAR, heavy_frac_smear)));
|
||||
fractions.put(Fluids.SMEAR, new Pair(new FluidStack(Fluids.HEATINGOIL, smear_frac_heat), new FluidStack(Fluids.LUBRICANT, smear_frac_lube)));
|
||||
fractions.put(Fluids.NAPHTHA, new Pair(new FluidStack(Fluids.HEATINGOIL, napht_frac_heat), new FluidStack(Fluids.DIESEL, napht_frac_diesel)));
|
||||
fractions.put(Fluids.NAPHTHA_CRACK, new Pair(new FluidStack(Fluids.HEATINGOIL, ncrack_frac_heat), new FluidStack(Fluids.DIESEL_CRACK, ncrack_frac_diesel)));
|
||||
fractions.put(Fluids.LIGHTOIL, new Pair(new FluidStack(Fluids.DIESEL, light_frac_diesel), new FluidStack(Fluids.KEROSENE, light_frac_kero)));
|
||||
fractions.put(Fluids.LIGHTOIL_CRACK, new Pair(new FluidStack(Fluids.KEROSENE, lcrack_frac_kero), new FluidStack(Fluids.PETROLEUM, lcrack_frac_petro)));
|
||||
fractions.put(Fluids.COALOIL, new Pair(new FluidStack(Fluids.COALGAS, coal_frac_coalgas), new FluidStack(Fluids.OIL, coal_frac_oil)));
|
||||
fractions.put(Fluids.COALCREOSOTE, new Pair(new FluidStack(Fluids.COALOIL, creo_frac_coaloil), new FluidStack(Fluids.BITUMEN, creo_frac_bitu)));
|
||||
fractions.put(Fluids.HEAVYOIL_VACUUM, new Pair(new FluidStack(Fluids.SMEAR, hvac_frac_smear), new FluidStack(Fluids.HEATINGOIL_VACUUM, hvac_frac_heat)));
|
||||
fractions.put(Fluids.REFORMATE, new Pair(new FluidStack(Fluids.AROMATICS, reform_frac_arom), new FluidStack(Fluids.XYLENE, reform_frac_xyle)));
|
||||
fractions.put(Fluids.LIGHTOIL_VACUUM, new Pair(new FluidStack(Fluids.KEROSENE, lvac_frac_kero), new FluidStack(Fluids.REFORMGAS, lvac_frac_gas)));
|
||||
fractions.put(Fluids.EGG, new Pair(new FluidStack(Fluids.CHOLESTEROL, 50), new FluidStack(Fluids.RADIOSOLVENT, 50)));
|
||||
fractions.put(Fluids.OIL_COKER, new Pair(new FluidStack(Fluids.CRACKOIL, 30), new FluidStack(Fluids.HEATINGOIL, 70)));
|
||||
fractions.put(Fluids.NAPHTHA_COKER, new Pair(new FluidStack(Fluids.NAPHTHA_CRACK, 75), new FluidStack(Fluids.LIGHTOIL_CRACK, 25)));
|
||||
fractions.put(Fluids.GAS_COKER, new Pair(new FluidStack(Fluids.AROMATICS, 25), new FluidStack(Fluids.CARBONDIOXIDE, 75)));
|
||||
fractions.put(Fluids.CHLOROCALCITE_MIX, new Pair(new FluidStack(Fluids.CHLOROCALCITE_CLEANED, 50), new FluidStack(Fluids.COLLOID, 50)));
|
||||
fractions.put(Fluids.HEAVYOIL, new Pair(new FluidStack(Fluids.BITUMEN, 30), new FluidStack(Fluids.SMEAR, 70)));
|
||||
fractions.put(Fluids.HEAVYOIL_VACUUM, new Pair(new FluidStack(Fluids.SMEAR, 40), new FluidStack(Fluids.HEATINGOIL_VACUUM, 60)));
|
||||
fractions.put(Fluids.SMEAR, new Pair(new FluidStack(Fluids.HEATINGOIL, 60), new FluidStack(Fluids.LUBRICANT, 40)));
|
||||
fractions.put(Fluids.NAPHTHA, new Pair(new FluidStack(Fluids.HEATINGOIL, 40), new FluidStack(Fluids.DIESEL, 60)));
|
||||
fractions.put(Fluids.NAPHTHA_DS, new Pair(new FluidStack(Fluids.XYLENE, 60), new FluidStack(Fluids.DIESEL_REFORM, 40)));
|
||||
fractions.put(Fluids.NAPHTHA_CRACK, new Pair(new FluidStack(Fluids.HEATINGOIL, 30), new FluidStack(Fluids.DIESEL_CRACK, 70)));
|
||||
fractions.put(Fluids.LIGHTOIL, new Pair(new FluidStack(Fluids.DIESEL, 40), new FluidStack(Fluids.KEROSENE, 60)));
|
||||
fractions.put(Fluids.LIGHTOIL_DS, new Pair(new FluidStack(Fluids.DIESEL_REFORM, 60), new FluidStack(Fluids.KEROSENE_REFORM, 40)));
|
||||
fractions.put(Fluids.LIGHTOIL_CRACK, new Pair(new FluidStack(Fluids.KEROSENE, 70), new FluidStack(Fluids.PETROLEUM, 30)));
|
||||
fractions.put(Fluids.COALOIL, new Pair(new FluidStack(Fluids.COALGAS, 30), new FluidStack(Fluids.OIL, 70)));
|
||||
fractions.put(Fluids.COALCREOSOTE, new Pair(new FluidStack(Fluids.COALOIL, 10), new FluidStack(Fluids.BITUMEN, 90)));
|
||||
fractions.put(Fluids.REFORMATE, new Pair(new FluidStack(Fluids.AROMATICS, 40), new FluidStack(Fluids.XYLENE, 60)));
|
||||
fractions.put(Fluids.LIGHTOIL_VACUUM, new Pair(new FluidStack(Fluids.KEROSENE, 70), new FluidStack(Fluids.REFORMGAS, 30)));
|
||||
fractions.put(Fluids.EGG, new Pair(new FluidStack(Fluids.CHOLESTEROL, 50), new FluidStack(Fluids.RADIOSOLVENT, 50)));
|
||||
fractions.put(Fluids.OIL_COKER, new Pair(new FluidStack(Fluids.CRACKOIL, 30), new FluidStack(Fluids.HEATINGOIL, 70)));
|
||||
fractions.put(Fluids.NAPHTHA_COKER, new Pair(new FluidStack(Fluids.NAPHTHA_CRACK, 75), new FluidStack(Fluids.LIGHTOIL_CRACK, 25)));
|
||||
fractions.put(Fluids.GAS_COKER, new Pair(new FluidStack(Fluids.AROMATICS, 25), new FluidStack(Fluids.CARBONDIOXIDE, 75)));
|
||||
fractions.put(Fluids.CHLOROCALCITE_MIX, new Pair(new FluidStack(Fluids.CHLOROCALCITE_CLEANED, 50), new FluidStack(Fluids.COLLOID, 50)));
|
||||
}
|
||||
|
||||
public static Pair<FluidStack, FluidStack> getFractions(FluidType oil) {
|
||||
|
||||
@ -24,32 +24,38 @@ public class HydrotreatingRecipes extends SerializableRecipe {
|
||||
public void registerDefaults() {
|
||||
|
||||
recipes.put(Fluids.OIL, new Triplet(
|
||||
new FluidStack(Fluids.HYDROGEN, 5),
|
||||
new FluidStack(Fluids.HYDROGEN, 5, 1),
|
||||
new FluidStack(Fluids.OIL_DS, 90),
|
||||
new FluidStack(Fluids.SOURGAS, 15)
|
||||
));
|
||||
|
||||
recipes.put(Fluids.CRACKOIL, new Triplet(
|
||||
new FluidStack(Fluids.HYDROGEN, 5),
|
||||
new FluidStack(Fluids.HYDROGEN, 5, 1),
|
||||
new FluidStack(Fluids.CRACKOIL_DS, 90),
|
||||
new FluidStack(Fluids.SOURGAS, 15)
|
||||
));
|
||||
|
||||
recipes.put(Fluids.GAS, new Triplet(
|
||||
new FluidStack(Fluids.HYDROGEN, 5),
|
||||
new FluidStack(Fluids.HYDROGEN, 5, 1),
|
||||
new FluidStack(Fluids.PETROLEUM, 80),
|
||||
new FluidStack(Fluids.SOURGAS, 15)
|
||||
));
|
||||
|
||||
recipes.put(Fluids.DIESEL_CRACK, new Triplet(
|
||||
new FluidStack(Fluids.HYDROGEN, 10),
|
||||
new FluidStack(Fluids.HYDROGEN, 10, 1),
|
||||
new FluidStack(Fluids.DIESEL, 80),
|
||||
new FluidStack(Fluids.SOURGAS, 15)
|
||||
new FluidStack(Fluids.SOURGAS, 30)
|
||||
));
|
||||
|
||||
recipes.put(Fluids.DIESEL_CRACK_REFORM, new Triplet(
|
||||
new FluidStack(Fluids.HYDROGEN, 10),
|
||||
new FluidStack(Fluids.HYDROGEN, 10, 1),
|
||||
new FluidStack(Fluids.DIESEL_REFORM, 80),
|
||||
new FluidStack(Fluids.SOURGAS, 30)
|
||||
));
|
||||
|
||||
recipes.put(Fluids.COALOIL, new Triplet(
|
||||
new FluidStack(Fluids.HYDROGEN, 10, 1),
|
||||
new FluidStack(Fluids.COALGAS, 80),
|
||||
new FluidStack(Fluids.SOURGAS, 15)
|
||||
));
|
||||
}
|
||||
|
||||
@ -73,9 +73,9 @@ public class MixerRecipes extends SerializableRecipe {
|
||||
register(Fluids.SYNGAS, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.COALOIL, 500)).setStack2(new FluidStack(Fluids.STEAM, 500)));
|
||||
register(Fluids.OXYHYDROGEN, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.HYDROGEN, 500)).setStack2(new FluidStack(Fluids.OXYGEN, 500)));
|
||||
|
||||
register(Fluids.PETROIL_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.PETROIL, 10_000)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
register(Fluids.GASOLINE_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.GASOLINE, 10_000)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
register(Fluids.COALGAS_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.COALGAS, 10_000)).setSolid(new ComparableStack(ModItems.antiknock)));
|
||||
register(Fluids.PETROIL_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.PETROIL, 10_000)).setSolid(new ComparableStack(ModItems.fuel_additive, 1, 0)));
|
||||
register(Fluids.GASOLINE_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.GASOLINE, 10_000)).setSolid(new ComparableStack(ModItems.fuel_additive, 1, 0)));
|
||||
register(Fluids.COALGAS_LEADED, new MixerRecipe(12_000, 40).setStack1(new FluidStack(Fluids.COALGAS, 10_000)).setSolid(new ComparableStack(ModItems.fuel_additive, 1, 0)));
|
||||
|
||||
register(Fluids.DIESEL_REFORM, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.DIESEL, 900)).setStack2(new FluidStack(Fluids.REFORMATE, 100)));
|
||||
register(Fluids.DIESEL_CRACK_REFORM, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.DIESEL_CRACK, 900)).setStack2(new FluidStack(Fluids.REFORMATE, 100)));
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.Tuple.Quartet;
|
||||
import com.hbm.util.Tuple.Quintet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -28,16 +29,26 @@ public class RefineryRecipes {
|
||||
public static final int crack_frac_aroma = 15;
|
||||
public static final int crack_frac_unsat = 15;
|
||||
|
||||
public static final int oilds_frac_heavy = 30;
|
||||
public static final int oilds_frac_naph = 35;
|
||||
public static final int oilds_frac_light = 20;
|
||||
public static final int oilds_frac_unsat = 15;
|
||||
public static final int crackds_frac_naph = 35;
|
||||
public static final int crackds_frac_light = 35;
|
||||
public static final int crackds_frac_aroma = 15;
|
||||
public static final int crackds_frac_unsat = 15;
|
||||
|
||||
public static final int vac_frac_heavy = 40;
|
||||
public static final int vac_frac_reform = 25;
|
||||
public static final int vac_frac_light = 20;
|
||||
public static final int vac_frac_sour = 15;
|
||||
|
||||
private static Map<FluidType, Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack>> refinery = new HashMap();
|
||||
private static Map<FluidType, Quartet<FluidStack, FluidStack, FluidStack, FluidStack>> vacuum = new HashMap();
|
||||
|
||||
public static Map<Object, Object[]> getRefineryRecipe() {
|
||||
public static HashMap<Object, Object[]> getRefineryRecipe() {
|
||||
|
||||
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
HashMap<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
|
||||
for(Entry<FluidType, Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack>> recipe : refinery.entrySet()) {
|
||||
|
||||
@ -55,15 +66,21 @@ public class RefineryRecipes {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public static HashMap<Object, Object[]> getVacuumRecipe() {
|
||||
public static HashMap getVacuumRecipe() {
|
||||
|
||||
HashMap<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
recipes.put(ItemFluidIcon.make(Fluids.OIL, 1000, 2),
|
||||
new ItemStack[] {
|
||||
ItemFluidIcon.make(Fluids.HEAVYOIL_VACUUM, vac_frac_heavy * 10),
|
||||
ItemFluidIcon.make(Fluids.REFORMATE, vac_frac_reform * 10),
|
||||
ItemFluidIcon.make(Fluids.LIGHTOIL_VACUUM, vac_frac_light * 10),
|
||||
ItemFluidIcon.make(Fluids.SOURGAS, vac_frac_sour * 10) });
|
||||
|
||||
for(Entry<FluidType, Quartet<FluidStack, FluidStack, FluidStack, FluidStack>> recipe : vacuum.entrySet()) {
|
||||
|
||||
Quartet<FluidStack, FluidStack, FluidStack, FluidStack> fluids = recipe.getValue();
|
||||
|
||||
recipes.put(ItemFluidIcon.make(recipe.getKey(), 1000, 2),
|
||||
new ItemStack[] {
|
||||
ItemFluidIcon.make(fluids.getW().type, fluids.getW().fill * 10),
|
||||
ItemFluidIcon.make(fluids.getX().type, fluids.getX().fill * 10),
|
||||
ItemFluidIcon.make(fluids.getY().type, fluids.getY().fill * 10),
|
||||
ItemFluidIcon.make(fluids.getZ().type, fluids.getZ().fill * 10) });
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
@ -83,9 +100,40 @@ public class RefineryRecipes {
|
||||
new FluidStack(Fluids.UNSATURATEDS, crack_frac_unsat),
|
||||
DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK)
|
||||
));
|
||||
refinery.put(Fluids.HOTOIL_DS, new Quintet(
|
||||
new FluidStack(Fluids.HEAVYOIL, oilds_frac_heavy),
|
||||
new FluidStack(Fluids.NAPHTHA_DS, oilds_frac_naph),
|
||||
new FluidStack(Fluids.LIGHTOIL_DS, oilds_frac_light),
|
||||
new FluidStack(Fluids.UNSATURATEDS, oilds_frac_unsat),
|
||||
DictFrame.fromOne(ModItems.oil_tar, EnumTarType.PARAFFIN)
|
||||
));
|
||||
refinery.put(Fluids.HOTCRACKOIL_DS, new Quintet(
|
||||
new FluidStack(Fluids.NAPHTHA_DS, crackds_frac_naph),
|
||||
new FluidStack(Fluids.LIGHTOIL_DS, crackds_frac_light),
|
||||
new FluidStack(Fluids.AROMATICS, crackds_frac_aroma),
|
||||
new FluidStack(Fluids.UNSATURATEDS, crackds_frac_unsat),
|
||||
DictFrame.fromOne(ModItems.oil_tar, EnumTarType.PARAFFIN)
|
||||
));
|
||||
|
||||
vacuum.put(Fluids.OIL, new Quartet(
|
||||
new FluidStack(Fluids.HEAVYOIL_VACUUM, vac_frac_heavy),
|
||||
new FluidStack(Fluids.REFORMATE, vac_frac_reform),
|
||||
new FluidStack(Fluids.LIGHTOIL_VACUUM, vac_frac_light),
|
||||
new FluidStack(Fluids.SOURGAS, vac_frac_sour)
|
||||
));
|
||||
vacuum.put(Fluids.OIL_DS, new Quartet(
|
||||
new FluidStack(Fluids.HEAVYOIL_VACUUM, vac_frac_heavy),
|
||||
new FluidStack(Fluids.REFORMATE, vac_frac_reform),
|
||||
new FluidStack(Fluids.LIGHTOIL_VACUUM, vac_frac_light),
|
||||
new FluidStack(Fluids.REFORMGAS, vac_frac_sour)
|
||||
));
|
||||
}
|
||||
|
||||
public static Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> getRefinery(FluidType oil) {
|
||||
return refinery.get(oil);
|
||||
}
|
||||
|
||||
public static Quartet<FluidStack, FluidStack, FluidStack, FluidStack> getVacuum(FluidType oil) {
|
||||
return vacuum.get(oil);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,6 +66,11 @@ public class ItemEnums {
|
||||
DIGAMMAFOROURRIGHT
|
||||
}
|
||||
|
||||
public static enum EnumFuelAdditive {
|
||||
ANTIKNOCK,
|
||||
DEICER
|
||||
}
|
||||
|
||||
public static enum EnumPages {
|
||||
PAGE1, PAGE2, PAGE3, PAGE4, PAGE5, PAGE6, PAGE7, PAGE8
|
||||
}
|
||||
|
||||
@ -923,7 +923,7 @@ public class ModItems {
|
||||
public static Item inf_water;
|
||||
public static Item inf_water_mk2;
|
||||
|
||||
public static Item antiknock;
|
||||
public static Item fuel_additive;
|
||||
|
||||
public static Item canister_empty;
|
||||
public static Item canister_full;
|
||||
@ -3320,7 +3320,7 @@ public class ModItems {
|
||||
thermo_element = new Item().setUnlocalizedName("thermo_element").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":thermo_element");
|
||||
catalytic_converter = new Item().setUnlocalizedName("catalytic_converter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":catalytic_converter");
|
||||
|
||||
antiknock = new Item().setUnlocalizedName("antiknock").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":antiknock");
|
||||
fuel_additive = new ItemEnumMulti(ItemEnums.EnumFuelAdditive.class, true, true).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_full = new ItemCanister().setUnlocalizedName("canister_full").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_empty");
|
||||
@ -6406,7 +6406,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(inf_water_mk2, inf_water_mk2.getUnlocalizedName());
|
||||
|
||||
//Canisters
|
||||
GameRegistry.registerItem(antiknock, antiknock.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fuel_additive, fuel_additive.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_empty, canister_empty.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_full, canister_full.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_napalm, canister_napalm.getUnlocalizedName());
|
||||
|
||||
@ -34,7 +34,7 @@ public class ItemDrone extends ItemEnumMulti {
|
||||
|
||||
if(stack.getItemDamage() < 4) {
|
||||
toSpawn = new EntityDeliveryDrone(world);
|
||||
if(stack.getItemDamage() % 2 == 0) {
|
||||
if(stack.getItemDamage() % 2 == 1) {
|
||||
((EntityDeliveryDrone) toSpawn).setChunkLoading();
|
||||
}
|
||||
if(stack.getItemDamage() > 1) {
|
||||
|
||||
@ -1223,6 +1223,7 @@ public class MainRegistry {
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
remapItems.put("hbm:item.man_explosive8", ModItems.explosive_lenses);
|
||||
remapItems.put("hbm:item.briquette_lignite", ModItems.briquette);
|
||||
remapItems.put("hbm:item.antiknock", ModItems.fuel_additive);
|
||||
|
||||
for(MissingMapping mapping : event.get()) {
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ public class TileEntityMachineHydrotreater extends TileEntityMachineBase impleme
|
||||
|
||||
this.tanks = new FluidTank[4];
|
||||
this.tanks[0] = new FluidTank(Fluids.OIL, 64_000);
|
||||
this.tanks[1] = new FluidTank(Fluids.HYDROGEN, 64_000);
|
||||
this.tanks[1] = new FluidTank(Fluids.HYDROGEN, 64_000).withPressure(1);
|
||||
this.tanks[2] = new FluidTank(Fluids.NONE, 24_000);
|
||||
this.tanks[3] = new FluidTank(Fluids.SOURGAS, 24_000);
|
||||
}
|
||||
@ -61,7 +61,7 @@ public class TileEntityMachineHydrotreater extends TileEntityMachineBase impleme
|
||||
tanks[0].loadTank(1, 2, slots);
|
||||
tanks[1].loadTank(3, 4, slots);
|
||||
|
||||
reform();
|
||||
if(worldObj.getTotalWorldTime() % 2 == 0) reform();
|
||||
|
||||
tanks[2].unloadTank(5, 6, slots);
|
||||
tanks[3].unloadTank(7, 8, slots);
|
||||
@ -85,7 +85,7 @@ public class TileEntityMachineHydrotreater extends TileEntityMachineBase impleme
|
||||
return;
|
||||
}
|
||||
|
||||
tanks[1].setTankType(out.getX().type);
|
||||
tanks[1].withPressure(out.getX().pressure).setTankType(out.getX().type);
|
||||
tanks[2].setTankType(out.getY().type);
|
||||
tanks[3].setTankType(out.getZ().type);
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
@ -46,12 +45,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineRefinery extends TileEntityMachineBase implements IEnergyUser, IControlReceiver, IOverpressurable, IPersistentNBT, IRepairable, IFluidStandardTransceiver, IGUIProvider {
|
||||
public class TileEntityMachineRefinery extends TileEntityMachineBase implements IEnergyUser, IOverpressurable, IPersistentNBT, IRepairable, IFluidStandardTransceiver, IGUIProvider {
|
||||
|
||||
public long power = 0;
|
||||
public int sulfur = 0;
|
||||
@ -70,7 +68,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
private static final int[] slot_access = new int[] {11};
|
||||
|
||||
public TileEntityMachineRefinery() {
|
||||
super(12);
|
||||
super(13);
|
||||
tanks = new FluidTank[5];
|
||||
tanks[0] = new FluidTank(Fluids.HOTOIL, 64_000);
|
||||
tanks[1] = new FluidTank(Fluids.HEAVYOIL, 24_000);
|
||||
@ -157,6 +155,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
this.updateConnections();
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
tanks[0].setType(12, slots);
|
||||
tanks[0].loadTank(1, 2, slots);
|
||||
|
||||
refine();
|
||||
@ -268,17 +267,16 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
|
||||
private void refine() {
|
||||
Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> refinery = RefineryRecipes.getRefinery(tanks[0].getTankType());
|
||||
|
||||
if(refinery == null) //usually not possible
|
||||
if(refinery == null) {
|
||||
for(int i = 1; i < 5; i++) tanks[i].setTankType(Fluids.NONE);
|
||||
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);
|
||||
for(int i = 0; i < stacks.length; i++) tanks[i + 1].setTankType(stacks[i].type);
|
||||
|
||||
if(power < 5 || tanks[0].getFill() < 100)
|
||||
return;
|
||||
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()) {
|
||||
@ -289,8 +287,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
this.isOn = true;
|
||||
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);
|
||||
for(int i = 0; i < stacks.length; i++) tanks[i + 1].setFill(tanks[i + 1].getFill() + stacks[i].fill);
|
||||
|
||||
this.sulfur++;
|
||||
|
||||
@ -315,7 +312,6 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
}
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 5);
|
||||
|
||||
this.power -= 5;
|
||||
}
|
||||
|
||||
@ -370,28 +366,6 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
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")) {
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.tryUnsubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
if(tanks[0].getTankType() == Fluids.HOTOIL) {
|
||||
tanks[0].setTankType(Fluids.HOTCRACKOIL);
|
||||
} else {
|
||||
tanks[0].setTankType(Fluids.HOTOIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] { tanks[1], tanks[2], tanks[3], tanks[4] };
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.tileentity.machine.oil;
|
||||
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.container.ContainerMachineVacuumDistill;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -12,6 +13,7 @@ import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.Tuple.Quartet;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
@ -38,7 +40,7 @@ public class TileEntityMachineVacuumDistill extends TileEntityMachineBase implem
|
||||
public boolean isOn;
|
||||
|
||||
public TileEntityMachineVacuumDistill() {
|
||||
super(11);
|
||||
super(12);
|
||||
|
||||
this.tanks = new FluidTank[5];
|
||||
this.tanks[0] = new FluidTank(Fluids.OIL, 64_000).withPressure(2);
|
||||
@ -62,6 +64,7 @@ public class TileEntityMachineVacuumDistill extends TileEntityMachineBase implem
|
||||
|
||||
this.updateConnections();
|
||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
tanks[0].setType(11, slots);
|
||||
tanks[0].loadTank(1, 2, slots);
|
||||
|
||||
refine();
|
||||
@ -147,21 +150,24 @@ public class TileEntityMachineVacuumDistill extends TileEntityMachineBase implem
|
||||
}
|
||||
|
||||
private void refine() {
|
||||
Quartet<FluidStack, FluidStack, FluidStack, FluidStack> refinery = RefineryRecipes.getVacuum(tanks[0].getTankType());
|
||||
if(refinery == null) {
|
||||
for(int i = 1; i < 5; i++) tanks[i].setTankType(Fluids.NONE);
|
||||
return;
|
||||
}
|
||||
|
||||
FluidStack[] stacks = new FluidStack[] {refinery.getW(), refinery.getX(), refinery.getY(), refinery.getZ()};
|
||||
for(int i = 0; i < stacks.length; i++) tanks[i + 1].setTankType(stacks[i].type);
|
||||
|
||||
if(power < 10_000) return;
|
||||
if(tanks[0].getFill() < 100) return;
|
||||
if(tanks[1].getFill() + RefineryRecipes.vac_frac_heavy > tanks[1].getMaxFill()) return;
|
||||
if(tanks[2].getFill() + RefineryRecipes.vac_frac_reform > tanks[2].getMaxFill()) return;
|
||||
if(tanks[3].getFill() + RefineryRecipes.vac_frac_light > tanks[3].getMaxFill()) return;
|
||||
if(tanks[4].getFill() + RefineryRecipes.vac_frac_sour > tanks[4].getMaxFill()) return;
|
||||
for(int i = 0; i < stacks.length; i++) if(tanks[i + 1].getFill() + stacks[i].fill > tanks[i + 1].getMaxFill()) return;
|
||||
|
||||
this.isOn = true;
|
||||
power -= 10_000;
|
||||
tanks[0].setFill(tanks[0].getFill() - 100);
|
||||
tanks[1].setFill(tanks[1].getFill() + RefineryRecipes.vac_frac_heavy);
|
||||
tanks[2].setFill(tanks[2].getFill() + RefineryRecipes.vac_frac_reform);
|
||||
tanks[3].setFill(tanks[3].getFill() + RefineryRecipes.vac_frac_light);
|
||||
tanks[4].setFill(tanks[4].getFill() + RefineryRecipes.vac_frac_sour);
|
||||
|
||||
for(int i = 0; i < stacks.length; i++) tanks[i + 1].setFill(tanks[i + 1].getFill() + stacks[i].fill);
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
|
||||
@ -226,18 +226,21 @@ chem.GASOLINE=Benzinherstellung
|
||||
chem.GASOLINE_LEADED=Bleibenzin mischen
|
||||
chem.HELIUM3=Helium-3-Extraktion aus Mondgestein
|
||||
chem.KEVLAR=Kevlarverbundherstellung
|
||||
chem.LAMINATE=Laminatherstellung
|
||||
chem.LPG=Petroleumgasverflüssigung
|
||||
chem.LUBRICANT=Schmieröl mischen
|
||||
chem.NITAN=NITAN-Supertreibstoff mischen
|
||||
chem.NITRIC_ACID=Salpetersäureherstellung
|
||||
chem.OIL_SAND=Teersand-Extraktion
|
||||
chem.OSMIRIDIUM_DEATH=Osmiridiumlösung-Herstellung
|
||||
chem.PC=Polycarbonatherstellung
|
||||
chem.PC_ELECTROLYSIS=Kaliumchloridelektrolyse
|
||||
chem.PEROXIDE=Wasserstoffperoxidherstellung
|
||||
chem.PET=PET-Synthese
|
||||
chem.PETROIL_LEADED=Bleigemisch mischen
|
||||
chem.POLYMER=Polymersynthese
|
||||
chem.PUF6=Plutoniumhexafluoridproduktion
|
||||
chem.PVC=Polyvinylchloridherstellung
|
||||
chem.RUBBER=Gummiherstellung
|
||||
chem.SAS3=Schrabidiumtrisulfatherstellung
|
||||
chem.SATURN=Saturnitherstellung
|
||||
@ -258,6 +261,9 @@ chem.SF_PETROIL=Gemischverfestigung
|
||||
chem.SF_PETROLEUM=Petroleumgasverfestigung
|
||||
chem.SF_RECLAIMED=Verfestigung von wiederaufbereitetem Industrieöl
|
||||
chem.SF_SMEAR=Industrieölverfestigung
|
||||
chem.SHELL_CHLORINE=Chlorgas-Artilleriegeschoss-Herstellung
|
||||
chem.SHELL_MUSTARD=Senfgas-Artilleriegeschoss-Herstellung
|
||||
chem.SHELL_PHOSGENE=Phosgen-Artilleriegeschoss-Herstellung
|
||||
chem.SOLID_FUEL=Festbrennstoffherstellung
|
||||
chem.SOLVENT=Organisches Lösungsmittel mischen
|
||||
chem.STEAM=Wasser kochen
|
||||
@ -1120,7 +1126,6 @@ item.ams_lens.name=Stabilisierer-Linse
|
||||
item.ams_muzzle.name=Strahlenemissions-Mündung
|
||||
item.analyzer.name=Analysierer
|
||||
item.anchor_remote.name=Rückrufgerät
|
||||
item.antiknock.name=Tetraethyblei-Antiklopfmittel
|
||||
item.apple_euphemium.name=Euphemiumapfel
|
||||
item.apple_lead.name=Bleiapfel
|
||||
item.apple_schrabidium.name=Schrabidiumapfel
|
||||
@ -1826,6 +1831,8 @@ item.fragment_lanthanium.name=Lanthanfragment
|
||||
item.fragment_meteorite.name=Meteoritenfragment
|
||||
item.fragment_neodymium.name=Neodymfragment
|
||||
item.fragment_niobium.name=Niobium Ffragment
|
||||
item.fuel_additive.antiknock.name=Tetraethyblei-Antiklopfmittel
|
||||
item.fuel_additive.deicer.name=Enteisungsmittel
|
||||
item.fuel_tank_large.name=Großer Treibstofftank
|
||||
item.fuel_tank_medium.name=Mittlerer Treibstofftank
|
||||
item.fuel_tank_small.name=Kleiner Treibstofftank
|
||||
|
||||
@ -576,6 +576,7 @@ chem.GASOLINE_LEADED=Leaded Gasoline Mixing
|
||||
chem.HEAVY_ELECTROLYSIS=Heavy Water Cryo-Electrolysis
|
||||
chem.HELIUM3=Helium-3 Extraction from Moon Turf
|
||||
chem.KEVLAR=Kevlar Compound Production
|
||||
chem.LAMINATE=Laminate Production
|
||||
chem.LPG=Petroleum Gas Liquefaction
|
||||
chem.LUBRICANT=Lubricant Mixing
|
||||
chem.METH=Methamphetamine Synthesis
|
||||
@ -584,12 +585,14 @@ chem.NITAN=NITAN Super Fuel Mixing
|
||||
chem.NITRIC_ACID=Nitric Acid Production
|
||||
chem.OIL_SAND=Tar Sand Extraction
|
||||
chem.OSMIRIDIUM_DEATH=Osmiridic Solution Production
|
||||
chem.PC=Polycarbonate Synthesis
|
||||
chem.PC_ELECTROLYSIS=Potassium Chloride Electrolysis
|
||||
chem.PEROXIDE=Hydrogen Peroxide Production
|
||||
chem.PET=PET Synthesis
|
||||
chem.PETROIL_LEADED=Leaded Petroil Mixing
|
||||
chem.POLYMER=Polymer Synthesis
|
||||
chem.PUF6=Plutonium Hexafluoride Production
|
||||
chem.PVC=Polyvinylchloride Synthesis
|
||||
chem.RUBBER=Rubber Production
|
||||
chem.SAS3=Schrabidium Trisulfide Production
|
||||
chem.SATURN=Saturnite Production
|
||||
@ -610,6 +613,9 @@ chem.SF_PETROIL=Petroil Solidification
|
||||
chem.SF_PETROLEUM=Petroleum Gas Solidification
|
||||
chem.SF_RECLAIMED=Reclaimed Oil Solidification
|
||||
chem.SF_SMEAR=Industrial Oil Solidification
|
||||
chem.SHELL_CHLORINE=Chlorine Gas Artillery Shell Production
|
||||
chem.SHELL_MUSTARD=Mustard Gas Artillery Shell Production
|
||||
chem.SHELL_PHOSGENE=Phosgene Artillery Shell Production
|
||||
chem.SOLID_FUEL=Solid Rocket Fuel Production
|
||||
chem.SOLVENT=Organic Solvent Mixing
|
||||
chem.STEAM=Water Boiling
|
||||
@ -1780,7 +1786,6 @@ item.ams_muzzle.desc=...it emits an energy-beam thingy.
|
||||
item.analysis_tool.name=Analysis Tool
|
||||
item.analyzer.name=Analyzer
|
||||
item.anchor_remote.name=Recall Device
|
||||
item.antiknock.name=Tetraethyllead Antiknock Agent
|
||||
item.apple_euphemium.name=Euphemium Apple
|
||||
item.apple_lead.name=Lead Apple
|
||||
item.apple_schrabidium.name=Schrabidium Apple
|
||||
@ -2548,6 +2553,8 @@ item.fragment_lanthanium.name=Lanthanium Fragment
|
||||
item.fragment_meteorite.name=Meteorite Fragment
|
||||
item.fragment_neodymium.name=Neodymium Fragment
|
||||
item.fragment_niobium.name=Niobium Fragment
|
||||
item.fuel_additive.antiknock.name=Tetraethyllead Antiknock Agent
|
||||
item.fuel_additive.deicer.name=Deicer
|
||||
item.fuel_tank_large.name=Large Fuel Tank
|
||||
item.fuel_tank_medium.name=Medium Fuel Tank
|
||||
item.fuel_tank_small.name=Small Fuel Tank
|
||||
@ -3667,7 +3674,6 @@ item.power_net_tool.name=Cable Network Analysis Tool
|
||||
item.pipette.name=Pipette
|
||||
item.pipette_boron.name=Boron Pipette
|
||||
item.pipette_laboratory.name=Laboratory Grade Pipette
|
||||
item.siphon.name=Siphon
|
||||
item.primer_357.name=.357 Magnum Primer (x24)
|
||||
item.primer_44.name=.44 Magnum Primer (x24)
|
||||
item.primer_50.name=Large Caliber Primer (x12)
|
||||
@ -4075,6 +4081,7 @@ item.singularity_spark.name=Spark Singularity
|
||||
item.singularity_super_heated.name=Superheated Resonating Singularity
|
||||
item.siox.name=SiOX Cancer Medication
|
||||
item.siox.desc=Reverses mesothelioma with the power of Asbestos!
|
||||
item.siphon.name=Siphon
|
||||
item.siren_track.name=Siren Track
|
||||
item.sliding_blast_door_skin.0.name=Sliding Blast Door Skin: Default
|
||||
item.sliding_blast_door_skin.1.name=Sliding Blast Door Skin: Variant 1
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 292 B |