mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
bap
This commit is contained in:
parent
fa12cfeec1
commit
82f175105c
@ -1,5 +1,10 @@
|
|||||||
## Changed
|
## Changed
|
||||||
|
* Updated russian localization
|
||||||
* Changed the recipe change button on the mixer to be bright red with arrows on it (since the "C" looked too much like it meant "clear")
|
* Changed the recipe change button on the mixer to be bright red with arrows on it (since the "C" looked too much like it meant "clear")
|
||||||
|
* The refinery and the vacuum refinery now have working recipe configs
|
||||||
|
* Recipe autogen for foundry casting now deprioritizes fragments, preventing them from being casted when nuggets of that material are available
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed atomic clock precision assembler recipe not working
|
* Fixed atomic clock precision assembler recipe not working
|
||||||
|
* Fixed ICF parts using 528 mode templates in normal mode
|
||||||
|
* Fixed arc furnace queue slots inserting too many items, causing the output to exceed max stack size
|
||||||
@ -1,6 +1,6 @@
|
|||||||
mod_version=1.0.27
|
mod_version=1.0.27
|
||||||
# Empty build number makes a release type
|
# Empty build number makes a release type
|
||||||
mod_build_number=5544
|
mod_build_number=5545
|
||||||
|
|
||||||
credits=HbMinecraft,\
|
credits=HbMinecraft,\
|
||||||
\ rodolphito (explosion algorithms),\
|
\ rodolphito (explosion algorithms),\
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
package com.hbm.inventory.gui;
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
import com.hbm.inventory.FluidStack;
|
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||||
import com.hbm.util.Tuple;
|
import com.hbm.inventory.recipes.RefineryRecipes.RefineryRecipe;
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.hbm.inventory.container.ContainerMachineRefinery;
|
import com.hbm.inventory.container.ContainerMachineRefinery;
|
||||||
@ -83,7 +81,7 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
|
|
||||||
// pipes
|
// pipes
|
||||||
|
|
||||||
Tuple.Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> recipe = RefineryRecipes.getRefinery(inputOil.getTankType());
|
RefineryRecipe recipe = RefineryRecipes.getRefinery(inputOil.getTankType());
|
||||||
|
|
||||||
if(recipe == null) {
|
if(recipe == null) {
|
||||||
func_146110_a(guiLeft + 52, guiTop + 63, 247, 1, 33, 48, 350, 256);
|
func_146110_a(guiLeft + 52, guiTop + 63, 247, 1, 33, 48, 350, 256);
|
||||||
@ -93,24 +91,24 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Heavy Oil Products
|
// Heavy Oil Products
|
||||||
Color color = new Color(recipe.getV().type.getColor());
|
Color color = new Color(recipe.outputs[0].type.getColor());
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 63, 247, 1, 33, 48, 350, 256);
|
func_146110_a(guiLeft + 52, guiTop + 63, 247, 1, 33, 48, 350, 256);
|
||||||
|
|
||||||
// Naphtha Oil Products
|
// Naphtha Oil Products
|
||||||
color = new Color(recipe.getW().type.getColor());
|
color = new Color(recipe.outputs[1].type.getColor());
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 32, 247, 50, 66, 52, 350, 256);
|
func_146110_a(guiLeft + 52, guiTop + 32, 247, 50, 66, 52, 350, 256);
|
||||||
|
|
||||||
// Light Oil Products
|
// Light Oil Products
|
||||||
color = new Color(recipe.getX().type.getColor());
|
color = new Color(recipe.outputs[2].type.getColor());
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 24, 247, 145, 86, 35, 350, 256);
|
func_146110_a(guiLeft + 52, guiTop + 24, 247, 145, 86, 35, 350, 256);
|
||||||
|
|
||||||
// Gaseous Products
|
// Gaseous Products
|
||||||
color = new Color(recipe.getY().type.getColor());
|
color = new Color(recipe.outputs[3].type.getColor());
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 36, guiTop + 16, 211, 119, 122, 25, 350, 256);
|
func_146110_a(guiLeft + 36, guiTop + 16, 211, 119, 122, 25, 350, 256);
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +1,26 @@
|
|||||||
package com.hbm.inventory.recipes;
|
package com.hbm.inventory.recipes;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.inventory.FluidStack;
|
import com.hbm.inventory.FluidStack;
|
||||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
|
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||||
import com.hbm.items.ItemEnums.EnumTarType;
|
import com.hbm.items.ItemEnums.EnumTarType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemFluidIcon;
|
import com.hbm.items.machine.ItemFluidIcon;
|
||||||
import com.hbm.util.ItemStackUtil;
|
import com.hbm.util.ItemStackUtil;
|
||||||
import com.hbm.util.Tuple.Quintet;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class RefineryRecipes {
|
public class RefineryRecipes extends SerializableRecipe {
|
||||||
|
|
||||||
/// fractions in percent ///
|
/// fractions in percent ///
|
||||||
public static final int oil_frac_heavy = 50;
|
public static final int oil_frac_heavy = 50;
|
||||||
@ -37,51 +41,32 @@ public class RefineryRecipes {
|
|||||||
public static final int crackds_frac_aroma = 15;
|
public static final int crackds_frac_aroma = 15;
|
||||||
public static final int crackds_frac_unsat = 15;
|
public static final int crackds_frac_unsat = 15;
|
||||||
|
|
||||||
private static Map<FluidType, Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack>> refinery = new HashMap();
|
private static Map<FluidType, RefineryRecipe> recipes = new HashMap();
|
||||||
|
|
||||||
public static HashMap<Object, Object[]> getRefineryRecipe() {
|
@Override
|
||||||
|
public void registerDefaults() {
|
||||||
HashMap<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
recipes.put(Fluids.HOTOIL, new RefineryRecipe(
|
||||||
|
|
||||||
for(Entry<FluidType, Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack>> recipe : refinery.entrySet()) {
|
|
||||||
|
|
||||||
Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> fluids = recipe.getValue();
|
|
||||||
|
|
||||||
recipes.put(ItemFluidIcon.make(recipe.getKey(), 1000),
|
|
||||||
new ItemStack[] {
|
|
||||||
ItemFluidIcon.make(fluids.getV().type, fluids.getV().fill * 10),
|
|
||||||
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),
|
|
||||||
ItemStackUtil.carefulCopy(fluids.getZ()) });
|
|
||||||
}
|
|
||||||
|
|
||||||
return recipes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void registerRefinery() {
|
|
||||||
refinery.put(Fluids.HOTOIL, new Quintet(
|
|
||||||
new FluidStack(Fluids.HEAVYOIL, oil_frac_heavy),
|
new FluidStack(Fluids.HEAVYOIL, oil_frac_heavy),
|
||||||
new FluidStack(Fluids.NAPHTHA, oil_frac_naph),
|
new FluidStack(Fluids.NAPHTHA, oil_frac_naph),
|
||||||
new FluidStack(Fluids.LIGHTOIL, oil_frac_light),
|
new FluidStack(Fluids.LIGHTOIL, oil_frac_light),
|
||||||
new FluidStack(Fluids.PETROLEUM, oil_frac_petro),
|
new FluidStack(Fluids.PETROLEUM, oil_frac_petro),
|
||||||
new ItemStack(ModItems.sulfur)
|
new ItemStack(ModItems.sulfur)
|
||||||
));
|
));
|
||||||
refinery.put(Fluids.HOTCRACKOIL, new Quintet(
|
recipes.put(Fluids.HOTCRACKOIL, new RefineryRecipe(
|
||||||
new FluidStack(Fluids.NAPHTHA_CRACK, crack_frac_naph),
|
new FluidStack(Fluids.NAPHTHA_CRACK, crack_frac_naph),
|
||||||
new FluidStack(Fluids.LIGHTOIL_CRACK, crack_frac_light),
|
new FluidStack(Fluids.LIGHTOIL_CRACK, crack_frac_light),
|
||||||
new FluidStack(Fluids.AROMATICS, crack_frac_aroma),
|
new FluidStack(Fluids.AROMATICS, crack_frac_aroma),
|
||||||
new FluidStack(Fluids.UNSATURATEDS, crack_frac_unsat),
|
new FluidStack(Fluids.UNSATURATEDS, crack_frac_unsat),
|
||||||
DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK)
|
DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK)
|
||||||
));
|
));
|
||||||
refinery.put(Fluids.HOTOIL_DS, new Quintet(
|
recipes.put(Fluids.HOTOIL_DS, new RefineryRecipe(
|
||||||
new FluidStack(Fluids.HEAVYOIL, oilds_frac_heavy),
|
new FluidStack(Fluids.HEAVYOIL, oilds_frac_heavy),
|
||||||
new FluidStack(Fluids.NAPHTHA_DS, oilds_frac_naph),
|
new FluidStack(Fluids.NAPHTHA_DS, oilds_frac_naph),
|
||||||
new FluidStack(Fluids.LIGHTOIL_DS, oilds_frac_light),
|
new FluidStack(Fluids.LIGHTOIL_DS, oilds_frac_light),
|
||||||
new FluidStack(Fluids.UNSATURATEDS, oilds_frac_unsat),
|
new FluidStack(Fluids.UNSATURATEDS, oilds_frac_unsat),
|
||||||
DictFrame.fromOne(ModItems.oil_tar, EnumTarType.PARAFFIN)
|
DictFrame.fromOne(ModItems.oil_tar, EnumTarType.PARAFFIN)
|
||||||
));
|
));
|
||||||
refinery.put(Fluids.HOTCRACKOIL_DS, new Quintet(
|
recipes.put(Fluids.HOTCRACKOIL_DS, new RefineryRecipe(
|
||||||
new FluidStack(Fluids.NAPHTHA_DS, crackds_frac_naph),
|
new FluidStack(Fluids.NAPHTHA_DS, crackds_frac_naph),
|
||||||
new FluidStack(Fluids.LIGHTOIL_DS, crackds_frac_light),
|
new FluidStack(Fluids.LIGHTOIL_DS, crackds_frac_light),
|
||||||
new FluidStack(Fluids.AROMATICS, crackds_frac_aroma),
|
new FluidStack(Fluids.AROMATICS, crackds_frac_aroma),
|
||||||
@ -90,7 +75,75 @@ public class RefineryRecipes {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> getRefinery(FluidType oil) {
|
public static RefineryRecipe getRefinery(FluidType oil) {
|
||||||
return refinery.get(oil);
|
return recipes.get(oil);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public String getFileName() { return "hbmRefinery.json"; }
|
||||||
|
@Override public Object getRecipeObject() { return recipes; }
|
||||||
|
@Override public void deleteRecipes() { recipes.clear(); }
|
||||||
|
|
||||||
|
@Override public String getComment() {
|
||||||
|
return "Inputs always assume 100mB, input ammount cannot be changed.";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readRecipe(JsonElement recipe) {
|
||||||
|
JsonObject obj = recipe.getAsJsonObject();
|
||||||
|
|
||||||
|
FluidType type = Fluids.fromName(obj.get("input").getAsString());
|
||||||
|
FluidStack o0 = this.readFluidStack(obj.get("output0").getAsJsonArray());
|
||||||
|
FluidStack o1 = this.readFluidStack(obj.get("output1").getAsJsonArray());
|
||||||
|
FluidStack o2 = this.readFluidStack(obj.get("output2").getAsJsonArray());
|
||||||
|
FluidStack o3 = this.readFluidStack(obj.get("output3").getAsJsonArray());
|
||||||
|
ItemStack solid = this.readItemStack(obj.get("solid").getAsJsonArray());
|
||||||
|
|
||||||
|
recipes.put(type, new RefineryRecipe(o0, o1, o2, o3, solid));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
|
||||||
|
Entry<FluidType, RefineryRecipe> rec = (Entry<FluidType, RefineryRecipe>) recipe;
|
||||||
|
|
||||||
|
writer.name("input").value(rec.getKey().getName());
|
||||||
|
|
||||||
|
for(int i = 0; i < 4; i++) {
|
||||||
|
writer.name("output" + i);
|
||||||
|
this.writeFluidStack(rec.getValue().outputs[i], writer);
|
||||||
|
}
|
||||||
|
|
||||||
|
writer.name("solid");
|
||||||
|
this.writeItemStack(rec.getValue().solid, writer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HashMap<Object, Object[]> getRefineryRecipe() {
|
||||||
|
|
||||||
|
HashMap<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||||
|
|
||||||
|
for(Entry<FluidType, RefineryRecipe> recipe : RefineryRecipes.recipes.entrySet()) {
|
||||||
|
|
||||||
|
RefineryRecipe fluids = recipe.getValue();
|
||||||
|
|
||||||
|
recipes.put(ItemFluidIcon.make(recipe.getKey(), 1000),
|
||||||
|
new ItemStack[] {
|
||||||
|
ItemFluidIcon.make(fluids.outputs[0].type, fluids.outputs[0].fill * 10),
|
||||||
|
ItemFluidIcon.make(fluids.outputs[1].type, fluids.outputs[1].fill * 10),
|
||||||
|
ItemFluidIcon.make(fluids.outputs[2].type, fluids.outputs[2].fill * 10),
|
||||||
|
ItemFluidIcon.make(fluids.outputs[3].type, fluids.outputs[3].fill * 10),
|
||||||
|
ItemStackUtil.carefulCopy(fluids.solid) });
|
||||||
|
}
|
||||||
|
|
||||||
|
return recipes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class RefineryRecipe {
|
||||||
|
|
||||||
|
public FluidStack[] outputs;
|
||||||
|
public ItemStack solid;
|
||||||
|
|
||||||
|
public RefineryRecipe(FluidStack f0, FluidStack f1, FluidStack f2, FluidStack f3, ItemStack f4) {
|
||||||
|
this.outputs = new FluidStack[] {f0, f1, f2, f3};
|
||||||
|
this.solid = f4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,7 @@ public abstract class SerializableRecipe {
|
|||||||
recipeHandlers.add(new CrucibleRecipes());
|
recipeHandlers.add(new CrucibleRecipes());
|
||||||
recipeHandlers.add(new CentrifugeRecipes());
|
recipeHandlers.add(new CentrifugeRecipes());
|
||||||
recipeHandlers.add(new CrystallizerRecipes());
|
recipeHandlers.add(new CrystallizerRecipes());
|
||||||
|
recipeHandlers.add(new RefineryRecipes());
|
||||||
recipeHandlers.add(new VacuumRefineryRecipes());
|
recipeHandlers.add(new VacuumRefineryRecipes());
|
||||||
recipeHandlers.add(new FractionRecipes());
|
recipeHandlers.add(new FractionRecipes());
|
||||||
recipeHandlers.add(new CrackingRecipes());
|
recipeHandlers.add(new CrackingRecipes());
|
||||||
|
|||||||
@ -187,7 +187,9 @@ public class ItemMold extends Item {
|
|||||||
if(!ores.isEmpty()) {
|
if(!ores.isEmpty()) {
|
||||||
//prioritize NTM items
|
//prioritize NTM items
|
||||||
for(ItemStack ore : ores) {
|
for(ItemStack ore : ores) {
|
||||||
if(Item.itemRegistry.getNameForObject(ore.getItem()).startsWith(RefStrings.MODID)) {
|
String registry = Item.itemRegistry.getNameForObject(ore.getItem());
|
||||||
|
if(registry.startsWith(RefStrings.MODID)) {
|
||||||
|
if(registry.contains("fragment")) continue; // deprioritize fragments
|
||||||
ItemStack copy = ore.copy();
|
ItemStack copy = ore.copy();
|
||||||
copy.stackSize = this.amount;
|
copy.stackSize = this.amount;
|
||||||
return copy;
|
return copy;
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
|||||||
public class RefStrings {
|
public class RefStrings {
|
||||||
public static final String MODID = "hbm";
|
public static final String MODID = "hbm";
|
||||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||||
public static final String VERSION = "1.0.27 BETA (5544)";
|
public static final String VERSION = "1.0.27 BETA (5545)";
|
||||||
//HBM's Beta Naming Convention:
|
//HBM's Beta Naming Convention:
|
||||||
//V T (X)
|
//V T (X)
|
||||||
//V -> next release version
|
//V -> next release version
|
||||||
|
|||||||
@ -552,7 +552,6 @@ public class MainRegistry {
|
|||||||
MagicRecipes.register();
|
MagicRecipes.register();
|
||||||
LemegetonRecipes.register();
|
LemegetonRecipes.register();
|
||||||
SILEXRecipes.register();
|
SILEXRecipes.register();
|
||||||
RefineryRecipes.registerRefinery();
|
|
||||||
GasCentrifugeRecipes.register();
|
GasCentrifugeRecipes.register();
|
||||||
|
|
||||||
CustomMachineConfigJSON.initialize();
|
CustomMachineConfigJSON.initialize();
|
||||||
|
|||||||
@ -279,11 +279,13 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
|||||||
if(slots[q] == null) continue;
|
if(slots[q] == null) continue;
|
||||||
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(slots[q], this.liquidMode);
|
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(slots[q], this.liquidMode);
|
||||||
if(recipe == null) continue;
|
if(recipe == null) continue;
|
||||||
|
int max = this.getMaxInputSize();
|
||||||
|
int recipeMax = this.liquidMode ? max : slots[q].getMaxStackSize() / recipe.solidOutput.stackSize;
|
||||||
|
max = Math.min(max, recipeMax);
|
||||||
|
|
||||||
// add to existing stacks
|
// add to existing stacks
|
||||||
for(int i /* ingredient */ = 5; i < 25; i++) {
|
for(int i /* ingredient */ = 5; i < 25; i++) {
|
||||||
if(slots[i] == null) continue;
|
if(slots[i] == null) continue;
|
||||||
int max = this.getMaxInputSize();
|
|
||||||
if(!slots[q].isItemEqual(slots[i])) continue;
|
if(!slots[q].isItemEqual(slots[i])) continue;
|
||||||
int toMove = BobMathUtil.min(slots[i].getMaxStackSize() - slots[i].stackSize, slots[q].stackSize, max - slots[i].stackSize);
|
int toMove = BobMathUtil.min(slots[i].getMaxStackSize() - slots[i].stackSize, slots[q].stackSize, max - slots[i].stackSize);
|
||||||
if(toMove > 0) {
|
if(toMove > 0) {
|
||||||
@ -297,7 +299,6 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
|||||||
// add to empty slot
|
// add to empty slot
|
||||||
if(slots[q] != null) for(int i /* ingredient */ = 5; i < 25; i++) {
|
if(slots[q] != null) for(int i /* ingredient */ = 5; i < 25; i++) {
|
||||||
if(slots[i] != null) continue;
|
if(slots[i] != null) continue;
|
||||||
int max = this.getMaxInputSize();
|
|
||||||
int toMove = Math.min(max, slots[q].stackSize);
|
int toMove = Math.min(max, slots[q].stackSize);
|
||||||
slots[i] = slots[q].copy();
|
slots[i] = slots[q].copy();
|
||||||
slots[i].stackSize = toMove;
|
slots[i].stackSize = toMove;
|
||||||
|
|||||||
@ -20,13 +20,13 @@ import com.hbm.inventory.fluid.Fluids;
|
|||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.inventory.gui.GUIMachineRefinery;
|
import com.hbm.inventory.gui.GUIMachineRefinery;
|
||||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||||
|
import com.hbm.inventory.recipes.RefineryRecipes.RefineryRecipe;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.sound.AudioWrapper;
|
import com.hbm.sound.AudioWrapper;
|
||||||
import com.hbm.tileentity.*;
|
import com.hbm.tileentity.*;
|
||||||
import com.hbm.util.ParticleUtil;
|
import com.hbm.util.ParticleUtil;
|
||||||
import com.hbm.util.Tuple.Quintet;
|
|
||||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||||
@ -266,13 +266,13 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void refine() {
|
private void refine() {
|
||||||
Quintet<FluidStack, FluidStack, FluidStack, FluidStack, ItemStack> refinery = RefineryRecipes.getRefinery(tanks[0].getTankType());
|
RefineryRecipe refinery = RefineryRecipes.getRefinery(tanks[0].getTankType());
|
||||||
if(refinery == null) {
|
if(refinery == null) {
|
||||||
for(int i = 1; i < 5; i++) tanks[i].setTankType(Fluids.NONE);
|
for(int i = 1; i < 5; i++) tanks[i].setTankType(Fluids.NONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FluidStack[] stacks = new FluidStack[] {refinery.getV(), refinery.getW(), refinery.getX(), refinery.getY()};
|
FluidStack[] stacks = refinery.outputs;
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
|||||||
if(this.sulfur >= maxSulfur) {
|
if(this.sulfur >= maxSulfur) {
|
||||||
this.sulfur -= maxSulfur;
|
this.sulfur -= maxSulfur;
|
||||||
|
|
||||||
ItemStack out = refinery.getZ();
|
ItemStack out = refinery.solid;
|
||||||
|
|
||||||
if(out != null) {
|
if(out != null) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user