Renames to match yarn changes
This commit is contained in:
parent
5b1e68d093
commit
99b2755887
94 changed files with 415 additions and 418 deletions
|
@ -26,9 +26,9 @@ package techreborn.blockentity.machine.iron;
|
|||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.ingredient.RebornIngredient;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class IronAlloyFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements IContainerProvider {
|
||||
public class IronAlloyFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
int input1 = 0;
|
||||
int input2 = 1;
|
||||
|
@ -125,8 +125,8 @@ public class IronAlloyFurnaceBlockEntity extends AbstractIronMachineBlockEntity
|
|||
}
|
||||
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("alloyfurnace").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("alloyfurnace").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.slot(0, 47, 17)
|
||||
.slot(1, 65, 17)
|
||||
|
|
|
@ -31,9 +31,9 @@ import net.minecraft.nbt.CompoundTag;
|
|||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.recipe.SmeltingRecipe;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
@ -41,7 +41,7 @@ import techreborn.utils.RecipeUtils;
|
|||
|
||||
import java.util.Optional;
|
||||
|
||||
public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements IContainerProvider {
|
||||
public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
int inputSlot = 0;
|
||||
int outputSlot = 1;
|
||||
|
@ -152,8 +152,8 @@ public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity imple
|
|||
}
|
||||
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("ironfurnace").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("ironfurnace").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.fuelSlot(2, 56, 53).slot(0, 56, 17).outputSlot(1, 116, 35)
|
||||
.sync(this::getBurnTime, this::setBurnTime)
|
||||
|
|
|
@ -29,9 +29,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import team.reborn.energy.Energy;
|
||||
|
@ -40,7 +40,7 @@ import techreborn.init.TRBlockEntities;
|
|||
import techreborn.init.TRContent;
|
||||
|
||||
public class ChargeOMatBlockEntity extends PowerAcceptorBlockEntity
|
||||
implements IToolDrop, InventoryProvider, IContainerProvider {
|
||||
implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
|
||||
|
||||
public RebornInventory<ChargeOMatBlockEntity> inventory = new RebornInventory<>(6, "ChargeOMatBlockEntity", 64, this);
|
||||
|
||||
|
@ -115,8 +115,8 @@ public class ChargeOMatBlockEntity extends PowerAcceptorBlockEntity
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("chargebench").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.energySlot(4, 62, 65).energySlot(5, 98, 65).syncEnergyValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -5,12 +5,12 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.inventory.Inventory;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
|
||||
public class DrainBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IListInfoProvider, IContainerProvider {
|
||||
public class DrainBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IListInfoProvider, BuiltScreenHandlerProvider {
|
||||
|
||||
public DrainBlockEntity(){
|
||||
this(TRBlockEntities.DRAIN);
|
||||
|
@ -26,7 +26,7 @@ public class DrainBlockEntity extends MachineBaseBlockEntity implements Inventor
|
|||
}
|
||||
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ package techreborn.blockentity.machine.multiblock;
|
|||
import net.minecraft.block.Material;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -39,7 +39,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class DistillationTowerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class DistillationTowerBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public MultiblockChecker multiblockChecker;
|
||||
|
||||
|
@ -79,8 +79,8 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("Distillationtower").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.outputSlot(4, 119, 37).outputSlot(5, 139, 37).energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue()
|
||||
.addInventory().create(this, syncID);
|
||||
|
|
|
@ -27,9 +27,9 @@ package techreborn.blockentity.machine.multiblock;
|
|||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.fluid.FluidValue;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.IInventoryAccess;
|
||||
|
@ -48,7 +48,7 @@ import javax.annotation.Nullable;
|
|||
* @author drcrazy
|
||||
*
|
||||
*/
|
||||
public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public MultiblockChecker multiblockChecker;
|
||||
public static final FluidValue TANK_CAPACITY = FluidValue.BUCKET.multiply(16);
|
||||
|
@ -129,8 +129,8 @@ public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implem
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
return new ContainerBuilder("fluidreplicator").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
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()))
|
||||
.outputSlot(2, 124, 55).energySlot(3, 8, 72).sync(tank).syncEnergyValue().syncCrafterValue().addInventory()
|
||||
.create(this, syncID);
|
||||
|
|
|
@ -32,9 +32,9 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.ingredient.RebornIngredient;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
|
@ -50,7 +50,7 @@ import techreborn.init.TRContent;
|
|||
import java.util.List;
|
||||
|
||||
public class FusionControlComputerBlockEntity extends PowerAcceptorBlockEntity
|
||||
implements IToolDrop, InventoryProvider, IContainerProvider {
|
||||
implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
|
||||
|
||||
public RebornInventory<FusionControlComputerBlockEntity> inventory;
|
||||
|
||||
|
@ -397,8 +397,8 @@ public class FusionControlComputerBlockEntity extends PowerAcceptorBlockEntity
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("fusionreactor").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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()
|
||||
.sync(this::getCoilStatus, this::setCoilStatus)
|
||||
.sync(this::getCrafingTickTime, this::setCrafingTickTime)
|
||||
|
|
|
@ -26,9 +26,9 @@ package techreborn.blockentity.machine.multiblock;
|
|||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -38,7 +38,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public MultiblockChecker multiblockChecker;
|
||||
|
||||
|
@ -72,8 +72,8 @@ public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity im
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("implosioncompressor").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@ import net.minecraft.block.entity.BlockEntity;
|
|||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.multiblock.IMultiblockPart;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -44,7 +44,7 @@ import techreborn.init.TRBlockEntities;
|
|||
import techreborn.init.TRContent;
|
||||
import techreborn.multiblocks.MultiBlockCasing;
|
||||
|
||||
public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public MultiblockChecker multiblockChecker;
|
||||
private int cachedHeat;
|
||||
|
@ -129,8 +129,8 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("blastfurnace").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue()
|
||||
.sync(this::getHeat, this::setHeat).addInventory().create(this, syncID);
|
||||
|
|
|
@ -31,9 +31,9 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.fluid.FluidValue;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -47,7 +47,7 @@ import techreborn.utils.FluidUtils;
|
|||
|
||||
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 Tank tank;
|
||||
|
@ -121,9 +121,9 @@ public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity impl
|
|||
|
||||
// IContainerProvider
|
||||
@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
|
||||
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)
|
||||
.outputSlot(4, 126, 54).outputSlot(5, 126, 72).outputSlot(6, 34, 55).energySlot(7, 8, 72)
|
||||
.sync(tank).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
|
|
|
@ -31,9 +31,9 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.fluid.FluidValue;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -47,7 +47,7 @@ import techreborn.utils.FluidUtils;
|
|||
|
||||
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 Tank tank;
|
||||
|
@ -123,8 +123,8 @@ public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity impl
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("industrialsawmill").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.outputSlot(4, 126, 61).outputSlot(5, 34, 55).energySlot(6, 8, 72).sync(tank).syncEnergyValue().syncCrafterValue()
|
||||
.addInventory().create(this, syncID);
|
||||
|
|
|
@ -27,9 +27,9 @@ package techreborn.blockentity.machine.multiblock;
|
|||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
@ -38,7 +38,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public MultiblockChecker multiblockChecker;
|
||||
|
||||
|
@ -69,8 +69,8 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("vacuumfreezer").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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()
|
||||
.syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class AlloySmelterBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class AlloySmelterBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public AlloySmelterBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("alloysmelter").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("alloysmelter").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.slot(0, 34, 47)
|
||||
.slot(1, 126, 47)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class AssemblingMachineBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class AssemblingMachineBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public AssemblingMachineBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("assemblingmachine").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.recipe.CraftingRecipe;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
|
@ -39,12 +38,11 @@ import net.minecraft.util.math.Direction;
|
|||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.recipes.ExtendedRecipeRemainder;
|
||||
import reborncore.common.util.IInventoryAccess;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
|
@ -63,7 +61,7 @@ import java.util.stream.Collectors;
|
|||
* Created by modmuss50 on 20/06/2017.
|
||||
*/
|
||||
public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
|
||||
implements IToolDrop, InventoryProvider, IContainerProvider {
|
||||
implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
|
||||
|
||||
public RebornInventory<AutoCraftingTableBlockEntity> inventory = new RebornInventory<>(11, "AutoCraftingTableBlockEntity", 64, this);
|
||||
public int progress;
|
||||
|
@ -466,8 +464,8 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
return new ContainerBuilder("autocraftingtable").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
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)
|
||||
.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)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
|
@ -36,7 +36,7 @@ import techreborn.init.TRContent;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
||||
public class ChemicalReactorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class ChemicalReactorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public ChemicalReactorBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("chemicalreactor").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class CompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class CompressorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public CompressorBlockEntity() {
|
||||
super(TRBlockEntities.COMPRESSOR, "Compressor", TechRebornConfig.compressorMaxInput, TechRebornConfig.compressorMaxEnergy, TRContent.Machine.COMPRESSOR.block, 2);
|
||||
|
@ -48,8 +48,8 @@ public class CompressorBlockEntity extends GenericMachineBlockEntity implements
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("compressor").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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()
|
||||
.syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -32,9 +32,9 @@ import net.minecraft.recipe.SmeltingRecipe;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
|
@ -47,7 +47,7 @@ import techreborn.init.TRContent;
|
|||
import java.util.Optional;
|
||||
|
||||
public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
||||
implements IToolDrop, InventoryProvider, IContainerProvider {
|
||||
implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
|
||||
|
||||
public RebornInventory<ElectricFurnaceBlockEntity> inventory = new RebornInventory<>(3, "ElectricFurnaceBlockEntity", 64, this);
|
||||
int inputSlot = 0;
|
||||
|
@ -269,8 +269,8 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("electricfurnace").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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()
|
||||
.sync(this::getCookTime, this::setCookTime).sync(this::getCookTimeTotal, this::setCookTimeTotal).addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class ExtractorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class ExtractorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public ExtractorBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("extractor").player(player.inventory).inventory().hotbar().addInventory().blockEntity(this)
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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()
|
||||
.addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -33,9 +33,9 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -49,7 +49,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
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 BlockPos multiblockCenter;
|
||||
|
@ -252,8 +252,8 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
|
|||
}
|
||||
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
return new ContainerBuilder("greenhousecontroller").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("greenhousecontroller").player(player.inventory).inventory().hotbar().addInventory()
|
||||
.blockEntity(this)
|
||||
.outputSlot(0, 30, 22).outputSlot(1, 48, 22)
|
||||
.outputSlot(2, 30, 40).outputSlot(3, 48, 40)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
|
@ -38,7 +38,7 @@ import techreborn.init.TRBlockEntities;
|
|||
import techreborn.items.DynamicCellItem;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
||||
public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public IndustrialElectrolyzerBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("industrialelectrolyzer").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("industrialelectrolyzer").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.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))
|
||||
|
|
|
@ -33,9 +33,9 @@ import net.minecraft.util.registry.Registry;
|
|||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.IUpgrade;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.blockentity.SlotConfiguration;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
|
@ -45,7 +45,7 @@ import techreborn.init.TRBlockEntities;
|
|||
import techreborn.init.TRContent;
|
||||
|
||||
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 int cost = 2;
|
||||
|
@ -216,8 +216,8 @@ public class RecyclerBlockEntity extends PowerAcceptorBlockEntity
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
return new ContainerBuilder("recycler").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("recycler").player(player.inventory).inventory().hotbar().addInventory()
|
||||
.blockEntity(this).slot(0, 55, 45, RecyclerBlockEntity::canRecycle)
|
||||
.outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue()
|
||||
.sync(this::getProgress, this::setProgress).addInventory().create(this, syncID);
|
||||
|
|
|
@ -35,9 +35,9 @@ import net.minecraft.world.World;
|
|||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
|
@ -58,7 +58,7 @@ import java.util.stream.Collectors;
|
|||
//TODO add tick and power bars.
|
||||
|
||||
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 };
|
||||
private CraftingInventory craftCache;
|
||||
|
@ -385,8 +385,8 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
}
|
||||
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("rollingmachine").player(player.inventory)
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("rollingmachine").player(player.inventory)
|
||||
.inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.slot(0, 30, 22).slot(1, 48, 22).slot(2, 66, 22)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.api.recipe.ScrapboxRecipeCrafter;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
|
@ -35,7 +35,7 @@ import techreborn.init.TRContent;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
||||
public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public ScrapboxinatorBlockEntity() {
|
||||
super(TRBlockEntities.SCRAPBOXINATOR, "Scrapboxinator", TechRebornConfig.scrapboxinatorMaxInput, TechRebornConfig.scrapboxinatorMaxEnergy, TRContent.Machine.SCRAPBOXINATOR.block, 2);
|
||||
|
@ -53,8 +53,8 @@ public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity impleme
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("scrapboxinator").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
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)
|
||||
.energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
@ -36,7 +36,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class SoildCanningMachineBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class SoildCanningMachineBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public SoildCanningMachineBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("solidcanningmachine").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("solidcanningmachine").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.slot(0, 34, 47)
|
||||
.slot(1, 126, 47)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
|
@ -35,7 +35,7 @@ import techreborn.init.ModRecipes;
|
|||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class WireMillBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||
public class WireMillBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider {
|
||||
|
||||
public WireMillBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("wiremill").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("wiremill").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.slot(0, 55, 45)
|
||||
.outputSlot(1, 101, 45)
|
||||
|
|
|
@ -36,9 +36,9 @@ import net.minecraft.world.World;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.chunkloading.ChunkLoaderManager;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -48,7 +48,7 @@ import techreborn.init.TRContent;
|
|||
|
||||
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);
|
||||
private int radius;
|
||||
|
@ -164,8 +164,8 @@ public class ChunkLoaderBlockEntity extends MachineBaseBlockEntity implements IT
|
|||
}
|
||||
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
return new ContainerBuilder("chunkloader").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("chunkloader").player(player.inventory).inventory().hotbar().addInventory()
|
||||
.blockEntity(this).sync(this::getRadius, this::setRadius).addInventory().create(this, syncID);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
|
@ -44,7 +44,7 @@ import techreborn.items.DynamicCellItem;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity implements IContainerProvider, IListInfoProvider {
|
||||
public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity implements BuiltScreenHandlerProvider, IListInfoProvider {
|
||||
|
||||
public IndustrialCentrifugeBlockEntity() {
|
||||
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
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("centrifuge").player(player.inventory).inventory().hotbar()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("centrifuge").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.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))
|
||||
|
|
|
@ -29,9 +29,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.client.screen.BuiltScreenHandlerProvider;
|
||||
import reborncore.client.screen.builder.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
@ -40,7 +40,7 @@ import techreborn.init.TRBlockEntities;
|
|||
import techreborn.init.TRContent;
|
||||
|
||||
public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity
|
||||
implements IToolDrop, InventoryProvider, IContainerProvider {
|
||||
implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider {
|
||||
|
||||
public RebornInventory<MatterFabricatorBlockEntity> inventory = new RebornInventory<>(12, "MatterFabricatorBlockEntity", 64, this);
|
||||
private int amplifier = 0;
|
||||
|
@ -196,8 +196,8 @@ public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity
|
|||
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
return new ContainerBuilder("matterfabricator").player(player.inventory).inventory().hotbar().addInventory()
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) {
|
||||
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)
|
||||
.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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue