Fixed Bottler, removed fuelcan recipe from IC2 since it no longer exists

This commit is contained in:
mezz committed 2014-09-21 01:51:37 -07:00
1 parent 7cc3668a70
commit d314642d77
2 files changed
+10 -18

No files matched your search

@@ -30,6 +30,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
@@ -115,12 +116,14 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
return recipe;
}
// No custom recipe matched. See if the liquid dictionary has anything.
// No recipe matched. See if the liquid dictionary has anything.
if(FluidContainerRegistry.isEmptyContainer(empty)) {
ItemStack filled = FluidContainerRegistry.fillFluidContainer(res, empty);
if(filled != null) {
FluidStack fluidStack = FluidContainerRegistry.getFluidForFilledItem(filled);
return findMatchingRecipe(fluidStack, empty);
Recipe recipe = new Recipe(CYCLES_FILLING_DEFAULT, fluidStack, empty, filled);
recipes.add(recipe);
return recipe;
}
}
@@ -133,7 +136,9 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
* @return true if any recipe has a matching input
*/
public static boolean isInput(FluidStack res) {
return recipeFluids.contains(res.getFluid());
if (res == null)
return false;
return FluidRegistry.isFluidRegistered(res.getFluid());
}
@Override
@@ -148,7 +153,7 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
}
@EntityNetData
public FilteredTank resourceTank;
public StandardTank resourceTank;
private final TankManager tankManager;
private final InventoryAdapter inventory = new InventoryAdapter(3, "Items");
@@ -162,7 +167,7 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
public MachineBottler() {
setHints(Config.hints.get("bottler"));
resourceTank = new FilteredTank(Defaults.PROCESSOR_TANK_CAPACITY, RecipeManager.recipeFluids);
resourceTank = new StandardTank(Defaults.PROCESSOR_TANK_CAPACITY);
tankManager = new TankManager(resourceTank);
}
-13
View File
@@ -50,8 +50,6 @@ public class PluginIC2 extends ForestryPlugin {
public static ItemStack rubbersapling;
public static ItemStack rubberwood;
public static ItemStack rubberleaves;
public static ItemStack fuelcanFilled;
public static ItemStack fuelcanEmpty;
public static ItemStack emptyCell;
public static ItemStack lavaCell;
public static ItemStack waterCell;
@@ -209,17 +207,6 @@ public class PluginIC2 extends ForestryPlugin {
else
Proxies.log.fine("Missing IC2 rubber leaves");
fuelcanFilled = IC2Items.getItem("filledFuelCan");
fuelcanEmpty = IC2Items.getItem("fuelCan");
if (fuelcanEmpty != null && fuelcanFilled != null) {
ItemStack fuelcanStack = new ItemStack(fuelcanFilled.getItem(), 1, 0);
NBTTagCompound compound = new NBTTagCompound();
compound.setInteger("value", 15288);
fuelcanStack.setTagCompound(compound);
RecipeManagers.bottlerManager.addRecipe(20, LiquidHelper.getLiquid(Defaults.LIQUID_ETHANOL, Defaults.BOTTLER_FUELCAN_VOLUME), fuelcanEmpty, fuelcanStack);
} else
Proxies.log.fine("Missing IC2 fuelcanEmpty or fuelcanFilled, skipping bottler recipe for ethanol to filled fuel can.");
// Rubber wood is added via ore dictionary.
}