Renames to match yarn changes

This commit is contained in:
modmuss50 2020-03-12 20:56:44 +00:00
parent 5b1e68d093
commit 99b2755887
94 changed files with 415 additions and 418 deletions

View file

@ -37,10 +37,10 @@ import net.minecraft.util.registry.Registry;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.text.WordUtils; import org.apache.commons.lang3.text.WordUtils;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBlockEntityInventoryBuilder; import reborncore.client.screen.builder.BlockEntityScreenHandlerBuilder;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.crafting.RebornRecipeType; import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -93,8 +93,8 @@ public class DataDrivenBEProvider extends BlockEntityType<DataDrivenBEProvider.D
return new DataDrivenBlockEntity(this); return new DataDrivenBlockEntity(this);
} }
public BuiltContainer createContainer(DataDrivenBlockEntity blockEntity, int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(DataDrivenBlockEntity blockEntity, int syncID, PlayerEntity player) {
ContainerBlockEntityInventoryBuilder builder = new ContainerBuilder(identifier.getPath()).player(player.inventory) BlockEntityScreenHandlerBuilder builder = new ScreenHandlerBuilder(identifier.getPath()).player(player.inventory)
.inventory().hotbar().addInventory().blockEntity(blockEntity); .inventory().hotbar().addInventory().blockEntity(blockEntity);
slots.forEach(dataDrivenSlot -> dataDrivenSlot.add(builder)); slots.forEach(dataDrivenSlot -> dataDrivenSlot.add(builder));
@ -110,7 +110,7 @@ public class DataDrivenBEProvider extends BlockEntityType<DataDrivenBEProvider.D
return instantiate(); return instantiate();
} }
public static class DataDrivenBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public static class DataDrivenBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
private final DataDrivenBEProvider provider; private final DataDrivenBEProvider provider;
@ -126,8 +126,8 @@ public class DataDrivenBEProvider extends BlockEntityType<DataDrivenBEProvider.D
} }
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return provider.createContainer(this,syncID, player); return provider.createScreenHandler(this,syncID, player);
} }
public DataDrivenBEProvider getProvider() { public DataDrivenBEProvider getProvider() {

View file

@ -25,17 +25,17 @@
package techreborn.blockentity.data; package techreborn.blockentity.data;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
public class DataDrivenGui extends GuiBase<BuiltContainer> { public class DataDrivenGui extends GuiBase<BuiltScreenHandler> {
private final DataDrivenBEProvider provider; private final DataDrivenBEProvider provider;
private final DataDrivenBEProvider.DataDrivenBlockEntity blockEntity; private final DataDrivenBEProvider.DataDrivenBlockEntity blockEntity;
public DataDrivenGui(int syncID, final PlayerEntity player, final DataDrivenBEProvider.DataDrivenBlockEntity blockEntity) { public DataDrivenGui(int syncID, final PlayerEntity player, final DataDrivenBEProvider.DataDrivenBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
this.provider = blockEntity.getProvider(); this.provider = blockEntity.getProvider();
} }

View file

@ -30,7 +30,7 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.minecraft.util.JsonHelper; import net.minecraft.util.JsonHelper;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import reborncore.client.containerBuilder.builder.ContainerBlockEntityInventoryBuilder; import reborncore.client.screen.builder.BlockEntityScreenHandlerBuilder;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.util.serialization.SerializationUtil; import reborncore.common.util.serialization.SerializationUtil;
@ -77,7 +77,7 @@ public class DataDrivenSlot {
return type; return type;
} }
public void add(ContainerBlockEntityInventoryBuilder inventoryBuilder){ public void add(BlockEntityScreenHandlerBuilder inventoryBuilder){
type.getSlotBiConsumer().accept(inventoryBuilder, this); type.getSlotBiConsumer().accept(inventoryBuilder, this);
} }

View file

@ -24,7 +24,7 @@
package techreborn.blockentity.data; package techreborn.blockentity.data;
import reborncore.client.containerBuilder.builder.ContainerBlockEntityInventoryBuilder; import reborncore.client.screen.builder.BlockEntityScreenHandlerBuilder;
import java.util.Arrays; import java.util.Arrays;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
@ -48,13 +48,13 @@ public enum SlotType {
.orElse(null); .orElse(null);
} }
private BiConsumer<ContainerBlockEntityInventoryBuilder, DataDrivenSlot> slotBiConsumer; private BiConsumer<BlockEntityScreenHandlerBuilder, DataDrivenSlot> slotBiConsumer;
SlotType(BiConsumer<ContainerBlockEntityInventoryBuilder, DataDrivenSlot> slotBiConsumer) { SlotType(BiConsumer<BlockEntityScreenHandlerBuilder, DataDrivenSlot> slotBiConsumer) {
this.slotBiConsumer = slotBiConsumer; this.slotBiConsumer = slotBiConsumer;
} }
public BiConsumer<ContainerBlockEntityInventoryBuilder, DataDrivenSlot> getSlotBiConsumer() { public BiConsumer<BlockEntityScreenHandlerBuilder, DataDrivenSlot> getSlotBiConsumer() {
return slotBiConsumer; return slotBiConsumer;
} }
} }

View file

