mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Work on Solar Neutron Activator and its recipe system
This commit is contained in:
1 parent
74ba02e0bb
commit
5767bfb22e
12 files changed
+373
-37
No files matched your search
@@ -0,0 +1,91 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.client.gui.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.common.inventory.container.ContainerSolarNeutronActivator;
|
||||
import mekanism.common.tile.TileEntitySolarNeutronActivator;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiSolarNeutronActivator extends GuiMekanism
|
||||
{
|
||||
public TileEntitySolarNeutronActivator tileEntity;
|
||||
|
||||
public GuiSolarNeutronActivator(InventoryPlayer inventory, TileEntitySolarNeutronActivator tentity)
|
||||
{
|
||||
super(new ContainerSolarNeutronActivator(inventory, tentity));
|
||||
tileEntity = tentity;
|
||||
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png")));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png")));
|
||||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 4, 24).with(SlotOverlay.PLUS));
|
||||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 4, 55).with(SlotOverlay.MINUS));
|
||||
|
||||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 154, 24));
|
||||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 154, 55));
|
||||
|
||||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 154, 4).with(SlotOverlay.POWER));
|
||||
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler() {
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tileEntity.inputTank;
|
||||
}
|
||||
}, GuiGauge.Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 25, 13));
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler() {
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tileEntity.outputTank;
|
||||
}
|
||||
}, GuiGauge.Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 133, 13));
|
||||
|
||||
guiElements.add(new GuiProgress(new IProgressInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public double getProgress()
|
||||
{
|
||||
return tileEntity.isActive ? 1 : 0;
|
||||
}
|
||||
}, ProgressBar.LARGE_RIGHT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"), 62, 38));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 26, 4, 0x404040);
|
||||
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
|
||||
{
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiSolarNeutronActivator.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
int guiWidth = (width - xSize) / 2;
|
||||
int guiHeight = (height - ySize) / 2;
|
||||
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
|
||||
int displayInt;
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user