bug Fixes

*corrected pipes connection issue with generic tanks
*corrected liquid lose when tank would try to create flow in pipes on
top or bottom side depending on liquid type.
*corrected the release valve crafting receipe
This commit is contained in:
Rseifert 2013-01-18 08:09:05 -05:00
parent f1b03a167c
commit 79eb211126
2 changed files with 20 additions and 5 deletions

View file

@ -77,7 +77,6 @@ public class LiquidMechanics extends DummyModContainer
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir() + "/UniversalElectricity/", NAME + ".cfg")); public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir() + "/UniversalElectricity/", NAME + ".cfg"));
public final static int BLOCK_ID_PREFIX = 3100; public final static int BLOCK_ID_PREFIX = 3100;
public final static int LIQUID_ID_PREFIX = 200;
public final static int ITEM_ID_PREFIX = 13200; public final static int ITEM_ID_PREFIX = 13200;
public static Block blockPipe; public static Block blockPipe;
@ -115,6 +114,7 @@ public class LiquidMechanics extends DummyModContainer
blockGenerator = new BlockGenerator((this.CONFIGURATION.getBlock("Generator", BLOCK_ID_PREFIX + 4).getInt())); blockGenerator = new BlockGenerator((this.CONFIGURATION.getBlock("Generator", BLOCK_ID_PREFIX + 4).getInt()));
blockReleaseValve = new BlockReleaseValve((this.CONFIGURATION.getBlock("Release Valve", BLOCK_ID_PREFIX + 5).getInt())); blockReleaseValve = new BlockReleaseValve((this.CONFIGURATION.getBlock("Release Valve", BLOCK_ID_PREFIX + 5).getInt()));
blockTank = new BlockTank(this.CONFIGURATION.getBlock("Tank", BLOCK_ID_PREFIX + 6).getInt()); blockTank = new BlockTank(this.CONFIGURATION.getBlock("Tank", BLOCK_ID_PREFIX + 6).getInt());
blockWasteLiquid = new BlockWasteLiquid(this.CONFIGURATION.getBlock("WasteLiquid", BLOCK_ID_PREFIX + 7).getInt());
// Items // Items
itemParts = new ItemParts(this.CONFIGURATION.getItem("Parts", ITEM_ID_PREFIX).getInt()); itemParts = new ItemParts(this.CONFIGURATION.getItem("Parts", ITEM_ID_PREFIX).getInt());
@ -124,8 +124,6 @@ public class LiquidMechanics extends DummyModContainer
// Valve item // Valve item
itemGauge = new ItemGuage(this.CONFIGURATION.getItem("PipeGuage", ITEM_ID_PREFIX + 3).getInt()); itemGauge = new ItemGuage(this.CONFIGURATION.getItem("PipeGuage", ITEM_ID_PREFIX + 3).getInt());
// Liquid Registry
blockWasteLiquid = new BlockWasteLiquid(this.CONFIGURATION.getBlock("WasteLiquid", LIQUID_ID_PREFIX).getInt());
CONFIGURATION.save(); CONFIGURATION.save();
proxy.preInit(); proxy.preInit();
@ -280,7 +278,7 @@ public class LiquidMechanics extends DummyModContainer
// release valve // release valve
GameRegistry.addRecipe(new ItemStack(blockReleaseValve, 1), new Object[] { GameRegistry.addRecipe(new ItemStack(blockReleaseValve, 1), new Object[] {
"RPR", "PVP", "RPR", " P ", "RPR", "PVP", "RPR",
'P', new ItemStack(blockPipe, 1, 15), 'P', new ItemStack(blockPipe, 1, 15),
'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()), 'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()),
'R', Item.redstone }); 'R', Item.redstone });

View file

@ -73,8 +73,24 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO
} }
} }
else if (connectedBlocks[i] instanceof TileEntityTank && ((TileEntityTank) connectedBlocks[i]).getColor() == this.color)
{
if (dir == ForgeDirection.UP && !color.getLiquidData().getCanFloat())
{
}
else if (dir == ForgeDirection.DOWN && color.getLiquidData().getCanFloat())
{
}
else
{
stored.drain(((ITankContainer) connectedBlocks[i]).fill(dir.getOpposite(), stack, true), true);
}
}
else else
{ {
stored.drain(((ITankContainer) connectedBlocks[i]).fill(dir.getOpposite(), stack, true), true); stored.drain(((ITankContainer) connectedBlocks[i]).fill(dir.getOpposite(), stack, true), true);
} }
} }
@ -259,7 +275,8 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO
connectedBlocks[i] = null; connectedBlocks[i] = null;
} }
if (this.color != ColorCode.NONE && ent instanceof TileEntityTank && color != ((TileEntityTank) ent).getColor()) if (this.color != ColorCode.NONE && ent instanceof TileEntityTank && ((TileEntityTank) ent).getColor() != ColorCode.NONE && color != ((TileEntityTank) ent).getColor()
)
{ {
connectedBlocks[i] = null; connectedBlocks[i] = null;
} }