Started work on reactor.

This commit is contained in:
Modmuss50 2015-11-16 13:36:44 +00:00
parent 19d269b1de
commit 100293fb8e
4 changed files with 94 additions and 0 deletions

View file

@ -0,0 +1,18 @@
package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.fusionReactor.TileEntityFustionController;
public class ContainerFustionReactor extends RebornContainer {
public ContainerFustionReactor(TileEntityFustionController tileEntityFustionController,
EntityPlayer player) {
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return true;
}
}

View file

@ -0,0 +1,40 @@
package techreborn.client.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.inventory.Container;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
public class GuiFusionReactor extends GuiContainer {
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/fusion_reactor.png");
public GuiFusionReactor(Container container) {
super(container);
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
String name = StatCollector.translateToLocal("tile.techreborn.fusioncontrolcomputer.name");
this.fontRendererObj.drawString(name, 87, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
this.fontRendererObj.drawString("EU: xxxx", 11, 8, 16448255);
this.fontRendererObj.drawString("Coils: " + "Yes" , 11, 16, 16448255);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
this.mc.getTextureManager().bindTexture(texture);
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
drawTexturedModalRect(k + 88, l + 36, 176, 0, 14, 14);
//progressBar
drawTexturedModalRect(k + 111, l + 34, 176, 14, 24, 16);
}
}

View file

@ -0,0 +1,36 @@
package techreborn.tiles.fusionReactor;
import net.minecraftforge.common.util.ForgeDirection;
import techreborn.powerSystem.TilePowerAcceptor;
public class TileEntityFustionController extends TilePowerAcceptor {
public TileEntityFustionController() {
super(4);
}
@Override
public double getMaxPower() {
return 100000000;
}
@Override
public boolean canAcceptEnergy(ForgeDirection direction) {
return true;
}
@Override
public boolean canProvideEnergy(ForgeDirection direction) {
return true;
}
@Override
public double getMaxOutput() {
return 1000000;
}
@Override
public double getMaxInput() {
return 8192;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB