1147 - Initial auto mappings pass
This commit is contained in:
parent
48198dbcb3
commit
4e03ac893c
291 changed files with 3335 additions and 3504 deletions
|
@ -25,7 +25,7 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonUpDown;
|
||||
|
@ -38,14 +38,14 @@ public class GuiAESU extends GuiBase {
|
|||
|
||||
TileAdjustableSU tile;
|
||||
|
||||
public GuiAESU(final EntityPlayer player, final TileAdjustableSU aesu) {
|
||||
public GuiAESU(final PlayerEntity 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);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
this.drawSlot(62, 45, layer);
|
||||
|
@ -56,8 +56,8 @@ public class GuiAESU extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
|
|
|
@ -24,56 +24,56 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.gui.ContainerScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import techreborn.tiles.machine.iron.TileIronAlloyFurnace;
|
||||
|
||||
public class GuiAlloyFurnace extends GuiContainer {
|
||||
public class GuiAlloyFurnace extends ContainerScreen {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn",
|
||||
private static final Identifier texture = new Identifier("techreborn",
|
||||
"textures/gui/alloy_furnace.png");
|
||||
|
||||
TileIronAlloyFurnace alloyfurnace;
|
||||
|
||||
public GuiAlloyFurnace(final EntityPlayer player, final TileIronAlloyFurnace alloyFurnace) {
|
||||
public GuiAlloyFurnace(final PlayerEntity player, final TileIronAlloyFurnace alloyFurnace) {
|
||||
super(alloyFurnace.createContainer(player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.containerWidth = 176;
|
||||
this.containerHeight = 167;
|
||||
this.alloyfurnace = alloyFurnace;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||
protected void drawBackground(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||
this.drawDefaultBackground();
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(GuiAlloyFurnace.texture);
|
||||
final int k = (this.width - this.xSize) / 2;
|
||||
final int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
final int k = (this.width - this.containerWidth) / 2;
|
||||
final int l = (this.height - this.containerHeight) / 2;
|
||||
this.blit(k, l, 0, 0, this.containerWidth, this.containerHeight);
|
||||
|
||||
if (this.alloyfurnace.isBurning()) {
|
||||
int i1 = this.alloyfurnace.getBurnTimeRemainingScaled(13);
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1);
|
||||
this.blit(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1);
|
||||
i1 = this.alloyfurnace.getCookProgressScaled(24);
|
||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
|
||||
this.blit(k + 79, l + 34, 176, 14, i1 + 1, 16);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
|
||||
final String name = I18n.format("tile.techreborn.iron_alloy_furnace.name");
|
||||
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
|
||||
protected void drawForeground(final int p_146979_1_, final int p_146979_2_) {
|
||||
final String name = I18n.translate("tile.techreborn.iron_alloy_furnace.name");
|
||||
this.font.draw(name, this.containerWidth / 2 - this.font.getStringWidth(name) / 2, 6,
|
||||
4210752);
|
||||
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.font.draw(I18n.translate("container.inventory", new Object[0]), 8,
|
||||
this.containerHeight - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
this.renderHoveredToolTip(mouseX, mouseY);
|
||||
this.drawMouseoverTooltip(mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileAlloySmelter;
|
||||
|
@ -33,15 +33,15 @@ public class GuiAlloySmelter extends GuiBase {
|
|||
|
||||
TileAlloySmelter tile;
|
||||
|
||||
public GuiAlloySmelter(final EntityPlayer player, final TileAlloySmelter tile) {
|
||||
public GuiAlloySmelter(final PlayerEntity player, final TileAlloySmelter tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -54,8 +54,8 @@ public class GuiAlloySmelter extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileAssemblingMachine;
|
||||
|
@ -33,14 +33,14 @@ public class GuiAssemblingMachine extends GuiBase {
|
|||
|
||||
TileAssemblingMachine tile;
|
||||
|
||||
public GuiAssemblingMachine(final EntityPlayer player, final TileAssemblingMachine tile) {
|
||||
public GuiAssemblingMachine(final PlayerEntity player, final TileAssemblingMachine tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float partialTicks, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
|
||||
protected void drawBackground(final float partialTicks, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(partialTicks, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
// Battery slot
|
||||
|
@ -56,8 +56,8 @@ public class GuiAssemblingMachine extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,12 +24,13 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.render.GuiLighting;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.network.NetworkManager;
|
||||
|
@ -43,11 +44,11 @@ import static net.minecraft.item.ItemStack.EMPTY;
|
|||
*/
|
||||
public class GuiAutoCrafting extends GuiBase {
|
||||
|
||||
static final ResourceLocation RECIPE_BOOK_TEXTURE = new ResourceLocation("textures/gui/recipe_book.png");
|
||||
static final Identifier RECIPE_BOOK_TEXTURE = new Identifier("textures/gui/recipe_book.png");
|
||||
boolean showGui = true;
|
||||
TileAutoCraftingTable tileAutoCraftingTable;
|
||||
|
||||
public GuiAutoCrafting(EntityPlayer player, TileAutoCraftingTable tile) {
|
||||
public GuiAutoCrafting(PlayerEntity player, TileAutoCraftingTable tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tileAutoCraftingTable = tile;
|
||||
}
|
||||
|
@ -56,8 +57,8 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
if (stack != EMPTY) {
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
itemRender.renderItemAndEffectIntoGUI(stack, x, y);
|
||||
GuiLighting.enableForItems();
|
||||
itemRenderer.renderGuiItem(stack, x, y);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableDepthTest();
|
||||
|
@ -71,11 +72,11 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
IRecipe recipe = tileAutoCraftingTable.getIRecipe();
|
||||
protected void drawForeground(int mouseX, int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
Recipe recipe = tileAutoCraftingTable.getIRecipe();
|
||||
if (recipe != null) {
|
||||
renderItemStack(recipe.getRecipeOutput(), 95, 42);
|
||||
renderItemStack(recipe.getOutput(), 95, 42);
|
||||
}
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
|
@ -84,8 +85,8 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, int mouseX, int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, int mouseX, int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
|
@ -94,7 +95,7 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
}
|
||||
drawOutputSlot(145, 42, layer);
|
||||
drawOutputSlot(95, 42, layer);
|
||||
drawString("Inventory", 8, 82, 4210752, layer);
|
||||
draw("Inventory", 8, 82, 4210752, layer);
|
||||
|
||||
builder.drawLockButton(this, 145, 4, mouseX, mouseY, layer, tileAutoCraftingTable.locked);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.tiles.storage.TileLowVoltageSU;
|
||||
|
@ -34,14 +34,14 @@ public class GuiBatbox extends GuiBase {
|
|||
|
||||
TileLowVoltageSU tile;
|
||||
|
||||
public GuiBatbox(final EntityPlayer player, final TileLowVoltageSU tile) {
|
||||
public GuiBatbox(final PlayerEntity player, final TileLowVoltageSU tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(62, 45, layer);
|
||||
|
@ -49,8 +49,8 @@ public class GuiBatbox extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.ClientProxy;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
|
@ -44,7 +44,7 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
public TileIndustrialBlastFurnace tile;
|
||||
boolean hasMultiBlock;
|
||||
|
||||
public GuiBlastFurnace(final EntityPlayer player, final TileIndustrialBlastFurnace tile) {
|
||||
public GuiBlastFurnace(final PlayerEntity player, final TileIndustrialBlastFurnace tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
@ -57,8 +57,8 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
this.hasMultiBlock = this.tile.getCachedHeat() != 0;
|
||||
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
@ -77,8 +77,8 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
this.hasMultiBlock = tile.getCachedHeat() != 0;
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
IBlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
|
||||
this.addComponent(0, 0, 0, standardCasing, multiblock);
|
||||
this.addComponent(1, 0, 0, standardCasing, multiblock);
|
||||
|
@ -145,9 +145,9 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.setMultiblock(set);
|
||||
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
tile.getPos().getX() - EnumFacing.byIndex(tile.getFacingInt()).getXOffset() * 2,
|
||||
tile.getPos().getX() - Direction.byId(tile.getFacingInt()).getOffsetX() * 2,
|
||||
tile.getPos().getY() - 1,
|
||||
tile.getPos().getZ() - EnumFacing.byIndex(tile.getFacingInt()).getZOffset() * 2);
|
||||
tile.getPos().getZ() - Direction.byId(tile.getFacingInt()).getOffsetZ() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
@ -155,7 +155,7 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
}
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.TileIndustrialCentrifuge;
|
||||
|
@ -33,14 +33,14 @@ public class GuiCentrifuge extends GuiBase {
|
|||
|
||||
TileIndustrialCentrifuge tile;
|
||||
|
||||
public GuiCentrifuge(final EntityPlayer player, final TileIndustrialCentrifuge tile) {
|
||||
public GuiCentrifuge(final PlayerEntity player, final TileIndustrialCentrifuge tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -57,8 +57,8 @@ public class GuiCentrifuge extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 61, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import techreborn.tiles.TileChargeOMat;
|
||||
|
||||
|
@ -32,14 +32,14 @@ public class GuiChargeBench extends GuiBase {
|
|||
|
||||
TileChargeOMat tile;
|
||||
|
||||
public GuiChargeBench(final EntityPlayer player, final TileChargeOMat tile) {
|
||||
public GuiChargeBench(final PlayerEntity player, final TileChargeOMat tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(62, 25, layer);
|
||||
|
@ -51,8 +51,8 @@ public class GuiChargeBench extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileChemicalReactor;
|
||||
|
@ -33,14 +33,14 @@ public class GuiChemicalReactor extends GuiBase {
|
|||
|
||||
TileChemicalReactor tile;
|
||||
|
||||
public GuiChemicalReactor(final EntityPlayer player, final TileChemicalReactor tile) {
|
||||
public GuiChemicalReactor(final PlayerEntity player, final TileChemicalReactor tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -53,8 +53,8 @@ public class GuiChemicalReactor extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,42 +24,42 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.gui.ContainerScreen;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonSimple;
|
||||
import techreborn.tiles.machine.tier3.TileChunkLoader;
|
||||
|
||||
public class GuiChunkLoader extends GuiContainer {
|
||||
public class GuiChunkLoader extends ContainerScreen {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn",
|
||||
private static final Identifier texture = new Identifier("techreborn",
|
||||
"textures/gui/industrial_chunkloader.png");
|
||||
TileChunkLoader chunkloader;
|
||||
private GuiButton plusOneButton;
|
||||
private GuiButton plusTenButton;
|
||||
private GuiButton minusOneButton;
|
||||
private GuiButton minusTenButton;
|
||||
private ButtonWidget plusOneButton;
|
||||
private ButtonWidget plusTenButton;
|
||||
private ButtonWidget minusOneButton;
|
||||
private ButtonWidget minusTenButton;
|
||||
|
||||
public GuiChunkLoader(final EntityPlayer player, final TileChunkLoader chunkLoader) {
|
||||
public GuiChunkLoader(final PlayerEntity player, final TileChunkLoader chunkLoader) {
|
||||
super(chunkLoader.createContainer(player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.containerWidth = 176;
|
||||
this.containerHeight = 167;
|
||||
this.chunkloader = chunkLoader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.guiLeft = this.width / 2 - this.xSize / 2;
|
||||
this.guiTop = this.height / 2 - this.ySize / 2;
|
||||
this.plusOneButton = new GuiButtonSimple(0, this.guiLeft + 5, this.guiTop + 37, 40, 20, "+1");
|
||||
this.plusTenButton = new GuiButtonSimple(0, this.guiLeft + 45, this.guiTop + 37, 40, 20, "+10");
|
||||
this.left = this.width / 2 - this.containerWidth / 2;
|
||||
this.top = this.height / 2 - this.containerHeight / 2;
|
||||
this.plusOneButton = new GuiButtonSimple(0, this.left + 5, this.top + 37, 40, 20, "+1");
|
||||
this.plusTenButton = new GuiButtonSimple(0, this.left + 45, this.top + 37, 40, 20, "+10");
|
||||
|
||||
this.minusOneButton = new GuiButtonSimple(0, this.guiLeft + 90, this.guiTop + 37, 40, 20, "-1");
|
||||
this.minusTenButton = new GuiButtonSimple(0, this.guiLeft + 130, this.guiTop + 37, 40, 20, "-10");
|
||||
this.minusOneButton = new GuiButtonSimple(0, this.left + 90, this.top + 37, 40, 20, "-1");
|
||||
this.minusTenButton = new GuiButtonSimple(0, this.left + 130, this.top + 37, 40, 20, "-10");
|
||||
|
||||
this.buttons.add(this.plusOneButton);
|
||||
this.buttons.add(this.plusTenButton);
|
||||
|
@ -68,28 +68,28 @@ public class GuiChunkLoader extends GuiContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||
protected void drawBackground(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||
this.drawDefaultBackground();
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(GuiChunkLoader.texture);
|
||||
final int k = (this.width - this.xSize) / 2;
|
||||
final int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
final int k = (this.width - this.containerWidth) / 2;
|
||||
final int l = (this.height - this.containerHeight) / 2;
|
||||
this.blit(k, l, 0, 0, this.containerWidth, this.containerHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
|
||||
final String name = I18n.format("tile.techreborn:chunk_loader.name");
|
||||
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
|
||||
protected void drawForeground(final int p_146979_1_, final int p_146979_2_) {
|
||||
final String name = I18n.translate("tile.techreborn:chunk_loader.name");
|
||||
this.font.draw(name, this.containerWidth / 2 - this.font.getStringWidth(name) / 2, 6,
|
||||
4210752);
|
||||
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.font.draw(I18n.translate("container.inventory", new Object[0]), 8,
|
||||
this.containerHeight - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
this.renderHoveredToolTip(mouseX, mouseY);
|
||||
this.drawMouseoverTooltip(mouseX, mouseY);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileCompressor;
|
||||
|
@ -33,14 +33,14 @@ public class GuiCompressor extends GuiBase {
|
|||
|
||||
TileCompressor tile;
|
||||
|
||||
public GuiCompressor(final EntityPlayer player, final TileCompressor tile) {
|
||||
public GuiCompressor(final PlayerEntity player, final TileCompressor tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -52,8 +52,8 @@ public class GuiCompressor extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
this.builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,43 +24,43 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.gui.ContainerScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.container.Container;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class GuiDestructoPack extends GuiContainer {
|
||||
public class GuiDestructoPack extends ContainerScreen {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn",
|
||||
private static final Identifier texture = new Identifier("techreborn",
|
||||
"textures/gui/destructopack.png");
|
||||
|
||||
public GuiDestructoPack(Container container) {
|
||||
super(container);
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
this.containerWidth = 176;
|
||||
this.containerHeight = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2) {
|
||||
protected void drawBackground(float arg0, int arg1, int arg2) {
|
||||
this.drawDefaultBackground();
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166);
|
||||
blit(left, top, 0, 0, 176, 166);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int arg0, int arg1) {
|
||||
String name = I18n.format("item.techreborn.part.destructoPack.name");
|
||||
fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 5, 4210752);
|
||||
this.fontRenderer.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2,
|
||||
protected void drawForeground(int arg0, int arg1) {
|
||||
String name = I18n.translate("item.techreborn.part.destructoPack.name");
|
||||
font.draw(name, containerWidth / 2 - font.getStringWidth(name) / 2, 5, 4210752);
|
||||
this.font.draw(I18n.translate("container.inventory"), 8, this.containerHeight - 96 + 2,
|
||||
4210752);
|
||||
super.drawGuiContainerForegroundLayer(arg0, arg1);
|
||||
super.drawForeground(arg0, arg1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
this.renderHoveredToolTip(mouseX, mouseY);
|
||||
this.drawMouseoverTooltip(mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,26 +24,26 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.generator.advanced.TileDieselGenerator;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class GuiDieselGenerator extends GuiBase {
|
||||
|
||||
TileDieselGenerator tile;
|
||||
|
||||
public GuiDieselGenerator(final EntityPlayer player, final TileDieselGenerator tile) {
|
||||
public GuiDieselGenerator(final PlayerEntity player, final TileDieselGenerator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
drawSlot(25, 35, layer);
|
||||
drawSlot(25, 55, layer);
|
||||
|
@ -52,8 +52,8 @@ public class GuiDieselGenerator extends GuiBase {
|
|||
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import techreborn.tiles.TileDigitalChest;
|
||||
|
||||
|
@ -32,14 +32,14 @@ public class GuiDigitalChest extends GuiBase {
|
|||
|
||||
TileDigitalChest tile;
|
||||
|
||||
public GuiDigitalChest(final EntityPlayer player, final TileDigitalChest tile) {
|
||||
public GuiDigitalChest(final PlayerEntity player, final TileDigitalChest tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(80, 24, layer);
|
||||
|
@ -47,18 +47,18 @@ public class GuiDigitalChest extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if (!tile.storedItem.isEmpty() && tile.inventory.getStackInSlot(1) != null) {
|
||||
if (!tile.storedItem.isEmpty() && tile.inventory.getInvStack(1) != null) {
|
||||
builder.drawBigBlueBar(this, 31, 43,
|
||||
tile.storedItem.getCount() + tile.inventory.getStackInSlot(1).getCount(),
|
||||
tile.maxCapacity, mouseX - guiLeft, mouseY - guiTop, "Stored", layer);
|
||||
tile.storedItem.getAmount() + tile.inventory.getInvStack(1).getAmount(),
|
||||
tile.maxCapacity, mouseX - left, mouseY - top, "Stored", layer);
|
||||
}
|
||||
if (tile.storedItem.isEmpty() && tile.inventory.getStackInSlot(1) != null) {
|
||||
builder.drawBigBlueBar(this, 31, 43, tile.inventory.getStackInSlot(1).getCount(),
|
||||
tile.maxCapacity, mouseX - guiLeft, mouseY - guiTop, "Stored", layer);
|
||||
if (tile.storedItem.isEmpty() && tile.inventory.getInvStack(1) != null) {
|
||||
builder.drawBigBlueBar(this, 31, 43, tile.inventory.getInvStack(1).getAmount(),
|
||||
tile.maxCapacity, mouseX - left, mouseY - top, "Stored", layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.ClientProxy;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
|
@ -37,13 +37,13 @@ import reborncore.client.multiblock.Multiblock;
|
|||
import reborncore.client.multiblock.MultiblockRenderEvent;
|
||||
import reborncore.client.multiblock.MultiblockSet;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.tiles.machine.multiblock.TileDistillationTower;
|
||||
import techreborn.tiles.machine.multiblock.TileEnvTypeillationTower;
|
||||
|
||||
public class GuiDistillationTower extends GuiBase {
|
||||
public class GuiEnvTypeillationTower extends GuiBase {
|
||||
|
||||
public TileDistillationTower tile;
|
||||
public TileEnvTypeillationTower tile;
|
||||
|
||||
public GuiDistillationTower(final EntityPlayer player, final TileDistillationTower tile) {
|
||||
public GuiEnvTypeillationTower(final PlayerEntity player, final TileEnvTypeillationTower tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ public class GuiDistillationTower extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
final GuiBase.Layer layer = Layer.BACKGROUND;
|
||||
|
@ -72,8 +72,8 @@ public class GuiDistillationTower extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
@ -95,8 +95,8 @@ public class GuiDistillationTower extends GuiBase {
|
|||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
IBlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
IBlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, 0, 0, standardCasing, multiblock);
|
||||
addComponent(1, 0, 0, standardCasing, multiblock);
|
||||
|
@ -140,9 +140,9 @@ public class GuiDistillationTower extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.setMultiblock(set);
|
||||
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
tile.getPos().getX() - EnumFacing.byIndex(tile.getFacingInt()).getXOffset() * 2,
|
||||
tile.getPos().getX() - Direction.byId(tile.getFacingInt()).getOffsetX() * 2,
|
||||
tile.getPos().getY() - 1,
|
||||
tile.getPos().getZ() - EnumFacing.byIndex(tile.getFacingInt()).getZOffset() * 2);
|
||||
tile.getPos().getZ() - Direction.byId(tile.getFacingInt()).getOffsetZ() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
@ -150,7 +150,7 @@ public class GuiDistillationTower extends GuiBase {
|
|||
}
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileElectricFurnace;
|
||||
|
@ -33,14 +33,14 @@ public class GuiElectricFurnace extends GuiBase {
|
|||
|
||||
TileElectricFurnace tile;
|
||||
|
||||
public GuiElectricFurnace(final EntityPlayer player, final TileElectricFurnace tile) {
|
||||
public GuiElectricFurnace(final PlayerEntity player, final TileElectricFurnace tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
|
||||
protected void drawBackground(float partialTicks, int mouseX, int mouseY) {
|
||||
super.drawBackground(partialTicks, mouseX, mouseY);
|
||||
Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -52,8 +52,8 @@ public class GuiElectricFurnace extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(int mouseX, int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.gaugeProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileExtractor;
|
||||
|
@ -33,14 +33,14 @@ public class GuiExtractor extends GuiBase {
|
|||
|
||||
TileExtractor tile;
|
||||
|
||||
public GuiExtractor(final EntityPlayer player, final TileExtractor tile) {
|
||||
public GuiExtractor(final PlayerEntity player, final TileExtractor tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -52,8 +52,8 @@ public class GuiExtractor extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.ClientProxy;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
|
@ -46,12 +46,12 @@ public class GuiFluidReplicator extends GuiBase {
|
|||
|
||||
TileFluidReplicator tile;
|
||||
|
||||
public GuiFluidReplicator(final EntityPlayer player, final TileFluidReplicator tile) {
|
||||
public GuiFluidReplicator(final PlayerEntity player, final TileFluidReplicator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
|
||||
|
@ -63,8 +63,8 @@ public class GuiFluidReplicator extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
// Battery slot
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -82,8 +82,8 @@ public class GuiFluidReplicator extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawTank(this, 99, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
|
||||
|
@ -105,7 +105,7 @@ public class GuiFluidReplicator extends GuiBase {
|
|||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
final IBlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
final BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, 1, reinforcedCasing, multiblock);
|
||||
|
@ -121,9 +121,9 @@ public class GuiFluidReplicator extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||
- Direction.byId(this.tile.getFacingInt()).getOffsetX() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||
- Direction.byId(this.tile.getFacingInt()).getOffsetZ() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import reborncore.ClientProxy;
|
||||
|
@ -50,14 +50,14 @@ import java.util.Optional;
|
|||
public class GuiFusionReactor extends GuiBase {
|
||||
TileFusionControlComputer tile;
|
||||
|
||||
public GuiFusionReactor(final EntityPlayer player, final TileFusionControlComputer tile) {
|
||||
public GuiFusionReactor(final PlayerEntity player, final TileFusionControlComputer tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float partialTicks, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
|
||||
protected void drawBackground(final float partialTicks, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(partialTicks, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(34, 47, layer);
|
||||
|
@ -72,8 +72,8 @@ public class GuiFusionReactor extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
@ -100,8 +100,8 @@ public class GuiFusionReactor extends GuiBase {
|
|||
}
|
||||
}
|
||||
builder.drawUpDownButtons(this, 121, 79, layer);
|
||||
drawString("Size: " + tile.size, 83, 81, 0xFFFFFF, layer);
|
||||
drawString("" + tile.getPowerMultiplier() + "x", 10, 81, 0xFFFFFF, layer);
|
||||
draw("Size: " + tile.size, 83, 81, 0xFFFFFF, layer);
|
||||
draw("" + tile.getPowerMultiplier() + "x", 10, 81, 0xFFFFFF, layer);
|
||||
|
||||
buttons.add(new GuiButtonUpDown(300, 121, 79, this, GuiBase.Layer.FOREGROUND));
|
||||
buttons.add(new GuiButtonUpDown(301, 121 + 12, 79, this, GuiBase.Layer.FOREGROUND));
|
||||
|
@ -140,7 +140,7 @@ public class GuiFusionReactor extends GuiBase {
|
|||
|
||||
private void updateMultiBlockRender(){
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
IBlockState coil = TRContent.Machine.FUSION_COIL.block.getDefaultState();
|
||||
BlockState coil = TRContent.Machine.FUSION_COIL.block.getDefaultState();
|
||||
|
||||
List<BlockPos> coils = Torus.generate(new BlockPos(0, 0, 0), tile.size);
|
||||
coils.forEach(pos -> addComponent(pos.getX(), pos.getY(), pos.getZ(), coil, multiblock));
|
||||
|
@ -152,7 +152,7 @@ public class GuiFusionReactor extends GuiBase {
|
|||
tile.getPos().getZ());
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.generator.advanced.TileGasTurbine;
|
||||
|
@ -33,14 +33,14 @@ public class GuiGasTurbine extends GuiBase {
|
|||
|
||||
TileGasTurbine tile;
|
||||
|
||||
public GuiGasTurbine(final EntityPlayer player, final TileGasTurbine tile) {
|
||||
public GuiGasTurbine(final PlayerEntity player, final TileGasTurbine tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
drawSlot(25, 35, layer);
|
||||
drawSlot(25, 55, layer);
|
||||
|
@ -49,8 +49,8 @@ public class GuiGasTurbine extends GuiBase {
|
|||
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import techreborn.tiles.generator.basic.TileSolidFuelGenerator;
|
||||
|
||||
|
@ -32,14 +32,14 @@ public class GuiGenerator extends GuiBase {
|
|||
|
||||
TileSolidFuelGenerator tile;
|
||||
|
||||
public GuiGenerator(final EntityPlayer player, final TileSolidFuelGenerator tile) {
|
||||
public GuiGenerator(final PlayerEntity player, final TileSolidFuelGenerator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -50,8 +50,8 @@ public class GuiGenerator extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawBurnBar(this, tile.getScaledBurnTime(100), 100, 81, 38, mouseX, mouseY, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileGrinder;
|
||||
|
@ -33,14 +33,14 @@ public class GuiGrinder extends GuiBase {
|
|||
|
||||
TileGrinder tile;
|
||||
|
||||
public GuiGrinder(final EntityPlayer player, final TileGrinder tile) {
|
||||
public GuiGrinder(final PlayerEntity player, final TileGrinder tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -52,8 +52,8 @@ public class GuiGrinder extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.tiles.storage.idsu.TileInterdimensionalSU;
|
||||
|
@ -34,14 +34,14 @@ public class GuiIDSU extends GuiBase {
|
|||
|
||||
TileInterdimensionalSU idsu;
|
||||
|
||||
public GuiIDSU(EntityPlayer player, TileInterdimensionalSU tileIDSU) {
|
||||
public GuiIDSU(PlayerEntity player, TileInterdimensionalSU tileIDSU) {
|
||||
super(player, tileIDSU, tileIDSU.createContainer(player));
|
||||
idsu = tileIDSU;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(62, 45, layer);
|
||||
|
@ -50,8 +50,8 @@ public class GuiIDSU extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.ClientProxy;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
|
@ -42,7 +42,7 @@ public class GuiImplosionCompressor extends GuiBase {
|
|||
|
||||
TileImplosionCompressor tile;
|
||||
|
||||
public GuiImplosionCompressor(final EntityPlayer player, final TileImplosionCompressor tile) {
|
||||
public GuiImplosionCompressor(final PlayerEntity player, final TileImplosionCompressor tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
@ -54,8 +54,8 @@ public class GuiImplosionCompressor extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
final GuiBase.Layer layer = Layer.BACKGROUND;
|
||||
|
@ -75,8 +75,8 @@ public class GuiImplosionCompressor extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
@ -118,7 +118,7 @@ public class GuiImplosionCompressor extends GuiBase {
|
|||
}
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileIndustrialElectrolyzer;
|
||||
|
@ -33,14 +33,14 @@ public class GuiIndustrialElectrolyzer extends GuiBase {
|
|||
|
||||
TileIndustrialElectrolyzer tile;
|
||||
|
||||
public GuiIndustrialElectrolyzer(final EntityPlayer player, final TileIndustrialElectrolyzer tile) {
|
||||
public GuiIndustrialElectrolyzer(final PlayerEntity player, final TileIndustrialElectrolyzer tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
//Battery slot
|
||||
|
@ -54,8 +54,8 @@ public class GuiIndustrialElectrolyzer extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 84, 52, mouseX, mouseY, GuiBuilder.ProgressDirection.UP, layer);
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.ClientProxy;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
|
@ -43,7 +43,7 @@ public class GuiIndustrialGrinder extends GuiBase {
|
|||
|
||||
TileIndustrialGrinder tile;
|
||||
|
||||
public GuiIndustrialGrinder(final EntityPlayer player, final TileIndustrialGrinder tile) {
|
||||
public GuiIndustrialGrinder(final PlayerEntity player, final TileIndustrialGrinder tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ public class GuiIndustrialGrinder extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
// Battery slot
|
||||
|
@ -80,8 +80,8 @@ public class GuiIndustrialGrinder extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
@ -102,8 +102,8 @@ public class GuiIndustrialGrinder extends GuiBase {
|
|||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
IBlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
IBlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, -1, 0, standardCasing, multiblock);
|
||||
addComponent(1, -1, 0, standardCasing, multiblock);
|
||||
|
@ -141,9 +141,9 @@ public class GuiIndustrialGrinder extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||
- Direction.byId(this.tile.getFacingInt()).getOffsetX() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||
- Direction.byId(this.tile.getFacingInt()).getOffsetZ() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
@ -151,7 +151,7 @@ public class GuiIndustrialGrinder extends GuiBase {
|
|||
}
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.ClientProxy;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
|
@ -43,7 +43,7 @@ public class GuiIndustrialSawmill extends GuiBase {
|
|||
|
||||
TileIndustrialSawmill tile;
|
||||
|
||||
public GuiIndustrialSawmill(final EntityPlayer player, final TileIndustrialSawmill tile) {
|
||||
public GuiIndustrialSawmill(final PlayerEntity player, final TileIndustrialSawmill tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ public class GuiIndustrialSawmill extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float partialTicks, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
|
||||
protected void drawBackground(final float partialTicks, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(partialTicks, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
// Battery slot
|
||||
|
@ -79,8 +79,8 @@ public class GuiIndustrialSawmill extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
@ -101,8 +101,8 @@ public class GuiIndustrialSawmill extends GuiBase {
|
|||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
IBlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
IBlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, -1, 0, standardCasing, multiblock);
|
||||
addComponent(1, -1, 0, standardCasing, multiblock);
|
||||
|
@ -140,9 +140,9 @@ public class GuiIndustrialSawmill extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getYOffset() * 2,
|
||||
- Direction.byId(this.tile.getFacingInt()).getOffsetY() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getYOffset() * 2);
|
||||
- Direction.byId(this.tile.getFacingInt()).getOffsetY() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
@ -150,7 +150,7 @@ public class GuiIndustrialSawmill extends GuiBase {
|
|||
}
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,64 +25,64 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.tiles.machine.iron.TileIronFurnace;
|
||||
|
||||
public class GuiIronFurnace extends GuiBase {
|
||||
|
||||
public static final ResourceLocation texture = new ResourceLocation("minecraft",
|
||||
public static final Identifier texture = new Identifier("minecraft",
|
||||
"textures/gui/container/furnace.png");
|
||||
|
||||
TileIronFurnace furnace;
|
||||
|
||||
public GuiIronFurnace(final EntityPlayer player, final TileIronFurnace furnace) {
|
||||
public GuiIronFurnace(final PlayerEntity player, final TileIronFurnace furnace) {
|
||||
super(player, furnace, furnace.createContainer(player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.containerWidth = 176;
|
||||
this.containerHeight = 167;
|
||||
this.furnace = furnace;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
protected void drawBackground(float partialTicks, int mouseX, int mouseY) {
|
||||
drawDefaultBackground();
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
builder.drawSlotTab(this, guiLeft - 24, guiTop + 6, new ItemStack(TRContent.WRENCH));
|
||||
builder.drawSlotTab(this, left - 24, top + 6, new ItemStack(TRContent.WRENCH));
|
||||
mc.getTextureManager().bindTexture(GuiIronFurnace.texture);
|
||||
final int k = (this.width - xSize) / 2;
|
||||
final int l = (this.height - ySize) / 2;
|
||||
drawTexturedModalRect(k, l, 0, 0, xSize, ySize);
|
||||
final int k = (this.width - containerWidth) / 2;
|
||||
final int l = (this.height - containerHeight) / 2;
|
||||
blit(k, l, 0, 0, containerWidth, containerHeight);
|
||||
|
||||
int j = 0;
|
||||
|
||||
j = furnace.gaugeProgressScaled(24);
|
||||
if (j > 0) {
|
||||
drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
|
||||
blit(k + 78, l + 35, 176, 14, j + 1, 16);
|
||||
}
|
||||
|
||||
j = furnace.gaugeFuelScaled(12);
|
||||
if (j > 0) {
|
||||
drawTexturedModalRect(k + 57, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
blit(k + 57, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
final String name = I18n.format("tile.techreborn.iron_furnace.name");
|
||||
fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 6, 4210752);
|
||||
fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8, ySize - 96 + 2, 4210752);
|
||||
protected void drawForeground(int mouseX, int mouseY) {
|
||||
final String name = I18n.translate("tile.techreborn.iron_furnace.name");
|
||||
font.draw(name, containerWidth / 2 - font.getStringWidth(name) / 2, 6, 4210752);
|
||||
font.draw(I18n.translate("container.inventory", new Object[0]), 8, containerHeight - 96 + 2, 4210752);
|
||||
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
renderHoveredToolTip(mouseX, mouseY);
|
||||
drawMouseoverTooltip(mouseX, mouseY);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.tiles.storage.lesu.TileLapotronicSU;
|
||||
|
@ -34,14 +34,14 @@ public class GuiLESU extends GuiBase {
|
|||
|
||||
TileLapotronicSU tile;
|
||||
|
||||
public GuiLESU(final EntityPlayer player, final TileLapotronicSU tile) {
|
||||
public GuiLESU(final PlayerEntity player, final TileLapotronicSU tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(62, 45, layer);
|
||||
|
@ -50,8 +50,8 @@ public class GuiLESU extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.tiles.storage.TileMediumVoltageSU;
|
||||
|
@ -34,14 +34,14 @@ public class GuiMFE extends GuiBase {
|
|||
|
||||
TileMediumVoltageSU mfe;
|
||||
|
||||
public GuiMFE(final EntityPlayer player, final TileMediumVoltageSU mfe) {
|
||||
public GuiMFE(final PlayerEntity player, final TileMediumVoltageSU mfe) {
|
||||
super(player, mfe, mfe.createContainer(player));
|
||||
this.mfe = mfe;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(62, 45, layer);
|
||||
|
@ -50,8 +50,8 @@ public class GuiMFE extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
|
|
|
@ -24,8 +24,9 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.tiles.storage.TileHighVoltageSU;
|
||||
|
@ -34,14 +35,14 @@ public class GuiMFSU extends GuiBase {
|
|||
|
||||
TileHighVoltageSU mfsu;
|
||||
|
||||
public GuiMFSU(final EntityPlayer player, final TileHighVoltageSU mfsu) {
|
||||
public GuiMFSU(final PlayerEntity player, final TileHighVoltageSU mfsu) {
|
||||
super(player, mfsu, mfsu.createContainer(player));
|
||||
this.mfsu = mfsu;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(62, 45, layer);
|
||||
|
@ -50,8 +51,8 @@ public class GuiMFSU extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
|
|
@ -24,11 +24,6 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiConfirmOpenLink;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.common.network.NetworkManager;
|
||||
|
||||
|
@ -36,21 +31,26 @@ import techreborn.items.ItemManual;
|
|||
import techreborn.packets.ServerboundPackets;
|
||||
|
||||
import java.awt.*;
|
||||
import net.minecraft.client.gui.Screen;
|
||||
import net.minecraft.client.gui.ingame.ConfirmChatLinkScreen;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
|
||||
public class GuiManual extends GuiScreen {
|
||||
public class GuiManual extends Screen {
|
||||
|
||||
ItemManual manual;
|
||||
EntityPlayer player;
|
||||
PlayerEntity player;
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/manual.png");
|
||||
private static final Identifier texture = new Identifier("techreborn", "textures/gui/manual.png");
|
||||
int guiWidth = 207;
|
||||
int guiHeight = 195;
|
||||
private static final String text1 = I18n.format("techreborn.manual.wiki");
|
||||
private static final String text2 = I18n.format("techreborn.manual.discord");
|
||||
private static final String text3 = I18n.format("techreborn.manual.refund");
|
||||
private static final String text1 = I18n.translate("techreborn.manual.wiki");
|
||||
private static final String text2 = I18n.translate("techreborn.manual.discord");
|
||||
private static final String text3 = I18n.translate("techreborn.manual.refund");
|
||||
|
||||
public GuiManual(EntityPlayer player) {
|
||||
public GuiManual(PlayerEntity player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,10 @@ public class GuiManual extends GuiScreen {
|
|||
@Override
|
||||
public void initGui() {
|
||||
int y = height / 4;
|
||||
buttons.add(new GuiButtonExtended(1, (width / 2 - 30), y + 10, 60, 20, I18n.format("techreborn.manual.wikibtn")));
|
||||
buttons.add(new GuiButtonExtended(2, (width / 2 - 30), y + 60, 60, 20, I18n.format("techreborn.manual.discordbtn")));
|
||||
buttons.add(new GuiButtonExtended(1, (width / 2 - 30), y + 10, 60, 20, I18n.translate("techreborn.manual.wikibtn")));
|
||||
buttons.add(new GuiButtonExtended(2, (width / 2 - 30), y + 60, 60, 20, I18n.translate("techreborn.manual.discordbtn")));
|
||||
if(ItemManual.allowRefund){
|
||||
buttons.add(new GuiButtonExtended(3, (width / 2 - 30), y + 110, 60, 20, I18n.format("techreborn.manual.refundbtn")));
|
||||
buttons.add(new GuiButtonExtended(3, (width / 2 - 30), y + 110, 60, 20, I18n.translate("techreborn.manual.refundbtn")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,12 +75,12 @@ public class GuiManual extends GuiScreen {
|
|||
mc.getTextureManager().bindTexture(GuiManual.texture);
|
||||
int centerX = (width / 2) - guiWidth / 2;
|
||||
int centerY = (height / 2) - guiHeight / 2;
|
||||
drawTexturedModalRect(centerX, centerY, 0, 0, guiWidth, guiHeight);
|
||||
blit(centerX, centerY, 0, 0, guiWidth, guiHeight);
|
||||
int y = height / 4;
|
||||
fontRenderer.drawString(text1, ((width / 2) - fontRenderer.getStringWidth(text1) / 2), height / 2 - (guiHeight / 4), 4210752);
|
||||
fontRenderer.drawString(text2, ((width / 2) - fontRenderer.getStringWidth(text2) / 2), height / 2 + 5, 4210752);
|
||||
font.draw(text1, ((width / 2) - font.getStringWidth(text1) / 2), height / 2 - (guiHeight / 4), 4210752);
|
||||
font.draw(text2, ((width / 2) - font.getStringWidth(text2) / 2), height / 2 + 5, 4210752);
|
||||
if(ItemManual.allowRefund){
|
||||
fontRenderer.drawString(text3, ((width / 2) - fontRenderer.getStringWidth(text3) / 2), y + 100, 4210752);
|
||||
font.draw(text3, ((width / 2) - font.getStringWidth(text3) / 2), y + 100, 4210752);
|
||||
}
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
@ -88,10 +88,10 @@ public class GuiManual extends GuiScreen {
|
|||
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
|
||||
switch (button.id) {
|
||||
case 1:
|
||||
mc.displayGuiScreen(new GuiConfirmOpenLink(this, "http://wiki.techreborn.ovh", 1, false));
|
||||
mc.displayGuiScreen(new ConfirmChatLinkScreen(this, "http://wiki.techreborn.ovh", 1, false));
|
||||
break;
|
||||
case 2:
|
||||
this.mc.displayGuiScreen(new GuiConfirmOpenLink(this, "https://discord.gg/teamreborn", 2, false));
|
||||
this.mc.displayGuiScreen(new ConfirmChatLinkScreen(this, "https://discord.gg/teamreborn", 2, false));
|
||||
break;
|
||||
case 3:
|
||||
mc.displayGuiScreen(null);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier3.TileMatterFabricator;
|
||||
|
@ -33,14 +33,14 @@ public class GuiMatterFabricator extends GuiBase {
|
|||
|
||||
TileMatterFabricator tile;
|
||||
|
||||
public GuiMatterFabricator(final EntityPlayer player, final TileMatterFabricator tile) {
|
||||
public GuiMatterFabricator(final PlayerEntity player, final TileMatterFabricator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -56,8 +56,8 @@ public class GuiMatterFabricator extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 83, 41, mouseX, mouseY, GuiBuilder.ProgressDirection.DOWN, layer);
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.generator.TilePlasmaGenerator;
|
||||
|
@ -35,7 +35,7 @@ import techreborn.tiles.generator.TilePlasmaGenerator;
|
|||
* @author drcrazy
|
||||
*
|
||||
*/
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class GuiPlasmaGenerator extends GuiBase {
|
||||
|
||||
/**
|
||||
|
@ -45,14 +45,14 @@ public class GuiPlasmaGenerator extends GuiBase {
|
|||
*/
|
||||
TilePlasmaGenerator tile;
|
||||
|
||||
public GuiPlasmaGenerator(final EntityPlayer player, final TilePlasmaGenerator tile) {
|
||||
public GuiPlasmaGenerator(final PlayerEntity player, final TilePlasmaGenerator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
drawSlot(25, 35, layer);
|
||||
drawSlot(25, 55, layer);
|
||||
|
@ -61,8 +61,8 @@ public class GuiPlasmaGenerator extends GuiBase {
|
|||
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import techreborn.tiles.machine.tier3.TileQuantumChest;
|
||||
|
||||
|
@ -32,14 +32,14 @@ public class GuiQuantumChest extends GuiBase {
|
|||
|
||||
TileQuantumChest quantumChest;
|
||||
|
||||
public GuiQuantumChest(final EntityPlayer player, final TileQuantumChest quantumChest) {
|
||||
public GuiQuantumChest(final PlayerEntity player, final TileQuantumChest quantumChest) {
|
||||
super(player, quantumChest, quantumChest.createContainer(player));
|
||||
this.quantumChest = quantumChest;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
drawSlot(80, 24, layer);
|
||||
|
@ -47,15 +47,15 @@ public class GuiQuantumChest extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if (!this.quantumChest.storedItem.isEmpty() && !this.quantumChest.inventory.getStackInSlot(1).isEmpty()) {
|
||||
this.builder.drawBigBlueBar(this, 31, 43, this.quantumChest.storedItem.getCount() + this.quantumChest.inventory.getStackInSlot(1).getCount(), this.quantumChest.maxCapacity, mouseX - this.guiLeft, mouseY - this.guiTop, "Stored", layer);
|
||||
if (!this.quantumChest.storedItem.isEmpty() && !this.quantumChest.inventory.getInvStack(1).isEmpty()) {
|
||||
this.builder.drawBigBlueBar(this, 31, 43, this.quantumChest.storedItem.getAmount() + this.quantumChest.inventory.getInvStack(1).getAmount(), this.quantumChest.maxCapacity, mouseX - this.left, mouseY - this.top, "Stored", layer);
|
||||
}
|
||||
if (this.quantumChest.storedItem.isEmpty() && !this.quantumChest.inventory.getStackInSlot(1).isEmpty()) {
|
||||
this.builder.drawBigBlueBar(this, 31, 43, this.quantumChest.inventory.getStackInSlot(1).getCount(), this.quantumChest.maxCapacity, mouseX - this.guiLeft, mouseY - this.guiTop, "Stored", layer);
|
||||
if (this.quantumChest.storedItem.isEmpty() && !this.quantumChest.inventory.getInvStack(1).isEmpty()) {
|
||||
this.builder.drawBigBlueBar(this, 31, 43, this.quantumChest.inventory.getInvStack(1).getAmount(), this.quantumChest.maxCapacity, mouseX - this.left, mouseY - this.top, "Stored", layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import techreborn.tiles.machine.tier3.TileQuantumTank;
|
||||
|
||||
|
@ -33,14 +33,14 @@ public class GuiQuantumTank extends GuiBase {
|
|||
|
||||
TileQuantumTank quantumTank;
|
||||
|
||||
public GuiQuantumTank(final EntityPlayer player, final TileQuantumTank quantumTank) {
|
||||
public GuiQuantumTank(final PlayerEntity player, final TileQuantumTank quantumTank) {
|
||||
super(player, quantumTank, quantumTank.createContainer(player));
|
||||
this.quantumTank = quantumTank;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(80, 17, layer);
|
||||
|
@ -49,16 +49,16 @@ public class GuiQuantumTank extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
|
||||
FluidStack fluid = quantumTank.tank.getFluid();
|
||||
if(fluid != null){
|
||||
fontRenderer.drawString( "Fluid Type:", 10, 20, 4210752);
|
||||
fontRenderer.drawString(fluid.getLocalizedName() + "", 10, 30, 4210752);
|
||||
font.draw( "Fluid Type:", 10, 20, 4210752);
|
||||
font.draw(fluid.getLocalizedName() + "", 10, 30, 4210752);
|
||||
|
||||
fontRenderer.drawString("Fluid Amount:", 10, 50, 4210752);
|
||||
fontRenderer.drawString(quantumTank.tank.getFluidAmount() + "mb", 10, 60, 4210752);
|
||||
font.draw("Fluid Amount:", 10, 50, 4210752);
|
||||
font.draw(quantumTank.tank.getFluidAmount() + "mb", 10, 60, 4210752);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,6 +66,6 @@ public class GuiQuantumTank extends GuiBase {
|
|||
@Override
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
renderHoveredToolTip(mouseX, mouseY);
|
||||
drawMouseoverTooltip(mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileRecycler;
|
||||
|
@ -33,14 +33,14 @@ public class GuiRecycler extends GuiBase {
|
|||
|
||||
TileRecycler tile;
|
||||
|
||||
public GuiRecycler(final EntityPlayer player, final TileRecycler tile) {
|
||||
public GuiRecycler(final PlayerEntity player, final TileRecycler tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
@ -50,8 +50,8 @@ public class GuiRecycler extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.gaugeProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.network.NetworkManager;
|
||||
|
@ -35,14 +35,14 @@ public class GuiRollingMachine extends GuiBase {
|
|||
|
||||
TileRollingMachine rollingMachine;
|
||||
|
||||
public GuiRollingMachine(final EntityPlayer player, final TileRollingMachine tileRollingmachine) {
|
||||
public GuiRollingMachine(final PlayerEntity player, final TileRollingMachine tileRollingmachine) {
|
||||
super(player, tileRollingmachine, tileRollingmachine.createContainer(player));
|
||||
this.rollingMachine = tileRollingmachine;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
int gridYPos = 22;
|
||||
|
@ -64,8 +64,8 @@ public class GuiRollingMachine extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, rollingMachine.getProgressScaled(100), 100, 92, 43, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.machine.tier1.TileScrapboxinator;
|
||||
|
@ -33,14 +33,14 @@ public class GuiScrapboxinator extends GuiBase {
|
|||
|
||||
TileScrapboxinator tile;
|
||||
|
||||
public GuiScrapboxinator(final EntityPlayer player, final TileScrapboxinator tile) {
|
||||
public GuiScrapboxinator(final PlayerEntity player, final TileScrapboxinator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
|
||||
protected void drawBackground(float partialTicks, int mouseX, int mouseY) {
|
||||
super.drawBackground(partialTicks, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
// Battery slot
|
||||
|
@ -54,8 +54,8 @@ public class GuiScrapboxinator extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.generator.advanced.TileSemiFluidGenerator;
|
||||
|
@ -33,14 +33,14 @@ public class GuiSemifluidGenerator extends GuiBase {
|
|||
|
||||
TileSemiFluidGenerator tile;
|
||||
|
||||
public GuiSemifluidGenerator(final EntityPlayer player, final TileSemiFluidGenerator tile) {
|
||||
public GuiSemifluidGenerator(final PlayerEntity player, final TileSemiFluidGenerator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
drawSlot(25, 35, layer);
|
||||
drawSlot(25, 55, layer);
|
||||
|
@ -49,8 +49,8 @@ public class GuiSemifluidGenerator extends GuiBase {
|
|||
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.tiles.generator.advanced.TileThermalGenerator;
|
||||
|
@ -33,14 +33,14 @@ public class GuiThermalGenerator extends GuiBase {
|
|||
|
||||
TileThermalGenerator tile;
|
||||
|
||||
public GuiThermalGenerator(final EntityPlayer player, final TileThermalGenerator tile) {
|
||||
public GuiThermalGenerator(final PlayerEntity player, final TileThermalGenerator tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
drawSlot(25, 35, layer);
|
||||
drawSlot(25, 55, layer);
|
||||
|
@ -49,8 +49,8 @@ public class GuiThermalGenerator extends GuiBase {
|
|||
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.ClientProxy;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
|
@ -41,7 +41,7 @@ public class GuiVacuumFreezer extends GuiBase {
|
|||
|
||||
TileVacuumFreezer tile;
|
||||
|
||||
public GuiVacuumFreezer(final EntityPlayer player, final TileVacuumFreezer tile) {
|
||||
public GuiVacuumFreezer(final PlayerEntity player, final TileVacuumFreezer tile) {
|
||||
super(player, tile, tile.createContainer(player));
|
||||
this.tile = tile;
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ public class GuiVacuumFreezer extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
// Battery slot
|
||||
|
@ -72,8 +72,8 @@ public class GuiVacuumFreezer extends GuiBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
|
@ -93,8 +93,8 @@ public class GuiVacuumFreezer extends GuiBase {
|
|||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
IBlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
IBlockState industrialCasing = TRContent.MachineBlocks.INDUSTRIAL.getCasing().getDefaultState();
|
||||
BlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState industrialCasing = TRContent.MachineBlocks.INDUSTRIAL.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, -1, 0, advancedCasing, multiblock);
|
||||
addComponent(1, -1, 0, advancedCasing, multiblock);
|
||||
|
@ -136,7 +136,7 @@ public class GuiVacuumFreezer extends GuiBase {
|
|||
}
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue