Added Salination Plant component recipes, removed a few printlns, more descriptive multiblock issue notifications

This commit is contained in:
Aidan C. Brady 2014-01-15 23:52:10 -05:00
parent ee0193cb3d
commit f6bca1d2c9
3 changed files with 52 additions and 20 deletions

View file

@ -35,7 +35,7 @@ public class GuiSalinationController extends GuiMekanism
fontRenderer.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040); fontRenderer.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
fontRenderer.drawString("Structure: " + (tileEntity.structured ? MekanismUtils.localize("gui.on") : MekanismUtils.localize("gui.off")), 50, 21, 0x00CD00); fontRenderer.drawString(getStruct(), 50, 21, 0x00CD00);
fontRenderer.drawString("Height: " + tileEntity.height, 50, 30, 0x00CD00); fontRenderer.drawString("Height: " + tileEntity.height, 50, 30, 0x00CD00);
fontRenderer.drawString("Mult: " + getTempMult(), 50, 39, 0x00CD00); fontRenderer.drawString("Mult: " + getTempMult(), 50, 39, 0x00CD00);
fontRenderer.drawString("Max: " + getMaxTemp(), 50, 48, 0x00CD00); fontRenderer.drawString("Max: " + getMaxTemp(), 50, 48, 0x00CD00);
@ -58,6 +58,26 @@ public class GuiSalinationController extends GuiMekanism
super.drawGuiContainerForegroundLayer(mouseX, mouseY); super.drawGuiContainerForegroundLayer(mouseX, mouseY);
} }
private String getStruct()
{
if(tileEntity.structured)
{
return "Structured";
}
else if(!tileEntity.structured)
{
if(tileEntity.controllerConflict)
{
return "Conflict";
}
else {
return "Incomplete";
}
}
return null;
}
private String getTemp() private String getTemp()
{ {
float temp = (float)Math.round((tileEntity.getTemperature()*200)*10)/10F; float temp = (float)Math.round((tileEntity.getTemperature()*200)*10)/10F;

View file

@ -527,6 +527,12 @@ public class Mekanism
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock2, 1, 5), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock2, 1, 5), new Object[] {
"ICI", "ASA", "ICI", Character.valueOf('I'), "ingotIron", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('S'), new ItemStack(BasicBlock, 1, 8) "ICI", "ASA", "ICI", Character.valueOf('I'), "ingotIron", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('S'), new ItemStack(BasicBlock, 1, 8)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 14), new Object[] {
"CGC", "IBI", "CGC", Character.valueOf('C'), "circuitBasic", Character.valueOf('G'), Block.thinGlass, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('B'), "blockCopper"
}));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 15), new Object[] {
"ITI", "CBC", "ITI", Character.valueOf('I'), "ingotCopper", Character.valueOf('T'), new ItemStack(BasicBlock, 1, 11), Character.valueOf('C'), "circuitBasic", Character.valueOf('B'), new ItemStack(BasicBlock, 1, 8)
}));
for(RecipeType type : RecipeType.values()) for(RecipeType type : RecipeType.values())
{ {

View file

@ -300,7 +300,7 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
return false; return false;
} }
} }
else {
if((x == 1 || x == 2) && (z == 1 || z == 2)) if((x == 1 || x == 2) && (z == 1 || z == 2))
{ {
if(!pointer.isAirBlock(worldObj)) if(!pointer.isAirBlock(worldObj))
@ -313,9 +313,6 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
if(!addTankPart(pointerTile)) if(!addTankPart(pointerTile))
{ {
if(pointerTile != this && pointerTile instanceof TileEntitySalinationController)
{
controllerConflict = true;
return false; return false;
} }
} }
@ -372,7 +369,9 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
} }
} }
else { else {
if(!addTankPart(pointer.getTileEntity(worldObj))) TileEntity pointerTile = pointer.getTileEntity(worldObj);
if(!addTankPart(pointerTile))
{ {
return false; return false;
} }
@ -452,14 +451,22 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
public boolean addTankPart(TileEntity tile) public boolean addTankPart(TileEntity tile)
{ {
if(tile instanceof TileEntitySalinationTank && !(tile instanceof TileEntitySalinationController)) if(tile instanceof TileEntitySalinationTank && (tile == this || !(tile instanceof TileEntitySalinationController)))
{
if(tile != this)
{ {
((TileEntitySalinationTank)tile).addToStructure(this); ((TileEntitySalinationTank)tile).addToStructure(this);
tankParts.add((TileEntitySalinationTank)tile); tankParts.add((TileEntitySalinationTank)tile);
}
return true; return true;
} }
else { else {
if(tile != this && tile instanceof TileEntitySalinationController)
{
controllerConflict = true;
}
return false; return false;
} }
} }
@ -468,7 +475,6 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
{ {
if(tile instanceof TileEntityAdvancedSolarGenerator && !tile.isInvalid()) if(tile instanceof TileEntityAdvancedSolarGenerator && !tile.isInvalid())
{ {
System.out.println(tile.xCoord + " " + tile.yCoord + " " + zCoord);
solars[i] = (TileEntityAdvancedSolarGenerator)tile; solars[i] = (TileEntityAdvancedSolarGenerator)tile;
return true; return true;
} }