diff --git a/src/main/java/techreborn/client/EGui.java b/src/main/java/techreborn/client/EGui.java index 3ecdc35b6..545a5e195 100644 --- a/src/main/java/techreborn/client/EGui.java +++ b/src/main/java/techreborn/client/EGui.java @@ -32,46 +32,46 @@ import techreborn.Core; public enum EGui implements IMachineGuiHandler { - THERMAL_GENERATOR(true), - QUANTUM_TANK(true), - QUANTUM_CHEST(true), - CENTRIFUGE(true), - ROLLING_MACHINE(true), - BLAST_FURNACE(true), - ALLOY_SMELTER(true), - INDUSTRIAL_GRINDER(true), - IMPLOSION_COMPRESSOR(true), - MATTER_FABRICATOR(true), - MANUAL(false), - CHUNK_LOADER(true), - ASSEMBLING_MACHINE(true), - DIESEL_GENERATOR(true), - INDUSTRIAL_ELECTROLYZER(true), - AESU(false), + AESU(true), ALLOY_FURNACE(true), - SAWMILL(true), - CHEMICAL_REACTOR(true), - SEMIFLUID_GENERATOR(true), - GAS_TURBINE(true), - DIGITAL_CHEST(true), - DESTRUCTOPACK(false), - LESU(false), - IDSU(true), + ALLOY_SMELTER(true), + ASSEMBLING_MACHINE(true), + AUTO_CRAFTING_TABLE(true), + BLAST_FURNACE(true), + CENTRIFUGE(true), CHARGEBENCH(true), - FUSION_CONTROLLER(true), - VACUUM_FREEZER(true), - GRINDER(true), - GENERATOR(true), - EXTRACTOR(true), + CHEMICAL_REACTOR(true), + CHUNK_LOADER(true), COMPRESSOR(true), + DESTRUCTOPACK(false), + DIESEL_GENERATOR(true), + DIGITAL_CHEST(true), ELECTRIC_FURNACE(true), - IRON_FURNACE(true), - RECYCLER(true), - SCRAPBOXINATOR(true), - LOW_VOLTAGE_SU(true), + EXTRACTOR(true), + FUSION_CONTROLLER(true), + GAS_TURBINE(true), + GENERATOR(true), + GRINDER(true), HIGH_VOLTAGE_SU(true), + IDSU(true), + IMPLOSION_COMPRESSOR(true), + INDUSTRIAL_ELECTROLYZER(true), + INDUSTRIAL_GRINDER(true), + IRON_FURNACE(true), + LESU(false), + LOW_VOLTAGE_SU(true), + MANUAL(false), + MATTER_FABRICATOR(true), MEDIUM_VOLTAGE_SU(true), - AUTO_CRAFTING_TABLE(true); + QUANTUM_CHEST(true), + QUANTUM_TANK(true), + RECYCLER(true), + ROLLING_MACHINE(true), + SAWMILL(true), + SCRAPBOXINATOR(true), + SEMIFLUID_GENERATOR(true), + THERMAL_GENERATOR(true), + VACUUM_FREEZER(true); private final boolean containerBuilder; @@ -79,15 +79,14 @@ public enum EGui implements IMachineGuiHandler { this.containerBuilder = containerBuilder; } - public boolean useContainerBuilder() { - return this.containerBuilder; - } - - @Override public void open(EntityPlayer player, BlockPos pos, World world) { if(!world.isRemote){ player.openGui(Core.INSTANCE, this.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } } + + public boolean useContainerBuilder() { + return this.containerBuilder; + } } diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java index 342eca508..e9f901630 100644 --- a/src/main/java/techreborn/client/GuiHandler.java +++ b/src/main/java/techreborn/client/GuiHandler.java @@ -29,7 +29,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.common.network.IGuiHandler; -import techreborn.client.container.ContainerAESU; import techreborn.client.container.ContainerDestructoPack; import techreborn.client.container.ContainerLESU; import techreborn.client.container.IContainerProvider; @@ -60,8 +59,6 @@ public class GuiHandler implements IGuiHandler { return ((IContainerProvider) tile).createContainer(player); switch (gui) { - case AESU: - return new ContainerAESU((TileAdjustableSU) tile, player); case DESTRUCTOPACK: return new ContainerDestructoPack(player); case LESU: diff --git a/src/main/java/techreborn/client/container/ContainerAESU.java b/src/main/java/techreborn/client/container/ContainerAESU.java deleted file mode 100644 index d001a9bf0..000000000 --- a/src/main/java/techreborn/client/container/ContainerAESU.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * This file is part of TechReborn, licensed under the MIT License (MIT). - * - * Copyright (c) 2017 TechReborn - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package techreborn.client.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import reborncore.client.gui.slots.BaseSlot; -import reborncore.common.container.RebornContainer; -import techreborn.tiles.storage.TileAdjustableSU; - -public class ContainerAESU extends RebornContainer { - - public int euOut; - public int storedEu; - public int euChange; - EntityPlayer player; - TileAdjustableSU tile; - - public ContainerAESU(TileAdjustableSU tileaesu, EntityPlayer player) { - tile = tileaesu; - this.player = player; - - int i; - - for (i = 0; i < 3; ++i) { - for (int j = 0; j < 9; ++j) { - this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 115 + i * 18)); - } - } - - for (i = 0; i < 9; ++i) { - this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 173)); - } - } - - @Override - public boolean canInteractWith(EntityPlayer player) { - return true; - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - for (int i = 0; i < this.listeners.size(); i++) { - IContainerListener IContainerListener = this.listeners.get(i); - if (this.euOut != tile.getMaxOutput()) { - IContainerListener.sendWindowProperty(this, 0, (int) tile.getMaxOutput()); - } - if (this.storedEu != tile.getEnergy()) { - IContainerListener.sendWindowProperty(this, 1, (int) tile.getEnergy()); - } - if (this.euChange != tile.getEuChange() && tile.getEuChange() != -1) { - IContainerListener.sendWindowProperty(this, 2, (int) tile.getEuChange()); - } - } - } - - @Override - public void addListener(IContainerListener crafting) { - super.addListener(crafting); - crafting.sendWindowProperty(this, 0, (int) tile.getMaxOutput()); - crafting.sendWindowProperty(this, 1, (int) tile.getEnergy()); - crafting.sendWindowProperty(this, 2, (int) tile.getEuChange()); - } - - @SideOnly(Side.CLIENT) - @Override - public void updateProgressBar(int id, int value) { - if (id == 0) { - this.euOut = value; - } else if (id == 1) { - this.storedEu = value; - } else if (id == 2) { - this.euChange = value; - } - } - -} diff --git a/src/main/java/techreborn/client/gui/GuiAESU.java b/src/main/java/techreborn/client/gui/GuiAESU.java index aeca0cd3f..25c1e0f8c 100644 --- a/src/main/java/techreborn/client/gui/GuiAESU.java +++ b/src/main/java/techreborn/client/gui/GuiAESU.java @@ -24,79 +24,105 @@ package techreborn.client.gui; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.client.resources.I18n; -import reborncore.common.network.NetworkManager; import reborncore.common.powerSystem.PowerSystem; -import techreborn.client.container.ContainerAESU; -import techreborn.packets.PacketAesu; import techreborn.tiles.storage.TileAdjustableSU; -import java.awt.*; -import java.io.IOException; +public class GuiAESU extends GuiBase { -public class GuiAESU extends GuiContainer { + TileAdjustableSU tile; - private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png"); + public GuiAESU(final EntityPlayer player, final TileAdjustableSU aesu) { + super(player, aesu, aesu.createContainer(player)); + this.tile = aesu; + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) { + super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY); + final Layer layer = Layer.BACKGROUND; - TileAdjustableSU aesu; - - ContainerAESU containerAesu; - - public GuiAESU(EntityPlayer player, TileAdjustableSU tileaesu) { - super(new ContainerAESU(tileaesu, player)); - this.xSize = 176; - this.ySize = 197; - aesu = tileaesu; - this.containerAesu = (ContainerAESU) this.inventorySlots; + this.drawSlot(62, 45, layer); + this.drawSlot(98, 45, layer); + this.drawArmourSlots(8, 18, layer); + this.builder.drawEnergyOutput(this, 169, 61, (int) this.tile.getBaseMaxOutput(), layer); + this.builder.drawUpDownButtons(this, 121, 79, layer); } @Override - public void initGui() { - super.initGui(); - this.buttonList.clear(); - int k = (this.width - this.xSize) / 2; - int l = (this.height - this.ySize) / 2; - this.buttonList.add(new GuiButton(0, k + 115, l + 5, 15, 20, "++")); - this.buttonList.add(new GuiButton(1, k + 115, l + 5 + 20, 15, 20, "+")); - this.buttonList.add(new GuiButton(2, k + 115, l + 5 + (20 * 2), 15, 20, "-")); - this.buttonList.add(new GuiButton(3, k + 115, l + 5 + (20 * 3), 15, 20, "--")); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - this.drawDefaultBackground(); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - 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); - } - - protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) { - this.fontRenderer.drawString(I18n.format("tile.techreborn:adjustable_su.name"), 40, 10, - Color.WHITE.getRGB()); - this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerAesu.euOut) + " /tick", 10, 20, - Color.WHITE.getRGB()); - this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerAesu.storedEu) + " ", 10, 30, - Color.WHITE.getRGB()); - this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerAesu.euChange) + " change", 10, 40, - Color.WHITE.getRGB()); - } - - @Override - protected void actionPerformed(GuiButton button) throws IOException { - super.actionPerformed(button); - NetworkManager.sendToServer(new PacketAesu(button.id, aesu)); - } - - @Override - public void drawScreen(int mouseX, int mouseY, float partialTicks) { - super.drawScreen(mouseX, mouseY, partialTicks); - this.renderHoveredToolTip(mouseX, mouseY); - } + protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) { + super.drawGuiContainerForegroundLayer(mouseX, mouseY); + final Layer layer = Layer.FOREGROUND; + + GlStateManager.pushMatrix(); + GlStateManager.scale(0.6, 0.6, 1); + this.drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) this.tile.getEnergy()) + "/" + + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) this.tile.getMaxPower()) + " " + + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer); + GlStateManager.popMatrix(); + + this.builder.drawMultiEnergyBar(this, 81, 28, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer); + } + } + +// private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png"); +// +// TileAdjustableSU aesu; +// +// ContainerAESU containerAesu; +// +// public GuiAESU(EntityPlayer player, TileAdjustableSU tileaesu) { +// super(new ContainerAESU(tileaesu, player)); +// this.xSize = 176; +// this.ySize = 197; +// aesu = tileaesu; +// this.containerAesu = (ContainerAESU) this.inventorySlots; +// } +// +// @Override +// public void initGui() { +// super.initGui(); +// this.buttonList.clear(); +// int k = (this.width - this.xSize) / 2; +// int l = (this.height - this.ySize) / 2; +// this.buttonList.add(new GuiButton(0, k + 115, l + 5, 15, 20, "++")); +// this.buttonList.add(new GuiButton(1, k + 115, l + 5 + 20, 15, 20, "+")); +// this.buttonList.add(new GuiButton(2, k + 115, l + 5 + (20 * 2), 15, 20, "-")); +// this.buttonList.add(new GuiButton(3, k + 115, l + 5 + (20 * 3), 15, 20, "--")); +// } +// +// @Override +// protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { +// this.drawDefaultBackground(); +// GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); +// 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); +// } +// +// protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) { +// this.fontRenderer.drawString(I18n.format("tile.techreborn:adjustable_su.name"), 40, 10, +// Color.WHITE.getRGB()); +// this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerAesu.euOut) + " /tick", 10, 20, +// Color.WHITE.getRGB()); +// this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerAesu.storedEu) + " ", 10, 30, +// Color.WHITE.getRGB()); +// this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerAesu.euChange) + " change", 10, 40, +// Color.WHITE.getRGB()); +// } +// +// @Override +// protected void actionPerformed(GuiButton button) throws IOException { +// super.actionPerformed(button); +// NetworkManager.sendToServer(new PacketAesu(button.id, aesu)); +// } +// +// @Override +// public void drawScreen(int mouseX, int mouseY, float partialTicks) { +// super.drawScreen(mouseX, mouseY, partialTicks); +// this.renderHoveredToolTip(mouseX, mouseY); +// } +//} diff --git a/src/main/java/techreborn/client/gui/TRBuilder.java b/src/main/java/techreborn/client/gui/TRBuilder.java index 4e9bd2eaa..5c9817f4b 100644 --- a/src/main/java/techreborn/client/gui/TRBuilder.java +++ b/src/main/java/techreborn/client/gui/TRBuilder.java @@ -222,6 +222,32 @@ public class TRBuilder extends GuiBuilder { GlStateManager.popMatrix(); } } + + public void drawUpDownButtons(GuiBase gui, int x, int y, GuiBase.Layer layer){ + if (layer == GuiBase.Layer.BACKGROUND) { + x += gui.getGuiLeft(); + y += gui.getGuiTop(); + } + gui.mc.getTextureManager().bindTexture(GUI_SHEET); + gui.drawTexturedModalRect(x, y, 150, 70, 12, 12); + gui.drawTexturedModalRect(x + 12, y, 150, 82, 12, 12); + gui.drawTexturedModalRect(x + 24, y, 150, 94, 12, 12); + gui.drawTexturedModalRect(x + 36, y, 150, 106, 12, 12); + } + + public void drawEnergyOutput(GuiBase gui, int right, int top, int maxOutput, GuiBase.Layer layer){ + String text = PowerSystem.getLocaliszedPowerFormattedNoSuffix(maxOutput) + " " + + PowerSystem.getDisplayPower().abbreviation + "/t"; + int width = gui.mc.fontRenderer.getStringWidth(text); + gui.drawString(text, right - 17 - width, top + 5, 0, layer); + + if (layer == GuiBase.Layer.BACKGROUND) { + right += gui.getGuiLeft(); + top += gui.getGuiTop(); + } + gui.mc.getTextureManager().bindTexture(GUI_SHEET); + gui.drawTexturedModalRect(right - 16, top, 162, 101, 16, 17); + } public void drawBigBlueBar(GuiBase gui, int x, int y, int value, int max, int mouseX, int mouseY, String suffix, GuiBase.Layer layer) { if (layer == GuiBase.Layer.BACKGROUND) { diff --git a/src/main/java/techreborn/client/gui/widget/GuiButtonUpDown.java b/src/main/java/techreborn/client/gui/widget/GuiButtonUpDown.java new file mode 100644 index 000000000..77c1fad0f --- /dev/null +++ b/src/main/java/techreborn/client/gui/widget/GuiButtonUpDown.java @@ -0,0 +1,44 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2017 TechReborn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package techreborn.client.gui.widget; + +import net.minecraft.client.gui.GuiButton; +import techreborn.client.gui.GuiBase; + +/** + * @author drcrazy + * + */ +public class GuiButtonUpDown extends GuiButton { + + GuiBase.Layer layer; + GuiBase gui; + + public GuiButtonUpDown(int buttonId, int x, int y, GuiBase gui, GuiBase.Layer layer) { + super(buttonId, x, y, 12, 12, ""); + this.layer = layer; + this.gui = gui; + } + +} diff --git a/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java b/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java index a4432cb2f..da6857d14 100644 --- a/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java +++ b/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java @@ -27,17 +27,18 @@ package techreborn.tiles.storage; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import reborncore.api.IToolDrop; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.api.power.EnumPowerTier; import reborncore.common.registration.RebornRegistry; import reborncore.common.registration.impl.ConfigRegistry; import reborncore.common.util.Inventory; +import techreborn.client.container.IContainerProvider; +import techreborn.client.container.builder.BuiltContainer; +import techreborn.client.container.builder.ContainerBuilder; import techreborn.init.ModBlocks; import techreborn.lib.ModInfo; @RebornRegistry(modID = ModInfo.MOD_ID) -public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop { +public class TileAdjustableSU extends TileEnergyStorage implements IContainerProvider { @ConfigRegistry(config = "machines", category = "aesu", key = "AesuMaxInput", comment = "AESU Max Input (Value in EU)") public static int maxInput = 8192; @@ -48,31 +49,31 @@ public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop { public Inventory inventory = new Inventory(4, "TileAdjustableSU", 64, this); private int OUTPUT = 64; // The current output - private double euLastTick = 0; - private double euChange; - private int ticks; + //private double euLastTick = 0; + //private double euChange; + //private int ticks; public TileAdjustableSU() { - super(); + super("ADJUSTABLE_SU", 4, ModBlocks.ADJUSTABLE_SU, EnumPowerTier.INSANE, maxInput, maxOutput, maxEnergy); } - @Override - public void update() { - super.update(); - if (ticks == 100) { - euChange = -1; - ticks = 0; - - } else { - ticks++; - euChange += getEnergy() - euLastTick; - if (euLastTick == getEnergy()) { - euChange = 0; - } - } - - euLastTick = getEnergy(); - } +// @Override +// public void update() { +// super.update(); +// if (ticks == 100) { +// euChange = -1; +// ticks = 0; +// +// } else { +// ticks++; +// euChange += getEnergy() - euLastTick; +// if (euLastTick == getEnergy()) { +// euChange = 0; +// } +// } +// +// euLastTick = getEnergy(); +// } @Override public ItemStack getToolDrop(EntityPlayer entityPlayer) { @@ -104,12 +105,12 @@ public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop { } } - public double getEuChange() { - if (euChange == -1) { - return -1; - } - return (euChange / ticks); - } +// public double getEuChange() { +// if (euChange == -1) { +// return -1; +// } +// return (euChange / ticks); +// } public ItemStack getDropWithNBT() { NBTTagCompound tileEntity = new NBTTagCompound(); @@ -122,8 +123,8 @@ public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop { public NBTTagCompound writeToNBT(NBTTagCompound tagCompound) { super.writeToNBT(tagCompound); - tagCompound.setDouble("euChange", euChange); - tagCompound.setDouble("euLastTick", euLastTick); + //tagCompound.setDouble("euChange", euChange); + //tagCompound.setDouble("euLastTick", euLastTick); tagCompound.setInteger("output", OUTPUT); inventory.writeToNBT(tagCompound); return tagCompound; @@ -131,26 +132,12 @@ public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop { public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); - this.euChange = nbttagcompound.getDouble("euChange"); - this.euLastTick = nbttagcompound.getDouble("euLastTick"); + //this.euChange = nbttagcompound.getDouble("euChange"); + //this.euLastTick = nbttagcompound.getDouble("euLastTick"); this.OUTPUT = nbttagcompound.getInteger("output"); inventory.readFromNBT(nbttagcompound); } - @Override - public double getBaseMaxPower() { - return maxEnergy; - } - - @Override - public boolean canAcceptEnergy(EnumFacing direction) { - return getFacingEnum() != direction; - } - - @Override - public boolean canProvideEnergy(EnumFacing direction) { - return getFacingEnum() == direction; - } @Override public double getBaseMaxOutput() { @@ -158,7 +145,9 @@ public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop { } @Override - public double getBaseMaxInput() { - return maxInput; + public BuiltContainer createContainer(EntityPlayer player) { + return new ContainerBuilder("aesu").player(player.inventory).inventory().hotbar().armor() + .complete(8, 18).addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45) + .syncEnergyValue().addInventory().create(this); } } diff --git a/src/main/resources/assets/techreborn/textures/gui/gui_sheet.png b/src/main/resources/assets/techreborn/textures/gui/gui_sheet.png index d2d25b2f3..c265022ca 100644 Binary files a/src/main/resources/assets/techreborn/textures/gui/gui_sheet.png and b/src/main/resources/assets/techreborn/textures/gui/gui_sheet.png differ