@ -26,16 +26,16 @@ package techreborn.blockentity.generator;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import techreborn.api.generator.EFluidGenerator; import techreborn.api.generator.EFluidGenerator;
import techreborn.config.TechRebornConfig; import techreborn.config.TechRebornConfig;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class PlasmaGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { public class PlasmaGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements BuiltScreenHandlerProvider {
public PlasmaGeneratorBlockEntity() { public PlasmaGeneratorBlockEntity() {
super(TRBlockEntities.PLASMA_GENERATOR, EFluidGenerator.PLASMA, "PlasmaGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.plasmaGeneratorEnergyPerTick); super(TRBlockEntities.PLASMA_GENERATOR, EFluidGenerator.PLASMA, "PlasmaGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.plasmaGeneratorEnergyPerTick);
@ -57,8 +57,8 @@ public class PlasmaGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity im
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("plasmagenerator").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("plasmagenerator").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.sync(this::getTankAmount, this::setTankAmount) .sync(this::getTankAmount, this::setTankAmount)

View file

@ -33,9 +33,9 @@ import net.minecraft.text.Text;
import net.minecraft.util.Formatting; import net.minecraft.util.Formatting;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.PowerSystem;
@ -48,7 +48,7 @@ import techreborn.init.TRContent.SolarPanels;
import java.util.List; import java.util.List;
public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, IContainerProvider { public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, BuiltScreenHandlerProvider {
// State ZEROGEN: No exposure to sun // State ZEROGEN: No exposure to sun
@ -251,8 +251,8 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("solar_panel").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("solar_panel").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).syncEnergyValue() .blockEntity(this).syncEnergyValue()
.sync(this::getSunState, this::setSunState) .sync(this::getSunState, this::setSunState)
.addInventory().create(this, syncID); .addInventory().create(this, syncID);

View file

@ -26,9 +26,9 @@ package techreborn.blockentity.generator.advanced;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import techreborn.api.generator.EFluidGenerator; import techreborn.api.generator.EFluidGenerator;
import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity;
@ -36,7 +36,7 @@ import techreborn.config.TechRebornConfig;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class DieselGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { public class DieselGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements BuiltScreenHandlerProvider {
public DieselGeneratorBlockEntity() { public DieselGeneratorBlockEntity() {
super(TRBlockEntities.DIESEL_GENERATOR, EFluidGenerator.DIESEL, "DieselGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.dieselGeneratorEnergyPerTick); super(TRBlockEntities.DIESEL_GENERATOR, EFluidGenerator.DIESEL, "DieselGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.dieselGeneratorEnergyPerTick);
@ -58,8 +58,8 @@ public class DieselGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity im
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("dieselgenerator").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("dieselgenerator").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.sync(this::getTankAmount, this::setTankAmount) .sync(this::getTankAmount, this::setTankAmount)

View file

@ -26,9 +26,9 @@ package techreborn.blockentity.generator.advanced;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import techreborn.api.generator.EFluidGenerator; import techreborn.api.generator.EFluidGenerator;
import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity;
@ -36,7 +36,7 @@ import techreborn.config.TechRebornConfig;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class GasTurbineBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { public class GasTurbineBlockEntity extends BaseFluidGeneratorBlockEntity implements BuiltScreenHandlerProvider {
public GasTurbineBlockEntity() { public GasTurbineBlockEntity() {
super(TRBlockEntities.GAS_TURBINE, EFluidGenerator.GAS, "GasTurbineBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.gasTurbineEnergyPerTick); super(TRBlockEntities.GAS_TURBINE, EFluidGenerator.GAS, "GasTurbineBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.gasTurbineEnergyPerTick);
@ -58,8 +58,8 @@ public class GasTurbineBlockEntity extends BaseFluidGeneratorBlockEntity impleme
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("gasturbine").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("gasturbine").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.sync(this::getTankAmount, this::setTankAmount) .sync(this::getTankAmount, this::setTankAmount)

View file

@ -26,9 +26,9 @@ package techreborn.blockentity.generator.advanced;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import techreborn.api.generator.EFluidGenerator; import techreborn.api.generator.EFluidGenerator;
import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity;
@ -36,7 +36,7 @@ import techreborn.config.TechRebornConfig;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class SemiFluidGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { public class SemiFluidGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements BuiltScreenHandlerProvider {
public SemiFluidGeneratorBlockEntity() { public SemiFluidGeneratorBlockEntity() {
super(TRBlockEntities.SEMI_FLUID_GENERATOR, EFluidGenerator.SEMIFLUID, "SemiFluidGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.semiFluidGeneratorEnergyPerTick); super(TRBlockEntities.SEMI_FLUID_GENERATOR, EFluidGenerator.SEMIFLUID, "SemiFluidGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.semiFluidGeneratorEnergyPerTick);
@ -58,8 +58,8 @@ public class SemiFluidGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("semifluidgenerator").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("semifluidgenerator").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.sync(this::getTankAmount, this::setTankAmount) .sync(this::getTankAmount, this::setTankAmount)

View file

@ -26,9 +26,9 @@ package techreborn.blockentity.generator.advanced;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import techreborn.api.generator.EFluidGenerator; import techreborn.api.generator.EFluidGenerator;
import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity;
@ -36,7 +36,7 @@ import techreborn.config.TechRebornConfig;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class ThermalGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { public class ThermalGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements BuiltScreenHandlerProvider {
public ThermalGeneratorBlockEntity() { public ThermalGeneratorBlockEntity() {
super(TRBlockEntities.THERMAL_GEN, EFluidGenerator.THERMAL, "ThermalGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.thermalGeneratorEnergyPerTick); super(TRBlockEntities.THERMAL_GEN, EFluidGenerator.THERMAL, "ThermalGeneratorBlockEntity", FluidValue.BUCKET.multiply(10), TechRebornConfig.thermalGeneratorEnergyPerTick);
@ -58,8 +58,8 @@ public class ThermalGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity i
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("thermalgenerator").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("thermalgenerator").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .sync(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.sync(this::getTankAmount, this::setTankAmount) .sync(this::getTankAmount, this::setTankAmount)

View file

@ -34,9 +34,9 @@ import net.minecraft.item.Items;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -47,7 +47,7 @@ import techreborn.init.TRContent;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.Map; import java.util.Map;
public class SolidFuelGeneratorBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { public class SolidFuelGeneratorBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public RebornInventory<SolidFuelGeneratorBlockEntity> inventory = new RebornInventory<>(2, "SolidFuelGeneratorBlockEntity", 64, this); public RebornInventory<SolidFuelGeneratorBlockEntity> inventory = new RebornInventory<>(2, "SolidFuelGeneratorBlockEntity", 64, this);
public int fuelSlot = 0; public int fuelSlot = 0;
@ -181,8 +181,8 @@ public class SolidFuelGeneratorBlockEntity extends PowerAcceptorBlockEntity impl
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("generator").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("generator").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).fuelSlot(0, 80, 54).energySlot(1, 8, 72).syncEnergyValue() .blockEntity(this).fuelSlot(0, 80, 54).energySlot(1, 8, 72).syncEnergyValue()
.sync(this::getBurnTime, this::setBurnTime) .sync(this::getBurnTime, this::setBurnTime)
.sync(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this, syncID); .sync(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this, syncID);

View file

@ -26,9 +26,9 @@ package techreborn.blockentity.machine.iron;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.ingredient.RebornIngredient; import reborncore.common.crafting.ingredient.RebornIngredient;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class IronAlloyFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements IContainerProvider { public class IronAlloyFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements BuiltScreenHandlerProvider {
int input1 = 0; int input1 = 0;
int input2 = 1; int input2 = 1;
@ -125,8 +125,8 @@ public class IronAlloyFurnaceBlockEntity extends AbstractIronMachineBlockEntity
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("alloyfurnace").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("alloyfurnace").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.slot(0, 47, 17) .slot(0, 47, 17)
.slot(1, 65, 17) .slot(1, 65, 17)

View file

@ -31,9 +31,9 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.recipe.RecipeType; import net.minecraft.recipe.RecipeType;
import net.minecraft.recipe.SmeltingRecipe; import net.minecraft.recipe.SmeltingRecipe;
import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
@ -41,7 +41,7 @@ import techreborn.utils.RecipeUtils;
import java.util.Optional; import java.util.Optional;
public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements IContainerProvider { public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements BuiltScreenHandlerProvider {
int inputSlot = 0; int inputSlot = 0;
int outputSlot = 1; int outputSlot = 1;
@ -152,8 +152,8 @@ public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity imple
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("ironfurnace").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("ironfurnace").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.fuelSlot(2, 56, 53).slot(0, 56, 17).outputSlot(1, 116, 35) .fuelSlot(2, 56, 53).slot(0, 56, 17).outputSlot(1, 116, 35)
.sync(this::getBurnTime, this::setBurnTime) .sync(this::getBurnTime, this::setBurnTime)

View file

@ -29,9 +29,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import team.reborn.energy.Energy; import team.reborn.energy.Energy;
@ -40,7 +40,7 @@ import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class ChargeOMatBlockEntity extends PowerAcceptorBlockEntity public class ChargeOMatBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public RebornInventory<ChargeOMatBlockEntity> inventory = new RebornInventory<>(6, "ChargeOMatBlockEntity", 64, this); public RebornInventory<ChargeOMatBlockEntity> inventory = new RebornInventory<>(6, "ChargeOMatBlockEntity", 64, this);
@ -115,8 +115,8 @@ public class ChargeOMatBlockEntity extends PowerAcceptorBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("chargebench").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("chargebench").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).energySlot(0, 62, 25).energySlot(1, 98, 25).energySlot(2, 62, 45).energySlot(3, 98, 45) .blockEntity(this).energySlot(0, 62, 25).energySlot(1, 98, 25).energySlot(2, 62, 45).energySlot(3, 98, 45)
.energySlot(4, 62, 65).energySlot(5, 98, 65).syncEnergyValue().addInventory().create(this, syncID); .energySlot(4, 62, 65).energySlot(5, 98, 65).syncEnergyValue().addInventory().create(this, syncID);
} }

View file

@ -5,12 +5,12 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.Inventory; import net.minecraft.inventory.Inventory;
import reborncore.api.IListInfoProvider; import reborncore.api.IListInfoProvider;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.blockentity.MachineBaseBlockEntity;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
public class DrainBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IListInfoProvider, IContainerProvider { public class DrainBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IListInfoProvider, BuiltScreenHandlerProvider {
public DrainBlockEntity(){ public DrainBlockEntity(){
this(TRBlockEntities.DRAIN); this(TRBlockEntities.DRAIN);
@ -26,7 +26,7 @@ public class DrainBlockEntity extends MachineBaseBlockEntity implements Inventor
} }
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return null; return null;
} }
} }

View file

@ -27,9 +27,9 @@ package techreborn.blockentity.machine.multiblock;
import net.minecraft.block.Material; import net.minecraft.block.Material;
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.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipe;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -39,7 +39,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class DistillationTowerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class DistillationTowerBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public MultiblockChecker multiblockChecker; public MultiblockChecker multiblockChecker;
@ -79,8 +79,8 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("Distillationtower").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("Distillationtower").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 35, 27).slot(1, 35, 47).outputSlot(2, 79, 37).outputSlot(3, 99, 37) .blockEntity(this).slot(0, 35, 27).slot(1, 35, 47).outputSlot(2, 79, 37).outputSlot(3, 99, 37)
.outputSlot(4, 119, 37).outputSlot(5, 139, 37).energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue() .outputSlot(4, 119, 37).outputSlot(5, 139, 37).energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue()
.addInventory().create(this, syncID); .addInventory().create(this, syncID);

View file

@ -27,9 +27,9 @@ package techreborn.blockentity.machine.multiblock;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.IInventoryAccess; import reborncore.common.util.IInventoryAccess;
@ -48,7 +48,7 @@ import javax.annotation.Nullable;
* @author drcrazy * @author drcrazy
* *
*/ */
public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public MultiblockChecker multiblockChecker; public MultiblockChecker multiblockChecker;
public static final FluidValue TANK_CAPACITY = FluidValue.BUCKET.multiply(16); public static final FluidValue TANK_CAPACITY = FluidValue.BUCKET.multiply(16);
@ -129,8 +129,8 @@ public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implem
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return new ContainerBuilder("fluidreplicator").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("fluidreplicator").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).fluidSlot(1, 124, 35).filterSlot(0, 55, 45, stack -> stack.isItemEqualIgnoreDamage(TRContent.Parts.UU_MATTER.getStack())) .blockEntity(this).fluidSlot(1, 124, 35).filterSlot(0, 55, 45, stack -> stack.isItemEqualIgnoreDamage(TRContent.Parts.UU_MATTER.getStack()))
.outputSlot(2, 124, 55).energySlot(3, 8, 72).sync(tank).syncEnergyValue().syncCrafterValue().addInventory() .outputSlot(2, 124, 55).energySlot(3, 8, 72).sync(tank).syncEnergyValue().syncCrafterValue().addInventory()
.create(this, syncID); .create(this, syncID);

View file

@ -32,9 +32,9 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.ingredient.RebornIngredient; import reborncore.common.crafting.ingredient.RebornIngredient;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
@ -50,7 +50,7 @@ import techreborn.init.TRContent;
import java.util.List; import java.util.List;
public class FusionControlComputerBlockEntity extends PowerAcceptorBlockEntity public class FusionControlComputerBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public RebornInventory<FusionControlComputerBlockEntity> inventory; public RebornInventory<FusionControlComputerBlockEntity> inventory;
@ -397,8 +397,8 @@ public class FusionControlComputerBlockEntity extends PowerAcceptorBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("fusionreactor").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("fusionreactor").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).slot(0, 34, 47).slot(1, 126, 47).outputSlot(2, 80, 47).syncEnergyValue() .addInventory().blockEntity(this).slot(0, 34, 47).slot(1, 126, 47).outputSlot(2, 80, 47).syncEnergyValue()
.sync(this::getCoilStatus, this::setCoilStatus) .sync(this::getCoilStatus, this::setCoilStatus)
.sync(this::getCrafingTickTime, this::setCrafingTickTime) .sync(this::getCrafingTickTime, this::setCrafingTickTime)

View file

@ -26,9 +26,9 @@ package techreborn.blockentity.machine.multiblock;
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.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipe;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -38,7 +38,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public MultiblockChecker multiblockChecker; public MultiblockChecker multiblockChecker;
@ -72,8 +72,8 @@ public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity im
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("implosioncompressor").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("implosioncompressor").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 92, 36).outputSlot(3, 110, 36) .blockEntity(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 92, 36).outputSlot(3, 110, 36)
.energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); .energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
} }

View file

@ -29,9 +29,9 @@ import net.minecraft.block.entity.BlockEntity;
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 net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.multiblock.IMultiblockPart; import reborncore.common.multiblock.IMultiblockPart;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -44,7 +44,7 @@ import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.multiblocks.MultiBlockCasing; import techreborn.multiblocks.MultiBlockCasing;
public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public MultiblockChecker multiblockChecker; public MultiblockChecker multiblockChecker;
private int cachedHeat; private int cachedHeat;
@ -129,8 +129,8 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("blastfurnace").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("blastfurnace").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 93, 37).outputSlot(3, 113, 37) .blockEntity(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 93, 37).outputSlot(3, 113, 37)
.energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue() .energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue()
.sync(this::getHeat, this::setHeat).addInventory().create(this, syncID); .sync(this::getHeat, this::setHeat).addInventory().create(this, syncID);

View file

@ -31,9 +31,9 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
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.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -47,7 +47,7 @@ import techreborn.utils.FluidUtils;
import javax.annotation.Nullable; import javax.annotation.Nullable;
public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity implements IContainerProvider{ public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public static final FluidValue TANK_CAPACITY = FluidValue.BUCKET.multiply(16); public static final FluidValue TANK_CAPACITY = FluidValue.BUCKET.multiply(16);
public Tank tank; public Tank tank;
@ -121,9 +121,9 @@ public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity impl
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
// fluidSlot first to support automation and shift-click // fluidSlot first to support automation and shift-click
return new ContainerBuilder("industrialgrinder").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("industrialgrinder").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).fluidSlot(1, 34, 35).slot(0, 84, 43).outputSlot(2, 126, 18).outputSlot(3, 126, 36) .blockEntity(this).fluidSlot(1, 34, 35).slot(0, 84, 43).outputSlot(2, 126, 18).outputSlot(3, 126, 36)
.outputSlot(4, 126, 54).outputSlot(5, 126, 72).outputSlot(6, 34, 55).energySlot(7, 8, 72) .outputSlot(4, 126, 54).outputSlot(5, 126, 72).outputSlot(6, 34, 55).energySlot(7, 8, 72)
.sync(tank).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); .sync(tank).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);

View file

@ -31,9 +31,9 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
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.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -47,7 +47,7 @@ import techreborn.utils.FluidUtils;
import javax.annotation.Nullable; import javax.annotation.Nullable;
public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public static final FluidValue TANK_CAPACITY = FluidValue.BUCKET.multiply(16); public static final FluidValue TANK_CAPACITY = FluidValue.BUCKET.multiply(16);
public Tank tank; public Tank tank;
@ -123,8 +123,8 @@ public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity impl
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("industrialsawmill").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("industrialsawmill").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).fluidSlot(1, 34, 35).slot(0, 84, 43).outputSlot(2, 126, 25).outputSlot(3, 126, 43) .blockEntity(this).fluidSlot(1, 34, 35).slot(0, 84, 43).outputSlot(2, 126, 25).outputSlot(3, 126, 43)
.outputSlot(4, 126, 61).outputSlot(5, 34, 55).energySlot(6, 8, 72).sync(tank).syncEnergyValue().syncCrafterValue() .outputSlot(4, 126, 61).outputSlot(5, 34, 55).energySlot(6, 8, 72).sync(tank).syncEnergyValue().syncCrafterValue()
.addInventory().create(this, syncID); .addInventory().create(this, syncID);

View file

@ -27,9 +27,9 @@ package techreborn.blockentity.machine.multiblock;
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 net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
@ -38,7 +38,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public MultiblockChecker multiblockChecker; public MultiblockChecker multiblockChecker;
@ -69,8 +69,8 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("vacuumfreezer").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("vacuumfreezer").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() .blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue()
.syncCrafterValue().addInventory().create(this, syncID); .syncCrafterValue().addInventory().create(this, syncID);
} }

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class AlloySmelterBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class AlloySmelterBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public AlloySmelterBlockEntity() { public AlloySmelterBlockEntity() {
super(TRBlockEntities.ALLOY_SMELTER, "AlloySmelter", TechRebornConfig.alloySmelterMaxInput, TechRebornConfig.alloySmelterMaxEnergy, TRContent.Machine.ALLOY_SMELTER.block, 3); super(TRBlockEntities.ALLOY_SMELTER, "AlloySmelter", TechRebornConfig.alloySmelterMaxInput, TechRebornConfig.alloySmelterMaxEnergy, TRContent.Machine.ALLOY_SMELTER.block, 3);
@ -48,8 +48,8 @@ public class AlloySmelterBlockEntity extends GenericMachineBlockEntity implement
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("alloysmelter").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("alloysmelter").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.slot(0, 34, 47) .slot(0, 34, 47)
.slot(1, 126, 47) .slot(1, 126, 47)

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class AssemblingMachineBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class AssemblingMachineBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public AssemblingMachineBlockEntity() { public AssemblingMachineBlockEntity() {
super(TRBlockEntities.ASSEMBLY_MACHINE, "AssemblingMachine", TechRebornConfig.assemblingMachineMaxInput, TechRebornConfig.assemblingMachineMaxEnergy, TRContent.Machine.ASSEMBLY_MACHINE.block, 3); super(TRBlockEntities.ASSEMBLY_MACHINE, "AssemblingMachine", TechRebornConfig.assemblingMachineMaxInput, TechRebornConfig.assemblingMachineMaxEnergy, TRContent.Machine.ASSEMBLY_MACHINE.block, 3);
@ -48,8 +48,8 @@ public class AssemblingMachineBlockEntity extends GenericMachineBlockEntity impl
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("assemblingmachine").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("assemblingmachine").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).slot(0, 55, 35).slot(1, 55, 55).outputSlot(2, 101, 45).energySlot(3, 8, 72) .addInventory().blockEntity(this).slot(0, 55, 35).slot(1, 55, 55).outputSlot(2, 101, 45).energySlot(3, 8, 72)
.syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); .syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
} }

View file

@ -30,7 +30,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.recipe.CraftingRecipe; import net.minecraft.recipe.CraftingRecipe;
import net.minecraft.recipe.Ingredient; import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.RecipeType; import net.minecraft.recipe.RecipeType;
import net.minecraft.screen.ScreenHandler; import net.minecraft.screen.ScreenHandler;
import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundCategory;
@ -39,12 +38,11 @@ import net.minecraft.util.math.Direction;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.recipes.ExtendedRecipeRemainder; import reborncore.common.recipes.ExtendedRecipeRemainder;
import reborncore.common.util.IInventoryAccess;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.config.TechRebornConfig; import techreborn.config.TechRebornConfig;
@ -63,7 +61,7 @@ import java.util.stream.Collectors;
* Created by modmuss50 on 20/06/2017. * Created by modmuss50 on 20/06/2017.
*/ */
public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public RebornInventory<AutoCraftingTableBlockEntity> inventory = new RebornInventory<>(11, "AutoCraftingTableBlockEntity", 64, this); public RebornInventory<AutoCraftingTableBlockEntity> inventory = new RebornInventory<>(11, "AutoCraftingTableBlockEntity", 64, this);
public int progress; public int progress;
@ -466,8 +464,8 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return new ContainerBuilder("autocraftingtable").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("autocraftingtable").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 28, 25).slot(1, 46, 25).slot(2, 64, 25).slot(3, 28, 43).slot(4, 46, 43) .blockEntity(this).slot(0, 28, 25).slot(1, 46, 25).slot(2, 64, 25).slot(3, 28, 43).slot(4, 46, 43)
.slot(5, 64, 43).slot(6, 28, 61).slot(7, 46, 61).slot(8, 64, 61).outputSlot(9, 145, 42) .slot(5, 64, 43).slot(6, 28, 61).slot(7, 46, 61).slot(8, 64, 61).outputSlot(9, 145, 42)
.outputSlot(10, 145, 70).syncEnergyValue().sync(this::getProgress, this::setProgress) .outputSlot(10, 145, 70).syncEnergyValue().sync(this::getProgress, this::setProgress)

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.config.TechRebornConfig; import techreborn.config.TechRebornConfig;
@ -36,7 +36,7 @@ import techreborn.init.TRContent;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
public class ChemicalReactorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class ChemicalReactorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public ChemicalReactorBlockEntity() { public ChemicalReactorBlockEntity() {
super(TRBlockEntities.CHEMICAL_REACTOR, "ChemicalReactor", TechRebornConfig.chemicalReactorMaxInput, TechRebornConfig.chemicalReactorMaxEnergy, TRContent.Machine.CHEMICAL_REACTOR.block, 3); super(TRBlockEntities.CHEMICAL_REACTOR, "ChemicalReactor", TechRebornConfig.chemicalReactorMaxInput, TechRebornConfig.chemicalReactorMaxEnergy, TRContent.Machine.CHEMICAL_REACTOR.block, 3);
@ -48,8 +48,8 @@ public class ChemicalReactorBlockEntity extends GenericMachineBlockEntity implem
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("chemicalreactor").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("chemicalreactor").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).slot(0, 34, 47).slot(1, 126, 47).outputSlot(2, 80, 47).energySlot(3, 8, 72) .addInventory().blockEntity(this).slot(0, 34, 47).slot(1, 126, 47).outputSlot(2, 80, 47).energySlot(3, 8, 72)
.syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); .syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
} }

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class CompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class CompressorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public CompressorBlockEntity() { public CompressorBlockEntity() {
super(TRBlockEntities.COMPRESSOR, "Compressor", TechRebornConfig.compressorMaxInput, TechRebornConfig.compressorMaxEnergy, TRContent.Machine.COMPRESSOR.block, 2); super(TRBlockEntities.COMPRESSOR, "Compressor", TechRebornConfig.compressorMaxInput, TechRebornConfig.compressorMaxEnergy, TRContent.Machine.COMPRESSOR.block, 2);
@ -48,8 +48,8 @@ public class CompressorBlockEntity extends GenericMachineBlockEntity implements
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("compressor").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("compressor").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() .blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue()
.syncCrafterValue().addInventory().create(this, syncID); .syncCrafterValue().addInventory().create(this, syncID);
} }

View file

@ -32,9 +32,9 @@ import net.minecraft.recipe.SmeltingRecipe;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
@ -47,7 +47,7 @@ import techreborn.init.TRContent;
import java.util.Optional; import java.util.Optional;
public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public RebornInventory<ElectricFurnaceBlockEntity> inventory = new RebornInventory<>(3, "ElectricFurnaceBlockEntity", 64, this); public RebornInventory<ElectricFurnaceBlockEntity> inventory = new RebornInventory<>(3, "ElectricFurnaceBlockEntity", 64, this);
int inputSlot = 0; int inputSlot = 0;
@ -269,8 +269,8 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("electricfurnace").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("electricfurnace").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() .blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue()
.sync(this::getCookTime, this::setCookTime).sync(this::getCookTimeTotal, this::setCookTimeTotal).addInventory().create(this, syncID); .sync(this::getCookTime, this::setCookTime).sync(this::getCookTimeTotal, this::setCookTimeTotal).addInventory().create(this, syncID);
} }

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class ExtractorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class ExtractorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public ExtractorBlockEntity() { public ExtractorBlockEntity() {
super(TRBlockEntities.EXTRACTOR, "Extractor", TechRebornConfig.extractorMaxInput, TechRebornConfig.extractorMaxEnergy, TRContent.Machine.EXTRACTOR.block, 2); super(TRBlockEntities.EXTRACTOR, "Extractor", TechRebornConfig.extractorMaxInput, TechRebornConfig.extractorMaxEnergy, TRContent.Machine.EXTRACTOR.block, 2);
@ -48,8 +48,8 @@ public class ExtractorBlockEntity extends GenericMachineBlockEntity implements I
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("extractor").player(player.inventory).inventory().hotbar().addInventory().blockEntity(this) return new ScreenHandlerBuilder("extractor").player(player.inventory).inventory().hotbar().addInventory().blockEntity(this)
.slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue() .slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue()
.addInventory().create(this, syncID); .addInventory().create(this, syncID);
} }

View file

@ -33,9 +33,9 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -49,7 +49,7 @@ import java.util.Collections;
import java.util.List; import java.util.List;
public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
private final RebornInventory<GreenhouseControllerBlockEntity> inventory = new RebornInventory<>(7, "GreenhouseControllerBlockEntity", 64, this); private final RebornInventory<GreenhouseControllerBlockEntity> inventory = new RebornInventory<>(7, "GreenhouseControllerBlockEntity", 64, this);
private BlockPos multiblockCenter; private BlockPos multiblockCenter;
@ -252,8 +252,8 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
} }
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return new ContainerBuilder("greenhousecontroller").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("greenhousecontroller").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this) .blockEntity(this)
.outputSlot(0, 30, 22).outputSlot(1, 48, 22) .outputSlot(0, 30, 22).outputSlot(1, 48, 22)
.outputSlot(2, 30, 40).outputSlot(3, 48, 40) .outputSlot(2, 30, 40).outputSlot(3, 48, 40)

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
@ -38,7 +38,7 @@ import techreborn.init.TRBlockEntities;
import techreborn.items.DynamicCellItem; import techreborn.items.DynamicCellItem;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public IndustrialElectrolyzerBlockEntity() { public IndustrialElectrolyzerBlockEntity() {
super(TRBlockEntities.INDUSTRIAL_ELECTROLYZER, "IndustrialElectrolyzer", TechRebornConfig.industrialElectrolyzerMaxInput, TechRebornConfig.industrialElectrolyzerMaxEnergy, TRContent.Machine.INDUSTRIAL_ELECTROLYZER.block, 6); super(TRBlockEntities.INDUSTRIAL_ELECTROLYZER, "IndustrialElectrolyzer", TechRebornConfig.industrialElectrolyzerMaxInput, TechRebornConfig.industrialElectrolyzerMaxEnergy, TRContent.Machine.INDUSTRIAL_ELECTROLYZER.block, 6);
@ -50,8 +50,8 @@ public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("industrialelectrolyzer").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("industrialelectrolyzer").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.filterSlot(1, 47, 72, stack -> ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true)) .filterSlot(1, 47, 72, stack -> ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true))
.filterSlot(0, 81, 72, stack -> !ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true)) .filterSlot(0, 81, 72, stack -> !ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true))

View file

@ -33,9 +33,9 @@ import net.minecraft.util.registry.Registry;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.IUpgrade; import reborncore.api.blockentity.IUpgrade;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blockentity.SlotConfiguration; import reborncore.common.blockentity.SlotConfiguration;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
@ -45,7 +45,7 @@ import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class RecyclerBlockEntity extends PowerAcceptorBlockEntity public class RecyclerBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider, SlotConfiguration.SlotFilter { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider, SlotConfiguration.SlotFilter {
private final RebornInventory<RecyclerBlockEntity> inventory = new RebornInventory<>(3, "RecyclerBlockEntity", 64, this); private final RebornInventory<RecyclerBlockEntity> inventory = new RebornInventory<>(3, "RecyclerBlockEntity", 64, this);
private final int cost = 2; private final int cost = 2;
@ -216,8 +216,8 @@ public class RecyclerBlockEntity extends PowerAcceptorBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return new ContainerBuilder("recycler").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("recycler").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 55, 45, RecyclerBlockEntity::canRecycle) .blockEntity(this).slot(0, 55, 45, RecyclerBlockEntity::canRecycle)
.outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() .outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue()
.sync(this::getProgress, this::setProgress).addInventory().create(this, syncID); .sync(this::getProgress, this::setProgress).addInventory().create(this, syncID);

View file

@ -35,9 +35,9 @@ import net.minecraft.world.World;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
@ -58,7 +58,7 @@ import java.util.stream.Collectors;
//TODO add tick and power bars. //TODO add tick and power bars.
public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public int[] craftingSlots = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; public int[] craftingSlots = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
private CraftingInventory craftCache; private CraftingInventory craftCache;
@ -385,8 +385,8 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("rollingmachine").player(player.inventory) return new ScreenHandlerBuilder("rollingmachine").player(player.inventory)
.inventory().hotbar() .inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.slot(0, 30, 22).slot(1, 48, 22).slot(2, 66, 22) .slot(0, 30, 22).slot(1, 48, 22).slot(2, 66, 22)

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.api.recipe.ScrapboxRecipeCrafter; import techreborn.api.recipe.ScrapboxRecipeCrafter;
import techreborn.config.TechRebornConfig; import techreborn.config.TechRebornConfig;
@ -35,7 +35,7 @@ import techreborn.init.TRContent;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public ScrapboxinatorBlockEntity() { public ScrapboxinatorBlockEntity() {
super(TRBlockEntities.SCRAPBOXINATOR, "Scrapboxinator", TechRebornConfig.scrapboxinatorMaxInput, TechRebornConfig.scrapboxinatorMaxEnergy, TRContent.Machine.SCRAPBOXINATOR.block, 2); super(TRBlockEntities.SCRAPBOXINATOR, "Scrapboxinator", TechRebornConfig.scrapboxinatorMaxInput, TechRebornConfig.scrapboxinatorMaxEnergy, TRContent.Machine.SCRAPBOXINATOR.block, 2);
@ -53,8 +53,8 @@ public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity impleme
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("scrapboxinator").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("scrapboxinator").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).filterSlot(0, 55, 45, stack -> stack.getItem() == TRContent.SCRAP_BOX).outputSlot(1, 101, 45) .blockEntity(this).filterSlot(0, 55, 45, stack -> stack.getItem() == TRContent.SCRAP_BOX).outputSlot(1, 101, 45)
.energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); .energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
} }

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class SoildCanningMachineBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class SoildCanningMachineBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public SoildCanningMachineBlockEntity() { public SoildCanningMachineBlockEntity() {
super(TRBlockEntities.SOLID_CANNING_MACHINE, "SolidCanningMachine", TechRebornConfig.solidCanningMachineMaxInput, TechRebornConfig.solidFuelGeneratorMaxEnergy, TRContent.Machine.SOLID_CANNING_MACHINE.block, 3); super(TRBlockEntities.SOLID_CANNING_MACHINE, "SolidCanningMachine", TechRebornConfig.solidCanningMachineMaxInput, TechRebornConfig.solidFuelGeneratorMaxEnergy, TRContent.Machine.SOLID_CANNING_MACHINE.block, 3);
@ -48,8 +48,8 @@ public class SoildCanningMachineBlockEntity extends GenericMachineBlockEntity im
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("solidcanningmachine").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("solidcanningmachine").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.slot(0, 34, 47) .slot(0, 34, 47)
.slot(1, 126, 47) .slot(1, 126, 47)

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.machine.tier1; package techreborn.blockentity.machine.tier1;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.blockentity.machine.GenericMachineBlockEntity; import techreborn.blockentity.machine.GenericMachineBlockEntity;
@ -35,7 +35,7 @@ import techreborn.init.ModRecipes;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class WireMillBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { public class WireMillBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
public WireMillBlockEntity() { public WireMillBlockEntity() {
super(TRBlockEntities.WIRE_MILL, "WireMill", 32, 1000, TRContent.Machine.WIRE_MILL.block, 2); super(TRBlockEntities.WIRE_MILL, "WireMill", 32, 1000, TRContent.Machine.WIRE_MILL.block, 2);
@ -47,8 +47,8 @@ public class WireMillBlockEntity extends GenericMachineBlockEntity implements IC
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("wiremill").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("wiremill").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.slot(0, 55, 45) .slot(0, 55, 45)
.outputSlot(1, 101, 45) .outputSlot(1, 101, 45)

View file

@ -36,9 +36,9 @@ import net.minecraft.world.World;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.blockentity.MachineBaseBlockEntity;
import reborncore.common.chunkloading.ChunkLoaderManager; import reborncore.common.chunkloading.ChunkLoaderManager;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -48,7 +48,7 @@ import techreborn.init.TRContent;
import javax.annotation.Nullable; import javax.annotation.Nullable;
public class ChunkLoaderBlockEntity extends MachineBaseBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { public class ChunkLoaderBlockEntity extends MachineBaseBlockEntity implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public RebornInventory<ChunkLoaderBlockEntity> inventory = new RebornInventory<>(0, "ChunkLoaderBlockEntity", 64, this); public RebornInventory<ChunkLoaderBlockEntity> inventory = new RebornInventory<>(0, "ChunkLoaderBlockEntity", 64, this);
private int radius; private int radius;
@ -164,8 +164,8 @@ public class ChunkLoaderBlockEntity extends MachineBaseBlockEntity implements IT
} }
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return new ContainerBuilder("chunkloader").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("chunkloader").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).sync(this::getRadius, this::setRadius).addInventory().create(this, syncID); .blockEntity(this).sync(this::getRadius, this::setRadius).addInventory().create(this, syncID);
} }

View file

@ -29,9 +29,9 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.LiteralText; import net.minecraft.text.LiteralText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import reborncore.api.IListInfoProvider; import reborncore.api.IListInfoProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.recipes.RecipeCrafter; import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
@ -44,7 +44,7 @@ import techreborn.items.DynamicCellItem;
import java.util.List; import java.util.List;
public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity implements IContainerProvider, IListInfoProvider { public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider, IListInfoProvider {
public IndustrialCentrifugeBlockEntity() { public IndustrialCentrifugeBlockEntity() {
super(TRBlockEntities.INDUSTRIAL_CENTRIFUGE, "IndustrialCentrifuge", TechRebornConfig.industrialCentrifugeMaxInput, TechRebornConfig.industrialCentrifugeMaxEnergy, TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block, 6); super(TRBlockEntities.INDUSTRIAL_CENTRIFUGE, "IndustrialCentrifuge", TechRebornConfig.industrialCentrifugeMaxInput, TechRebornConfig.industrialCentrifugeMaxEnergy, TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block, 6);
@ -56,8 +56,8 @@ public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity i
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("centrifuge").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("centrifuge").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.filterSlot(1, 40, 54, stack -> ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true)) .filterSlot(1, 40, 54, stack -> ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true))
.filterSlot(0, 40, 34, stack -> !ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true)) .filterSlot(0, 40, 34, stack -> !ItemUtils.isItemEqual(stack, DynamicCellItem.getEmptyCell(1), true, true))

View file

@ -29,9 +29,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -40,7 +40,7 @@ import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity
implements IToolDrop, InventoryProvider, IContainerProvider { implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
public RebornInventory<MatterFabricatorBlockEntity> inventory = new RebornInventory<>(12, "MatterFabricatorBlockEntity", 64, this); public RebornInventory<MatterFabricatorBlockEntity> inventory = new RebornInventory<>(12, "MatterFabricatorBlockEntity", 64, this);
private int amplifier = 0; private int amplifier = 0;
@ -196,8 +196,8 @@ public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return new ContainerBuilder("matterfabricator").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("matterfabricator").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 30, 20).slot(1, 50, 20).slot(2, 70, 20).slot(3, 90, 20).slot(4, 110, 20) .blockEntity(this).slot(0, 30, 20).slot(1, 50, 20).slot(2, 70, 20).slot(3, 90, 20).slot(4, 110, 20)
.slot(5, 130, 20).outputSlot(6, 40, 66).outputSlot(7, 60, 66).outputSlot(8, 80, 66) .slot(5, 130, 20).outputSlot(6, 40, 66).outputSlot(7, 60, 66).outputSlot(8, 80, 66)
.outputSlot(9, 100, 66).outputSlot(10, 120, 66).energySlot(11, 8, 72).syncEnergyValue() .outputSlot(9, 100, 66).outputSlot(10, 120, 66).energySlot(11, 8, 72).syncEnergyValue()

View file

@ -28,9 +28,9 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import reborncore.api.blockentity.IUpgrade; import reborncore.api.blockentity.IUpgrade;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import team.reborn.energy.EnergySide; import team.reborn.energy.EnergySide;
import team.reborn.energy.EnergyTier; import team.reborn.energy.EnergyTier;
@ -38,7 +38,7 @@ import techreborn.config.TechRebornConfig;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements BuiltScreenHandlerProvider {
public RebornInventory<AdjustableSUBlockEntity> inventory = new RebornInventory<>(4, "AdjustableSUBlockEntity", 64, this); public RebornInventory<AdjustableSUBlockEntity> inventory = new RebornInventory<>(4, "AdjustableSUBlockEntity", 64, this);
private int OUTPUT = 64; // The current output private int OUTPUT = 64; // The current output
@ -156,8 +156,8 @@ public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
return new ContainerBuilder("aesu").player(player.inventory).inventory().hotbar().armor() return new ScreenHandlerBuilder("aesu").player(player.inventory).inventory().hotbar().armor()
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45) .complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
.syncEnergyValue().sync(this::getCurrentOutput, this::setCurentOutput).addInventory().create(this, syncID); .syncEnergyValue().sync(this::getCurrentOutput, this::setCurentOutput).addInventory().create(this, syncID);
} }

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.storage.energy; package techreborn.blockentity.storage.energy;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import team.reborn.energy.EnergyTier; import team.reborn.energy.EnergyTier;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
@ -36,7 +36,7 @@ import techreborn.init.TRContent;
* Created by modmuss50 on 14/03/2016. * Created by modmuss50 on 14/03/2016.
* *
*/ */
public class HighVoltageSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { public class HighVoltageSUBlockEntity extends EnergyStorageBlockEntity implements BuiltScreenHandlerProvider {
/** /**
* MFSU should store 4M Energy with 512 E/t I/O * MFSU should store 4M Energy with 512 E/t I/O
@ -46,8 +46,8 @@ public class HighVoltageSUBlockEntity extends EnergyStorageBlockEntity implement
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("mfsu").player(player.inventory).inventory().hotbar().armor() return new ScreenHandlerBuilder("mfsu").player(player.inventory).inventory().hotbar().armor()
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45) .complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
.syncEnergyValue().addInventory().create(this, syncID); .syncEnergyValue().addInventory().create(this, syncID);
} }

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.storage.energy; package techreborn.blockentity.storage.energy;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import team.reborn.energy.EnergyTier; import team.reborn.energy.EnergyTier;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
@ -35,15 +35,15 @@ import techreborn.init.TRContent;
/** /**
* Created by modmuss50 on 14/03/2016. * Created by modmuss50 on 14/03/2016.
*/ */
public class LowVoltageSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { public class LowVoltageSUBlockEntity extends EnergyStorageBlockEntity implements BuiltScreenHandlerProvider {
public LowVoltageSUBlockEntity() { public LowVoltageSUBlockEntity() {
super(TRBlockEntities.LOW_VOLTAGE_SU, "BatBox", 2, TRContent.Machine.LOW_VOLTAGE_SU.block, EnergyTier.LOW, 40_000); super(TRBlockEntities.LOW_VOLTAGE_SU, "BatBox", 2, TRContent.Machine.LOW_VOLTAGE_SU.block, EnergyTier.LOW, 40_000);
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("batbox").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("batbox").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue().addInventory().create(this, syncID); .blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue().addInventory().create(this, syncID);
} }
} }

View file

@ -25,9 +25,9 @@
package techreborn.blockentity.storage.energy; package techreborn.blockentity.storage.energy;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import team.reborn.energy.EnergyTier; import team.reborn.energy.EnergyTier;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
@ -36,7 +36,7 @@ import techreborn.init.TRContent;
* Created by modmuss50 on 14/03/2016. * Created by modmuss50 on 14/03/2016.
* *
*/ */
public class MediumVoltageSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { public class MediumVoltageSUBlockEntity extends EnergyStorageBlockEntity implements BuiltScreenHandlerProvider {
/** /**
* MFE should store 300k energy with 128 E/t I/O * MFE should store 300k energy with 128 E/t I/O
@ -46,8 +46,8 @@ public class MediumVoltageSUBlockEntity extends EnergyStorageBlockEntity impleme
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("mfe").player(player.inventory).inventory().hotbar().armor() return new ScreenHandlerBuilder("mfe").player(player.inventory).inventory().hotbar().armor()
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45) .complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
.syncEnergyValue().addInventory().create(this, syncID); .syncEnergyValue().addInventory().create(this, syncID);
} }

View file

@ -27,9 +27,9 @@ package techreborn.blockentity.storage.energy.idsu;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import team.reborn.energy.EnergySide; import team.reborn.energy.EnergySide;
import team.reborn.energy.EnergyTier; import team.reborn.energy.EnergyTier;
import techreborn.blockentity.storage.energy.EnergyStorageBlockEntity; import techreborn.blockentity.storage.energy.EnergyStorageBlockEntity;
@ -37,7 +37,7 @@ import techreborn.config.TechRebornConfig;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity implements BuiltScreenHandlerProvider {
public String ownerUdid; public String ownerUdid;
@ -117,8 +117,8 @@ public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity impl
} }
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("idsu").player(player.inventory).inventory().hotbar().armor() return new ScreenHandlerBuilder("idsu").player(player.inventory).inventory().hotbar().armor()
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45) .complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
.syncEnergyValue().addInventory().create(this, syncID); .syncEnergyValue().addInventory().create(this, syncID);
} }

View file

@ -27,11 +27,10 @@ package techreborn.blockentity.storage.energy.lesu;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import team.reborn.energy.EnergyTier; import team.reborn.energy.EnergyTier;
import techreborn.blockentity.storage.energy.EnergyStorageBlockEntity; import techreborn.blockentity.storage.energy.EnergyStorageBlockEntity;
import techreborn.blocks.storage.energy.LapotronicSUBlock; import techreborn.blocks.storage.energy.LapotronicSUBlock;
@ -41,7 +40,7 @@ import techreborn.init.TRContent;
import java.util.ArrayList; import java.util.ArrayList;
public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider{ public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements BuiltScreenHandlerProvider {
private int connectedBlocks = 0; private int connectedBlocks = 0;
private ArrayList<LesuNetwork> countedNetworks = new ArrayList<>(); private ArrayList<LesuNetwork> countedNetworks = new ArrayList<>();
@ -127,8 +126,8 @@ public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("lesu").player(player.inventory).inventory().hotbar().armor().complete(8, 18) return new ScreenHandlerBuilder("lesu").player(player.inventory).inventory().hotbar().armor().complete(8, 18)
.addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue() .addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue()
.sync(this::getConnectedBlocksNum, this::setConnectedBlocksNum).addInventory().create(this, syncID); .sync(this::getConnectedBlocksNum, this::setConnectedBlocksNum).addInventory().create(this, syncID);
} }

View file

@ -36,9 +36,9 @@ import org.apache.commons.lang3.text.WordUtils;
import reborncore.api.IListInfoProvider; import reborncore.api.IListInfoProvider;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.blockentity.MachineBaseBlockEntity;
import reborncore.common.fluid.FluidUtil; import reborncore.common.fluid.FluidUtil;
import reborncore.common.fluid.FluidValue; import reborncore.common.fluid.FluidValue;
@ -52,7 +52,7 @@ import techreborn.utils.FluidUtils;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.List; import java.util.List;
public class TankUnitBaseBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IToolDrop, IListInfoProvider, IContainerProvider { public class TankUnitBaseBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IToolDrop, IListInfoProvider, BuiltScreenHandlerProvider {
protected Tank tank; protected Tank tank;
protected RebornInventory<TankUnitBaseBlockEntity> inventory = new RebornInventory<>(2, "TankInventory", 64, this); protected RebornInventory<TankUnitBaseBlockEntity> inventory = new RebornInventory<>(2, "TankInventory", 64, this);
@ -164,8 +164,8 @@ public class TankUnitBaseBlockEntity extends MachineBaseBlockEntity implements I
// IContainerProvider // IContainerProvider
@Override @Override
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("tank").player(player.inventory).inventory().hotbar() return new ScreenHandlerBuilder("tank").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this).fluidSlot(0, 100, 53).outputSlot(1, 140, 53) .addInventory().blockEntity(this).fluidSlot(0, 100, 53).outputSlot(1, 140, 53)
.sync(tank).addInventory().create(this, syncID); .sync(tank).addInventory().create(this, syncID);
} }

View file

@ -38,9 +38,9 @@ import net.minecraft.world.World;
import reborncore.api.IListInfoProvider; import reborncore.api.IListInfoProvider;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider; import reborncore.api.blockentity.InventoryProvider;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.client.screen.builder.ScreenHandlerBuilder;
import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.blockentity.MachineBaseBlockEntity;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
@ -52,7 +52,7 @@ import techreborn.init.TRContent;
import java.util.List; import java.util.List;
public class StorageUnitBaseBlockEntity extends MachineBaseBlockEntity public class StorageUnitBaseBlockEntity extends MachineBaseBlockEntity
implements InventoryProvider, IToolDrop, IListInfoProvider, IContainerProvider { implements InventoryProvider, IToolDrop, IListInfoProvider, BuiltScreenHandlerProvider {
// Inventory constants // Inventory constants
@ -377,8 +377,8 @@ public class StorageUnitBaseBlockEntity extends MachineBaseBlockEntity
// Inventory gets dropped automatically // Inventory gets dropped automatically
} }
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
return new ContainerBuilder("chest").player(player.inventory).inventory().hotbar().addInventory() return new ScreenHandlerBuilder("chest").player(player.inventory).inventory().hotbar().addInventory()
.blockEntity(this).slot(0, 100, 53).outputSlot(1, 140, 53).addInventory().create(this, syncID); .blockEntity(this).slot(0, 100, 53).outputSlot(1, 140, 53).addInventory().create(this, syncID);
} }

View file

@ -33,7 +33,7 @@ import net.minecraft.client.gui.screen.ingame.ScreenWithHandler;
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.RebornCore; import reborncore.RebornCore;
import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.screen.BuiltScreenHandlerProvider;
import techreborn.blockentity.data.DataDrivenBEProvider; import techreborn.blockentity.data.DataDrivenBEProvider;
import techreborn.blockentity.data.DataDrivenGui; import techreborn.blockentity.data.DataDrivenGui;
import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity;
@ -67,7 +67,7 @@ public class GuiHandler {
EGui.stream().forEach(gui -> ContainerProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> { EGui.stream().forEach(gui -> ContainerProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> {
final BlockEntity blockEntity = playerEntity.world.getBlockEntity(packetByteBuf.readBlockPos()); final BlockEntity blockEntity = playerEntity.world.getBlockEntity(packetByteBuf.readBlockPos());
return ((IContainerProvider) blockEntity).createContainer(syncID, playerEntity); return ((BuiltScreenHandlerProvider) blockEntity).createScreenHandler(syncID, playerEntity);
})); }));
RebornCore.clientOnly(() -> () -> EGui.stream().forEach(gui -> ScreenProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> getClientGuiElement(EGui.byID(identifier), playerEntity, packetByteBuf.readBlockPos(), syncID)))); RebornCore.clientOnly(() -> () -> EGui.stream().forEach(gui -> ScreenProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> getClientGuiElement(EGui.byID(identifier), playerEntity, packetByteBuf.readBlockPos(), syncID))));

View file

@ -27,7 +27,7 @@ package techreborn.client.gui;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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.client.gui.builder.widget.GuiButtonUpDown.UpDownButtonType; import reborncore.client.gui.builder.widget.GuiButtonUpDown.UpDownButtonType;
@ -36,12 +36,12 @@ import reborncore.common.powerSystem.PowerSystem;
import techreborn.blockentity.storage.energy.AdjustableSUBlockEntity; import techreborn.blockentity.storage.energy.AdjustableSUBlockEntity;
import techreborn.packets.ServerboundPackets; import techreborn.packets.ServerboundPackets;
public class GuiAESU extends GuiBase<BuiltContainer> { public class GuiAESU extends GuiBase<BuiltScreenHandler> {
AdjustableSUBlockEntity blockEntity; AdjustableSUBlockEntity blockEntity;
public GuiAESU(int syncID, final PlayerEntity player, final AdjustableSUBlockEntity aesu) { public GuiAESU(int syncID, final PlayerEntity player, final AdjustableSUBlockEntity aesu) {
super(player, aesu, aesu.createContainer(syncID, player)); super(player, aesu, aesu.createScreenHandler(syncID, player));
this.blockEntity = aesu; this.blockEntity = aesu;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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.iron.IronAlloyFurnaceBlockEntity; import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity;
public class GuiAlloyFurnace extends GuiBase<BuiltContainer> { public class GuiAlloyFurnace extends GuiBase<BuiltScreenHandler> {
IronAlloyFurnaceBlockEntity blockEntity; IronAlloyFurnaceBlockEntity blockEntity;
public GuiAlloyFurnace(int syncID, PlayerEntity player, IronAlloyFurnaceBlockEntity alloyFurnace) { public GuiAlloyFurnace(int syncID, PlayerEntity player, IronAlloyFurnaceBlockEntity alloyFurnace) {
super(player, alloyFurnace, alloyFurnace.createContainer(syncID, player)); super(player, alloyFurnace, alloyFurnace.createScreenHandler(syncID, player));
this.blockEntity = alloyFurnace; this.blockEntity = alloyFurnace;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiAlloySmelter extends GuiBase<BuiltScreenHandler> {
AlloySmelterBlockEntity blockEntity; AlloySmelterBlockEntity blockEntity;
public GuiAlloySmelter(int syncID, final PlayerEntity player, final AlloySmelterBlockEntity blockEntity) { public GuiAlloySmelter(int syncID, final PlayerEntity player, final AlloySmelterBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiAssemblingMachine extends GuiBase<BuiltScreenHandler> {
AssemblingMachineBlockEntity blockEntity; AssemblingMachineBlockEntity blockEntity;
public GuiAssemblingMachine(int syncID, final PlayerEntity player, final AssemblingMachineBlockEntity blockEntity) { public GuiAssemblingMachine(int syncID, final PlayerEntity player, final AssemblingMachineBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -29,7 +29,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.recipe.CraftingRecipe; import net.minecraft.recipe.CraftingRecipe;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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;
@ -39,14 +39,14 @@ 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<BuiltContainer> { public class GuiAutoCrafting extends GuiBase<BuiltScreenHandler> {
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;
AutoCraftingTableBlockEntity blockEntityAutoCraftingTable; AutoCraftingTableBlockEntity blockEntityAutoCraftingTable;
public GuiAutoCrafting(int syncID, PlayerEntity player, AutoCraftingTableBlockEntity blockEntity) { public GuiAutoCrafting(int syncID, PlayerEntity player, AutoCraftingTableBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntityAutoCraftingTable = blockEntity; this.blockEntityAutoCraftingTable = blockEntity;
} }

View file

@ -26,17 +26,17 @@ package techreborn.client.gui;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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.energy.LowVoltageSUBlockEntity; import techreborn.blockentity.storage.energy.LowVoltageSUBlockEntity;
public class GuiBatbox extends GuiBase<BuiltContainer> { public class GuiBatbox extends GuiBase<BuiltScreenHandler> {
LowVoltageSUBlockEntity blockEntity; LowVoltageSUBlockEntity blockEntity;
public GuiBatbox(int syncID, final PlayerEntity player, final LowVoltageSUBlockEntity blockEntity) { public GuiBatbox(int syncID, final PlayerEntity player, final LowVoltageSUBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -29,7 +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 net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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,13 +37,13 @@ import reborncore.client.multiblock.Multiblock;
import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity; import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class GuiBlastFurnace extends GuiBase<BuiltContainer> { public class GuiBlastFurnace extends GuiBase<BuiltScreenHandler> {
public IndustrialBlastFurnaceBlockEntity blockEntity; public IndustrialBlastFurnaceBlockEntity blockEntity;
boolean hasMultiBlock; boolean hasMultiBlock;
public GuiBlastFurnace(int syncID, final PlayerEntity player, final IndustrialBlastFurnaceBlockEntity blockEntity) { public GuiBlastFurnace(int syncID, final PlayerEntity player, final IndustrialBlastFurnaceBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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.IndustrialCentrifugeBlockEntity; import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity;
public class GuiCentrifuge extends GuiBase<BuiltContainer> { public class GuiCentrifuge extends GuiBase<BuiltScreenHandler> {
IndustrialCentrifugeBlockEntity blockEntity; IndustrialCentrifugeBlockEntity blockEntity;
public GuiCentrifuge(int syncID, final PlayerEntity player, final IndustrialCentrifugeBlockEntity blockEntity) { public GuiCentrifuge(int syncID, final PlayerEntity player, final IndustrialCentrifugeBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,16 +25,16 @@
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.screen.builder.BuiltScreenHandler;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity; import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity;
public class GuiChargeBench extends GuiBase<BuiltContainer> { public class GuiChargeBench extends GuiBase<BuiltScreenHandler> {
ChargeOMatBlockEntity blockEntity; ChargeOMatBlockEntity blockEntity;
public GuiChargeBench(int syncID, final PlayerEntity player, final ChargeOMatBlockEntity blockEntity) { public GuiChargeBench(int syncID, final PlayerEntity player, final ChargeOMatBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiChemicalReactor extends GuiBase<BuiltScreenHandler> {
ChemicalReactorBlockEntity blockEntity; ChemicalReactorBlockEntity blockEntity;
public GuiChemicalReactor(int syncID, final PlayerEntity player, final ChemicalReactorBlockEntity blockEntity) { public GuiChemicalReactor(int syncID, final PlayerEntity player, final ChemicalReactorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -26,7 +26,7 @@ package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.ClientChunkManager; import reborncore.client.ClientChunkManager;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonSimple; import reborncore.client.gui.builder.widget.GuiButtonSimple;
import reborncore.client.gui.builder.widget.GuiButtonUpDown; import reborncore.client.gui.builder.widget.GuiButtonUpDown;
@ -35,12 +35,12 @@ import reborncore.common.network.NetworkManager;
import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity;
import techreborn.packets.ServerboundPackets; import techreborn.packets.ServerboundPackets;
public class GuiChunkLoader extends GuiBase<BuiltContainer> { public class GuiChunkLoader extends GuiBase<BuiltScreenHandler> {
ChunkLoaderBlockEntity blockEntity; ChunkLoaderBlockEntity blockEntity;
public GuiChunkLoader(int syncID, PlayerEntity player, ChunkLoaderBlockEntity blockEntity) { public GuiChunkLoader(int syncID, PlayerEntity player, ChunkLoaderBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiCompressor extends GuiBase<BuiltScreenHandler> {
CompressorBlockEntity blockEntity; CompressorBlockEntity blockEntity;
public GuiCompressor(int syncID, final PlayerEntity player, final CompressorBlockEntity blockEntity) { public GuiCompressor(int syncID, final PlayerEntity player, final CompressorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -27,18 +27,18 @@ 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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiDieselGenerator extends GuiBase<BuiltScreenHandler> {
DieselGeneratorBlockEntity blockEntity; DieselGeneratorBlockEntity blockEntity;
public GuiDieselGenerator(int syncID, final PlayerEntity player, final DieselGeneratorBlockEntity blockEntity) { public GuiDieselGenerator(int syncID, final PlayerEntity player, final DieselGeneratorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -29,7 +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 net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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,12 +37,12 @@ import reborncore.client.multiblock.Multiblock;
import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity; import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class GuiDistillationTower extends GuiBase<BuiltContainer> { public class GuiDistillationTower extends GuiBase<BuiltScreenHandler> {
public DistillationTowerBlockEntity blockEntity; public DistillationTowerBlockEntity blockEntity;
public GuiDistillationTower(int syncID, final PlayerEntity player, final DistillationTowerBlockEntity blockEntity) { public GuiDistillationTower(int syncID, final PlayerEntity player, final DistillationTowerBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiElectricFurnace extends GuiBase<BuiltScreenHandler> {
ElectricFurnaceBlockEntity blockEntity; ElectricFurnaceBlockEntity blockEntity;
public GuiElectricFurnace(int syncID, final PlayerEntity player, final ElectricFurnaceBlockEntity blockEntity) { public GuiElectricFurnace(int syncID, final PlayerEntity player, final ElectricFurnaceBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiExtractor extends GuiBase<BuiltScreenHandler> {
ExtractorBlockEntity blockEntity; ExtractorBlockEntity blockEntity;
public GuiExtractor(int syncID, final PlayerEntity player, final ExtractorBlockEntity blockEntity) { public GuiExtractor(int syncID, final PlayerEntity player, final ExtractorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -28,7 +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 net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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;
@ -40,12 +40,12 @@ import techreborn.init.TRContent;
* @author drcrazy * @author drcrazy
* *
*/ */
public class GuiFluidReplicator extends GuiBase<BuiltContainer> { public class GuiFluidReplicator extends GuiBase<BuiltScreenHandler> {
FluidReplicatorBlockEntity blockEntity; FluidReplicatorBlockEntity blockEntity;
public GuiFluidReplicator(int syncID, final PlayerEntity player, final FluidReplicatorBlockEntity blockEntity) { public GuiFluidReplicator(int syncID, final PlayerEntity player, final FluidReplicatorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -29,7 +29,7 @@ import net.minecraft.client.gui.widget.ButtonWidget;
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 org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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;
@ -47,11 +47,11 @@ import techreborn.packets.ServerboundPackets;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
public class GuiFusionReactor extends GuiBase<BuiltContainer> { public class GuiFusionReactor extends GuiBase<BuiltScreenHandler> {
FusionControlComputerBlockEntity blockEntity; FusionControlComputerBlockEntity blockEntity;
public GuiFusionReactor(int syncID, final PlayerEntity player, final FusionControlComputerBlockEntity blockEntity) { public GuiFusionReactor(int syncID, final PlayerEntity player, final FusionControlComputerBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiGasTurbine extends GuiBase<BuiltScreenHandler> {
GasTurbineBlockEntity blockEntity; GasTurbineBlockEntity blockEntity;
public GuiGasTurbine(int syncID, final PlayerEntity player, final GasTurbineBlockEntity blockEntity) { public GuiGasTurbine(int syncID, final PlayerEntity player, final GasTurbineBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,16 +25,16 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiGenerator extends GuiBase<BuiltScreenHandler> {
SolidFuelGeneratorBlockEntity blockEntity; SolidFuelGeneratorBlockEntity blockEntity;
public GuiGenerator(int syncID, final PlayerEntity player, final SolidFuelGeneratorBlockEntity blockEntity) { public GuiGenerator(int syncID, final PlayerEntity player, final SolidFuelGeneratorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -32,7 +32,7 @@ import net.minecraft.state.property.Properties;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
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.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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.multiblock.Multiblock; import reborncore.client.multiblock.Multiblock;
@ -43,12 +43,12 @@ import techreborn.init.TRContent;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
public class GuiGreenhouseController extends GuiBase<BuiltContainer> { public class GuiGreenhouseController extends GuiBase<BuiltScreenHandler> {
GreenhouseControllerBlockEntity blockEntity; GreenhouseControllerBlockEntity blockEntity;
public GuiGreenhouseController(int syncID, final PlayerEntity player, final GreenhouseControllerBlockEntity blockEntity) { public GuiGreenhouseController(int syncID, final PlayerEntity player, final GreenhouseControllerBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -26,17 +26,17 @@ package techreborn.client.gui;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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.energy.idsu.InterdimensionalSUBlockEntity; import techreborn.blockentity.storage.energy.idsu.InterdimensionalSUBlockEntity;
public class GuiIDSU extends GuiBase<BuiltContainer> { public class GuiIDSU extends GuiBase<BuiltScreenHandler> {
InterdimensionalSUBlockEntity idsu; InterdimensionalSUBlockEntity idsu;
public GuiIDSU(int syncID, PlayerEntity player, InterdimensionalSUBlockEntity blockEntityIDSU) { public GuiIDSU(int syncID, PlayerEntity player, InterdimensionalSUBlockEntity blockEntityIDSU) {
super(player, blockEntityIDSU, blockEntityIDSU.createContainer(syncID, player)); super(player, blockEntityIDSU, blockEntityIDSU.createScreenHandler(syncID, player));
idsu = blockEntityIDSU; idsu = blockEntityIDSU;
} }

View file

@ -28,7 +28,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.block.BlockState; 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.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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;
@ -36,12 +36,12 @@ import reborncore.client.multiblock.Multiblock;
import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity; import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class GuiImplosionCompressor extends GuiBase<BuiltContainer> { public class GuiImplosionCompressor extends GuiBase<BuiltScreenHandler> {
ImplosionCompressorBlockEntity blockEntity; ImplosionCompressorBlockEntity blockEntity;
public GuiImplosionCompressor(int syncID, final PlayerEntity player, final ImplosionCompressorBlockEntity blockEntity) { public GuiImplosionCompressor(int syncID, final PlayerEntity player, final ImplosionCompressorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiIndustrialElectrolyzer extends GuiBase<BuiltScreenHandler> {
IndustrialElectrolyzerBlockEntity blockEntity; IndustrialElectrolyzerBlockEntity blockEntity;
public GuiIndustrialElectrolyzer(int syncID, final PlayerEntity player, final IndustrialElectrolyzerBlockEntity blockEntity) { public GuiIndustrialElectrolyzer(int syncID, final PlayerEntity player, final IndustrialElectrolyzerBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -29,7 +29,7 @@ import net.minecraft.block.Blocks;
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 net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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,12 +37,12 @@ import reborncore.client.multiblock.Multiblock;
import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity; import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class GuiIndustrialGrinder extends GuiBase<BuiltContainer> { public class GuiIndustrialGrinder extends GuiBase<BuiltScreenHandler> {
IndustrialGrinderBlockEntity blockEntity; IndustrialGrinderBlockEntity blockEntity;
public GuiIndustrialGrinder(int syncID, final PlayerEntity player, final IndustrialGrinderBlockEntity blockEntity) { public GuiIndustrialGrinder(int syncID, final PlayerEntity player, final IndustrialGrinderBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -29,7 +29,7 @@ import net.minecraft.block.Blocks;
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 net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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,12 +37,12 @@ import reborncore.client.multiblock.Multiblock;
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<BuiltContainer> { public class GuiIndustrialSawmill extends GuiBase<BuiltScreenHandler> {
IndustrialSawmillBlockEntity blockEntity; IndustrialSawmillBlockEntity blockEntity;
public GuiIndustrialSawmill(int syncID, final PlayerEntity player, final IndustrialSawmillBlockEntity blockEntity) { public GuiIndustrialSawmill(int syncID, final PlayerEntity player, final IndustrialSawmillBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -33,7 +33,7 @@ import net.minecraft.client.MinecraftClient;
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.item.Items; import net.minecraft.item.Items;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonSimple; import reborncore.client.gui.builder.widget.GuiButtonSimple;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
@ -42,12 +42,12 @@ import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity;
import techreborn.packets.ServerboundPackets; import techreborn.packets.ServerboundPackets;
import techreborn.utils.PlayerUtils; import techreborn.utils.PlayerUtils;
public class GuiIronFurnace extends GuiBase<BuiltContainer> { public class GuiIronFurnace extends GuiBase<BuiltScreenHandler> {
IronFurnaceBlockEntity blockEntity; IronFurnaceBlockEntity blockEntity;
public GuiIronFurnace(int syncID, PlayerEntity player, IronFurnaceBlockEntity furnace) { public GuiIronFurnace(int syncID, PlayerEntity player, IronFurnaceBlockEntity furnace) {
super(player, furnace, furnace.createContainer(syncID, player)); super(player, furnace, furnace.createScreenHandler(syncID, player));
this.blockEntity = furnace; this.blockEntity = furnace;
} }

View file

@ -26,17 +26,17 @@ package techreborn.client.gui;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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.energy.lesu.LapotronicSUBlockEntity; import techreborn.blockentity.storage.energy.lesu.LapotronicSUBlockEntity;
public class GuiLESU extends GuiBase<BuiltContainer> { public class GuiLESU extends GuiBase<BuiltScreenHandler> {
LapotronicSUBlockEntity blockEntity; LapotronicSUBlockEntity blockEntity;
public GuiLESU(int syncID, final PlayerEntity player, final LapotronicSUBlockEntity blockEntity) { public GuiLESU(int syncID, final PlayerEntity player, final LapotronicSUBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -26,17 +26,17 @@ package techreborn.client.gui;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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.energy.MediumVoltageSUBlockEntity; import techreborn.blockentity.storage.energy.MediumVoltageSUBlockEntity;
public class GuiMFE extends GuiBase<BuiltContainer> { public class GuiMFE extends GuiBase<BuiltScreenHandler> {
MediumVoltageSUBlockEntity mfe; MediumVoltageSUBlockEntity mfe;
public GuiMFE(int syncID, final PlayerEntity player, final MediumVoltageSUBlockEntity mfe) { public GuiMFE(int syncID, final PlayerEntity player, final MediumVoltageSUBlockEntity mfe) {
super(player, mfe, mfe.createContainer(syncID, player)); super(player, mfe, mfe.createScreenHandler(syncID, player));
this.mfe = mfe; this.mfe = mfe;
} }

View file

@ -26,17 +26,17 @@ package techreborn.client.gui;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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.energy.HighVoltageSUBlockEntity; import techreborn.blockentity.storage.energy.HighVoltageSUBlockEntity;
public class GuiMFSU extends GuiBase<BuiltContainer> { public class GuiMFSU extends GuiBase<BuiltScreenHandler> {
HighVoltageSUBlockEntity mfsu; HighVoltageSUBlockEntity mfsu;
public GuiMFSU(int syncID, final PlayerEntity player, final HighVoltageSUBlockEntity mfsu) { public GuiMFSU(int syncID, final PlayerEntity player, final HighVoltageSUBlockEntity mfsu) {
super(player, mfsu, mfsu.createContainer(syncID, player)); super(player, mfsu, mfsu.createScreenHandler(syncID, player));
this.mfsu = mfsu; this.mfsu = mfsu;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiMatterFabricator extends GuiBase<BuiltScreenHandler> {
MatterFabricatorBlockEntity blockEntity; MatterFabricatorBlockEntity blockEntity;
public GuiMatterFabricator(int syncID, final PlayerEntity player, final MatterFabricatorBlockEntity blockEntity) { public GuiMatterFabricator(int syncID, final PlayerEntity player, final MatterFabricatorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -27,7 +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.screen.builder.BuiltScreenHandler;
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;
@ -37,7 +37,7 @@ import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity;
* *
*/ */
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public class GuiPlasmaGenerator extends GuiBase<BuiltContainer> { public class GuiPlasmaGenerator extends GuiBase<BuiltScreenHandler> {
/** /**
* @param player * @param player
@ -47,7 +47,7 @@ public class GuiPlasmaGenerator extends GuiBase<BuiltContainer> {
PlasmaGeneratorBlockEntity blockEntity; PlasmaGeneratorBlockEntity blockEntity;
public GuiPlasmaGenerator(int syncID, final PlayerEntity player, final PlasmaGeneratorBlockEntity blockEntity) { public GuiPlasmaGenerator(int syncID, final PlayerEntity player, final PlasmaGeneratorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiRecycler extends GuiBase<BuiltScreenHandler> {
RecyclerBlockEntity blockEntity; RecyclerBlockEntity blockEntity;
public GuiRecycler(int syncID, final PlayerEntity player, final RecyclerBlockEntity blockEntity) { public GuiRecycler(int syncID, final PlayerEntity player, final RecyclerBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,19 +25,19 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiRollingMachine extends GuiBase<BuiltScreenHandler> {
RollingMachineBlockEntity rollingMachine; RollingMachineBlockEntity rollingMachine;
public GuiRollingMachine(int syncID, final PlayerEntity player, final RollingMachineBlockEntity blockEntityRollingmachine) { public GuiRollingMachine(int syncID, final PlayerEntity player, final RollingMachineBlockEntity blockEntityRollingmachine) {
super(player, blockEntityRollingmachine, blockEntityRollingmachine.createContainer(syncID, player)); super(player, blockEntityRollingmachine, blockEntityRollingmachine.createScreenHandler(syncID, player));
this.rollingMachine = blockEntityRollingmachine; this.rollingMachine = blockEntityRollingmachine;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiScrapboxinator extends GuiBase<BuiltScreenHandler> {
ScrapboxinatorBlockEntity blockEntity; ScrapboxinatorBlockEntity blockEntity;
public GuiScrapboxinator(int syncID, final PlayerEntity player, final ScrapboxinatorBlockEntity blockEntity) { public GuiScrapboxinator(int syncID, final PlayerEntity player, final ScrapboxinatorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiSemifluidGenerator extends GuiBase<BuiltScreenHandler> {
SemiFluidGeneratorBlockEntity blockEntity; SemiFluidGeneratorBlockEntity blockEntity;
public GuiSemifluidGenerator(int syncID, final PlayerEntity player, final SemiFluidGeneratorBlockEntity blockEntity) { public GuiSemifluidGenerator(int syncID, final PlayerEntity player, final SemiFluidGeneratorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.util.StringUtils; import reborncore.common.util.StringUtils;
import techreborn.blockentity.generator.SolarPanelBlockEntity; import techreborn.blockentity.generator.SolarPanelBlockEntity;
public class GuiSolar extends GuiBase<BuiltContainer> { public class GuiSolar extends GuiBase<BuiltScreenHandler> {
SolarPanelBlockEntity blockEntity; SolarPanelBlockEntity blockEntity;
public GuiSolar(int syncID, PlayerEntity player, SolarPanelBlockEntity panel) { public GuiSolar(int syncID, PlayerEntity player, SolarPanelBlockEntity panel) {
super(player, panel, panel.createContainer(syncID, player)); super(player, panel, panel.createScreenHandler(syncID, player));
this.blockEntity = panel; this.blockEntity = panel;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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.SoildCanningMachineBlockEntity; import techreborn.blockentity.machine.tier1.SoildCanningMachineBlockEntity;
public class GuiSolidCanningMachine extends GuiBase<BuiltContainer> { public class GuiSolidCanningMachine extends GuiBase<BuiltScreenHandler> {
SoildCanningMachineBlockEntity blockEntity; SoildCanningMachineBlockEntity blockEntity;
public GuiSolidCanningMachine(int syncID, final PlayerEntity player, final SoildCanningMachineBlockEntity blockEntity) { public GuiSolidCanningMachine(int syncID, final PlayerEntity player, final SoildCanningMachineBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.util.StringUtils; import reborncore.common.util.StringUtils;
import techreborn.blockentity.storage.item.StorageUnitBaseBlockEntity; import techreborn.blockentity.storage.item.StorageUnitBaseBlockEntity;
public class GuiStorageUnit extends GuiBase<BuiltContainer> { public class GuiStorageUnit extends GuiBase<BuiltScreenHandler> {
StorageUnitBaseBlockEntity storageEntity; StorageUnitBaseBlockEntity storageEntity;
public GuiStorageUnit(int syncID, final PlayerEntity player, final StorageUnitBaseBlockEntity storageEntity) { public GuiStorageUnit(int syncID, final PlayerEntity player, final StorageUnitBaseBlockEntity storageEntity) {
super(player, storageEntity, storageEntity.createContainer(syncID, player)); super(player, storageEntity, storageEntity.createScreenHandler(syncID, player));
this.storageEntity = storageEntity; this.storageEntity = storageEntity;
} }

View file

@ -25,19 +25,19 @@
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.screen.builder.BuiltScreenHandler;
import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.builder.GuiBase;
import reborncore.common.fluid.FluidUtil; import reborncore.common.fluid.FluidUtil;
import reborncore.common.fluid.container.FluidInstance; import reborncore.common.fluid.container.FluidInstance;
import reborncore.common.util.StringUtils; import reborncore.common.util.StringUtils;
import techreborn.blockentity.storage.fluid.TankUnitBaseBlockEntity; import techreborn.blockentity.storage.fluid.TankUnitBaseBlockEntity;
public class GuiTankUnit extends GuiBase<BuiltContainer> { public class GuiTankUnit extends GuiBase<BuiltScreenHandler> {
TankUnitBaseBlockEntity tankEntity; TankUnitBaseBlockEntity tankEntity;
public GuiTankUnit(int syncID, final PlayerEntity player, final TankUnitBaseBlockEntity tankEntity) { public GuiTankUnit(int syncID, final PlayerEntity player, final TankUnitBaseBlockEntity tankEntity) {
super(player, tankEntity, tankEntity.createContainer(syncID, player)); super(player, tankEntity, tankEntity.createScreenHandler(syncID, player));
this.tankEntity = tankEntity; this.tankEntity = tankEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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<BuiltContainer> { public class GuiThermalGenerator extends GuiBase<BuiltScreenHandler> {
ThermalGeneratorBlockEntity blockEntity; ThermalGeneratorBlockEntity blockEntity;
public GuiThermalGenerator(int syncID, final PlayerEntity player, final ThermalGeneratorBlockEntity blockEntity) { public GuiThermalGenerator(int syncID, final PlayerEntity player, final ThermalGeneratorBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -27,7 +27,7 @@ package techreborn.client.gui;
import net.minecraft.block.BlockState; 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.client.containerBuilder.builder.BuiltContainer; import reborncore.client.screen.builder.BuiltScreenHandler;
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;
@ -35,12 +35,12 @@ import reborncore.client.multiblock.Multiblock;
import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity; import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class GuiVacuumFreezer extends GuiBase<BuiltContainer> { public class GuiVacuumFreezer extends GuiBase<BuiltScreenHandler> {
VacuumFreezerBlockEntity blockEntity; VacuumFreezerBlockEntity blockEntity;
public GuiVacuumFreezer(int syncID, final PlayerEntity player, final VacuumFreezerBlockEntity blockEntity) { public GuiVacuumFreezer(int syncID, final PlayerEntity player, final VacuumFreezerBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -25,17 +25,17 @@
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.screen.builder.BuiltScreenHandler;
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.WireMillBlockEntity; import techreborn.blockentity.machine.tier1.WireMillBlockEntity;
public class GuiWireMill extends GuiBase<BuiltContainer> { public class GuiWireMill extends GuiBase<BuiltScreenHandler> {
WireMillBlockEntity blockEntity; WireMillBlockEntity blockEntity;
public GuiWireMill(int syncID, final PlayerEntity player, final WireMillBlockEntity blockEntity) { public GuiWireMill(int syncID, final PlayerEntity player, final WireMillBlockEntity blockEntity) {
super(player, blockEntity, blockEntity.createContainer(syncID, player)); super(player, blockEntity, blockEntity.createScreenHandler(syncID, player));
this.blockEntity = blockEntity; this.blockEntity = blockEntity;
} }

View file

@ -22,7 +22,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
package techreborn.client.container; package techreborn.client.screen;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -32,12 +32,12 @@ import reborncore.client.gui.slots.SlotFilteredVoid;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import techreborn.init.TRContent; import techreborn.init.TRContent;
public class ContainerDestructoPack extends ScreenHandler { public class DestructoPackScreenHandler extends ScreenHandler {
private PlayerEntity player; private PlayerEntity player;
private RebornInventory<?> inv; private RebornInventory<?> inv;
public ContainerDestructoPack(int syncID, PlayerEntity player) { public DestructoPackScreenHandler(int syncID, PlayerEntity player) {
super(null, syncID); super(null, syncID);
this.player = player; this.player = player;
inv = new RebornInventory<>(1, "destructopack", 64, null); inv = new RebornInventory<>(1, "destructopack", 64, null);

View file

@ -22,7 +22,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
package techreborn.client.container.builder.slot; package techreborn.client.screen.builder.slot;
import net.minecraft.block.entity.AbstractFurnaceBlockEntity; import net.minecraft.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.inventory.Inventory; import net.minecraft.inventory.Inventory;