mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-11 20:25:36 +00:00
The great fluid engoodening part 4
i think that's enough for today
This commit is contained in:
parent
ac54cc18b9
commit
bd2063c86f
@ -2,16 +2,16 @@ package com.hbm.interfaces;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
|
||||||
public interface IFluidSource extends IFluidContainer {
|
public interface IFluidSource extends IFluidContainer {
|
||||||
|
|
||||||
void fillFluidInit(FluidTypeTheOldOne type);
|
void fillFluidInit(FluidType type);
|
||||||
|
|
||||||
void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type);
|
void fillFluid(int x, int y, int z, boolean newTact, FluidType type);
|
||||||
|
|
||||||
boolean getTact();
|
boolean getTact();
|
||||||
List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type);
|
List<IFluidAcceptor> getFluidList(FluidType type);
|
||||||
void clearFluidList(FluidTypeTheOldOne type);
|
void clearFluidList(FluidType type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,29 +115,26 @@ public class FluidType {
|
|||||||
return this.traits.contains(FluidTrait.LEAD_CONTAINER);
|
return this.traits.contains(FluidTrait.LEAD_CONTAINER);
|
||||||
}
|
}
|
||||||
|
|
||||||
//shitty wrapper delegates, go!
|
/**
|
||||||
@Deprecated //reason: use the fucking registry you dumbass this isn't a fucking enum anymore, we don't sell lists of all our instances here
|
* Called when the tile entity is broken, effectively voiding the fluids.
|
||||||
public static FluidType[] values() {
|
* @param te
|
||||||
return Fluids.metaOrder.toArray(new FluidType[0]);
|
* @param tank
|
||||||
}
|
*/
|
||||||
@Deprecated //reason: not an enum, asshole, use the registry
|
|
||||||
public static FluidType getEnum(int i) {
|
|
||||||
return Fluids.fromID(i);
|
|
||||||
}
|
|
||||||
@Deprecated //reason: the more time you waste reading this the less time is there for you to use that fucking registry already
|
|
||||||
public static com.hbm.inventory.fluid.FluidType getEnumFromName(String s) {
|
|
||||||
for(int i = 0; i < FluidType.values().length; i++)
|
|
||||||
if(FluidType.values()[i].getName().equals(s))
|
|
||||||
return FluidType.values()[i];
|
|
||||||
return Fluids.NONE;
|
|
||||||
}
|
|
||||||
@Deprecated //reason: not an enum, again, fuck you
|
|
||||||
public int ordinal() {
|
|
||||||
return this.getID();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onTankBroken(TileEntity te, FluidTank tank) { }
|
public void onTankBroken(TileEntity te, FluidTank tank) { }
|
||||||
|
/**
|
||||||
|
* Called by the tile entity's update loop. Also has an arg for the fluid tank for possible tanks using child-classes that are shielded or treated differently.
|
||||||
|
* @param te
|
||||||
|
* @param tank
|
||||||
|
*/
|
||||||
public void onTankUpdate(TileEntity te, FluidTank tank) { }
|
public void onTankUpdate(TileEntity te, FluidTank tank) { }
|
||||||
|
/**
|
||||||
|
* For when the tile entity is releasing this fluid into the world, either by an overflow or (by proxy) when broken.
|
||||||
|
* @param te
|
||||||
|
* @param tank
|
||||||
|
* @param overflowAmount
|
||||||
|
*/
|
||||||
|
public void onFluidRelease(TileEntity te, FluidTank tank, int overflowAmount) { }
|
||||||
|
//public void onFluidTransmit(FluidNetwork net) { }
|
||||||
|
|
||||||
public static enum FluidTrait {
|
public static enum FluidTrait {
|
||||||
AMAT,
|
AMAT,
|
||||||
@ -147,4 +144,27 @@ public class FluidType {
|
|||||||
LEAD_CONTAINER,
|
LEAD_CONTAINER,
|
||||||
NO_ID;
|
NO_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//shitty wrapper delegates, go!
|
||||||
|
//only used for compatibility purposes, these will be removed soon
|
||||||
|
//don't use these, dumbfuck
|
||||||
|
@Deprecated //reason: use the fucking registry you dumbass this isn't a fucking enum anymore, we don't sell lists of all our instances here
|
||||||
|
public static FluidType[] values() {
|
||||||
|
return Fluids.metaOrder.toArray(new FluidType[0]);
|
||||||
|
}
|
||||||
|
@Deprecated //reason: not an enum, asshole, use the registry
|
||||||
|
public static FluidType getEnum(int i) {
|
||||||
|
return Fluids.fromID(i);
|
||||||
|
}
|
||||||
|
@Deprecated //reason: the more time you waste reading this the less time is there for you to use that fucking registry already
|
||||||
|
public static FluidType getEnumFromName(String s) {
|
||||||
|
for(int i = 0; i < FluidType.values().length; i++)
|
||||||
|
if(FluidType.values()[i].getName().equals(s))
|
||||||
|
return FluidType.values()[i];
|
||||||
|
return Fluids.NONE;
|
||||||
|
}
|
||||||
|
@Deprecated //reason: not an enum, again, fuck you
|
||||||
|
public int ordinal() {
|
||||||
|
return this.getID();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -228,7 +228,7 @@ public class Fluids {
|
|||||||
metaOrder.add(PLASMA_BF);
|
metaOrder.add(PLASMA_BF);
|
||||||
|
|
||||||
if(idMapping.size() != metaOrder.size()) {
|
if(idMapping.size() != metaOrder.size()) {
|
||||||
throw new IllegalStateException("A severe error has occoured during NTM's fluid registering process! The MetaOrder and Mappings are inconsistent! Mapping size: " + idMapping.size()+ " / MetaORder size: " + metaOrder.size());
|
throw new IllegalStateException("A severe error has occoured during NTM's fluid registering process! The MetaOrder and Mappings are inconsistent! Mapping size: " + idMapping.size()+ " / MetaOrder size: " + metaOrder.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import org.lwjgl.opengl.GL11;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.container.ContainerMachineDiesel;
|
import com.hbm.inventory.container.ContainerMachineDiesel;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
@ -43,7 +44,7 @@ public class GUIMachineDiesel extends GuiInfoContainer {
|
|||||||
List<String> text = new ArrayList();
|
List<String> text = new ArrayList();
|
||||||
text.add(EnumChatFormatting.YELLOW + "Accepted Fuels:");
|
text.add(EnumChatFormatting.YELLOW + "Accepted Fuels:");
|
||||||
|
|
||||||
for(Entry<FluidTypeTheOldOne, Integer> entry : TileEntityMachineDiesel.fuels.entrySet()) {
|
for(Entry<FluidType, Integer> entry : TileEntityMachineDiesel.fuels.entrySet()) {
|
||||||
text.add(" " + I18nUtil.resolveKey(entry.getKey().getUnlocalizedName()) + " (" + entry.getValue() + " HE/t)");
|
text.add(" " + I18nUtil.resolveKey(entry.getKey().getUnlocalizedName()) + " (" + entry.getValue() + " HE/t)");
|
||||||
}
|
}
|
||||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text.toArray(new String[0]));
|
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text.toArray(new String[0]));
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import org.lwjgl.opengl.GL11;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.container.ContainerMachineSelenium;
|
import com.hbm.inventory.container.ContainerMachineSelenium;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||||
@ -43,7 +44,7 @@ public class GUIMachineSelenium extends GuiInfoContainer {
|
|||||||
List<String> text = new ArrayList();
|
List<String> text = new ArrayList();
|
||||||
text.add(EnumChatFormatting.YELLOW + "Accepted Fuels:");
|
text.add(EnumChatFormatting.YELLOW + "Accepted Fuels:");
|
||||||
|
|
||||||
for(Entry<FluidTypeTheOldOne, Integer> entry : TileEntityMachineDiesel.fuels.entrySet()) {
|
for(Entry<FluidType, Integer> entry : TileEntityMachineDiesel.fuels.entrySet()) {
|
||||||
text.add(" " + I18nUtil.resolveKey(entry.getKey().getUnlocalizedName()) + " (" + entry.getValue() + " HE/t)");
|
text.add(" " + I18nUtil.resolveKey(entry.getKey().getUnlocalizedName()) + " (" + entry.getValue() + " HE/t)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import com.hbm.interfaces.Spaghetti;
|
|||||||
import com.hbm.inventory.FluidContainer;
|
import com.hbm.inventory.FluidContainer;
|
||||||
import com.hbm.inventory.FluidContainerRegistry;
|
import com.hbm.inventory.FluidContainerRegistry;
|
||||||
import com.hbm.inventory.FluidStack;
|
import com.hbm.inventory.FluidStack;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||||
import com.hbm.items.machine.ItemFluidIcon;
|
import com.hbm.items.machine.ItemFluidIcon;
|
||||||
@ -154,29 +156,23 @@ public class MachineRecipes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//return: FluidType, amount produced, amount required, heat required (°C * 100)
|
//return: FluidType, amount produced, amount required, heat required (°C * 100)
|
||||||
@SuppressWarnings("incomplete-switch")
|
public static Object[] getBoilerOutput(FluidType type) {
|
||||||
public static Object[] getBoilerOutput(FluidTypeTheOldOne type) {
|
|
||||||
|
|
||||||
switch(type) {
|
if(type == Fluids.WATER) return new Object[] { Fluids.STEAM, 500, 5, 10000 };
|
||||||
case WATER: return new Object[] { FluidTypeTheOldOne.STEAM, 500, 5, 10000 };
|
if(type == Fluids.STEAM) return new Object[] { Fluids.HOTSTEAM, 5, 50, 30000 };
|
||||||
case STEAM: return new Object[] { FluidTypeTheOldOne.HOTSTEAM, 5, 50, 30000 };
|
if(type == Fluids.HOTSTEAM) return new Object[] { Fluids.SUPERHOTSTEAM, 5, 50, 45000 };
|
||||||
case HOTSTEAM: return new Object[] { FluidTypeTheOldOne.SUPERHOTSTEAM, 5, 50, 45000 };
|
if(type == Fluids.OIL) return new Object[] { Fluids.HOTOIL, 5, 5, 35000 };
|
||||||
case OIL: return new Object[] { FluidTypeTheOldOne.HOTOIL, 5, 5, 35000 };
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//return: FluidType, amount produced, amount required, HE produced
|
//return: FluidType, amount produced, amount required, HE produced
|
||||||
@SuppressWarnings("incomplete-switch")
|
public static Object[] getTurbineOutput(FluidType type) {
|
||||||
public static Object[] getTurbineOutput(FluidTypeTheOldOne type) {
|
|
||||||
|
|
||||||
switch(type) {
|
if(type == Fluids.STEAM) return new Object[] { Fluids.SPENTSTEAM, 5, 500, 50 };
|
||||||
case STEAM: return new Object[] { FluidTypeTheOldOne.SPENTSTEAM, 5, 500, 50 };
|
if(type == Fluids.HOTSTEAM) return new Object[] { Fluids.STEAM, 50, 5, 100 };
|
||||||
case HOTSTEAM: return new Object[] { FluidTypeTheOldOne.STEAM, 50, 5, 100 };
|
if(type == Fluids.SUPERHOTSTEAM) return new Object[] { Fluids.HOTSTEAM, 50, 5, 150 };
|
||||||
case SUPERHOTSTEAM: return new Object[] { FluidTypeTheOldOne.HOTSTEAM, 50, 5, 150 };
|
if(type == Fluids.ULTRAHOTSTEAM) return new Object[] { Fluids.SUPERHOTSTEAM, 50, 5, 250 };
|
||||||
case ULTRAHOTSTEAM: return new Object[] { FluidTypeTheOldOne.SUPERHOTSTEAM, 50, 5, 250 };
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
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.Tuple.Quartet;
|
import com.hbm.util.Tuple.Quartet;
|
||||||
@ -38,19 +40,19 @@ public class RefineryRecipes {
|
|||||||
public static final int kero_crack_petro = 60;
|
public static final int kero_crack_petro = 60;
|
||||||
|
|
||||||
//why didn't i use fluid stacks here? was there a reason?
|
//why didn't i use fluid stacks here? was there a reason?
|
||||||
private static Map<FluidTypeTheOldOne, Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer>> fractions = new HashMap();
|
private static Map<FluidType, Quartet<FluidType, FluidType, Integer, Integer>> fractions = new HashMap();
|
||||||
private static Map<FluidTypeTheOldOne, Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer>> cracking = new HashMap();
|
private static Map<FluidType, Quartet<FluidType, FluidType, Integer, Integer>> cracking = new HashMap();
|
||||||
|
|
||||||
public static Map<Object, Object[]> getRefineryRecipe() {
|
public static Map<Object, Object[]> getRefineryRecipe() {
|
||||||
|
|
||||||
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||||
|
|
||||||
recipes.put(ItemFluidIcon.make(FluidTypeTheOldOne.HOTOIL, 1000),
|
recipes.put(ItemFluidIcon.make(Fluids.HOTOIL, 1000),
|
||||||
new ItemStack[] {
|
new ItemStack[] {
|
||||||
ItemFluidIcon.make(FluidTypeTheOldOne.HEAVYOIL, oil_frac_heavy * 10),
|
ItemFluidIcon.make(Fluids.HEAVYOIL, oil_frac_heavy * 10),
|
||||||
ItemFluidIcon.make(FluidTypeTheOldOne.NAPHTHA, oil_frac_naph * 10),
|
ItemFluidIcon.make(Fluids.NAPHTHA, oil_frac_naph * 10),
|
||||||
ItemFluidIcon.make(FluidTypeTheOldOne.LIGHTOIL, oil_frac_light * 10),
|
ItemFluidIcon.make(Fluids.LIGHTOIL, oil_frac_light * 10),
|
||||||
ItemFluidIcon.make(FluidTypeTheOldOne.PETROLEUM, oil_frac_petro * 10),
|
ItemFluidIcon.make(Fluids.PETROLEUM, oil_frac_petro * 10),
|
||||||
new ItemStack(ModItems.sulfur, 1) });
|
new ItemStack(ModItems.sulfur, 1) });
|
||||||
|
|
||||||
return recipes;
|
return recipes;
|
||||||
@ -71,11 +73,11 @@ public class RefineryRecipes {
|
|||||||
cracking.put(FluidTypeTheOldOne.KEROSENE, new Quartet(FluidTypeTheOldOne.PETROLEUM, FluidTypeTheOldOne.NONE, kero_crack_petro, 0));
|
cracking.put(FluidTypeTheOldOne.KEROSENE, new Quartet(FluidTypeTheOldOne.PETROLEUM, FluidTypeTheOldOne.NONE, kero_crack_petro, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer> getFractions(FluidTypeTheOldOne oil) {
|
public static Quartet<FluidType, FluidType, Integer, Integer> getFractions(FluidType oil) {
|
||||||
return fractions.get(oil);
|
return fractions.get(oil);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer> getCracking(FluidTypeTheOldOne oil) {
|
public static Quartet<FluidType, FluidType, Integer, Integer> getCracking(FluidType oil) {
|
||||||
return cracking.get(oil);
|
return cracking.get(oil);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.items.machine;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -52,7 +53,7 @@ public class ItemFluidIcon extends Item {
|
|||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack make(FluidTypeTheOldOne fluid, int i) {
|
public static ItemStack make(FluidType fluid, int i) {
|
||||||
return addQuantity(new ItemStack(ModItems.fluid_icon, 1, fluid.ordinal()), i);
|
return addQuantity(new ItemStack(ModItems.fluid_icon, 1, fluid.ordinal()), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidDuct;
|
import com.hbm.interfaces.IFluidDuct;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.tileentity.conductor.TileEntityFluidDuct;
|
import com.hbm.tileentity.conductor.TileEntityFluidDuct;
|
||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
@ -71,18 +73,18 @@ public class ItemFluidIdentifier extends Item {
|
|||||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
||||||
list.add("");
|
list.add("");
|
||||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".info"));
|
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".info"));
|
||||||
list.add(" " + I18n.format(FluidTypeTheOldOne.getEnum(stack.getItemDamage()).getUnlocalizedName()));
|
list.add(" " + I18n.format(Fluids.fromID(stack.getItemDamage()).getUnlocalizedName()));
|
||||||
list.add("");
|
list.add("");
|
||||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage0"));
|
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage0"));
|
||||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage1"));
|
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage1"));
|
||||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage2"));
|
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FluidTypeTheOldOne getType(ItemStack stack) {
|
public static FluidType getType(ItemStack stack) {
|
||||||
if(stack != null && stack.getItem() instanceof ItemFluidIdentifier)
|
if(stack != null && stack.getItem() instanceof ItemFluidIdentifier)
|
||||||
return FluidTypeTheOldOne.getEnum(stack.getItemDamage());
|
return Fluids.fromID(stack.getItemDamage());
|
||||||
else
|
else
|
||||||
return FluidTypeTheOldOne.NONE;
|
return Fluids.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -91,7 +93,7 @@ public class ItemFluidIdentifier extends Item {
|
|||||||
if(te instanceof TileEntityFluidDuct) {
|
if(te instanceof TileEntityFluidDuct) {
|
||||||
if(!world.isRemote) {
|
if(!world.isRemote) {
|
||||||
TileEntityFluidDuct duct = (TileEntityFluidDuct) te;
|
TileEntityFluidDuct duct = (TileEntityFluidDuct) te;
|
||||||
FluidTypeTheOldOne type = FluidTypeTheOldOne.getEnum(stack.getItemDamage());
|
FluidType type = Fluids.fromID(stack.getItemDamage());
|
||||||
if (player.isSneaking()) markDuctsRecursively(world, x, y, z, type);
|
if (player.isSneaking()) markDuctsRecursively(world, x, y, z, type);
|
||||||
else duct.type = type;
|
else duct.type = type;
|
||||||
}
|
}
|
||||||
@ -101,15 +103,15 @@ public class ItemFluidIdentifier extends Item {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void markDuctsRecursively(World world, int x, int y, int z, FluidTypeTheOldOne type) {
|
private void markDuctsRecursively(World world, int x, int y, int z, FluidType type) {
|
||||||
markDuctsRecursively(world, x, y, z, type, 64);
|
markDuctsRecursively(world, x, y, z, type, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void markDuctsRecursively(World world, int x, int y, int z, FluidTypeTheOldOne type, int maxRecursion) {
|
private void markDuctsRecursively(World world, int x, int y, int z, FluidType type, int maxRecursion) {
|
||||||
TileEntity start = world.getTileEntity(x, y, z);
|
TileEntity start = world.getTileEntity(x, y, z);
|
||||||
if (!(start instanceof TileEntityFluidDuct)) return;
|
if (!(start instanceof TileEntityFluidDuct)) return;
|
||||||
TileEntityFluidDuct startDuct = (TileEntityFluidDuct) start;
|
TileEntityFluidDuct startDuct = (TileEntityFluidDuct) start;
|
||||||
FluidTypeTheOldOne oldType = startDuct.type;
|
FluidType oldType = startDuct.type;
|
||||||
if (oldType == type) return; // prevent infinite loops
|
if (oldType == type) return; // prevent infinite loops
|
||||||
startDuct.type = type;
|
startDuct.type = type;
|
||||||
|
|
||||||
@ -158,7 +160,7 @@ public class ItemFluidIdentifier extends Item {
|
|||||||
if(p_82790_2_ == 0) {
|
if(p_82790_2_ == 0) {
|
||||||
return 16777215;
|
return 16777215;
|
||||||
} else {
|
} else {
|
||||||
int j = FluidTypeTheOldOne.getEnum(stack.getItemDamage()).getMSAColor();
|
int j = Fluids.fromID(stack.getItemDamage()).getColor();
|
||||||
|
|
||||||
if(j < 0) {
|
if(j < 0) {
|
||||||
j = 16777215;
|
j = 16777215;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.items.machine;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -27,7 +28,7 @@ public class ItemFluidTank extends Item {
|
|||||||
|
|
||||||
for(int i = 1; i < FluidTypeTheOldOne.values().length; i++) {
|
for(int i = 1; i < FluidTypeTheOldOne.values().length; i++) {
|
||||||
|
|
||||||
FluidTypeTheOldOne type = FluidTypeTheOldOne.values()[i];
|
FluidType type = FluidTypeTheOldOne.values()[i];
|
||||||
|
|
||||||
if(type.hasNoContainer())
|
if(type.hasNoContainer())
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -383,7 +383,7 @@ public class Library {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void transmitFluid(int x, int y, int z, boolean newTact, IFluidSource that, World worldObj, FluidTypeTheOldOne type) {
|
public static void transmitFluid(int x, int y, int z, boolean newTact, IFluidSource that, World worldObj, FluidType type) {
|
||||||
Block block = worldObj.getBlock(x, y, z);
|
Block block = worldObj.getBlock(x, y, z);
|
||||||
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
|
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
|||||||
@ -69,6 +69,7 @@ import com.hbm.handler.imc.IMCHandler;
|
|||||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||||
import com.hbm.hazard.HazardRegistry;
|
import com.hbm.hazard.HazardRegistry;
|
||||||
import com.hbm.inventory.*;
|
import com.hbm.inventory.*;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.recipes.*;
|
import com.hbm.inventory.recipes.*;
|
||||||
import com.hbm.inventory.recipes.anvil.AnvilRecipes;
|
import com.hbm.inventory.recipes.anvil.AnvilRecipes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
@ -261,6 +262,7 @@ public class MainRegistry {
|
|||||||
loadConfig(PreEvent);
|
loadConfig(PreEvent);
|
||||||
HbmPotion.init();
|
HbmPotion.init();
|
||||||
|
|
||||||
|
Fluids.init();
|
||||||
ModBlocks.mainRegistry();
|
ModBlocks.mainRegistry();
|
||||||
ModItems.mainRegistry();
|
ModItems.mainRegistry();
|
||||||
proxy.registerRenderInfo();
|
proxy.registerRenderInfo();
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.packet;
|
|||||||
import com.hbm.config.MobConfig;
|
import com.hbm.config.MobConfig;
|
||||||
import com.hbm.entity.mob.EntityDuck;
|
import com.hbm.entity.mob.EntityDuck;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.weapon.ItemMissile.PartSize;
|
import com.hbm.items.weapon.ItemMissile.PartSize;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import com.hbm.tileentity.TileEntityTickingBase;
|
import com.hbm.tileentity.TileEntityTickingBase;
|
||||||
@ -104,7 +105,7 @@ public class AuxButtonPacket implements IMessage {
|
|||||||
reactor.rods = m.value;
|
reactor.rods = m.value;
|
||||||
|
|
||||||
if(m.id == 1) {
|
if(m.id == 1) {
|
||||||
FluidTypeTheOldOne type = FluidTypeTheOldOne.STEAM;
|
FluidType type = FluidTypeTheOldOne.STEAM;
|
||||||
int fill = reactor.tanks[2].getFill();
|
int fill = reactor.tanks[2].getFill();
|
||||||
|
|
||||||
switch(m.value) {
|
switch(m.value) {
|
||||||
|
|||||||
@ -6,15 +6,17 @@ import java.util.List;
|
|||||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidDuct;
|
import com.hbm.interfaces.IFluidDuct;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
public class TileEntityGasDuctSolid extends TileEntity implements IFluidDuct {
|
public class TileEntityGasDuctSolid extends TileEntity implements IFluidDuct {
|
||||||
|
|
||||||
public FluidTypeTheOldOne type = FluidTypeTheOldOne.GAS;
|
public FluidType type = FluidTypeTheOldOne.GAS;
|
||||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidTypeTheOldOne getType() {
|
public FluidType getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidDuct;
|
import com.hbm.interfaces.IFluidDuct;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -17,7 +18,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
public class TileEntityOilDuct extends TileEntity implements IFluidDuct {
|
public class TileEntityOilDuct extends TileEntity implements IFluidDuct {
|
||||||
|
|
||||||
public ForgeDirection[] connections = new ForgeDirection[6];
|
public ForgeDirection[] connections = new ForgeDirection[6];
|
||||||
public FluidTypeTheOldOne type = FluidTypeTheOldOne.OIL;
|
public FluidType type = FluidTypeTheOldOne.OIL;
|
||||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||||
|
|
||||||
public TileEntityOilDuct() {
|
public TileEntityOilDuct() {
|
||||||
@ -74,7 +75,7 @@ public class TileEntityOilDuct extends TileEntity implements IFluidDuct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidTypeTheOldOne getType() {
|
public FluidType getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,16 +6,17 @@ import java.util.List;
|
|||||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidDuct;
|
import com.hbm.interfaces.IFluidDuct;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
public class TileEntityOilDuctSolid extends TileEntity implements IFluidDuct {
|
public class TileEntityOilDuctSolid extends TileEntity implements IFluidDuct {
|
||||||
|
|
||||||
public FluidTypeTheOldOne type = FluidTypeTheOldOne.OIL;
|
public FluidType type = FluidTypeTheOldOne.OIL;
|
||||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidTypeTheOldOne getType() {
|
public FluidType getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemCatalyst;
|
import com.hbm.items.machine.ItemCatalyst;
|
||||||
import com.hbm.items.machine.ItemSatChip;
|
import com.hbm.items.machine.ItemSatChip;
|
||||||
@ -389,28 +391,19 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getCoolingStrength(FluidTypeTheOldOne type) {
|
private int getCoolingStrength(FluidType type) {
|
||||||
|
|
||||||
if(type == FluidTypeTheOldOne.WATER)
|
if(type == FluidTypeTheOldOne.WATER) return 5;
|
||||||
return 5;
|
if(type == FluidTypeTheOldOne.OIL) return 15;
|
||||||
if(type == FluidTypeTheOldOne.OIL)
|
if(type == FluidTypeTheOldOne.COOLANT) return this.heat / 250;
|
||||||
return 15;
|
if(type == FluidTypeTheOldOne.CRYOGEL) return this.heat > heat/2 ? 25 : 5;
|
||||||
if(type == FluidTypeTheOldOne.COOLANT)
|
|
||||||
return this.heat / 250;
|
|
||||||
if(type == FluidTypeTheOldOne.CRYOGEL)
|
|
||||||
return this.heat > heat/2 ? 25 : 5;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getFuelPower(FluidTypeTheOldOne type) {
|
private int getFuelPower(FluidType type) {
|
||||||
switch(type) {
|
if(type == Fluids.DEUTERIUM) return 50;
|
||||||
case DEUTERIUM:
|
if(type == Fluids.TRITIUM) return 75;
|
||||||
return 50;
|
return 0;
|
||||||
case TRITIUM:
|
|
||||||
return 75;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private float calcField(int a, int b, int c, int d) {
|
private float calcField(int a, int b, int c, int d) {
|
||||||
@ -477,7 +470,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -491,7 +484,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -503,7 +496,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -523,7 +516,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 4 && tanks[index] != null)
|
if(index < 4 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -364,13 +365,13 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
else
|
else
|
||||||
@ -378,7 +379,7 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
else
|
else
|
||||||
@ -391,7 +392,7 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -378,13 +379,13 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
else
|
else
|
||||||
@ -392,7 +393,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
else
|
else
|
||||||
@ -405,7 +406,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,9 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.FluidType.FluidTrait;
|
import com.hbm.inventory.fluid.FluidType.FluidTrait;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.ModEventHandler;
|
import com.hbm.main.ModEventHandler;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
@ -106,7 +108,7 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
|||||||
}
|
}
|
||||||
|
|
||||||
//For when Tom's firestorm hits a barrel full of water
|
//For when Tom's firestorm hits a barrel full of water
|
||||||
if(tank.getTankType() == FluidTypeTheOldOne.WATER && ModEventHandler.fire > 0) {
|
if(tank.getTankType() == Fluids.WATER && ModEventHandler.fire > 0) {
|
||||||
int light = this.worldObj.getSavedLightValue(EnumSkyBlock.Sky, this.xCoord, this.yCoord, this.zCoord);
|
int light = this.worldObj.getSavedLightValue(EnumSkyBlock.Sky, this.xCoord, this.yCoord, this.zCoord);
|
||||||
|
|
||||||
if(light > 7) {
|
if(light > 7) {
|
||||||
@ -126,12 +128,12 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(mode == 2 || mode == 3)
|
if(mode == 2 || mode == 3)
|
||||||
return 0;
|
return 0;
|
||||||
@ -140,7 +142,7 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
||||||
@ -150,7 +152,7 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,24 +166,24 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
|
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return this.list;
|
return this.list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
this.list.clear();
|
this.list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.MachineRecipes;
|
import com.hbm.inventory.recipes.MachineRecipes;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.NBTPacket;
|
import com.hbm.packet.NBTPacket;
|
||||||
@ -138,7 +139,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||||
dir = dir.getRotation(ForgeDirection.UP);
|
dir = dir.getRotation(ForgeDirection.UP);
|
||||||
@ -148,7 +149,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +159,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -166,7 +167,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -176,7 +177,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
|
|
||||||
@ -190,7 +191,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -205,12 +206,12 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list2;
|
return list2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list2.clear();
|
list2.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.ModEventHandler;
|
import com.hbm.main.ModEventHandler;
|
||||||
|
|
||||||
@ -81,14 +82,14 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||||
fillFluid(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, getTact(), type);
|
fillFluid(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, getTact(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +104,7 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -111,7 +112,7 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -121,7 +122,7 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
|
|
||||||
@ -135,7 +136,7 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -150,12 +151,12 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.ModDamageSource;
|
import com.hbm.lib.ModDamageSource;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
@ -186,13 +187,13 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
else
|
else
|
||||||
@ -200,7 +201,7 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
else
|
else
|
||||||
@ -213,7 +214,7 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -102,7 +103,7 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -112,7 +113,7 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -120,7 +121,7 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -136,7 +137,7 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if (index < 2 && tanks[index] != null)
|
if (index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
@ -91,13 +92,13 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
else
|
else
|
||||||
@ -105,7 +106,7 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
else
|
else
|
||||||
@ -118,7 +119,7 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
@ -111,14 +112,14 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||||
fillFluid(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, getTact(), type);
|
fillFluid(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, getTact(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +134,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -141,7 +142,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -151,7 +152,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
|
|
||||||
@ -165,7 +166,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -180,12 +181,12 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IReactor;
|
import com.hbm.interfaces.IReactor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -391,13 +392,13 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 3 && tanks[index] != null)
|
if(index < 3 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
tanks[1].setFill(i);
|
tanks[1].setFill(i);
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -405,7 +406,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
return tanks[1].getFill();
|
return tanks[1].getFill();
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -415,7 +416,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
return tanks[1].getMaxFill();
|
return tanks[1].getMaxFill();
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IReactor;
|
import com.hbm.interfaces.IReactor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -1202,13 +1203,13 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 3 && tanks[index] != null)
|
if(index < 3 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -1218,7 +1219,7 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -1230,7 +1231,7 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.BreederRecipes;
|
import com.hbm.inventory.recipes.BreederRecipes;
|
||||||
import com.hbm.inventory.recipes.FusionRecipes;
|
import com.hbm.inventory.recipes.FusionRecipes;
|
||||||
import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe;
|
import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe;
|
||||||
@ -316,7 +317,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -326,7 +327,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if (index < 2 && tanks[index] != null)
|
if (index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
|
|
||||||
@ -345,7 +346,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -357,13 +358,13 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(xCoord, yCoord - 3, zCoord, getTact(), type);
|
fillFluid(xCoord, yCoord - 3, zCoord, getTact(), type);
|
||||||
fillFluid(xCoord, yCoord + 3, zCoord, getTact(), type);
|
fillFluid(xCoord, yCoord + 3, zCoord, getTact(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,17 +378,17 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -27,7 +27,7 @@ public class TileEntityMachineBAT9000 extends TileEntityBarrel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 3, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 3, getTact(), type);
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord + 3, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord + 3, getTact(), type);
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 3, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 3, getTact(), type);
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.MachineRecipes;
|
import com.hbm.inventory.recipes.MachineRecipes;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxGaugePacket;
|
import com.hbm.packet.AuxGaugePacket;
|
||||||
@ -326,7 +327,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
@ -337,7 +338,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,7 +353,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -360,7 +361,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -370,7 +371,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
|
|
||||||
@ -384,7 +385,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -399,12 +400,12 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.MachineRecipes;
|
import com.hbm.inventory.recipes.MachineRecipes;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -325,7 +326,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
@ -336,7 +337,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +352,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -359,7 +360,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -369,7 +370,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
|
|
||||||
@ -383,7 +384,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -398,12 +399,12 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -339,22 +340,22 @@ public class TileEntityMachineCMBFactory extends TileEntity implements ISidedInv
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.hbm.interfaces.IFluidSource;
|
|||||||
import com.hbm.inventory.FluidStack;
|
import com.hbm.inventory.FluidStack;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.UpgradeManager;
|
import com.hbm.inventory.UpgradeManager;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.MachineRecipes;
|
import com.hbm.inventory.recipes.MachineRecipes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||||
@ -907,13 +908,13 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 4 && tanks[index] != null)
|
if(index < 4 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -925,7 +926,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -939,7 +940,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -949,7 +950,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
|
int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
|
||||||
if(meta == 5) {
|
if(meta == 5) {
|
||||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, getTact(), type);
|
||||||
@ -981,7 +982,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -995,7 +996,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
return list1;
|
return list1;
|
||||||
if(type.name().equals(tanks[3].getTankType().name()))
|
if(type.name().equals(tanks[3].getTankType().name()))
|
||||||
@ -1004,7 +1005,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
list1.clear();
|
list1.clear();
|
||||||
if(type.name().equals(tanks[3].getTankType().name()))
|
if(type.name().equals(tanks[3].getTankType().name()))
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidContainerRegistry;
|
import com.hbm.inventory.FluidContainerRegistry;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -313,18 +314,18 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,7 +335,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.hbm.blocks.BlockDummyable;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.CrystallizerRecipes;
|
import com.hbm.inventory.recipes.CrystallizerRecipes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||||
@ -265,12 +266,12 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
tank.setFill(fill);
|
tank.setFill(fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,12 +281,12 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.CyclotronRecipes;
|
import com.hbm.inventory.recipes.CyclotronRecipes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||||
@ -359,7 +360,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.COOLANT)
|
if(type == FluidTypeTheOldOne.COOLANT)
|
||||||
coolant.setFill(fill);
|
coolant.setFill(fill);
|
||||||
else if(type == FluidTypeTheOldOne.AMAT)
|
else if(type == FluidTypeTheOldOne.AMAT)
|
||||||
@ -367,7 +368,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index == 0)
|
if(index == 0)
|
||||||
coolant.setTankType(type);
|
coolant.setTankType(type);
|
||||||
else if(index == 1)
|
else if(index == 1)
|
||||||
@ -380,7 +381,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.COOLANT)
|
if(type == FluidTypeTheOldOne.COOLANT)
|
||||||
return coolant.getFill();
|
return coolant.getFill();
|
||||||
else if(type == FluidTypeTheOldOne.AMAT)
|
else if(type == FluidTypeTheOldOne.AMAT)
|
||||||
@ -390,7 +391,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
fillFluid(xCoord + 3, yCoord, zCoord + 1, getTact(), type);
|
fillFluid(xCoord + 3, yCoord, zCoord + 1, getTact(), type);
|
||||||
fillFluid(xCoord + 3, yCoord, zCoord - 1, getTact(), type);
|
fillFluid(xCoord + 3, yCoord, zCoord - 1, getTact(), type);
|
||||||
@ -404,7 +405,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,17 +415,17 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(type == FluidTypeTheOldOne.COOLANT)
|
if(type == FluidTypeTheOldOne.COOLANT)
|
||||||
return coolant.getMaxFill();
|
return coolant.getMaxFill();
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidContainerRegistry;
|
import com.hbm.inventory.FluidContainerRegistry;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
@ -105,7 +106,7 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
|||||||
tank.loadTank(0, 1, slots);
|
tank.loadTank(0, 1, slots);
|
||||||
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
FluidTypeTheOldOne type = tank.getTankType();
|
FluidType type = tank.getTankType();
|
||||||
if(type.name().equals(FluidTypeTheOldOne.NITAN.name()))
|
if(type.name().equals(FluidTypeTheOldOne.NITAN.name()))
|
||||||
powerCap = maxPower * 10;
|
powerCap = maxPower * 10;
|
||||||
else
|
else
|
||||||
@ -133,7 +134,7 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
|||||||
return getHEFromFuel() > 0;
|
return getHEFromFuel() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final HashMap<FluidTypeTheOldOne, Integer> fuels = new HashMap();
|
public static final HashMap<FluidType, Integer> fuels = new HashMap();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
fuels.put(FluidTypeTheOldOne.HYDROGEN, 10);
|
fuels.put(FluidTypeTheOldOne.HYDROGEN, 10);
|
||||||
@ -147,7 +148,7 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getHEFromFuel() {
|
public int getHEFromFuel() {
|
||||||
FluidTypeTheOldOne type = tank.getTankType();
|
FluidType type = tank.getTankType();
|
||||||
Integer value = fuels.get(type);
|
Integer value = fuels.get(type);
|
||||||
return value != null ? value : 0;
|
return value != null ? value : 0;
|
||||||
}
|
}
|
||||||
@ -199,22 +200,22 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.FluidType.FluidTrait;
|
import com.hbm.inventory.fluid.FluidType.FluidTrait;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
@ -103,12 +104,12 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(mode == 2 || mode == 3)
|
if(mode == 2 || mode == 3)
|
||||||
return 0;
|
return 0;
|
||||||
@ -117,7 +118,7 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 1, getTact(), type);
|
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord + 1, getTact(), type);
|
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord - 1, getTact(), type);
|
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||||
@ -129,7 +130,7 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,23 +144,23 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return this.list;
|
return this.list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
this.list.clear();
|
this.list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,10 +5,11 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.recipes.GasCentrifugeRecipes;
|
import com.hbm.inventory.recipes.GasCentrifugeRecipes;
|
||||||
import com.hbm.inventory.recipes.GasCentrifugeRecipes.PseudoFluidType;
|
import com.hbm.inventory.recipes.GasCentrifugeRecipes.PseudoFluidType;
|
||||||
import com.hbm.inventory.recipes.MachineRecipes;
|
import com.hbm.inventory.recipes.MachineRecipes;
|
||||||
@ -54,7 +55,7 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
|||||||
|
|
||||||
public TileEntityMachineGasCent() {
|
public TileEntityMachineGasCent() {
|
||||||
super(6);
|
super(6);
|
||||||
tank = new FluidTank(FluidTypeTheOldOne.UF6, 2000, 0);
|
tank = new FluidTank(Fluids.UF6, 2000, 0);
|
||||||
inputTank = new PseudoFluidTank(PseudoFluidType.NUF6, 8000);
|
inputTank = new PseudoFluidTank(PseudoFluidType.NUF6, 8000);
|
||||||
outputTank = new PseudoFluidTank(PseudoFluidType.LEUF6, 8000);
|
outputTank = new PseudoFluidTank(PseudoFluidType.LEUF6, 8000);
|
||||||
}
|
}
|
||||||
@ -284,7 +285,6 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
|||||||
data.setString("outputType", outputTank.getTankType().toString());
|
data.setString("outputType", outputTank.getTankType().toString());
|
||||||
this.networkPack(data, 50);
|
this.networkPack(data, 50);
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
|
||||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
PacketDispatcher.wrapper.sendToAllAround(new LoopedSoundPacket(xCoord, yCoord, zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,30 +318,26 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTankType(int in) {
|
public void setTankType(int in) {
|
||||||
|
|
||||||
if(slots[in] != null && slots[in].getItem() instanceof ItemFluidIdentifier) {
|
if(slots[in] != null && slots[in].getItem() instanceof ItemFluidIdentifier) {
|
||||||
FluidTypeTheOldOne newType = ItemFluidIdentifier.getType(slots[in]);
|
FluidType newType = ItemFluidIdentifier.getType(slots[in]);
|
||||||
|
|
||||||
if(tank.getTankType() != newType) {
|
if(tank.getTankType() != newType) {
|
||||||
tank.setTankType(newType);
|
tank.setTankType(newType);
|
||||||
tank.setFill(0);
|
tank.setFill(0);
|
||||||
|
|
||||||
switch(newType) {
|
if(newType == Fluids.UF6) {
|
||||||
case UF6:
|
|
||||||
inputTank.setTankType(PseudoFluidType.NUF6);
|
inputTank.setTankType(PseudoFluidType.NUF6);
|
||||||
outputTank.setTankType(PseudoFluidType.NUF6.getOutputFluid());
|
outputTank.setTankType(PseudoFluidType.NUF6.getOutputFluid());
|
||||||
break;
|
}
|
||||||
case PUF6:
|
if(newType == Fluids.PUF6) {
|
||||||
inputTank.setTankType(PseudoFluidType.PF6);
|
inputTank.setTankType(PseudoFluidType.PF6);
|
||||||
outputTank.setTankType(PseudoFluidType.PF6.getOutputFluid());
|
outputTank.setTankType(PseudoFluidType.PF6.getOutputFluid());
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -349,17 +345,17 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemFuelRod;
|
import com.hbm.items.machine.ItemFuelRod;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
@ -519,7 +520,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -529,7 +530,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -537,7 +538,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -553,7 +554,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.blocks.BlockDummyable;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemRTGPellet;
|
import com.hbm.items.machine.ItemRTGPellet;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
@ -191,7 +192,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final int coalGenRate = 50;
|
public static final int coalGenRate = 50;
|
||||||
public static final HashMap<FluidTypeTheOldOne, Integer> fuels = new HashMap();
|
public static final HashMap<FluidType, Integer> fuels = new HashMap();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
fuels.put(FluidTypeTheOldOne.SMEAR, 50);
|
fuels.put(FluidTypeTheOldOne.SMEAR, 50);
|
||||||
@ -209,7 +210,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getPowerFromFuel() {
|
public int getPowerFromFuel() {
|
||||||
FluidTypeTheOldOne type = tanks[1].getTankType();
|
FluidType type = tanks[1].getTankType();
|
||||||
Integer value = fuels.get(type);
|
Integer value = fuels.get(type);
|
||||||
return value != null ? value : 0;
|
return value != null ? value : 0;
|
||||||
}
|
}
|
||||||
@ -220,7 +221,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
|
|
||||||
if(type == FluidTypeTheOldOne.WATER)
|
if(type == FluidTypeTheOldOne.WATER)
|
||||||
tanks[0].setFill(fill);
|
tanks[0].setFill(fill);
|
||||||
@ -231,7 +232,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +242,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++)
|
for(int i = 0; i < 3; i++)
|
||||||
if(tanks[i].getTankType() == type)
|
if(tanks[i].getTankType() == type)
|
||||||
@ -251,7 +252,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++)
|
for(int i = 0; i < 3; i++)
|
||||||
if(tanks[i].getTankType() == type)
|
if(tanks[i].getTankType() == type)
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
|
||||||
@ -258,7 +259,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
||||||
@ -268,7 +269,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,13 +289,13 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 3 && tanks[index] != null)
|
if(index < 3 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -304,7 +305,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -316,7 +317,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -328,7 +329,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return list1;
|
return list1;
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -339,7 +340,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
list1.clear();
|
list1.clear();
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.MachineRecipes;
|
import com.hbm.inventory.recipes.MachineRecipes;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
@ -144,7 +145,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||||
dir = dir.getRotation(ForgeDirection.UP);
|
dir = dir.getRotation(ForgeDirection.UP);
|
||||||
@ -154,7 +155,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +170,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -177,7 +178,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -187,7 +188,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
|
|
||||||
@ -201,7 +202,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -216,12 +217,12 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list2;
|
return list2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list2.clear();
|
list2.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.UpgradeManager;
|
import com.hbm.inventory.UpgradeManager;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.CentrifugeRecipes;
|
import com.hbm.inventory.recipes.CentrifugeRecipes;
|
||||||
import com.hbm.inventory.recipes.CrystallizerRecipes;
|
import com.hbm.inventory.recipes.CrystallizerRecipes;
|
||||||
import com.hbm.inventory.recipes.ShredderRecipes;
|
import com.hbm.inventory.recipes.ShredderRecipes;
|
||||||
@ -604,13 +605,13 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.OIL)
|
if(type == FluidTypeTheOldOne.OIL)
|
||||||
tank.setFill(fill);
|
tank.setFill(fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -620,14 +621,14 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.OIL)
|
if(type == FluidTypeTheOldOne.OIL)
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
fillFluid(xCoord + 2, yCoord, zCoord, this.getTact(), type);
|
fillFluid(xCoord + 2, yCoord, zCoord, this.getTact(), type);
|
||||||
fillFluid(xCoord - 2, yCoord, zCoord, this.getTact(), type);
|
fillFluid(xCoord - 2, yCoord, zCoord, this.getTact(), type);
|
||||||
@ -636,7 +637,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -650,12 +651,12 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.machine;
|
|||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -23,7 +24,7 @@ public class TileEntityMachineOrbus extends TileEntityBarrel {
|
|||||||
public void checkFluidInteraction() { } //NO!
|
public void checkFluidInteraction() { } //NO!
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||||
ForgeDirection d2 = dir.getRotation(ForgeDirection.DOWN);
|
ForgeDirection d2 = dir.getRotation(ForgeDirection.DOWN);
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.blocks.machine.MachineITER;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
@ -147,7 +148,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
|||||||
//if(plasma.getFill() > 0)
|
//if(plasma.getFill() > 0)
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
List<FluidTypeTheOldOne> types = new ArrayList() {{ add(tanks[0].getTankType()); add(tanks[1].getTankType()); }};
|
List<FluidType> types = new ArrayList() {{ add(tanks[0].getTankType()); add(tanks[1].getTankType()); }};
|
||||||
|
|
||||||
if(types.contains(FluidTypeTheOldOne.DEUTERIUM) && types.contains(FluidTypeTheOldOne.TRITIUM)) {
|
if(types.contains(FluidTypeTheOldOne.DEUTERIUM) && types.contains(FluidTypeTheOldOne.TRITIUM)) {
|
||||||
plasma.setTankType(FluidTypeTheOldOne.PLASMA_DT);
|
plasma.setTankType(FluidTypeTheOldOne.PLASMA_DT);
|
||||||
@ -202,7 +203,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -214,7 +215,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -224,7 +225,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -245,7 +246,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if (index < 2 && tanks[index] != null)
|
if (index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -216,7 +217,7 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,12 +230,12 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemFuelRod;
|
import com.hbm.items.machine.ItemFuelRod;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
@ -662,7 +664,6 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("incomplete-switch")
|
|
||||||
private void generateSteam() {
|
private void generateSteam() {
|
||||||
|
|
||||||
//function of SHS produced per tick
|
//function of SHS produced per tick
|
||||||
@ -674,16 +675,9 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
|
|
||||||
double water = steam;
|
double water = steam;
|
||||||
|
|
||||||
switch(tanks[2].getTankType()) {
|
FluidType type = tanks[2].getTankType();
|
||||||
case STEAM:
|
if(type == Fluids.STEAM) water /= 100D;
|
||||||
water /= 100D;
|
if(type == Fluids.HOTSTEAM) water /= 10;
|
||||||
break;
|
|
||||||
case HOTSTEAM:
|
|
||||||
water /= 10;
|
|
||||||
break;
|
|
||||||
case SUPERHOTSTEAM:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
tanks[0].setFill(tanks[0].getFill() - (int)Math.ceil(water));
|
tanks[0].setFill(tanks[0].getFill() - (int)Math.ceil(water));
|
||||||
tanks[2].setFill(tanks[2].getFill() + (int)Math.floor(steam));
|
tanks[2].setFill(tanks[2].getFill() + (int)Math.floor(steam));
|
||||||
@ -758,12 +752,12 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
if(worldObj.getBlock(xCoord - 2, yCoord, zCoord) == ModBlocks.reactor_hatch)
|
if(worldObj.getBlock(xCoord - 2, yCoord, zCoord) == ModBlocks.reactor_hatch)
|
||||||
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord, getTact(), type);
|
||||||
@ -792,7 +786,7 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -802,7 +796,7 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -812,7 +806,7 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -830,7 +824,7 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if (index < 3 && tanks[index] != null)
|
if (index < 3 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -846,12 +840,12 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidContainerRegistry;
|
import com.hbm.inventory.FluidContainerRegistry;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -223,7 +224,7 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
|||||||
tank.loadTank(9, 10, slots);
|
tank.loadTank(9, 10, slots);
|
||||||
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
FluidTypeTheOldOne type = tank.getTankType();
|
FluidType type = tank.getTankType();
|
||||||
if(type.name().equals(FluidTypeTheOldOne.NITAN.name()))
|
if(type.name().equals(FluidTypeTheOldOne.NITAN.name()))
|
||||||
powerCap = maxPower * 10;
|
powerCap = maxPower * 10;
|
||||||
else
|
else
|
||||||
@ -256,7 +257,7 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
|||||||
return getHEFromFuel() > 0;
|
return getHEFromFuel() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final HashMap<FluidTypeTheOldOne, Integer> fuels = new HashMap();
|
public static final HashMap<FluidType, Integer> fuels = new HashMap();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
fuels.put(FluidTypeTheOldOne.SMEAR, 50);
|
fuels.put(FluidTypeTheOldOne.SMEAR, 50);
|
||||||
@ -274,7 +275,7 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getHEFromFuel() {
|
public int getHEFromFuel() {
|
||||||
FluidTypeTheOldOne type = tank.getTankType();
|
FluidType type = tank.getTankType();
|
||||||
Integer value = fuels.get(type);
|
Integer value = fuels.get(type);
|
||||||
return value != null ? value : 0;
|
return value != null ? value : 0;
|
||||||
}
|
}
|
||||||
@ -326,22 +327,22 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.MachineRecipes;
|
import com.hbm.inventory.recipes.MachineRecipes;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
@ -261,7 +262,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
@ -272,7 +273,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,7 +288,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -295,7 +296,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -305,7 +306,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
|
|
||||||
@ -319,7 +320,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -334,12 +335,12 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list2;
|
return list2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list2.clear();
|
list2.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.lib.ModDamageSource;
|
import com.hbm.lib.ModDamageSource;
|
||||||
@ -499,22 +500,22 @@ public class TileEntityMachineTurbofan extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -218,7 +219,7 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,12 +232,12 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,8 @@ import com.hbm.interfaces.IFluidContainer;
|
|||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemZirnoxBreedingRod;
|
import com.hbm.items.machine.ItemZirnoxBreedingRod;
|
||||||
import com.hbm.items.machine.ItemZirnoxRod;
|
import com.hbm.items.machine.ItemZirnoxRod;
|
||||||
@ -379,12 +381,12 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
@ -403,34 +405,24 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
switch (type) {
|
if(type == Fluids.SUPERHOTSTEAM) return steam.getMaxFill();
|
||||||
case SUPERHOTSTEAM: return steam.getMaxFill();
|
if(type == Fluids.CARBONDIOXIDE) return carbonDioxide.getMaxFill();
|
||||||
case CARBONDIOXIDE: return carbonDioxide.getMaxFill();
|
if(type == Fluids.WATER) return water.getMaxFill();
|
||||||
case WATER: return water.getMaxFill();
|
return 0;
|
||||||
default: return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
switch (type) {
|
if(type == Fluids.SUPERHOTSTEAM) steam.setFill(i);
|
||||||
case SUPERHOTSTEAM: steam.setFill(i);
|
if(type == Fluids.CARBONDIOXIDE) carbonDioxide.setFill(i);
|
||||||
break;
|
if(type == Fluids.WATER) water.setFill(i);
|
||||||
case CARBONDIOXIDE: carbonDioxide.setFill(i);
|
|
||||||
break;
|
|
||||||
case WATER: water.setFill(i);
|
|
||||||
break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
switch (type) {
|
if(type == Fluids.SUPERHOTSTEAM) return steam.getFill();
|
||||||
case SUPERHOTSTEAM: return steam.getFill();
|
if(type == Fluids.CARBONDIOXIDE) return carbonDioxide.getFill();
|
||||||
case CARBONDIOXIDE: return carbonDioxide.getFill();
|
if(type == Fluids.WATER) return water.getFill();
|
||||||
case WATER: return water.getFill();
|
return 0;
|
||||||
default: return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFillstate(int fill, int index) {
|
public void setFillstate(int fill, int index) {
|
||||||
@ -445,7 +437,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0: steam.setTankType(type);
|
case 0: steam.setTankType(type);
|
||||||
break;
|
break;
|
||||||
@ -466,11 +458,11 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.SILEXRecipes;
|
import com.hbm.inventory.recipes.SILEXRecipes;
|
||||||
import com.hbm.inventory.recipes.SILEXRecipes.SILEXRecipe;
|
import com.hbm.inventory.recipes.SILEXRecipes.SILEXRecipe;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
@ -114,7 +115,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
|||||||
return (currentFill * i) / maxFill;
|
return (currentFill * i) / maxFill;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final HashMap<FluidTypeTheOldOne, ComparableStack> fluidConversion = new HashMap();
|
public static final HashMap<FluidType, ComparableStack> fluidConversion = new HashMap();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
fluidConversion.put(FluidTypeTheOldOne.UF6, new ComparableStack(ModItems.fluid_icon, 1, FluidTypeTheOldOne.UF6.ordinal()));
|
fluidConversion.put(FluidTypeTheOldOne.UF6, new ComparableStack(ModItems.fluid_icon, 1, FluidTypeTheOldOne.UF6.ordinal()));
|
||||||
@ -285,14 +286,14 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
|
|
||||||
if(type == tank.getTankType())
|
if(type == tank.getTankType())
|
||||||
tank.setFill(fill);
|
tank.setFill(fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +303,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(type == tank.getTankType())
|
if(type == tank.getTankType())
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
@ -311,7 +312,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(type == tank.getTankType())
|
if(type == tank.getTankType())
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -73,7 +74,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.WATER)
|
if(type == FluidTypeTheOldOne.WATER)
|
||||||
water.setFill(fill);
|
water.setFill(fill);
|
||||||
if(type == FluidTypeTheOldOne.STEAM)
|
if(type == FluidTypeTheOldOne.STEAM)
|
||||||
@ -81,7 +82,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index == 0)
|
if(index == 0)
|
||||||
water.setTankType(type);
|
water.setTankType(type);
|
||||||
if(index == 1)
|
if(index == 1)
|
||||||
@ -94,7 +95,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.WATER)
|
if(type == FluidTypeTheOldOne.WATER)
|
||||||
return water.getFill();
|
return water.getFill();
|
||||||
if(type == FluidTypeTheOldOne.STEAM)
|
if(type == FluidTypeTheOldOne.STEAM)
|
||||||
@ -104,13 +105,13 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord, this.yCoord + 3, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord + 3, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +121,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.WATER)
|
if(type == FluidTypeTheOldOne.WATER)
|
||||||
return water.getMaxFill();
|
return water.getMaxFill();
|
||||||
if(type == FluidTypeTheOldOne.STEAM)
|
if(type == FluidTypeTheOldOne.STEAM)
|
||||||
@ -130,12 +131,12 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
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;
|
||||||
@ -356,7 +357,7 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -372,7 +373,7 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(fill);
|
tanks[0].setFill(fill);
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -380,7 +381,7 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if (index < 2 && tanks[index] != null)
|
if (index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
@ -395,7 +396,7 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.hbm.hazard.HazardSystem;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemWasteLong;
|
import com.hbm.items.special.ItemWasteLong;
|
||||||
import com.hbm.items.special.ItemWasteShort;
|
import com.hbm.items.special.ItemWasteShort;
|
||||||
@ -223,7 +224,7 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||||
@ -233,12 +234,12 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type == tanks[0].getTankType())
|
if(type == tanks[0].getTankType())
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type == tanks[1].getTankType())
|
else if(type == tanks[1].getTankType())
|
||||||
@ -248,7 +249,7 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type == tanks[0].getTankType())
|
if(type == tanks[0].getTankType())
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type == tanks[1].getTankType())
|
else if(type == tanks[1].getTankType())
|
||||||
@ -256,7 +257,7 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type == tanks[0].getTankType())
|
if(type == tanks[0].getTankType())
|
||||||
return list;
|
return list;
|
||||||
if(type == tanks[1].getTankType())
|
if(type == tanks[1].getTankType())
|
||||||
@ -266,7 +267,7 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type == tanks[0].getTankType())
|
if(type == tanks[0].getTankType())
|
||||||
this.list.clear();
|
this.list.clear();
|
||||||
if(type == tanks[1].getTankType())
|
if(type == tanks[1].getTankType())
|
||||||
@ -280,7 +281,7 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.machine;
|
|||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -42,7 +43,7 @@ public class TileEntityTowerLarge extends TileEntityCondenser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
for(int i = 2; i <= 6; i++) {
|
for(int i = 2; i <= 6; i++) {
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -14,8 +15,8 @@ public class TileEntityTowerSmall extends TileEntityCondenser {
|
|||||||
|
|
||||||
public TileEntityTowerSmall() {
|
public TileEntityTowerSmall() {
|
||||||
tanks = new FluidTank[2];
|
tanks = new FluidTank[2];
|
||||||
tanks[0] = new FluidTank(FluidTypeTheOldOne.SPENTSTEAM, 1000, 0);
|
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 1000, 0);
|
||||||
tanks[1] = new FluidTank(FluidTypeTheOldOne.WATER, 1000, 1);
|
tanks[1] = new FluidTank(Fluids.WATER, 1000, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -42,7 +43,7 @@ public class TileEntityTowerSmall extends TileEntityCondenser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
for(int i = 2; i <= 6; i++) {
|
for(int i = 2; i <= 6; i++) {
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import com.hbm.interfaces.IFluidContainer;
|
|||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.interfaces.IReactor;
|
import com.hbm.interfaces.IReactor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemCapacitor;
|
import com.hbm.items.machine.ItemCapacitor;
|
||||||
import com.hbm.items.special.WatzFuel;
|
import com.hbm.items.special.WatzFuel;
|
||||||
@ -705,12 +706,12 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord + 4, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 4, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord - 4, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 4, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 4, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord, this.zCoord + 4, getTact(), type);
|
||||||
@ -719,27 +720,27 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list1;
|
return list1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list1.clear();
|
list1.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.util.Tuple.Quartet;
|
import com.hbm.util.Tuple.Quartet;
|
||||||
@ -55,7 +56,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
|
|
||||||
private void crack() {
|
private void crack() {
|
||||||
|
|
||||||
Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer> quart = RefineryRecipes.getCracking(tanks[0].getTankType());
|
Quartet<FluidType, FluidType, Integer, Integer> quart = RefineryRecipes.getCracking(tanks[0].getTankType());
|
||||||
|
|
||||||
if(quart != null) {
|
if(quart != null) {
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
|
|
||||||
private void setupTanks() {
|
private void setupTanks() {
|
||||||
|
|
||||||
Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer> quart = RefineryRecipes.getCracking(tanks[0].getTankType());
|
Quartet<FluidType, FluidType, Integer, Integer> quart = RefineryRecipes.getCracking(tanks[0].getTankType());
|
||||||
|
|
||||||
if(quart != null) {
|
if(quart != null) {
|
||||||
tanks[1].setTankType(FluidTypeTheOldOne.STEAM);
|
tanks[1].setTankType(FluidTypeTheOldOne.STEAM);
|
||||||
@ -114,7 +115,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
for(FluidTank tank : tanks) {
|
for(FluidTank tank : tanks) {
|
||||||
if(tank.getTankType() == type) {
|
if(tank.getTankType() == type) {
|
||||||
tank.setFill(fill);
|
tank.setFill(fill);
|
||||||
@ -123,7 +124,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
this.tanks[index].setTankType(type);
|
this.tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +134,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
for(FluidTank tank : tanks) {
|
for(FluidTank tank : tanks) {
|
||||||
if(tank.getTankType() == type) {
|
if(tank.getTankType() == type) {
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
@ -143,7 +144,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type == tanks[0].getTankType())
|
if(type == tanks[0].getTankType())
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type == tanks[1].getTankType())
|
else if(type == tanks[1].getTankType())
|
||||||
@ -153,7 +154,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
@ -170,7 +171,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +181,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
return list1;
|
return list1;
|
||||||
if(type.name().equals(tanks[3].getTankType().name()))
|
if(type.name().equals(tanks[3].getTankType().name()))
|
||||||
@ -189,7 +190,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
list1.clear();
|
list1.clear();
|
||||||
if(type.name().equals(tanks[3].getTankType().name()))
|
if(type.name().equals(tanks[3].getTankType().name()))
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.hbm.blocks.ModBlocks;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.world.feature.OilSpot;
|
import com.hbm.world.feature.OilSpot;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@ -103,7 +104,7 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||||
@ -111,7 +112,7 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type == tanks[2].getTankType() ? tanks[2].getMaxFill() : 0;
|
return type == tanks[2].getTankType() ? tanks[2].getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.util.Tuple.Quartet;
|
import com.hbm.util.Tuple.Quartet;
|
||||||
@ -76,7 +77,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
|
|
||||||
private void setupTanks() {
|
private void setupTanks() {
|
||||||
|
|
||||||
Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer> quart = RefineryRecipes.getFractions(tanks[0].getTankType());
|
Quartet<FluidType, FluidType, Integer, Integer> quart = RefineryRecipes.getFractions(tanks[0].getTankType());
|
||||||
|
|
||||||
if(quart != null) {
|
if(quart != null) {
|
||||||
tanks[1].setTankType(quart.getW());
|
tanks[1].setTankType(quart.getW());
|
||||||
@ -90,7 +91,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
|
|
||||||
private void fractionate() {
|
private void fractionate() {
|
||||||
|
|
||||||
Quartet<FluidTypeTheOldOne, FluidTypeTheOldOne, Integer, Integer> quart = RefineryRecipes.getFractions(tanks[0].getTankType());
|
Quartet<FluidType, FluidType, Integer, Integer> quart = RefineryRecipes.getFractions(tanks[0].getTankType());
|
||||||
|
|
||||||
if(quart != null) {
|
if(quart != null) {
|
||||||
|
|
||||||
@ -132,7 +133,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
for(FluidTank tank : tanks) {
|
for(FluidTank tank : tanks) {
|
||||||
if(tank.getTankType() == type) {
|
if(tank.getTankType() == type) {
|
||||||
tank.setFill(fill);
|
tank.setFill(fill);
|
||||||
@ -141,7 +142,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
this.tanks[index].setTankType(type);
|
this.tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +152,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
for(FluidTank tank : tanks) {
|
for(FluidTank tank : tanks) {
|
||||||
if(tank.getTankType() == type) {
|
if(tank.getTankType() == type) {
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
@ -161,7 +162,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else
|
else
|
||||||
@ -169,7 +170,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
for(int i = 2; i < 6; i++) {
|
for(int i = 2; i < 6; i++) {
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||||
@ -178,7 +179,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +189,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
return list1;
|
return list1;
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -197,7 +198,7 @@ public class TileEntityMachineFractionTower extends TileEntity implements IFluid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
list1.clear();
|
list1.clear();
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
@ -274,22 +275,22 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine.oil;
|
|||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.explosion.ExplosionLarge;
|
import com.hbm.explosion.ExplosionLarge;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@ -83,7 +84,7 @@ public class TileEntityMachineOilWell extends TileEntityOilDrillBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord, getTact(), type);
|
||||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 2, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package com.hbm.tileentity.machine.oil;
|
|||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -122,7 +122,7 @@ public class TileEntityMachinePumpjack extends TileEntityOilDrillBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IFluidContainer;
|
|||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidContainerRegistry;
|
import com.hbm.inventory.FluidContainerRegistry;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
@ -348,7 +349,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 2, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 2, getTact(), type);
|
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord - 2, getTact(), type);
|
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||||
@ -361,7 +362,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,7 +376,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -391,7 +392,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -405,7 +406,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
return list1;
|
return list1;
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -418,7 +419,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
list1.clear();
|
list1.clear();
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -430,7 +431,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else
|
else
|
||||||
@ -444,7 +445,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < 5 && tanks[index] != null)
|
if(index < 5 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.UpgradeManager;
|
import com.hbm.inventory.UpgradeManager;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
@ -258,12 +259,12 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
for(FluidTank tank : tanks) {
|
for(FluidTank tank : tanks) {
|
||||||
if(type == tank.getTankType()) {
|
if(type == tank.getTankType()) {
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
@ -274,7 +275,7 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
for(FluidTank tank : tanks) {
|
for(FluidTank tank : tanks) {
|
||||||
if(type == tank.getTankType()) {
|
if(type == tank.getTankType()) {
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
@ -284,7 +285,7 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return this.list1;
|
return this.list1;
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -293,7 +294,7 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
list1.clear();
|
list1.clear();
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -307,7 +308,7 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index < tanks.length && tanks[index] != null)
|
if(index < tanks.length && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,11 +5,12 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|
||||||
import com.hbm.interfaces.IControlReceiver;
|
import com.hbm.interfaces.IControlReceiver;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||||
|
|
||||||
@ -26,8 +27,8 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
public TileEntityRBMKBoiler() {
|
public TileEntityRBMKBoiler() {
|
||||||
super(0);
|
super(0);
|
||||||
|
|
||||||
feed = new FluidTank(FluidTypeTheOldOne.WATER, 10000, 0);
|
feed = new FluidTank(Fluids.WATER, 10000, 0);
|
||||||
steam = new FluidTank(FluidTypeTheOldOne.STEAM, 1000000, 1);
|
steam = new FluidTank(Fluids.STEAM, 1000000, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -65,30 +66,24 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getHeatFromSteam(FluidTypeTheOldOne type) {
|
public double getHeatFromSteam(FluidType type) {
|
||||||
|
if(type == Fluids.STEAM) return 100D;
|
||||||
switch(type) {
|
if(type == Fluids.HOTSTEAM) return 300D;
|
||||||
case STEAM: return 100D;
|
if(type == Fluids.SUPERHOTSTEAM) return 450D;
|
||||||
case HOTSTEAM: return 300D;
|
if(type == Fluids.ULTRAHOTSTEAM) return 600D;
|
||||||
case SUPERHOTSTEAM: return 450D;
|
return 0D;
|
||||||
case ULTRAHOTSTEAM: return 600D;
|
|
||||||
default: return 0D;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getFactorFromSteam(FluidTypeTheOldOne type) {
|
public double getFactorFromSteam(FluidType type) {
|
||||||
|
if(type == Fluids.STEAM) return 1D;
|
||||||
switch(type) {
|
if(type == Fluids.HOTSTEAM) return 10D;
|
||||||
case STEAM: return 1D;
|
if(type == Fluids.SUPERHOTSTEAM) return 100D;
|
||||||
case HOTSTEAM: return 10D;
|
if(type == Fluids.ULTRAHOTSTEAM) return 1000D;
|
||||||
case SUPERHOTSTEAM: return 100D;
|
return 0D;
|
||||||
case ULTRAHOTSTEAM: return 1000D;
|
|
||||||
default: return 0D;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
|
|
||||||
fillFluid(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, getTact(), type);
|
||||||
|
|
||||||
@ -113,7 +108,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +117,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
public boolean getTact() { return worldObj.getTotalWorldTime() % 2 == 0; }
|
public boolean getTact() { return worldObj.getTotalWorldTime() % 2 == 0; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
|
|
||||||
if(type == feed.getTankType())
|
if(type == feed.getTankType())
|
||||||
feed.setFill(i);
|
feed.setFill(i);
|
||||||
@ -131,7 +126,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(type == feed.getTankType())
|
if(type == feed.getTankType())
|
||||||
return feed.getFill();
|
return feed.getFill();
|
||||||
@ -142,7 +137,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(type == feed.getTankType())
|
if(type == feed.getTankType())
|
||||||
return feed.getMaxFill();
|
return feed.getMaxFill();
|
||||||
@ -162,7 +157,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
|
|
||||||
if(index == 0)
|
if(index == 0)
|
||||||
feed.setTankType(type);
|
feed.setTankType(type);
|
||||||
@ -180,12 +175,12 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,18 +205,16 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 20;
|
return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("incomplete-switch") //shut the up
|
|
||||||
@Override
|
@Override
|
||||||
public void receiveControl(NBTTagCompound data) {
|
public void receiveControl(NBTTagCompound data) {
|
||||||
|
|
||||||
if(data.hasKey("compression")) {
|
if(data.hasKey("compression")) {
|
||||||
|
|
||||||
switch(steam.getTankType()) {
|
FluidType type = steam.getTankType();
|
||||||
case STEAM: steam.setTankType(FluidTypeTheOldOne.HOTSTEAM); steam.setFill(steam.getFill() / 10); break;
|
if(type == Fluids.STEAM) { steam.setTankType(Fluids.HOTSTEAM); steam.setFill(steam.getFill() / 10); }
|
||||||
case HOTSTEAM: steam.setTankType(FluidTypeTheOldOne.SUPERHOTSTEAM); steam.setFill(steam.getFill() / 10); break;
|
if(type == Fluids.HOTSTEAM) { steam.setTankType(Fluids.SUPERHOTSTEAM); steam.setFill(steam.getFill() / 10); }
|
||||||
case SUPERHOTSTEAM: steam.setTankType(FluidTypeTheOldOne.ULTRAHOTSTEAM); steam.setFill(steam.getFill() / 10); break;
|
if(type == Fluids.SUPERHOTSTEAM) { steam.setTankType(Fluids.ULTRAHOTSTEAM); steam.setFill(steam.getFill() / 10); }
|
||||||
case ULTRAHOTSTEAM: steam.setTankType(FluidTypeTheOldOne.STEAM); steam.setFill(Math.min(steam.getFill() * 1000, steam.getMaxFill())); break;
|
if(type == Fluids.ULTRAHOTSTEAM) { steam.setTankType(Fluids.STEAM); steam.setFill(Math.min(steam.getFill() * 1000, steam.getMaxFill())); }
|
||||||
}
|
|
||||||
|
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
}
|
}
|
||||||
@ -251,7 +244,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
data.setInteger("maxWater", this.feed.getMaxFill());
|
data.setInteger("maxWater", this.feed.getMaxFill());
|
||||||
data.setInteger("steam", this.steam.getFill());
|
data.setInteger("steam", this.steam.getFill());
|
||||||
data.setInteger("maxSteam", this.steam.getMaxFill());
|
data.setInteger("maxSteam", this.steam.getMaxFill());
|
||||||
data.setShort("type", (short)this.steam.getTankType().ordinal());
|
data.setShort("type", (short)this.steam.getTankType().getID());
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@ -104,13 +105,13 @@ public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
if(type == tank.getTankType())
|
if(type == tank.getTankType())
|
||||||
tank.setFill(fill);
|
tank.setFill(fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,12 +121,12 @@ public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type == tank.getTankType() ? tank.getFill() : 0;
|
return type == tank.getTankType() ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type == tank.getTankType() ? tank.getMaxFill() : 0;
|
return type == tank.getTankType() ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.hbm.blocks.machine.rbmk.RBMKBase;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@ -67,12 +68,12 @@ public class TileEntityRBMKInlet extends TileEntity implements IFluidAcceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.WATER) water.setFill(fill);
|
if(type == FluidTypeTheOldOne.WATER) water.setFill(fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
if(index == 0) water.setTankType(type);
|
if(index == 0) water.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,13 +83,13 @@ public class TileEntityRBMKInlet extends TileEntity implements IFluidAcceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.WATER) return water.getFill();
|
if(type == FluidTypeTheOldOne.WATER) return water.getFill();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type == FluidTypeTheOldOne.WATER) return water.getMaxFill();
|
if(type == FluidTypeTheOldOne.WATER) return water.getMaxFill();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.hbm.interfaces.IFluidAcceptor;
|
|||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
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.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
@ -147,7 +148,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
fillFluid(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, getTact(), type);
|
fillFluid(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, getTact(), type);
|
||||||
|
|
||||||
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) {
|
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) {
|
||||||
@ -171,7 +172,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,14 +188,14 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
|
|
||||||
if(type == gas.getTankType())
|
if(type == gas.getTankType())
|
||||||
gas.setFill(fill);
|
gas.setFill(fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
|
|
||||||
if(index == 0)
|
if(index == 0)
|
||||||
gas.setTankType(type);
|
gas.setTankType(type);
|
||||||
@ -206,7 +207,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
|
|
||||||
if(type == gas.getTankType())
|
if(type == gas.getTankType())
|
||||||
return gas.getFill();
|
return gas.getFill();
|
||||||
@ -215,12 +216,12 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list.clear();
|
list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
|||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@ -73,12 +74,12 @@ public class TileEntityRBMKOutlet extends TileEntity implements IFluidSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int fill, FluidTypeTheOldOne type) {
|
public void setFluidFill(int fill, FluidType type) {
|
||||||
steam.setFill(fill);
|
steam.setFill(fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
steam.setTankType(type);
|
steam.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,18 +89,18 @@ public class TileEntityRBMKOutlet extends TileEntity implements IFluidSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return steam.getFill();
|
return steam.getFill();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluidInit(FluidTypeTheOldOne type) {
|
public void fillFluidInit(FluidType type) {
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||||
fillFluid(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY, this.zCoord + dir.offsetZ, getTact(), type);
|
fillFluid(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY, this.zCoord + dir.offsetZ, getTact(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidTypeTheOldOne type) {
|
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,12 +109,12 @@ public class TileEntityRBMKOutlet extends TileEntity implements IFluidSource {
|
|||||||
public boolean getTact() { return worldObj.getTotalWorldTime() % 2 == 0; }
|
public boolean getTact() { return worldObj.getTotalWorldTime() % 2 == 0; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IFluidAcceptor> getFluidList(FluidTypeTheOldOne type) {
|
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||||
return this.list;
|
return this.list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearFluidList(FluidTypeTheOldOne type) {
|
public void clearFluidList(FluidType type) {
|
||||||
this.list.clear();
|
this.list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.handler.BulletConfiguration;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
import com.hbm.handler.FluidTypeHandler.FluidTypeTheOldOne;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.packet.AuxParticlePacketNT;
|
import com.hbm.packet.AuxParticlePacketNT;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
@ -138,22 +139,22 @@ public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(FluidTypeTheOldOne type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxFluidFill(FluidTypeTheOldOne type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFluidFill(FluidTypeTheOldOne type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFluidFill(int i, FluidTypeTheOldOne type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user