adjusted micdoodle8 's changes for tanks
This commit is contained in:
parent
ae9a6227f7
commit
34e7e6c7a6
4 changed files with 72 additions and 158 deletions
|
@ -86,7 +86,7 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler
|
||||||
if (block.blockID == FluidMech.blockConPump.blockID && metadata < 4)
|
if (block.blockID == FluidMech.blockConPump.blockID && metadata < 4)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef((float) 0.0F, (float) 1.1F, (float) 0.0F);
|
GL11.glTranslatef((float) 0.0F, (float) 1.0F, (float) 0.0F);
|
||||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(FluidMech.MODEL_TEXTURE_DIRECTORY + "ConstructionPump.png"));
|
GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(FluidMech.MODEL_TEXTURE_DIRECTORY + "ConstructionPump.png"));
|
||||||
conPump.render(0.0725F);
|
conPump.render(0.0725F);
|
||||||
|
|
|
@ -1,29 +1,52 @@
|
||||||
package fluidmech.common;
|
package fluidmech.common;
|
||||||
|
|
||||||
import hydraulic.api.ColorCode;
|
import hydraulic.api.ColorCode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
|
|
||||||
import net.minecraftforge.event.ForgeSubscribe;
|
import net.minecraftforge.event.ForgeSubscribe;
|
||||||
|
import net.minecraftforge.liquids.LiquidDictionary;
|
||||||
import net.minecraftforge.liquids.LiquidDictionary.LiquidRegisterEvent;
|
import net.minecraftforge.liquids.LiquidDictionary.LiquidRegisterEvent;
|
||||||
|
import net.minecraftforge.liquids.LiquidStack;
|
||||||
|
|
||||||
public class FluidEvents
|
import com.google.common.collect.BiMap;
|
||||||
|
import com.google.common.collect.HashBiMap;
|
||||||
|
|
||||||
|
public class FluidEvents
|
||||||
{
|
{
|
||||||
|
private static BiMap<ColorCode, LiquidStack> restrictedStacks = HashBiMap.create();
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
/* ADD DEFAULT LIQUIDS */
|
||||||
|
restrictedStacks.put(ColorCode.BLUE, LiquidDictionary.getCanonicalLiquid("Water"));
|
||||||
|
restrictedStacks.put(ColorCode.RED, LiquidDictionary.getCanonicalLiquid("Lava"));
|
||||||
|
}
|
||||||
|
|
||||||
@ForgeSubscribe
|
@ForgeSubscribe
|
||||||
public void onLiquidRegistered(LiquidRegisterEvent event)
|
public void onLiquidRegistered(LiquidRegisterEvent event)
|
||||||
{
|
{
|
||||||
if (event.Name != null)
|
if (event.Name != null)
|
||||||
{
|
{
|
||||||
if (event.Name.equals("Fuel") && !FluidMech.liquidTypes.contains(ColorCode.get(ColorCode.YELLOW).ordinal()))
|
if (event.Name.equalsIgnoreCase("Fuel") && !restrictedStacks.containsKey(ColorCode.YELLOW))
|
||||||
{
|
{
|
||||||
FluidMech.liquidTypes.add(ColorCode.get(ColorCode.YELLOW).ordinal());
|
restrictedStacks.put(ColorCode.YELLOW, event.Liquid);
|
||||||
}
|
}
|
||||||
else if (event.Name.equals("Oil") && !FluidMech.liquidTypes.contains(ColorCode.get(ColorCode.BLACK).ordinal()))
|
else if (event.Name.equalsIgnoreCase("Oil") && !restrictedStacks.containsKey(ColorCode.BLACK))
|
||||||
{
|
{
|
||||||
FluidMech.liquidTypes.add(ColorCode.get(ColorCode.BLACK).ordinal());
|
restrictedStacks.put(ColorCode.BLACK, event.Liquid);
|
||||||
}
|
}
|
||||||
|
else if (event.Name.equalsIgnoreCase("Milk") && !restrictedStacks.containsKey(ColorCode.WHITE))
|
||||||
|
{
|
||||||
|
restrictedStacks.put(ColorCode.WHITE, event.Liquid);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean hasRestrictedStack(int meta)
|
||||||
|
{
|
||||||
|
if (restrictedStacks.containsKey(ColorCode.get(meta)))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,8 @@ import fluidmech.common.tiles.TileEntityReleaseValve;
|
||||||
import fluidmech.common.tiles.TileEntitySink;
|
import fluidmech.common.tiles.TileEntitySink;
|
||||||
import fluidmech.common.tiles.TileEntityTank;
|
import fluidmech.common.tiles.TileEntityTank;
|
||||||
import hydraulic.api.ColorCode;
|
import hydraulic.api.ColorCode;
|
||||||
import hydraulic.helpers.FluidHelper;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
@ -96,9 +94,6 @@ public class FluidMech extends DummyModContainer
|
||||||
@Metadata(FluidMech.MOD_ID)
|
@Metadata(FluidMech.MOD_ID)
|
||||||
public static ModMetadata meta;
|
public static ModMetadata meta;
|
||||||
|
|
||||||
/* LIQUID TYPES */
|
|
||||||
public static ArrayList<Integer> liquidTypes = new ArrayList();
|
|
||||||
|
|
||||||
/* RESOURCE FILE PATHS */
|
/* RESOURCE FILE PATHS */
|
||||||
public static final String RESOURCE_PATH = "/mods/fluidmech/";
|
public static final String RESOURCE_PATH = "/mods/fluidmech/";
|
||||||
public static final String TEXTURE_DIRECTORY = RESOURCE_PATH + "textures/";
|
public static final String TEXTURE_DIRECTORY = RESOURCE_PATH + "textures/";
|
||||||
|
@ -143,17 +138,11 @@ public class FluidMech extends DummyModContainer
|
||||||
|
|
||||||
/* LOGGER - EXTENDS FORGE'S LOG SYSTEM */
|
/* LOGGER - EXTENDS FORGE'S LOG SYSTEM */
|
||||||
public static Logger FMLog = Logger.getLogger(FluidMech.MOD_NAME);
|
public static Logger FMLog = Logger.getLogger(FluidMech.MOD_NAME);
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
/* EVENT BUS (done here to ensure all fluid events are caught)*/
|
/* EVENT BUS (done here to ensure all fluid events are caught) */
|
||||||
MinecraftForge.EVENT_BUS.register(new FluidEvents());
|
MinecraftForge.EVENT_BUS.register(new FluidEvents());
|
||||||
|
|
||||||
/* ADD DEFAULT LIQUIDS */
|
|
||||||
liquidTypes.add(ColorCode.get(ColorCode.BLUE).ordinal());
|
|
||||||
liquidTypes.add(ColorCode.get(ColorCode.RED).ordinal());
|
|
||||||
liquidTypes.add(ColorCode.get(ColorCode.NONE).ordinal());
|
|
||||||
liquidTypes.add(ColorCode.get(ColorCode.WHITE).ordinal());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreInit
|
@PreInit
|
||||||
|
@ -162,9 +151,6 @@ public class FluidMech extends DummyModContainer
|
||||||
/* LOGGER SETUP */
|
/* LOGGER SETUP */
|
||||||
FMLog.setParent(FMLLog.getLogger());
|
FMLog.setParent(FMLLog.getLogger());
|
||||||
FMLog.info("Initializing...");
|
FMLog.info("Initializing...");
|
||||||
|
|
||||||
/* EVENT BUS */
|
|
||||||
MinecraftForge.EVENT_BUS.register(new FluidHelper());
|
|
||||||
|
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
||||||
|
@ -213,13 +199,7 @@ public class FluidMech extends DummyModContainer
|
||||||
/* MCMOD.INFO FILE BUILDER? */
|
/* MCMOD.INFO FILE BUILDER? */
|
||||||
meta.modId = FluidMech.MOD_ID;
|
meta.modId = FluidMech.MOD_ID;
|
||||||
meta.name = FluidMech.MOD_NAME;
|
meta.name = FluidMech.MOD_NAME;
|
||||||
meta.description = "Fluid Mechanics is a combination between supporting fluid handling and mechanical energy handling system. " +
|
meta.description = "Fluid Mechanics is a combination between supporting fluid handling and mechanical energy handling system. " + "Its designed to help other mods move there liquids to using a universal liquid system managed by forge. As a bonus it also " + "comes with suppot to help mods move energy by means of mechanics motion along rods. This mod by itself doesn't offer much more " + "than basic liquid storage, placement, and removel in the world. Its suggest to download other mods that supports the Forge's " + "LiquidDictionary. " + "\n" + "Suported Power systems: Universal Electric ";
|
||||||
"Its designed to help other mods move there liquids to using a universal liquid system managed by forge. As a bonus it also " +
|
|
||||||
"comes with suppot to help mods move energy by means of mechanics motion along rods. This mod by itself doesn't offer much more " +
|
|
||||||
"than basic liquid storage, placement, and removel in the world. Its suggest to download other mods that supports the Forge's " +
|
|
||||||
"LiquidDictionary. " +
|
|
||||||
"\n" +
|
|
||||||
"Suported Power systems: Universal Electric ";
|
|
||||||
|
|
||||||
meta.url = "http://www.universalelectricity.com/fluidmechanics";
|
meta.url = "http://www.universalelectricity.com/fluidmechanics";
|
||||||
|
|
||||||
|
@ -264,7 +244,7 @@ public class FluidMech extends DummyModContainer
|
||||||
OreDictionary.registerOre("valvePart", new ItemStack(itemParts, 1, Parts.Valve.ordinal()));
|
OreDictionary.registerOre("valvePart", new ItemStack(itemParts, 1, Parts.Valve.ordinal()));
|
||||||
OreDictionary.registerOre("bronzeTube", new ItemStack(itemParts, 1, Parts.Bronze.ordinal()));
|
OreDictionary.registerOre("bronzeTube", new ItemStack(itemParts, 1, Parts.Bronze.ordinal()));
|
||||||
OreDictionary.registerOre("unfinishedTank", new ItemStack(itemParts, 1, Parts.Tank.ordinal()));
|
OreDictionary.registerOre("unfinishedTank", new ItemStack(itemParts, 1, Parts.Tank.ordinal()));
|
||||||
|
|
||||||
/* LIQUID DIRECTORY CALL */
|
/* LIQUID DIRECTORY CALL */
|
||||||
LiquidStack waste = LiquidDictionary.getOrCreateLiquid("Waste", new LiquidStack(FluidMech.blockWasteLiquid, 1));
|
LiquidStack waste = LiquidDictionary.getOrCreateLiquid("Waste", new LiquidStack(FluidMech.blockWasteLiquid, 1));
|
||||||
|
|
||||||
|
@ -276,163 +256,70 @@ public class FluidMech extends DummyModContainer
|
||||||
/* LOGGER */
|
/* LOGGER */
|
||||||
FMLog.info("Finalizing...");
|
FMLog.info("Finalizing...");
|
||||||
proxy.postInit();
|
proxy.postInit();
|
||||||
|
|
||||||
/* TAB ITEM SET */
|
/* TAB ITEM SET */
|
||||||
TabFluidMech.setItemStack(new ItemStack(blockPipe, 1, 4));
|
TabFluidMech.setItemStack(new ItemStack(blockPipe, 1, 4));
|
||||||
|
|
||||||
/*/******** RECIPES **************/
|
/* /******** RECIPES ************* */
|
||||||
|
|
||||||
// generator
|
// generator
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(this.blockGenerator, 1), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(this.blockGenerator, 1), new Object[] { "@T@", "OVO", "@T@", 'T', new ItemStack(FluidMech.blockRod, 1), '@', "plateSteel", 'O', "basicCircuit", 'V', "motor" }));
|
||||||
"@T@",
|
|
||||||
"OVO",
|
|
||||||
"@T@",
|
|
||||||
'T', new ItemStack(FluidMech.blockRod, 1),
|
|
||||||
'@', "plateSteel",
|
|
||||||
'O', "basicCircuit",
|
|
||||||
'V', "motor" }));
|
|
||||||
// pipe gauge
|
// pipe gauge
|
||||||
GameRegistry.addRecipe(new ItemStack(this.itemGauge, 1, 0), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(this.itemGauge, 1, 0), new Object[] { "TVT", " T ", 'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()), 'T', new ItemStack(itemParts, 1, Parts.Iron.ordinal()) });
|
||||||
"TVT",
|
|
||||||
" T ",
|
|
||||||
'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()),
|
|
||||||
'T', new ItemStack(itemParts, 1, Parts.Iron.ordinal()) });
|
|
||||||
// iron tube
|
// iron tube
|
||||||
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Iron.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Iron.ordinal()), new Object[] { "@@@", '@', Item.ingotIron });
|
||||||
"@@@",
|
|
||||||
'@', Item.ingotIron });
|
|
||||||
// bronze tube
|
// bronze tube
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(itemParts, 4, Parts.Bronze.ordinal()), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(itemParts, 4, Parts.Bronze.ordinal()), new Object[] { "@@@", '@', "ingotBronze" }));
|
||||||
"@@@",
|
|
||||||
'@', "ingotBronze" }));
|
|
||||||
// obby tube
|
// obby tube
|
||||||
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Obby.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Obby.ordinal()), new Object[] { "@@@", '@', Block.obsidian });
|
||||||
"@@@",
|
|
||||||
'@', Block.obsidian });
|
|
||||||
// nether tube
|
// nether tube
|
||||||
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Nether.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Nether.ordinal()), new Object[] { "N@N", 'N', Block.netherrack, '@', new ItemStack(itemParts, 2, Parts.Obby.ordinal()) });
|
||||||
"N@N",
|
|
||||||
'N', Block.netherrack,
|
|
||||||
'@', new ItemStack(itemParts, 2, Parts.Obby.ordinal()) });
|
|
||||||
// seal
|
// seal
|
||||||
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Seal.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(itemParts, 4, Parts.Seal.ordinal()), new Object[] { "@@", "@@", '@', Item.leather });
|
||||||
"@@",
|
|
||||||
"@@",
|
|
||||||
'@', Item.leather });
|
|
||||||
// slime steal
|
// slime steal
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(itemParts, 1, Parts.SlimeSeal.ordinal()), new Object[] {
|
GameRegistry.addShapelessRecipe(new ItemStack(itemParts, 1, Parts.SlimeSeal.ordinal()), new Object[] { new ItemStack(itemParts, 1, Parts.Seal.ordinal()), new ItemStack(Item.slimeBall, 1) });
|
||||||
new ItemStack(itemParts, 1, Parts.Seal.ordinal()),
|
|
||||||
new ItemStack(Item.slimeBall, 1) });
|
|
||||||
// part valve
|
// part valve
|
||||||
GameRegistry.addRecipe(new ItemStack(itemParts, 1, Parts.Valve.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(itemParts, 1, Parts.Valve.ordinal()), new Object[] { "T@T", 'T', new ItemStack(itemParts, 1, Parts.Iron.ordinal()), '@', Block.lever });
|
||||||
"T@T",
|
|
||||||
'T', new ItemStack(itemParts, 1, Parts.Iron.ordinal()),
|
|
||||||
'@', Block.lever });
|
|
||||||
|
|
||||||
// unfinished tank
|
// unfinished tank
|
||||||
GameRegistry.addRecipe(new ItemStack(itemParts, 1, Parts.Tank.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(itemParts, 1, Parts.Tank.ordinal()), new Object[] { " @ ", "@ @", " @ ", '@', Item.ingotIron });
|
||||||
" @ ",
|
|
||||||
"@ @",
|
|
||||||
" @ ",
|
|
||||||
'@', Item.ingotIron });
|
|
||||||
// mechanical rod
|
// mechanical rod
|
||||||
GameRegistry.addRecipe(new ItemStack(blockRod, 1), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(blockRod, 1), new Object[] { "I@I", 'I', Item.ingotIron, '@', new ItemStack(itemParts, 1, Parts.Iron.ordinal()) });
|
||||||
"I@I",
|
|
||||||
'I', Item.ingotIron,
|
|
||||||
'@', new ItemStack(itemParts, 1, Parts.Iron.ordinal()) });
|
|
||||||
|
|
||||||
// Iron Pipe
|
// Iron Pipe
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 1, 15), new Object[] {
|
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 1, 15), new Object[] { new ItemStack(itemParts, 1, Parts.Iron.ordinal()), new ItemStack(itemParts, 1, Parts.Seal.ordinal()) });
|
||||||
new ItemStack(itemParts, 1, Parts.Iron.ordinal()),
|
|
||||||
new ItemStack(itemParts, 1, Parts.Seal.ordinal()) });
|
|
||||||
|
|
||||||
// steam pipes
|
// steam pipes
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 1, ColorCode.ORANGE.ordinal()), new Object[] {
|
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 1, ColorCode.ORANGE.ordinal()), new Object[] { new ItemStack(itemParts, 1, Parts.Bronze.ordinal()), new ItemStack(itemParts, 1, Parts.Seal.ordinal()) });
|
||||||
new ItemStack(itemParts, 1, Parts.Bronze.ordinal()),
|
|
||||||
new ItemStack(itemParts, 1, Parts.Seal.ordinal()) });
|
|
||||||
|
|
||||||
for (int pipeMeta = 0; pipeMeta < 15; pipeMeta++)
|
for (int pipeMeta = 0; pipeMeta < 15; pipeMeta++)
|
||||||
{
|
{
|
||||||
if (pipeMeta != ColorCode.WHITE.ordinal() && pipeMeta != ColorCode.ORANGE.ordinal())
|
if (pipeMeta != ColorCode.WHITE.ordinal() && pipeMeta != ColorCode.ORANGE.ordinal())
|
||||||
{
|
{
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 4, pipeMeta), new Object[] {
|
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 4, pipeMeta), new Object[] { new ItemStack(blockPipe, 1, 15), new ItemStack(blockPipe, 1, 15), new ItemStack(blockPipe, 1, 15), new ItemStack(blockPipe, 1, 15), new ItemStack(Item.dyePowder, 1, pipeMeta) });
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(Item.dyePowder, 1, pipeMeta) });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// milk pipes
|
// milk pipes
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 4, ColorCode.WHITE.ordinal()), new Object[] {
|
GameRegistry.addShapelessRecipe(new ItemStack(blockPipe, 4, ColorCode.WHITE.ordinal()), new Object[] { new ItemStack(blockPipe, 1, 15), new ItemStack(blockPipe, 1, 15), new ItemStack(blockPipe, 1, 15), new ItemStack(blockPipe, 1, 15), new ItemStack(Item.dyePowder, 1, 15) });
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(blockPipe, 1, 15),
|
|
||||||
new ItemStack(Item.dyePowder, 1, 15) });
|
|
||||||
|
|
||||||
// lava tank
|
// lava tank
|
||||||
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.RED.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.RED.ordinal()), new Object[] { "N@N", "@ @", "N@N", 'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()), '@', Block.obsidian, 'N', Block.netherrack });
|
||||||
"N@N",
|
|
||||||
"@ @",
|
|
||||||
"N@N",
|
|
||||||
'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()),
|
|
||||||
'@', Block.obsidian, 'N', Block.netherrack });
|
|
||||||
// water tank
|
// water tank
|
||||||
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.BLUE.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.BLUE.ordinal()), new Object[] { "@G@", "STS", "@G@", 'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()), '@', Block.planks, 'G', Block.glass, 'S', new ItemStack(itemParts, 1, Parts.Seal.ordinal()) });
|
||||||
"@G@",
|
|
||||||
"STS",
|
|
||||||
"@G@",
|
|
||||||
'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()),
|
|
||||||
'@', Block.planks,
|
|
||||||
'G', Block.glass,
|
|
||||||
'S', new ItemStack(itemParts, 1, Parts.Seal.ordinal()) });
|
|
||||||
// milk tank
|
// milk tank
|
||||||
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.WHITE.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.WHITE.ordinal()), new Object[] { "W@W", "WTW", "W@W", 'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()), '@', Block.stone, 'W', Block.planks });
|
||||||
"W@W",
|
|
||||||
"WTW",
|
|
||||||
"W@W",
|
|
||||||
'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()),
|
|
||||||
'@', Block.stone,
|
|
||||||
'W', Block.planks });
|
|
||||||
// generic Tank
|
// generic Tank
|
||||||
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.NONE.ordinal()), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(blockTank, 1, ColorCode.NONE.ordinal()), new Object[] { "@@@", "@T@", "@@@", 'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()), '@', Block.stone });
|
||||||
"@@@",
|
|
||||||
"@T@",
|
|
||||||
"@@@",
|
|
||||||
'T', new ItemStack(itemParts, 1, Parts.Tank.ordinal()),
|
|
||||||
'@', Block.stone });
|
|
||||||
|
|
||||||
// pump
|
// pump
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(blockMachine, 1, 0), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(blockMachine, 1, 0), new Object[] { "C@C", "BMB", "@X@", '@', "plateSteel", 'X', new ItemStack(blockPipe, 1, ColorCode.NONE.ordinal()), 'B', new ItemStack(itemParts, 1, Parts.Valve.ordinal()), 'C', "basicCircuit", 'M', "motor" }));
|
||||||
"C@C",
|
|
||||||
"BMB",
|
|
||||||
"@X@",
|
|
||||||
'@', "plateSteel",
|
|
||||||
'X', new ItemStack(blockPipe, 1, ColorCode.NONE.ordinal()),
|
|
||||||
'B', new ItemStack(itemParts, 1, Parts.Valve.ordinal()),
|
|
||||||
'C', "basicCircuit",
|
|
||||||
'M', "motor" }));
|
|
||||||
|
|
||||||
// release valve
|
// release valve
|
||||||
GameRegistry.addRecipe(new ItemStack(blockReleaseValve, 1), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(blockReleaseValve, 1), new Object[] { "RPR", "PVP", "RPR", 'P', new ItemStack(blockPipe, 1, 15), 'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()), 'R', Item.redstone });
|
||||||
"RPR",
|
|
||||||
"PVP",
|
|
||||||
"RPR",
|
|
||||||
'P', new ItemStack(blockPipe, 1, 15),
|
|
||||||
'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()),
|
|
||||||
'R', Item.redstone });
|
|
||||||
// sink
|
// sink
|
||||||
GameRegistry.addRecipe(new ItemStack(blockSink, 1), new Object[] {
|
GameRegistry.addRecipe(new ItemStack(blockSink, 1), new Object[] { "I I", "SIS", "SPS", 'P', new ItemStack(blockPipe, 1, 15), 'I', Item.ingotIron, 'S', Block.stone });
|
||||||
"I I",
|
|
||||||
"SIS",
|
|
||||||
"SPS",
|
|
||||||
'P', new ItemStack(blockPipe, 1, 15),
|
|
||||||
'I', Item.ingotIron,
|
|
||||||
'S', Block.stone });
|
|
||||||
|
|
||||||
|
|
||||||
FMLog.info("Done Loading");
|
FMLog.info("Done Loading");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||||
import net.minecraftforge.liquids.LiquidStack;
|
import net.minecraftforge.liquids.LiquidStack;
|
||||||
import universalelectricity.prefab.block.BlockAdvanced;
|
import universalelectricity.prefab.block.BlockAdvanced;
|
||||||
import fluidmech.client.render.BlockRenderHelper;
|
import fluidmech.client.render.BlockRenderHelper;
|
||||||
|
import fluidmech.common.FluidEvents;
|
||||||
import fluidmech.common.FluidMech;
|
import fluidmech.common.FluidMech;
|
||||||
import fluidmech.common.TabFluidMech;
|
import fluidmech.common.TabFluidMech;
|
||||||
import fluidmech.common.tiles.TileEntityTank;
|
import fluidmech.common.tiles.TileEntityTank;
|
||||||
|
@ -158,9 +159,12 @@ public class BlockTank extends BlockAdvanced
|
||||||
@Override
|
@Override
|
||||||
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
|
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||||
{
|
{
|
||||||
for (Integer i : FluidMech.liquidTypes)
|
for (int i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
par3List.add(new ItemStack(par1, 1, i));
|
if (FluidEvents.hasRestrictedStack(i))
|
||||||
|
{
|
||||||
|
par3List.add(new ItemStack(par1, 1, i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue