Fixed cables screwing up over chunk boundaries, fixed positioning of title text on certain machines, added a few tooltips to Induction Cells & Providers

This commit is contained in:
Aidan C. Brady 2015-03-04 13:38:41 -05:00
parent af4c1c6cd7
commit 48b895b80a
7 changed files with 27 additions and 7 deletions

View file

@ -54,7 +54,7 @@ public class GuiEnergyCube extends GuiMekanism
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInventoryName(), 43, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, ySize - 96 + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);

View file

@ -50,7 +50,7 @@ public class GuiFactory extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInventoryName(), 48, 4, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 4, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 93) + 2, 0x404040);
fontRendererObj.drawString(tileEntity.recipeType.getName(), 104, (ySize - 93) + 2, 0x404040);

View file

@ -55,7 +55,9 @@ public class GuiMatrixStats extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(MekanismUtils.localize("gui.matrixStats"), 45, 6, 0x404040);
String stats = MekanismUtils.localize("gui.matrixStats");
fontRendererObj.drawString(stats, (xSize/2)-(fontRendererObj.getStringWidth(stats)/2), 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("gui.energy") + ":", 53, 26, 0x797979);
fontRendererObj.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()) + "/" + MekanismUtils.getEnergyDisplay(tileEntity.getMaxEnergy()), 59, 35, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("gui.output") + ":", 53, 46, 0x797979);

View file

@ -83,13 +83,13 @@ public class ContainerFactory extends Container
{
for(int slotX = 0; slotX < 9; slotX++)
{
addSlotToContainer(new Slot(inventory, slotX + slotY * 9 + 9, 8 + slotX * 18, 84 + slotY * 18));
addSlotToContainer(new Slot(inventory, slotX + slotY * 9 + 9, 8 + slotX * 18, 95 + slotY * 18));
}
}
for(slotY = 0; slotY < 9; slotY++)
for(int slotX = 0; slotX < 9; slotX++)
{
addSlotToContainer(new Slot(inventory, slotY, 8 + slotY * 18, 142));
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 153));
}
tileEntity.open(inventory.player);

View file

@ -116,8 +116,23 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem
list.add(EnumColor.DARK_RED + "Empty");
}
}
else if(Block.getBlockFromItem(this) == MekanismBlocks.BasicBlock2)
{
if(itemstack.getItemDamage() == 3)
{
InductionCellTier tier = InductionCellTier.values()[getTier(itemstack).ordinal()];
list.add(tier.getBaseTier().getColor() + MekanismUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(tier.MAX_ELECTRICITY));
}
else if(itemstack.getItemDamage() == 4)
{
InductionProviderTier tier = InductionProviderTier.values()[getTier(itemstack).ordinal()];
list.add(tier.getBaseTier().getColor() + MekanismUtils.localize("tooltip.outputRate") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(tier.OUTPUT));
}
}
if(getMaxEnergy(itemstack) > 0)
if(getMaxEnergy(itemstack) > 0 && itemstack.stackTagCompound != null)
{
list.add(EnumColor.BRIGHT_GREEN + MekanismUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
}

View file

@ -547,6 +547,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
{
sendDesc = true;
}
currentTransmitterConnections = possibleTransmitters;
currentAcceptorConnections = possibleAcceptors;
}
@ -575,6 +576,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
redstonePowered = redstoneReactive && MekanismUtils.isGettingPowered(world(), Coord4D.get(tile()));
refreshConnections();
tile().notifyTileChange();
}
@Override

View file

@ -577,6 +577,7 @@ tooltip.keysFound=Key(s) found
tooltip.noKey=No key
tooltip.hp=HP
tooltip.configureState=Configure State
tooltip.outputRate=Output Rate
tooltip.portableTank.bucketMode=Bucket Mode