Formulaic Assemblicator fixes
This commit is contained in:
parent
b97c6d8f4b
commit
ec69b2675e
2 changed files with 22 additions and 10 deletions
|
@ -15,6 +15,7 @@ import mekanism.client.gui.element.GuiSlot;
|
|||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
|
@ -28,6 +29,7 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -39,15 +41,18 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
|||
{
|
||||
public TileEntityFormulaicAssemblicator tileEntity;
|
||||
|
||||
public ResourceLocation guiLocation = MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png");
|
||||
|
||||
public GuiFormulaicAssemblicator(InventoryPlayer inventory, TileEntityFormulaicAssemblicator tentity)
|
||||
{
|
||||
super(tentity, new ContainerFormulaicAssemblicator(inventory, tentity));
|
||||
tileEntity = tentity;
|
||||
guiElements.add(new GuiSecurityTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png"), 159, 15));
|
||||
guiElements.add(new GuiSecurityTab(this, tileEntity, guiLocation));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, guiLocation));
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, guiLocation));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, guiLocation));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, guiLocation));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, guiLocation, 159, 15));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
public List<String> getInfo()
|
||||
|
@ -55,8 +60,8 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
|||
String multiplier = MekanismUtils.getEnergyDisplay(tileEntity.energyPerTick);
|
||||
return ListUtils.asList(LangUtils.localize("gui.using") + ": " + multiplier + "/t", LangUtils.localize("gui.needed") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxEnergy()-tileEntity.getEnergy()));
|
||||
}
|
||||
}, this, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png")));
|
||||
guiElements.add(new GuiSlot(SlotType.POWER, this, MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png"), 151, 75).with(SlotOverlay.POWER));
|
||||
}, this, guiLocation));
|
||||
guiElements.add(new GuiSlot(SlotType.POWER, this, guiLocation, 151, 75).with(SlotOverlay.POWER));
|
||||
|
||||
ySize+=64;
|
||||
}
|
||||
|
@ -101,7 +106,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
|||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
|
||||
{
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiFormulaicAssemblicator.png"));
|
||||
mc.renderEngine.bindTexture(guiLocation);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
int guiWidth = (width - xSize) / 2;
|
||||
int guiHeight = (height - ySize) / 2;
|
||||
|
@ -194,8 +199,13 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
|||
if(stack != null)
|
||||
{
|
||||
Slot slot = (Slot)inventorySlots.inventorySlots.get(i+20);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(slot.getStack() == null || !slot.getStack().isItemEqual(stack))
|
||||
{
|
||||
drawGradientRect(guiWidth + slot.xDisplayPosition, guiHeight + slot.yDisplayPosition, guiWidth + slot.xDisplayPosition + 16, guiHeight + slot.yDisplayPosition + 16, -2137456640, -2137456640);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
MekanismRenderer.blendOn();
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.4F);
|
||||
|
|
|
@ -153,7 +153,7 @@ public class TileEntityFormulaicAssemblicator extends TileEntityElectricBlock im
|
|||
{
|
||||
isRecipe = true;
|
||||
|
||||
if(operatingTicks == ticksRequired)
|
||||
if(operatingTicks >= ticksRequired)
|
||||
{
|
||||
if(doSingleCraft())
|
||||
{
|
||||
|
@ -163,6 +163,8 @@ public class TileEntityFormulaicAssemblicator extends TileEntityElectricBlock im
|
|||
{
|
||||
pulseOperations--;
|
||||
}
|
||||
|
||||
ejectorComponent.outputItems();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue