mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
irradiation column NEI handler, config, high-perf solvent, petroleum wax
This commit is contained in:
parent
0d25949106
commit
a22c8284ee
27
src/main/java/com/hbm/handler/nei/OutgasserHandler.java
Normal file
27
src/main/java/com/hbm/handler/nei/OutgasserHandler.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.gui.GUIRBMKOutgasser;
|
||||
import com.hbm.inventory.recipes.OutgasserRecipes;
|
||||
|
||||
public class OutgasserHandler extends NEIUniversalHandler {
|
||||
|
||||
public OutgasserHandler() {
|
||||
super("Irradiation", ModBlocks.rbmk_outgasser, OutgasserRecipes.getRecipes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return "ntmOutgasser";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
super.loadTransferRects();
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(75, 26, 16, 32), "ntmOutgasser"));
|
||||
guiGui.add(GUIRBMKOutgasser.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
}
|
||||
@ -271,7 +271,7 @@ public class OreDictManager {
|
||||
public static final DictFrame ANY_COKE = new DictFrame("AnyCoke", "Coke");
|
||||
public static final DictFrame ANY_CONCRETE = new DictFrame("Concrete"); //no any prefix means that any has to be appended with the any() or anys() getters, registering works with the any (i.e. no shape) setter
|
||||
public static final DictGroup ANY_TAR = new DictGroup("Tar", KEY_OIL_TAR, KEY_COAL_TAR, KEY_CRACK_TAR, KEY_WOOD_TAR);
|
||||
/** Any special psot-RBMK gating material, namely bismuth and arsenic */
|
||||
/** Any special post-RBMK gating material, namely bismuth and arsenic */
|
||||
public static final DictFrame ANY_BISMOID = new DictFrame("AnyBismoid");
|
||||
|
||||
public static void registerOres() {
|
||||
@ -512,6 +512,7 @@ public class OreDictManager {
|
||||
OreDictionary.registerOre("dyeBlack", fromOne(oil_tar, EnumTarType.CRACK));
|
||||
OreDictionary.registerOre("dyeGray", fromOne(oil_tar, EnumTarType.COAL));
|
||||
OreDictionary.registerOre("dyeBrown", fromOne(oil_tar, EnumTarType.WOOD));
|
||||
OreDictionary.registerOre("dyeCyan", fromOne(oil_tar, EnumTarType.WAX));
|
||||
OreDictionary.registerOre("dye", oil_tar);
|
||||
|
||||
OreDictionary.registerOre("blockGlass", glass_boron);
|
||||
|
||||
@ -102,6 +102,7 @@ public class Fluids {
|
||||
public static FluidType BLOOD_HOT;
|
||||
public static FluidType SYNGAS;
|
||||
public static FluidType OXYHYDROGEN;
|
||||
public static FluidType RADIOSOLVENT;
|
||||
|
||||
private static final HashMap<Integer, FluidType> idMapping = new HashMap();
|
||||
private static final HashMap<String, FluidType> nameMapping = new HashMap();
|
||||
@ -215,11 +216,12 @@ public class Fluids {
|
||||
COALCREOSOTE = new FluidType("COALCREOSOTE", 0x51694F, 3, 2, 0, EnumSymbol.NONE).addContainers(0x285A3F, ExtContainer.CANISTER).addTraits(LIQUID);
|
||||
SEEDSLURRY = new FluidType("SEEDSLURRY", 0x7CC35E, 0, 0, 0, EnumSymbol.NONE).addContainers(0x7CC35E, ExtContainer.CANISTER).addTraits(LIQUID);
|
||||
NITRIC_ACID = new FluidType("NITRIC_ACID", 0xBB7A1E, 3, 0, 2, EnumSymbol.OXIDIZER).addTraits(LIQUID, new FT_Corrosive(60));
|
||||
SOLVENT = new FluidType("SOLVENT", 0xE4E3EF, 2, 3, 0, EnumSymbol.NONE).addContainers(0xE4E3EF, ExtContainer.CANISTER).addTraits(LIQUID);
|
||||
SOLVENT = new FluidType("SOLVENT", 0xE4E3EF, 2, 3, 0, EnumSymbol.NONE).addContainers(0xE4E3EF, ExtContainer.CANISTER).addTraits(LIQUID, new FT_Corrosive(30));
|
||||
BLOOD = new FluidType("BLOOD", 0xB22424, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
BLOOD_HOT = new FluidType("BLOOD_HOT", 0xF22419, 3, 0, 0, EnumSymbol.NONE).addTraits(LIQUID).setTemp(666); //it's funny because it's the satan number
|
||||
SYNGAS = new FluidType("SYNGAS", 0x131313, 1, 4, 2, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
OXYHYDROGEN = new FluidType(87, "OXYHYDROGEN", 0x483FC1, 0, 4, 2, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
OXYHYDROGEN = new FluidType("OXYHYDROGEN", 0x483FC1, 0, 4, 2, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
RADIOSOLVENT = new FluidType(88, "RADIOSOLVENT", 0xA4D7DD, 3, 3, 0, EnumSymbol.NONE).addTraits(LIQUID, LEADCON, new FT_Corrosive(50), new FT_VentRadiation(0.01F));
|
||||
|
||||
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
@ -302,6 +304,7 @@ public class Fluids {
|
||||
metaOrder.add(SULFURIC_ACID);
|
||||
metaOrder.add(NITRIC_ACID);
|
||||
metaOrder.add(SOLVENT);
|
||||
metaOrder.add(RADIOSOLVENT);
|
||||
metaOrder.add(SCHRABIDIC);
|
||||
metaOrder.add(UF6);
|
||||
metaOrder.add(PUF6);
|
||||
@ -426,6 +429,7 @@ public class Fluids {
|
||||
registerCalculatedFuel(COALCREOSOTE, 250_000 /* 20_000 TU per 100mB + a bonus */, 0, null);
|
||||
|
||||
registerCalculatedFuel(SOLVENT, 100_000, 0, null); // flammable, sure, but not combustable
|
||||
registerCalculatedFuel(RADIOSOLVENT, 150_000, 0, null);
|
||||
|
||||
registerCalculatedFuel(SYNGAS, (coalHeat * (1000 /* bucket */ / 100 /* mB per coal */) * flammabilityLow * demandLow * complexityChemplant) * 1.5, 1.25, FuelGrade.GAS); //same as coal oil, +50% bonus
|
||||
registerCalculatedFuel(OXYHYDROGEN, 5_000, 3, FuelGrade.GAS); // whatever
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemChemicalDye.EnumChemDye;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
@ -118,6 +119,9 @@ public class CrystallizerRecipes {
|
||||
registerRecipe(W.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.YELLOW, 4), 20), woodOil);
|
||||
registerRecipe(CU.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.GREEN, 4), 20), woodOil);
|
||||
registerRecipe(CO.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLUE, 4), 20), woodOil);
|
||||
|
||||
registerRecipe(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE)), new CrystallizerRecipe(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.WAX), 20), new FluidStack(Fluids.AROMATICS, 250));
|
||||
registerRecipe(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK)), new CrystallizerRecipe(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.WAX), 20), new FluidStack(Fluids.AROMATICS, 100));
|
||||
|
||||
List<ItemStack> quartz = OreDictionary.getOres("crystalCertusQuartz");
|
||||
|
||||
|
||||
155
src/main/java/com/hbm/inventory/recipes/OutgasserRecipes.java
Normal file
155
src/main/java/com/hbm/inventory/recipes/OutgasserRecipes.java
Normal file
@ -0,0 +1,155 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class OutgasserRecipes extends SerializableRecipe {
|
||||
|
||||
public static Map<AStack, Pair<ItemStack, FluidStack>> recipes = new HashMap();
|
||||
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
/* lithium to tritium */
|
||||
recipes.put(new OreDictStack(LI.block()), new Pair(null, new FluidStack(Fluids.TRITIUM, 10_000)));
|
||||
recipes.put(new OreDictStack(LI.ingot()), new Pair(null, new FluidStack(Fluids.TRITIUM, 1_000)));
|
||||
recipes.put(new OreDictStack(LI.dust()), new Pair(null, new FluidStack(Fluids.TRITIUM, 1_000)));
|
||||
recipes.put(new OreDictStack(LI.dustTiny()), new Pair(null, new FluidStack(Fluids.TRITIUM, 100)));
|
||||
|
||||
/* gold to gold-198 */
|
||||
recipes.put(new OreDictStack(GOLD.ingot()), new Pair(new ItemStack(ModItems.ingot_au198), null));
|
||||
recipes.put(new OreDictStack(GOLD.nugget()), new Pair(new ItemStack(ModItems.nugget_au198), null));
|
||||
recipes.put(new OreDictStack(GOLD.dust()), new Pair(new ItemStack(ModItems.powder_au198), null));
|
||||
|
||||
/* thorium to thorium fuel */
|
||||
recipes.put(new OreDictStack(TH232.ingot()), new Pair(new ItemStack(ModItems.ingot_thorium_fuel), null));
|
||||
recipes.put(new OreDictStack(TH232.nugget()), new Pair(new ItemStack(ModItems.nugget_thorium_fuel), null));
|
||||
recipes.put(new OreDictStack(TH232.billet()), new Pair(new ItemStack(ModItems.billet_thorium_fuel), null));
|
||||
|
||||
/* mushrooms to glowing mushrooms */
|
||||
recipes.put(new ComparableStack(Blocks.brown_mushroom), new Pair(new ItemStack(ModBlocks.mush), null));
|
||||
recipes.put(new ComparableStack(Blocks.red_mushroom), new Pair(new ItemStack(ModBlocks.mush), null));
|
||||
recipes.put(new ComparableStack(Items.mushroom_stew), new Pair(new ItemStack(ModItems.glowing_stew), null));
|
||||
|
||||
recipes.put(new OreDictStack(COAL.gem()), new Pair(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.COAL, 1), new FluidStack(Fluids.SYNGAS, 50)));
|
||||
recipes.put(new OreDictStack(COAL.dust()), new Pair(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.COAL, 1), new FluidStack(Fluids.SYNGAS, 50)));
|
||||
recipes.put(new OreDictStack(COAL.block()), new Pair(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.COAL, 9), new FluidStack(Fluids.SYNGAS, 500)));
|
||||
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.COAL)), new Pair(null, new FluidStack(Fluids.COALOIL, 100)));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.WAX)), new Pair(null, new FluidStack(Fluids.RADIOSOLVENT, 100)));
|
||||
}
|
||||
|
||||
public static Pair<ItemStack, FluidStack> getOutput(ItemStack input) {
|
||||
|
||||
ComparableStack comp = new ComparableStack(input).makeSingular();
|
||||
|
||||
if(recipes.containsKey(comp)) {
|
||||
return recipes.get(comp);
|
||||
}
|
||||
|
||||
String[] dictKeys = comp.getDictKeys();
|
||||
|
||||
for(String key : dictKeys) {
|
||||
OreDictStack dict = new OreDictStack(key);
|
||||
if(recipes.containsKey(dict)) {
|
||||
return recipes.get(dict);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
|
||||
HashMap<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
|
||||
for(Entry<AStack, Pair<ItemStack, FluidStack>> entry : OutgasserRecipes.recipes.entrySet()) {
|
||||
|
||||
AStack input = entry.getKey();
|
||||
ItemStack solidOutput = entry.getValue().getKey();
|
||||
FluidStack fluidOutput = entry.getValue().getValue();
|
||||
|
||||
if(solidOutput != null && fluidOutput != null) recipes.put(input, new Object[] {solidOutput, ItemFluidIcon.make(fluidOutput)});
|
||||
if(solidOutput != null && fluidOutput == null) recipes.put(input, new Object[] {solidOutput});
|
||||
if(solidOutput == null && fluidOutput != null) recipes.put(input, new Object[] {ItemFluidIcon.make(fluidOutput)});
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmIrradiation.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getRecipeObject() {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readRecipe(JsonElement recipe) {
|
||||
JsonObject obj = (JsonObject) recipe;
|
||||
|
||||
AStack input = this.readAStack(obj.get("input").getAsJsonArray());
|
||||
ItemStack solidOutput = null;
|
||||
FluidStack fluidOutput = null;
|
||||
|
||||
if(obj.has("solidOutput")) {
|
||||
solidOutput = this.readItemStack(obj.get("solidOutput").getAsJsonArray());
|
||||
}
|
||||
|
||||
if(obj.has("fluidOutput")) {
|
||||
fluidOutput = this.readFluidStack(obj.get("fluidOutput").getAsJsonArray());
|
||||
}
|
||||
|
||||
if(solidOutput != null || fluidOutput != null) {
|
||||
this.recipes.put(input, new Pair(solidOutput, fluidOutput));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
|
||||
Entry<AStack, Pair<ItemStack, FluidStack>> rec = (Entry<AStack, Pair<ItemStack, FluidStack>>) recipe;
|
||||
|
||||
writer.name("input");
|
||||
this.writeAStack(rec.getKey(), writer);
|
||||
|
||||
if(rec.getValue().getKey() != null) {
|
||||
writer.name("solidOutput");
|
||||
this.writeItemStack(rec.getValue().getKey(), writer);
|
||||
}
|
||||
|
||||
if(rec.getValue().getValue() != null) {
|
||||
writer.name("fluidOutput");
|
||||
this.writeFluidStack(rec.getValue().getValue(), writer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRecipes() {
|
||||
recipes.clear();
|
||||
}
|
||||
}
|
||||
@ -52,6 +52,7 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(new HadronRecipes());
|
||||
recipeHandlers.add(new FuelPoolRecipes());
|
||||
recipeHandlers.add(new MixerRecipes());
|
||||
recipeHandlers.add(new OutgasserRecipes());
|
||||
recipeHandlers.add(new MatDistribution());
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,8 @@ public class ItemEnums {
|
||||
CRUDE,
|
||||
CRACK,
|
||||
COAL,
|
||||
WOOD
|
||||
WOOD,
|
||||
WAX
|
||||
}
|
||||
|
||||
public static enum EnumBriquetteType {
|
||||
|
||||
@ -65,8 +65,9 @@ public class NEIConfig implements IConfigureNEI {
|
||||
registerHandler(new CombinationHandler());
|
||||
registerHandler(new SawmillHandler());
|
||||
registerHandler(new MixerHandler());
|
||||
registerHandler(new OutgasserHandler());
|
||||
|
||||
registerHandler(new ChunkyHandler());
|
||||
//registerHandler(new ChunkyHandler());
|
||||
|
||||
//Some things are even beyond my control...or are they?
|
||||
API.hideItem(ItemBattery.getEmptyBattery(ModItems.memory));
|
||||
|
||||
@ -1,23 +1,16 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.container.ContainerRBMKOutgasser;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIRBMKOutgasser;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.inventory.recipes.OutgasserRecipes;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardSender;
|
||||
@ -25,23 +18,20 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implements IRBMKFluxReceiver, IFluidSource, IFluidStandardSender {
|
||||
public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implements IRBMKFluxReceiver, IFluidStandardSender {
|
||||
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
public FluidTank gas;
|
||||
public double progress;
|
||||
public static final int duration = 10000;
|
||||
|
||||
public TileEntityRBMKOutgasser() {
|
||||
super(2);
|
||||
gas = new FluidTank(Fluids.TRITIUM, 64000, 0);
|
||||
gas = new FluidTank(Fluids.TRITIUM, 64000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,14 +43,11 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
gas.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0)
|
||||
fillFluidInit(gas.getTankType());
|
||||
|
||||
if(!canProcess()) {
|
||||
this.progress = 0;
|
||||
}
|
||||
|
||||
for(DirPos pos : getOutputPos()) {
|
||||
if(this.gas.getFill() > 0) this.sendFluid(gas.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
@ -113,155 +100,52 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
}
|
||||
}
|
||||
|
||||
private static HashMap<Object, ItemStack> recipes = new HashMap();
|
||||
|
||||
static {
|
||||
recipes.put("blockLithium", ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, Fluids.TRITIUM.getID()), 10000));
|
||||
recipes.put("ingotLithium", ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, Fluids.TRITIUM.getID()), 1000));
|
||||
recipes.put("dustLithium", ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, Fluids.TRITIUM.getID()), 1000));
|
||||
recipes.put(new ComparableStack(ModItems.powder_lithium_tiny), ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, Fluids.TRITIUM.getID()), 100));
|
||||
recipes.put("ingotGold", new ItemStack(ModItems.ingot_au198));
|
||||
recipes.put("nuggetGold", new ItemStack(ModItems.nugget_au198));
|
||||
recipes.put("dustGold", new ItemStack(ModItems.powder_au198));
|
||||
recipes.put("ingotThorium", new ItemStack(ModItems.ingot_thorium_fuel));
|
||||
recipes.put("nuggetThorium", new ItemStack(ModItems.nugget_thorium_fuel));
|
||||
recipes.put("billetThorium", new ItemStack(ModItems.billet_thorium_fuel));
|
||||
recipes.put(new ComparableStack(Blocks.brown_mushroom), new ItemStack(ModBlocks.mush));
|
||||
recipes.put(new ComparableStack(Blocks.red_mushroom), new ItemStack(ModBlocks.mush));
|
||||
recipes.put(new ComparableStack(Items.mushroom_stew), new ItemStack(ModItems.glowing_stew));
|
||||
}
|
||||
|
||||
public boolean canProcess() {
|
||||
|
||||
if(slots[0] == null)
|
||||
return false;
|
||||
|
||||
ItemStack output = getOutput(slots[0]);
|
||||
Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]);
|
||||
|
||||
if(output == null)
|
||||
return false;
|
||||
|
||||
if(output.getItem() == ModItems.fluid_icon) {
|
||||
return output.getItemDamage() == gas.getTankType().getID() && gas.getFill() + ItemFluidIcon.getQuantity(output) <= gas.getMaxFill();
|
||||
FluidStack fluid = output.getValue();
|
||||
|
||||
if(fluid != null) {
|
||||
if(gas.getTankType() != fluid.type && gas.getFill() > 0) return false;
|
||||
gas.setTankType(fluid.type);
|
||||
if(gas.getFill() + fluid.fill > gas.getMaxFill()) return false;
|
||||
}
|
||||
|
||||
if(slots[1] == null)
|
||||
ItemStack out = output.getKey();
|
||||
|
||||
if(slots[1] == null || out == null)
|
||||
return true;
|
||||
|
||||
return slots[1].getItem() == output.getItem() && slots[1].getItemDamage() == output.getItemDamage() && slots[1].stackSize + output.stackSize <= slots[1].getMaxStackSize();
|
||||
}
|
||||
|
||||
public static ItemStack getOutput(ItemStack stack) {
|
||||
|
||||
if(stack == null || stack.getItem() == null)
|
||||
return null;
|
||||
|
||||
ComparableStack comp = new ComparableStack(stack);
|
||||
|
||||
if(recipes.containsKey(comp))
|
||||
return recipes.get(comp);
|
||||
|
||||
String[] dictKeys = comp.getDictKeys();
|
||||
|
||||
for(String key : dictKeys) {
|
||||
|
||||
if(recipes.containsKey(key))
|
||||
return recipes.get(key);
|
||||
}
|
||||
|
||||
return null;
|
||||
return slots[1].getItem() == out.getItem() && slots[1].getItemDamage() == out.getItemDamage() && slots[1].stackSize + out.stackSize <= slots[1].getMaxStackSize();
|
||||
}
|
||||
|
||||
private void process() {
|
||||
|
||||
ItemStack output = getOutput(slots[0]);
|
||||
Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]);
|
||||
this.decrStackSize(0, 1);
|
||||
this.progress = 0;
|
||||
|
||||
if(output.getItem() == ModItems.fluid_icon) {
|
||||
gas.setFill(gas.getFill() + ItemFluidIcon.getQuantity(output));
|
||||
return;
|
||||
if(output.getValue() != null) {
|
||||
gas.setFill(gas.getFill() + output.getValue().fill);
|
||||
}
|
||||
|
||||
if(slots[1] == null) {
|
||||
slots[1] = output.copy();
|
||||
} else {
|
||||
slots[1].stackSize += output.stackSize;
|
||||
ItemStack out = output.getKey();
|
||||
|
||||
if(out != null) {
|
||||
if(slots[1] == null) {
|
||||
slots[1] = out.copy();
|
||||
} else {
|
||||
slots[1].stackSize += out.stackSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, getTact(), type);
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) {
|
||||
|
||||
fillFluid(this.xCoord + 1, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
}
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 2, zCoord) == ModBlocks.rbmk_loader) {
|
||||
|
||||
fillFluid(this.xCoord + 1, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 3, this.zCoord, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated //why are we still doing this?
|
||||
public boolean getTact() { return worldObj.getTotalWorldTime() % 20 < 10; }
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
|
||||
if(index == 0)
|
||||
gas.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
|
||||
if(type == gas.getTankType())
|
||||
gas.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
|
||||
if(index == 0)
|
||||
gas.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
if(type == gas.getTankType())
|
||||
return gas.getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMelt(int reduce) {
|
||||
@ -308,7 +192,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
return getOutput(itemStack) != null && i == 0;
|
||||
return OutgasserRecipes.getOutput(itemStack) != null && i == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -644,6 +644,7 @@ hbmfluid.plasma_hd=Wasserstoff-Deuterium-Plasma
|
||||
hbmfluid.plasma_ht=Wasserstoff-Tritium-Plasma
|
||||
hbmfluid.plasma_xm=Xenon-Quecksilber-Plasma
|
||||
hbmfluid.puf6=Plutoniumhexafluorid
|
||||
hbmfluid.radiosolvent=Hochleistungs-Lösungsmittel
|
||||
hbmfluid.reclaimed=Wiederaufbetreitetes Industrieöl
|
||||
hbmfluid.salient=Saftiges Grün
|
||||
hbmfluid.sas3=Schrabidiumtrisulfat
|
||||
@ -2399,6 +2400,7 @@ item.oil_tar.coal.name=Kohleteer
|
||||
item.oil_tar.name=Ölteer
|
||||
item.oil_tar.crude.name=Erdölteer
|
||||
item.oil_tar.crack.name=Crackölteer
|
||||
item.oil_tar.wax.name=Petroleumwachs
|
||||
item.oil_tar.wood.name=Holzteer
|
||||
item.ore.asbestos=Asbest
|
||||
item.ore.borax=Borax
|
||||
|
||||
@ -1201,6 +1201,7 @@ hbmfluid.plasma_hd=Hydrogen-Deuterium Plasma
|
||||
hbmfluid.plasma_ht=Hydrogen-Tritium Plasma
|
||||
hbmfluid.plasma_xm=Xenon-Mercury Plasma
|
||||
hbmfluid.puf6=Plutonium Hexafluoride
|
||||
hbmfluid.radiosolvent=High-Performance Solvent
|
||||
hbmfluid.reclaimed=Reclaimed Industrial Oil
|
||||
hbmfluid.salient=Salient Green
|
||||
hbmfluid.sas3=Schrabidium Trisulfide
|
||||
@ -3065,6 +3066,7 @@ item.oil_detector.noOil=No oil detected.
|
||||
item.oil_tar.coal.name=Coal Tar
|
||||
item.oil_tar.crude.name=Oil Tar
|
||||
item.oil_tar.crack.name=Crack Oil Tar
|
||||
item.oil_tar.wax.name=Petroleum Wax
|
||||
item.oil_tar.wood.name=Wood Tar
|
||||
item.ore.asbestos=Asbestos
|
||||
item.ore.borax=Borax
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
BIN
src/main/resources/assets/hbm/textures/items/oil_tar.wax.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/oil_tar.wax.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 409 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Loading…
x
Reference in New Issue
Block a user