Fix Iron Furnace GUI

This commit is contained in:
drcrazy 2019-08-11 23:56:43 +03:00
parent a906fad739
commit 4012a69fab
40 changed files with 83 additions and 63 deletions

View file

@ -74,7 +74,7 @@ public class GuiHandler {
} }
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
private static AbstractContainerScreen getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) { private static AbstractContainerScreen<?> getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) {
final BlockEntity blockEntity = player.world.getBlockEntity(pos); final BlockEntity blockEntity = player.world.getBlockEntity(pos);
switch (gui) { switch (gui) {

View file

@ -27,6 +27,7 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonUpDown; import reborncore.client.gui.builder.widget.GuiButtonUpDown;
import reborncore.common.network.NetworkManager; import reborncore.common.network.NetworkManager;
@ -34,7 +35,7 @@ import reborncore.common.powerSystem.PowerSystem;
import techreborn.packets.ServerboundPackets; import techreborn.packets.ServerboundPackets;
import techreborn.blockentity.storage.AdjustableSUBlockEntity; import techreborn.blockentity.storage.AdjustableSUBlockEntity;
public class GuiAESU extends GuiBase { public class GuiAESU extends GuiBase<BuiltContainer> {
AdjustableSUBlockEntity blockEntity; AdjustableSUBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.AlloySmelterBlockEntity; import techreborn.blockentity.machine.tier1.AlloySmelterBlockEntity;
public class GuiAlloySmelter extends GuiBase { public class GuiAlloySmelter extends GuiBase<BuiltContainer> {
AlloySmelterBlockEntity blockEntity; AlloySmelterBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.AssemblingMachineBlockEntity; import techreborn.blockentity.machine.tier1.AssemblingMachineBlockEntity;
public class GuiAssemblingMachine extends GuiBase { public class GuiAssemblingMachine extends GuiBase<BuiltContainer> {
AssemblingMachineBlockEntity blockEntity; AssemblingMachineBlockEntity blockEntity;

View file

@ -29,6 +29,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.recipe.Recipe; import net.minecraft.recipe.Recipe;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import reborncore.common.network.NetworkManager; import reborncore.common.network.NetworkManager;
@ -38,7 +39,7 @@ import techreborn.blockentity.machine.tier1.AutoCraftingTableBlockEntity;
/** /**
* Created by modmuss50 on 20/06/2017. * Created by modmuss50 on 20/06/2017.
*/ */
public class GuiAutoCrafting extends GuiBase { public class GuiAutoCrafting extends GuiBase<BuiltContainer> {
static final Identifier RECIPE_BOOK_TEXTURE = new Identifier("textures/gui/recipe_book.png"); static final Identifier RECIPE_BOOK_TEXTURE = new Identifier("textures/gui/recipe_book.png");
boolean showGui = true; boolean showGui = true;

View file

@ -26,11 +26,12 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.PowerSystem;
import techreborn.blockentity.storage.LowVoltageSUBlockEntity; import techreborn.blockentity.storage.LowVoltageSUBlockEntity;
public class GuiBatbox extends GuiBase { public class GuiBatbox extends GuiBase<BuiltContainer> {
LowVoltageSUBlockEntity blockEntity; LowVoltageSUBlockEntity blockEntity;

View file

@ -30,6 +30,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -39,7 +40,7 @@ import reborncore.client.multiblock.MultiblockSet;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity; import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity;
public class GuiBlastFurnace extends GuiBase { public class GuiBlastFurnace extends GuiBase<BuiltContainer> {
public IndustrialBlastFurnaceBlockEntity blockEntity; public IndustrialBlastFurnaceBlockEntity blockEntity;
boolean hasMultiBlock; boolean hasMultiBlock;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.IndustrialCentrifugeBlockEntity; import techreborn.blockentity.IndustrialCentrifugeBlockEntity;
public class GuiCentrifuge extends GuiBase { public class GuiCentrifuge extends GuiBase<BuiltContainer> {
IndustrialCentrifugeBlockEntity blockEntity; IndustrialCentrifugeBlockEntity blockEntity;

View file

@ -25,10 +25,11 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import techreborn.blockentity.ChargeOMatBlockEntity; import techreborn.blockentity.ChargeOMatBlockEntity;
public class GuiChargeBench extends GuiBase { public class GuiChargeBench extends GuiBase<BuiltContainer> {
ChargeOMatBlockEntity blockEntity; ChargeOMatBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.ChemicalReactorBlockEntity; import techreborn.blockentity.machine.tier1.ChemicalReactorBlockEntity;
public class GuiChemicalReactor extends GuiBase { public class GuiChemicalReactor extends GuiBase<BuiltContainer> {
ChemicalReactorBlockEntity blockEntity; ChemicalReactorBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.CompressorBlockEntity; import techreborn.blockentity.machine.tier1.CompressorBlockEntity;
public class GuiCompressor extends GuiBase { public class GuiCompressor extends GuiBase<BuiltContainer> {
CompressorBlockEntity blockEntity; CompressorBlockEntity blockEntity;

View file

@ -27,12 +27,13 @@ package techreborn.client.gui;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.generator.advanced.DieselGeneratorBlockEntity; import techreborn.blockentity.generator.advanced.DieselGeneratorBlockEntity;
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public class GuiDieselGenerator extends GuiBase { public class GuiDieselGenerator extends GuiBase<BuiltContainer> {
DieselGeneratorBlockEntity blockEntity; DieselGeneratorBlockEntity blockEntity;

View file

@ -25,10 +25,11 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import techreborn.blockentity.DigitalChestBlockEntity; import techreborn.blockentity.DigitalChestBlockEntity;
public class GuiDigitalChest extends GuiBase { public class GuiDigitalChest extends GuiBase<BuiltContainer> {
DigitalChestBlockEntity blockEntity; DigitalChestBlockEntity blockEntity;

View file

@ -30,6 +30,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -39,7 +40,7 @@ import reborncore.client.multiblock.MultiblockSet;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity; import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity;
public class GuiDistillationTower extends GuiBase { public class GuiDistillationTower extends GuiBase<BuiltContainer> {
public DistillationTowerBlockEntity blockEntity; public DistillationTowerBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.ElectricFurnaceBlockEntity; import techreborn.blockentity.machine.tier1.ElectricFurnaceBlockEntity;
public class GuiElectricFurnace extends GuiBase { public class GuiElectricFurnace extends GuiBase<BuiltContainer> {
ElectricFurnaceBlockEntity blockEntity; ElectricFurnaceBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.ExtractorBlockEntity; import techreborn.blockentity.machine.tier1.ExtractorBlockEntity;
public class GuiExtractor extends GuiBase { public class GuiExtractor extends GuiBase<BuiltContainer> {
ExtractorBlockEntity blockEntity; ExtractorBlockEntity blockEntity;

View file

@ -29,6 +29,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -42,7 +43,7 @@ import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity;
* @author drcrazy * @author drcrazy
* *
*/ */
public class GuiFluidReplicator extends GuiBase { public class GuiFluidReplicator extends GuiBase<BuiltContainer> {
FluidReplicatorBlockEntity blockEntity; FluidReplicatorBlockEntity blockEntity;

View file

@ -30,6 +30,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.builder.widget.GuiButtonUpDown; import reborncore.client.gui.builder.widget.GuiButtonUpDown;
@ -48,7 +49,7 @@ import java.awt.*;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
public class GuiFusionReactor extends GuiBase { public class GuiFusionReactor extends GuiBase<BuiltContainer> {
FusionControlComputerBlockEntity blockEntity; FusionControlComputerBlockEntity blockEntity;
public GuiFusionReactor(int syncID, final PlayerEntity player, final FusionControlComputerBlockEntity blockEntity) { public GuiFusionReactor(int syncID, final PlayerEntity player, final FusionControlComputerBlockEntity blockEntity) {

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.generator.advanced.GasTurbineBlockEntity; import techreborn.blockentity.generator.advanced.GasTurbineBlockEntity;
public class GuiGasTurbine extends GuiBase { public class GuiGasTurbine extends GuiBase<BuiltContainer> {
GasTurbineBlockEntity blockEntity; GasTurbineBlockEntity blockEntity;

View file

@ -25,10 +25,11 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity; import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity;
public class GuiGenerator extends GuiBase { public class GuiGenerator extends GuiBase<BuiltContainer> {
SolidFuelGeneratorBlockEntity blockEntity; SolidFuelGeneratorBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.GrinderBlockEntity; import techreborn.blockentity.machine.tier1.GrinderBlockEntity;
public class GuiGrinder extends GuiBase { public class GuiGrinder extends GuiBase<BuiltContainer> {
GrinderBlockEntity blockEntity; GrinderBlockEntity blockEntity;

View file

@ -26,11 +26,12 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.PowerSystem;
import techreborn.blockentity.storage.idsu.InterdimensionalSUBlockEntity; import techreborn.blockentity.storage.idsu.InterdimensionalSUBlockEntity;
public class GuiIDSU extends GuiBase { public class GuiIDSU extends GuiBase<BuiltContainer> {
InterdimensionalSUBlockEntity idsu; InterdimensionalSUBlockEntity idsu;

View file

@ -29,6 +29,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -38,7 +39,7 @@ import reborncore.client.multiblock.MultiblockSet;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity; import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity;
public class GuiImplosionCompressor extends GuiBase { public class GuiImplosionCompressor extends GuiBase<BuiltContainer> {
ImplosionCompressorBlockEntity blockEntity; ImplosionCompressorBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.IndustrialElectrolyzerBlockEntity; import techreborn.blockentity.machine.tier1.IndustrialElectrolyzerBlockEntity;
public class GuiIndustrialElectrolyzer extends GuiBase { public class GuiIndustrialElectrolyzer extends GuiBase<BuiltContainer> {
IndustrialElectrolyzerBlockEntity blockEntity; IndustrialElectrolyzerBlockEntity blockEntity;

View file

@ -30,6 +30,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -39,7 +40,7 @@ import reborncore.client.multiblock.MultiblockSet;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity; import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity;
public class GuiIndustrialGrinder extends GuiBase { public class GuiIndustrialGrinder extends GuiBase<BuiltContainer> {
IndustrialGrinderBlockEntity blockEntity; IndustrialGrinderBlockEntity blockEntity;

View file

@ -30,6 +30,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -39,7 +40,7 @@ import reborncore.client.multiblock.MultiblockSet;
import techreborn.blockentity.machine.multiblock.IndustrialSawmillBlockEntity; import techreborn.blockentity.machine.multiblock.IndustrialSawmillBlockEntity;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class GuiIndustrialSawmill extends GuiBase { public class GuiIndustrialSawmill extends GuiBase<BuiltContainer> {
IndustrialSawmillBlockEntity blockEntity; IndustrialSawmillBlockEntity blockEntity;

View file

@ -25,26 +25,24 @@
package techreborn.client.gui; package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity; import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity;
public class GuiIronFurnace extends GuiBase { public class GuiIronFurnace extends GuiBase<BuiltContainer> {
public static final Identifier texture = new Identifier("minecraft", public static final Identifier texture = new Identifier("minecraft",
"textures/gui/container/furnace.png"); "textures/gui/container/furnace.png");
IronFurnaceBlockEntity furnace; IronFurnaceBlockEntity blockEntity;
public GuiIronFurnace(int syncID, final PlayerEntity player, final IronFurnaceBlockEntity furnace) { public GuiIronFurnace(int syncID, final PlayerEntity player, final IronFurnaceBlockEntity furnace) {
super(player, furnace, furnace.createContainer(syncID, player)); super(player, furnace, furnace.createContainer(syncID, player));
this.containerWidth = 176; this.blockEntity = furnace;
this.containerHeight = 167;
this.furnace = furnace;
} }
@Override @Override
@ -59,30 +57,14 @@ public class GuiIronFurnace extends GuiBase {
int j = 0; int j = 0;
j = furnace.gaugeProgressScaled(24); j = blockEntity.gaugeProgressScaled(24);
if (j > 0) { if (j > 0) {
blit(k + 78, l + 35, 176, 14, j + 1, 16); blit(k + 78, l + 35, 176, 14, j + 1, 16);
} }
j = furnace.gaugeFuelScaled(12); j = blockEntity.gaugeFuelScaled(12);
if (j > 0) { if (j > 0) {
blit(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 drawForeground(int mouseX, int mouseY) {
final String name = I18n.translate("block.techreborn.iron_furnace");
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.drawForeground(mouseX, mouseY);
}
@Override
public void render(int mouseX, int mouseY, float partialTicks) {
super.render(mouseX, mouseY, partialTicks);
drawMouseoverTooltip(mouseX, mouseY);
}
} }

View file

@ -26,11 +26,12 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.PowerSystem;
import techreborn.blockentity.storage.lesu.LapotronicSUBlockEntity; import techreborn.blockentity.storage.lesu.LapotronicSUBlockEntity;
public class GuiLESU extends GuiBase { public class GuiLESU extends GuiBase<BuiltContainer> {
LapotronicSUBlockEntity blockEntity; LapotronicSUBlockEntity blockEntity;

View file

@ -26,11 +26,12 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.PowerSystem;
import techreborn.blockentity.storage.MediumVoltageSUBlockEntity; import techreborn.blockentity.storage.MediumVoltageSUBlockEntity;
public class GuiMFE extends GuiBase { public class GuiMFE extends GuiBase<BuiltContainer> {
MediumVoltageSUBlockEntity mfe; MediumVoltageSUBlockEntity mfe;

View file

@ -26,11 +26,12 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.PowerSystem;
import techreborn.blockentity.storage.HighVoltageSUBlockEntity; import techreborn.blockentity.storage.HighVoltageSUBlockEntity;
public class GuiMFSU extends GuiBase { public class GuiMFSU extends GuiBase<BuiltContainer> {
HighVoltageSUBlockEntity mfsu; HighVoltageSUBlockEntity mfsu;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier3.MatterFabricatorBlockEntity; import techreborn.blockentity.machine.tier3.MatterFabricatorBlockEntity;
public class GuiMatterFabricator extends GuiBase { public class GuiMatterFabricator extends GuiBase<BuiltContainer> {
MatterFabricatorBlockEntity blockEntity; MatterFabricatorBlockEntity blockEntity;

View file

@ -27,6 +27,7 @@ package techreborn.client.gui;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity;
@ -36,7 +37,7 @@ import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity;
* *
*/ */
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public class GuiPlasmaGenerator extends GuiBase { public class GuiPlasmaGenerator extends GuiBase<BuiltContainer> {
/** /**
* @param player * @param player

View file

@ -25,10 +25,11 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import techreborn.blockentity.machine.tier3.QuantumChestBlockEntity; import techreborn.blockentity.machine.tier3.QuantumChestBlockEntity;
public class GuiQuantumChest extends GuiBase { public class GuiQuantumChest extends GuiBase<BuiltContainer> {
QuantumChestBlockEntity quantumChest; QuantumChestBlockEntity quantumChest;

View file

@ -26,11 +26,12 @@ package techreborn.client.gui;
import io.github.prospector.silk.fluid.FluidInstance; import io.github.prospector.silk.fluid.FluidInstance;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.fluid.FluidUtil; import reborncore.common.fluid.FluidUtil;
import techreborn.blockentity.machine.tier3.QuantumTankBlockEntity; import techreborn.blockentity.machine.tier3.QuantumTankBlockEntity;
public class GuiQuantumTank extends GuiBase { public class GuiQuantumTank extends GuiBase<BuiltContainer> {
QuantumTankBlockEntity quantumTank; QuantumTankBlockEntity quantumTank;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.RecyclerBlockEntity; import techreborn.blockentity.machine.tier1.RecyclerBlockEntity;
public class GuiRecycler extends GuiBase { public class GuiRecycler extends GuiBase<BuiltContainer> {
RecyclerBlockEntity blockEntity; RecyclerBlockEntity blockEntity;

View file

@ -25,13 +25,14 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import reborncore.common.network.NetworkManager; import reborncore.common.network.NetworkManager;
import techreborn.packets.ServerboundPackets; import techreborn.packets.ServerboundPackets;
import techreborn.blockentity.machine.tier1.RollingMachineBlockEntity; import techreborn.blockentity.machine.tier1.RollingMachineBlockEntity;
public class GuiRollingMachine extends GuiBase { public class GuiRollingMachine extends GuiBase<BuiltContainer> {
RollingMachineBlockEntity rollingMachine; RollingMachineBlockEntity rollingMachine;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.machine.tier1.ScrapboxinatorBlockEntity; import techreborn.blockentity.machine.tier1.ScrapboxinatorBlockEntity;
public class GuiScrapboxinator extends GuiBase { public class GuiScrapboxinator extends GuiBase<BuiltContainer> {
ScrapboxinatorBlockEntity blockEntity; ScrapboxinatorBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.generator.advanced.SemiFluidGeneratorBlockEntity; import techreborn.blockentity.generator.advanced.SemiFluidGeneratorBlockEntity;
public class GuiSemifluidGenerator extends GuiBase { public class GuiSemifluidGenerator extends GuiBase<BuiltContainer> {
SemiFluidGeneratorBlockEntity blockEntity; SemiFluidGeneratorBlockEntity blockEntity;

View file

@ -25,11 +25,12 @@
package techreborn.client.gui; package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.blockentity.generator.advanced.ThermalGeneratorBlockEntity; import techreborn.blockentity.generator.advanced.ThermalGeneratorBlockEntity;
public class GuiThermalGenerator extends GuiBase { public class GuiThermalGenerator extends GuiBase<BuiltContainer> {
ThermalGeneratorBlockEntity blockEntity; ThermalGeneratorBlockEntity blockEntity;

View file

@ -28,6 +28,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import reborncore.RebornCoreClient; import reborncore.RebornCoreClient;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended; import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -37,7 +38,7 @@ import reborncore.client.multiblock.MultiblockSet;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity; import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity;
public class GuiVacuumFreezer extends GuiBase { public class GuiVacuumFreezer extends GuiBase<BuiltContainer> {
VacuumFreezerBlockEntity blockEntity; VacuumFreezerBlockEntity blockEntity;