From dbc89adaf7d93ebd6437d774ceaaec00d0fa4141 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Mon, 22 Jul 2019 12:45:13 +0100 Subject: [PATCH] Tile -> BlockEntity + some more refactors --- src/main/java/techreborn/TechReborn.java | 4 +- .../FluidReplicatorRecipe.java | 14 +- .../FluidReplicatorRecipeCrafter.java | 32 +- .../api/recipe/ScrapboxRecipeCrafter.java | 12 +- .../recipe/recipes/BlastFurnaceRecipe.java | 10 +- .../recipes/IndustrialGrinderRecipe.java | 20 +- .../recipes/IndustrialSawmillRecipe.java | 20 +- .../AlarmBlockEntity.java} | 12 +- .../ChargeOMatBlockEntity.java} | 20 +- .../DigitalChestBlockEntity.java} | 12 +- .../GenericMachineBlockEntity.java} | 16 +- .../IndustrialCentrifugeBlockEntity.java} | 18 +- .../MachineCasingBlockEntity.java} | 12 +- .../TechStorageBaseBlockEntity.java} | 26 +- .../cable/CableBlockEntity.java} | 40 +- .../FusionControlComputerBlockEntity.java} | 22 +- .../BaseFluidGeneratorBlockEntity.java} | 18 +- .../generator/LightningRodBlockEntity.java} | 12 +- .../PlasmaGeneratorBlockEntity.java} | 12 +- .../generator/SolarPanelBlockEntity.java} | 16 +- .../advanced/DieselGeneratorBlockEntity.java} | 14 +- .../advanced/DragonEggSyphonBlockEntity.java} | 18 +- .../advanced/GasTurbineBlockEntity.java} | 14 +- .../SemiFluidGeneratorBlockEntity.java} | 14 +- .../ThermalGeneratorBlockEntity.java} | 14 +- .../basic/SolidFuelGeneratorBlockEntity.java} | 24 +- .../basic/WaterMillBlockEntity.java} | 12 +- .../generator/basic/WindMillBlockEntity.java} | 12 +- .../lighting/LampBlockEntity.java} | 12 +- .../iron/IronAlloyFurnaceBlockEntity.java} | 22 +- .../machine/iron/IronFurnaceBlockEntity.java} | 30 +- .../DistillationTowerBlockEntity.java} | 16 +- .../FluidReplicatorBlockEntity.java} | 22 +- .../ImplosionCompressorBlockEntity.java} | 16 +- .../IndustrialBlastFurnaceBlockEntity.java} | 36 +- .../IndustrialGrinderBlockEntity.java} | 22 +- .../IndustrialSawmillBlockEntity.java} | 22 +- .../machine/multiblock/MultiblockChecker.java | 2 +- .../multiblock/VacuumFreezerBlockEntity.java} | 18 +- .../tier1/AlloySmelterBlockEntity.java} | 16 +- .../tier1/AssemblingMachineBlockEntity.java} | 16 +- .../tier1/AutoCraftingTableBlockEntity.java} | 24 +- .../tier1/ChemicalReactorBlockEntity.java} | 16 +- .../machine/tier1/CompressorBlockEntity.java} | 16 +- .../tier1/ElectricFurnaceBlockEntity.java} | 20 +- .../machine/tier1/ExtractorBlockEntity.java} | 16 +- .../machine/tier1/GrinderBlockEntity.java} | 16 +- .../IndustrialElectrolyzerBlockEntity.java} | 16 +- .../tier1/PlayerDectectorBlockEntity.java} | 12 +- .../machine/tier1/RecyclerBlockEntity.java} | 22 +- .../tier1/RollingMachineBlockEntity.java} | 26 +- .../tier1/ScrapboxinatorBlockEntity.java} | 16 +- .../tier3/ChunkLoaderBlockEntity.java} | 18 +- .../CreativeQuantumChestBlockEntity.java} | 10 +- .../CreativeQuantumTankBlockEntity.java} | 10 +- .../tier3/MatterFabricatorBlockEntity.java} | 20 +- .../tier3/QuantumChestBlockEntity.java} | 18 +- .../tier3/QuantumTankBlockEntity.java} | 36 +- .../storage/AdjustableSUBlockEntity.java} | 22 +- .../storage/EnergyStorageBlockEntity.java} | 18 +- .../storage/HighVoltageSUBlockEntity.java} | 12 +- .../storage/LowVoltageSUBlockEntity.java} | 12 +- .../storage/MediumVoltageSUBlockEntity.java} | 12 +- .../storage/idsu/IDSUManager.java | 2 +- .../storage/idsu/IDSUSaveManger.java | 2 +- .../storage/idsu/IDataIDSU.java | 2 +- .../idsu/InterdimensionalSUBlockEntity.java} | 14 +- .../storage/lesu/LSUStorageBlockEntity.java} | 18 +- .../lesu/LapotronicSUBlockEntity.java} | 22 +- .../storage/lesu/LesuNetwork.java | 26 +- .../HVTransformerBlockEntity.java} | 11 +- .../LVTransformerBlockEntity.java} | 10 +- .../MVTransformerBlockEntity.java} | 11 +- .../transformers/TransformerBlockEntity.java} | 12 +- .../java/techreborn/blocks/BlockAlarm.java | 16 +- .../techreborn/blocks/BlockMachineCasing.java | 4 +- .../blocks/BlockSupercondensator.java | 2 +- .../techreborn/blocks/cable/BlockCable.java | 26 +- .../generator/BlockDieselGenerator.java | 6 +- .../generator/BlockDragonEggSyphon.java | 6 +- .../generator/BlockFusionControlComputer.java | 20 +- .../blocks/generator/BlockGasTurbine.java | 6 +- .../blocks/generator/BlockLightningRod.java | 6 +- .../generator/BlockMagicEnergyAbsorber.java | 2 +- .../generator/BlockMagicEnergyConverter.java | 2 +- .../generator/BlockPlasmaGenerator.java | 6 +- .../generator/BlockSemiFluidGenerator.java | 6 +- .../blocks/generator/BlockSolarPanel.java | 6 +- .../generator/BlockSolidFuelGenerator.java | 6 +- .../generator/BlockThermalGenerator.java | 6 +- .../blocks/generator/BlockWaterMill.java | 6 +- .../blocks/generator/BlockWindMill.java | 6 +- .../techreborn/blocks/lighting/BlockLamp.java | 14 +- .../blocks/misc/BlockComputerCube.java | 2 +- .../blocks/storage/BlockAdjustableSU.java | 4 +- .../blocks/storage/BlockEnergyStorage.java | 12 +- .../blocks/storage/BlockHighVoltageSU.java | 4 +- .../storage/BlockInterdimensionalSU.java | 16 +- .../blocks/storage/BlockLSUStorage.java | 30 +- .../blocks/storage/BlockLapotronicSU.java | 4 +- .../blocks/storage/BlockLowVoltageSU.java | 4 +- .../blocks/storage/BlockMediumVoltageSU.java | 4 +- .../blocks/tier0/BlockIronAlloyFurnace.java | 6 +- .../blocks/tier0/BlockIronFurnace.java | 6 +- .../blocks/tier1/BlockAlloySmelter.java | 6 +- .../blocks/tier1/BlockAssemblingMachine.java | 6 +- .../blocks/tier1/BlockAutoCraftingTable.java | 6 +- .../blocks/tier1/BlockCompressor.java | 6 +- .../blocks/tier1/BlockElectricFurnace.java | 6 +- .../blocks/tier1/BlockExtractor.java | 6 +- .../techreborn/blocks/tier1/BlockGrinder.java | 6 +- .../blocks/tier1/BlockPlayerDetector.java | 28 +- .../blocks/tier1/BlockRecycler.java | 6 +- .../blocks/tier1/BlockRollingMachine.java | 6 +- .../blocks/tier1/BlockScrapboxinator.java | 6 +- .../blocks/tier2/BlockChargeOMat.java | 6 +- .../blocks/tier2/BlockChemicalReactor.java | 6 +- .../blocks/tier2/BlockDigitalChest.java | 6 +- .../blocks/tier2/BlockDistillationTower.java | 6 +- .../tier2/BlockImplosionCompressor.java | 6 +- .../tier2/BlockIndustrialBlastFurnace.java | 6 +- .../tier2/BlockIndustrialCentrifuge.java | 6 +- .../tier2/BlockIndustrialElectrolyzer.java | 6 +- .../blocks/tier2/BlockIndustrialGrinder.java | 6 +- .../blocks/tier2/BlockIndustrialSawmill.java | 6 +- .../blocks/tier2/BlockVacuumFreezer.java | 6 +- .../blocks/tier3/BlockChunkLoader.java | 6 +- .../tier3/BlockCreativeQuantumChest.java | 6 +- .../tier3/BlockCreativeQuantumTank.java | 6 +- .../blocks/tier3/BlockFluidReplicator.java | 6 +- .../blocks/tier3/BlockMatterFabricator.java | 6 +- .../blocks/tier3/BlockQuantumChest.java | 6 +- .../blocks/tier3/BlockQuantumTank.java | 6 +- .../transformers/BlockHVTransformer.java | 4 +- .../transformers/BlockLVTransformer.java | 4 +- .../transformers/BlockMVTransformer.java | 4 +- .../blocks/transformers/BlockTransformer.java | 10 +- src/main/java/techreborn/client/EGui.java | 2 +- .../java/techreborn/client/GuiHandler.java | 140 +- .../container/ContainerDestructoPack.java | 9 +- .../java/techreborn/client/gui/GuiAESU.java | 18 +- .../client/gui/GuiAlloyFurnace.java | 8 +- .../client/gui/GuiAlloySmelter.java | 16 +- .../client/gui/GuiAssemblingMachine.java | 14 +- .../client/gui/GuiAutoCrafting.java | 20 +- .../java/techreborn/client/gui/GuiBatbox.java | 14 +- .../client/gui/GuiBlastFurnace.java | 30 +- .../techreborn/client/gui/GuiCentrifuge.java | 14 +- .../techreborn/client/gui/GuiChargeBench.java | 12 +- .../client/gui/GuiChemicalReactor.java | 16 +- .../techreborn/client/gui/GuiChunkLoader.java | 8 +- .../techreborn/client/gui/GuiCompressor.java | 14 +- .../client/gui/GuiDieselGenerator.java | 16 +- .../client/gui/GuiDigitalChest.java | 22 +- .../client/gui/GuiDistillationTower.java | 24 +- .../client/gui/GuiElectricFurnace.java | 14 +- .../techreborn/client/gui/GuiExtractor.java | 14 +- .../client/gui/GuiFluidReplicator.java | 30 +- .../client/gui/GuiFusionReactor.java | 44 +- .../techreborn/client/gui/GuiGasTurbine.java | 16 +- .../techreborn/client/gui/GuiGenerator.java | 14 +- .../techreborn/client/gui/GuiGrinder.java | 14 +- .../java/techreborn/client/gui/GuiIDSU.java | 10 +- .../client/gui/GuiImplosionCompressor.java | 22 +- .../client/gui/GuiIndustrialElectrolyzer.java | 14 +- .../client/gui/GuiIndustrialGrinder.java | 30 +- .../client/gui/GuiIndustrialSawmill.java | 30 +- .../techreborn/client/gui/GuiIronFurnace.java | 8 +- .../java/techreborn/client/gui/GuiLESU.java | 16 +- .../java/techreborn/client/gui/GuiMFE.java | 6 +- .../java/techreborn/client/gui/GuiMFSU.java | 6 +- .../client/gui/GuiMatterFabricator.java | 14 +- .../client/gui/GuiPlasmaGenerator.java | 18 +- .../client/gui/GuiQuantumChest.java | 6 +- .../techreborn/client/gui/GuiQuantumTank.java | 6 +- .../techreborn/client/gui/GuiRecycler.java | 14 +- .../client/gui/GuiRollingMachine.java | 10 +- .../client/gui/GuiScrapboxinator.java | 14 +- .../client/gui/GuiSemifluidGenerator.java | 16 +- .../client/gui/GuiThermalGenerator.java | 16 +- .../client/gui/GuiVacuumFreezer.java | 22 +- .../events/StackToolTipHandler.java | 12 +- src/main/java/techreborn/init/ModSounds.java | 6 +- .../java/techreborn/init/TRBlockEntities.java | 152 + src/main/java/techreborn/init/TRContent.java | 38 +- .../java/techreborn/init/TRTileEntities.java | 152 - .../java/techreborn/items/ItemUpgrade.java | 9 +- .../techreborn/items/tool/ItemDebugTool.java | 22 +- .../multiblocks/MultiBlockCasing.java | 10 +- .../packets/ServerboundPackets.java | 42 +- .../java/techreborn/proxies/ClientProxy.java | 6 +- .../utils/BehaviorDispenseScrapbox.java | 4 +- .../resources/techreborn_annotations.json | 3434 ++++++++--------- 193 files changed, 3194 insertions(+), 3214 deletions(-) rename src/main/java/techreborn/{tiles/TileAlarm.java => blockentity/AlarmBlockEntity.java} (94%) rename src/main/java/techreborn/{tiles/TileChargeOMat.java => blockentity/ChargeOMatBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles/TileDigitalChest.java => blockentity/DigitalChestBlockEntity.java} (83%) rename src/main/java/techreborn/{tiles/TileGenericMachine.java => blockentity/GenericMachineBlockEntity.java} (86%) rename src/main/java/techreborn/{tiles/TileIndustrialCentrifuge.java => blockentity/IndustrialCentrifugeBlockEntity.java} (84%) rename src/main/java/techreborn/{tiles/TileMachineCasing.java => blockentity/MachineCasingBlockEntity.java} (89%) rename src/main/java/techreborn/{tiles/TileTechStorageBase.java => blockentity/TechStorageBaseBlockEntity.java} (90%) rename src/main/java/techreborn/{tiles/cable/TileCable.java => blockentity/cable/CableBlockEntity.java} (81%) rename src/main/java/techreborn/{tiles/fusionReactor/TileFusionControlComputer.java => blockentity/fusionReactor/FusionControlComputerBlockEntity.java} (94%) rename src/main/java/techreborn/{tiles/generator/TileBaseFluidGenerator.java => blockentity/generator/BaseFluidGeneratorBlockEntity.java} (90%) rename src/main/java/techreborn/{tiles/generator/TileLightningRod.java => blockentity/generator/LightningRodBlockEntity.java} (94%) rename src/main/java/techreborn/{tiles/generator/TilePlasmaGenerator.java => blockentity/generator/PlasmaGeneratorBlockEntity.java} (88%) rename src/main/java/techreborn/{tiles/generator/TileSolarPanel.java => blockentity/generator/SolarPanelBlockEntity.java} (91%) rename src/main/java/techreborn/{tiles/generator/advanced/TileDieselGenerator.java => blockentity/generator/advanced/DieselGeneratorBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles/generator/advanced/TileDragonEggSyphon.java => blockentity/generator/advanced/DragonEggSyphonBlockEntity.java} (87%) rename src/main/java/techreborn/{tiles/generator/advanced/TileGasTurbine.java => blockentity/generator/advanced/GasTurbineBlockEntity.java} (86%) rename src/main/java/techreborn/{tiles/generator/advanced/TileSemiFluidGenerator.java => blockentity/generator/advanced/SemiFluidGeneratorBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles/generator/advanced/TileThermalGenerator.java => blockentity/generator/advanced/ThermalGeneratorBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles/generator/basic/TileSolidFuelGenerator.java => blockentity/generator/basic/SolidFuelGeneratorBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles/generator/basic/TileWaterMill.java => blockentity/generator/basic/WaterMillBlockEntity.java} (91%) rename src/main/java/techreborn/{tiles/generator/basic/TileWindMill.java => blockentity/generator/basic/WindMillBlockEntity.java} (91%) rename src/main/java/techreborn/{tiles/lighting/TileLamp.java => blockentity/lighting/LampBlockEntity.java} (91%) rename src/main/java/techreborn/{tiles/machine/iron/TileIronAlloyFurnace.java => blockentity/machine/iron/IronAlloyFurnaceBlockEntity.java} (91%) rename src/main/java/techreborn/{tiles/machine/iron/TileIronFurnace.java => blockentity/machine/iron/IronFurnaceBlockEntity.java} (87%) rename src/main/java/techreborn/{tiles/machine/multiblock/TileDistillationTower.java => blockentity/machine/multiblock/DistillationTowerBlockEntity.java} (86%) rename src/main/java/techreborn/{tiles/machine/multiblock/TileFluidReplicator.java => blockentity/machine/multiblock/FluidReplicatorBlockEntity.java} (83%) rename src/main/java/techreborn/{tiles/machine/multiblock/TileImplosionCompressor.java => blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java} (84%) rename src/main/java/techreborn/{tiles/machine/multiblock/TileIndustrialBlastFurnace.java => blockentity/machine/multiblock/IndustrialBlastFurnaceBlockEntity.java} (78%) rename src/main/java/techreborn/{tiles/machine/multiblock/TileIndustrialGrinder.java => blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles/machine/multiblock/TileIndustrialSawmill.java => blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles => blockentity}/machine/multiblock/MultiblockChecker.java (98%) rename src/main/java/techreborn/{tiles/machine/multiblock/TileVacuumFreezer.java => blockentity/machine/multiblock/VacuumFreezerBlockEntity.java} (84%) rename src/main/java/techreborn/{tiles/machine/tier1/TileAlloySmelter.java => blockentity/machine/tier1/AlloySmelterBlockEntity.java} (84%) rename src/main/java/techreborn/{tiles/machine/tier1/TileAssemblingMachine.java => blockentity/machine/tier1/AssemblingMachineBlockEntity.java} (80%) rename src/main/java/techreborn/{tiles/machine/tier1/TileAutoCraftingTable.java => blockentity/machine/tier1/AutoCraftingTableBlockEntity.java} (93%) rename src/main/java/techreborn/{tiles/machine/tier1/TileChemicalReactor.java => blockentity/machine/tier1/ChemicalReactorBlockEntity.java} (80%) rename src/main/java/techreborn/{tiles/machine/tier1/TileCompressor.java => blockentity/machine/tier1/CompressorBlockEntity.java} (81%) rename src/main/java/techreborn/{tiles/machine/tier1/TileElectricFurnace.java => blockentity/machine/tier1/ElectricFurnaceBlockEntity.java} (90%) rename src/main/java/techreborn/{tiles/machine/tier1/TileExtractor.java => blockentity/machine/tier1/ExtractorBlockEntity.java} (82%) rename src/main/java/techreborn/{tiles/machine/tier1/TileGrinder.java => blockentity/machine/tier1/GrinderBlockEntity.java} (83%) rename src/main/java/techreborn/{tiles/machine/tier1/TileIndustrialElectrolyzer.java => blockentity/machine/tier1/IndustrialElectrolyzerBlockEntity.java} (83%) rename src/main/java/techreborn/{tiles/machine/tier1/TilePlayerDectector.java => blockentity/machine/tier1/PlayerDectectorBlockEntity.java} (92%) rename src/main/java/techreborn/{tiles/machine/tier1/TileRecycler.java => blockentity/machine/tier1/RecyclerBlockEntity.java} (88%) rename src/main/java/techreborn/{tiles/machine/tier1/TileRollingMachine.java => blockentity/machine/tier1/RollingMachineBlockEntity.java} (94%) rename src/main/java/techreborn/{tiles/machine/tier1/TileScrapboxinator.java => blockentity/machine/tier1/ScrapboxinatorBlockEntity.java} (81%) rename src/main/java/techreborn/{tiles/machine/tier3/TileChunkLoader.java => blockentity/machine/tier3/ChunkLoaderBlockEntity.java} (84%) rename src/main/java/techreborn/{tiles/machine/tier3/TileCreativeQuantumChest.java => blockentity/machine/tier3/CreativeQuantumChestBlockEntity.java} (86%) rename src/main/java/techreborn/{tiles/machine/tier3/TileCreativeQuantumTank.java => blockentity/machine/tier3/CreativeQuantumTankBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles/machine/tier3/TileMatterFabricator.java => blockentity/machine/tier3/MatterFabricatorBlockEntity.java} (90%) rename src/main/java/techreborn/{tiles/machine/tier3/TileQuantumChest.java => blockentity/machine/tier3/QuantumChestBlockEntity.java} (79%) rename src/main/java/techreborn/{tiles/machine/tier3/TileQuantumTank.java => blockentity/machine/tier3/QuantumTankBlockEntity.java} (81%) rename src/main/java/techreborn/{tiles/storage/TileAdjustableSU.java => blockentity/storage/AdjustableSUBlockEntity.java} (86%) rename src/main/java/techreborn/{tiles/storage/TileEnergyStorage.java => blockentity/storage/EnergyStorageBlockEntity.java} (84%) rename src/main/java/techreborn/{tiles/storage/TileHighVoltageSU.java => blockentity/storage/HighVoltageSUBlockEntity.java} (79%) rename src/main/java/techreborn/{tiles/storage/TileLowVoltageSU.java => blockentity/storage/LowVoltageSUBlockEntity.java} (79%) rename src/main/java/techreborn/{tiles/storage/TileMediumVoltageSU.java => blockentity/storage/MediumVoltageSUBlockEntity.java} (79%) rename src/main/java/techreborn/{tiles => blockentity}/storage/idsu/IDSUManager.java (97%) rename src/main/java/techreborn/{tiles => blockentity}/storage/idsu/IDSUSaveManger.java (97%) rename src/main/java/techreborn/{tiles => blockentity}/storage/idsu/IDataIDSU.java (96%) rename src/main/java/techreborn/{tiles/storage/idsu/TileInterdimensionalSU.java => blockentity/storage/idsu/InterdimensionalSUBlockEntity.java} (87%) rename src/main/java/techreborn/{tiles/storage/lesu/TileLSUStorage.java => blockentity/storage/lesu/LSUStorageBlockEntity.java} (82%) rename src/main/java/techreborn/{tiles/storage/lesu/TileLapotronicSU.java => blockentity/storage/lesu/LapotronicSUBlockEntity.java} (85%) rename src/main/java/techreborn/{tiles => blockentity}/storage/lesu/LesuNetwork.java (72%) rename src/main/java/techreborn/{tiles/transformers/TileMVTransformer.java => blockentity/transformers/HVTransformerBlockEntity.java} (80%) rename src/main/java/techreborn/{tiles/transformers/TileHVTransformer.java => blockentity/transformers/LVTransformerBlockEntity.java} (80%) rename src/main/java/techreborn/{tiles/transformers/TileLVTransformer.java => blockentity/transformers/MVTransformerBlockEntity.java} (80%) rename src/main/java/techreborn/{tiles/transformers/TileTransformer.java => blockentity/transformers/TransformerBlockEntity.java} (92%) create mode 100644 src/main/java/techreborn/init/TRBlockEntities.java delete mode 100644 src/main/java/techreborn/init/TRTileEntities.java diff --git a/src/main/java/techreborn/TechReborn.java b/src/main/java/techreborn/TechReborn.java index 40bed57ad..d239f1314 100644 --- a/src/main/java/techreborn/TechReborn.java +++ b/src/main/java/techreborn/TechReborn.java @@ -42,7 +42,7 @@ import techreborn.init.*; import techreborn.packets.ClientboundPackets; import techreborn.packets.ServerboundPackets; import techreborn.proxies.CommonProxy; -import techreborn.tiles.fusionReactor.TileFusionControlComputer; +import techreborn.blockentity.fusionReactor.FusionControlComputerBlockEntity; import techreborn.utils.BehaviorDispenseScrapbox; import techreborn.utils.StackWIPHandler; import techreborn.world.WorldGenerator; @@ -116,7 +116,7 @@ public class TechReborn implements ModInitializer { DispenserBlock.registerBehavior(TRContent.SCRAP_BOX, new BehaviorDispenseScrapbox()); } - Torus.genSizeMap(TileFusionControlComputer.maxCoilSize); + Torus.genSizeMap(FusionControlComputerBlockEntity.maxCoilSize); proxy.postInit(); diff --git a/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipe.java b/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipe.java index b880da87c..371331378 100644 --- a/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipe.java +++ b/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipe.java @@ -27,7 +27,7 @@ package techreborn.api.fluidreplicator; import net.minecraft.util.math.BlockPos; import reborncore.fluid.Fluid; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileFluidReplicator; +import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity; import techreborn.utils.FluidUtils; import javax.annotation.Nonnull; @@ -105,19 +105,19 @@ public class FluidReplicatorRecipe implements Cloneable { return false; } - public boolean canCraft(TileFluidReplicator tile) { - if (!tile.getMultiBlock()) { + public boolean canCraft(FluidReplicatorBlockEntity blockEntity) { + if (!blockEntity.getMultiBlock()) { return false; } - final BlockPos hole = tile.getPos().offset(tile.getFacing().getOpposite(), 2); - final Fluid fluid = techreborn.utils.FluidUtils.fluidFromBlock(tile.getWorld().getBlockState(hole).getBlock()); + final BlockPos hole = blockEntity.getPos().offset(blockEntity.getFacing().getOpposite(), 2); + final Fluid fluid = techreborn.utils.FluidUtils.fluidFromBlock(blockEntity.getWorld().getBlockState(hole).getBlock()); if (fluid == null) { return false; } if (!FluidUtils.fluidEquals(fluid, output)) { return false; } - final Fluid tankFluid = tile.tank.getFluidType(); + final Fluid tankFluid = blockEntity.tank.getFluidType(); if (tankFluid != null && !FluidUtils.fluidEquals(tankFluid, fluid)) { return false; } @@ -125,7 +125,7 @@ public class FluidReplicatorRecipe implements Cloneable { return true; } - public boolean onCraft(TileFluidReplicator tile) { + public boolean onCraft(FluidReplicatorBlockEntity blockEntity) { return true; } diff --git a/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipeCrafter.java b/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipeCrafter.java index b1b8a56e8..bca5335e7 100644 --- a/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipeCrafter.java +++ b/src/main/java/techreborn/api/fluidreplicator/FluidReplicatorRecipeCrafter.java @@ -33,7 +33,7 @@ import reborncore.fluid.Fluid; import reborncore.fluid.FluidStack; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileFluidReplicator; +import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity; /** * @author drcrazy @@ -47,13 +47,13 @@ public class FluidReplicatorRecipeCrafter extends RecipeCrafter { /** * RecipeCrafter for Fluid Replicator * - * @param parentTile TileEntity Reference to the tile having this crafter + * @param parent BlockEntity Reference to the blockEntity having this crafter * @param inventory Inventory reference to inventory used for crafting * @param inputSlots This is the list of the slots that the crafting logic should look for the input UU-Matter. * @param outputSlots This is the list of slots that the crafting logic should look for output fluid */ - public FluidReplicatorRecipeCrafter(BlockEntity parentTile, RebornInventory inventory, int[] inputSlots, int[] outputSlots) { - super(ModRecipes.FLUID_REPLICATOR, parentTile, 1, 1, inventory, inputSlots, outputSlots); + public FluidReplicatorRecipeCrafter(BlockEntity parent, RebornInventory inventory, int[] inputSlots, int[] outputSlots) { + super(ModRecipes.FLUID_REPLICATOR, parent, 1, 1, inventory, inputSlots, outputSlots); } /** @@ -92,7 +92,7 @@ public class FluidReplicatorRecipeCrafter extends RecipeCrafter { // RecipeCrafter @Override public void updateEntity() { - if (tile.getWorld().isClient) { + if (blockEntity.getWorld().isClient) { return; } ticksSinceLastChange++; @@ -114,18 +114,18 @@ public class FluidReplicatorRecipeCrafter extends RecipeCrafter { } // If it has reached the recipe tick time if (currentRecipe != null && currentTickTime >= currentNeededTicks && hasAllInputs()) { - TileFluidReplicator tileFluidReplicator = (TileFluidReplicator) tile; + FluidReplicatorBlockEntity blockEntityFluidReplicator = (FluidReplicatorBlockEntity) blockEntity; // Checks to see if it can fit the output // And fill tank with replicated fluid - if (canFit(currentRecipe.getFluid(), tileFluidReplicator.tank) && currentRecipe.onCraft(tileFluidReplicator)) { - tileFluidReplicator.tank.fill(new FluidStack(currentRecipe.getFluid(), 1000), true); + if (canFit(currentRecipe.getFluid(), blockEntityFluidReplicator.tank) && currentRecipe.onCraft(blockEntityFluidReplicator)) { + blockEntityFluidReplicator.tank.fill(new FluidStack(currentRecipe.getFluid(), 1000), true); // This uses all the inputs useAllInputs(); // Reset currentRecipe = null; currentTickTime = 0; updateCurrentRecipe(); - //Update active state if the tile isnt going to start crafting again + //Update active state if the blockEntity isnt going to start crafting again if(currentRecipe == null){ setIsActive(); } @@ -137,7 +137,7 @@ public class FluidReplicatorRecipeCrafter extends RecipeCrafter { // Increase the ticktime currentTickTime ++; if(currentTickTime == 1 || currentTickTime % 20 == 0 && soundHanlder != null){ - soundHanlder.playSound(false, tile); + soundHanlder.playSound(false, blockEntity); } } } @@ -147,10 +147,10 @@ public class FluidReplicatorRecipeCrafter extends RecipeCrafter { @Override public void updateCurrentRecipe() { - TileFluidReplicator tileFluidReplicator = (TileFluidReplicator) tile; + FluidReplicatorBlockEntity blockEntityFluidReplicator = (FluidReplicatorBlockEntity) blockEntity; for (FluidReplicatorRecipe recipe : FluidReplicatorRecipeList.recipes) { - if (recipe.canCraft(tileFluidReplicator) && hasAllInputs(recipe)) { - if (!canFit(recipe.getFluid(), tileFluidReplicator.tank)) { + if (recipe.canCraft(blockEntityFluidReplicator) && hasAllInputs(recipe)) { + if (!canFit(recipe.getFluid(), blockEntityFluidReplicator.tank)) { this.currentRecipe = null; currentTickTime = 0; setIsActive(); @@ -187,10 +187,10 @@ public class FluidReplicatorRecipeCrafter extends RecipeCrafter { @Override public boolean canCraftAgain() { - TileFluidReplicator tileFluidReplicator = (TileFluidReplicator) tile; + FluidReplicatorBlockEntity blockEntityFluidReplicator = (FluidReplicatorBlockEntity) blockEntity; for (FluidReplicatorRecipe recipe : FluidReplicatorRecipeList.recipes) { - if (recipe.canCraft(tileFluidReplicator) && hasAllInputs(recipe)) { - if (!canFit(recipe.getFluid(), tileFluidReplicator.tank)) { + if (recipe.canCraft(blockEntityFluidReplicator) && hasAllInputs(recipe)) { + if (!canFit(recipe.getFluid(), blockEntityFluidReplicator.tank)) { return false; } if (energy.getEnergy() < recipe.getEuTick()) { diff --git a/src/main/java/techreborn/api/recipe/ScrapboxRecipeCrafter.java b/src/main/java/techreborn/api/recipe/ScrapboxRecipeCrafter.java index cfc519f4e..249e0c1d6 100644 --- a/src/main/java/techreborn/api/recipe/ScrapboxRecipeCrafter.java +++ b/src/main/java/techreborn/api/recipe/ScrapboxRecipeCrafter.java @@ -39,19 +39,19 @@ import java.util.List; public class ScrapboxRecipeCrafter extends RecipeCrafter { /** - * @param parentTile Tile having this crafter - * @param inventory Inventory from parent tile + * @param parent Tile having this crafter + * @param inventory Inventory from parent blockEntity * @param inputSlots Slot IDs for input * @param outputSlots Slot IDs for output */ - public ScrapboxRecipeCrafter(BlockEntity parentTile, RebornInventory inventory, int[] inputSlots, int[] outputSlots) { - super(ModRecipes.SCRAPBOX, parentTile, 1, 1, inventory, inputSlots, outputSlots); + public ScrapboxRecipeCrafter(BlockEntity parent, RebornInventory inventory, int[] inputSlots, int[] outputSlots) { + super(ModRecipes.SCRAPBOX, parent, 1, 1, inventory, inputSlots, outputSlots); } @Override public void updateCurrentRecipe(){ - List scrapboxRecipeList = ModRecipes.SCRAPBOX.getRecipes(tile.getWorld()); - int random = tile.getWorld().random.nextInt(scrapboxRecipeList.size()); + List scrapboxRecipeList = ModRecipes.SCRAPBOX.getRecipes(blockEntity.getWorld()); + int random = blockEntity.getWorld().random.nextInt(scrapboxRecipeList.size()); // Sets the current recipe then syncs setCurrentRecipe(scrapboxRecipeList.get(random)); this.currentNeededTicks = Math.max((int) (currentRecipe.getTime() * (1.0 - getSpeedMultiplier())), 1); diff --git a/src/main/java/techreborn/api/recipe/recipes/BlastFurnaceRecipe.java b/src/main/java/techreborn/api/recipe/recipes/BlastFurnaceRecipe.java index 1b2b56f1a..b404ca0ce 100644 --- a/src/main/java/techreborn/api/recipe/recipes/BlastFurnaceRecipe.java +++ b/src/main/java/techreborn/api/recipe/recipes/BlastFurnaceRecipe.java @@ -30,7 +30,7 @@ import net.minecraft.util.Identifier; import net.minecraft.util.JsonHelper; import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipeType; -import techreborn.tiles.machine.multiblock.TileIndustrialBlastFurnace; +import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity; public class BlastFurnaceRecipe extends RebornRecipe { @@ -53,16 +53,16 @@ public class BlastFurnaceRecipe extends RebornRecipe { } @Override - public boolean canCraft(final BlockEntity tile) { - if (tile instanceof TileIndustrialBlastFurnace) { - final TileIndustrialBlastFurnace blastFurnace = (TileIndustrialBlastFurnace) tile; + public boolean canCraft(final BlockEntity blockEntity) { + if (blockEntity instanceof IndustrialBlastFurnaceBlockEntity) { + final IndustrialBlastFurnaceBlockEntity blastFurnace = (IndustrialBlastFurnaceBlockEntity) blockEntity; return blastFurnace.getHeat() >= heat; } return false; } @Override - public boolean onCraft(final BlockEntity tile) { + public boolean onCraft(final BlockEntity blockEntity) { return true; } } diff --git a/src/main/java/techreborn/api/recipe/recipes/IndustrialGrinderRecipe.java b/src/main/java/techreborn/api/recipe/recipes/IndustrialGrinderRecipe.java index 15b1291e9..b3faaa2da 100644 --- a/src/main/java/techreborn/api/recipe/recipes/IndustrialGrinderRecipe.java +++ b/src/main/java/techreborn/api/recipe/recipes/IndustrialGrinderRecipe.java @@ -29,7 +29,7 @@ import net.minecraft.util.Identifier; import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipeType; import reborncore.fluid.FluidStack; -import techreborn.tiles.machine.multiblock.TileIndustrialGrinder; +import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity; public class IndustrialGrinderRecipe extends RebornRecipe { @@ -41,13 +41,13 @@ public class IndustrialGrinderRecipe extends RebornRecipe { } @Override - public boolean canCraft(final BlockEntity tileEntity) { - TileIndustrialGrinder tile = (TileIndustrialGrinder) tileEntity; - if (!tile.getMultiBlock()) { + public boolean canCraft(final BlockEntity be) { + IndustrialGrinderBlockEntity blockEntity = (IndustrialGrinderBlockEntity) be; + if (!blockEntity.getMultiBlock()) { return false; } final FluidStack recipeFluid = fluidStack; - final FluidStack tankFluid = tile.tank.getFluid(); + final FluidStack tankFluid = blockEntity.tank.getFluid(); if (fluidStack == null) { return true; } @@ -63,10 +63,10 @@ public class IndustrialGrinderRecipe extends RebornRecipe { } @Override - public boolean onCraft(final BlockEntity tileEntity) { - TileIndustrialGrinder tile = (TileIndustrialGrinder) tileEntity; + public boolean onCraft(final BlockEntity be) { + IndustrialGrinderBlockEntity blockEntity = (IndustrialGrinderBlockEntity) be; final FluidStack recipeFluid = fluidStack; - final FluidStack tankFluid = tile.tank.getFluid(); + final FluidStack tankFluid = blockEntity.tank.getFluid(); if (fluidStack == null) { return true; } @@ -76,12 +76,12 @@ public class IndustrialGrinderRecipe extends RebornRecipe { if (tankFluid.isFluidEqual(recipeFluid)) { if (tankFluid.amount >= recipeFluid.amount) { if (tankFluid.amount == recipeFluid.amount) { - tile.tank.setFluid(null); + blockEntity.tank.setFluid(null); } else { tankFluid.amount -= recipeFluid.amount; } - tile.syncWithAll(); + blockEntity.syncWithAll(); return true; } } diff --git a/src/main/java/techreborn/api/recipe/recipes/IndustrialSawmillRecipe.java b/src/main/java/techreborn/api/recipe/recipes/IndustrialSawmillRecipe.java index af4ff19f4..650114776 100644 --- a/src/main/java/techreborn/api/recipe/recipes/IndustrialSawmillRecipe.java +++ b/src/main/java/techreborn/api/recipe/recipes/IndustrialSawmillRecipe.java @@ -29,7 +29,7 @@ import net.minecraft.util.Identifier; import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipeType; import reborncore.fluid.FluidStack; -import techreborn.tiles.machine.multiblock.TileIndustrialSawmill; +import techreborn.blockentity.machine.multiblock.IndustrialSawmillBlockEntity; public class IndustrialSawmillRecipe extends RebornRecipe { @@ -41,13 +41,13 @@ public class IndustrialSawmillRecipe extends RebornRecipe { } @Override - public boolean canCraft(BlockEntity tileEntity) { - TileIndustrialSawmill tile = (TileIndustrialSawmill) tileEntity; - if (!tile.getMutliBlock()) { + public boolean canCraft(BlockEntity be) { + IndustrialSawmillBlockEntity blockEntity = (IndustrialSawmillBlockEntity) be; + if (!blockEntity.getMutliBlock()) { return false; } final FluidStack recipeFluid = fluidStack; - final FluidStack tankFluid = tile.tank.getFluid(); + final FluidStack tankFluid = blockEntity.tank.getFluid(); if (fluidStack == null) { return true; } @@ -63,10 +63,10 @@ public class IndustrialSawmillRecipe extends RebornRecipe { } @Override - public boolean onCraft(BlockEntity tileEntity) { - TileIndustrialSawmill tile = (TileIndustrialSawmill) tileEntity; + public boolean onCraft(BlockEntity be) { + IndustrialSawmillBlockEntity blockEntity = (IndustrialSawmillBlockEntity) be; final FluidStack recipeFluid = fluidStack; - final FluidStack tankFluid = tile.tank.getFluid(); + final FluidStack tankFluid = blockEntity.tank.getFluid(); if (fluidStack == null) { return true; } @@ -76,11 +76,11 @@ public class IndustrialSawmillRecipe extends RebornRecipe { if (tankFluid.isFluidEqual(recipeFluid)) { if (tankFluid.amount >= recipeFluid.amount) { if (tankFluid.amount == recipeFluid.amount) { - tile.tank.setFluid(null); + blockEntity.tank.setFluid(null); } else { tankFluid.amount -= recipeFluid.amount; } - tile.syncWithAll(); + blockEntity.syncWithAll(); return true; } } diff --git a/src/main/java/techreborn/tiles/TileAlarm.java b/src/main/java/techreborn/blockentity/AlarmBlockEntity.java similarity index 94% rename from src/main/java/techreborn/tiles/TileAlarm.java rename to src/main/java/techreborn/blockentity/AlarmBlockEntity.java index 64fd64bdd..347e1d0d4 100644 --- a/src/main/java/techreborn/tiles/TileAlarm.java +++ b/src/main/java/techreborn/blockentity/AlarmBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.blockentity; import net.minecraft.util.Formatting; import net.minecraft.block.entity.BlockEntity; @@ -38,15 +38,15 @@ import reborncore.common.util.StringUtils; import techreborn.blocks.BlockAlarm; import techreborn.init.ModSounds; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import techreborn.utils.MessageIDs; -public class TileAlarm extends BlockEntity +public class AlarmBlockEntity extends BlockEntity implements Tickable, IToolDrop { private int selectedSound = 1; - public TileAlarm() { - super(TRTileEntities.ALARM); + public AlarmBlockEntity() { + super(TRBlockEntities.ALARM); } public void rightClick() { @@ -61,7 +61,7 @@ public class TileAlarm extends BlockEntity } } - // TileEntity + // BlockEntity @Override public CompoundTag toTag(CompoundTag compound) { if (compound == null) { diff --git a/src/main/java/techreborn/tiles/TileChargeOMat.java b/src/main/java/techreborn/blockentity/ChargeOMatBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/TileChargeOMat.java rename to src/main/java/techreborn/blockentity/ChargeOMatBlockEntity.java index 49bba0505..196e7cbdc 100644 --- a/src/main/java/techreborn/tiles/TileChargeOMat.java +++ b/src/main/java/techreborn/blockentity/ChargeOMatBlockEntity.java @@ -22,27 +22,27 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.blockentity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.powerSystem.ExternalPowerSystems; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileChargeOMat extends TilePowerAcceptor +public class ChargeOMatBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "charge_bench", key = "ChargeBenchMaxOutput", comment = "Charge Bench Max Output (Value in EU)") @@ -52,10 +52,10 @@ public class TileChargeOMat extends TilePowerAcceptor @ConfigRegistry(config = "machines", category = "charge_bench", key = "ChargeBenchMaxEnergy", comment = "Charge Bench Max Energy (Value in EU)") public static int maxEnergy = 100_000_000; - public RebornInventory inventory = new RebornInventory<>(6, "TileChargeOMat", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(6, "ChargeOMatBlockEntity", 64, this).withConfiguredAccess(); - public TileChargeOMat() { - super(TRTileEntities.CHARGE_O_MAT); + public ChargeOMatBlockEntity() { + super(TRBlockEntities.CHARGE_O_MAT); } // TilePowerAcceptor @@ -114,7 +114,7 @@ public class TileChargeOMat extends TilePowerAcceptor // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } @@ -122,7 +122,7 @@ public class TileChargeOMat extends TilePowerAcceptor @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("chargebench").player(player.inventory).inventory().hotbar().addInventory() - .tile(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); } } diff --git a/src/main/java/techreborn/tiles/TileDigitalChest.java b/src/main/java/techreborn/blockentity/DigitalChestBlockEntity.java similarity index 83% rename from src/main/java/techreborn/tiles/TileDigitalChest.java rename to src/main/java/techreborn/blockentity/DigitalChestBlockEntity.java index 57682e173..860b4498b 100644 --- a/src/main/java/techreborn/tiles/TileDigitalChest.java +++ b/src/main/java/techreborn/blockentity/DigitalChestBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.blockentity; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -31,21 +31,21 @@ import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileDigitalChest extends TileTechStorageBase implements IContainerProvider { +public class DigitalChestBlockEntity extends TechStorageBaseBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "digital_chest", key = "DigitalChestMaxStorage", comment = "Maximum amount of items a Digital Chest can store") public static int maxStorage = 32768; - public TileDigitalChest() { - super(TRTileEntities.DIGITAL_CHEST,"TileDigitalChest", maxStorage); + public DigitalChestBlockEntity() { + super(TRBlockEntities.DIGITAL_CHEST, "DigitalChestBlockEntity", maxStorage); } @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("digitalchest").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this, syncID); + .blockEntity(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/TileGenericMachine.java b/src/main/java/techreborn/blockentity/GenericMachineBlockEntity.java similarity index 86% rename from src/main/java/techreborn/tiles/TileGenericMachine.java rename to src/main/java/techreborn/blockentity/GenericMachineBlockEntity.java index 38b323680..1713e30ef 100644 --- a/src/main/java/techreborn/tiles/TileGenericMachine.java +++ b/src/main/java/techreborn/blockentity/GenericMachineBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.blockentity; import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntityType; @@ -31,8 +31,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; import reborncore.api.recipe.IRecipeCrafterProvider; -import reborncore.api.tile.InventoryProvider; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.api.blockentity.InventoryProvider; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.recipes.RecipeCrafter; import reborncore.common.util.RebornInventory; @@ -40,7 +40,7 @@ import reborncore.common.util.RebornInventory; * @author drcrazy * */ -public abstract class TileGenericMachine extends TilePowerAcceptor +public abstract class GenericMachineBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IRecipeCrafterProvider{ public String name; @@ -52,15 +52,15 @@ public abstract class TileGenericMachine extends TilePowerAcceptor public RecipeCrafter crafter; /** - * @param name String Name for a tile. Do we need it at all? + * @param name String Name for a blockEntity. Do we need it at all? * @param maxInput int Maximum energy input, value in EU * @param maxEnergy int Maximum energy buffer, value in EU * @param toolDrop Block Block to drop with wrench * @param energySlot int Energy slot to use to charge machine from battery */ - public TileGenericMachine(BlockEntityType tileEntityType, String name, int maxInput, int maxEnergy, Block toolDrop, int energySlot) { - super(tileEntityType); - this.name = "Tile" + name; + public GenericMachineBlockEntity(BlockEntityType blockEntityType, String name, int maxInput, int maxEnergy, Block toolDrop, int energySlot) { + super(blockEntityType); + this.name = "BlockEntity" + name; this.maxInput = maxInput; this.maxEnergy = maxEnergy; this.toolDrop = toolDrop; diff --git a/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java b/src/main/java/techreborn/blockentity/IndustrialCentrifugeBlockEntity.java similarity index 84% rename from src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java rename to src/main/java/techreborn/blockentity/IndustrialCentrifugeBlockEntity.java index 685d7b3e0..f7d526b4e 100644 --- a/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java +++ b/src/main/java/techreborn/blockentity/IndustrialCentrifugeBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.blockentity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.text.LiteralText; @@ -39,24 +39,24 @@ import reborncore.common.util.ItemUtils; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import techreborn.items.DynamicCell; import java.util.List; @RebornRegister(TechReborn.MOD_ID) -public class TileIndustrialCentrifuge extends TileGenericMachine implements IContainerProvider, IListInfoProvider { +public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity implements IContainerProvider, IListInfoProvider { @ConfigRegistry(config = "machines", category = "centrifuge", key = "CentrifugeMaxInput", comment = "Centrifuge Max Input (Value in EU)") public static int maxInput = 32; @ConfigRegistry(config = "machines", category = "centrifuge", key = "CentrifugeMaxEnergy", comment = "Centrifuge Max Energy (Value in EU)") public static int maxEnergy = 10_000; - public TileIndustrialCentrifuge() { - super(TRTileEntities.INDUSTRIAL_CENTRIFUGE, "IndustrialCentrifuge", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block, 6); + public IndustrialCentrifugeBlockEntity() { + super(TRBlockEntities.INDUSTRIAL_CENTRIFUGE, "IndustrialCentrifuge", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block, 6); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2, 3, 4, 5 }; - this.inventory = new RebornInventory<>(7, "TileIndustrialCentrifuge", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(7, "IndustrialCentrifugeBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.CENTRIFUGE, this, 2, 4, this.inventory, inputs, outputs); } @@ -64,7 +64,7 @@ public class TileIndustrialCentrifuge extends TileGenericMachine implements ICon @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("centrifuge").player(player.inventory).inventory().hotbar() - .addInventory().tile(this) + .addInventory().blockEntity(this) .filterSlot(1, 40, 54, stack -> ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .filterSlot(0, 40, 34, stack -> !ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .outputSlot(2, 82, 44).outputSlot(3, 101, 25) @@ -74,8 +74,8 @@ public class TileIndustrialCentrifuge extends TileGenericMachine implements ICon // IListInfoProvider @Override - public void addInfo(final List info, final boolean isRealTile, boolean hasData) { - super.addInfo(info, isRealTile, hasData); + public void addInfo(final List info, final boolean isReal, boolean hasData) { + super.addInfo(info, isReal, hasData); info.add(new LiteralText("Round and round it goes")); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/TileMachineCasing.java b/src/main/java/techreborn/blockentity/MachineCasingBlockEntity.java similarity index 89% rename from src/main/java/techreborn/tiles/TileMachineCasing.java rename to src/main/java/techreborn/blockentity/MachineCasingBlockEntity.java index df027c051..9138764d3 100644 --- a/src/main/java/techreborn/tiles/TileMachineCasing.java +++ b/src/main/java/techreborn/blockentity/MachineCasingBlockEntity.java @@ -22,17 +22,17 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.blockentity; import reborncore.common.multiblock.MultiblockControllerBase; -import reborncore.common.multiblock.rectangular.RectangularMultiblockTileEntityBase; -import techreborn.init.TRTileEntities; +import reborncore.common.multiblock.rectangular.RectangularMultiblockBlockEntityBase; +import techreborn.init.TRBlockEntities; import techreborn.multiblocks.MultiBlockCasing; -public class TileMachineCasing extends RectangularMultiblockTileEntityBase { +public class MachineCasingBlockEntity extends RectangularMultiblockBlockEntityBase { - public TileMachineCasing() { - super(TRTileEntities.MACHINE_CASINGS); + public MachineCasingBlockEntity() { + super(TRBlockEntities.MACHINE_CASINGS); } @Override diff --git a/src/main/java/techreborn/tiles/TileTechStorageBase.java b/src/main/java/techreborn/blockentity/TechStorageBaseBlockEntity.java similarity index 90% rename from src/main/java/techreborn/tiles/TileTechStorageBase.java rename to src/main/java/techreborn/blockentity/TechStorageBaseBlockEntity.java index 7c5fa4645..b2983a8fd 100644 --- a/src/main/java/techreborn/tiles/TileTechStorageBase.java +++ b/src/main/java/techreborn/blockentity/TechStorageBaseBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.blockentity; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.entity.player.PlayerEntity; @@ -32,23 +32,23 @@ import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import reborncore.api.IListInfoProvider; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; -import reborncore.common.tile.TileMachineBase; +import reborncore.api.blockentity.InventoryProvider; +import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.util.RebornInventory; import reborncore.common.util.ItemUtils; import java.util.ArrayList; import java.util.List; -public class TileTechStorageBase extends TileMachineBase +public class TechStorageBaseBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IToolDrop, IListInfoProvider { public final int maxCapacity; - public final RebornInventory inventory; + public final RebornInventory inventory; public ItemStack storedItem; - public TileTechStorageBase(BlockEntityType tileEntityTypeIn, String name, int maxCapacity) { - super(tileEntityTypeIn); + public TechStorageBaseBlockEntity(BlockEntityType blockEntityTypeIn, String name, int maxCapacity) { + super(blockEntityTypeIn); this.maxCapacity = maxCapacity; storedItem = ItemStack.EMPTY; inventory = new RebornInventory<>(3, name, maxCapacity, this).withConfiguredAccess(); @@ -85,11 +85,11 @@ public class TileTechStorageBase extends TileMachineBase } public ItemStack getDropWithNBT() { - CompoundTag tileEntity = new CompoundTag(); + CompoundTag blockEntity = new CompoundTag(); ItemStack dropStack = new ItemStack(getBlockType(), 1); - writeWithoutCoords(tileEntity); + writeWithoutCoords(blockEntity); dropStack.setTag(new CompoundTag()); - dropStack.getTag().put("tileEntity", tileEntity); + dropStack.getTag().put("blockEntity", blockEntity); storedItem.setCount(0); inventory.setInvStack(1, ItemStack.EMPTY); syncWithAll(); @@ -207,7 +207,7 @@ public class TileTechStorageBase extends TileMachineBase // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } @@ -219,8 +219,8 @@ public class TileTechStorageBase extends TileMachineBase // IListInfoProvider @Override - public void addInfo(List info, boolean isRealTile, boolean hasData) { - if (isRealTile || hasData) { + public void addInfo(List info, boolean isReal, boolean hasData) { + if (isReal || hasData) { int size = 0; String name = "of nothing"; if (!storedItem.isEmpty()) { diff --git a/src/main/java/techreborn/tiles/cable/TileCable.java b/src/main/java/techreborn/blockentity/cable/CableBlockEntity.java similarity index 81% rename from src/main/java/techreborn/tiles/cable/TileCable.java rename to src/main/java/techreborn/blockentity/cable/CableBlockEntity.java index bff4cb7fa..a60766800 100644 --- a/src/main/java/techreborn/tiles/cable/TileCable.java +++ b/src/main/java/techreborn/blockentity/cable/CableBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.cable; +package techreborn.blockentity.cable; import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntity; @@ -42,7 +42,7 @@ import reborncore.common.powerSystem.PowerSystem; import reborncore.common.util.StringUtils; import techreborn.blocks.cable.BlockCable; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import java.util.ArrayList; import java.util.List; @@ -51,7 +51,7 @@ import java.util.List; * Created by modmuss50 on 19/05/2017. */ -public class TileCable extends BlockEntity +public class CableBlockEntity extends BlockEntity implements Tickable, IListInfoProvider, IToolDrop { public int power = 0; @@ -60,8 +60,8 @@ public class TileCable extends BlockEntity private ArrayList sendingFace = new ArrayList(); int ticksSinceLastChange = 0; - public TileCable() { - super(TRTileEntities.CABLE); + public CableBlockEntity() { + super(TRBlockEntities.CABLE); } private TRContent.Cables getCableType() { @@ -89,8 +89,8 @@ public class TileCable extends BlockEntity @Override public void fromTag(CompoundTag compound) { super.fromTag(compound); - if (compound.containsKey("TileCable")) { - power = compound.getCompound("TileCable").getInt("power"); + if (compound.containsKey("CableBlockEntity")) { + power = compound.getCompound("CableBlockEntity").getInt("power"); } } @@ -99,7 +99,7 @@ public class TileCable extends BlockEntity super.toTag(compound); if (power > 0) { CompoundTag data = new CompoundTag(); - compound.put("TileCable", data); + compound.put("CableBlockEntity", data); } return compound; } @@ -126,20 +126,20 @@ public class TileCable extends BlockEntity // ArrayList acceptors = new ArrayList(); // for (Direction face : Direction.values()) { -// BlockEntity tile = world.getBlockEntity(pos.offset(face)); +// BlockEntity blockEntity = world.getBlockEntity(pos.offset(face)); // -// if (tile == null) { +// if (blockEntity == null) { // continue; -// } else if (tile instanceof TileCable) { -// TileCable cable = (TileCable) tile; +// } else if (blockEntity instanceof TileCable) { +// TileCable cable = (TileCable) blockEntity; // if (power > cable.power && cable.canReceiveFromFace(face.getOpposite())) { -// acceptors.add((IEnergyStorage) tile); +// acceptors.add((IEnergyStorage) blockEntity); // if (!sendingFace.contains(face)) { // sendingFace.add(face); // } // } -// } else if (tile.getCapability(CapabilityEnergy.ENERGY, face.getOpposite()).isPresent()) { -// IEnergyStorage energyTile = tile.getCapability(CapabilityEnergy.ENERGY, face.getOpposite()).orElse(null); +// } else if (blockEntity.getCapability(CapabilityEnergy.ENERGY, face.getOpposite()).isPresent()) { +// IEnergyStorage energyTile = blockEntity.getCapability(CapabilityEnergy.ENERGY, face.getOpposite()).orElse(null); // if (energyTile != null && energyTile.canReceive()) { // acceptors.add(energyTile); // } @@ -147,10 +147,10 @@ public class TileCable extends BlockEntity // } // // if (acceptors.size() > 0 ) { -// for (IEnergyStorage tile : acceptors) { +// for (IEnergyStorage blockEntity : acceptors) { // int drain = Math.min(power, transferRate); -// if (drain > 0 && tile.receiveEnergy(drain, true) > 0) { -// int move = tile.receiveEnergy(drain, false); +// if (drain > 0 && blockEntity.receiveEnergy(drain, true) > 0) { +// int move = blockEntity.receiveEnergy(drain, false); // extractEnergy(move, false); // } // } @@ -159,8 +159,8 @@ public class TileCable extends BlockEntity // IListInfoProvider @Override - public void addInfo(List info, boolean isRealTile, boolean hasData) { - if (isRealTile) { + public void addInfo(List info, boolean isReal, boolean hasData) { + if (isReal) { info.add(new LiteralText(Formatting.GRAY + StringUtils.t("techreborn.tooltip.transferRate") + ": " + Formatting.GOLD + PowerSystem.getLocaliszedPowerFormatted(transferRate / RebornCoreConfig.euPerFU) + "/t")); diff --git a/src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java b/src/main/java/techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity.java similarity index 94% rename from src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java rename to src/main/java/techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity.java index b309d614e..b1c7f049f 100644 --- a/src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java +++ b/src/main/java/techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.fusionReactor; +package techreborn.blockentity.fusionReactor; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -30,12 +30,12 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.RebornCoreConfig; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; @@ -45,12 +45,12 @@ import techreborn.TechReborn; import techreborn.api.reactor.FusionReactorRecipe; import techreborn.api.reactor.FusionReactorRecipeHelper; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import java.util.List; @RebornRegister(TechReborn.MOD_ID) -public class TileFusionControlComputer extends TilePowerAcceptor +public class FusionControlComputerBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "fusion_reactor", key = "FusionReactorMaxInput", comment = "Fusion Reactor Max Input (Value in EU)") @@ -62,7 +62,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor @ConfigRegistry(config = "machines", category = "fusion_reactor", key = "FusionReactorMaxCoilSize", comment = "Fusion Reactor Max Coil size (Radius)") public static int maxCoilSize = 50; - public RebornInventory inventory; + public RebornInventory inventory; public int coilCount = 0; public int crafingTickTime = 0; @@ -77,10 +77,10 @@ public class TileFusionControlComputer extends TilePowerAcceptor boolean hasStartedCrafting = false; long lastTick = -1; - public TileFusionControlComputer() { - super(TRTileEntities.FUSION_CONTROL_COMPUTER); + public FusionControlComputerBlockEntity() { + super(TRBlockEntities.FUSION_CONTROL_COMPUTER); checkOverfill = false; - this.inventory = new RebornInventory<>(3, "TileFusionControlComputer", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(3, "FusionControlComputerBlockEntity", 64, this).withConfiguredAccess(); } /** @@ -373,7 +373,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } @@ -381,7 +381,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("fusionreactor").player(player.inventory).inventory().hotbar() - .addInventory().tile(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() .syncIntegerValue(this::getCoilStatus, this::setCoilStatus) .syncIntegerValue(this::getCrafingTickTime, this::setCrafingTickTime) .syncIntegerValue(this::getFinalTickTime, this::setFinalTickTime) diff --git a/src/main/java/techreborn/tiles/generator/TileBaseFluidGenerator.java b/src/main/java/techreborn/blockentity/generator/BaseFluidGeneratorBlockEntity.java similarity index 90% rename from src/main/java/techreborn/tiles/generator/TileBaseFluidGenerator.java rename to src/main/java/techreborn/blockentity/generator/BaseFluidGeneratorBlockEntity.java index c982217ce..c098a13b7 100644 --- a/src/main/java/techreborn/tiles/generator/TileBaseFluidGenerator.java +++ b/src/main/java/techreborn/blockentity/generator/BaseFluidGeneratorBlockEntity.java @@ -22,15 +22,15 @@ * SOFTWARE. */ -package techreborn.tiles.generator; +package techreborn.blockentity.generator; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.common.blocks.BlockMachineBase; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.util.RebornInventory; import reborncore.common.util.Tank; import reborncore.fluid.FluidStack; @@ -42,7 +42,7 @@ import techreborn.utils.FluidUtils; import javax.annotation.Nullable; -public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implements IToolDrop, InventoryProvider { +public abstract class BaseFluidGeneratorBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider { private final FluidGeneratorRecipeList recipes; private final int euTick; @@ -59,11 +59,11 @@ public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implement */ double pendingWithdraw = 0.0; - public TileBaseFluidGenerator(BlockEntityType tileEntityType, EFluidGenerator type, String tileName, int tankCapacity, int euTick) { - super(tileEntityType); + public BaseFluidGeneratorBlockEntity(BlockEntityType blockEntityType, EFluidGenerator type, String blockEntityName, int tankCapacity, int euTick) { + super(blockEntityType); recipes = GeneratorRecipeHelper.getFluidRecipesForGenerator(type); - tank = new Tank(tileName, tankCapacity, this); - inventory = new RebornInventory<>(3, tileName, 64, this).withConfiguredAccess(); + tank = new Tank(blockEntityName, tankCapacity, this); + inventory = new RebornInventory<>(3, blockEntityName, 64, this).withConfiguredAccess(); this.euTick = euTick; this.ticksSinceLastChange = 0; } @@ -84,7 +84,7 @@ public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implement FluidUtils.drainContainers(tank, inventory, 0, 1); FluidUtils.fillContainers(tank, inventory, 0, 1, tank.getFluidType()); } - tank.setTileEntity(this); + tank.setBlockEntity(this); tank.compareAndUpdate(); ticksSinceLastChange = 0; diff --git a/src/main/java/techreborn/tiles/generator/TileLightningRod.java b/src/main/java/techreborn/blockentity/generator/LightningRodBlockEntity.java similarity index 94% rename from src/main/java/techreborn/tiles/generator/TileLightningRod.java rename to src/main/java/techreborn/blockentity/generator/LightningRodBlockEntity.java index 2de8e879b..aeb8a2a25 100644 --- a/src/main/java/techreborn/tiles/generator/TileLightningRod.java +++ b/src/main/java/techreborn/blockentity/generator/LightningRodBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator; +package techreborn.blockentity.generator; import net.minecraft.block.Block; import net.minecraft.entity.LightningEntity; @@ -33,15 +33,15 @@ import net.minecraft.util.math.Direction; import net.minecraft.world.Heightmap; import reborncore.api.IToolDrop; import reborncore.common.blocks.BlockMachineBase; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileLightningRod extends TilePowerAcceptor implements IToolDrop { +public class LightningRodBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop { @ConfigRegistry(config = "generators", category = "lightning_rod", key = "LightningRodMaxOutput", comment = "Lightning Rod Max Output (Value in EU)") public static int maxOutput = 2048; @@ -54,8 +54,8 @@ public class TileLightningRod extends TilePowerAcceptor implements IToolDrop { private int onStatusHoldTicks = -1; - public TileLightningRod() { - super(TRTileEntities.LIGHTNING_ROD); + public LightningRodBlockEntity() { + super(TRBlockEntities.LIGHTNING_ROD); } @Override diff --git a/src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java b/src/main/java/techreborn/blockentity/generator/PlasmaGeneratorBlockEntity.java similarity index 88% rename from src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java rename to src/main/java/techreborn/blockentity/generator/PlasmaGeneratorBlockEntity.java index 3b3d9bae9..01d70e531 100644 --- a/src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java +++ b/src/main/java/techreborn/blockentity/generator/PlasmaGeneratorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator; +package techreborn.blockentity.generator; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -34,10 +34,10 @@ import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.api.generator.EFluidGenerator; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TilePlasmaGenerator extends TileBaseFluidGenerator implements IContainerProvider { +public class PlasmaGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { @ConfigRegistry(config = "generators", category = "plasma_generator", key = "PlasmaGeneratorMaxOutput", comment = "Plasma Generator Max Output (Value in EU)") public static int maxOutput = 2048; @@ -48,8 +48,8 @@ public class TilePlasmaGenerator extends TileBaseFluidGenerator implements ICont @ConfigRegistry(config = "generators", category = "plasma_generator", key = "PlasmaGeneratorEnergyPerTick", comment = "Plasma Generator Energy Per Tick (Value in EU)") public static int energyPerTick = 400; - public TilePlasmaGenerator() { - super(TRTileEntities.PLASMA_GENERATOR, EFluidGenerator.PLASMA, "TilePlasmaGenerator", tankCapacity, energyPerTick); + public PlasmaGeneratorBlockEntity() { + super(TRBlockEntities.PLASMA_GENERATOR, EFluidGenerator.PLASMA, "PlasmaGeneratorBlockEntity", tankCapacity, energyPerTick); } @Override @@ -70,7 +70,7 @@ public class TilePlasmaGenerator extends TileBaseFluidGenerator implements ICont @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("plasmagenerator").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() + .blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) .addInventory().create(this, syncID); diff --git a/src/main/java/techreborn/tiles/generator/TileSolarPanel.java b/src/main/java/techreborn/blockentity/generator/SolarPanelBlockEntity.java similarity index 91% rename from src/main/java/techreborn/tiles/generator/TileSolarPanel.java rename to src/main/java/techreborn/blockentity/generator/SolarPanelBlockEntity.java index add5a4b98..3da2c63ce 100644 --- a/src/main/java/techreborn/tiles/generator/TileSolarPanel.java +++ b/src/main/java/techreborn/blockentity/generator/SolarPanelBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator; +package techreborn.blockentity.generator; import net.minecraft.text.LiteralText; import net.minecraft.util.Formatting; @@ -35,23 +35,23 @@ import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; import reborncore.api.power.EnumPowerTier; import reborncore.common.powerSystem.PowerSystem; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.util.StringUtils; import techreborn.blocks.generator.BlockSolarPanel; import techreborn.init.TRContent; import techreborn.init.TRContent.SolarPanels; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import java.util.List; -public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop { +public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop { boolean canSeeSky = false; boolean lastState = false; SolarPanels panel; - public TileSolarPanel() { - super(TRTileEntities.SOLAR_PANEL); + public SolarPanelBlockEntity() { + super(TRBlockEntities.SOLAR_PANEL); } public boolean isSunOut() { @@ -126,7 +126,7 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop { // TODO: Translate @Override - public void addInfo(List info, boolean isRealTile, boolean hasData) { + public void addInfo(List info, boolean isReal, boolean hasData) { info.add(new LiteralText(Formatting.GRAY + "Internal Energy Storage: " + Formatting.GOLD + PowerSystem.getLocaliszedPowerFormatted((int) getMaxPower()))); @@ -143,7 +143,7 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop { @Override public void fromTag(CompoundTag tag) { if (world == null) { - // We are in TileEntity.create method during chunk load. + // We are in BlockEntity.create method during chunk load. this.checkOverfill = false; } super.fromTag(tag); diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java b/src/main/java/techreborn/blockentity/generator/advanced/DieselGeneratorBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java rename to src/main/java/techreborn/blockentity/generator/advanced/DieselGeneratorBlockEntity.java index 4e365491a..1ee57397d 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java +++ b/src/main/java/techreborn/blockentity/generator/advanced/DieselGeneratorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator.advanced; +package techreborn.blockentity.generator.advanced; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -34,11 +34,11 @@ import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.api.generator.EFluidGenerator; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.generator.TileBaseFluidGenerator; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileDieselGenerator extends TileBaseFluidGenerator implements IContainerProvider { +public class DieselGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { @ConfigRegistry(config = "generators", category = "diesel_generator", key = "DieselGeneratorMaxOutput", comment = "Diesel Generator Max Output (Value in EU)") public static int maxOutput = 128; @@ -49,8 +49,8 @@ public class TileDieselGenerator extends TileBaseFluidGenerator implements ICont @ConfigRegistry(config = "generators", category = "diesel_generator", key = "DieselGeneratorEnergyPerTick", comment = "Diesel Generator Energy Per Tick (Value in EU)") public static int energyPerTick = 20; - public TileDieselGenerator() { - super(TRTileEntities.DIESEL_GENERATOR, EFluidGenerator.DIESEL, "TileDieselGenerator", tankCapacity, energyPerTick); + public DieselGeneratorBlockEntity() { + super(TRBlockEntities.DIESEL_GENERATOR, EFluidGenerator.DIESEL, "DieselGeneratorBlockEntity", tankCapacity, energyPerTick); } @Override @@ -71,7 +71,7 @@ public class TileDieselGenerator extends TileBaseFluidGenerator implements ICont @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("dieselgenerator").player(player.inventory).inventory().hotbar() - .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() + .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) .addInventory().create(this, syncID); diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileDragonEggSyphon.java b/src/main/java/techreborn/blockentity/generator/advanced/DragonEggSyphonBlockEntity.java similarity index 87% rename from src/main/java/techreborn/tiles/generator/advanced/TileDragonEggSyphon.java rename to src/main/java/techreborn/blockentity/generator/advanced/DragonEggSyphonBlockEntity.java index f56c7eea1..a422b215b 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileDragonEggSyphon.java +++ b/src/main/java/techreborn/blockentity/generator/advanced/DragonEggSyphonBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator.advanced; +package techreborn.blockentity.generator.advanced; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; @@ -30,18 +30,18 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.common.blocks.BlockMachineBase; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileDragonEggSyphon extends TilePowerAcceptor +public class DragonEggSyphonBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider { @ConfigRegistry(config = "generators", category = "dragon_egg_siphoner", key = "DragonEggSiphonerMaxOutput", comment = "Dragon Egg Siphoner Max Output (Value in EU)") @@ -51,11 +51,11 @@ public class TileDragonEggSyphon extends TilePowerAcceptor @ConfigRegistry(config = "generators", category = "dragon_egg_siphoner", key = "DragonEggSiphonerEnergyPerTick", comment = "Dragon Egg Siphoner Energy Per Tick (Value in EU)") public static int energyPerTick = 4; - public RebornInventory inventory = new RebornInventory<>(3, "TileDragonEggSyphon", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(3, "DragonEggSyphonBlockEntity", 64, this).withConfiguredAccess(); private long lastOutput = 0; - public TileDragonEggSyphon() { - super(TRTileEntities.DRAGON_EGG_SYPHON); + public DragonEggSyphonBlockEntity() { + super(TRBlockEntities.DRAGON_EGG_SYPHON); } private boolean tryAddingEnergy(int amount) { @@ -122,7 +122,7 @@ public class TileDragonEggSyphon extends TilePowerAcceptor // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } } diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java b/src/main/java/techreborn/blockentity/generator/advanced/GasTurbineBlockEntity.java similarity index 86% rename from src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java rename to src/main/java/techreborn/blockentity/generator/advanced/GasTurbineBlockEntity.java index 4ba35307c..dd143daa6 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java +++ b/src/main/java/techreborn/blockentity/generator/advanced/GasTurbineBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator.advanced; +package techreborn.blockentity.generator.advanced; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -34,11 +34,11 @@ import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.api.generator.EFluidGenerator; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.generator.TileBaseFluidGenerator; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileGasTurbine extends TileBaseFluidGenerator implements IContainerProvider { +public class GasTurbineBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { @ConfigRegistry(config = "generators", category = "gas_generator", key = "GasGeneratorMaxOutput", comment = "Gas Generator Max Output (Value in EU)") public static int maxOutput = 128; @@ -49,8 +49,8 @@ public class TileGasTurbine extends TileBaseFluidGenerator implements IContainer @ConfigRegistry(config = "generators", category = "gas_generator", key = "GasGeneratorEnergyPerTick", comment = "Gas Generator Energy Per Tick (Value in EU)") public static int energyPerTick = 16; - public TileGasTurbine() { - super(TRTileEntities.GAS_TURBINE, EFluidGenerator.GAS, "TileGasTurbine", tankCapacity, energyPerTick); + public GasTurbineBlockEntity() { + super(TRBlockEntities.GAS_TURBINE, EFluidGenerator.GAS, "GasTurbineBlockEntity", tankCapacity, energyPerTick); } @Override @@ -71,7 +71,7 @@ public class TileGasTurbine extends TileBaseFluidGenerator implements IContainer @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("gasturbine").player(player.inventory).inventory().hotbar() - .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() + .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) .addInventory().create(this, syncID); diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java b/src/main/java/techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java rename to src/main/java/techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity.java index 8a188f72b..43a27a71c 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java +++ b/src/main/java/techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator.advanced; +package techreborn.blockentity.generator.advanced; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -34,11 +34,11 @@ import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.api.generator.EFluidGenerator; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.generator.TileBaseFluidGenerator; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileSemiFluidGenerator extends TileBaseFluidGenerator implements IContainerProvider { +public class SemiFluidGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { @ConfigRegistry(config = "generators", category = "semifluid_generator", key = "SemifluidGeneratorMaxOutput", comment = "Semifluid Generator Max Output (Value in EU)") public static int maxOutput = 128; @@ -49,8 +49,8 @@ public class TileSemiFluidGenerator extends TileBaseFluidGenerator implements IC @ConfigRegistry(config = "generators", category = "semifluid_generator", key = "SemifluidGeneratorEnergyPerTick", comment = "Semifluid Generator Energy Per Tick (Value in EU)") public static int energyPerTick = 8; - public TileSemiFluidGenerator() { - super(TRTileEntities.SEMI_FLUID_GENERATOR, EFluidGenerator.SEMIFLUID, "TileSemiFluidGenerator", tankCapacity, energyPerTick); + public SemiFluidGeneratorBlockEntity() { + super(TRBlockEntities.SEMI_FLUID_GENERATOR, EFluidGenerator.SEMIFLUID, "SemiFluidGeneratorBlockEntity", tankCapacity, energyPerTick); } @Override @@ -71,7 +71,7 @@ public class TileSemiFluidGenerator extends TileBaseFluidGenerator implements IC @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("semifluidgenerator").player(player.inventory).inventory().hotbar() - .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() + .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) .addInventory().create(this, syncID); diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java b/src/main/java/techreborn/blockentity/generator/advanced/ThermalGeneratorBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java rename to src/main/java/techreborn/blockentity/generator/advanced/ThermalGeneratorBlockEntity.java index 4f0bcfe94..8246ba43a 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java +++ b/src/main/java/techreborn/blockentity/generator/advanced/ThermalGeneratorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator.advanced; +package techreborn.blockentity.generator.advanced; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -34,11 +34,11 @@ import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.api.generator.EFluidGenerator; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.generator.TileBaseFluidGenerator; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.generator.BaseFluidGeneratorBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileThermalGenerator extends TileBaseFluidGenerator implements IContainerProvider { +public class ThermalGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity implements IContainerProvider { @ConfigRegistry(config = "generators", category = "thermal_generator", key = "ThermalGeneratorMaxOutput", comment = "Thermal Generator Max Output (Value in EU)") public static int maxOutput = 128; @@ -49,8 +49,8 @@ public class TileThermalGenerator extends TileBaseFluidGenerator implements ICon @ConfigRegistry(config = "generators", category = "thermal_generator", key = "ThermalGeneratorEnergyPerTick", comment = "Thermal Generator Energy Per Tick (Value in EU)") public static int energyPerTick = 16; - public TileThermalGenerator() { - super(TRTileEntities.THERMAL_GEN, EFluidGenerator.THERMAL, "TileThermalGenerator", tankCapacity, energyPerTick); + public ThermalGeneratorBlockEntity() { + super(TRBlockEntities.THERMAL_GEN, EFluidGenerator.THERMAL, "ThermalGeneratorBlockEntity", tankCapacity, energyPerTick); } @Override @@ -71,7 +71,7 @@ public class TileThermalGenerator extends TileBaseFluidGenerator implements ICon @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("thermalgenerator").player(player.inventory).inventory().hotbar() - .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() + .addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) .addInventory().create(this, syncID); diff --git a/src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java b/src/main/java/techreborn/blockentity/generator/basic/SolidFuelGeneratorBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java rename to src/main/java/techreborn/blockentity/generator/basic/SolidFuelGeneratorBlockEntity.java index 759b12bc5..93c54caee 100644 --- a/src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java +++ b/src/main/java/techreborn/blockentity/generator/basic/SolidFuelGeneratorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.generator.basic; +package techreborn.blockentity.generator.basic; import net.minecraft.block.BlockState; import net.minecraft.block.entity.FurnaceBlockEntity; @@ -32,21 +32,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.blocks.BlockMachineBase; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDrop, InventoryProvider, IContainerProvider { +public class SolidFuelGeneratorBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "generators", category = "generator", key = "GeneratorMaxOutput", comment = "Solid Fuel Generator Max Output (Value in EU)") public static int maxOutput = 32; @@ -55,7 +55,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr @ConfigRegistry(config = "generators", category = "generator", key = "GeneratorEnergyOutput", comment = "Solid Fuel Generator Energy Output Amount (Value in EU)") public static int outputAmount = 10; - public RebornInventory inventory = new RebornInventory<>(2, "TileSolidFuelGenerator", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(2, "SolidFuelGeneratorBlockEntity", 64, this).withConfiguredAccess(); public int fuelSlot = 0; public int burnTime; public int totalBurnTime = 0; @@ -65,8 +65,8 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr public boolean lastTickBurning; ItemStack burnItem; - public TileSolidFuelGenerator() { - super(TRTileEntities.SOLID_FUEL_GENEREATOR); + public SolidFuelGeneratorBlockEntity() { + super(TRBlockEntities.SOLID_FUEL_GENEREATOR); } public static int getItemBurnTime(ItemStack stack) { @@ -82,7 +82,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr if (getEnergy() < getMaxPower()) { if (burnTime > 0) { burnTime--; - addEnergy(TileSolidFuelGenerator.outputAmount); + addEnergy(SolidFuelGeneratorBlockEntity.outputAmount); isBurning = true; } } else { @@ -91,7 +91,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr if (burnTime == 0) { updateState(); - burnTime = totalBurnTime = TileSolidFuelGenerator.getItemBurnTime(inventory.getInvStack(fuelSlot)); + burnTime = totalBurnTime = SolidFuelGeneratorBlockEntity.getItemBurnTime(inventory.getInvStack(fuelSlot)); if (burnTime > 0) { updateState(); burnItem = inventory.getInvStack(fuelSlot); @@ -152,7 +152,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr } @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } @@ -179,7 +179,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("generator").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).fuelSlot(0, 80, 54).energySlot(1, 8, 72).syncEnergyValue() + .blockEntity(this).fuelSlot(0, 80, 54).energySlot(1, 8, 72).syncEnergyValue() .syncIntegerValue(this::getBurnTime, this::setBurnTime) .syncIntegerValue(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/generator/basic/TileWaterMill.java b/src/main/java/techreborn/blockentity/generator/basic/WaterMillBlockEntity.java similarity index 91% rename from src/main/java/techreborn/tiles/generator/basic/TileWaterMill.java rename to src/main/java/techreborn/blockentity/generator/basic/WaterMillBlockEntity.java index 36ab2a0a6..b85015653 100644 --- a/src/main/java/techreborn/tiles/generator/basic/TileWaterMill.java +++ b/src/main/java/techreborn/blockentity/generator/basic/WaterMillBlockEntity.java @@ -22,27 +22,27 @@ * SOFTWARE. */ -package techreborn.tiles.generator.basic; +package techreborn.blockentity.generator.basic; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.blocks.generator.BlockWindMill; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 25/02/2016. */ @RebornRegister(TechReborn.MOD_ID) -public class TileWaterMill extends TilePowerAcceptor implements IToolDrop { +public class WaterMillBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop { @ConfigRegistry(config = "generators", category = "water_mill", key = "WaterMillMaxOutput", comment = "Water Mill Max Output (Value in EU)") public static int maxOutput = 32; @@ -53,8 +53,8 @@ public class TileWaterMill extends TilePowerAcceptor implements IToolDrop { int waterblocks = 0; - public TileWaterMill() { - super(TRTileEntities.WATER_MILL); + public WaterMillBlockEntity() { + super(TRBlockEntities.WATER_MILL); } @Override diff --git a/src/main/java/techreborn/tiles/generator/basic/TileWindMill.java b/src/main/java/techreborn/blockentity/generator/basic/WindMillBlockEntity.java similarity index 91% rename from src/main/java/techreborn/tiles/generator/basic/TileWindMill.java rename to src/main/java/techreborn/blockentity/generator/basic/WindMillBlockEntity.java index 5cff54543..d9a000a33 100644 --- a/src/main/java/techreborn/tiles/generator/basic/TileWindMill.java +++ b/src/main/java/techreborn/blockentity/generator/basic/WindMillBlockEntity.java @@ -22,25 +22,25 @@ * SOFTWARE. */ -package techreborn.tiles.generator.basic; +package techreborn.blockentity.generator.basic; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 25/02/2016. */ @RebornRegister(TechReborn.MOD_ID) -public class TileWindMill extends TilePowerAcceptor implements IToolDrop { +public class WindMillBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop { @ConfigRegistry(config = "generators", category = "wind_mill", key = "WindMillMaxOutput", comment = "Wind Mill Max Output (Value in EU)") public static int maxOutput = 128; @@ -51,8 +51,8 @@ public class TileWindMill extends TilePowerAcceptor implements IToolDrop { @ConfigRegistry(config = "generators", category = "wind_mill", key = "WindMillThunderMultiplier", comment = "Wind Mill Thunder Multiplier") public static double thunderMultiplier = 1.25; - public TileWindMill() { - super(TRTileEntities.WIND_MILL); + public WindMillBlockEntity() { + super(TRBlockEntities.WIND_MILL); } @Override diff --git a/src/main/java/techreborn/tiles/lighting/TileLamp.java b/src/main/java/techreborn/blockentity/lighting/LampBlockEntity.java similarity index 91% rename from src/main/java/techreborn/tiles/lighting/TileLamp.java rename to src/main/java/techreborn/blockentity/lighting/LampBlockEntity.java index 44d3a759a..3804e04f0 100644 --- a/src/main/java/techreborn/tiles/lighting/TileLamp.java +++ b/src/main/java/techreborn/blockentity/lighting/LampBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.lighting; +package techreborn.blockentity.lighting; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -30,17 +30,17 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import techreborn.blocks.lighting.BlockLamp; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; -public class TileLamp extends TilePowerAcceptor +public class LampBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop { private static int capacity = 33; - public TileLamp() { - super(TRTileEntities.LAMP); + public LampBlockEntity() { + super(TRBlockEntities.LAMP); } // TilePowerAcceptor diff --git a/src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java b/src/main/java/techreborn/blockentity/machine/iron/IronAlloyFurnaceBlockEntity.java similarity index 91% rename from src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java rename to src/main/java/techreborn/blockentity/machine/iron/IronAlloyFurnaceBlockEntity.java index b54bf2810..c31c281ba 100644 --- a/src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java +++ b/src/main/java/techreborn/blockentity/machine/iron/IronAlloyFurnaceBlockEntity.java @@ -22,33 +22,33 @@ * SOFTWARE. */ -package techreborn.tiles.machine.iron; +package techreborn.blockentity.machine.iron; import net.minecraft.block.entity.FurnaceBlockEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.crafting.RebornIngredient; import reborncore.common.crafting.RebornRecipe; import reborncore.common.registration.RebornRegister; -import reborncore.common.tile.TileMachineBase; +import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileIronAlloyFurnace extends TileMachineBase +public class IronAlloyFurnaceBlockEntity extends MachineBaseBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { public int tickTime; - public RebornInventory inventory = new RebornInventory<>(4, "TileIronAlloyFurnace", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(4, "IronAlloyFurnaceBlockEntity", 64, this).withConfiguredAccess(); public int burnTime; public int currentItemBurnTime; public int cookTime; @@ -57,8 +57,8 @@ public class TileIronAlloyFurnace extends TileMachineBase int output = 2; int fuel = 3; - public TileIronAlloyFurnace() { - super(TRTileEntities.IRON_ALLOY_FURNACE); + public IronAlloyFurnaceBlockEntity() { + super(TRBlockEntities.IRON_ALLOY_FURNACE); } /** @@ -86,7 +86,7 @@ public class TileIronAlloyFurnace extends TileMachineBase if (!this.world.isClient) { if (this.burnTime != 0 || !inventory.getInvStack(this.input1).isEmpty()&& !inventory.getInvStack(this.fuel).isEmpty()) { if (this.burnTime == 0 && this.canSmelt()) { - this.currentItemBurnTime = this.burnTime = TileIronAlloyFurnace.getItemBurnTime(inventory.getInvStack(this.fuel)); + this.currentItemBurnTime = this.burnTime = IronAlloyFurnaceBlockEntity.getItemBurnTime(inventory.getInvStack(this.fuel)); if (this.burnTime > 0) { flag1 = true; if (!inventory.getInvStack(this.fuel).isEmpty()) { @@ -242,7 +242,7 @@ public class TileIronAlloyFurnace extends TileMachineBase } @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return this.inventory; } @@ -274,7 +274,7 @@ public class TileIronAlloyFurnace extends TileMachineBase @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("alloyfurnace").player(player.inventory).inventory(8, 84).hotbar(8, 142) - .addInventory().tile(this) + .addInventory().blockEntity(this) .filterSlot(0, 47, 17, stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(0).test(stack))) .filterSlot(1, 65, 17, diff --git a/src/main/java/techreborn/tiles/machine/iron/TileIronFurnace.java b/src/main/java/techreborn/blockentity/machine/iron/IronFurnaceBlockEntity.java similarity index 87% rename from src/main/java/techreborn/tiles/machine/iron/TileIronFurnace.java rename to src/main/java/techreborn/blockentity/machine/iron/IronFurnaceBlockEntity.java index afed66caa..49d627736 100644 --- a/src/main/java/techreborn/tiles/machine/iron/TileIronFurnace.java +++ b/src/main/java/techreborn/blockentity/machine/iron/IronFurnaceBlockEntity.java @@ -22,30 +22,30 @@ * SOFTWARE. */ -package techreborn.tiles.machine.iron; +package techreborn.blockentity.machine.iron; import net.minecraft.block.BlockState; import net.minecraft.block.entity.FurnaceBlockEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.recipe.RecipeType; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.blocks.BlockMachineBase; -import reborncore.common.tile.TileMachineBase; +import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.util.IInventoryAccess; import reborncore.common.util.RebornInventory; import reborncore.common.util.ItemUtils; import techreborn.events.TRRecipeHandler; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; -public class TileIronFurnace extends TileMachineBase +public class IronFurnaceBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IContainerProvider { public int tickTime; - public RebornInventory inventory = new RebornInventory<>(3, "TileIronFurnace", 64, this, getInvetoryAccess()); + public RebornInventory inventory = new RebornInventory<>(3, "IronFurnaceBlockEntity", 64, this, getInvetoryAccess()); public int fuel; public int fuelGague; public int progress; @@ -55,8 +55,8 @@ public class TileIronFurnace extends TileMachineBase int fuelslot = 2; boolean active = false; - public TileIronFurnace() { - super(TRTileEntities.IRON_FURNACE); + public IronFurnaceBlockEntity() { + super(TRBlockEntities.IRON_FURNACE); } public int gaugeProgressScaled(final int scale) { @@ -171,21 +171,21 @@ public class TileIronFurnace extends TileMachineBase } @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return this.inventory; } - public static IInventoryAccess getInvetoryAccess(){ - return (slotID, stack, face, direction, tile) -> { + public static IInventoryAccess getInvetoryAccess(){ + return (slotID, stack, face, direction, blockEntity) -> { if(direction == IInventoryAccess.AccessDirection.INSERT){ boolean isFuel = FurnaceBlockEntity.canUseAsFuel(stack); if(isFuel){ - ItemStack fuelSlotStack = tile.inventory.getInvStack(tile.fuelslot); + ItemStack fuelSlotStack = blockEntity.inventory.getInvStack(blockEntity.fuelslot); if(fuelSlotStack.isEmpty() || ItemUtils.isItemEqual(stack, fuelSlotStack, true, true) && fuelSlotStack.getMaxCount() != fuelSlotStack.getCount()){ - return slotID == tile.fuelslot; + return slotID == blockEntity.fuelslot; } } - return slotID != tile.output; + return slotID != blockEntity.output; } return true; }; @@ -223,7 +223,7 @@ public class TileIronFurnace extends TileMachineBase @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("ironfurnace").player(player.inventory).inventory(8, 84).hotbar(8, 142) - .addInventory().tile(this).fuelSlot(2, 56, 53).slot(0, 56, 17).outputSlot(1, 116, 35) + .addInventory().blockEntity(this).fuelSlot(2, 56, 53).slot(0, 56, 17).outputSlot(1, 116, 35) .syncIntegerValue(this::getBurnTime, this::setBurnTime) .syncIntegerValue(this::getProgress, this::setProgress) .syncIntegerValue(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this, syncID); diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java b/src/main/java/techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity.java similarity index 86% rename from src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java rename to src/main/java/techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity.java index 66fe4bec4..be0abc3c5 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.block.Material; import net.minecraft.entity.player.PlayerEntity; @@ -37,11 +37,11 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileDistillationTower extends TileGenericMachine implements IContainerProvider { +public class DistillationTowerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "Distillation_tower", key = "DistillationTowerMaxInput", comment = "Distillation Tower Max Input (Value in EU)") public static int maxInput = 128; @@ -50,11 +50,11 @@ public class TileDistillationTower extends TileGenericMachine implements IContai public MultiblockChecker multiblockChecker; - public TileDistillationTower() { - super(TRTileEntities.DISTILLATION_TOWER,"DistillationTower", maxInput, maxEnergy, TRContent.Machine.DISTILLATION_TOWER.block, 6); + public DistillationTowerBlockEntity() { + super(TRBlockEntities.DISTILLATION_TOWER, "DistillationTower", maxInput, maxEnergy, TRContent.Machine.DISTILLATION_TOWER.block, 6); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2, 3, 4, 5 }; - this.inventory = new RebornInventory<>(7, "TileDistillationTower", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(7, "DistillationTowerBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.DISTILLATION_TOWER, this, 2, 4, this.inventory, inputs, outputs); } @@ -90,7 +90,7 @@ public class TileDistillationTower extends TileGenericMachine implements IContai @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("Distillationtower").player(player.inventory).inventory().hotbar().addInventory() - .tile(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() .addInventory().create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java b/src/main/java/techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity.java similarity index 83% rename from src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java rename to src/main/java/techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity.java index 4a102de9a..8dbd89d92 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.nbt.CompoundTag; @@ -39,8 +39,8 @@ import reborncore.common.util.Tank; import techreborn.TechReborn; import techreborn.api.fluidreplicator.FluidReplicatorRecipeCrafter; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; import techreborn.utils.FluidUtils; import javax.annotation.Nullable; @@ -51,7 +51,7 @@ import javax.annotation.Nullable; */ @RebornRegister(TechReborn.MOD_ID) -public class TileFluidReplicator extends TileGenericMachine implements IContainerProvider { +public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "fluidreplicator", key = "FluidReplicatorMaxInput", comment = "Fluid Replicator Max Input (Value in EU)") public static int maxInput = 256; @@ -63,12 +63,12 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine public Tank tank; int ticksSinceLastChange; - public TileFluidReplicator() { - super(TRTileEntities.FLUID_REPLICATOR, "FluidReplicator", maxInput, maxEnergy, TRContent.Machine.FLUID_REPLICATOR.block, 3); + public FluidReplicatorBlockEntity() { + super(TRBlockEntities.FLUID_REPLICATOR, "FluidReplicator", maxInput, maxEnergy, TRContent.Machine.FLUID_REPLICATOR.block, 3); final int[] inputs = new int[] { 0 }; - this.inventory = new RebornInventory<>(4, "TileFluidReplicator", 64, this, getInventoryAccess()); + this.inventory = new RebornInventory<>(4, "FluidReplicatorBlockEntity", 64, this, getInventoryAccess()); this.crafter = new FluidReplicatorRecipeCrafter(this, this.inventory, inputs, null); - this.tank = new Tank("TileFluidReplicator", TileFluidReplicator.TANK_CAPACITY, this); + this.tank = new Tank("FluidReplicatorBlockEntity", FluidReplicatorBlockEntity.TANK_CAPACITY, this); } public boolean getMultiBlock() { @@ -123,8 +123,8 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine return tagCompound; } - private static IInventoryAccess getInventoryAccess(){ - return (slotID, stack, face, direction, tile) -> { + private static IInventoryAccess getInventoryAccess(){ + return (slotID, stack, face, direction, blockEntity) -> { if(slotID == 0){ return stack.isItemEqualIgnoreDamage(TRContent.Parts.UU_MATTER.getStack()); } @@ -143,7 +143,7 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine @Override public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("fluidreplicator").player(player.inventory).inventory().hotbar().addInventory() - .tile(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).syncEnergyValue().syncCrafterValue().addInventory() .create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java b/src/main/java/techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java similarity index 84% rename from src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java rename to src/main/java/techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java index ca5b7526d..2a21351d7 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; @@ -36,11 +36,11 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileImplosionCompressor extends TileGenericMachine implements IContainerProvider { +public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "implosion_compressor", key = "ImplosionCompressorMaxInput", comment = "Implosion Compressor Max Input (Value in EU)") public static int maxInput = 64; @@ -49,11 +49,11 @@ public class TileImplosionCompressor extends TileGenericMachine implements ICont public MultiblockChecker multiblockChecker; - public TileImplosionCompressor() { - super(TRTileEntities.IMPLOSION_COMPRESSOR, "ImplosionCompressor", maxInput, maxEnergy, TRContent.Machine.IMPLOSION_COMPRESSOR.block, 4); + public ImplosionCompressorBlockEntity() { + super(TRBlockEntities.IMPLOSION_COMPRESSOR, "ImplosionCompressor", maxInput, maxEnergy, TRContent.Machine.IMPLOSION_COMPRESSOR.block, 4); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2, 3 }; - this.inventory = new RebornInventory<>(5, "TileImplosionCompressor", 64, this); + this.inventory = new RebornInventory<>(5, "ImplosionCompressorBlockEntity", 64, this); this.crafter = new RecipeCrafter(ModRecipes.IMPLOSION_COMPRESSOR, this, 2, 2, this.inventory, inputs, outputs); } @@ -83,7 +83,7 @@ public class TileImplosionCompressor extends TileGenericMachine implements ICont @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("implosioncompressor").player(player.inventory).inventory().hotbar().addInventory() - .tile(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); } } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialBlastFurnaceBlockEntity.java similarity index 78% rename from src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java rename to src/main/java/techreborn/blockentity/machine/multiblock/IndustrialBlastFurnaceBlockEntity.java index bd20a6130..a060a32cb 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialBlastFurnaceBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.block.Material; import net.minecraft.block.entity.BlockEntity; @@ -41,13 +41,13 @@ import techreborn.TechReborn; import techreborn.blocks.BlockMachineCasing; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import techreborn.multiblocks.MultiBlockCasing; -import techreborn.tiles.TileGenericMachine; -import techreborn.tiles.TileMachineCasing; +import techreborn.blockentity.GenericMachineBlockEntity; +import techreborn.blockentity.MachineCasingBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileIndustrialBlastFurnace extends TileGenericMachine implements IContainerProvider { +public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "industrial_furnace", key = "IndustrialFurnaceMaxInput", comment = "Industrial Blast Furnace Max Input (Value in EU)") public static int maxInput = 128; @@ -57,11 +57,11 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC public MultiblockChecker multiblockChecker; private int cachedHeat; - public TileIndustrialBlastFurnace() { - super(TRTileEntities.INDUSTRIAL_BLAST_FURNACE, "IndustrialBlastFurnace", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_BLAST_FURNACE.block, 4); + public IndustrialBlastFurnaceBlockEntity() { + super(TRBlockEntities.INDUSTRIAL_BLAST_FURNACE, "IndustrialBlastFurnace", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_BLAST_FURNACE.block, 4); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2, 3 }; - this.inventory = new RebornInventory<>(5, "TileIndustrialBlastFurnace", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(5, "IndustrialBlastFurnaceBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.BLAST_FURNACE, this, 2, 2, this.inventory, inputs, outputs); } @@ -72,18 +72,18 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC // Bottom center of multiblock final BlockPos location = pos.offset(getFacing().getOpposite(), 2); - final BlockEntity tileEntity = world.getBlockEntity(location); + final BlockEntity blockEntity = world.getBlockEntity(location); - if (tileEntity instanceof TileMachineCasing) { - if (((TileMachineCasing) tileEntity).isConnected() - && ((TileMachineCasing) tileEntity).getMultiblockController().isAssembled()) { - final MultiBlockCasing casing = ((TileMachineCasing) tileEntity).getMultiblockController(); + if (blockEntity instanceof MachineCasingBlockEntity) { + if (((MachineCasingBlockEntity) blockEntity).isConnected() + && ((MachineCasingBlockEntity) blockEntity).getMultiblockController().isAssembled()) { + final MultiBlockCasing casing = ((MachineCasingBlockEntity) blockEntity).getMultiblockController(); int heat = 0; - // Bottom center shouldn't have any tile entities below it + // Bottom center shouldn't have any blockEntity entities below it if (world.getBlockState(new BlockPos(location.getX(), location.getY() - 1, location.getZ())) - .getBlock() == tileEntity.getWorld().getBlockState(tileEntity.getPos()).getBlock()) { + .getBlock() == blockEntity.getWorld().getBlockState(blockEntity.getPos()).getBlock()) { return 0; } @@ -91,8 +91,8 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC heat += BlockMachineCasing.getHeatFromState(part.getCachedState()); } - if (world.getBlockState(location.offset(Direction.UP, 1)).getBlock().getTranslationKey().equals("tile.lava") - && world.getBlockState(location.offset(Direction.UP, 2)).getBlock().getTranslationKey().equals("tile.lava")) { + if (world.getBlockState(location.offset(Direction.UP, 1)).getBlock().getTranslationKey().equals("blockEntity.lava") + && world.getBlockState(location.offset(Direction.UP, 2)).getBlock().getTranslationKey().equals("blockEntity.lava")) { heat += 500; } return heat; @@ -142,7 +142,7 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("blastfurnace").player(player.inventory).inventory().hotbar().addInventory() - .tile(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() .syncIntegerValue(this::getHeat, this::setHeat).addInventory().create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java rename to src/main/java/techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java index 9c6540fb2..b6c30905b 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.block.BlockState; import net.minecraft.block.FluidBlock; @@ -42,14 +42,14 @@ import reborncore.common.util.Tank; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; import techreborn.utils.FluidUtils; import javax.annotation.Nullable; @RebornRegister(TechReborn.MOD_ID) -public class TileIndustrialGrinder extends TileGenericMachine implements IContainerProvider{ +public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity implements IContainerProvider{ @ConfigRegistry(config = "machines", category = "industrial_grinder", key = "IndustrialGrinderMaxInput", comment = "Industrial Grinder Max Input (Value in EU)") public static int maxInput = 128; @@ -61,13 +61,13 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai public MultiblockChecker multiblockChecker; int ticksSinceLastChange; - public TileIndustrialGrinder() { - super(TRTileEntities.INDUSTRIAL_GRINDER, "IndustrialGrinder", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_GRINDER.block, 7); + public IndustrialGrinderBlockEntity() { + super(TRBlockEntities.INDUSTRIAL_GRINDER, "IndustrialGrinder", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_GRINDER.block, 7); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] {2, 3, 4, 5}; - this.inventory = new RebornInventory<>(8, "TileIndustrialGrinder", 64, this, getInventoryAccess()); + this.inventory = new RebornInventory<>(8, "IndustrialGrinderBlockEntity", 64, this, getInventoryAccess()); this.crafter = new RecipeCrafter(ModRecipes.INDUSTRIAL_GRINDER, this, 1, 4, this.inventory, inputs, outputs); - this.tank = new Tank("TileIndustrialGrinder", TileIndustrialGrinder.TANK_CAPACITY, this); + this.tank = new Tank("IndustrialGrinderBlockEntity", IndustrialGrinderBlockEntity.TANK_CAPACITY, this); this.ticksSinceLastChange = 0; } @@ -85,8 +85,8 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai return down && center && blade && up; } - private static IInventoryAccess getInventoryAccess(){ - return (slotID, stack, face, direction, tile) -> { + private static IInventoryAccess getInventoryAccess(){ + return (slotID, stack, face, direction, blockEntity) -> { if(slotID == 1){ //TODO check if the item has fluid in it //return stack.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null).isPresent(); @@ -145,7 +145,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai public BuiltContainer createContainer(int syncID, final PlayerEntity player) { // fluidSlot first to support automation and shift-click return new ContainerBuilder("industrialgrinder").player(player.inventory).inventory().hotbar().addInventory() - .tile(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) .syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java rename to src/main/java/techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java index 4c81b9480..b41c15b38 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.block.BlockState; import net.minecraft.block.FluidBlock; @@ -42,14 +42,14 @@ import reborncore.common.util.Tank; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; import techreborn.utils.FluidUtils; import javax.annotation.Nullable; @RebornRegister(TechReborn.MOD_ID) -public class TileIndustrialSawmill extends TileGenericMachine implements IContainerProvider { +public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "industrial_sawmill", key = "IndustrialSawmillMaxInput", comment = "Industrial Sawmill Max Input (Value in EU)") public static int maxInput = 128; @@ -61,13 +61,13 @@ public class TileIndustrialSawmill extends TileGenericMachine implements IContai public MultiblockChecker multiblockChecker; int ticksSinceLastChange; - public TileIndustrialSawmill() { - super(TRTileEntities.INDUSTRIAL_SAWMILL, "IndustrialSawmill", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_SAWMILL.block, 6); + public IndustrialSawmillBlockEntity() { + super(TRBlockEntities.INDUSTRIAL_SAWMILL, "IndustrialSawmill", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_SAWMILL.block, 6); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2, 3, 4 }; - this.inventory = new RebornInventory<>(7, "TileSawmill", 64, this, getInventoryAccess()); + this.inventory = new RebornInventory<>(7, "SawmillBlockEntity", 64, this, getInventoryAccess()); this.crafter = new RecipeCrafter(ModRecipes.INDUSTRIAL_SAWMILL, this, 1, 3, this.inventory, inputs, outputs); - this.tank = new Tank("TileSawmill", TileIndustrialSawmill.TANK_CAPACITY, this); + this.tank = new Tank("SawmillBlockEntity", IndustrialSawmillBlockEntity.TANK_CAPACITY, this); this.ticksSinceLastChange = 0; } @@ -131,8 +131,8 @@ public class TileIndustrialSawmill extends TileGenericMachine implements IContai return tank; } - private static IInventoryAccess getInventoryAccess(){ - return (slotID, stack, face, direction, tile) -> { + private static IInventoryAccess getInventoryAccess(){ + return (slotID, stack, face, direction, blockEntity) -> { if(direction == IInventoryAccess.AccessDirection.INSERT){ //TODO return if the stack can take fluids //return stack.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null).isPresent(); @@ -146,7 +146,7 @@ public class TileIndustrialSawmill extends TileGenericMachine implements IContai @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("industrialsawmill").player(player.inventory).inventory().hotbar().addInventory() - .tile(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).syncEnergyValue().syncCrafterValue() .addInventory().create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/MultiblockChecker.java b/src/main/java/techreborn/blockentity/machine/multiblock/MultiblockChecker.java similarity index 98% rename from src/main/java/techreborn/tiles/machine/multiblock/MultiblockChecker.java rename to src/main/java/techreborn/blockentity/machine/multiblock/MultiblockChecker.java index da6f775bd..e7264a076 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/MultiblockChecker.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/MultiblockChecker.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java b/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java similarity index 84% rename from src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java rename to src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java index 1b6d1b2d2..594ca22c1 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.multiblock; +package techreborn.blockentity.machine.multiblock; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; @@ -36,11 +36,11 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileVacuumFreezer extends TileGenericMachine implements IContainerProvider { +public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "vacuumfreezer", key = "VacuumFreezerInput", comment = "Vacuum Freezer Max Input (Value in EU)") public static int maxInput = 64; @@ -49,11 +49,11 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP public MultiblockChecker multiblockChecker; - public TileVacuumFreezer() { - super(TRTileEntities.VACUUM_FREEZER, "VacuumFreezer", maxInput, maxEnergy, TRContent.Machine.VACUUM_FREEZER.block, 2); + public VacuumFreezerBlockEntity() { + super(TRBlockEntities.VACUUM_FREEZER, "VacuumFreezer", maxInput, maxEnergy, TRContent.Machine.VACUUM_FREEZER.block, 2); final int[] inputs = new int[] { 0 }; final int[] outputs = new int[] { 1 }; - this.inventory = new RebornInventory<>(3, "TileVacuumFreezer", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(3, "VacuumFreezerBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.VACUUM_FREEZER, this, 2, 1, this.inventory, inputs, outputs); } @@ -75,7 +75,7 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP } } - // TileEntity + // BlockEntity @Override public void validate() { super.validate(); @@ -86,7 +86,7 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("vacuumfreezer").player(player.inventory).inventory().hotbar().addInventory() - .tile(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); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java b/src/main/java/techreborn/blockentity/machine/tier1/AlloySmelterBlockEntity.java similarity index 84% rename from src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java rename to src/main/java/techreborn/blockentity/machine/tier1/AlloySmelterBlockEntity.java index bcbab981c..7c849dc2f 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/AlloySmelterBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -35,22 +35,22 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileAlloySmelter extends TileGenericMachine implements IContainerProvider { +public class AlloySmelterBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "alloy_smelter", key = "AlloySmelterMaxInput", comment = "Alloy Smelter Max Input (Value in EU)") public static int maxInput = 32; @ConfigRegistry(config = "machines", category = "alloy_smelter", key = "AlloySmelterMaxEnergy", comment = "Alloy Smelter Max Energy (Value in EU)") public static int maxEnergy = 1_000; - public TileAlloySmelter() { - super(TRTileEntities.ALLOY_SMELTER, "AlloySmelter", maxInput, maxEnergy, TRContent.Machine.ALLOY_SMELTER.block, 3); + public AlloySmelterBlockEntity() { + super(TRBlockEntities.ALLOY_SMELTER, "AlloySmelter", maxInput, maxEnergy, TRContent.Machine.ALLOY_SMELTER.block, 3); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2 }; - this.inventory = new RebornInventory<>(4, "TileAlloySmelter", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(4, "AlloySmelterBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.ALLOY_SMELTER, this, 2, 1, this.inventory, inputs, outputs); } @@ -58,7 +58,7 @@ public class TileAlloySmelter extends TileGenericMachine implements IContainerPr @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("alloysmelter").player(player.inventory).inventory().hotbar() - .addInventory().tile(this) + .addInventory().blockEntity(this) .filterSlot(0, 34, 47, stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(0).test(stack))) .filterSlot(1, 126, 47, diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java b/src/main/java/techreborn/blockentity/machine/tier1/AssemblingMachineBlockEntity.java similarity index 80% rename from src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java rename to src/main/java/techreborn/blockentity/machine/tier1/AssemblingMachineBlockEntity.java index 33cdd0319..c765fd8cb 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/AssemblingMachineBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -35,22 +35,22 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileAssemblingMachine extends TileGenericMachine implements IContainerProvider { +public class AssemblingMachineBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "assembling_machine", key = "AssemblingMachineMaxInput", comment = "Assembling Machine Max Input (Value in EU)") public static int maxInput = 128; @ConfigRegistry(config = "machines", category = "assembling_machine", key = "AssemblingMachineMaxEnergy", comment = "Assembling Machine Max Energy (Value in EU)") public static int maxEnergy = 10_000; - public TileAssemblingMachine() { - super(TRTileEntities.ASSEMBLY_MACHINE, "AssemblingMachine", maxInput, maxEnergy, TRContent.Machine.ASSEMBLY_MACHINE.block, 3); + public AssemblingMachineBlockEntity() { + super(TRBlockEntities.ASSEMBLY_MACHINE, "AssemblingMachine", maxInput, maxEnergy, TRContent.Machine.ASSEMBLY_MACHINE.block, 3); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2 }; - this.inventory = new RebornInventory<>(4, "TileAssemblingMachine", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(4, "AssemblingMachineBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.ASSEMBLING_MACHINE, this, 2, 2, this.inventory, inputs, outputs); } @@ -58,7 +58,7 @@ public class TileAssemblingMachine extends TileGenericMachine implements IContai @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("assemblingmachine").player(player.inventory).inventory().hotbar() - .addInventory().tile(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); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java b/src/main/java/techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity.java similarity index 93% rename from src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java rename to src/main/java/techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity.java index 7d00b59d2..cd6090a39 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.container.Container; import net.minecraft.entity.player.PlayerEntity; @@ -37,11 +37,11 @@ import net.minecraft.util.DefaultedList; import net.minecraft.util.math.Direction; import org.apache.commons.lang3.tuple.Pair; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.IInventoryAccess; @@ -51,7 +51,7 @@ import techreborn.TechReborn; import techreborn.events.TRRecipeHandler; import techreborn.init.ModSounds; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import javax.annotation.Nullable; import java.util.ArrayList; @@ -61,7 +61,7 @@ import java.util.List; * Created by modmuss50 on 20/06/2017. */ @RebornRegister(TechReborn.MOD_ID) -public class TileAutoCraftingTable extends TilePowerAcceptor +public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "autocrafter", key = "AutoCrafterInput", comment = "AutoCrafting Table Max Input (Value in EU)") @@ -69,7 +69,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor @ConfigRegistry(config = "machines", category = "autocrafter", key = "AutoCrafterMaxEnergy", comment = "AutoCrafting Table Max Energy (Value in EU)") public static int maxEnergy = 10_000; - public RebornInventory inventory = new RebornInventory<>(11, "TileAutoCraftingTable", 64, this, getInventoryAccess()); + public RebornInventory inventory = new RebornInventory<>(11, "AutoCraftingTableBlockEntity", 64, this, getInventoryAccess()); public int progress; public int maxProgress = 120; public int euTick = 10; @@ -80,8 +80,8 @@ public class TileAutoCraftingTable extends TilePowerAcceptor public boolean locked = true; - public TileAutoCraftingTable() { - super(TRTileEntities.AUTO_CRAFTING_TABLE); + public AutoCraftingTableBlockEntity() { + super(TRBlockEntities.AUTO_CRAFTING_TABLE); } @Nullable @@ -402,14 +402,14 @@ public class TileAutoCraftingTable extends TilePowerAcceptor return false; } - private static IInventoryAccess getInventoryAccess(){ - return (slotID, stack, facing, direction, tile) -> { + private static IInventoryAccess getInventoryAccess(){ + return (slotID, stack, facing, direction, blockEntity) -> { switch (direction){ case INSERT: if (slotID > 8) { return false; } - int bestSlot = tile.findBestSlotForStack(tile.getIRecipe(), stack); + int bestSlot = blockEntity.findBestSlotForStack(blockEntity.getIRecipe(), stack); if (bestSlot != -1) { return slotID == bestSlot; } @@ -443,7 +443,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor @Override public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("autocraftingtable").player(player.inventory).inventory().hotbar().addInventory() - .tile(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) .outputSlot(10, 145, 70).syncEnergyValue().syncIntegerValue(this::getProgress, this::setProgress) .syncIntegerValue(this::getMaxProgress, this::setMaxProgress) diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java b/src/main/java/techreborn/blockentity/machine/tier1/ChemicalReactorBlockEntity.java similarity index 80% rename from src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java rename to src/main/java/techreborn/blockentity/machine/tier1/ChemicalReactorBlockEntity.java index 5c9dbd8ba..2bee02e86 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/ChemicalReactorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -35,22 +35,22 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileChemicalReactor extends TileGenericMachine implements IContainerProvider { +public class ChemicalReactorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "chemical_reactor", key = "ChemicalReactorMaxInput", comment = "Chemical Reactor Max Input (Value in EU)") public static int maxInput = 128; @ConfigRegistry(config = "machines", category = "chemical_reactor", key = "ChemicalReactorMaxEnergy", comment = "Chemical Reactor Max Energy (Value in EU)") public static int maxEnergy = 10_000; - public TileChemicalReactor() { - super(TRTileEntities.CHEMICAL_REACTOR, "ChemicalReactor", maxInput, maxEnergy, TRContent.Machine.CHEMICAL_REACTOR.block, 3); + public ChemicalReactorBlockEntity() { + super(TRBlockEntities.CHEMICAL_REACTOR, "ChemicalReactor", maxInput, maxEnergy, TRContent.Machine.CHEMICAL_REACTOR.block, 3); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2 }; - this.inventory = new RebornInventory<>(4, "TileChemicalReactor", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(4, "ChemicalReactorBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.CHEMICAL_REACTOR, this, 2, 2, this.inventory, inputs, outputs); } @@ -58,7 +58,7 @@ public class TileChemicalReactor extends TileGenericMachine implements IContaine @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("chemicalreactor").player(player.inventory).inventory().hotbar() - .addInventory().tile(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); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java b/src/main/java/techreborn/blockentity/machine/tier1/CompressorBlockEntity.java similarity index 81% rename from src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java rename to src/main/java/techreborn/blockentity/machine/tier1/CompressorBlockEntity.java index 27e005854..c5a35a698 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/CompressorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -35,22 +35,22 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileCompressor extends TileGenericMachine implements IContainerProvider { +public class CompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "compressor", key = "CompressorInput", comment = "Compressor Max Input (Value in EU)") public static int maxInput = 32; @ConfigRegistry(config = "machines", category = "compressor", key = "CompressorMaxEnergy", comment = "Compressor Max Energy (Value in EU)") public static int maxEnergy = 1000; - public TileCompressor() { - super(TRTileEntities.COMPRESSOR, "Compressor", maxInput, maxEnergy, TRContent.Machine.COMPRESSOR.block, 2); + public CompressorBlockEntity() { + super(TRBlockEntities.COMPRESSOR, "Compressor", maxInput, maxEnergy, TRContent.Machine.COMPRESSOR.block, 2); final int[] inputs = new int[] { 0 }; final int[] outputs = new int[] { 1 }; - this.inventory = new RebornInventory<>(3, "TileCompressor", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(3, "CompressorBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.COMPRESSOR, this, 2, 1, this.inventory, inputs, outputs); } @@ -58,7 +58,7 @@ public class TileCompressor extends TileGenericMachine implements IContainerProv @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("compressor").player(player.inventory).inventory().hotbar().addInventory() - .tile(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); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java b/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java similarity index 90% rename from src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java rename to src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java index b7564952e..545722aea 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; @@ -30,22 +30,22 @@ import net.minecraft.item.ItemStack; import net.minecraft.recipe.RecipeType; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.blocks.BlockMachineBase; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.events.TRRecipeHandler; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileElectricFurnace extends TilePowerAcceptor +public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "electric_furnace", key = "ElectricFurnaceInput", comment = "Electric Furnace Max Input (Value in EU)") @@ -53,7 +53,7 @@ public class TileElectricFurnace extends TilePowerAcceptor @ConfigRegistry(config = "machines", category = "electric_furnace", key = "ElectricFurnaceMaxEnergy", comment = "Electric Furnace Max Energy (Value in EU)") public static int maxEnergy = 1000; - public RebornInventory inventory = new RebornInventory<>(3, "TileElectricFurnace", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(3, "ElectricFurnaceBlockEntity", 64, this).withConfiguredAccess(); public int progress; public int fuelScale = 100; public int cost = 6; @@ -61,8 +61,8 @@ public class TileElectricFurnace extends TilePowerAcceptor int output = 1; boolean wasBurning = false; - public TileElectricFurnace() { - super(TRTileEntities.ELECTRIC_FURNACE ); + public ElectricFurnaceBlockEntity() { + super(TRBlockEntities.ELECTRIC_FURNACE ); } public int gaugeProgressScaled(int scale) { @@ -210,7 +210,7 @@ public class TileElectricFurnace extends TilePowerAcceptor // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } @@ -218,7 +218,7 @@ public class TileElectricFurnace extends TilePowerAcceptor @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("electricfurnace").player(player.inventory).inventory().hotbar().addInventory() - .tile(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() .syncIntegerValue(this::getBurnTime, this::setBurnTime).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java b/src/main/java/techreborn/blockentity/machine/tier1/ExtractorBlockEntity.java similarity index 82% rename from src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java rename to src/main/java/techreborn/blockentity/machine/tier1/ExtractorBlockEntity.java index 3fe9a50fe..2f2b58c9c 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/ExtractorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -35,29 +35,29 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileExtractor extends TileGenericMachine implements IContainerProvider { +public class ExtractorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "extractor", key = "ExtractorInput", comment = "Extractor Max Input (Value in EU)") public static int maxInput = 32; @ConfigRegistry(config = "machines", category = "extractor", key = "ExtractorMaxEnergy", comment = "Extractor Max Energy (Value in EU)") public static int maxEnergy = 1_000; - public TileExtractor() { - super(TRTileEntities.EXTRACTOR, "Extractor", maxInput, maxEnergy, TRContent.Machine.EXTRACTOR.block, 2); + public ExtractorBlockEntity() { + super(TRBlockEntities.EXTRACTOR, "Extractor", maxInput, maxEnergy, TRContent.Machine.EXTRACTOR.block, 2); final int[] inputs = new int[] { 0 }; final int[] outputs = new int[] { 1 }; - this.inventory = new RebornInventory<>(3, "TileExtractor", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(3, "ExtractorBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.EXTRACTOR, this, 2, 1, this.inventory, inputs, outputs); } // IContainerProvider @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { - return new ContainerBuilder("extractor").player(player.inventory).inventory().hotbar().addInventory().tile(this) + return new ContainerBuilder("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); } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java b/src/main/java/techreborn/blockentity/machine/tier1/GrinderBlockEntity.java similarity index 83% rename from src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java rename to src/main/java/techreborn/blockentity/machine/tier1/GrinderBlockEntity.java index e3fcc44a3..4337e3401 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/GrinderBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -35,29 +35,29 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileGrinder extends TileGenericMachine implements IContainerProvider { +public class GrinderBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "grinder", key = "GrinderInput", comment = "Grinder Max Input (Value in EU)") public static int maxInput = 32; @ConfigRegistry(config = "machines", category = "grinder", key = "GrinderMaxEnergy", comment = "Grinder Max Energy (Value in EU)") public static int maxEnergy = 1_000; - public TileGrinder() { - super(TRTileEntities.GRINDER, "Grinder", maxInput, maxEnergy, TRContent.Machine.GRINDER.block, 2); + public GrinderBlockEntity() { + super(TRBlockEntities.GRINDER, "Grinder", maxInput, maxEnergy, TRContent.Machine.GRINDER.block, 2); final int[] inputs = new int[] { 0 }; final int[] outputs = new int[] { 1 }; - this.inventory = new RebornInventory<>(3, "TileGrinder", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(3, "GrinderBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.GRINDER, this, 2, 1, this.inventory, inputs, outputs); } // IContainerProvider @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { - return new ContainerBuilder("grinder").player(player.inventory).inventory().hotbar().addInventory().tile(this) + return new ContainerBuilder("grinder").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); } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java b/src/main/java/techreborn/blockentity/machine/tier1/IndustrialElectrolyzerBlockEntity.java similarity index 83% rename from src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java rename to src/main/java/techreborn/blockentity/machine/tier1/IndustrialElectrolyzerBlockEntity.java index 4baebc6cf..5a1eab9f8 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/IndustrialElectrolyzerBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -36,23 +36,23 @@ import reborncore.common.util.ItemUtils; import techreborn.TechReborn; import techreborn.init.ModRecipes; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import techreborn.items.DynamicCell; -import techreborn.tiles.TileGenericMachine; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileIndustrialElectrolyzer extends TileGenericMachine implements IContainerProvider { +public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "industrial_electrolyzer", key = "IndustrialElectrolyzerMaxInput", comment = "Industrial Electrolyzer Max Input (Value in EU)") public static int maxInput = 128; @ConfigRegistry(config = "machines", category = "industrial_electrolyzer", key = "IndustrialElectrolyzerMaxEnergy", comment = "Industrial Electrolyzer Max Energy (Value in EU)") public static int maxEnergy = 10_000; - public TileIndustrialElectrolyzer() { - super(TRTileEntities.INDUSTRIAL_ELECTROLYZER, "IndustrialElectrolyzer", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_ELECTROLYZER.block, 6); + public IndustrialElectrolyzerBlockEntity() { + super(TRBlockEntities.INDUSTRIAL_ELECTROLYZER, "IndustrialElectrolyzer", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_ELECTROLYZER.block, 6); final int[] inputs = new int[] { 0, 1 }; final int[] outputs = new int[] { 2, 3, 4, 5 }; - this.inventory = new RebornInventory<>(7, "TileIndustrialElectrolyzer", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(7, "IndustrialElectrolyzerBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new RecipeCrafter(ModRecipes.INDUSTRIAL_ELECTROLYZER, this, 2, 4, this.inventory, inputs, outputs); } @@ -60,7 +60,7 @@ public class TileIndustrialElectrolyzer extends TileGenericMachine implements IC @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("industrialelectrolyzer").player(player.inventory).inventory().hotbar() - .addInventory().tile(this) + .addInventory().blockEntity(this) .filterSlot(1, 47, 72, stack -> ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .filterSlot(0, 81, 72, stack -> !ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .outputSlot(2, 51, 24).outputSlot(3, 71, 24).outputSlot(4, 91, 24).outputSlot(5, 111, 24) diff --git a/src/main/java/techreborn/tiles/machine/tier1/TilePlayerDectector.java b/src/main/java/techreborn/blockentity/machine/tier1/PlayerDectectorBlockEntity.java similarity index 92% rename from src/main/java/techreborn/tiles/machine/tier1/TilePlayerDectector.java rename to src/main/java/techreborn/blockentity/machine/tier1/PlayerDectectorBlockEntity.java index b2612169c..50cddb067 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TilePlayerDectector.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/PlayerDectectorBlockEntity.java @@ -22,14 +22,14 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.WorldUtils; @@ -37,10 +37,10 @@ import techreborn.TechReborn; import techreborn.blocks.tier1.BlockPlayerDetector; import techreborn.blocks.tier1.BlockPlayerDetector.PlayerDetectorType; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TilePlayerDectector extends TilePowerAcceptor implements IToolDrop { +public class PlayerDectectorBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop { @ConfigRegistry(config = "machines", category = "player_detector", key = "PlayerDetectorMaxInput", comment = "Player Detector Max Input (Value in EU)") public static int maxInput = 32; @@ -52,8 +52,8 @@ public class TilePlayerDectector extends TilePowerAcceptor implements IToolDrop public String owenerUdid = ""; boolean redstone = false; - public TilePlayerDectector() { - super(TRTileEntities.PLAYER_DETECTOR); + public PlayerDectectorBlockEntity() { + super(TRBlockEntities.PLAYER_DETECTOR); } public boolean isProvidingPower() { diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java b/src/main/java/techreborn/blockentity/machine/tier1/RecyclerBlockEntity.java similarity index 88% rename from src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java rename to src/main/java/techreborn/blockentity/machine/tier1/RecyclerBlockEntity.java index aeb7bc1f5..25e180578 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/RecyclerBlockEntity.java @@ -22,29 +22,29 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.IUpgrade; -import reborncore.api.tile.InventoryProvider; +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.common.blocks.BlockMachineBase; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileRecycler extends TilePowerAcceptor +public class RecyclerBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "recycler", key = "RecyclerInput", comment = "Recycler Max Input (Value in EU)") @@ -54,15 +54,15 @@ public class TileRecycler extends TilePowerAcceptor @ConfigRegistry(config = "machines", category = "recycler", key = "produceIC2Scrap", comment = "When enabled and when ic2 is installed the recycler will make ic2 scrap") public static boolean produceIC2Scrap = false; - private final RebornInventory inventory = new RebornInventory<>(3, "TileRecycler", 64, this).withConfiguredAccess(); + private final RebornInventory inventory = new RebornInventory<>(3, "RecyclerBlockEntity", 64, this).withConfiguredAccess(); private final int cost = 2; private final int time = 15; private final int chance = 6; private boolean isBurning; private int progress; - public TileRecycler() { - super(TRTileEntities.RECYCLER); + public RecyclerBlockEntity() { + super(TRBlockEntities.RECYCLER); } public int gaugeProgressScaled(int scale) { @@ -196,7 +196,7 @@ public class TileRecycler extends TilePowerAcceptor // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return this.inventory; } @@ -204,7 +204,7 @@ public class TileRecycler extends TilePowerAcceptor @Override public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("recycler").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).slot(0, 55, 45, itemStack -> itemStack.getItem() instanceof IUpgrade).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() + .blockEntity(this).slot(0, 55, 45, itemStack -> itemStack.getItem() instanceof IUpgrade).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() .syncIntegerValue(this::getProgress, this::setProgress).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java b/src/main/java/techreborn/blockentity/machine/tier1/RollingMachineBlockEntity.java similarity index 94% rename from src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java rename to src/main/java/techreborn/blockentity/machine/tier1/RollingMachineBlockEntity.java index 19a0eba98..c5c063112 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/RollingMachineBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.container.Container; import net.minecraft.entity.player.PlayerEntity; @@ -34,12 +34,12 @@ import net.minecraft.recipe.Recipe; import net.minecraft.util.math.Direction; import org.apache.commons.lang3.tuple.Pair; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.blocks.BlockMachineBase; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; @@ -47,7 +47,7 @@ import reborncore.common.util.ItemUtils; import techreborn.TechReborn; import techreborn.api.RollingMachineRecipe; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import javax.annotation.Nonnull; import java.util.ArrayList; @@ -59,7 +59,7 @@ import java.util.stream.Collectors; //TODO add tick and power bars. @RebornRegister(TechReborn.MOD_ID) -public class TileRollingMachine extends TilePowerAcceptor +public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "rolling_machine", key = "RollingMachineMaxInput", comment = "Rolling Machine Max Input (Value in EU)") @@ -73,7 +73,7 @@ public class TileRollingMachine extends TilePowerAcceptor public int[] craftingSlots = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; private CraftingInventory craftCache; - public RebornInventory inventory = new RebornInventory<>(12, "TileRollingMachine", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(12, "RollingMachineBlockEntity", 64, this).withConfiguredAccess(); public boolean isRunning; public int tickTime; @Nonnull @@ -83,8 +83,8 @@ public class TileRollingMachine extends TilePowerAcceptor public boolean locked = false; public int balanceSlot = 0; - public TileRollingMachine() { - super(TRTileEntities.ROLLING_MACHINE); + public RollingMachineBlockEntity() { + super(TRBlockEntities.ROLLING_MACHINE); outputSlot = 9; } @@ -301,7 +301,7 @@ public class TileRollingMachine extends TilePowerAcceptor private CraftingInventory getCraftingMatrix() { if (craftCache == null) { - craftCache = new CraftingInventory(new RollingTileContainer(), 3, 3); + craftCache = new CraftingInventory(new RollingBEContainer(), 3, 3); } if (inventory.hasChanged()) { for (int i = 0; i < 9; i++) { @@ -355,7 +355,7 @@ public class TileRollingMachine extends TilePowerAcceptor } @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } @@ -378,7 +378,7 @@ public class TileRollingMachine extends TilePowerAcceptor public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("rollingmachine").player(player.inventory) .inventory().hotbar() - .addInventory().tile(this) + .addInventory().blockEntity(this) .slot(0, 30, 22).slot(1, 48, 22).slot(2, 66, 22) .slot(3, 30, 40).slot(4, 48, 40).slot(5, 66, 40) .slot(6, 30, 58).slot(7, 48, 58).slot(8, 66, 58) @@ -404,9 +404,9 @@ public class TileRollingMachine extends TilePowerAcceptor return 0; } - private static class RollingTileContainer extends Container { + private static class RollingBEContainer extends Container { - protected RollingTileContainer() { + protected RollingBEContainer() { super(null, 0); } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java b/src/main/java/techreborn/blockentity/machine/tier1/ScrapboxinatorBlockEntity.java similarity index 81% rename from src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java rename to src/main/java/techreborn/blockentity/machine/tier1/ScrapboxinatorBlockEntity.java index b7d1e694b..4499025c5 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/ScrapboxinatorBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier1; +package techreborn.blockentity.machine.tier1; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.containerBuilder.IContainerProvider; @@ -34,22 +34,22 @@ import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.api.recipe.ScrapboxRecipeCrafter; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileGenericMachine; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.GenericMachineBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileScrapboxinator extends TileGenericMachine implements IContainerProvider { +public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "scrapboxinator", key = "ScrapboxinatorMaxInput", comment = "Scrapboxinator Max Input (Value in EU)") public static int maxInput = 32; @ConfigRegistry(config = "machines", category = "scrapboxinator", key = "ScrapboxinatorMaxEnergy", comment = "Scrapboxinator Max Energy (Value in EU)") public static int maxEnergy = 1_000; - public TileScrapboxinator() { - super(TRTileEntities.SCRAPBOXINATOR, "Scrapboxinator", maxInput, maxEnergy, TRContent.Machine.SCRAPBOXINATOR.block, 2); + public ScrapboxinatorBlockEntity() { + super(TRBlockEntities.SCRAPBOXINATOR, "Scrapboxinator", maxInput, maxEnergy, TRContent.Machine.SCRAPBOXINATOR.block, 2); final int[] inputs = new int[] { 0 }; final int[] outputs = new int[] { 1 }; - this.inventory = new RebornInventory<>(3, "TileScrapboxinator", 64, this).withConfiguredAccess(); + this.inventory = new RebornInventory<>(3, "ScrapboxinatorBlockEntity", 64, this).withConfiguredAccess(); this.crafter = new ScrapboxRecipeCrafter(this, this.inventory, inputs, outputs); } @@ -63,7 +63,7 @@ public class TileScrapboxinator extends TileGenericMachine implements IContainer @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("scrapboxinator").player(player.inventory).inventory().hotbar().addInventory() - .tile(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); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileChunkLoader.java b/src/main/java/techreborn/blockentity/machine/tier3/ChunkLoaderBlockEntity.java similarity index 84% rename from src/main/java/techreborn/tiles/machine/tier3/TileChunkLoader.java rename to src/main/java/techreborn/blockentity/machine/tier3/ChunkLoaderBlockEntity.java index 7e79e4f4c..31f8a88b8 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileChunkLoader.java +++ b/src/main/java/techreborn/blockentity/machine/tier3/ChunkLoaderBlockEntity.java @@ -22,26 +22,26 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier3; +package techreborn.blockentity.machine.tier3; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileChunkLoader extends TilePowerAcceptor implements IToolDrop, InventoryProvider, IContainerProvider { +public class ChunkLoaderBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "chunk_loader", key = "ChunkLoaderMaxInput", comment = "Chunk Loader Max Input (Value in EU)") public static int maxInput = 32; @@ -50,13 +50,13 @@ public class TileChunkLoader extends TilePowerAcceptor implements IToolDrop, Inv // @ConfigRegistry(config = "machines", category = "chunk_loader", key = "ChunkLoaderWrenchDropRate", comment = "Chunk Loader Wrench Drop Rate") public static float wrenchDropRate = 1.0F; - public RebornInventory inventory = new RebornInventory<>(1, "TileChunkLoader", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(1, "ChunkLoaderBlockEntity", 64, this).withConfiguredAccess(); public boolean isRunning; public int tickTime; - public TileChunkLoader() { - super(TRTileEntities.CHUNK_LOADER ); + public ChunkLoaderBlockEntity() { + super(TRBlockEntities.CHUNK_LOADER ); } @Override @@ -94,7 +94,7 @@ public class TileChunkLoader extends TilePowerAcceptor implements IToolDrop, Inv } @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return this.inventory; } diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileCreativeQuantumChest.java b/src/main/java/techreborn/blockentity/machine/tier3/CreativeQuantumChestBlockEntity.java similarity index 86% rename from src/main/java/techreborn/tiles/machine/tier3/TileCreativeQuantumChest.java rename to src/main/java/techreborn/blockentity/machine/tier3/CreativeQuantumChestBlockEntity.java index 77b4b539e..514bcd0d0 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileCreativeQuantumChest.java +++ b/src/main/java/techreborn/blockentity/machine/tier3/CreativeQuantumChestBlockEntity.java @@ -22,15 +22,15 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier3; +package techreborn.blockentity.machine.tier3; import net.minecraft.item.ItemStack; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; -public class TileCreativeQuantumChest extends TileQuantumChest { +public class CreativeQuantumChestBlockEntity extends QuantumChestBlockEntity { - public TileCreativeQuantumChest() { - super(TRTileEntities.CREATIVE_QUANTUM_CHEST); + public CreativeQuantumChestBlockEntity() { + super(TRBlockEntities.CREATIVE_QUANTUM_CHEST); } @Override diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileCreativeQuantumTank.java b/src/main/java/techreborn/blockentity/machine/tier3/CreativeQuantumTankBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/machine/tier3/TileCreativeQuantumTank.java rename to src/main/java/techreborn/blockentity/machine/tier3/CreativeQuantumTankBlockEntity.java index 5fd4f6bc1..891d08716 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileCreativeQuantumTank.java +++ b/src/main/java/techreborn/blockentity/machine/tier3/CreativeQuantumTankBlockEntity.java @@ -22,14 +22,14 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier3; +package techreborn.blockentity.machine.tier3; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; -public class TileCreativeQuantumTank extends TileQuantumTank { +public class CreativeQuantumTankBlockEntity extends QuantumTankBlockEntity { - public TileCreativeQuantumTank() { - super(TRTileEntities.CREATIVE_QUANTUM_TANK); + public CreativeQuantumTankBlockEntity() { + super(TRBlockEntities.CREATIVE_QUANTUM_TANK); } @Override diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileMatterFabricator.java b/src/main/java/techreborn/blockentity/machine/tier3/MatterFabricatorBlockEntity.java similarity index 90% rename from src/main/java/techreborn/tiles/machine/tier3/TileMatterFabricator.java rename to src/main/java/techreborn/blockentity/machine/tier3/MatterFabricatorBlockEntity.java index 30a6b050a..441df620a 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileMatterFabricator.java +++ b/src/main/java/techreborn/blockentity/machine/tier3/MatterFabricatorBlockEntity.java @@ -22,27 +22,27 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier3; +package techreborn.blockentity.machine.tier3; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import reborncore.common.util.ItemUtils; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileMatterFabricator extends TilePowerAcceptor +public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorMaxInput", comment = "Matter Fabricator Max Input (Value in EU)") @@ -54,11 +54,11 @@ public class TileMatterFabricator extends TilePowerAcceptor @ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorEnergyPerAmp", comment = "Matter Fabricator EU per amplifier unit, multiply this with the rate for total EU") public static int energyPerAmp = 5; - public RebornInventory inventory = new RebornInventory<>(12, "TileMatterFabricator", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(12, "MatterFabricatorBlockEntity", 64, this).withConfiguredAccess(); private int amplifier = 0; - public TileMatterFabricator() { - super(TRTileEntities.MATTER_FABRICATOR ); + public MatterFabricatorBlockEntity() { + super(TRBlockEntities.MATTER_FABRICATOR ); } private boolean spaceForOutput() { @@ -202,7 +202,7 @@ public class TileMatterFabricator extends TilePowerAcceptor // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } @@ -210,7 +210,7 @@ public class TileMatterFabricator extends TilePowerAcceptor @Override public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("matterfabricator").player(player.inventory).inventory().hotbar().addInventory() - .tile(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) .outputSlot(9, 100, 66).outputSlot(10, 120, 66).energySlot(11, 8, 72).syncEnergyValue() .syncIntegerValue(this::getProgress, this::setProgress).addInventory().create(this, syncID); diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumChest.java b/src/main/java/techreborn/blockentity/machine/tier3/QuantumChestBlockEntity.java similarity index 79% rename from src/main/java/techreborn/tiles/machine/tier3/TileQuantumChest.java rename to src/main/java/techreborn/blockentity/machine/tier3/QuantumChestBlockEntity.java index 6f410cbdd..c50be13f7 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumChest.java +++ b/src/main/java/techreborn/blockentity/machine/tier3/QuantumChestBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier3; +package techreborn.blockentity.machine.tier3; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.entity.player.PlayerEntity; @@ -32,27 +32,27 @@ import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; -import techreborn.init.TRTileEntities; -import techreborn.tiles.TileTechStorageBase; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.TechStorageBaseBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileQuantumChest extends TileTechStorageBase implements IContainerProvider { +public class QuantumChestBlockEntity extends TechStorageBaseBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "quantum_chest", key = "QuantumChestMaxStorage", comment = "Maximum amount of items a Quantum Chest can store") public static int maxStorage = Integer.MAX_VALUE; - public TileQuantumChest() { - this(TRTileEntities.QUANTUM_CHEST); + public QuantumChestBlockEntity() { + this(TRBlockEntities.QUANTUM_CHEST); } - public TileQuantumChest(BlockEntityType tileEntityType) { - super(tileEntityType, "TileQuantumChest", maxStorage); + public QuantumChestBlockEntity(BlockEntityType blockEntityType) { + super(blockEntityType, "QuantumChestBlockEntity", maxStorage); } @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("quantumchest").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this, syncID); + .blockEntity(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumTank.java b/src/main/java/techreborn/blockentity/machine/tier3/QuantumTankBlockEntity.java similarity index 81% rename from src/main/java/techreborn/tiles/machine/tier3/TileQuantumTank.java rename to src/main/java/techreborn/blockentity/machine/tier3/QuantumTankBlockEntity.java index 30bfec3a0..279bbebae 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumTank.java +++ b/src/main/java/techreborn/blockentity/machine/tier3/QuantumTankBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.machine.tier3; +package techreborn.blockentity.machine.tier3; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.entity.player.PlayerEntity; @@ -32,38 +32,38 @@ import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import reborncore.api.IListInfoProvider; import reborncore.api.IToolDrop; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; -import reborncore.common.tile.TileMachineBase; +import reborncore.common.blockentity.MachineBaseBlockEntity; import reborncore.common.util.RebornInventory; import reborncore.common.util.Tank; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; import javax.annotation.Nullable; import java.util.List; @RebornRegister(TechReborn.MOD_ID) -public class TileQuantumTank extends TileMachineBase +public class QuantumTankBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IToolDrop, IListInfoProvider, IContainerProvider { @ConfigRegistry(config = "machines", category = "quantum_tank", key = "QuantumTankMaxStorage", comment = "Maximum amount of millibuckets a Quantum Tank can store") public static int maxStorage = Integer.MAX_VALUE; - public Tank tank = new Tank("TileQuantumTank", maxStorage, this); - public RebornInventory inventory = new RebornInventory<>(3, "TileQuantumTank", 64, this).withConfiguredAccess(); + public Tank tank = new Tank("QuantumTankBlockEntity", maxStorage, this); + public RebornInventory inventory = new RebornInventory<>(3, "QuantumTankBlockEntity", 64, this).withConfiguredAccess(); - public TileQuantumTank(){ - this(TRTileEntities.QUANTUM_TANK); + public QuantumTankBlockEntity(){ + this(TRBlockEntities.QUANTUM_TANK); } - public TileQuantumTank(BlockEntityType tileEntityTypeIn) { - super(tileEntityTypeIn); + public QuantumTankBlockEntity(BlockEntityType blockEntityTypeIn) { + super(blockEntityTypeIn); } public void readWithoutCoords(final CompoundTag tagCompound) { @@ -76,11 +76,11 @@ public class TileQuantumTank extends TileMachineBase } public ItemStack getDropWithNBT() { - final CompoundTag tileEntity = new CompoundTag(); + final CompoundTag blockEntity = new CompoundTag(); final ItemStack dropStack = TRContent.Machine.QUANTUM_TANK.getStack(); - this.writeWithoutCoords(tileEntity); + this.writeWithoutCoords(blockEntity); dropStack.setTag(new CompoundTag()); - dropStack.getTag().put("tileEntity", tileEntity); + dropStack.getTag().put("blockEntity", blockEntity); return dropStack; } @@ -119,7 +119,7 @@ public class TileQuantumTank extends TileMachineBase // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return this.inventory; } @@ -131,8 +131,8 @@ public class TileQuantumTank extends TileMachineBase // IListInfoProvider @Override - public void addInfo(final List info, final boolean isRealTile, boolean hasData) { - if (isRealTile | hasData) { + public void addInfo(final List info, final boolean isReal, boolean hasData) { + if (isReal | hasData) { if (this.tank.getFluid() != null) { info.add(new LiteralText(this.tank.getFluidAmount() + " of " + this.tank.getFluidType().getName())); } else { @@ -146,7 +146,7 @@ public class TileQuantumTank extends TileMachineBase @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("quantumtank").player(player.inventory).inventory().hotbar() - .addInventory().tile(this).fluidSlot(0, 80, 17).outputSlot(1, 80, 53).addInventory() + .addInventory().blockEntity(this).fluidSlot(0, 80, 17).outputSlot(1, 80, 53).addInventory() .create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java b/src/main/java/techreborn/blockentity/storage/AdjustableSUBlockEntity.java similarity index 86% rename from src/main/java/techreborn/tiles/storage/TileAdjustableSU.java rename to src/main/java/techreborn/blockentity/storage/AdjustableSUBlockEntity.java index 8aad8a89d..e9936b6d8 100644 --- a/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java +++ b/src/main/java/techreborn/blockentity/storage/AdjustableSUBlockEntity.java @@ -22,13 +22,13 @@ * SOFTWARE. */ -package techreborn.tiles.storage; +package techreborn.blockentity.storage; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundTag; import reborncore.api.power.EnumPowerTier; -import reborncore.api.tile.IUpgrade; +import reborncore.api.blockentity.IUpgrade; import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; @@ -37,10 +37,10 @@ import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.RebornInventory; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; @RebornRegister(TechReborn.MOD_ID) -public class TileAdjustableSU extends TileEnergyStorage implements IContainerProvider { +public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "aesu", key = "AesuMaxInput", comment = "AESU Max Input (Value in EU)") public static int maxInput = 16192; @@ -49,12 +49,12 @@ public class TileAdjustableSU extends TileEnergyStorage implements IContainerPro @ConfigRegistry(config = "machines", category = "aesu", key = "AesuMaxEnergy", comment = "AESU Max Energy (Value in EU)") public static int maxEnergy = 100_000_000; - public RebornInventory inventory = new RebornInventory<>(4, "TileAdjustableSU", 64, this).withConfiguredAccess(); + public RebornInventory inventory = new RebornInventory<>(4, "AdjustableSUBlockEntity", 64, this).withConfiguredAccess(); private int OUTPUT = 64; // The current output public int superconductors = 0; - public TileAdjustableSU() { - super(TRTileEntities.ADJUSTABLE_SU, "ADJUSTABLE_SU", 4, TRContent.Machine.ADJUSTABLE_SU.block, EnumPowerTier.INSANE, maxInput, maxOutput, maxEnergy); + public AdjustableSUBlockEntity() { + super(TRBlockEntities.ADJUSTABLE_SU, "ADJUSTABLE_SU", 4, TRContent.Machine.ADJUSTABLE_SU.block, EnumPowerTier.INSANE, maxInput, maxOutput, maxEnergy); } @@ -108,11 +108,11 @@ public class TileAdjustableSU extends TileEnergyStorage implements IContainerPro } public ItemStack getDropWithNBT() { - CompoundTag tileEntity = new CompoundTag(); + CompoundTag blockEntity = new CompoundTag(); ItemStack dropStack = TRContent.Machine.ADJUSTABLE_SU.getStack(); - toTag(tileEntity); + toTag(blockEntity); dropStack.setTag(new CompoundTag()); - dropStack.getTag().put("tileEntity", tileEntity); + dropStack.getTag().put("blockEntity", blockEntity); return dropStack; } @@ -169,7 +169,7 @@ public class TileAdjustableSU extends TileEnergyStorage implements IContainerPro @Override public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("aesu").player(player.inventory).inventory().hotbar().armor() - .complete(8, 18).addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45) + .complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45) .syncEnergyValue().syncIntegerValue(this::getCurrentOutput, this::setCurentOutput).addInventory().create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/storage/TileEnergyStorage.java b/src/main/java/techreborn/blockentity/storage/EnergyStorageBlockEntity.java similarity index 84% rename from src/main/java/techreborn/tiles/storage/TileEnergyStorage.java rename to src/main/java/techreborn/blockentity/storage/EnergyStorageBlockEntity.java index 2a283662f..b7dc4656d 100644 --- a/src/main/java/techreborn/tiles/storage/TileEnergyStorage.java +++ b/src/main/java/techreborn/blockentity/storage/EnergyStorageBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage; +package techreborn.blockentity.storage; import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntityType; @@ -31,19 +31,19 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.Direction; import reborncore.api.IToolDrop; import reborncore.api.power.EnumPowerTier; -import reborncore.api.tile.InventoryProvider; +import reborncore.api.blockentity.InventoryProvider; import reborncore.common.powerSystem.ExternalPowerSystems; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.util.RebornInventory; import techreborn.blocks.storage.BlockEnergyStorage; /** * Created by Rushmead */ -public class TileEnergyStorage extends TilePowerAcceptor +public class EnergyStorageBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider { - public RebornInventory inventory; + public RebornInventory inventory; public String name; public Block wrenchDrop; public EnumPowerTier tier; @@ -51,9 +51,9 @@ public class TileEnergyStorage extends TilePowerAcceptor public int maxOutput; public int maxStorage; - public TileEnergyStorage(BlockEntityType tileEntityType, String name, int invSize, Block wrenchDrop, EnumPowerTier tier, int maxInput, int maxOuput, int maxStorage) { - super(tileEntityType); - inventory = new RebornInventory<>(invSize, "Tile" + name, 64, this).withConfiguredAccess(); + public EnergyStorageBlockEntity(BlockEntityType blockEntityType, String name, int invSize, Block wrenchDrop, EnumPowerTier tier, int maxInput, int maxOuput, int maxStorage) { + super(blockEntityType); + inventory = new RebornInventory<>(invSize, name + "BlockEntity", 64, this).withConfiguredAccess(); this.wrenchDrop = wrenchDrop; this.tier = tier; this.name = name; @@ -131,7 +131,7 @@ public class TileEnergyStorage extends TilePowerAcceptor // ItemHandlerProvider @Override - public RebornInventory getInventory() { + public RebornInventory getInventory() { return inventory; } } diff --git a/src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java b/src/main/java/techreborn/blockentity/storage/HighVoltageSUBlockEntity.java similarity index 79% rename from src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java rename to src/main/java/techreborn/blockentity/storage/HighVoltageSUBlockEntity.java index 067f0d929..6eff88238 100644 --- a/src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java +++ b/src/main/java/techreborn/blockentity/storage/HighVoltageSUBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage; +package techreborn.blockentity.storage; import net.minecraft.entity.player.PlayerEntity; import reborncore.api.power.EnumPowerTier; @@ -30,25 +30,25 @@ import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 14/03/2016. * */ -public class TileHighVoltageSU extends TileEnergyStorage implements IContainerProvider { +public class HighVoltageSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { /** * MFSU should store 40M FE with 2048 FE/t I/O */ - public TileHighVoltageSU() { - super(TRTileEntities.HIGH_VOLTAGE_SU, "HIGH_VOLTAGE_SU", 2, TRContent.Machine.HIGH_VOLTAGE_SU.block, EnumPowerTier.HIGH, 512, 512, 10_000_000); + public HighVoltageSUBlockEntity() { + super(TRBlockEntities.HIGH_VOLTAGE_SU, "HIGH_VOLTAGE_SU", 2, TRContent.Machine.HIGH_VOLTAGE_SU.block, EnumPowerTier.HIGH, 512, 512, 10_000_000); } @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("mfsu").player(player.inventory).inventory().hotbar().armor() - .complete(8, 18).addArmor().addInventory().tile(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); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java b/src/main/java/techreborn/blockentity/storage/LowVoltageSUBlockEntity.java similarity index 79% rename from src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java rename to src/main/java/techreborn/blockentity/storage/LowVoltageSUBlockEntity.java index 9f7815daa..063f41549 100644 --- a/src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java +++ b/src/main/java/techreborn/blockentity/storage/LowVoltageSUBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage; +package techreborn.blockentity.storage; import net.minecraft.entity.player.PlayerEntity; import reborncore.api.power.EnumPowerTier; @@ -30,20 +30,20 @@ import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 14/03/2016. */ -public class TileLowVoltageSU extends TileEnergyStorage implements IContainerProvider { +public class LowVoltageSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { - public TileLowVoltageSU() { - super(TRTileEntities.LOW_VOLTAGE_SU, "BatBox", 2, TRContent.Machine.LOW_VOLTAGE_SU.block, EnumPowerTier.LOW, 32, 32, 40000); + public LowVoltageSUBlockEntity() { + super(TRBlockEntities.LOW_VOLTAGE_SU, "BatBox", 2, TRContent.Machine.LOW_VOLTAGE_SU.block, EnumPowerTier.LOW, 32, 32, 40000); } @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("batbox").player(player.inventory).inventory().hotbar().addInventory() - .tile(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); } } diff --git a/src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java b/src/main/java/techreborn/blockentity/storage/MediumVoltageSUBlockEntity.java similarity index 79% rename from src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java rename to src/main/java/techreborn/blockentity/storage/MediumVoltageSUBlockEntity.java index a3bcb476e..6b9fe5d99 100644 --- a/src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java +++ b/src/main/java/techreborn/blockentity/storage/MediumVoltageSUBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage; +package techreborn.blockentity.storage; import net.minecraft.entity.player.PlayerEntity; import reborncore.api.power.EnumPowerTier; @@ -30,25 +30,25 @@ import reborncore.client.containerBuilder.IContainerProvider; import reborncore.client.containerBuilder.builder.BuiltContainer; import reborncore.client.containerBuilder.builder.ContainerBuilder; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 14/03/2016. * */ -public class TileMediumVoltageSU extends TileEnergyStorage implements IContainerProvider { +public class MediumVoltageSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { /** * MFE should store 1.2M FE with 512 FE/t I/O */ - public TileMediumVoltageSU() { - super(TRTileEntities.MEDIUM_VOLTAGE_SU, "MEDIUM_VOLTAGE_SU", 2, TRContent.Machine.MEDIUM_VOLTAGE_SU.block, EnumPowerTier.MEDIUM, 128, 128, 300000); + public MediumVoltageSUBlockEntity() { + super(TRBlockEntities.MEDIUM_VOLTAGE_SU, "MEDIUM_VOLTAGE_SU", 2, TRContent.Machine.MEDIUM_VOLTAGE_SU.block, EnumPowerTier.MEDIUM, 128, 128, 300000); } @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("mfe").player(player.inventory).inventory().hotbar().armor() - .complete(8, 18).addArmor().addInventory().tile(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); } diff --git a/src/main/java/techreborn/tiles/storage/idsu/IDSUManager.java b/src/main/java/techreborn/blockentity/storage/idsu/IDSUManager.java similarity index 97% rename from src/main/java/techreborn/tiles/storage/idsu/IDSUManager.java rename to src/main/java/techreborn/blockentity/storage/idsu/IDSUManager.java index 8f18c2e45..6342dd445 100644 --- a/src/main/java/techreborn/tiles/storage/idsu/IDSUManager.java +++ b/src/main/java/techreborn/blockentity/storage/idsu/IDSUManager.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage.idsu; +package techreborn.blockentity.storage.idsu; import net.minecraft.world.World; diff --git a/src/main/java/techreborn/tiles/storage/idsu/IDSUSaveManger.java b/src/main/java/techreborn/blockentity/storage/idsu/IDSUSaveManger.java similarity index 97% rename from src/main/java/techreborn/tiles/storage/idsu/IDSUSaveManger.java rename to src/main/java/techreborn/blockentity/storage/idsu/IDSUSaveManger.java index af796d135..41e39f1a7 100644 --- a/src/main/java/techreborn/tiles/storage/idsu/IDSUSaveManger.java +++ b/src/main/java/techreborn/blockentity/storage/idsu/IDSUSaveManger.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage.idsu; +package techreborn.blockentity.storage.idsu; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.PersistentState; diff --git a/src/main/java/techreborn/tiles/storage/idsu/IDataIDSU.java b/src/main/java/techreborn/blockentity/storage/idsu/IDataIDSU.java similarity index 96% rename from src/main/java/techreborn/tiles/storage/idsu/IDataIDSU.java rename to src/main/java/techreborn/blockentity/storage/idsu/IDataIDSU.java index 5c6840344..19917df25 100644 --- a/src/main/java/techreborn/tiles/storage/idsu/IDataIDSU.java +++ b/src/main/java/techreborn/blockentity/storage/idsu/IDataIDSU.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage.idsu; +package techreborn.blockentity.storage.idsu; /** * Created by modmuss50 on 13/06/2017. diff --git a/src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java b/src/main/java/techreborn/blockentity/storage/idsu/InterdimensionalSUBlockEntity.java similarity index 87% rename from src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java rename to src/main/java/techreborn/blockentity/storage/idsu/InterdimensionalSUBlockEntity.java index 4278e4ef3..4ccdecea7 100644 --- a/src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java +++ b/src/main/java/techreborn/blockentity/storage/idsu/InterdimensionalSUBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage.idsu; +package techreborn.blockentity.storage.idsu; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.nbt.CompoundTag; @@ -35,11 +35,11 @@ import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.storage.TileEnergyStorage; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.storage.EnergyStorageBlockEntity; @RebornRegister(TechReborn.MOD_ID) -public class TileInterdimensionalSU extends TileEnergyStorage implements IContainerProvider { +public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider { @ConfigRegistry(config = "machines", category = "idsu", key = "IdsuMaxInput", comment = "IDSU Max Input (Value in EU)") public static int maxInput = 8192; @@ -50,8 +50,8 @@ public class TileInterdimensionalSU extends TileEnergyStorage implements IContai public String ownerUdid; - public TileInterdimensionalSU() { - super(TRTileEntities.INTERDIMENSIONAL_SU, "IDSU", 2, TRContent.Machine.INTERDIMENSIONAL_SU.block, EnumPowerTier.EXTREME, maxInput, maxOutput, maxEnergy); + public InterdimensionalSUBlockEntity() { + super(TRBlockEntities.INTERDIMENSIONAL_SU, "IDSU", 2, TRContent.Machine.INTERDIMENSIONAL_SU.block, EnumPowerTier.EXTREME, maxInput, maxOutput, maxEnergy); } @Override @@ -112,7 +112,7 @@ public class TileInterdimensionalSU extends TileEnergyStorage implements IContai @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("idsu").player(player.inventory).inventory().hotbar().armor() - .complete(8, 18).addArmor().addInventory().tile(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); } diff --git a/src/main/java/techreborn/tiles/storage/lesu/TileLSUStorage.java b/src/main/java/techreborn/blockentity/storage/lesu/LSUStorageBlockEntity.java similarity index 82% rename from src/main/java/techreborn/tiles/storage/lesu/TileLSUStorage.java rename to src/main/java/techreborn/blockentity/storage/lesu/LSUStorageBlockEntity.java index 6cbdf9fc6..6ba115ceb 100644 --- a/src/main/java/techreborn/tiles/storage/lesu/TileLSUStorage.java +++ b/src/main/java/techreborn/blockentity/storage/lesu/LSUStorageBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage.lesu; +package techreborn.blockentity.storage.lesu; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -30,17 +30,17 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; import reborncore.api.IToolDrop; -import reborncore.common.tile.TileMachineBase; +import reborncore.common.blockentity.MachineBaseBlockEntity; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; -public class TileLSUStorage extends TileMachineBase +public class LSUStorageBlockEntity extends MachineBaseBlockEntity implements IToolDrop { public LesuNetwork network; - public TileLSUStorage() { - super(TRTileEntities.LSU_STORAGE); + public LSUStorageBlockEntity() { + super(TRBlockEntities.LSU_STORAGE); } public final void findAndJoinNetwork(World world, int x, int y, int z) { @@ -48,9 +48,9 @@ public class TileLSUStorage extends TileMachineBase network.addElement(this); for (Direction direction : Direction.values()) { if (world.getBlockEntity(new BlockPos(x + direction.getOffsetX(), y + direction.getOffsetY(), - z + direction.getOffsetZ())) instanceof TileLSUStorage) { - TileLSUStorage lesu = (TileLSUStorage) world.getBlockEntity(new BlockPos(x + direction.getOffsetX(), - y + direction.getOffsetY(), z + direction.getOffsetZ())); + z + direction.getOffsetZ())) instanceof LSUStorageBlockEntity) { + LSUStorageBlockEntity lesu = (LSUStorageBlockEntity) world.getBlockEntity(new BlockPos(x + direction.getOffsetX(), + y + direction.getOffsetY(), z + direction.getOffsetZ())); if (lesu.network != null) { lesu.network.merge(network); } diff --git a/src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java b/src/main/java/techreborn/blockentity/storage/lesu/LapotronicSUBlockEntity.java similarity index 85% rename from src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java rename to src/main/java/techreborn/blockentity/storage/lesu/LapotronicSUBlockEntity.java index baa4605f7..77c2812fb 100644 --- a/src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java +++ b/src/main/java/techreborn/blockentity/storage/lesu/LapotronicSUBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.storage.lesu; +package techreborn.blockentity.storage.lesu; import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntity; @@ -39,13 +39,13 @@ import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; import techreborn.blocks.storage.BlockLapotronicSU; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; -import techreborn.tiles.storage.TileEnergyStorage; +import techreborn.init.TRBlockEntities; +import techreborn.blockentity.storage.EnergyStorageBlockEntity; import java.util.ArrayList; @RebornRegister(TechReborn.MOD_ID) -public class TileLapotronicSU extends TileEnergyStorage implements IContainerProvider{ +public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider{ // @ConfigRegistry(config = "machines", category = "lesu", key = "LesuMaxInput", comment = "LESU Max Input (Value in EU)") // public static int maxInput = 8192; @@ -59,8 +59,8 @@ public class TileLapotronicSU extends TileEnergyStorage implements IContainerPro public int connectedBlocks = 0; private ArrayList countedNetworks = new ArrayList<>(); - public TileLapotronicSU() { - super(TRTileEntities.LAPOTRONIC_SU, "LESU", 2, TRContent.Machine.LAPOTRONIC_SU.block, EnumPowerTier.INSANE, 8192, baseOutput, 1_000_000); + public LapotronicSUBlockEntity() { + super(TRBlockEntities.LAPOTRONIC_SU, "LESU", 2, TRContent.Machine.LAPOTRONIC_SU.block, EnumPowerTier.INSANE, 8192, baseOutput, 1_000_000); checkOverfill = false; } @@ -75,14 +75,14 @@ public class TileLapotronicSU extends TileEnergyStorage implements IContainerPro for (Direction dir : Direction.values()) { BlockPos adjucentBlockPos = new BlockPos(pos.getX() + dir.getOffsetX(), pos.getY() + dir.getOffsetX(), pos.getZ() + dir.getOffsetX()); - BlockEntity adjucentTile = world.getBlockEntity(adjucentBlockPos); - if (adjucentTile == null || !(adjucentTile instanceof TileLSUStorage)) { + BlockEntity adjucent = world.getBlockEntity(adjucentBlockPos); + if (adjucent == null || !(adjucent instanceof LSUStorageBlockEntity)) { continue; } - if (((TileLSUStorage) adjucentTile).network == null) { + if (((LSUStorageBlockEntity) adjucent).network == null) { continue; } - LesuNetwork network = ((TileLSUStorage) adjucentTile).network; + LesuNetwork network = ((LSUStorageBlockEntity) adjucent).network; if (!countedNetworks.contains(network)) { if (network.master == null || network.master == this) { connectedBlocks += network.storages.size(); @@ -135,7 +135,7 @@ public class TileLapotronicSU extends TileEnergyStorage implements IContainerPro @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("lesu").player(player.inventory).inventory().hotbar().armor().complete(8, 18) - .addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue() + .addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue() .syncIntegerValue(this::getOutputRate, this::setOutputRate) .syncIntegerValue(this::getConnectedBlocksNum, this::setConnectedBlocksNum).addInventory().create(this, syncID); } diff --git a/src/main/java/techreborn/tiles/storage/lesu/LesuNetwork.java b/src/main/java/techreborn/blockentity/storage/lesu/LesuNetwork.java similarity index 72% rename from src/main/java/techreborn/tiles/storage/lesu/LesuNetwork.java rename to src/main/java/techreborn/blockentity/storage/lesu/LesuNetwork.java index abb03cd16..4ea23c051 100644 --- a/src/main/java/techreborn/tiles/storage/lesu/LesuNetwork.java +++ b/src/main/java/techreborn/blockentity/storage/lesu/LesuNetwork.java @@ -22,30 +22,30 @@ * SOFTWARE. */ -package techreborn.tiles.storage.lesu; +package techreborn.blockentity.storage.lesu; import java.util.ArrayList; public class LesuNetwork { - public ArrayList storages = new ArrayList<>(); + public ArrayList storages = new ArrayList<>(); - public TileLapotronicSU master; + public LapotronicSUBlockEntity master; - public void addElement(TileLSUStorage lesuStorage) { + public void addElement(LSUStorageBlockEntity lesuStorage) { if (!storages.contains(lesuStorage) && storages.size() < 5000) { storages.add(lesuStorage); } } - public void removeElement(TileLSUStorage lesuStorage) { + public void removeElement(LSUStorageBlockEntity lesuStorage) { storages.remove(lesuStorage); rebuild(); } private void rebuild() { master = null; - for (TileLSUStorage lesuStorage : storages) { + for (LSUStorageBlockEntity lesuStorage : storages) { lesuStorage.findAndJoinNetwork(lesuStorage.getWorld(), lesuStorage.getPos().getX(), lesuStorage.getPos().getY(), lesuStorage.getPos().getZ()); } @@ -53,10 +53,10 @@ public class LesuNetwork { public void merge(LesuNetwork network) { if (network != this) { - ArrayList tileLesuStorages = new ArrayList<>(); - tileLesuStorages.addAll(network.storages); + ArrayList blockEntityLesuStorages = new ArrayList<>(); + blockEntityLesuStorages.addAll(network.storages); network.clear(false); - for (TileLSUStorage lesuStorage : tileLesuStorages) { + for (LSUStorageBlockEntity lesuStorage : blockEntityLesuStorages) { lesuStorage.setNetwork(this); } if (network.master != null && this.master == null) { @@ -65,10 +65,10 @@ public class LesuNetwork { } } - private void clear(boolean clearTiles) { - if (clearTiles) { - for (TileLSUStorage tileLesuStorage : storages) { - tileLesuStorage.resetNetwork(); + private void clear(boolean clearBlockEntities) { + if (clearBlockEntities) { + for (LSUStorageBlockEntity blockEntityLesuStorage : storages) { + blockEntityLesuStorage.resetNetwork(); } } storages.clear(); diff --git a/src/main/java/techreborn/tiles/transformers/TileMVTransformer.java b/src/main/java/techreborn/blockentity/transformers/HVTransformerBlockEntity.java similarity index 80% rename from src/main/java/techreborn/tiles/transformers/TileMVTransformer.java rename to src/main/java/techreborn/blockentity/transformers/HVTransformerBlockEntity.java index 2f763eab0..e4c43ac7f 100644 --- a/src/main/java/techreborn/tiles/transformers/TileMVTransformer.java +++ b/src/main/java/techreborn/blockentity/transformers/HVTransformerBlockEntity.java @@ -22,18 +22,19 @@ * SOFTWARE. */ -package techreborn.tiles.transformers; +package techreborn.blockentity.transformers; import reborncore.api.power.EnumPowerTier; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 16/03/2016. */ -public class TileMVTransformer extends TileTransformer { +public class HVTransformerBlockEntity extends TransformerBlockEntity { - public TileMVTransformer() { - super(TRTileEntities.MV_TRANSFORMER, "MVTransformer", TRContent.Machine.MV_TRANSFORMER.block, EnumPowerTier.HIGH); + public HVTransformerBlockEntity() { + super(TRBlockEntities.HV_TRANSFORMER, "HVTransformer", TRContent.Machine.HV_TRANSFORMER.block, EnumPowerTier.EXTREME); } + } diff --git a/src/main/java/techreborn/tiles/transformers/TileHVTransformer.java b/src/main/java/techreborn/blockentity/transformers/LVTransformerBlockEntity.java similarity index 80% rename from src/main/java/techreborn/tiles/transformers/TileHVTransformer.java rename to src/main/java/techreborn/blockentity/transformers/LVTransformerBlockEntity.java index 0fcd0bc4c..b187f0cd9 100644 --- a/src/main/java/techreborn/tiles/transformers/TileHVTransformer.java +++ b/src/main/java/techreborn/blockentity/transformers/LVTransformerBlockEntity.java @@ -22,19 +22,19 @@ * SOFTWARE. */ -package techreborn.tiles.transformers; +package techreborn.blockentity.transformers; import reborncore.api.power.EnumPowerTier; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 16/03/2016. */ -public class TileHVTransformer extends TileTransformer { +public class LVTransformerBlockEntity extends TransformerBlockEntity { - public TileHVTransformer() { - super(TRTileEntities.HV_TRANSFORMER, "HVTransformer", TRContent.Machine.HV_TRANSFORMER.block, EnumPowerTier.EXTREME); + public LVTransformerBlockEntity() { + super(TRBlockEntities.LV_TRANSFORMER, "LVTransformer", TRContent.Machine.LV_TRANSFORMER.block, EnumPowerTier.MEDIUM); } } diff --git a/src/main/java/techreborn/tiles/transformers/TileLVTransformer.java b/src/main/java/techreborn/blockentity/transformers/MVTransformerBlockEntity.java similarity index 80% rename from src/main/java/techreborn/tiles/transformers/TileLVTransformer.java rename to src/main/java/techreborn/blockentity/transformers/MVTransformerBlockEntity.java index 7497679cc..b8e785d68 100644 --- a/src/main/java/techreborn/tiles/transformers/TileLVTransformer.java +++ b/src/main/java/techreborn/blockentity/transformers/MVTransformerBlockEntity.java @@ -22,19 +22,18 @@ * SOFTWARE. */ -package techreborn.tiles.transformers; +package techreborn.blockentity.transformers; import reborncore.api.power.EnumPowerTier; import techreborn.init.TRContent; -import techreborn.init.TRTileEntities; +import techreborn.init.TRBlockEntities; /** * Created by modmuss50 on 16/03/2016. */ -public class TileLVTransformer extends TileTransformer { +public class MVTransformerBlockEntity extends TransformerBlockEntity { - public TileLVTransformer() { - super(TRTileEntities.LV_TRANSFORMER, "LVTransformer", TRContent.Machine.LV_TRANSFORMER.block, EnumPowerTier.MEDIUM); + public MVTransformerBlockEntity() { + super(TRBlockEntities.MV_TRANSFORMER, "MVTransformer", TRContent.Machine.MV_TRANSFORMER.block, EnumPowerTier.HIGH); } - } diff --git a/src/main/java/techreborn/tiles/transformers/TileTransformer.java b/src/main/java/techreborn/blockentity/transformers/TransformerBlockEntity.java similarity index 92% rename from src/main/java/techreborn/tiles/transformers/TileTransformer.java rename to src/main/java/techreborn/blockentity/transformers/TransformerBlockEntity.java index d884688d9..02f00deaa 100644 --- a/src/main/java/techreborn/tiles/transformers/TileTransformer.java +++ b/src/main/java/techreborn/blockentity/transformers/TransformerBlockEntity.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles.transformers; +package techreborn.blockentity.transformers; import net.minecraft.text.LiteralText; import net.minecraft.text.Text; @@ -36,7 +36,7 @@ import reborncore.api.IListInfoProvider; import reborncore.api.IToolDrop; import reborncore.api.power.EnumPowerTier; import reborncore.common.powerSystem.PowerSystem; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import reborncore.common.util.StringUtils; @@ -49,7 +49,7 @@ import java.util.List; * Created by Rushmead */ @RebornRegister(TechReborn.MOD_ID) -public class TileTransformer extends TilePowerAcceptor +public class TransformerBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, IListInfoProvider { @ConfigRegistry(config = "misc", category = "general", key = "IC2TransformersStyle", comment = "Input from dots side, output from other sides, like in IC2.") @@ -63,8 +63,8 @@ public class TileTransformer extends TilePowerAcceptor public int maxOutput; public int maxStorage; - public TileTransformer(BlockEntityType tileEntityType, String name, Block wrenchDrop, EnumPowerTier tier) { - super(tileEntityType); + public TransformerBlockEntity(BlockEntityType blockEntityType, String name, Block wrenchDrop, EnumPowerTier tier) { + super(blockEntityType); this.wrenchDrop = wrenchDrop; this.inputTier = tier; if (tier != EnumPowerTier.MICRO) { @@ -142,7 +142,7 @@ public class TileTransformer extends TilePowerAcceptor // IListInfoProvider @Override - public void addInfo(List info, boolean isRealTile, boolean hasData) { + public void addInfo(List info, boolean isReal, boolean hasData) { info.add(new LiteralText(Formatting.GRAY + "Input Rate: " + Formatting.GOLD + PowerSystem.getLocaliszedPowerFormatted((int) getMaxInput()))); info.add(new LiteralText(Formatting.GRAY + "Input Tier: " + Formatting.GOLD + StringUtils.toFirstCapitalAllLowercase(inputTier.toString()))); info.add(new LiteralText(Formatting.GRAY + "Output Rate: " + Formatting.GOLD + PowerSystem.getLocaliszedPowerFormatted((int) getMaxOutput()))); diff --git a/src/main/java/techreborn/blocks/BlockAlarm.java b/src/main/java/techreborn/blocks/BlockAlarm.java index d131ddf03..553b8113b 100644 --- a/src/main/java/techreborn/blocks/BlockAlarm.java +++ b/src/main/java/techreborn/blocks/BlockAlarm.java @@ -48,15 +48,15 @@ import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import net.minecraft.world.World; import reborncore.api.ToolManager; -import reborncore.common.BaseTileBlock; +import reborncore.common.BaseBlockEntityProvider; import reborncore.common.blocks.BlockWrenchEventHandler; import reborncore.common.util.WrenchUtils; -import techreborn.tiles.TileAlarm; +import techreborn.blockentity.AlarmBlockEntity; import javax.annotation.Nullable; import java.util.List; -public class BlockAlarm extends BaseTileBlock { +public class BlockAlarm extends BaseBlockEntityProvider { public static DirectionProperty FACING = Properties.FACING; public static BooleanProperty ACTIVE; protected final VoxelShape[] shape; @@ -103,7 +103,7 @@ public class BlockAlarm extends BaseTileBlock { @Nullable @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileAlarm(); + return new AlarmBlockEntity(); } // Block @@ -128,10 +128,10 @@ public class BlockAlarm extends BaseTileBlock { @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND); - BlockEntity tileEntity = worldIn.getBlockEntity(pos); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); - // We extended BaseTileBlock. Thus we should always have tile entity. I hope. - if (tileEntity == null) { + // We extended BaseTileBlock. Thus we should always have blockEntity entity. I hope. + if (blockEntity == null) { return false; } @@ -142,7 +142,7 @@ public class BlockAlarm extends BaseTileBlock { } if (!worldIn.isClient && playerIn.isSneaking()) { - ((TileAlarm) tileEntity).rightClick(); + ((AlarmBlockEntity) blockEntity).rightClick(); return true; } diff --git a/src/main/java/techreborn/blocks/BlockMachineCasing.java b/src/main/java/techreborn/blocks/BlockMachineCasing.java index d0ec44c23..efaf9725d 100644 --- a/src/main/java/techreborn/blocks/BlockMachineCasing.java +++ b/src/main/java/techreborn/blocks/BlockMachineCasing.java @@ -32,7 +32,7 @@ import net.minecraft.block.entity.BlockEntity; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.world.BlockView; import reborncore.common.multiblock.BlockMultiblockBase; -import techreborn.tiles.TileMachineCasing; +import techreborn.blockentity.MachineCasingBlockEntity; public class BlockMachineCasing extends BlockMultiblockBase { @@ -54,7 +54,7 @@ public class BlockMachineCasing extends BlockMultiblockBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileMachineCasing(); + return new MachineCasingBlockEntity(); } } diff --git a/src/main/java/techreborn/blocks/BlockSupercondensator.java b/src/main/java/techreborn/blocks/BlockSupercondensator.java index 3031b1ae1..6eb4415c6 100644 --- a/src/main/java/techreborn/blocks/BlockSupercondensator.java +++ b/src/main/java/techreborn/blocks/BlockSupercondensator.java @@ -31,7 +31,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.text.Text; import net.minecraft.text.LiteralText; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import javax.annotation.Nullable; diff --git a/src/main/java/techreborn/blocks/cable/BlockCable.java b/src/main/java/techreborn/blocks/cable/BlockCable.java index ca41bf3e7..090b14e6f 100644 --- a/src/main/java/techreborn/blocks/cable/BlockCable.java +++ b/src/main/java/techreborn/blocks/cable/BlockCable.java @@ -46,7 +46,7 @@ import net.minecraft.world.BlockView; import net.minecraft.world.IWorld; import net.minecraft.world.World; import reborncore.api.ToolManager; -import reborncore.api.power.IEnergyInterfaceTile; +import reborncore.api.power.EnergyBlockEntity; import reborncore.common.blocks.BlockWrenchEventHandler; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; @@ -54,7 +54,7 @@ import reborncore.common.util.WrenchUtils; import techreborn.TechReborn; import techreborn.init.ModSounds; import techreborn.init.TRContent; -import techreborn.tiles.cable.TileCable; +import techreborn.blockentity.cable.CableBlockEntity; import techreborn.utils.damageSources.ElectrialShockSource; import javax.annotation.Nullable; @@ -123,8 +123,8 @@ public class BlockCable extends BlockWithEntity { } private Boolean canConnectTo(IWorld world, BlockPos pos, Direction facing) { - BlockEntity tileEntity = world.getBlockEntity(pos); - if (tileEntity != null && (tileEntity instanceof IEnergyInterfaceTile)) { + BlockEntity blockEntity = world.getBlockEntity(pos); + if (blockEntity != null && (blockEntity instanceof EnergyBlockEntity)) { return Boolean.TRUE; } return Boolean.FALSE; @@ -139,17 +139,17 @@ public class BlockCable extends BlockWithEntity { @Nullable @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileCable(); + return new CableBlockEntity(); } // Block @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND); - BlockEntity tileEntity = worldIn.getBlockEntity(pos); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); - // We should always have tile entity. I hope. - if (tileEntity == null) { + // We should always have blockEntity entity. I hope. + if (blockEntity == null) { return false; } @@ -203,16 +203,16 @@ public class BlockCable extends BlockWithEntity { return; } - BlockEntity tileEntity = worldIn.getBlockEntity(pos); - if (tileEntity == null) { + BlockEntity blockEntity = worldIn.getBlockEntity(pos); + if (blockEntity == null) { return; } - if (!(tileEntity instanceof TileCable)) { + if (!(blockEntity instanceof CableBlockEntity)) { return; } - TileCable tileCable = (TileCable) tileEntity; - if (tileCable.power <= 0) { + CableBlockEntity blockEntityCable = (CableBlockEntity) blockEntity; + if (blockEntityCable.power <= 0) { return; } diff --git a/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java b/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java index 3a5d7c1b9..099b769c1 100644 --- a/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java +++ b/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java @@ -26,10 +26,10 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.generator.advanced.TileDieselGenerator; +import techreborn.blockentity.generator.advanced.DieselGeneratorBlockEntity; /** * Block for Diesel Generator @@ -38,7 +38,7 @@ public class BlockDieselGenerator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileDieselGenerator(); + return new DieselGeneratorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockDragonEggSyphon.java b/src/main/java/techreborn/blocks/generator/BlockDragonEggSyphon.java index 557aed0b4..732be488b 100644 --- a/src/main/java/techreborn/blocks/generator/BlockDragonEggSyphon.java +++ b/src/main/java/techreborn/blocks/generator/BlockDragonEggSyphon.java @@ -26,15 +26,15 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; -import techreborn.tiles.generator.advanced.TileDragonEggSyphon; +import techreborn.blockentity.generator.advanced.DragonEggSyphonBlockEntity; public class BlockDragonEggSyphon extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileDragonEggSyphon(); + return new DragonEggSyphonBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java b/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java index 3d1d6f806..f7a101533 100644 --- a/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java +++ b/src/main/java/techreborn/blocks/generator/BlockFusionControlComputer.java @@ -33,12 +33,12 @@ import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.util.Torus; import techreborn.client.EGui; import techreborn.init.TRContent; -import techreborn.tiles.fusionReactor.TileFusionControlComputer; +import techreborn.blockentity.fusionReactor.FusionControlComputerBlockEntity; import techreborn.utils.damageSources.FusionDamageSource; import java.util.List; @@ -48,15 +48,15 @@ public class BlockFusionControlComputer extends BlockMachineBase { @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { - final TileFusionControlComputer tileFusionControlComputer = (TileFusionControlComputer) worldIn.getBlockEntity(pos); + final FusionControlComputerBlockEntity blockEntityFusionControlComputer = (FusionControlComputerBlockEntity) worldIn.getBlockEntity(pos); if(!playerIn.getStackInHand(hand).isEmpty() && (playerIn.getStackInHand(hand).getItem() == TRContent.Machine.FUSION_COIL.asItem())){ - List coils = Torus.generate(tileFusionControlComputer.getPos(), tileFusionControlComputer.size); + List coils = Torus.generate(blockEntityFusionControlComputer.getPos(), blockEntityFusionControlComputer.size); boolean placed = false; for(BlockPos coil : coils){ if(playerIn.getStackInHand(hand).isEmpty()){ return true; } - if(worldIn.isAir(coil) && !tileFusionControlComputer.isCoil(coil)){ + if(worldIn.isAir(coil) && !blockEntityFusionControlComputer.isCoil(coil)){ worldIn.setBlockState(coil, TRContent.Machine.FUSION_COIL.block.getDefaultState()); if(!playerIn.isCreative()){ playerIn.getStackInHand(hand).decrement(1); @@ -69,7 +69,7 @@ public class BlockFusionControlComputer extends BlockMachineBase { } } - tileFusionControlComputer.checkCoils(); + blockEntityFusionControlComputer.checkCoils(); return super.activate(state, worldIn, pos, playerIn, hand, hitResult); } @@ -81,9 +81,9 @@ public class BlockFusionControlComputer extends BlockMachineBase { @Override public void onSteppedOn(final World worldIn, final BlockPos pos, final Entity entityIn) { super.onSteppedOn(worldIn, pos, entityIn); - if (worldIn.getBlockEntity(pos) instanceof TileFusionControlComputer) { - if (((TileFusionControlComputer) worldIn.getBlockEntity(pos)).crafingTickTime != 0 - && ((TileFusionControlComputer) worldIn.getBlockEntity(pos)).checkCoils()) { + if (worldIn.getBlockEntity(pos) instanceof FusionControlComputerBlockEntity) { + if (((FusionControlComputerBlockEntity) worldIn.getBlockEntity(pos)).crafingTickTime != 0 + && ((FusionControlComputerBlockEntity) worldIn.getBlockEntity(pos)).checkCoils()) { entityIn.damage(new FusionDamageSource(), 200F); } } @@ -91,7 +91,7 @@ public class BlockFusionControlComputer extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileFusionControlComputer(); + return new FusionControlComputerBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java b/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java index e89a2d5ff..2e89aa4b4 100644 --- a/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java +++ b/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java @@ -26,16 +26,16 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.generator.advanced.TileGasTurbine; +import techreborn.blockentity.generator.advanced.GasTurbineBlockEntity; public class BlockGasTurbine extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileGasTurbine(); + return new GasTurbineBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockLightningRod.java b/src/main/java/techreborn/blocks/generator/BlockLightningRod.java index cb5686231..43015c405 100644 --- a/src/main/java/techreborn/blocks/generator/BlockLightningRod.java +++ b/src/main/java/techreborn/blocks/generator/BlockLightningRod.java @@ -26,15 +26,15 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; -import techreborn.tiles.generator.TileLightningRod; +import techreborn.blockentity.generator.LightningRodBlockEntity; public class BlockLightningRod extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileLightningRod(); + return new LightningRodBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java index 0d39ced64..cacd5901b 100644 --- a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java +++ b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java @@ -30,7 +30,7 @@ import net.minecraft.util.Formatting; import net.minecraft.client.item.TooltipContext; import net.minecraft.item.ItemStack; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java index 124a49527..b1a517ef6 100644 --- a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java +++ b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java @@ -30,7 +30,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.text.Text; import net.minecraft.text.LiteralText; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java b/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java index 105196a0e..2c9d6e7c2 100644 --- a/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java +++ b/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java @@ -26,10 +26,10 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.generator.TilePlasmaGenerator; +import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; /** * Block for Plasma Generator @@ -38,7 +38,7 @@ public class BlockPlasmaGenerator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TilePlasmaGenerator(); + return new PlasmaGeneratorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java b/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java index f67988ce8..c2ea70a8c 100644 --- a/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java +++ b/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java @@ -26,16 +26,16 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.generator.advanced.TileSemiFluidGenerator; +import techreborn.blockentity.generator.advanced.SemiFluidGeneratorBlockEntity; public class BlockSemiFluidGenerator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileSemiFluidGenerator(); + return new SemiFluidGeneratorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java b/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java index fc0d94e12..bcc1f4221 100644 --- a/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java +++ b/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java @@ -26,10 +26,10 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.init.TRContent.SolarPanels; -import techreborn.tiles.generator.TileSolarPanel; +import techreborn.blockentity.generator.SolarPanelBlockEntity; /** * Created by modmuss50 on 25/02/2016. @@ -45,7 +45,7 @@ public class BlockSolarPanel extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileSolarPanel(); + return new SolarPanelBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockSolidFuelGenerator.java b/src/main/java/techreborn/blocks/generator/BlockSolidFuelGenerator.java index b416697de..79e98be07 100644 --- a/src/main/java/techreborn/blocks/generator/BlockSolidFuelGenerator.java +++ b/src/main/java/techreborn/blocks/generator/BlockSolidFuelGenerator.java @@ -26,10 +26,10 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.generator.basic.TileSolidFuelGenerator; +import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity; public class BlockSolidFuelGenerator extends BlockMachineBase { @@ -39,7 +39,7 @@ public class BlockSolidFuelGenerator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileSolidFuelGenerator(); + return new SolidFuelGeneratorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java b/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java index 4e68dd2c7..8c12fa21e 100644 --- a/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java +++ b/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java @@ -26,16 +26,16 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.generator.advanced.TileThermalGenerator; +import techreborn.blockentity.generator.advanced.ThermalGeneratorBlockEntity; public class BlockThermalGenerator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileThermalGenerator(); + return new ThermalGeneratorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockWaterMill.java b/src/main/java/techreborn/blocks/generator/BlockWaterMill.java index 7bf7d9c5a..fef57c207 100644 --- a/src/main/java/techreborn/blocks/generator/BlockWaterMill.java +++ b/src/main/java/techreborn/blocks/generator/BlockWaterMill.java @@ -26,9 +26,9 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; -import techreborn.tiles.generator.basic.TileWaterMill; +import techreborn.blockentity.generator.basic.WaterMillBlockEntity; /** * Created by modmuss50 on 25/02/2016. @@ -37,7 +37,7 @@ public class BlockWaterMill extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileWaterMill(); + return new WaterMillBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/generator/BlockWindMill.java b/src/main/java/techreborn/blocks/generator/BlockWindMill.java index 88ca984e5..6a45d2f31 100644 --- a/src/main/java/techreborn/blocks/generator/BlockWindMill.java +++ b/src/main/java/techreborn/blocks/generator/BlockWindMill.java @@ -26,9 +26,9 @@ package techreborn.blocks.generator; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; -import techreborn.tiles.generator.basic.TileWindMill; +import techreborn.blockentity.generator.basic.WindMillBlockEntity; /** * Created by modmuss50 on 25/02/2016. @@ -37,7 +37,7 @@ public class BlockWindMill extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileWindMill(); + return new WindMillBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/lighting/BlockLamp.java b/src/main/java/techreborn/blocks/lighting/BlockLamp.java index 53a71242e..aa9cb33e3 100644 --- a/src/main/java/techreborn/blocks/lighting/BlockLamp.java +++ b/src/main/java/techreborn/blocks/lighting/BlockLamp.java @@ -44,14 +44,14 @@ import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import net.minecraft.world.World; import reborncore.api.ToolManager; -import reborncore.common.BaseTileBlock; +import reborncore.common.BaseBlockEntityProvider; import reborncore.common.blocks.BlockWrenchEventHandler; import reborncore.common.util.WrenchUtils; -import techreborn.tiles.lighting.TileLamp; +import techreborn.blockentity.lighting.LampBlockEntity; import javax.annotation.Nullable; -public class BlockLamp extends BaseTileBlock { +public class BlockLamp extends BaseBlockEntityProvider { public static DirectionProperty FACING = Properties.FACING; public static BooleanProperty ACTIVE; @@ -107,7 +107,7 @@ public class BlockLamp extends BaseTileBlock { // BaseTileBlock @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileLamp(); + return new LampBlockEntity(); } // Block @@ -142,10 +142,10 @@ public class BlockLamp extends BaseTileBlock { @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND); - BlockEntity tileEntity = worldIn.getBlockEntity(pos); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); - // We extended BaseTileBlock. Thus we should always have tile entity. I hope. - if (tileEntity == null) { + // We extended BaseTileBlock. Thus we should always have blockEntity entity. I hope. + if (blockEntity == null) { return false; } diff --git a/src/main/java/techreborn/blocks/misc/BlockComputerCube.java b/src/main/java/techreborn/blocks/misc/BlockComputerCube.java index 8603553ba..8ee359f46 100644 --- a/src/main/java/techreborn/blocks/misc/BlockComputerCube.java +++ b/src/main/java/techreborn/blocks/misc/BlockComputerCube.java @@ -35,7 +35,7 @@ import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import reborncore.api.ToolManager; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.init.ModSounds; import techreborn.init.TRContent; diff --git a/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java b/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java index 521c930d0..e8ae2a724 100644 --- a/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java @@ -34,7 +34,7 @@ import net.minecraft.world.World; import reborncore.common.RebornCoreConfig; import techreborn.client.EGui; import techreborn.init.TRContent; -import techreborn.tiles.storage.TileAdjustableSU; +import techreborn.blockentity.storage.AdjustableSUBlockEntity; public class BlockAdjustableSU extends BlockEnergyStorage { @@ -44,7 +44,7 @@ public class BlockAdjustableSU extends BlockEnergyStorage { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileAdjustableSU(); + return new AdjustableSUBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java b/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java index 47c011a9b..7291e4174 100644 --- a/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java +++ b/src/main/java/techreborn/blocks/storage/BlockEnergyStorage.java @@ -41,15 +41,15 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; import reborncore.api.ToolManager; -import reborncore.api.tile.IMachineGuiHandler; -import reborncore.common.BaseTileBlock; +import reborncore.api.blockentity.IMachineGuiHandler; +import reborncore.common.BaseBlockEntityProvider; import reborncore.common.blocks.BlockWrenchEventHandler; import reborncore.common.util.WrenchUtils; /** * Created by Rushmead */ -public abstract class BlockEnergyStorage extends BaseTileBlock { +public abstract class BlockEnergyStorage extends BaseBlockEntityProvider { public static DirectionProperty FACING = Properties.FACING; public String name; public IMachineGuiHandler gui; @@ -101,10 +101,10 @@ public abstract class BlockEnergyStorage extends BaseTileBlock { @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND); - BlockEntity tileEntity = worldIn.getBlockEntity(pos); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); - // We extended BlockTileBase. Thus we should always have tile entity. I hope. - if (tileEntity == null) { + // We extended BlockTileBase. Thus we should always have blockEntity entity. I hope. + if (blockEntity == null) { return false; } diff --git a/src/main/java/techreborn/blocks/storage/BlockHighVoltageSU.java b/src/main/java/techreborn/blocks/storage/BlockHighVoltageSU.java index 0a07179e4..5f8701954 100644 --- a/src/main/java/techreborn/blocks/storage/BlockHighVoltageSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockHighVoltageSU.java @@ -34,7 +34,7 @@ import net.minecraft.world.World; import reborncore.common.RebornCoreConfig; import techreborn.client.EGui; import techreborn.init.TRContent; -import techreborn.tiles.storage.TileHighVoltageSU; +import techreborn.blockentity.storage.HighVoltageSUBlockEntity; /** * Created by modmuss50 on 14/03/2016. @@ -47,7 +47,7 @@ public class BlockHighVoltageSU extends BlockEnergyStorage { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileHighVoltageSU(); + return new HighVoltageSUBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/storage/BlockInterdimensionalSU.java b/src/main/java/techreborn/blocks/storage/BlockInterdimensionalSU.java index 1f281fdf4..ae8e4c0a9 100644 --- a/src/main/java/techreborn/blocks/storage/BlockInterdimensionalSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockInterdimensionalSU.java @@ -36,7 +36,7 @@ import net.minecraft.world.World; import reborncore.common.RebornCoreConfig; import techreborn.client.EGui; import techreborn.init.TRContent; -import techreborn.tiles.storage.idsu.TileInterdimensionalSU; +import techreborn.blockentity.storage.idsu.InterdimensionalSUBlockEntity; public class BlockInterdimensionalSU extends BlockEnergyStorage { @@ -46,14 +46,14 @@ public class BlockInterdimensionalSU extends BlockEnergyStorage { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileInterdimensionalSU(); + return new InterdimensionalSUBlockEntity(); } @Override public BlockState getPlacementState(ItemPlacementContext context) { - final BlockEntity tile = context.getWorld().getBlockEntity(context.getBlockPos()); - if (tile instanceof TileInterdimensionalSU) { - ((TileInterdimensionalSU) tile).ownerUdid = context.getPlayer().getUuid().toString(); + final BlockEntity blockEntity = context.getWorld().getBlockEntity(context.getBlockPos()); + if (blockEntity instanceof InterdimensionalSUBlockEntity) { + ((InterdimensionalSUBlockEntity) blockEntity).ownerUdid = context.getPlayer().getUuid().toString(); } return this.getDefaultState(); } @@ -61,9 +61,9 @@ public class BlockInterdimensionalSU extends BlockEnergyStorage { @Override public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { super.onPlaced(world, pos, state, placer, stack); - BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileInterdimensionalSU) { - ((TileInterdimensionalSU) tile).ownerUdid = placer.getUuid().toString(); + BlockEntity blockEntity = world.getBlockEntity(pos); + if (blockEntity instanceof InterdimensionalSUBlockEntity) { + ((InterdimensionalSUBlockEntity) blockEntity).ownerUdid = placer.getUuid().toString(); } } diff --git a/src/main/java/techreborn/blocks/storage/BlockLSUStorage.java b/src/main/java/techreborn/blocks/storage/BlockLSUStorage.java index f9c269701..1bf983d42 100644 --- a/src/main/java/techreborn/blocks/storage/BlockLSUStorage.java +++ b/src/main/java/techreborn/blocks/storage/BlockLSUStorage.java @@ -38,17 +38,17 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; import reborncore.api.ToolManager; -import reborncore.common.BaseTileBlock; +import reborncore.common.BaseBlockEntityProvider; import reborncore.common.RebornCoreConfig; import reborncore.common.blocks.BlockWrenchEventHandler; import reborncore.common.util.WrenchUtils; import techreborn.init.TRContent; -import techreborn.tiles.storage.lesu.TileLSUStorage; +import techreborn.blockentity.storage.lesu.LSUStorageBlockEntity; /** * Energy storage block for LESU */ -public class BlockLSUStorage extends BaseTileBlock { +public class BlockLSUStorage extends BaseBlockEntityProvider { public BlockLSUStorage() { super(FabricBlockSettings.of(Material.METAL).strength(2f, 2f).build()); @@ -61,10 +61,10 @@ public class BlockLSUStorage extends BaseTileBlock { if (state.getBlock() == newState.getBlock()) { return; } - if (worldIn.getBlockEntity(pos) instanceof TileLSUStorage) { - TileLSUStorage tile = (TileLSUStorage) worldIn.getBlockEntity(pos); - if (tile != null) { - tile.removeFromNetwork(); + if (worldIn.getBlockEntity(pos) instanceof LSUStorageBlockEntity) { + LSUStorageBlockEntity blockEntity = (LSUStorageBlockEntity) worldIn.getBlockEntity(pos); + if (blockEntity != null) { + blockEntity.removeFromNetwork(); } } super.onBlockRemoved(state, worldIn, pos, newState, isMoving); @@ -72,16 +72,16 @@ public class BlockLSUStorage extends BaseTileBlock { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileLSUStorage(); + return new LSUStorageBlockEntity(); } @Override public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack itemstack) { super.onPlaced(world, pos, state, player, itemstack); - if (world.getBlockEntity(pos) instanceof TileLSUStorage) { - TileLSUStorage tile = (TileLSUStorage) world.getBlockEntity(pos); - if (tile != null) { - tile.rebuildNetwork(); + if (world.getBlockEntity(pos) instanceof LSUStorageBlockEntity) { + LSUStorageBlockEntity blockEntity = (LSUStorageBlockEntity) world.getBlockEntity(pos); + if (blockEntity != null) { + blockEntity.rebuildNetwork(); } } } @@ -90,10 +90,10 @@ public class BlockLSUStorage extends BaseTileBlock { @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND); - BlockEntity tileEntity = worldIn.getBlockEntity(pos); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); - // We extended BaseTileBlock. Thus we should always have tile entity. I hope. - if (tileEntity == null) { + // We extended BaseTileBlock. Thus we should always have blockEntity entity. I hope. + if (blockEntity == null) { return false; } diff --git a/src/main/java/techreborn/blocks/storage/BlockLapotronicSU.java b/src/main/java/techreborn/blocks/storage/BlockLapotronicSU.java index 14f1cde51..42670958c 100644 --- a/src/main/java/techreborn/blocks/storage/BlockLapotronicSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockLapotronicSU.java @@ -34,7 +34,7 @@ import net.minecraft.world.World; import reborncore.common.RebornCoreConfig; import techreborn.client.EGui; import techreborn.init.TRContent; -import techreborn.tiles.storage.lesu.TileLapotronicSU; +import techreborn.blockentity.storage.lesu.LapotronicSUBlockEntity; public class BlockLapotronicSU extends BlockEnergyStorage { @@ -44,7 +44,7 @@ public class BlockLapotronicSU extends BlockEnergyStorage { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileLapotronicSU(); + return new LapotronicSUBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/storage/BlockLowVoltageSU.java b/src/main/java/techreborn/blocks/storage/BlockLowVoltageSU.java index 85d50844c..f9505c77d 100644 --- a/src/main/java/techreborn/blocks/storage/BlockLowVoltageSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockLowVoltageSU.java @@ -27,7 +27,7 @@ package techreborn.blocks.storage; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; import techreborn.client.EGui; -import techreborn.tiles.storage.TileLowVoltageSU; +import techreborn.blockentity.storage.LowVoltageSUBlockEntity; /** * Created by modmuss50 on 14/03/2016. @@ -40,6 +40,6 @@ public class BlockLowVoltageSU extends BlockEnergyStorage { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileLowVoltageSU(); + return new LowVoltageSUBlockEntity(); } } diff --git a/src/main/java/techreborn/blocks/storage/BlockMediumVoltageSU.java b/src/main/java/techreborn/blocks/storage/BlockMediumVoltageSU.java index 476aaa210..eb18de5a6 100644 --- a/src/main/java/techreborn/blocks/storage/BlockMediumVoltageSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockMediumVoltageSU.java @@ -34,7 +34,7 @@ import net.minecraft.world.World; import reborncore.common.RebornCoreConfig; import techreborn.client.EGui; import techreborn.init.TRContent; -import techreborn.tiles.storage.TileMediumVoltageSU; +import techreborn.blockentity.storage.MediumVoltageSUBlockEntity; /** * Created by modmuss50 on 14/03/2016. @@ -47,7 +47,7 @@ public class BlockMediumVoltageSU extends BlockEnergyStorage { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileMediumVoltageSU(); + return new MediumVoltageSUBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier0/BlockIronAlloyFurnace.java b/src/main/java/techreborn/blocks/tier0/BlockIronAlloyFurnace.java index 681e4c614..04df14593 100644 --- a/src/main/java/techreborn/blocks/tier0/BlockIronAlloyFurnace.java +++ b/src/main/java/techreborn/blocks/tier0/BlockIronAlloyFurnace.java @@ -31,16 +31,16 @@ import net.minecraft.util.DefaultedList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.iron.TileIronAlloyFurnace; +import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity; public class BlockIronAlloyFurnace extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileIronAlloyFurnace(); + return new IronAlloyFurnaceBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier0/BlockIronFurnace.java b/src/main/java/techreborn/blocks/tier0/BlockIronFurnace.java index fb2d7481f..1718da498 100644 --- a/src/main/java/techreborn/blocks/tier0/BlockIronFurnace.java +++ b/src/main/java/techreborn/blocks/tier0/BlockIronFurnace.java @@ -37,10 +37,10 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.iron.TileIronFurnace; +import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity; import java.util.Random; @@ -86,7 +86,7 @@ public class BlockIronFurnace extends BlockMachineBase { // BlockMachineBase @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileIronFurnace(); + return new IronFurnaceBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java b/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java index 9d659f0f7..45f36012f 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java +++ b/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java @@ -26,10 +26,10 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileAlloySmelter; +import techreborn.blockentity.machine.tier1.AlloySmelterBlockEntity; public class BlockAlloySmelter extends BlockMachineBase { @@ -39,7 +39,7 @@ public class BlockAlloySmelter extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileAlloySmelter(); + return new AlloySmelterBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockAssemblingMachine.java b/src/main/java/techreborn/blocks/tier1/BlockAssemblingMachine.java index 2e07542a1..8268279ee 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockAssemblingMachine.java +++ b/src/main/java/techreborn/blocks/tier1/BlockAssemblingMachine.java @@ -26,10 +26,10 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileAssemblingMachine; +import techreborn.blockentity.machine.tier1.AssemblingMachineBlockEntity; public class BlockAssemblingMachine extends BlockMachineBase { @@ -39,7 +39,7 @@ public class BlockAssemblingMachine extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileAssemblingMachine(); + return new AssemblingMachineBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockAutoCraftingTable.java b/src/main/java/techreborn/blocks/tier1/BlockAutoCraftingTable.java index 66e462b86..96e03091b 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockAutoCraftingTable.java +++ b/src/main/java/techreborn/blocks/tier1/BlockAutoCraftingTable.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileAutoCraftingTable; +import techreborn.blockentity.machine.tier1.AutoCraftingTableBlockEntity; public class BlockAutoCraftingTable extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileAutoCraftingTable(); + return new AutoCraftingTableBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockCompressor.java b/src/main/java/techreborn/blocks/tier1/BlockCompressor.java index 81521ea0b..6c9834928 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockCompressor.java +++ b/src/main/java/techreborn/blocks/tier1/BlockCompressor.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileCompressor; +import techreborn.blockentity.machine.tier1.CompressorBlockEntity; public class BlockCompressor extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileCompressor(); + return new CompressorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java b/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java index 3e1c35128..3703ae29a 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java +++ b/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileElectricFurnace; +import techreborn.blockentity.machine.tier1.ElectricFurnaceBlockEntity; public class BlockElectricFurnace extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileElectricFurnace(); + return new ElectricFurnaceBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockExtractor.java b/src/main/java/techreborn/blocks/tier1/BlockExtractor.java index cd4d099dd..51599117b 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockExtractor.java +++ b/src/main/java/techreborn/blocks/tier1/BlockExtractor.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileExtractor; +import techreborn.blockentity.machine.tier1.ExtractorBlockEntity; public class BlockExtractor extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileExtractor(); + return new ExtractorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockGrinder.java b/src/main/java/techreborn/blocks/tier1/BlockGrinder.java index c3a3b9a72..9eb103c73 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockGrinder.java +++ b/src/main/java/techreborn/blocks/tier1/BlockGrinder.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileGrinder; +import techreborn.blockentity.machine.tier1.GrinderBlockEntity; public class BlockGrinder extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileGrinder(); + return new GrinderBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java b/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java index 0fe8e95fc..99e77de4c 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java +++ b/src/main/java/techreborn/blocks/tier1/BlockPlayerDetector.java @@ -46,11 +46,11 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import reborncore.api.IToolDrop; import reborncore.api.ToolManager; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.util.ChatUtils; import reborncore.common.util.StringUtils; -import techreborn.tiles.machine.tier1.TilePlayerDectector; +import techreborn.blockentity.machine.tier1.PlayerDectectorBlockEntity; import techreborn.utils.MessageIDs; public class BlockPlayerDetector extends BlockMachineBase { @@ -65,25 +65,25 @@ public class BlockPlayerDetector extends BlockMachineBase { // BlockMachineBase @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TilePlayerDectector(); + return new PlayerDectectorBlockEntity(); } @Override public void onPlaced(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { super.onPlaced(worldIn, pos, state, placer, stack); - BlockEntity tile = worldIn.getBlockEntity(pos); - if (tile instanceof TilePlayerDectector) { - ((TilePlayerDectector) tile).owenerUdid = placer.getUuid().toString(); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); + if (blockEntity instanceof PlayerDectectorBlockEntity) { + ((PlayerDectectorBlockEntity) blockEntity).owenerUdid = placer.getUuid().toString(); } } @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND); - BlockEntity tileEntity = worldIn.getBlockEntity(pos); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); - if (tileEntity == null) { + if (blockEntity == null) { return super.activate(state, worldIn, pos, playerIn, hand, hitResult); } @@ -94,8 +94,8 @@ public class BlockPlayerDetector extends BlockMachineBase { if (!stack.isEmpty() && ToolManager.INSTANCE.canHandleTool(stack)) { if (ToolManager.INSTANCE.handleTool(stack, pos, worldIn, playerIn, hitResult.getSide(), false)) { if (playerIn.isSneaking()) { - if (tileEntity instanceof IToolDrop) { - ItemStack drop = ((IToolDrop) tileEntity).getToolDrop(playerIn); + if (blockEntity instanceof IToolDrop) { + ItemStack drop = ((IToolDrop) blockEntity).getToolDrop(playerIn); if (drop == null) { return false; } @@ -150,8 +150,8 @@ public class BlockPlayerDetector extends BlockMachineBase { @Override public int getWeakRedstonePower(BlockState blockState, BlockView blockAccess, BlockPos pos, Direction side) { BlockEntity entity = blockAccess.getBlockEntity(pos); - if (entity instanceof TilePlayerDectector) { - return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0; + if (entity instanceof PlayerDectectorBlockEntity) { + return ((PlayerDectectorBlockEntity) entity).isProvidingPower() ? 15 : 0; } return 0; } @@ -159,8 +159,8 @@ public class BlockPlayerDetector extends BlockMachineBase { @Override public int getStrongRedstonePower(BlockState blockState, BlockView blockAccess, BlockPos pos, Direction side) { BlockEntity entity = blockAccess.getBlockEntity(pos); - if (entity instanceof TilePlayerDectector) { - return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0; + if (entity instanceof PlayerDectectorBlockEntity) { + return ((PlayerDectectorBlockEntity) entity).isProvidingPower() ? 15 : 0; } return 0; } diff --git a/src/main/java/techreborn/blocks/tier1/BlockRecycler.java b/src/main/java/techreborn/blocks/tier1/BlockRecycler.java index 82a4e8230..77cc44be1 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockRecycler.java +++ b/src/main/java/techreborn/blocks/tier1/BlockRecycler.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileRecycler; +import techreborn.blockentity.machine.tier1.RecyclerBlockEntity; public class BlockRecycler extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileRecycler(); + return new RecyclerBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockRollingMachine.java b/src/main/java/techreborn/blocks/tier1/BlockRollingMachine.java index 74e8a554e..0ef585167 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockRollingMachine.java +++ b/src/main/java/techreborn/blocks/tier1/BlockRollingMachine.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileRollingMachine; +import techreborn.blockentity.machine.tier1.RollingMachineBlockEntity; public class BlockRollingMachine extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileRollingMachine(); + return new RollingMachineBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier1/BlockScrapboxinator.java b/src/main/java/techreborn/blocks/tier1/BlockScrapboxinator.java index 6c1b9c7da..00c5d13c8 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockScrapboxinator.java +++ b/src/main/java/techreborn/blocks/tier1/BlockScrapboxinator.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier1; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileScrapboxinator; +import techreborn.blockentity.machine.tier1.ScrapboxinatorBlockEntity; public class BlockScrapboxinator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileScrapboxinator(); + return new ScrapboxinatorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockChargeOMat.java b/src/main/java/techreborn/blocks/tier2/BlockChargeOMat.java index e34332714..f39eec2a7 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockChargeOMat.java +++ b/src/main/java/techreborn/blocks/tier2/BlockChargeOMat.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.TileChargeOMat; +import techreborn.blockentity.ChargeOMatBlockEntity; public class BlockChargeOMat extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileChargeOMat(); + return new ChargeOMatBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockChemicalReactor.java b/src/main/java/techreborn/blocks/tier2/BlockChemicalReactor.java index c96512011..3d921dca8 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockChemicalReactor.java +++ b/src/main/java/techreborn/blocks/tier2/BlockChemicalReactor.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileChemicalReactor; +import techreborn.blockentity.machine.tier1.ChemicalReactorBlockEntity; public class BlockChemicalReactor extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileChemicalReactor(); + return new ChemicalReactorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockDigitalChest.java b/src/main/java/techreborn/blocks/tier2/BlockDigitalChest.java index 76cf0e869..f99990fd4 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockDigitalChest.java +++ b/src/main/java/techreborn/blocks/tier2/BlockDigitalChest.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.TileDigitalChest; +import techreborn.blockentity.DigitalChestBlockEntity; public class BlockDigitalChest extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileDigitalChest(); + return new DigitalChestBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockDistillationTower.java b/src/main/java/techreborn/blocks/tier2/BlockDistillationTower.java index fd5ab510d..124a386a1 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockDistillationTower.java +++ b/src/main/java/techreborn/blocks/tier2/BlockDistillationTower.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.multiblock.TileDistillationTower; +import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity; public class BlockDistillationTower extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileDistillationTower(); + return new DistillationTowerBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockImplosionCompressor.java b/src/main/java/techreborn/blocks/tier2/BlockImplosionCompressor.java index 8465a2193..a85a0fc7f 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockImplosionCompressor.java +++ b/src/main/java/techreborn/blocks/tier2/BlockImplosionCompressor.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.multiblock.TileImplosionCompressor; +import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity; public class BlockImplosionCompressor extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileImplosionCompressor(); + return new ImplosionCompressorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockIndustrialBlastFurnace.java b/src/main/java/techreborn/blocks/tier2/BlockIndustrialBlastFurnace.java index 7c1cee7b8..e06e42558 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockIndustrialBlastFurnace.java +++ b/src/main/java/techreborn/blocks/tier2/BlockIndustrialBlastFurnace.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.multiblock.TileIndustrialBlastFurnace; +import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity; public class BlockIndustrialBlastFurnace extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileIndustrialBlastFurnace(); + return new IndustrialBlastFurnaceBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockIndustrialCentrifuge.java b/src/main/java/techreborn/blocks/tier2/BlockIndustrialCentrifuge.java index 944005c6f..38395e08a 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockIndustrialCentrifuge.java +++ b/src/main/java/techreborn/blocks/tier2/BlockIndustrialCentrifuge.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.TileIndustrialCentrifuge; +import techreborn.blockentity.IndustrialCentrifugeBlockEntity; public class BlockIndustrialCentrifuge extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileIndustrialCentrifuge(); + return new IndustrialCentrifugeBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockIndustrialElectrolyzer.java b/src/main/java/techreborn/blocks/tier2/BlockIndustrialElectrolyzer.java index ed92a72c3..eb6c1d1e5 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockIndustrialElectrolyzer.java +++ b/src/main/java/techreborn/blocks/tier2/BlockIndustrialElectrolyzer.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier1.TileIndustrialElectrolyzer; +import techreborn.blockentity.machine.tier1.IndustrialElectrolyzerBlockEntity; public class BlockIndustrialElectrolyzer extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileIndustrialElectrolyzer(); + return new IndustrialElectrolyzerBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockIndustrialGrinder.java b/src/main/java/techreborn/blocks/tier2/BlockIndustrialGrinder.java index 6d066bb22..4e3e93a17 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockIndustrialGrinder.java +++ b/src/main/java/techreborn/blocks/tier2/BlockIndustrialGrinder.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.multiblock.TileIndustrialGrinder; +import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity; public class BlockIndustrialGrinder extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileIndustrialGrinder(); + return new IndustrialGrinderBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockIndustrialSawmill.java b/src/main/java/techreborn/blocks/tier2/BlockIndustrialSawmill.java index c162f03dc..d13e3989f 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockIndustrialSawmill.java +++ b/src/main/java/techreborn/blocks/tier2/BlockIndustrialSawmill.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.multiblock.TileIndustrialSawmill; +import techreborn.blockentity.machine.multiblock.IndustrialSawmillBlockEntity; public class BlockIndustrialSawmill extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileIndustrialSawmill(); + return new IndustrialSawmillBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier2/BlockVacuumFreezer.java b/src/main/java/techreborn/blocks/tier2/BlockVacuumFreezer.java index ea16900e9..e43c37365 100644 --- a/src/main/java/techreborn/blocks/tier2/BlockVacuumFreezer.java +++ b/src/main/java/techreborn/blocks/tier2/BlockVacuumFreezer.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier2; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.multiblock.TileVacuumFreezer; +import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity; public class BlockVacuumFreezer extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileVacuumFreezer(); + return new VacuumFreezerBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier3/BlockChunkLoader.java b/src/main/java/techreborn/blocks/tier3/BlockChunkLoader.java index 883e1ff1f..827a099f0 100644 --- a/src/main/java/techreborn/blocks/tier3/BlockChunkLoader.java +++ b/src/main/java/techreborn/blocks/tier3/BlockChunkLoader.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier3; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier3.TileChunkLoader; +import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; public class BlockChunkLoader extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileChunkLoader(); + return new ChunkLoaderBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumChest.java b/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumChest.java index 4e2acc6dc..80c79e78d 100644 --- a/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumChest.java +++ b/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumChest.java @@ -29,16 +29,16 @@ import net.minecraft.block.entity.BlockEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier3.TileCreativeQuantumChest; +import techreborn.blockentity.machine.tier3.CreativeQuantumChestBlockEntity; public class BlockCreativeQuantumChest extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileCreativeQuantumChest(); + return new CreativeQuantumChestBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumTank.java b/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumTank.java index 16fb908ea..13ba70f7f 100644 --- a/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumTank.java +++ b/src/main/java/techreborn/blocks/tier3/BlockCreativeQuantumTank.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier3; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier3.TileCreativeQuantumTank; +import techreborn.blockentity.machine.tier3.CreativeQuantumTankBlockEntity; public class BlockCreativeQuantumTank extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileCreativeQuantumTank(); + return new CreativeQuantumTankBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier3/BlockFluidReplicator.java b/src/main/java/techreborn/blocks/tier3/BlockFluidReplicator.java index a5f29f996..73eb0b74e 100644 --- a/src/main/java/techreborn/blocks/tier3/BlockFluidReplicator.java +++ b/src/main/java/techreborn/blocks/tier3/BlockFluidReplicator.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier3; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.multiblock.TileFluidReplicator; +import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity; public class BlockFluidReplicator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileFluidReplicator(); + return new FluidReplicatorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier3/BlockMatterFabricator.java b/src/main/java/techreborn/blocks/tier3/BlockMatterFabricator.java index 0e8158b3e..c2f392ef7 100644 --- a/src/main/java/techreborn/blocks/tier3/BlockMatterFabricator.java +++ b/src/main/java/techreborn/blocks/tier3/BlockMatterFabricator.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier3; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier3.TileMatterFabricator; +import techreborn.blockentity.machine.tier3.MatterFabricatorBlockEntity; public class BlockMatterFabricator extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileMatterFabricator(); + return new MatterFabricatorBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier3/BlockQuantumChest.java b/src/main/java/techreborn/blocks/tier3/BlockQuantumChest.java index 5d7d84a02..89edc9a2e 100644 --- a/src/main/java/techreborn/blocks/tier3/BlockQuantumChest.java +++ b/src/main/java/techreborn/blocks/tier3/BlockQuantumChest.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier3; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier3.TileQuantumChest; +import techreborn.blockentity.machine.tier3.QuantumChestBlockEntity; public class BlockQuantumChest extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileQuantumChest(); + return new QuantumChestBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/tier3/BlockQuantumTank.java b/src/main/java/techreborn/blocks/tier3/BlockQuantumTank.java index a1167228e..0f48e1efe 100644 --- a/src/main/java/techreborn/blocks/tier3/BlockQuantumTank.java +++ b/src/main/java/techreborn/blocks/tier3/BlockQuantumTank.java @@ -26,16 +26,16 @@ package techreborn.blocks.tier3; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import reborncore.common.blocks.BlockMachineBase; import techreborn.client.EGui; -import techreborn.tiles.machine.tier3.TileQuantumTank; +import techreborn.blockentity.machine.tier3.QuantumTankBlockEntity; public class BlockQuantumTank extends BlockMachineBase { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileQuantumTank(); + return new QuantumTankBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java index b33ad76d6..af6e31cd3 100644 --- a/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java +++ b/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java @@ -33,7 +33,7 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import reborncore.common.RebornCoreConfig; import techreborn.init.TRContent; -import techreborn.tiles.transformers.TileHVTransformer; +import techreborn.blockentity.transformers.HVTransformerBlockEntity; /** * Created by modmuss50 on 16/03/2016. @@ -46,7 +46,7 @@ public class BlockHVTransformer extends BlockTransformer { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileHVTransformer(); + return new HVTransformerBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java index 75d8d18b3..be7a31390 100644 --- a/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java +++ b/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java @@ -26,7 +26,7 @@ package techreborn.blocks.transformers; import net.minecraft.block.entity.BlockEntity; import net.minecraft.world.BlockView; -import techreborn.tiles.transformers.TileLVTransformer; +import techreborn.blockentity.transformers.LVTransformerBlockEntity; /** * Created by modmuss50 on 16/03/2016. @@ -39,6 +39,6 @@ public class BlockLVTransformer extends BlockTransformer { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileLVTransformer(); + return new LVTransformerBlockEntity(); } } diff --git a/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java index e0629dc30..302d198ee 100644 --- a/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java +++ b/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java @@ -33,7 +33,7 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import reborncore.common.RebornCoreConfig; import techreborn.init.TRContent; -import techreborn.tiles.transformers.TileMVTransformer; +import techreborn.blockentity.transformers.MVTransformerBlockEntity; /** * Created by modmuss50 on 16/03/2016. @@ -46,7 +46,7 @@ public class BlockMVTransformer extends BlockTransformer { @Override public BlockEntity createBlockEntity(BlockView worldIn) { - return new TileMVTransformer(); + return new MVTransformerBlockEntity(); } @Override diff --git a/src/main/java/techreborn/blocks/transformers/BlockTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockTransformer.java index 400760f11..6837f991b 100644 --- a/src/main/java/techreborn/blocks/transformers/BlockTransformer.java +++ b/src/main/java/techreborn/blocks/transformers/BlockTransformer.java @@ -41,14 +41,14 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; import reborncore.api.ToolManager; -import reborncore.common.BaseTileBlock; +import reborncore.common.BaseBlockEntityProvider; import reborncore.common.blocks.BlockWrenchEventHandler; import reborncore.common.util.WrenchUtils; /** * Created by Rushmead */ -public abstract class BlockTransformer extends BaseTileBlock { +public abstract class BlockTransformer extends BaseBlockEntityProvider { public static DirectionProperty FACING = Properties.FACING; public String name; @@ -91,10 +91,10 @@ public abstract class BlockTransformer extends BaseTileBlock { @Override public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) { ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND); - BlockEntity tileEntity = worldIn.getBlockEntity(pos); + BlockEntity blockEntity = worldIn.getBlockEntity(pos); - // We extended BlockTileBase. Thus we should always have tile entity. I hope. - if (tileEntity == null) { + // We extended BlockTileBase. Thus we should always have blockEntity entity. I hope. + if (blockEntity == null) { return false; } diff --git a/src/main/java/techreborn/client/EGui.java b/src/main/java/techreborn/client/EGui.java index b4b828254..606dc5c47 100644 --- a/src/main/java/techreborn/client/EGui.java +++ b/src/main/java/techreborn/client/EGui.java @@ -29,7 +29,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import reborncore.api.tile.IMachineGuiHandler; +import reborncore.api.blockentity.IMachineGuiHandler; import java.util.Arrays; import java.util.stream.Stream; diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java index 092a86132..05b8dce30 100644 --- a/src/main/java/techreborn/client/GuiHandler.java +++ b/src/main/java/techreborn/client/GuiHandler.java @@ -31,135 +31,133 @@ import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen; 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.mixin.extensions.ContainerExtensions; import techreborn.client.container.ContainerDestructoPack; import techreborn.client.gui.*; -import techreborn.tiles.TileChargeOMat; -import techreborn.tiles.TileDigitalChest; -import techreborn.tiles.TileIndustrialCentrifuge; -import techreborn.tiles.fusionReactor.TileFusionControlComputer; -import techreborn.tiles.generator.TilePlasmaGenerator; -import techreborn.tiles.generator.advanced.TileDieselGenerator; -import techreborn.tiles.generator.advanced.TileGasTurbine; -import techreborn.tiles.generator.advanced.TileSemiFluidGenerator; -import techreborn.tiles.generator.advanced.TileThermalGenerator; -import techreborn.tiles.generator.basic.TileSolidFuelGenerator; -import techreborn.tiles.machine.iron.TileIronAlloyFurnace; -import techreborn.tiles.machine.iron.TileIronFurnace; -import techreborn.tiles.machine.multiblock.*; -import techreborn.tiles.machine.tier1.*; -import techreborn.tiles.machine.tier3.TileChunkLoader; -import techreborn.tiles.machine.tier3.TileMatterFabricator; -import techreborn.tiles.machine.tier3.TileQuantumChest; -import techreborn.tiles.machine.tier3.TileQuantumTank; -import techreborn.tiles.storage.TileAdjustableSU; -import techreborn.tiles.storage.TileHighVoltageSU; -import techreborn.tiles.storage.TileLowVoltageSU; -import techreborn.tiles.storage.TileMediumVoltageSU; -import techreborn.tiles.storage.idsu.TileInterdimensionalSU; -import techreborn.tiles.storage.lesu.TileLapotronicSU; +import techreborn.blockentity.ChargeOMatBlockEntity; +import techreborn.blockentity.DigitalChestBlockEntity; +import techreborn.blockentity.IndustrialCentrifugeBlockEntity; +import techreborn.blockentity.fusionReactor.FusionControlComputerBlockEntity; +import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; +import techreborn.blockentity.generator.advanced.DieselGeneratorBlockEntity; +import techreborn.blockentity.generator.advanced.GasTurbineBlockEntity; +import techreborn.blockentity.generator.advanced.SemiFluidGeneratorBlockEntity; +import techreborn.blockentity.generator.advanced.ThermalGeneratorBlockEntity; +import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity; +import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity; +import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity; +import techreborn.blockentity.machine.multiblock.*; +import techreborn.blockentity.machine.tier1.*; +import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; +import techreborn.blockentity.machine.tier3.MatterFabricatorBlockEntity; +import techreborn.blockentity.machine.tier3.QuantumChestBlockEntity; +import techreborn.blockentity.machine.tier3.QuantumTankBlockEntity; +import techreborn.blockentity.storage.AdjustableSUBlockEntity; +import techreborn.blockentity.storage.HighVoltageSUBlockEntity; +import techreborn.blockentity.storage.LowVoltageSUBlockEntity; +import techreborn.blockentity.storage.MediumVoltageSUBlockEntity; +import techreborn.blockentity.storage.idsu.InterdimensionalSUBlockEntity; +import techreborn.blockentity.storage.lesu.LapotronicSUBlockEntity; public class GuiHandler { public static void register(){ EGui.stream().forEach(gui -> ContainerProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> { - final BlockEntity tile = playerEntity.world.getBlockEntity(packetByteBuf.readBlockPos()); - return ((IContainerProvider) tile).createContainer(syncID, playerEntity); + final BlockEntity blockEntity = playerEntity.world.getBlockEntity(packetByteBuf.readBlockPos()); + return ((IContainerProvider) blockEntity).createContainer(syncID, playerEntity); })); EGui.stream().forEach(gui -> ScreenProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> getClientGuiElement(EGui.byID(identifier), playerEntity, packetByteBuf.readBlockPos(), syncID))); } private static AbstractContainerScreen getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) { - final BlockEntity tile = player.world.getBlockEntity(pos); + final BlockEntity blockEntity = player.world.getBlockEntity(pos); switch (gui) { case AESU: - return new GuiAESU(syncID, player, (TileAdjustableSU) tile); + return new GuiAESU(syncID, player, (AdjustableSUBlockEntity) blockEntity); case ALLOY_FURNACE: - return new GuiAlloyFurnace(syncID, player, (TileIronAlloyFurnace) tile); + return new GuiAlloyFurnace(syncID, player, (IronAlloyFurnaceBlockEntity) blockEntity); case ALLOY_SMELTER: - return new GuiAlloySmelter(syncID, player, (TileAlloySmelter) tile); + return new GuiAlloySmelter(syncID, player, (AlloySmelterBlockEntity) blockEntity); case ASSEMBLING_MACHINE: - return new GuiAssemblingMachine(syncID, player, (TileAssemblingMachine) tile); + return new GuiAssemblingMachine(syncID, player, (AssemblingMachineBlockEntity) blockEntity); case LOW_VOLTAGE_SU: - return new GuiBatbox(syncID, player, (TileLowVoltageSU) tile); + return new GuiBatbox(syncID, player, (LowVoltageSUBlockEntity) blockEntity); case BLAST_FURNACE: - return new GuiBlastFurnace(syncID, player, (TileIndustrialBlastFurnace) tile); + return new GuiBlastFurnace(syncID, player, (IndustrialBlastFurnaceBlockEntity) blockEntity); case CENTRIFUGE: - return new GuiCentrifuge(syncID, player, (TileIndustrialCentrifuge) tile); + return new GuiCentrifuge(syncID, player, (IndustrialCentrifugeBlockEntity) blockEntity); case CHARGEBENCH: - return new GuiChargeBench(syncID, player, (TileChargeOMat) tile); + return new GuiChargeBench(syncID, player, (ChargeOMatBlockEntity) blockEntity); case CHEMICAL_REACTOR: - return new GuiChemicalReactor(syncID, player, (TileChemicalReactor) tile); + return new GuiChemicalReactor(syncID, player, (ChemicalReactorBlockEntity) blockEntity); case CHUNK_LOADER: - return new GuiChunkLoader(syncID, player, (TileChunkLoader) tile); + return new GuiChunkLoader(syncID, player, (ChunkLoaderBlockEntity) blockEntity); case COMPRESSOR: - return new GuiCompressor(syncID, player, (TileCompressor) tile); + return new GuiCompressor(syncID, player, (CompressorBlockEntity) blockEntity); case DESTRUCTOPACK: - return new GuiDestructoPack(new ContainerDestructoPack(player)); + return new GuiDestructoPack(new ContainerDestructoPack(syncID, player)); case DIESEL_GENERATOR: - return new GuiDieselGenerator(syncID, player, (TileDieselGenerator) tile); + return new GuiDieselGenerator(syncID, player, (DieselGeneratorBlockEntity) blockEntity); case DIGITAL_CHEST: - return new GuiDigitalChest(syncID, player, (TileDigitalChest) tile); + return new GuiDigitalChest(syncID, player, (DigitalChestBlockEntity) blockEntity); case ELECTRIC_FURNACE: - return new GuiElectricFurnace(syncID, player, (TileElectricFurnace) tile); + return new GuiElectricFurnace(syncID, player, (ElectricFurnaceBlockEntity) blockEntity); case EXTRACTOR: - return new GuiExtractor(syncID, player, (TileExtractor) tile); + return new GuiExtractor(syncID, player, (ExtractorBlockEntity) blockEntity); case FUSION_CONTROLLER: - return new GuiFusionReactor(syncID, player, (TileFusionControlComputer) tile); + return new GuiFusionReactor(syncID, player, (FusionControlComputerBlockEntity) blockEntity); case GAS_TURBINE: - return new GuiGasTurbine(syncID, player, (TileGasTurbine) tile); + return new GuiGasTurbine(syncID, player, (GasTurbineBlockEntity) blockEntity); case GENERATOR: - return new GuiGenerator(syncID, player, (TileSolidFuelGenerator) tile); + return new GuiGenerator(syncID, player, (SolidFuelGeneratorBlockEntity) blockEntity); case GRINDER: - return new GuiGrinder(syncID, player, (TileGrinder) tile); + return new GuiGrinder(syncID, player, (GrinderBlockEntity) blockEntity); case IDSU: - return new GuiIDSU(syncID, player, (TileInterdimensionalSU) tile); + return new GuiIDSU(syncID, player, (InterdimensionalSUBlockEntity) blockEntity); case IMPLOSION_COMPRESSOR: - return new GuiImplosionCompressor(syncID, player, (TileImplosionCompressor) tile); + return new GuiImplosionCompressor(syncID, player, (ImplosionCompressorBlockEntity) blockEntity); case INDUSTRIAL_ELECTROLYZER: - return new GuiIndustrialElectrolyzer(syncID, player, (TileIndustrialElectrolyzer) tile); + return new GuiIndustrialElectrolyzer(syncID, player, (IndustrialElectrolyzerBlockEntity) blockEntity); case INDUSTRIAL_GRINDER: - return new GuiIndustrialGrinder(syncID, player, (TileIndustrialGrinder) tile); + return new GuiIndustrialGrinder(syncID, player, (IndustrialGrinderBlockEntity) blockEntity); case IRON_FURNACE: - return new GuiIronFurnace(syncID, player, (TileIronFurnace) tile); + return new GuiIronFurnace(syncID, player, (IronFurnaceBlockEntity) blockEntity); case LESU: - return new GuiLESU(syncID, player, (TileLapotronicSU) tile); + return new GuiLESU(syncID, player, (LapotronicSUBlockEntity) blockEntity); case MATTER_FABRICATOR: - return new GuiMatterFabricator(syncID, player, (TileMatterFabricator) tile); + return new GuiMatterFabricator(syncID, player, (MatterFabricatorBlockEntity) blockEntity); case MEDIUM_VOLTAGE_SU: - return new GuiMFE(syncID, player, (TileMediumVoltageSU) tile); + return new GuiMFE(syncID, player, (MediumVoltageSUBlockEntity) blockEntity); case HIGH_VOLTAGE_SU: - return new GuiMFSU(syncID, player, (TileHighVoltageSU) tile); + return new GuiMFSU(syncID, player, (HighVoltageSUBlockEntity) blockEntity); case QUANTUM_CHEST: - return new GuiQuantumChest(syncID, player, (TileQuantumChest) tile); + return new GuiQuantumChest(syncID, player, (QuantumChestBlockEntity) blockEntity); case QUANTUM_TANK: - return new GuiQuantumTank(syncID, player, (TileQuantumTank) tile); + return new GuiQuantumTank(syncID, player, (QuantumTankBlockEntity) blockEntity); case RECYCLER: - return new GuiRecycler(syncID, player, (TileRecycler) tile); + return new GuiRecycler(syncID, player, (RecyclerBlockEntity) blockEntity); case ROLLING_MACHINE: - return new GuiRollingMachine(syncID, player, (TileRollingMachine) tile); + return new GuiRollingMachine(syncID, player, (RollingMachineBlockEntity) blockEntity); case SAWMILL: - return new GuiIndustrialSawmill(syncID, player, (TileIndustrialSawmill) tile); + return new GuiIndustrialSawmill(syncID, player, (IndustrialSawmillBlockEntity) blockEntity); case SCRAPBOXINATOR: - return new GuiScrapboxinator(syncID, player, (TileScrapboxinator) tile); + return new GuiScrapboxinator(syncID, player, (ScrapboxinatorBlockEntity) blockEntity); case SEMIFLUID_GENERATOR: - return new GuiSemifluidGenerator(syncID, player, (TileSemiFluidGenerator) tile); + return new GuiSemifluidGenerator(syncID, player, (SemiFluidGeneratorBlockEntity) blockEntity); case THERMAL_GENERATOR: - return new GuiThermalGenerator(syncID, player, (TileThermalGenerator) tile); + return new GuiThermalGenerator(syncID, player, (ThermalGeneratorBlockEntity) blockEntity); case VACUUM_FREEZER: - return new GuiVacuumFreezer(syncID, player, (TileVacuumFreezer) tile); + return new GuiVacuumFreezer(syncID, player, (VacuumFreezerBlockEntity) blockEntity); case AUTO_CRAFTING_TABLE: - return new GuiAutoCrafting(syncID, player, (TileAutoCraftingTable) tile); + return new GuiAutoCrafting(syncID, player, (AutoCraftingTableBlockEntity) blockEntity); case PLASMA_GENERATOR: - return new GuiPlasmaGenerator(syncID, player, (TilePlasmaGenerator) tile); + return new GuiPlasmaGenerator(syncID, player, (PlasmaGeneratorBlockEntity) blockEntity); case DISTILLATION_TOWER: - return new GuiDistillationTower(syncID, player, (TileDistillationTower) tile); + return new GuiDistillationTower(syncID, player, (DistillationTowerBlockEntity) blockEntity); case FLUID_REPLICATOR: - return new GuiFluidReplicator(syncID, player, (TileFluidReplicator) tile); + return new GuiFluidReplicator(syncID, player, (FluidReplicatorBlockEntity) blockEntity); default: break; diff --git a/src/main/java/techreborn/client/container/ContainerDestructoPack.java b/src/main/java/techreborn/client/container/ContainerDestructoPack.java index d6158d62e..67d55aa03 100644 --- a/src/main/java/techreborn/client/container/ContainerDestructoPack.java +++ b/src/main/java/techreborn/client/container/ContainerDestructoPack.java @@ -24,22 +24,21 @@ package techreborn.client.container; +import net.minecraft.container.Container; import net.minecraft.container.Slot; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; -import net.minecraft.text.LiteralText; import reborncore.client.gui.slots.SlotFilteredVoid; -import reborncore.common.container.RebornContainer; import reborncore.common.util.RebornInventory; import techreborn.init.TRContent; -public class ContainerDestructoPack extends RebornContainer { +public class ContainerDestructoPack extends Container { private PlayerEntity player; private RebornInventory inv; - public ContainerDestructoPack(PlayerEntity player) { - super(null, new LiteralText("destructopack")); + public ContainerDestructoPack(int syncID, PlayerEntity player) { + super(null, syncID); this.player = player; inv = new RebornInventory<>(1, "destructopack", 64, null); buildContainer(); diff --git a/src/main/java/techreborn/client/gui/GuiAESU.java b/src/main/java/techreborn/client/gui/GuiAESU.java index 5e986928a..2230e5492 100644 --- a/src/main/java/techreborn/client/gui/GuiAESU.java +++ b/src/main/java/techreborn/client/gui/GuiAESU.java @@ -32,15 +32,15 @@ import reborncore.client.gui.builder.widget.GuiButtonUpDown; import reborncore.common.network.NetworkManager; import reborncore.common.powerSystem.PowerSystem; import techreborn.packets.ServerboundPackets; -import techreborn.tiles.storage.TileAdjustableSU; +import techreborn.blockentity.storage.AdjustableSUBlockEntity; public class GuiAESU extends GuiBase { - TileAdjustableSU tile; + AdjustableSUBlockEntity blockEntity; - public GuiAESU(int syncID, final PlayerEntity player, final TileAdjustableSU aesu) { + public GuiAESU(int syncID, final PlayerEntity player, final AdjustableSUBlockEntity aesu) { super(player, aesu, aesu.createContainer(syncID, player)); - this.tile = aesu; + this.blockEntity = aesu; } @Override @@ -51,7 +51,7 @@ public class GuiAESU extends GuiBase { this.drawSlot(62, 45, layer); this.drawSlot(98, 45, layer); this.drawArmourSlots(8, 18, layer); - this.builder.drawEnergyOutput(this, 171, 61, this.tile.getCurrentOutput(), layer); + this.builder.drawEnergyOutput(this, 171, 61, this.blockEntity.getCurrentOutput(), layer); this.builder.drawUpDownButtons(this, 121, 79, layer); } @@ -63,13 +63,13 @@ public class GuiAESU extends GuiBase { if(GuiBase.slotConfigType == SlotConfigType.NONE){ GlStateManager.pushMatrix(); GlStateManager.scaled(0.6, 0.6, 1); - drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getEnergy()) + "/" - + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getMaxPower()) + " " + drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/" + + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer); GlStateManager.popMatrix(); } - builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); buttons.add(new GuiButtonUpDown(121, 79, this, layer, this::onClick)); buttons.add(new GuiButtonUpDown(121 + 12, 79, this, layer, this::onClick)); @@ -78,6 +78,6 @@ public class GuiAESU extends GuiBase { } public void onClick(ButtonWidget button){ - NetworkManager.sendToServer(ServerboundPackets.createPacketAesu(1, tile)); + NetworkManager.sendToServer(ServerboundPackets.createPacketAesu(1, blockEntity)); } } diff --git a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java index 416a76c72..e18734834 100644 --- a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java @@ -31,16 +31,16 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.text.LiteralText; import net.minecraft.util.Identifier; import reborncore.client.containerBuilder.builder.BuiltContainer; -import techreborn.tiles.machine.iron.TileIronAlloyFurnace; +import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity; public class GuiAlloyFurnace extends AbstractContainerScreen { private static final Identifier texture = new Identifier("techreborn", "textures/gui/alloy_furnace.png"); - TileIronAlloyFurnace alloyfurnace; + IronAlloyFurnaceBlockEntity alloyfurnace; - public GuiAlloyFurnace(int syncID, final PlayerEntity player, final TileIronAlloyFurnace alloyFurnace) { + public GuiAlloyFurnace(int syncID, final PlayerEntity player, final IronAlloyFurnaceBlockEntity alloyFurnace) { super(alloyFurnace.createContainer(syncID, player), player.inventory, new LiteralText("techreborn.alloy_furnace")); this.containerWidth = 176; this.containerHeight = 167; @@ -66,7 +66,7 @@ public class GuiAlloyFurnace extends AbstractContainerScreen { @Override protected void drawForeground(final int p_146979_1_, final int p_146979_2_) { - final String name = I18n.translate("tile.techreborn.iron_alloy_furnace.name"); + final String name = I18n.translate("blockEntity.techreborn.iron_alloy_furnace.name"); this.font.draw(name, this.containerWidth / 2 - this.font.getStringWidth(name) / 2, 6, 4210752); this.font.draw(I18n.translate("container.inventory", new Object[0]), 8, diff --git a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java index 13c15cbfe..011f44d35 100644 --- a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java +++ b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileAlloySmelter; +import techreborn.blockentity.machine.tier1.AlloySmelterBlockEntity; public class GuiAlloySmelter extends GuiBase { - TileAlloySmelter tile; + AlloySmelterBlockEntity blockEntity; - public GuiAlloySmelter(int syncID, final PlayerEntity player, final TileAlloySmelter tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiAlloySmelter(int syncID, final PlayerEntity player, final AlloySmelterBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @@ -58,8 +58,8 @@ public class GuiAlloySmelter extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java index 5f0e966e2..530b0f777 100644 --- a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java +++ b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileAssemblingMachine; +import techreborn.blockentity.machine.tier1.AssemblingMachineBlockEntity; public class GuiAssemblingMachine extends GuiBase { - TileAssemblingMachine tile; + AssemblingMachineBlockEntity blockEntity; - public GuiAssemblingMachine(int syncID, final PlayerEntity player, final TileAssemblingMachine tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiAssemblingMachine(int syncID, final PlayerEntity player, final AssemblingMachineBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -60,7 +60,7 @@ public class GuiAssemblingMachine extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiAutoCrafting.java b/src/main/java/techreborn/client/gui/GuiAutoCrafting.java index f96b2077c..e333eb698 100644 --- a/src/main/java/techreborn/client/gui/GuiAutoCrafting.java +++ b/src/main/java/techreborn/client/gui/GuiAutoCrafting.java @@ -33,7 +33,7 @@ import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.common.network.NetworkManager; import techreborn.packets.ServerboundPackets; -import techreborn.tiles.machine.tier1.TileAutoCraftingTable; +import techreborn.blockentity.machine.tier1.AutoCraftingTableBlockEntity; /** * Created by modmuss50 on 20/06/2017. @@ -42,11 +42,11 @@ public class GuiAutoCrafting extends GuiBase { static final Identifier RECIPE_BOOK_TEXTURE = new Identifier("textures/gui/recipe_book.png"); boolean showGui = true; - TileAutoCraftingTable tileAutoCraftingTable; + AutoCraftingTableBlockEntity blockEntityAutoCraftingTable; - public GuiAutoCrafting(int syncID, PlayerEntity player, TileAutoCraftingTable tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tileAutoCraftingTable = tile; + public GuiAutoCrafting(int syncID, PlayerEntity player, AutoCraftingTableBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntityAutoCraftingTable = blockEntity; } public void renderItemStack(ItemStack stack, int x, int y) { @@ -56,14 +56,14 @@ public class GuiAutoCrafting extends GuiBase { @Override protected void drawForeground(int mouseX, int mouseY) { super.drawForeground(mouseX, mouseY); - Recipe recipe = tileAutoCraftingTable.getIRecipe(); + Recipe recipe = blockEntityAutoCraftingTable.getIRecipe(); if (recipe != null) { renderItemStack(recipe.getOutput(), 95, 42); } final Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tileAutoCraftingTable.getProgress(), tileAutoCraftingTable.getMaxProgress(), 120, 44, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 26, (int) tileAutoCraftingTable.getEnergy(), (int) tileAutoCraftingTable.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntityAutoCraftingTable.getProgress(), blockEntityAutoCraftingTable.getMaxProgress(), 120, 44, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 26, (int) blockEntityAutoCraftingTable.getEnergy(), (int) blockEntityAutoCraftingTable.getMaxPower(), mouseX, mouseY, 0, layer); } @Override @@ -79,13 +79,13 @@ public class GuiAutoCrafting extends GuiBase { drawOutputSlot(95, 42, layer); drawString("Inventory", 8, 82, 4210752, layer); - builder.drawLockButton(this, 145, 4, mouseX, mouseY, layer, tileAutoCraftingTable.locked); + builder.drawLockButton(this, 145, 4, mouseX, mouseY, layer, blockEntityAutoCraftingTable.locked); } @Override public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) { if (isPointInRect(145, 4, 20, 12, mouseX, mouseY)) { - NetworkManager.sendToServer(ServerboundPackets.createPacketAutoCraftingTableLock(tileAutoCraftingTable, !tileAutoCraftingTable.locked)); + NetworkManager.sendToServer(ServerboundPackets.createPacketAutoCraftingTableLock(blockEntityAutoCraftingTable, !blockEntityAutoCraftingTable.locked)); return true; } return super.mouseClicked(mouseX, mouseY, mouseButton); diff --git a/src/main/java/techreborn/client/gui/GuiBatbox.java b/src/main/java/techreborn/client/gui/GuiBatbox.java index 413ca1419..4aff61777 100644 --- a/src/main/java/techreborn/client/gui/GuiBatbox.java +++ b/src/main/java/techreborn/client/gui/GuiBatbox.java @@ -28,15 +28,15 @@ import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.common.powerSystem.PowerSystem; -import techreborn.tiles.storage.TileLowVoltageSU; +import techreborn.blockentity.storage.LowVoltageSUBlockEntity; public class GuiBatbox extends GuiBase { - TileLowVoltageSU tile; + LowVoltageSUBlockEntity blockEntity; - public GuiBatbox(int syncID, final PlayerEntity player, final TileLowVoltageSU tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiBatbox(int syncID, final PlayerEntity player, final LowVoltageSUBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -56,10 +56,10 @@ public class GuiBatbox extends GuiBase { if(GuiBase.slotConfigType == SlotConfigType.NONE){ GlStateManager.pushMatrix(); GlStateManager.scaled(0.6, 0.6, 5); - drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer); + drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer); GlStateManager.popMatrix(); } - builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java index 2d111492c..5aa086c76 100644 --- a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java @@ -37,29 +37,29 @@ import reborncore.client.multiblock.Multiblock; import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockSet; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileIndustrialBlastFurnace; +import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity; public class GuiBlastFurnace extends GuiBase { - public TileIndustrialBlastFurnace tile; + public IndustrialBlastFurnaceBlockEntity blockEntity; boolean hasMultiBlock; - public GuiBlastFurnace(int syncID, final PlayerEntity player, final TileIndustrialBlastFurnace tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiBlastFurnace(int syncID, final PlayerEntity player, final IndustrialBlastFurnaceBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override public void init() { super.init(); - this.hasMultiBlock = this.tile.getCachedHeat() != 0; + this.hasMultiBlock = this.blockEntity.getCachedHeat() != 0; ClientProxy.multiblockRenderEvent.setMultiblock(null); } @Override protected void drawBackground(final float f, final int mouseX, final int mouseY) { super.drawBackground(f, mouseX, mouseY); - this.hasMultiBlock = this.tile.getCachedHeat() != 0; + this.hasMultiBlock = this.blockEntity.getCachedHeat() != 0; GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); final GuiBase.Layer layer = Layer.BACKGROUND; @@ -79,12 +79,12 @@ public class GuiBlastFurnace extends GuiBase { @Override protected void drawForeground(final int mouseX, final int mouseY) { super.drawForeground(mouseX, mouseY); - this.hasMultiBlock = tile.getCachedHeat() != 0; + this.hasMultiBlock = blockEntity.getCachedHeat() != 0; final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawBigHeatBar(this, 31, 71, tile.getCachedHeat(), 3230, layer); + builder.drawBigHeatBar(this, 31, 71, blockEntity.getCachedHeat(), 3230, layer); if (hasMultiBlock) { addHologramButton(4, 4, 212, layer).clickHandler(this::onClick); } else { @@ -92,7 +92,7 @@ public class GuiBlastFurnace extends GuiBase { addHologramButton(76, 56, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer); } - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } public void onClick(GuiButtonExtended button, Double x, Double y){ @@ -143,11 +143,11 @@ public class GuiBlastFurnace extends GuiBase { final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); MultiblockRenderEvent.anchor = new BlockPos( - tile.getPos().getX() - Direction.byId(tile.getFacingInt()).getOffsetX() * 2, - tile.getPos().getY() - 1, - tile.getPos().getZ() - Direction.byId(tile.getFacingInt()).getOffsetZ() * 2); + blockEntity.getPos().getX() - Direction.byId(blockEntity.getFacingInt()).getOffsetX() * 2, + blockEntity.getPos().getY() - 1, + blockEntity.getPos().getZ() - Direction.byId(blockEntity.getFacingInt()).getOffsetZ() * 2); } } else { ClientProxy.multiblockRenderEvent.setMultiblock(null); diff --git a/src/main/java/techreborn/client/gui/GuiCentrifuge.java b/src/main/java/techreborn/client/gui/GuiCentrifuge.java index d64875e23..f13421b8f 100644 --- a/src/main/java/techreborn/client/gui/GuiCentrifuge.java +++ b/src/main/java/techreborn/client/gui/GuiCentrifuge.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.TileIndustrialCentrifuge; +import techreborn.blockentity.IndustrialCentrifugeBlockEntity; public class GuiCentrifuge extends GuiBase { - TileIndustrialCentrifuge tile; + IndustrialCentrifugeBlockEntity blockEntity; - public GuiCentrifuge(int syncID, final PlayerEntity player, final TileIndustrialCentrifuge tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiCentrifuge(int syncID, final PlayerEntity player, final IndustrialCentrifugeBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -61,7 +61,7 @@ public class GuiCentrifuge extends GuiBase { super.drawForeground(mouseX, mouseY); final Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 61, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 61, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiChargeBench.java b/src/main/java/techreborn/client/gui/GuiChargeBench.java index e8196b7d4..79d51bb8f 100644 --- a/src/main/java/techreborn/client/gui/GuiChargeBench.java +++ b/src/main/java/techreborn/client/gui/GuiChargeBench.java @@ -26,15 +26,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; -import techreborn.tiles.TileChargeOMat; +import techreborn.blockentity.ChargeOMatBlockEntity; public class GuiChargeBench extends GuiBase { - TileChargeOMat tile; + ChargeOMatBlockEntity blockEntity; - public GuiChargeBench(int syncID, final PlayerEntity player, final TileChargeOMat tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiChargeBench(int syncID, final PlayerEntity player, final ChargeOMatBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -55,6 +55,6 @@ public class GuiChargeBench extends GuiBase { super.drawForeground(mouseX, mouseY); final Layer layer = Layer.FOREGROUND; - builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiChemicalReactor.java b/src/main/java/techreborn/client/gui/GuiChemicalReactor.java index 4381ceb36..4f3290039 100644 --- a/src/main/java/techreborn/client/gui/GuiChemicalReactor.java +++ b/src/main/java/techreborn/client/gui/GuiChemicalReactor.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileChemicalReactor; +import techreborn.blockentity.machine.tier1.ChemicalReactorBlockEntity; public class GuiChemicalReactor extends GuiBase { - TileChemicalReactor tile; + ChemicalReactorBlockEntity blockEntity; - public GuiChemicalReactor(int syncID, final PlayerEntity player, final TileChemicalReactor tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiChemicalReactor(int syncID, final PlayerEntity player, final ChemicalReactorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -57,8 +57,8 @@ public class GuiChemicalReactor extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiChunkLoader.java b/src/main/java/techreborn/client/gui/GuiChunkLoader.java index f18d4766f..aa76fcabe 100644 --- a/src/main/java/techreborn/client/gui/GuiChunkLoader.java +++ b/src/main/java/techreborn/client/gui/GuiChunkLoader.java @@ -32,19 +32,19 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.text.LiteralText; import net.minecraft.util.Identifier; import reborncore.client.gui.builder.widget.GuiButtonSimple; -import techreborn.tiles.machine.tier3.TileChunkLoader; +import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; public class GuiChunkLoader extends AbstractContainerScreen { private static final Identifier texture = new Identifier("techreborn", "textures/gui/industrial_chunkloader.png"); - TileChunkLoader chunkloader; + ChunkLoaderBlockEntity chunkloader; private ButtonWidget plusOneButton; private ButtonWidget plusTenButton; private ButtonWidget minusOneButton; private ButtonWidget minusTenButton; - public GuiChunkLoader(int syncID, final PlayerEntity player, final TileChunkLoader chunkLoader) { + public GuiChunkLoader(int syncID, final PlayerEntity player, final ChunkLoaderBlockEntity chunkLoader) { super(chunkLoader.createContainer(syncID, player), player.inventory, new LiteralText("techreborn.chunkloader")); this.containerWidth = 176; this.containerHeight = 167; @@ -80,7 +80,7 @@ public class GuiChunkLoader extends AbstractContainerScreen { @Override protected void drawForeground(final int p_146979_1_, final int p_146979_2_) { - final String name = I18n.translate("tile.techreborn:chunk_loader.name"); + final String name = I18n.translate("blockEntity.techreborn:chunk_loader.name"); this.font.draw(name, this.containerWidth / 2 - this.font.getStringWidth(name) / 2, 6, 4210752); this.font.draw(I18n.translate("container.inventory", new Object[0]), 8, diff --git a/src/main/java/techreborn/client/gui/GuiCompressor.java b/src/main/java/techreborn/client/gui/GuiCompressor.java index 3229fe008..ec586934d 100644 --- a/src/main/java/techreborn/client/gui/GuiCompressor.java +++ b/src/main/java/techreborn/client/gui/GuiCompressor.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileCompressor; +import techreborn.blockentity.machine.tier1.CompressorBlockEntity; public class GuiCompressor extends GuiBase { - TileCompressor tile; + CompressorBlockEntity blockEntity; - public GuiCompressor(int syncID, final PlayerEntity player, final TileCompressor tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiCompressor(int syncID, final PlayerEntity player, final CompressorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -56,7 +56,7 @@ public class GuiCompressor extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - this.builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - this.builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + this.builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + this.builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiDieselGenerator.java b/src/main/java/techreborn/client/gui/GuiDieselGenerator.java index 2f57ebfc7..65711cd0c 100644 --- a/src/main/java/techreborn/client/gui/GuiDieselGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiDieselGenerator.java @@ -29,16 +29,16 @@ import net.fabricmc.api.Environment; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.generator.advanced.TileDieselGenerator; +import techreborn.blockentity.generator.advanced.DieselGeneratorBlockEntity; @Environment(EnvType.CLIENT) public class GuiDieselGenerator extends GuiBase { - TileDieselGenerator tile; + DieselGeneratorBlockEntity blockEntity; - public GuiDieselGenerator(int syncID, final PlayerEntity player, final TileDieselGenerator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiDieselGenerator(int syncID, final PlayerEntity player, final DieselGeneratorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -56,9 +56,9 @@ public class GuiDieselGenerator extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 130, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); - builder.drawTank(this, 44, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawTank(this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); } diff --git a/src/main/java/techreborn/client/gui/GuiDigitalChest.java b/src/main/java/techreborn/client/gui/GuiDigitalChest.java index 7f00ffd36..49fbc2dab 100644 --- a/src/main/java/techreborn/client/gui/GuiDigitalChest.java +++ b/src/main/java/techreborn/client/gui/GuiDigitalChest.java @@ -26,15 +26,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; -import techreborn.tiles.TileDigitalChest; +import techreborn.blockentity.DigitalChestBlockEntity; public class GuiDigitalChest extends GuiBase { - TileDigitalChest tile; + DigitalChestBlockEntity blockEntity; - public GuiDigitalChest(int syncID, final PlayerEntity player, final TileDigitalChest tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiDigitalChest(int syncID, final PlayerEntity player, final DigitalChestBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -51,14 +51,14 @@ public class GuiDigitalChest extends GuiBase { super.drawForeground(mouseX, mouseY); final Layer layer = Layer.FOREGROUND; - if (!tile.storedItem.isEmpty() && tile.inventory.getInvStack(1) != null) { + if (!blockEntity.storedItem.isEmpty() && blockEntity.inventory.getInvStack(1) != null) { builder.drawBigBlueBar(this, 31, 43, - tile.storedItem.getCount() + tile.inventory.getInvStack(1).getCount(), - tile.maxCapacity, mouseX - left, mouseY - top, "Stored", layer); + blockEntity.storedItem.getCount() + blockEntity.inventory.getInvStack(1).getCount(), + blockEntity.maxCapacity, mouseX - left, mouseY - top, "Stored", layer); } - if (tile.storedItem.isEmpty() && tile.inventory.getInvStack(1) != null) { - builder.drawBigBlueBar(this, 31, 43, tile.inventory.getInvStack(1).getCount(), - tile.maxCapacity, mouseX - left, mouseY - top, "Stored", layer); + if (blockEntity.storedItem.isEmpty() && blockEntity.inventory.getInvStack(1) != null) { + builder.drawBigBlueBar(this, 31, 43, blockEntity.inventory.getInvStack(1).getCount(), + blockEntity.maxCapacity, mouseX - left, mouseY - top, "Stored", layer); } } } diff --git a/src/main/java/techreborn/client/gui/GuiDistillationTower.java b/src/main/java/techreborn/client/gui/GuiDistillationTower.java index 812b29b71..524e3c74e 100644 --- a/src/main/java/techreborn/client/gui/GuiDistillationTower.java +++ b/src/main/java/techreborn/client/gui/GuiDistillationTower.java @@ -37,15 +37,15 @@ import reborncore.client.multiblock.Multiblock; import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockSet; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileDistillationTower; +import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity; public class GuiDistillationTower extends GuiBase { - public TileDistillationTower tile; + public DistillationTowerBlockEntity blockEntity; - public GuiDistillationTower(int syncID, final PlayerEntity player, final TileDistillationTower tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiDistillationTower(int syncID, final PlayerEntity player, final DistillationTowerBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -76,8 +76,8 @@ public class GuiDistillationTower extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - if (tile.getMutliBlock()) { + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 55, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + if (blockEntity.getMutliBlock()) { addHologramButton(6, 4, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer); } else { @@ -85,7 +85,7 @@ public class GuiDistillationTower extends GuiBase { addHologramButton(76, 56, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer); } - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } @@ -138,11 +138,11 @@ public class GuiDistillationTower extends GuiBase { final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); MultiblockRenderEvent.anchor = new BlockPos( - tile.getPos().getX() - Direction.byId(tile.getFacingInt()).getOffsetX() * 2, - tile.getPos().getY() - 1, - tile.getPos().getZ() - Direction.byId(tile.getFacingInt()).getOffsetZ() * 2); + blockEntity.getPos().getX() - Direction.byId(blockEntity.getFacingInt()).getOffsetX() * 2, + blockEntity.getPos().getY() - 1, + blockEntity.getPos().getZ() - Direction.byId(blockEntity.getFacingInt()).getOffsetZ() * 2); } } else { ClientProxy.multiblockRenderEvent.setMultiblock(null); diff --git a/src/main/java/techreborn/client/gui/GuiElectricFurnace.java b/src/main/java/techreborn/client/gui/GuiElectricFurnace.java index de3881cee..baf7eaed0 100644 --- a/src/main/java/techreborn/client/gui/GuiElectricFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiElectricFurnace.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileElectricFurnace; +import techreborn.blockentity.machine.tier1.ElectricFurnaceBlockEntity; public class GuiElectricFurnace extends GuiBase { - TileElectricFurnace tile; + ElectricFurnaceBlockEntity blockEntity; - public GuiElectricFurnace(int syncID, final PlayerEntity player, final TileElectricFurnace tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiElectricFurnace(int syncID, final PlayerEntity player, final ElectricFurnaceBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -56,7 +56,7 @@ public class GuiElectricFurnace extends GuiBase { super.drawForeground(mouseX, mouseY); Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tile.gaugeProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.gaugeProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiExtractor.java b/src/main/java/techreborn/client/gui/GuiExtractor.java index 1ac414f9d..b20996c5a 100644 --- a/src/main/java/techreborn/client/gui/GuiExtractor.java +++ b/src/main/java/techreborn/client/gui/GuiExtractor.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileExtractor; +import techreborn.blockentity.machine.tier1.ExtractorBlockEntity; public class GuiExtractor extends GuiBase { - TileExtractor tile; + ExtractorBlockEntity blockEntity; - public GuiExtractor(int syncID, final PlayerEntity player, final TileExtractor tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiExtractor(int syncID, final PlayerEntity player, final ExtractorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -56,7 +56,7 @@ public class GuiExtractor extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiFluidReplicator.java b/src/main/java/techreborn/client/gui/GuiFluidReplicator.java index ca1790f7d..798f7744f 100644 --- a/src/main/java/techreborn/client/gui/GuiFluidReplicator.java +++ b/src/main/java/techreborn/client/gui/GuiFluidReplicator.java @@ -36,7 +36,7 @@ import reborncore.client.multiblock.Multiblock; import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockSet; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileFluidReplicator; +import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity; /** * @author drcrazy @@ -44,11 +44,11 @@ import techreborn.tiles.machine.multiblock.TileFluidReplicator; */ public class GuiFluidReplicator extends GuiBase { - TileFluidReplicator tile; + FluidReplicatorBlockEntity blockEntity; - public GuiFluidReplicator(int syncID, final PlayerEntity player, final TileFluidReplicator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiFluidReplicator(int syncID, final PlayerEntity player, final FluidReplicatorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) { @@ -76,7 +76,7 @@ public class GuiFluidReplicator extends GuiBase { drawSlot(124, 55, layer); // JEI button builder.drawJEIButton(this, 158, 5, layer); - if (tile.getMultiBlock()) { + if (blockEntity.getMultiBlock()) { builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer); } } @@ -86,16 +86,16 @@ public class GuiFluidReplicator extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawTank(this, 99, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - if (tile.getMultiBlock()) { + builder.drawTank(this, 99, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + if (blockEntity.getMultiBlock()) { addHologramButton(6, 4, 212, layer).clickHandler(this::onClick); } else { builder.drawMultiblockMissingBar(this, layer); addHologramButton(76, 56, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer); } - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } // GuiScreen @@ -118,12 +118,12 @@ public class GuiFluidReplicator extends GuiBase { final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); MultiblockRenderEvent.anchor = new BlockPos( - this.tile.getPos().getX() - - Direction.byId(this.tile.getFacingInt()).getOffsetX() * 2, - this.tile.getPos().getY() - 1, this.tile.getPos().getZ() - - Direction.byId(this.tile.getFacingInt()).getOffsetZ() * 2); + this.blockEntity.getPos().getX() + - Direction.byId(this.blockEntity.getFacingInt()).getOffsetX() * 2, + this.blockEntity.getPos().getY() - 1, this.blockEntity.getPos().getZ() + - Direction.byId(this.blockEntity.getFacingInt()).getOffsetZ() * 2); } } else { ClientProxy.multiblockRenderEvent.setMultiblock(null); diff --git a/src/main/java/techreborn/client/gui/GuiFusionReactor.java b/src/main/java/techreborn/client/gui/GuiFusionReactor.java index 5836998a7..c2651f6e3 100644 --- a/src/main/java/techreborn/client/gui/GuiFusionReactor.java +++ b/src/main/java/techreborn/client/gui/GuiFusionReactor.java @@ -42,18 +42,18 @@ import reborncore.common.powerSystem.PowerSystem; import reborncore.common.util.Torus; import techreborn.init.TRContent; import techreborn.packets.ServerboundPackets; -import techreborn.tiles.fusionReactor.TileFusionControlComputer; +import techreborn.blockentity.fusionReactor.FusionControlComputerBlockEntity; import java.awt.*; import java.util.List; import java.util.Optional; public class GuiFusionReactor extends GuiBase { - TileFusionControlComputer tile; + FusionControlComputerBlockEntity blockEntity; - public GuiFusionReactor(int syncID, final PlayerEntity player, final TileFusionControlComputer tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiFusionReactor(int syncID, final PlayerEntity player, final FusionControlComputerBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -66,7 +66,7 @@ public class GuiFusionReactor extends GuiBase { drawOutputSlot(80, 47, layer); builder.drawJEIButton(this, 158, 5, layer); - if (tile.getCoilStatus() > 0) { + if (blockEntity.getCoilStatus() > 0) { builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer); } @@ -77,13 +77,13 @@ public class GuiFusionReactor extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer); - if (tile.getCoilStatus() > 0) { + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer); + if (blockEntity.getCoilStatus() > 0) { addHologramButton(6, 4, 212, layer).clickHandler(this::hologramToggle); - drawCentredString(tile.getStateString(), 20, Color.BLUE.darker().getRGB(), layer); - if(tile.state == 2){ - drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) tile.getPowerChange()) + "/t", 30, Color.GREEN.darker().getRGB(), layer); + drawCentredString(blockEntity.getStateString(), 20, Color.BLUE.darker().getRGB(), layer); + if(blockEntity.state == 2){ + drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) blockEntity.getPowerChange()) + "/t", 30, Color.GREEN.darker().getRGB(), layer); } } else { builder.drawMultiblockMissingBar(this, layer); @@ -101,15 +101,15 @@ public class GuiFusionReactor extends GuiBase { } } builder.drawUpDownButtons(this, 121, 79, layer); - drawString("Size: " + tile.size, 83, 81, 0xFFFFFF, layer); - drawString("" + tile.getPowerMultiplier() + "x", 10, 81, 0xFFFFFF, layer); + drawString("Size: " + blockEntity.size, 83, 81, 0xFFFFFF, layer); + drawString("" + blockEntity.getPowerMultiplier() + "x", 10, 81, 0xFFFFFF, layer); buttons.add(new GuiButtonUpDown(121, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(5))); buttons.add(new GuiButtonUpDown(121 + 12, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(1))); buttons.add(new GuiButtonUpDown(121 + 24, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(-5))); buttons.add(new GuiButtonUpDown(121 + 36, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(-1))); - builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) this.blockEntity.getEnergy(), (int) this.blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } public void hologramToggle(GuiButtonExtended button, double x, double y){ @@ -123,7 +123,7 @@ public class GuiFusionReactor extends GuiBase { } private void sendSizeChange(int sizeDelta){ - NetworkManager.sendToServer(ServerboundPackets.createPacketFusionControlSize(sizeDelta, tile.getPos())); + NetworkManager.sendToServer(ServerboundPackets.createPacketFusionControlSize(sizeDelta, blockEntity.getPos())); //Reset the multiblock as it will be wrong now. if(ClientProxy.multiblockRenderEvent.currentMultiblock != null){ updateMultiBlockRender(); @@ -134,14 +134,14 @@ public class GuiFusionReactor extends GuiBase { final Multiblock multiblock = new Multiblock(); BlockState coil = TRContent.Machine.FUSION_COIL.block.getDefaultState(); - List coils = Torus.generate(new BlockPos(0, 0, 0), tile.size); + List coils = Torus.generate(new BlockPos(0, 0, 0), blockEntity.size); coils.forEach(pos -> addComponent(pos.getX(), pos.getY(), pos.getZ(), coil, multiblock)); final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); - MultiblockRenderEvent.anchor = new BlockPos(tile.getPos().getX(), tile.getPos().getY() - 1, - tile.getPos().getZ()); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); + MultiblockRenderEvent.anchor = new BlockPos(blockEntity.getPos().getX(), blockEntity.getPos().getY() - 1, + blockEntity.getPos().getZ()); } public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) { @@ -149,10 +149,10 @@ public class GuiFusionReactor extends GuiBase { } public Optional> getCoilStackCount(){ - if(!Torus.TORUS_SIZE_MAP.containsKey(tile.size)){ + if(!Torus.TORUS_SIZE_MAP.containsKey(blockEntity.size)){ return Optional.empty(); } - int count = Torus.TORUS_SIZE_MAP.get(tile.size); + int count = Torus.TORUS_SIZE_MAP.get(blockEntity.size); return Optional.of(Pair.of(count / 64, count % 64)); } } diff --git a/src/main/java/techreborn/client/gui/GuiGasTurbine.java b/src/main/java/techreborn/client/gui/GuiGasTurbine.java index 91f7b2b38..08cbd79cb 100644 --- a/src/main/java/techreborn/client/gui/GuiGasTurbine.java +++ b/src/main/java/techreborn/client/gui/GuiGasTurbine.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.generator.advanced.TileGasTurbine; +import techreborn.blockentity.generator.advanced.GasTurbineBlockEntity; public class GuiGasTurbine extends GuiBase { - TileGasTurbine tile; + GasTurbineBlockEntity blockEntity; - public GuiGasTurbine(int syncID, final PlayerEntity player, final TileGasTurbine tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiGasTurbine(int syncID, final PlayerEntity player, final GasTurbineBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -53,9 +53,9 @@ public class GuiGasTurbine extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 130, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); - builder.drawTank(this, 44, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawTank(this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiGenerator.java b/src/main/java/techreborn/client/gui/GuiGenerator.java index 5a030674c..e54b06159 100644 --- a/src/main/java/techreborn/client/gui/GuiGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiGenerator.java @@ -26,15 +26,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; -import techreborn.tiles.generator.basic.TileSolidFuelGenerator; +import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity; public class GuiGenerator extends GuiBase { - TileSolidFuelGenerator tile; + SolidFuelGeneratorBlockEntity blockEntity; - public GuiGenerator(int syncID, final PlayerEntity player, final TileSolidFuelGenerator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiGenerator(int syncID, final PlayerEntity player, final SolidFuelGeneratorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -54,7 +54,7 @@ public class GuiGenerator extends GuiBase { super.drawForeground(mouseX, mouseY); final Layer layer = Layer.FOREGROUND; - builder.drawBurnBar(this, tile.getScaledBurnTime(100), 100, 81, 38, mouseX, mouseY, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawBurnBar(this, blockEntity.getScaledBurnTime(100), 100, 81, 38, mouseX, mouseY, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiGrinder.java b/src/main/java/techreborn/client/gui/GuiGrinder.java index 5b1a0a248..024b31e69 100644 --- a/src/main/java/techreborn/client/gui/GuiGrinder.java +++ b/src/main/java/techreborn/client/gui/GuiGrinder.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileGrinder; +import techreborn.blockentity.machine.tier1.GrinderBlockEntity; public class GuiGrinder extends GuiBase { - TileGrinder tile; + GrinderBlockEntity blockEntity; - public GuiGrinder(int syncID, final PlayerEntity player, final TileGrinder tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiGrinder(int syncID, final PlayerEntity player, final GrinderBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -56,7 +56,7 @@ public class GuiGrinder extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiIDSU.java b/src/main/java/techreborn/client/gui/GuiIDSU.java index 14a7f2a09..7740ce8c3 100644 --- a/src/main/java/techreborn/client/gui/GuiIDSU.java +++ b/src/main/java/techreborn/client/gui/GuiIDSU.java @@ -28,15 +28,15 @@ import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.common.powerSystem.PowerSystem; -import techreborn.tiles.storage.idsu.TileInterdimensionalSU; +import techreborn.blockentity.storage.idsu.InterdimensionalSUBlockEntity; public class GuiIDSU extends GuiBase { - TileInterdimensionalSU idsu; + InterdimensionalSUBlockEntity idsu; - public GuiIDSU(int syncID, PlayerEntity player, TileInterdimensionalSU tileIDSU) { - super(player, tileIDSU, tileIDSU.createContainer(syncID, player)); - idsu = tileIDSU; + public GuiIDSU(int syncID, PlayerEntity player, InterdimensionalSUBlockEntity blockEntityIDSU) { + super(player, blockEntityIDSU, blockEntityIDSU.createContainer(syncID, player)); + idsu = blockEntityIDSU; } @Override diff --git a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java index cf9f98024..1195221c1 100644 --- a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java +++ b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java @@ -36,15 +36,15 @@ import reborncore.client.multiblock.Multiblock; import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockSet; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileImplosionCompressor; +import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity; public class GuiImplosionCompressor extends GuiBase { - TileImplosionCompressor tile; + ImplosionCompressorBlockEntity blockEntity; - public GuiImplosionCompressor(int syncID, final PlayerEntity player, final TileImplosionCompressor tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiImplosionCompressor(int syncID, final PlayerEntity player, final ImplosionCompressorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -67,7 +67,7 @@ public class GuiImplosionCompressor extends GuiBase { drawSlot(92, 36, layer); drawSlot(110, 36, layer); - if (tile.getMutliBlock()) { + if (blockEntity.getMutliBlock()) { builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer); } @@ -79,15 +79,15 @@ public class GuiImplosionCompressor extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - if (tile.getMutliBlock()) { + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + if (blockEntity.getMutliBlock()) { addHologramButton(6, 4, 212, layer).clickHandler(this::onClick); } else { builder.drawMultiblockMissingBar(this, layer); addHologramButton(76, 56, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer); } - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } @@ -109,8 +109,8 @@ public class GuiImplosionCompressor extends GuiBase { final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); - MultiblockRenderEvent.anchor = new BlockPos(tile.getPos().getX(), tile.getPos().getY(), tile.getPos().getZ()); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); + MultiblockRenderEvent.anchor = new BlockPos(blockEntity.getPos().getX(), blockEntity.getPos().getY(), blockEntity.getPos().getZ()); } } else { ClientProxy.multiblockRenderEvent.setMultiblock(null); diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java index c86458399..57e7577fa 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileIndustrialElectrolyzer; +import techreborn.blockentity.machine.tier1.IndustrialElectrolyzerBlockEntity; public class GuiIndustrialElectrolyzer extends GuiBase { - TileIndustrialElectrolyzer tile; + IndustrialElectrolyzerBlockEntity blockEntity; - public GuiIndustrialElectrolyzer(int syncID, final PlayerEntity player, final TileIndustrialElectrolyzer tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiIndustrialElectrolyzer(int syncID, final PlayerEntity player, final IndustrialElectrolyzerBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -58,8 +58,8 @@ public class GuiIndustrialElectrolyzer extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 84, 52, mouseX, mouseY, GuiBuilder.ProgressDirection.UP, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 84, 52, mouseX, mouseY, GuiBuilder.ProgressDirection.UP, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java b/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java index 14760d6d6..e5aded128 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java @@ -37,15 +37,15 @@ import reborncore.client.multiblock.Multiblock; import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockSet; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileIndustrialGrinder; +import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity; public class GuiIndustrialGrinder extends GuiBase { - TileIndustrialGrinder tile; + IndustrialGrinderBlockEntity blockEntity; - public GuiIndustrialGrinder(int syncID, final PlayerEntity player, final TileIndustrialGrinder tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiIndustrialGrinder(int syncID, final PlayerEntity player, final IndustrialGrinderBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -74,7 +74,7 @@ public class GuiIndustrialGrinder extends GuiBase { drawSlot(126, 72, layer); builder.drawJEIButton(this, 158, 5, layer); - if (tile.getMultiBlock()) { + if (blockEntity.getMultiBlock()) { builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer); } } @@ -84,16 +84,16 @@ public class GuiIndustrialGrinder extends GuiBase { super.drawForeground(mouseX, mouseY); final Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawTank(this, 53, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); - if (tile.getMultiBlock()) { + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawTank(this, 53, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); + if (blockEntity.getMultiBlock()) { addHologramButton(6, 4, 212, layer).clickHandler(this::onClick); } else { builder.drawMultiblockMissingBar(this, layer); addHologramButton(76, 56, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer); } - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } public void onClick(GuiButtonExtended button, double mouseX, double mouseY){ @@ -138,12 +138,12 @@ public class GuiIndustrialGrinder extends GuiBase { final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); MultiblockRenderEvent.anchor = new BlockPos( - this.tile.getPos().getX() - - Direction.byId(this.tile.getFacingInt()).getOffsetX() * 2, - this.tile.getPos().getY() - 1, this.tile.getPos().getZ() - - Direction.byId(this.tile.getFacingInt()).getOffsetZ() * 2); + this.blockEntity.getPos().getX() + - Direction.byId(this.blockEntity.getFacingInt()).getOffsetX() * 2, + this.blockEntity.getPos().getY() - 1, this.blockEntity.getPos().getZ() + - Direction.byId(this.blockEntity.getFacingInt()).getOffsetZ() * 2); } } else { ClientProxy.multiblockRenderEvent.setMultiblock(null); diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java index 3db76f690..b702db745 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java @@ -37,15 +37,15 @@ import reborncore.client.multiblock.Multiblock; import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockSet; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileIndustrialSawmill; +import techreborn.blockentity.machine.multiblock.IndustrialSawmillBlockEntity; public class GuiIndustrialSawmill extends GuiBase { - TileIndustrialSawmill tile; + IndustrialSawmillBlockEntity blockEntity; - public GuiIndustrialSawmill(int syncID, final PlayerEntity player, final TileIndustrialSawmill tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiIndustrialSawmill(int syncID, final PlayerEntity player, final IndustrialSawmillBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -73,7 +73,7 @@ public class GuiIndustrialSawmill extends GuiBase { drawSlot(126, 61, layer); builder.drawJEIButton(this, 158, 5, layer); - if (tile.getMutliBlock()) { + if (blockEntity.getMutliBlock()) { builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer); } } @@ -83,16 +83,16 @@ public class GuiIndustrialSawmill extends GuiBase { super.drawForeground(mouseX, mouseY); final Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawTank(this, 53, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); - if (tile.getMutliBlock()) { + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawTank(this, 53, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); + if (blockEntity.getMutliBlock()) { addHologramButton(6, 4, 212, layer).clickHandler(this::onClick); } else { builder.drawMultiblockMissingBar(this, layer); addHologramButton(76, 56, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer); } - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){ @@ -137,12 +137,12 @@ public class GuiIndustrialSawmill extends GuiBase { final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); MultiblockRenderEvent.anchor = new BlockPos( - this.tile.getPos().getX() - - Direction.byId(this.tile.getFacingInt()).getOffsetY() * 2, - this.tile.getPos().getY() - 1, this.tile.getPos().getZ() - - Direction.byId(this.tile.getFacingInt()).getOffsetY() * 2); + this.blockEntity.getPos().getX() + - Direction.byId(this.blockEntity.getFacingInt()).getOffsetY() * 2, + this.blockEntity.getPos().getY() - 1, this.blockEntity.getPos().getZ() + - Direction.byId(this.blockEntity.getFacingInt()).getOffsetY() * 2); } } else { ClientProxy.multiblockRenderEvent.setMultiblock(null); diff --git a/src/main/java/techreborn/client/gui/GuiIronFurnace.java b/src/main/java/techreborn/client/gui/GuiIronFurnace.java index 27c102763..90d777698 100644 --- a/src/main/java/techreborn/client/gui/GuiIronFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiIronFurnace.java @@ -31,16 +31,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.Identifier; import reborncore.client.gui.builder.GuiBase; import techreborn.init.TRContent; -import techreborn.tiles.machine.iron.TileIronFurnace; +import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity; public class GuiIronFurnace extends GuiBase { public static final Identifier texture = new Identifier("minecraft", "textures/gui/container/furnace.png"); - TileIronFurnace furnace; + IronFurnaceBlockEntity furnace; - public GuiIronFurnace(int syncID, final PlayerEntity player, final TileIronFurnace furnace) { + public GuiIronFurnace(int syncID, final PlayerEntity player, final IronFurnaceBlockEntity furnace) { super(player, furnace, furnace.createContainer(syncID, player)); this.containerWidth = 176; this.containerHeight = 167; @@ -72,7 +72,7 @@ public class GuiIronFurnace extends GuiBase { @Override protected void drawForeground(int mouseX, int mouseY) { - final String name = I18n.translate("tile.techreborn.iron_furnace.name"); + final String name = I18n.translate("blockEntity.techreborn.iron_furnace.name"); font.draw(name, containerWidth / 2 - font.getStringWidth(name) / 2, 6, 4210752); font.draw(I18n.translate("container.inventory", new Object[0]), 8, containerHeight - 96 + 2, 4210752); diff --git a/src/main/java/techreborn/client/gui/GuiLESU.java b/src/main/java/techreborn/client/gui/GuiLESU.java index cd86664a2..730302187 100644 --- a/src/main/java/techreborn/client/gui/GuiLESU.java +++ b/src/main/java/techreborn/client/gui/GuiLESU.java @@ -28,15 +28,15 @@ import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.common.powerSystem.PowerSystem; -import techreborn.tiles.storage.lesu.TileLapotronicSU; +import techreborn.blockentity.storage.lesu.LapotronicSUBlockEntity; public class GuiLESU extends GuiBase { - TileLapotronicSU tile; + LapotronicSUBlockEntity blockEntity; - public GuiLESU(int syncID, final PlayerEntity player, final TileLapotronicSU tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiLESU(int syncID, final PlayerEntity player, final LapotronicSUBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -56,11 +56,11 @@ public class GuiLESU extends GuiBase { GlStateManager.pushMatrix(); GlStateManager.scaled(0.6, 0.6, 1); - drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getEnergy()) + "/" - + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getMaxPower()) + " " + drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/" + + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer); GlStateManager.popMatrix(); - builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiMFE.java b/src/main/java/techreborn/client/gui/GuiMFE.java index 1b8c4a39b..bc031617a 100644 --- a/src/main/java/techreborn/client/gui/GuiMFE.java +++ b/src/main/java/techreborn/client/gui/GuiMFE.java @@ -28,13 +28,13 @@ import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.common.powerSystem.PowerSystem; -import techreborn.tiles.storage.TileMediumVoltageSU; +import techreborn.blockentity.storage.MediumVoltageSUBlockEntity; public class GuiMFE extends GuiBase { - TileMediumVoltageSU mfe; + MediumVoltageSUBlockEntity mfe; - public GuiMFE(int syncID, final PlayerEntity player, final TileMediumVoltageSU mfe) { + public GuiMFE(int syncID, final PlayerEntity player, final MediumVoltageSUBlockEntity mfe) { super(player, mfe, mfe.createContainer(syncID, player)); this.mfe = mfe; } diff --git a/src/main/java/techreborn/client/gui/GuiMFSU.java b/src/main/java/techreborn/client/gui/GuiMFSU.java index 10861fecd..a07a6ba9d 100644 --- a/src/main/java/techreborn/client/gui/GuiMFSU.java +++ b/src/main/java/techreborn/client/gui/GuiMFSU.java @@ -28,13 +28,13 @@ import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.common.powerSystem.PowerSystem; -import techreborn.tiles.storage.TileHighVoltageSU; +import techreborn.blockentity.storage.HighVoltageSUBlockEntity; public class GuiMFSU extends GuiBase { - TileHighVoltageSU mfsu; + HighVoltageSUBlockEntity mfsu; - public GuiMFSU(int syncID, final PlayerEntity player, final TileHighVoltageSU mfsu) { + public GuiMFSU(int syncID, final PlayerEntity player, final HighVoltageSUBlockEntity mfsu) { super(player, mfsu, mfsu.createContainer(syncID, player)); this.mfsu = mfsu; } diff --git a/src/main/java/techreborn/client/gui/GuiMatterFabricator.java b/src/main/java/techreborn/client/gui/GuiMatterFabricator.java index c95443669..cab104db1 100644 --- a/src/main/java/techreborn/client/gui/GuiMatterFabricator.java +++ b/src/main/java/techreborn/client/gui/GuiMatterFabricator.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier3.TileMatterFabricator; +import techreborn.blockentity.machine.tier3.MatterFabricatorBlockEntity; public class GuiMatterFabricator extends GuiBase { - TileMatterFabricator tile; + MatterFabricatorBlockEntity blockEntity; - public GuiMatterFabricator(int syncID, final PlayerEntity player, final TileMatterFabricator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiMatterFabricator(int syncID, final PlayerEntity player, final MatterFabricatorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -60,7 +60,7 @@ public class GuiMatterFabricator extends GuiBase { super.drawForeground(mouseX, mouseY); final Layer layer = Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 83, 41, mouseX, mouseY, GuiBuilder.ProgressDirection.DOWN, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 83, 41, mouseX, mouseY, GuiBuilder.ProgressDirection.DOWN, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java b/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java index d90ebddb1..5f5334c98 100644 --- a/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java @@ -29,7 +29,7 @@ import net.fabricmc.api.Environment; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.generator.TilePlasmaGenerator; +import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; /** * @author drcrazy @@ -40,14 +40,14 @@ public class GuiPlasmaGenerator extends GuiBase { /** * @param player - * @param tile + * @param blockEntity * @param container */ - TilePlasmaGenerator tile; + PlasmaGeneratorBlockEntity blockEntity; - public GuiPlasmaGenerator(int syncID, final PlayerEntity player, final TilePlasmaGenerator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiPlasmaGenerator(int syncID, final PlayerEntity player, final PlasmaGeneratorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -65,9 +65,9 @@ public class GuiPlasmaGenerator extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 130, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); - builder.drawTank(this, 44, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawTank(this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); } diff --git a/src/main/java/techreborn/client/gui/GuiQuantumChest.java b/src/main/java/techreborn/client/gui/GuiQuantumChest.java index 32581ff2e..0ca32e0e4 100644 --- a/src/main/java/techreborn/client/gui/GuiQuantumChest.java +++ b/src/main/java/techreborn/client/gui/GuiQuantumChest.java @@ -26,13 +26,13 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; -import techreborn.tiles.machine.tier3.TileQuantumChest; +import techreborn.blockentity.machine.tier3.QuantumChestBlockEntity; public class GuiQuantumChest extends GuiBase { - TileQuantumChest quantumChest; + QuantumChestBlockEntity quantumChest; - public GuiQuantumChest(int syncID, final PlayerEntity player, final TileQuantumChest quantumChest) { + public GuiQuantumChest(int syncID, final PlayerEntity player, final QuantumChestBlockEntity quantumChest) { super(player, quantumChest, quantumChest.createContainer(syncID, player)); this.quantumChest = quantumChest; } diff --git a/src/main/java/techreborn/client/gui/GuiQuantumTank.java b/src/main/java/techreborn/client/gui/GuiQuantumTank.java index ef950bdd3..7ffe5b4bc 100644 --- a/src/main/java/techreborn/client/gui/GuiQuantumTank.java +++ b/src/main/java/techreborn/client/gui/GuiQuantumTank.java @@ -27,13 +27,13 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.fluid.FluidStack; -import techreborn.tiles.machine.tier3.TileQuantumTank; +import techreborn.blockentity.machine.tier3.QuantumTankBlockEntity; public class GuiQuantumTank extends GuiBase { - TileQuantumTank quantumTank; + QuantumTankBlockEntity quantumTank; - public GuiQuantumTank(int syncID, final PlayerEntity player, final TileQuantumTank quantumTank) { + public GuiQuantumTank(int syncID, final PlayerEntity player, final QuantumTankBlockEntity quantumTank) { super(player, quantumTank, quantumTank.createContainer(syncID, player)); this.quantumTank = quantumTank; } diff --git a/src/main/java/techreborn/client/gui/GuiRecycler.java b/src/main/java/techreborn/client/gui/GuiRecycler.java index 85a16b1fa..0f180e1fa 100644 --- a/src/main/java/techreborn/client/gui/GuiRecycler.java +++ b/src/main/java/techreborn/client/gui/GuiRecycler.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileRecycler; +import techreborn.blockentity.machine.tier1.RecyclerBlockEntity; public class GuiRecycler extends GuiBase { - TileRecycler tile; + RecyclerBlockEntity blockEntity; - public GuiRecycler(int syncID, final PlayerEntity player, final TileRecycler tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiRecycler(int syncID, final PlayerEntity player, final RecyclerBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -54,7 +54,7 @@ public class GuiRecycler extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.gaugeProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.gaugeProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiRollingMachine.java b/src/main/java/techreborn/client/gui/GuiRollingMachine.java index 4c7b0fb11..6ea181d85 100644 --- a/src/main/java/techreborn/client/gui/GuiRollingMachine.java +++ b/src/main/java/techreborn/client/gui/GuiRollingMachine.java @@ -29,15 +29,15 @@ import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.common.network.NetworkManager; import techreborn.packets.ServerboundPackets; -import techreborn.tiles.machine.tier1.TileRollingMachine; +import techreborn.blockentity.machine.tier1.RollingMachineBlockEntity; public class GuiRollingMachine extends GuiBase { - TileRollingMachine rollingMachine; + RollingMachineBlockEntity rollingMachine; - public GuiRollingMachine(int syncID, final PlayerEntity player, final TileRollingMachine tileRollingmachine) { - super(player, tileRollingmachine, tileRollingmachine.createContainer(syncID, player)); - this.rollingMachine = tileRollingmachine; + public GuiRollingMachine(int syncID, final PlayerEntity player, final RollingMachineBlockEntity blockEntityRollingmachine) { + super(player, blockEntityRollingmachine, blockEntityRollingmachine.createContainer(syncID, player)); + this.rollingMachine = blockEntityRollingmachine; } @Override diff --git a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java index 812238682..0010b6f08 100644 --- a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java +++ b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.machine.tier1.TileScrapboxinator; +import techreborn.blockentity.machine.tier1.ScrapboxinatorBlockEntity; public class GuiScrapboxinator extends GuiBase { - TileScrapboxinator tile; + ScrapboxinatorBlockEntity blockEntity; - public GuiScrapboxinator(int syncID, final PlayerEntity player, final TileScrapboxinator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiScrapboxinator(int syncID, final PlayerEntity player, final ScrapboxinatorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -58,7 +58,7 @@ public class GuiScrapboxinator extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java b/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java index 27e3d0c64..25f5c03c3 100644 --- a/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.generator.advanced.TileSemiFluidGenerator; +import techreborn.blockentity.generator.advanced.SemiFluidGeneratorBlockEntity; public class GuiSemifluidGenerator extends GuiBase { - TileSemiFluidGenerator tile; + SemiFluidGeneratorBlockEntity blockEntity; - public GuiSemifluidGenerator(int syncID, final PlayerEntity player, final TileSemiFluidGenerator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiSemifluidGenerator(int syncID, final PlayerEntity player, final SemiFluidGeneratorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -53,9 +53,9 @@ public class GuiSemifluidGenerator extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 130, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); - builder.drawTank(this, 44, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawTank(this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiThermalGenerator.java b/src/main/java/techreborn/client/gui/GuiThermalGenerator.java index 5754c9b07..15359ab13 100644 --- a/src/main/java/techreborn/client/gui/GuiThermalGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiThermalGenerator.java @@ -27,15 +27,15 @@ package techreborn.client.gui; import net.minecraft.entity.player.PlayerEntity; import reborncore.client.gui.builder.GuiBase; import reborncore.client.gui.guibuilder.GuiBuilder; -import techreborn.tiles.generator.advanced.TileThermalGenerator; +import techreborn.blockentity.generator.advanced.ThermalGeneratorBlockEntity; public class GuiThermalGenerator extends GuiBase { - TileThermalGenerator tile; + ThermalGeneratorBlockEntity blockEntity; - public GuiThermalGenerator(int syncID, final PlayerEntity player, final TileThermalGenerator tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiThermalGenerator(int syncID, final PlayerEntity player, final ThermalGeneratorBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -53,9 +53,9 @@ public class GuiThermalGenerator extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - builder.drawMultiEnergyBar(this, 130, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); - builder.drawTank(this, 44, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer); + builder.drawProgressBar(this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + builder.drawMultiEnergyBar(this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawTank(this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluid(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer); } } diff --git a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java index 58a3cec45..a9c5a69a2 100644 --- a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java +++ b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java @@ -35,15 +35,15 @@ import reborncore.client.multiblock.Multiblock; import reborncore.client.multiblock.MultiblockRenderEvent; import reborncore.client.multiblock.MultiblockSet; import techreborn.init.TRContent; -import techreborn.tiles.machine.multiblock.TileVacuumFreezer; +import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity; public class GuiVacuumFreezer extends GuiBase { - TileVacuumFreezer tile; + VacuumFreezerBlockEntity blockEntity; - public GuiVacuumFreezer(int syncID, final PlayerEntity player, final TileVacuumFreezer tile) { - super(player, tile, tile.createContainer(syncID, player)); - this.tile = tile; + public GuiVacuumFreezer(int syncID, final PlayerEntity player, final VacuumFreezerBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createContainer(syncID, player)); + this.blockEntity = blockEntity; } @Override @@ -66,7 +66,7 @@ public class GuiVacuumFreezer extends GuiBase { drawOutputSlot(101, 45, layer); builder.drawJEIButton(this, 158, 5, layer); - if (tile.getMultiBlock()) { + if (blockEntity.getMultiBlock()) { builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer); } } @@ -76,15 +76,15 @@ public class GuiVacuumFreezer extends GuiBase { super.drawForeground(mouseX, mouseY); final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND; - builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); - if (tile.getMultiBlock()) { + builder.drawProgressBar(this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer); + if (blockEntity.getMultiBlock()) { addHologramButton(6, 4, 212, layer).clickHandler(this::onClick); } else { builder.drawMultiblockMissingBar(this, layer); addHologramButton(76, 56, 212, layer).clickHandler(this::onClick); builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer); } - builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer); + builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer); } public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){ @@ -127,8 +127,8 @@ public class GuiVacuumFreezer extends GuiBase { final MultiblockSet set = new MultiblockSet(multiblock); ClientProxy.multiblockRenderEvent.setMultiblock(set); - ClientProxy.multiblockRenderEvent.parent = tile.getPos(); - MultiblockRenderEvent.anchor = tile.getPos().down(); + ClientProxy.multiblockRenderEvent.parent = blockEntity.getPos(); + MultiblockRenderEvent.anchor = blockEntity.getPos().down(); } } else { ClientProxy.multiblockRenderEvent.setMultiblock(null); diff --git a/src/main/java/techreborn/events/StackToolTipHandler.java b/src/main/java/techreborn/events/StackToolTipHandler.java index f65a2c9e3..86404bd0d 100644 --- a/src/main/java/techreborn/events/StackToolTipHandler.java +++ b/src/main/java/techreborn/events/StackToolTipHandler.java @@ -82,16 +82,16 @@ public class StackToolTipHandler implements ItemTooltipCallback { try { Block block = Block.getBlockFromItem(item); if (block != null && (block instanceof BlockWithEntity || block instanceof BlockEntityProvider) && Registry.BLOCK.getId(block).getNamespace().contains("techreborn")) { - BlockEntity tile = ((BlockEntityProvider) block).createBlockEntity(MinecraftClient.getInstance().world); + BlockEntity blockEntity = ((BlockEntityProvider) block).createBlockEntity(MinecraftClient.getInstance().world); boolean hasData = false; - if (stack.hasTag() && stack.getTag().containsKey("tile_data")) { - CompoundTag tileData = stack.getTag().getCompound("tile_data"); - tile.fromTag(tileData); + if (stack.hasTag() && stack.getTag().containsKey("blockEntity_data")) { + CompoundTag blockEntityData = stack.getTag().getCompound("blockEntity_data"); + blockEntity.fromTag(blockEntityData); hasData = true; components.add(new LiteralText("Block data contained").formatted(Formatting.DARK_GREEN)); } - if (tile instanceof IListInfoProvider) { - ((IListInfoProvider) tile).addInfo(components, false, hasData); + if (blockEntity instanceof IListInfoProvider) { + ((IListInfoProvider) blockEntity).addInfo(components, false, hasData); } } } catch (NullPointerException e) { diff --git a/src/main/java/techreborn/init/ModSounds.java b/src/main/java/techreborn/init/ModSounds.java index 0d1aa2c7e..94ac490b2 100644 --- a/src/main/java/techreborn/init/ModSounds.java +++ b/src/main/java/techreborn/init/ModSounds.java @@ -70,9 +70,9 @@ public class ModSounds { public static class SoundHandler implements ICrafterSoundHanlder { @Override - public void playSound(boolean firstRun, BlockEntity tileEntity) { - tileEntity.getWorld().playSound(null, tileEntity.getPos().getX(), tileEntity.getPos().getY(), - tileEntity.getPos().getZ(), ModSounds.MACHINE_RUN, + public void playSound(boolean firstRun, BlockEntity blockEntity) { + blockEntity.getWorld().playSound(null, blockEntity.getPos().getX(), blockEntity.getPos().getY(), + blockEntity.getPos().getZ(), ModSounds.MACHINE_RUN, SoundCategory.BLOCKS, 0.1F, 1F); } } diff --git a/src/main/java/techreborn/init/TRBlockEntities.java b/src/main/java/techreborn/init/TRBlockEntities.java new file mode 100644 index 000000000..5cf33081d --- /dev/null +++ b/src/main/java/techreborn/init/TRBlockEntities.java @@ -0,0 +1,152 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2018 TechReborn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package techreborn.init; + +import net.minecraft.block.Block; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.item.ItemConvertible; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; +import org.apache.commons.lang3.Validate; +import techreborn.TechReborn; +import techreborn.blockentity.*; +import techreborn.blockentity.cable.CableBlockEntity; +import techreborn.blockentity.fusionReactor.FusionControlComputerBlockEntity; +import techreborn.blockentity.generator.LightningRodBlockEntity; +import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; +import techreborn.blockentity.generator.SolarPanelBlockEntity; +import techreborn.blockentity.generator.advanced.*; +import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity; +import techreborn.blockentity.generator.basic.WaterMillBlockEntity; +import techreborn.blockentity.generator.basic.WindMillBlockEntity; +import techreborn.blockentity.lighting.LampBlockEntity; +import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity; +import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity; +import techreborn.blockentity.machine.multiblock.*; +import techreborn.blockentity.machine.tier1.*; +import techreborn.blockentity.machine.tier3.*; +import techreborn.blockentity.storage.AdjustableSUBlockEntity; +import techreborn.blockentity.storage.HighVoltageSUBlockEntity; +import techreborn.blockentity.storage.LowVoltageSUBlockEntity; +import techreborn.blockentity.storage.MediumVoltageSUBlockEntity; +import techreborn.blockentity.storage.idsu.InterdimensionalSUBlockEntity; +import techreborn.blockentity.storage.lesu.LSUStorageBlockEntity; +import techreborn.blockentity.storage.lesu.LapotronicSUBlockEntity; +import techreborn.blockentity.transformers.HVTransformerBlockEntity; +import techreborn.blockentity.transformers.LVTransformerBlockEntity; +import techreborn.blockentity.transformers.MVTransformerBlockEntity; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class TRBlockEntities { + + public static List> TYPES = new ArrayList<>(); + + public static final BlockEntityType THERMAL_GEN = register(ThermalGeneratorBlockEntity.class, "thermal_generator", TRContent.Machine.THERMAL_GENERATOR); + public static final BlockEntityType QUANTUM_TANK = register(QuantumTankBlockEntity.class, "quantum_tank", TRContent.Machine.QUANTUM_TANK); + public static final BlockEntityType QUANTUM_CHEST = register(QuantumChestBlockEntity.class, "quantum_chest", TRContent.Machine.QUANTUM_CHEST); + public static final BlockEntityType DIGITAL_CHEST = register(DigitalChestBlockEntity.class, "digital_chest", TRContent.Machine.DIGITAL_CHEST); + public static final BlockEntityType INDUSTRIAL_CENTRIFUGE = register(IndustrialCentrifugeBlockEntity.class, "industrial_centrifuge", TRContent.Machine.INDUSTRIAL_CENTRIFUGE); + public static final BlockEntityType ROLLING_MACHINE = register(RollingMachineBlockEntity.class, "rolling_machine", TRContent.Machine.ROLLING_MACHINE); + public static final BlockEntityType INDUSTRIAL_BLAST_FURNACE = register(IndustrialBlastFurnaceBlockEntity.class, "industrial_blast_furnace", TRContent.Machine.INDUSTRIAL_BLAST_FURNACE); + public static final BlockEntityType ALLOY_SMELTER = register(AlloySmelterBlockEntity.class, "alloy_smelter", TRContent.Machine.ALLOY_SMELTER); + public static final BlockEntityType INDUSTRIAL_GRINDER = register(IndustrialGrinderBlockEntity.class, "industrial_grinder", TRContent.Machine.INDUSTRIAL_GRINDER); + public static final BlockEntityType IMPLOSION_COMPRESSOR = register(ImplosionCompressorBlockEntity.class, "implosion_compressor", TRContent.Machine.IMPLOSION_COMPRESSOR); + public static final BlockEntityType MATTER_FABRICATOR = register(MatterFabricatorBlockEntity.class, "matter_fabricator", TRContent.Machine.MATTER_FABRICATOR); + public static final BlockEntityType CHUNK_LOADER = register(ChunkLoaderBlockEntity.class, "chunk_loader", TRContent.Machine.CHUNK_LOADER); + public static final BlockEntityType CHARGE_O_MAT = register(ChargeOMatBlockEntity.class, "charge_o_mat", TRContent.Machine.CHARGE_O_MAT); + public static final BlockEntityType PLAYER_DETECTOR = register(PlayerDectectorBlockEntity.class, "player_detector", TRContent.Machine.PLAYER_DETECTOR); + public static final BlockEntityType CABLE = register(CableBlockEntity.class, "cable", TRContent.Cables.values()); + public static final BlockEntityType MACHINE_CASINGS = register(MachineCasingBlockEntity.class, "machine_casing", TRContent.MachineBlocks.getCasings()); + public static final BlockEntityType DRAGON_EGG_SYPHON = register(DragonEggSyphonBlockEntity.class, "dragon_egg_syphon", TRContent.Machine.DRAGON_EGG_SYPHON); + public static final BlockEntityType ASSEMBLY_MACHINE = register(AssemblingMachineBlockEntity.class, "assembly_machine", TRContent.Machine.ASSEMBLY_MACHINE); + public static final BlockEntityType DIESEL_GENERATOR = register(DieselGeneratorBlockEntity.class, "diesel_generator", TRContent.Machine.DIESEL_GENERATOR); + public static final BlockEntityType INDUSTRIAL_ELECTROLYZER = register(IndustrialElectrolyzerBlockEntity.class, "industrial_electrolyzer", TRContent.Machine.INDUSTRIAL_ELECTROLYZER); + public static final BlockEntityType SEMI_FLUID_GENERATOR = register(SemiFluidGeneratorBlockEntity.class, "semi_fluid_generator", TRContent.Machine.SEMI_FLUID_GENERATOR); + public static final BlockEntityType GAS_TURBINE = register(GasTurbineBlockEntity.class, "gas_turbine", TRContent.Machine.GAS_TURBINE); + public static final BlockEntityType IRON_ALLOY_FURNACE = register(IronAlloyFurnaceBlockEntity.class, "iron_alloy_furnace", TRContent.Machine.IRON_ALLOY_FURNACE); + public static final BlockEntityType CHEMICAL_REACTOR = register(ChemicalReactorBlockEntity.class, "chemical_reactor", TRContent.Machine.CHEMICAL_REACTOR); + public static final BlockEntityType INTERDIMENSIONAL_SU = register(InterdimensionalSUBlockEntity.class, "interdimensional_su", TRContent.Machine.INTERDIMENSIONAL_SU); + public static final BlockEntityType ADJUSTABLE_SU = register(AdjustableSUBlockEntity.class, "adjustable_su", TRContent.Machine.ADJUSTABLE_SU); + public static final BlockEntityType LAPOTRONIC_SU = register(LapotronicSUBlockEntity.class, "lapotronic_su", TRContent.Machine.LAPOTRONIC_SU); + public static final BlockEntityType LSU_STORAGE = register(LSUStorageBlockEntity.class, "lsu_storage", TRContent.Machine.LSU_STORAGE); + public static final BlockEntityType DISTILLATION_TOWER = register(DistillationTowerBlockEntity.class, "distillation_tower", TRContent.Machine.DISTILLATION_TOWER); + public static final BlockEntityType VACUUM_FREEZER = register(VacuumFreezerBlockEntity.class, "vacuum_freezer", TRContent.Machine.VACUUM_FREEZER); + public static final BlockEntityType FUSION_CONTROL_COMPUTER = register(FusionControlComputerBlockEntity.class, "fusion_control_computer", TRContent.Machine.FUSION_CONTROL_COMPUTER); + public static final BlockEntityType LIGHTNING_ROD = register(LightningRodBlockEntity.class, "lightning_rod", TRContent.Machine.LIGHTNING_ROD); + public static final BlockEntityType INDUSTRIAL_SAWMILL = register(IndustrialSawmillBlockEntity.class, "industrial_sawmill", TRContent.Machine.INDUSTRIAL_SAWMILL); + public static final BlockEntityType GRINDER = register(GrinderBlockEntity.class, "grinder", TRContent.Machine.GRINDER); + public static final BlockEntityType SOLID_FUEL_GENEREATOR = register(SolidFuelGeneratorBlockEntity.class, "solid_fuel_generator", TRContent.Machine.SOLID_FUEL_GENERATOR); + public static final BlockEntityType EXTRACTOR = register(ExtractorBlockEntity.class, "extractor", TRContent.Machine.EXTRACTOR); + public static final BlockEntityType COMPRESSOR = register(CompressorBlockEntity.class, "compressor", TRContent.Machine.COMPRESSOR); + public static final BlockEntityType ELECTRIC_FURNACE = register(ElectricFurnaceBlockEntity.class, "electric_furnace", TRContent.Machine.ELECTRIC_FURNACE); + public static final BlockEntityType SOLAR_PANEL = register(SolarPanelBlockEntity.class, "solar_panel", TRContent.SolarPanels.values()); + public static final BlockEntityType CREATIVE_QUANTUM_TANK = register(CreativeQuantumTankBlockEntity.class, "creative_quantum_tank", TRContent.Machine.CREATIVE_QUANTUM_TANK); + public static final BlockEntityType CREATIVE_QUANTUM_CHEST = register(CreativeQuantumChestBlockEntity.class, "creative_quantum_chest", TRContent.Machine.CREATIVE_QUANTUM_CHEST); + public static final BlockEntityType WATER_MILL = register(WaterMillBlockEntity.class, "water_mill", TRContent.Machine.WATER_MILL); + public static final BlockEntityType WIND_MILL = register(WindMillBlockEntity.class, "wind_mill", TRContent.Machine.WIND_MILL); + public static final BlockEntityType RECYCLER = register(RecyclerBlockEntity.class, "recycler", TRContent.Machine.RECYCLER); + public static final BlockEntityType LOW_VOLTAGE_SU = register(LowVoltageSUBlockEntity.class, "low_voltage_su", TRContent.Machine.LOW_VOLTAGE_SU); + public static final BlockEntityType MEDIUM_VOLTAGE_SU = register(MediumVoltageSUBlockEntity.class, "medium_voltage_su", TRContent.Machine.MEDIUM_VOLTAGE_SU); + public static final BlockEntityType HIGH_VOLTAGE_SU = register(HighVoltageSUBlockEntity.class, "high_voltage_su", TRContent.Machine.HIGH_VOLTAGE_SU); + public static final BlockEntityType LV_TRANSFORMER = register(LVTransformerBlockEntity.class, "lv_transformer", TRContent.Machine.LV_TRANSFORMER); + public static final BlockEntityType MV_TRANSFORMER = register(MVTransformerBlockEntity.class, "mv_transformer", TRContent.Machine.MV_TRANSFORMER); + public static final BlockEntityType HV_TRANSFORMER = register(HVTransformerBlockEntity.class, "hv_transformer", TRContent.Machine.HV_TRANSFORMER); + public static final BlockEntityType AUTO_CRAFTING_TABLE = register(AutoCraftingTableBlockEntity.class, "auto_crafting_table", TRContent.Machine.AUTO_CRAFTING_TABLE); + public static final BlockEntityType IRON_FURNACE = register(IronFurnaceBlockEntity.class, "iron_furnace", TRContent.Machine.IRON_FURNACE); + public static final BlockEntityType SCRAPBOXINATOR = register(ScrapboxinatorBlockEntity.class, "scrapboxinator", TRContent.Machine.SCRAPBOXINATOR); + public static final BlockEntityType PLASMA_GENERATOR = register(PlasmaGeneratorBlockEntity.class, "plasma_generator", TRContent.Machine.PLASMA_GENERATOR); + public static final BlockEntityType LAMP = register(LampBlockEntity.class, "lamp", TRContent.Machine.LAMP_INCANDESCENT, TRContent.Machine.LAMP_LED); + public static final BlockEntityType ALARM = register(AlarmBlockEntity.class, "alarm", TRContent.Machine.ALARM); + public static final BlockEntityType FLUID_REPLICATOR = register(FluidReplicatorBlockEntity.class, "fluid_replicator", TRContent.Machine.FLUID_REPLICATOR); + + public static BlockEntityType register(Class tClass, String name, ItemConvertible... items) { + return register(tClass, name, Arrays.stream(items).map(itemConvertible -> Block.getBlockFromItem(itemConvertible.asItem())).toArray(Block[]::new)); + } + + public static BlockEntityType register(Class tClass, String name, Block... blocks) { + Validate.isTrue(blocks.length > 0, "no blocks for blockEntity entity type!"); + return register(new Identifier(TechReborn.MOD_ID, name).toString(), BlockEntityType.Builder.create(() -> createBlockEntity(tClass), blocks)); + } + + private static T createBlockEntity(Class tClass){ + try { + return tClass.newInstance(); + } catch (InstantiationException | IllegalAccessException e) { + throw new RuntimeException("Failed to createBlockEntity blockEntity", e); + } + } + + public static BlockEntityType register(String id, BlockEntityType.Builder builder) { + BlockEntityType blockEntityType = builder.build(null); + Registry.register(Registry.BLOCK_ENTITY, new Identifier(id), blockEntityType); + TRBlockEntities.TYPES.add(blockEntityType); + return blockEntityType; + } + +} diff --git a/src/main/java/techreborn/init/TRContent.java b/src/main/java/techreborn/init/TRContent.java index ff322d191..0eea3b50b 100644 --- a/src/main/java/techreborn/init/TRContent.java +++ b/src/main/java/techreborn/init/TRContent.java @@ -30,8 +30,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemConvertible; import net.minecraft.item.ItemStack; import reborncore.api.power.EnumPowerTier; -import reborncore.api.tile.IUpgrade; -import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.api.blockentity.IUpgrade; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; import reborncore.common.registration.RebornRegister; import reborncore.common.registration.config.ConfigRegistry; import techreborn.TechReborn; @@ -53,7 +53,7 @@ import techreborn.entities.EntityNukePrimed; import techreborn.items.DynamicCell; import techreborn.items.ItemUpgrade; import techreborn.utils.InitUtils; -import techreborn.tiles.storage.TileAdjustableSU; +import techreborn.blockentity.storage.AdjustableSUBlockEntity; import javax.annotation.Nullable; import java.util.Arrays; @@ -695,10 +695,10 @@ public class TRContent { public static double energyStoragePower = 40_000; public enum Upgrades implements ItemConvertible { - OVERCLOCKER((tile, handler, stack) -> { - TilePowerAcceptor powerAcceptor = null; - if (tile instanceof TilePowerAcceptor) { - powerAcceptor = (TilePowerAcceptor) tile; + OVERCLOCKER((blockEntity, handler, stack) -> { + PowerAcceptorBlockEntity powerAcceptor = null; + if (blockEntity instanceof PowerAcceptorBlockEntity) { + powerAcceptor = (PowerAcceptorBlockEntity) blockEntity; } handler.addSpeedMulti(overclockerSpeed); handler.addPowerMulti(overclockerPower); @@ -707,28 +707,28 @@ public class TRContent { powerAcceptor.extraPowerStorage += powerAcceptor.getBaseMaxPower(); } }), - TRANSFORMER((tile, handler, stack) -> { - TilePowerAcceptor powerAcceptor = null; - if (tile instanceof TilePowerAcceptor) { - powerAcceptor = (TilePowerAcceptor) tile; + TRANSFORMER((blockEntity, handler, stack) -> { + PowerAcceptorBlockEntity powerAcceptor = null; + if (blockEntity instanceof PowerAcceptorBlockEntity) { + powerAcceptor = (PowerAcceptorBlockEntity) blockEntity; } if (powerAcceptor != null) { powerAcceptor.extraTier += 1; } }), - ENERGY_STORAGE((tile, handler, stack) -> { - TilePowerAcceptor powerAcceptor = null; - if (tile instanceof TilePowerAcceptor) { - powerAcceptor = (TilePowerAcceptor) tile; + ENERGY_STORAGE((blockEntity, handler, stack) -> { + PowerAcceptorBlockEntity powerAcceptor = null; + if (blockEntity instanceof PowerAcceptorBlockEntity) { + powerAcceptor = (PowerAcceptorBlockEntity) blockEntity; } if (powerAcceptor != null) { powerAcceptor.extraPowerStorage += energyStoragePower; } }), - SUPERCONDUCTOR((tile, handler, stack) -> { - TileAdjustableSU aesu = null; - if (tile instanceof TileAdjustableSU) { - aesu = (TileAdjustableSU) tile; + SUPERCONDUCTOR((blockEntity, handler, stack) -> { + AdjustableSUBlockEntity aesu = null; + if (blockEntity instanceof AdjustableSUBlockEntity) { + aesu = (AdjustableSUBlockEntity) blockEntity; } if (aesu != null) { aesu.superconductors++; diff --git a/src/main/java/techreborn/init/TRTileEntities.java b/src/main/java/techreborn/init/TRTileEntities.java deleted file mode 100644 index 1fd86c796..000000000 --- a/src/main/java/techreborn/init/TRTileEntities.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * This file is part of TechReborn, licensed under the MIT License (MIT). - * - * Copyright (c) 2018 TechReborn - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package techreborn.init; - -import net.minecraft.block.Block; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.item.ItemConvertible; -import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; -import org.apache.commons.lang3.Validate; -import techreborn.TechReborn; -import techreborn.tiles.*; -import techreborn.tiles.cable.TileCable; -import techreborn.tiles.fusionReactor.TileFusionControlComputer; -import techreborn.tiles.generator.TileLightningRod; -import techreborn.tiles.generator.TilePlasmaGenerator; -import techreborn.tiles.generator.TileSolarPanel; -import techreborn.tiles.generator.advanced.*; -import techreborn.tiles.generator.basic.TileSolidFuelGenerator; -import techreborn.tiles.generator.basic.TileWaterMill; -import techreborn.tiles.generator.basic.TileWindMill; -import techreborn.tiles.lighting.TileLamp; -import techreborn.tiles.machine.iron.TileIronAlloyFurnace; -import techreborn.tiles.machine.iron.TileIronFurnace; -import techreborn.tiles.machine.multiblock.*; -import techreborn.tiles.machine.tier1.*; -import techreborn.tiles.machine.tier3.*; -import techreborn.tiles.storage.TileAdjustableSU; -import techreborn.tiles.storage.TileHighVoltageSU; -import techreborn.tiles.storage.TileLowVoltageSU; -import techreborn.tiles.storage.TileMediumVoltageSU; -import techreborn.tiles.storage.idsu.TileInterdimensionalSU; -import techreborn.tiles.storage.lesu.TileLSUStorage; -import techreborn.tiles.storage.lesu.TileLapotronicSU; -import techreborn.tiles.transformers.TileHVTransformer; -import techreborn.tiles.transformers.TileLVTransformer; -import techreborn.tiles.transformers.TileMVTransformer; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class TRTileEntities { - - public static List> TYPES = new ArrayList<>(); - - public static final BlockEntityType THERMAL_GEN = register(TileThermalGenerator.class, "thermal_generator", TRContent.Machine.THERMAL_GENERATOR); - public static final BlockEntityType QUANTUM_TANK = register(TileQuantumTank.class, "quantum_tank", TRContent.Machine.QUANTUM_TANK); - public static final BlockEntityType QUANTUM_CHEST = register(TileQuantumChest.class, "quantum_chest", TRContent.Machine.QUANTUM_CHEST); - public static final BlockEntityType DIGITAL_CHEST = register(TileDigitalChest.class, "digital_chest", TRContent.Machine.DIGITAL_CHEST); - public static final BlockEntityType INDUSTRIAL_CENTRIFUGE = register(TileIndustrialCentrifuge.class, "industrial_centrifuge", TRContent.Machine.INDUSTRIAL_CENTRIFUGE); - public static final BlockEntityType ROLLING_MACHINE = register(TileRollingMachine.class, "rolling_machine", TRContent.Machine.ROLLING_MACHINE); - public static final BlockEntityType INDUSTRIAL_BLAST_FURNACE = register(TileIndustrialBlastFurnace.class, "industrial_blast_furnace", TRContent.Machine.INDUSTRIAL_BLAST_FURNACE); - public static final BlockEntityType ALLOY_SMELTER = register(TileAlloySmelter.class, "alloy_smelter", TRContent.Machine.ALLOY_SMELTER); - public static final BlockEntityType INDUSTRIAL_GRINDER = register(TileIndustrialGrinder.class, "industrial_grinder", TRContent.Machine.INDUSTRIAL_GRINDER); - public static final BlockEntityType IMPLOSION_COMPRESSOR = register(TileImplosionCompressor.class, "implosion_compressor", TRContent.Machine.IMPLOSION_COMPRESSOR); - public static final BlockEntityType MATTER_FABRICATOR = register(TileMatterFabricator.class, "matter_fabricator", TRContent.Machine.MATTER_FABRICATOR); - public static final BlockEntityType CHUNK_LOADER = register(TileChunkLoader.class, "chunk_loader", TRContent.Machine.CHUNK_LOADER); - public static final BlockEntityType CHARGE_O_MAT = register(TileChargeOMat.class, "charge_o_mat", TRContent.Machine.CHARGE_O_MAT); - public static final BlockEntityType PLAYER_DETECTOR = register(TilePlayerDectector.class, "player_detector", TRContent.Machine.PLAYER_DETECTOR); - public static final BlockEntityType CABLE = register(TileCable.class, "cable", TRContent.Cables.values()); - public static final BlockEntityType MACHINE_CASINGS = register(TileMachineCasing.class, "machine_casing", TRContent.MachineBlocks.getCasings()); - public static final BlockEntityType DRAGON_EGG_SYPHON = register(TileDragonEggSyphon.class, "dragon_egg_syphon", TRContent.Machine.DRAGON_EGG_SYPHON); - public static final BlockEntityType ASSEMBLY_MACHINE = register(TileAssemblingMachine.class, "assembly_machine", TRContent.Machine.ASSEMBLY_MACHINE); - public static final BlockEntityType DIESEL_GENERATOR = register(TileDieselGenerator.class, "diesel_generator", TRContent.Machine.DIESEL_GENERATOR); - public static final BlockEntityType INDUSTRIAL_ELECTROLYZER = register(TileIndustrialElectrolyzer.class, "industrial_electrolyzer", TRContent.Machine.INDUSTRIAL_ELECTROLYZER); - public static final BlockEntityType SEMI_FLUID_GENERATOR = register(TileSemiFluidGenerator.class, "semi_fluid_generator", TRContent.Machine.SEMI_FLUID_GENERATOR); - public static final BlockEntityType GAS_TURBINE = register(TileGasTurbine.class, "gas_turbine", TRContent.Machine.GAS_TURBINE); - public static final BlockEntityType IRON_ALLOY_FURNACE = register(TileIronAlloyFurnace.class, "iron_alloy_furnace", TRContent.Machine.IRON_ALLOY_FURNACE); - public static final BlockEntityType CHEMICAL_REACTOR = register(TileChemicalReactor.class, "chemical_reactor", TRContent.Machine.CHEMICAL_REACTOR); - public static final BlockEntityType INTERDIMENSIONAL_SU = register(TileInterdimensionalSU.class, "interdimensional_su", TRContent.Machine.INTERDIMENSIONAL_SU); - public static final BlockEntityType ADJUSTABLE_SU = register(TileAdjustableSU.class, "adjustable_su", TRContent.Machine.ADJUSTABLE_SU); - public static final BlockEntityType LAPOTRONIC_SU = register(TileLapotronicSU.class, "lapotronic_su", TRContent.Machine.LAPOTRONIC_SU); - public static final BlockEntityType LSU_STORAGE = register(TileLSUStorage.class, "lsu_storage", TRContent.Machine.LSU_STORAGE); - public static final BlockEntityType DISTILLATION_TOWER = register(TileDistillationTower.class, "distillation_tower", TRContent.Machine.DISTILLATION_TOWER); - public static final BlockEntityType VACUUM_FREEZER = register(TileVacuumFreezer.class, "vacuum_freezer", TRContent.Machine.VACUUM_FREEZER); - public static final BlockEntityType FUSION_CONTROL_COMPUTER = register(TileFusionControlComputer.class, "fusion_control_computer", TRContent.Machine.FUSION_CONTROL_COMPUTER); - public static final BlockEntityType LIGHTNING_ROD = register(TileLightningRod.class, "lightning_rod", TRContent.Machine.LIGHTNING_ROD); - public static final BlockEntityType INDUSTRIAL_SAWMILL = register(TileIndustrialSawmill.class, "industrial_sawmill", TRContent.Machine.INDUSTRIAL_SAWMILL); - public static final BlockEntityType GRINDER = register(TileGrinder.class, "grinder", TRContent.Machine.GRINDER); - public static final BlockEntityType SOLID_FUEL_GENEREATOR = register(TileSolidFuelGenerator.class, "solid_fuel_generator", TRContent.Machine.SOLID_FUEL_GENERATOR); - public static final BlockEntityType EXTRACTOR = register(TileExtractor.class, "extractor", TRContent.Machine.EXTRACTOR); - public static final BlockEntityType COMPRESSOR = register(TileCompressor.class, "compressor", TRContent.Machine.COMPRESSOR); - public static final BlockEntityType ELECTRIC_FURNACE = register(TileElectricFurnace.class, "electric_furnace", TRContent.Machine.ELECTRIC_FURNACE); - public static final BlockEntityType SOLAR_PANEL = register(TileSolarPanel.class, "solar_panel", TRContent.SolarPanels.values()); - public static final BlockEntityType CREATIVE_QUANTUM_TANK = register(TileCreativeQuantumTank.class, "creative_quantum_tank", TRContent.Machine.CREATIVE_QUANTUM_TANK); - public static final BlockEntityType CREATIVE_QUANTUM_CHEST = register(TileCreativeQuantumChest.class, "creative_quantum_chest", TRContent.Machine.CREATIVE_QUANTUM_CHEST); - public static final BlockEntityType WATER_MILL = register(TileWaterMill.class, "water_mill", TRContent.Machine.WATER_MILL); - public static final BlockEntityType WIND_MILL = register(TileWindMill.class, "wind_mill", TRContent.Machine.WIND_MILL); - public static final BlockEntityType RECYCLER = register(TileRecycler.class, "recycler", TRContent.Machine.RECYCLER); - public static final BlockEntityType LOW_VOLTAGE_SU = register(TileLowVoltageSU.class, "low_voltage_su", TRContent.Machine.LOW_VOLTAGE_SU); - public static final BlockEntityType MEDIUM_VOLTAGE_SU = register(TileMediumVoltageSU.class, "medium_voltage_su", TRContent.Machine.MEDIUM_VOLTAGE_SU); - public static final BlockEntityType HIGH_VOLTAGE_SU = register(TileHighVoltageSU.class, "high_voltage_su", TRContent.Machine.HIGH_VOLTAGE_SU); - public static final BlockEntityType LV_TRANSFORMER = register(TileLVTransformer.class, "lv_transformer", TRContent.Machine.LV_TRANSFORMER); - public static final BlockEntityType MV_TRANSFORMER = register(TileMVTransformer.class, "mv_transformer", TRContent.Machine.MV_TRANSFORMER); - public static final BlockEntityType HV_TRANSFORMER = register(TileHVTransformer.class, "hv_transformer", TRContent.Machine.HV_TRANSFORMER); - public static final BlockEntityType AUTO_CRAFTING_TABLE = register(TileAutoCraftingTable.class, "auto_crafting_table", TRContent.Machine.AUTO_CRAFTING_TABLE); - public static final BlockEntityType IRON_FURNACE = register(TileIronFurnace.class, "iron_furnace", TRContent.Machine.IRON_FURNACE); - public static final BlockEntityType SCRAPBOXINATOR = register(TileScrapboxinator.class, "scrapboxinator", TRContent.Machine.SCRAPBOXINATOR); - public static final BlockEntityType PLASMA_GENERATOR = register(TilePlasmaGenerator.class, "plasma_generator", TRContent.Machine.PLASMA_GENERATOR); - public static final BlockEntityType LAMP = register(TileLamp.class, "lamp", TRContent.Machine.LAMP_INCANDESCENT, TRContent.Machine.LAMP_LED); - public static final BlockEntityType ALARM = register(TileAlarm.class, "alarm", TRContent.Machine.ALARM); - public static final BlockEntityType FLUID_REPLICATOR = register(TileFluidReplicator.class, "fluid_replicator", TRContent.Machine.FLUID_REPLICATOR); - - public static BlockEntityType register(Class tClass, String name, ItemConvertible... items) { - return register(tClass, name, Arrays.stream(items).map(itemConvertible -> Block.getBlockFromItem(itemConvertible.asItem())).toArray(Block[]::new)); - } - - public static BlockEntityType register(Class tClass, String name, Block... blocks) { - Validate.isTrue(blocks.length > 0, "no blocks for tile entity type!"); - return register(new Identifier(TechReborn.MOD_ID, name).toString(), BlockEntityType.Builder.create(() -> createBlockEntity(tClass), blocks)); - } - - private static T createBlockEntity(Class tClass){ - try { - return tClass.newInstance(); - } catch (InstantiationException | IllegalAccessException e) { - throw new RuntimeException("Failed to createBlockEntity tile", e); - } - } - - public static BlockEntityType register(String id, BlockEntityType.Builder builder) { - BlockEntityType tileEntityType = builder.build(null); - Registry.register(Registry.BLOCK_ENTITY, new Identifier(id), tileEntityType); - TRTileEntities.TYPES.add(tileEntityType); - return tileEntityType; - } - -} diff --git a/src/main/java/techreborn/items/ItemUpgrade.java b/src/main/java/techreborn/items/ItemUpgrade.java index 54c967236..828f3cd0b 100644 --- a/src/main/java/techreborn/items/ItemUpgrade.java +++ b/src/main/java/techreborn/items/ItemUpgrade.java @@ -26,9 +26,9 @@ package techreborn.items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import reborncore.api.tile.IUpgrade; +import reborncore.api.blockentity.IUpgrade; import reborncore.common.recipes.IUpgradeHandler; -import reborncore.common.tile.TileMachineBase; +import reborncore.common.blockentity.MachineBaseBlockEntity; import techreborn.TechReborn; import javax.annotation.Nonnull; @@ -47,12 +47,11 @@ public class ItemUpgrade extends Item implements IUpgrade { @Override public void process( - @Nonnull - TileMachineBase tile, + @Nonnull MachineBaseBlockEntity blockEntity, @Nullable IUpgradeHandler handler, @Nonnull ItemStack stack) { - behavior.process(tile, handler, stack); + behavior.process(blockEntity, handler, stack); } } diff --git a/src/main/java/techreborn/items/tool/ItemDebugTool.java b/src/main/java/techreborn/items/tool/ItemDebugTool.java index 30c1a8672..d5feb5d3e 100644 --- a/src/main/java/techreborn/items/tool/ItemDebugTool.java +++ b/src/main/java/techreborn/items/tool/ItemDebugTool.java @@ -36,7 +36,7 @@ import net.minecraft.util.ActionResult; import net.minecraft.util.Formatting; import net.minecraft.util.SystemUtil; import net.minecraft.util.registry.Registry; -import reborncore.api.power.IEnergyInterfaceTile; +import reborncore.api.power.EnergyBlockEntity; import reborncore.common.powerSystem.PowerSystem; import techreborn.TechReborn; @@ -62,11 +62,11 @@ public class ItemDebugTool extends Item { for (Entry, Comparable> entry : blockState.getEntries().entrySet()) { sendMessage(context, new LiteralText(getPropertyString(entry))); } - BlockEntity tile = context.getWorld().getBlockEntity(context.getBlockPos()); - if (tile != null) { - sendMessage(context, new LiteralText(getTileEntityType(tile))); - if (tile instanceof IEnergyInterfaceTile) { - sendMessage(context, new LiteralText(getRCPower((IEnergyInterfaceTile) tile))); + BlockEntity blockEntity = context.getWorld().getBlockEntity(context.getBlockPos()); + if (blockEntity != null) { + sendMessage(context, new LiteralText(getBlockEntityType(blockEntity))); + if (blockEntity instanceof EnergyBlockEntity) { + sendMessage(context, new LiteralText(getRCPower((EnergyBlockEntity) blockEntity))); } } return ActionResult.SUCCESS; @@ -100,22 +100,22 @@ public class ItemDebugTool extends Item { return s; } - private String getTileEntityType(BlockEntity tile) { + private String getBlockEntityType(BlockEntity blockEntity) { String s = "" + Formatting.GREEN; s += "Tile Entity: "; s += Formatting.BLUE; - s += tile.getType().toString(); + s += blockEntity.getType().toString(); return s; } - private String getRCPower(IEnergyInterfaceTile tile) { + private String getRCPower(EnergyBlockEntity blockEntity) { String s = "" + Formatting.GREEN; s += "Power: "; s += Formatting.BLUE; - s += PowerSystem.getLocaliszedPower(tile.getEnergy()); + s += PowerSystem.getLocaliszedPower(blockEntity.getEnergy()); s += "/"; - s += PowerSystem.getLocaliszedPower(tile.getMaxPower()); + s += PowerSystem.getLocaliszedPower(blockEntity.getMaxPower()); return s; } diff --git a/src/main/java/techreborn/multiblocks/MultiBlockCasing.java b/src/main/java/techreborn/multiblocks/MultiBlockCasing.java index d35db24bf..7d25663f9 100644 --- a/src/main/java/techreborn/multiblocks/MultiBlockCasing.java +++ b/src/main/java/techreborn/multiblocks/MultiBlockCasing.java @@ -34,7 +34,7 @@ import reborncore.common.multiblock.IMultiblockPart; import reborncore.common.multiblock.MultiblockControllerBase; import reborncore.common.multiblock.MultiblockValidationException; import reborncore.common.multiblock.rectangular.RectangularMultiblockControllerBase; -import reborncore.common.multiblock.rectangular.RectangularMultiblockTileEntityBase; +import reborncore.common.multiblock.rectangular.RectangularMultiblockBlockEntityBase; import techreborn.blocks.BlockMachineCasing; public class MultiBlockCasing extends RectangularMultiblockControllerBase { @@ -124,7 +124,7 @@ public class MultiBlockCasing extends RectangularMultiblockControllerBase { // Now we run a simple check on each block within that volume. // Any block deviating = NO DEAL SIR BlockEntity te; - RectangularMultiblockTileEntityBase part; + RectangularMultiblockBlockEntityBase part; Class myClass = this.getClass(); for (int x = minimumCoord.getX(); x <= maximumCoord.getX(); x++) { @@ -133,8 +133,8 @@ public class MultiBlockCasing extends RectangularMultiblockControllerBase { // Okay, figure out what sort of block this should be. te = this.worldObj.getBlockEntity(new BlockPos(x, y, z)); - if (te instanceof RectangularMultiblockTileEntityBase) { - part = (RectangularMultiblockTileEntityBase) te; + if (te instanceof RectangularMultiblockBlockEntityBase) { + part = (RectangularMultiblockBlockEntityBase) te; // Ensure this part should actually be allowed within a // cube of this controller's type @@ -326,7 +326,7 @@ public class MultiBlockCasing extends RectangularMultiblockControllerBase { Block block = state.getBlock(); if (state.isAir()) { - } else if (block.getTranslationKey().equals("tile.lava")) { + } else if (block.getTranslationKey().equals("blockEntity.lava")) { hasLava = true; } else { super.isBlockGoodForInterior(world, x, y, z); diff --git a/src/main/java/techreborn/packets/ServerboundPackets.java b/src/main/java/techreborn/packets/ServerboundPackets.java index 3ba6e5bd3..488aa33fc 100644 --- a/src/main/java/techreborn/packets/ServerboundPackets.java +++ b/src/main/java/techreborn/packets/ServerboundPackets.java @@ -37,11 +37,11 @@ import reborncore.common.network.NetworkManager; import reborncore.common.network.NetworkPacket; import techreborn.init.TRContent; import techreborn.items.ItemManual; -import techreborn.tiles.fusionReactor.TileFusionControlComputer; -import techreborn.tiles.machine.tier1.TileAutoCraftingTable; -import techreborn.tiles.machine.tier1.TileRollingMachine; -import techreborn.tiles.storage.TileAdjustableSU; -import techreborn.tiles.storage.idsu.TileInterdimensionalSU; +import techreborn.blockentity.fusionReactor.FusionControlComputerBlockEntity; +import techreborn.blockentity.machine.tier1.AutoCraftingTableBlockEntity; +import techreborn.blockentity.machine.tier1.RollingMachineBlockEntity; +import techreborn.blockentity.storage.AdjustableSUBlockEntity; +import techreborn.blockentity.storage.idsu.InterdimensionalSUBlockEntity; import java.util.function.BiConsumer; @@ -59,9 +59,9 @@ public class ServerboundPackets { BlockPos pos = extendedPacketBuffer.readBlockPos(); int buttonID = extendedPacketBuffer.readInt(); context.getTaskQueue().execute(() -> { - BlockEntity tile = context.getPlayer().world.getBlockEntity(pos); - if (tile instanceof TileAdjustableSU) { - ((TileAdjustableSU) tile).handleGuiInputFromClient(buttonID, false, false); + BlockEntity blockEntity = context.getPlayer().world.getBlockEntity(pos); + if (blockEntity instanceof AdjustableSUBlockEntity) { + ((AdjustableSUBlockEntity) blockEntity).handleGuiInputFromClient(buttonID, false, false); } }); }); @@ -71,8 +71,8 @@ public class ServerboundPackets { boolean locked = extendedPacketBuffer.readBoolean(); context.getTaskQueue().execute(() -> { BlockEntity BlockEntity = context.getPlayer().world.getBlockEntity(machinePos); - if (BlockEntity instanceof TileAutoCraftingTable) { - ((TileAutoCraftingTable) BlockEntity).locked = locked; + if (BlockEntity instanceof AutoCraftingTableBlockEntity) { + ((AutoCraftingTableBlockEntity) BlockEntity).locked = locked; } }); }); @@ -81,9 +81,9 @@ public class ServerboundPackets { int sizeDelta = extendedPacketBuffer.readInt(); BlockPos pos = extendedPacketBuffer.readBlockPos(); context.getTaskQueue().execute(() -> { - BlockEntity tile = context.getPlayer().world.getBlockEntity(pos); - if (tile instanceof TileFusionControlComputer) { - ((TileFusionControlComputer) tile).changeSize(sizeDelta); + BlockEntity blockEntity = context.getPlayer().world.getBlockEntity(pos); + if (blockEntity instanceof FusionControlComputerBlockEntity) { + ((FusionControlComputerBlockEntity) blockEntity).changeSize(sizeDelta); } }); }); @@ -104,8 +104,8 @@ public class ServerboundPackets { boolean locked = extendedPacketBuffer.readBoolean(); context.getTaskQueue().execute(() -> { BlockEntity BlockEntity = context.getPlayer().world.getBlockEntity(machinePos); - if (BlockEntity instanceof TileRollingMachine) { - ((TileRollingMachine) BlockEntity).locked = locked; + if (BlockEntity instanceof RollingMachineBlockEntity) { + ((RollingMachineBlockEntity) BlockEntity).locked = locked; } }); }); @@ -135,14 +135,14 @@ public class ServerboundPackets { ServerSidePacketRegistry.INSTANCE.register(identifier, (packetContext, packetByteBuf) -> consumer.accept(new ExtendedPacketBuffer(packetByteBuf), packetContext)); } - public static NetworkPacket createPacketAesu(int buttonID, TileAdjustableSU tile) { + public static NetworkPacket createPacketAesu(int buttonID, AdjustableSUBlockEntity blockEntity) { return NetworkManager.createPacket(AESU, extendedPacketBuffer -> { - extendedPacketBuffer.writeBlockPos(tile.getPos()); + extendedPacketBuffer.writeBlockPos(blockEntity.getPos()); extendedPacketBuffer.writeInt(buttonID); }); } - public static NetworkPacket createPacketAutoCraftingTableLock(TileAutoCraftingTable machine, boolean locked) { + public static NetworkPacket createPacketAutoCraftingTableLock(AutoCraftingTableBlockEntity machine, boolean locked) { return NetworkManager.createPacket(AUTO_CRAFTING_LOCK, extendedPacketBuffer -> { extendedPacketBuffer.writeBlockPos(machine.getPos()); extendedPacketBuffer.writeBoolean(locked); @@ -156,14 +156,14 @@ public class ServerboundPackets { }); } - public static NetworkPacket createPacketIdsu(int buttonID, TileInterdimensionalSU tile) { + public static NetworkPacket createPacketIdsu(int buttonID, InterdimensionalSUBlockEntity blockEntity) { return NetworkManager.createPacket(IDSU, extendedPacketBuffer -> { - extendedPacketBuffer.writeBlockPos(tile.getPos()); + extendedPacketBuffer.writeBlockPos(blockEntity.getPos()); extendedPacketBuffer.writeInt(buttonID); }); } - public static NetworkPacket createPacketRollingMachineLock(TileRollingMachine machine, boolean locked) { + public static NetworkPacket createPacketRollingMachineLock(RollingMachineBlockEntity machine, boolean locked) { return NetworkManager.createPacket(ROLLING_MACHINE_LOCK, extendedPacketBuffer -> { extendedPacketBuffer.writeBlockPos(machine.getPos()); extendedPacketBuffer.writeBoolean(locked); diff --git a/src/main/java/techreborn/proxies/ClientProxy.java b/src/main/java/techreborn/proxies/ClientProxy.java index f70b05c80..33bfacaac 100644 --- a/src/main/java/techreborn/proxies/ClientProxy.java +++ b/src/main/java/techreborn/proxies/ClientProxy.java @@ -27,7 +27,7 @@ package techreborn.proxies; import net.minecraft.util.Formatting; import net.minecraft.client.MinecraftClient; import net.minecraft.item.ItemStack; -import reborncore.api.tile.IUpgradeable; +import reborncore.api.blockentity.IUpgradeable; import reborncore.client.gui.builder.GuiBase; import reborncore.client.hud.StackInfoHUD; import techreborn.init.TRContent; @@ -64,8 +64,8 @@ public class ClientProxy extends CommonProxy { public String getUpgradeConfigText() { if (MinecraftClient.getInstance().currentScreen instanceof GuiBase) { GuiBase base = (GuiBase) MinecraftClient.getInstance().currentScreen; - if (base.tile instanceof IUpgradeable) { - if (((IUpgradeable) base.tile).canBeUpgraded()) { + if (base.blockEntity instanceof IUpgradeable) { + if (((IUpgradeable) base.blockEntity).canBeUpgraded()) { return Formatting.LIGHT_PURPLE + "Right click to configure"; } } diff --git a/src/main/java/techreborn/utils/BehaviorDispenseScrapbox.java b/src/main/java/techreborn/utils/BehaviorDispenseScrapbox.java index b41afccb1..230d2548e 100644 --- a/src/main/java/techreborn/utils/BehaviorDispenseScrapbox.java +++ b/src/main/java/techreborn/utils/BehaviorDispenseScrapbox.java @@ -55,8 +55,8 @@ public class BehaviorDispenseScrapbox extends ItemDispenserBehavior { ItemStack out = scrapboxRecipeList.get(random).getOutputs().get(0); stack.split(1); - DispenserBlockEntity tile = source.getBlockEntity(); - Direction enumfacing = tile.getWorld().getBlockState(new BlockPos(source.getX(), source.getY(), source.getZ())).get(DispenserBlock.FACING); + DispenserBlockEntity blockEntity = source.getBlockEntity(); + Direction enumfacing = blockEntity.getWorld().getBlockState(new BlockPos(source.getX(), source.getY(), source.getZ())).get(DispenserBlock.FACING); Position iposition = DispenserBlock.getOutputLocation(source); spawnItem(source.getWorld(), out, 6, enumfacing, iposition); } diff --git a/src/main/resources/techreborn_annotations.json b/src/main/resources/techreborn_annotations.json index a4b80f0ba..36773d5dc 100644 --- a/src/main/resources/techreborn_annotations.json +++ b/src/main/resources/techreborn_annotations.json @@ -1,7 +1,7 @@ { "classes": { - "techreborn/tiles/generator/basic/TileWindMill": { - "className": "techreborn/tiles/generator/basic/TileWindMill", + "techreborn/blockentity/generator/LightningRodBlockEntity": { + "className": "techreborn/blockentity/generator/LightningRodBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -24,11 +24,11 @@ "config", "generators", "category", - "wind_mill", + "lightning_rod", "key", - "WindMillMaxOutput", + "LightningRodMaxOutput", "comment", - "Wind Mill Max Output (Value in EU)" + "Lightning Rod Max Output (Value in EU)" ], "api": 458752 } @@ -45,11 +45,11 @@ "config", "generators", "category", - "wind_mill", + "lightning_rod", "key", - "WindMillMaxEnergy", + "LightningRodMaxEnergy", "comment", - "Wind Mill Max Energy (Value in EU)" + "Lightning Rod Max Energy (Value in EU)" ], "api": 458752 } @@ -57,7 +57,7 @@ }, { "access": 9, - "name": "baseEnergy", + "name": "chanceOfStrike", "desc": "I", "annotations": [ { @@ -66,11 +66,11 @@ "config", "generators", "category", - "wind_mill", + "lightning_rod", "key", - "WindMillEnergyPerTick", + "LightningRodChanceOfStrike", "comment", - "Wind Mill Energy Per Tick (Value in EU)" + "Chance of lightning striking a rod (Range: 0-70)" ], "api": 458752 } @@ -78,7 +78,64 @@ }, { "access": 9, - "name": "thunderMultiplier", + "name": "baseEnergyStrike", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "lightning_rod", + "key", + "LightningRodBaseStrikeEnergy", + "comment", + "Base amount of energy per strike (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/generator/PlasmaGeneratorBlockEntity": { + "className": "techreborn/blockentity/generator/PlasmaGeneratorBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxOutput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "plasma_generator", + "key", + "PlasmaGeneratorMaxOutput", + "comment", + "Plasma Generator Max Output (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", "desc": "D", "annotations": [ { @@ -87,84 +144,11 @@ "config", "generators", "category", - "wind_mill", + "plasma_generator", "key", - "WindMillThunderMultiplier", + "PlasmaGeneratorMaxEnergy", "comment", - "Wind Mill Thunder Multiplier" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/generator/TileBaseFluidGenerator": { - "className": "techreborn/tiles/generator/TileBaseFluidGenerator", - "methods": [ - { - "access": 1, - "name": "getTank", - "desc": "()Lreborncore/common/util/Tank;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/generator/advanced/TileGasTurbine": { - "className": "techreborn/tiles/generator/advanced/TileGasTurbine", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxOutput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "gas_generator", - "key", - "GasGeneratorMaxOutput", - "comment", - "Gas Generator Max Output (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "gas_generator", - "key", - "GasGeneratorMaxEnergy", - "comment", - "Gas Generator Max Energy (Value in EU)" + "Plasma Generator Max Energy (Value in EU)" ], "api": 458752 } @@ -181,11 +165,11 @@ "config", "generators", "category", - "gas_generator", + "plasma_generator", "key", - "GasGeneratorTankCapacity", + "PlasmaGeneratorTankCapacity", "comment", - "Gas Generator Tank Capacity" + "Plasma Generator Tank Capacity" ], "api": 458752 } @@ -202,11 +186,11 @@ "config", "generators", "category", - "gas_generator", + "plasma_generator", "key", - "GasGeneratorEnergyPerTick", + "PlasmaGeneratorEnergyPerTick", "comment", - "Gas Generator Energy Per Tick (Value in EU)" + "Plasma Generator Energy Per Tick (Value in EU)" ], "api": 458752 } @@ -214,8 +198,8 @@ } ] }, - "techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace": { - "className": "techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace", + "techreborn/blockentity/machine/tier1/AlloySmelterBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/AlloySmelterBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -238,11 +222,11 @@ "config", "machines", "category", - "industrial_furnace", + "alloy_smelter", "key", - "IndustrialFurnaceMaxInput", + "AlloySmelterMaxInput", "comment", - "Industrial Blast Furnace Max Input (Value in EU)" + "Alloy Smelter Max Input (Value in EU)" ], "api": 458752 } @@ -259,11 +243,11 @@ "config", "machines", "category", - "industrial_furnace", + "alloy_smelter", "key", - "IndustrialFurnaceMaxEnergy", + "AlloySmelterMaxEnergy", "comment", - "Industrial Blast Furnace Max Energy (Value in EU)" + "Alloy Smelter Max Energy (Value in EU)" ], "api": 458752 } @@ -271,8 +255,8 @@ } ] }, - "techreborn/tiles/storage/idsu/TileInterdimensionalSU": { - "className": "techreborn/tiles/storage/idsu/TileInterdimensionalSU", + "techreborn/blockentity/IndustrialCentrifugeBlockEntity": { + "className": "techreborn/blockentity/IndustrialCentrifugeBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -295,32 +279,11 @@ "config", "machines", "category", - "idsu", + "centrifuge", "key", - "IdsuMaxInput", + "CentrifugeMaxInput", "comment", - "IDSU Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxOutput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "idsu", - "key", - "IdsuMaxOutput", - "comment", - "IDSU Max Output (Value in EU)" + "Centrifuge Max Input (Value in EU)" ], "api": 458752 } @@ -337,11 +300,68 @@ "config", "machines", "category", - "idsu", + "centrifuge", "key", - "IdsuMaxEnergy", + "CentrifugeMaxEnergy", "comment", - "IDSU Max Energy (Value in EU)" + "Centrifuge Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/tier1/ScrapboxinatorBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/ScrapboxinatorBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "scrapboxinator", + "key", + "ScrapboxinatorMaxInput", + "comment", + "Scrapboxinator Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "scrapboxinator", + "key", + "ScrapboxinatorMaxEnergy", + "comment", + "Scrapboxinator Max Energy (Value in EU)" ], "api": 458752 } @@ -362,63 +382,6 @@ } ] }, - "techreborn/tiles/machine/tier1/TileExtractor": { - "className": "techreborn/tiles/machine/tier1/TileExtractor", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "extractor", - "key", - "ExtractorInput", - "comment", - "Extractor Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "extractor", - "key", - "ExtractorMaxEnergy", - "comment", - "Extractor Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, "techreborn/entities/EntityNukePrimed": { "className": "techreborn/entities/EntityNukePrimed", "annotations": [ @@ -764,6 +727,162 @@ } ] }, + "techreborn/blockentity/machine/tier1/GrinderBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/GrinderBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "grinder", + "key", + "GrinderInput", + "comment", + "Grinder Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "grinder", + "key", + "GrinderMaxEnergy", + "comment", + "Grinder Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/generator/advanced/DieselGeneratorBlockEntity": { + "className": "techreborn/blockentity/generator/advanced/DieselGeneratorBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxOutput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "diesel_generator", + "key", + "DieselGeneratorMaxOutput", + "comment", + "Diesel Generator Max Output (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "diesel_generator", + "key", + "DieselGeneratorMaxEnergy", + "comment", + "Diesel Generator Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "tankCapacity", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "diesel_generator", + "key", + "DieselGeneratorTankCapacity", + "comment", + "Diesel Generator Tank Capacity" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "energyPerTick", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "diesel_generator", + "key", + "DieselGeneratorEnergyPerTick", + "comment", + "Diesel Generator Energy Per Tick (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, "techreborn/init/recipes/RecipeMethods": { "className": "techreborn/init/recipes/RecipeMethods", "methods": [ @@ -813,8 +932,255 @@ } ] }, - "techreborn/tiles/generator/basic/TileSolidFuelGenerator": { - "className": "techreborn/tiles/generator/basic/TileSolidFuelGenerator", + "techreborn/blockentity/generator/advanced/ThermalGeneratorBlockEntity": { + "className": "techreborn/blockentity/generator/advanced/ThermalGeneratorBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxOutput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "thermal_generator", + "key", + "ThermalGeneratorMaxOutput", + "comment", + "Thermal Generator Max Output (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "thermal_generator", + "key", + "ThermalGeneratorMaxEnergy", + "comment", + "Thermal Generator Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "tankCapacity", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "thermal_generator", + "key", + "ThermalGeneratorTankCapacity", + "comment", + "Thermal Generator Tank Capacity" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "energyPerTick", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "thermal_generator", + "key", + "ThermalGeneratorEnergyPerTick", + "comment", + "Thermal Generator Energy Per Tick (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "methods": [ + { + "access": 1, + "name": "getIRecipe", + "desc": "()Lnet/minecraft/class_1860;", + "annotations": [ + { + "desc": "Ljavax/annotation/Nullable;", + "api": 458752 + } + ] + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "autocrafter", + "key", + "AutoCrafterInput", + "comment", + "AutoCrafting Table Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "autocrafter", + "key", + "AutoCrafterMaxEnergy", + "comment", + "AutoCrafting Table Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/storage/idsu/InterdimensionalSUBlockEntity": { + "className": "techreborn/blockentity/storage/idsu/InterdimensionalSUBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "idsu", + "key", + "IdsuMaxInput", + "comment", + "IDSU Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxOutput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "idsu", + "key", + "IdsuMaxOutput", + "comment", + "IDSU Max Output (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "idsu", + "key", + "IdsuMaxEnergy", + "comment", + "IDSU Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/generator/basic/SolidFuelGeneratorBlockEntity": { + "className": "techreborn/blockentity/generator/basic/SolidFuelGeneratorBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -891,8 +1257,289 @@ } ] }, - "techreborn/tiles/generator/advanced/TileSemiFluidGenerator": { - "className": "techreborn/tiles/generator/advanced/TileSemiFluidGenerator", + "techreborn/blockentity/DigitalChestBlockEntity": { + "className": "techreborn/blockentity/DigitalChestBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxStorage", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "digital_chest", + "key", + "DigitalChestMaxStorage", + "comment", + "Maximum amount of items a Digital Chest can store" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/generator/advanced/DragonEggSyphonBlockEntity": { + "className": "techreborn/blockentity/generator/advanced/DragonEggSyphonBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxOutput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "dragon_egg_siphoner", + "key", + "DragonEggSiphonerMaxOutput", + "comment", + "Dragon Egg Siphoner Max Output (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "dragon_egg_siphoner", + "key", + "DragonEggSiphonerMaxEnergy", + "comment", + "Dragon Egg Siphoner Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "energyPerTick", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "generators", + "category", + "dragon_egg_siphoner", + "key", + "DragonEggSiphonerEnergyPerTick", + "comment", + "Dragon Egg Siphoner Energy Per Tick (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/tier1/AssemblingMachineBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/AssemblingMachineBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "assembling_machine", + "key", + "AssemblingMachineMaxInput", + "comment", + "Assembling Machine Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "assembling_machine", + "key", + "AssemblingMachineMaxEnergy", + "comment", + "Assembling Machine Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/tier1/RollingMachineBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/RollingMachineBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "rolling_machine", + "key", + "RollingMachineMaxInput", + "comment", + "Rolling Machine Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "energyPerTick", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "rolling_machine", + "key", + "RollingMachineEnergyPerTick", + "comment", + "Rolling Machine Energy Per Tick (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "runTime", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "rolling_machine", + "key", + "RollingMachineEnergyRunTime", + "comment", + "Rolling Machine Run Time" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "rolling_machine", + "key", + "RollingMachineMaxEnergy", + "comment", + "Rolling Machine Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 1, + "name": "currentRecipeOutput", + "desc": "Lnet/minecraft/class_1799;", + "annotations": [ + { + "desc": "Ljavax/annotation/Nonnull;", + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity": { + "className": "techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -990,120 +1637,6 @@ } ] }, - "techreborn/tiles/machine/tier1/TileAssemblingMachine": { - "className": "techreborn/tiles/machine/tier1/TileAssemblingMachine", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "assembling_machine", - "key", - "AssemblingMachineMaxInput", - "comment", - "Assembling Machine Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "assembling_machine", - "key", - "AssemblingMachineMaxEnergy", - "comment", - "Assembling Machine Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/tier1/TileElectricFurnace": { - "className": "techreborn/tiles/machine/tier1/TileElectricFurnace", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "electric_furnace", - "key", - "ElectricFurnaceInput", - "comment", - "Electric Furnace Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "electric_furnace", - "key", - "ElectricFurnaceMaxEnergy", - "comment", - "Electric Furnace Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, "techreborn/api/fluidreplicator/FluidReplicatorRecipe": { "className": "techreborn/api/fluidreplicator/FluidReplicatorRecipe", "fields": [ @@ -1605,8 +2138,8 @@ } ] }, - "techreborn/tiles/machine/multiblock/TileIndustrialGrinder": { - "className": "techreborn/tiles/machine/multiblock/TileIndustrialGrinder", + "techreborn/blockentity/storage/AdjustableSUBlockEntity": { + "className": "techreborn/blockentity/storage/AdjustableSUBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -1617,19 +2150,6 @@ "api": 458752 } ], - "methods": [ - { - "access": 1, - "name": "getTank", - "desc": "()Lreborncore/common/util/Tank;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - } - ], "fields": [ { "access": 9, @@ -1642,11 +2162,32 @@ "config", "machines", "category", - "industrial_grinder", + "aesu", "key", - "IndustrialGrinderMaxInput", + "AesuMaxInput", "comment", - "Industrial Grinder Max Input (Value in EU)" + "AESU Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxOutput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "aesu", + "key", + "AesuMaxOutput", + "comment", + "AESU Max Output (Value in EU)" ], "api": 458752 } @@ -1663,11 +2204,11 @@ "config", "machines", "category", - "industrial_grinder", + "aesu", "key", - "IndustrialGrinderMaxEnergy", + "AesuMaxEnergy", "comment", - "Industrial Grinder Max Energy (Value in EU)" + "AESU Max Energy (Value in EU)" ], "api": 458752 } @@ -1675,8 +2216,143 @@ } ] }, - "techreborn/tiles/generator/advanced/TileDragonEggSyphon": { - "className": "techreborn/tiles/generator/advanced/TileDragonEggSyphon", + "techreborn/blockentity/ChargeOMatBlockEntity": { + "className": "techreborn/blockentity/ChargeOMatBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxOutput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "charge_bench", + "key", + "ChargeBenchMaxOutput", + "comment", + "Charge Bench Max Output (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "charge_bench", + "key", + "ChargeBenchMaxInput", + "comment", + "Charge Bench Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "charge_bench", + "key", + "ChargeBenchMaxEnergy", + "comment", + "Charge Bench Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/tier1/ChemicalReactorBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/ChemicalReactorBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "chemical_reactor", + "key", + "ChemicalReactorMaxInput", + "comment", + "Chemical Reactor Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "chemical_reactor", + "key", + "ChemicalReactorMaxEnergy", + "comment", + "Chemical Reactor Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/generator/basic/WaterMillBlockEntity": { + "className": "techreborn/blockentity/generator/basic/WaterMillBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -1699,11 +2375,11 @@ "config", "generators", "category", - "dragon_egg_siphoner", + "water_mill", "key", - "DragonEggSiphonerMaxOutput", + "WaterMillMaxOutput", "comment", - "Dragon Egg Siphoner Max Output (Value in EU)" + "Water Mill Max Output (Value in EU)" ], "api": 458752 } @@ -1720,11 +2396,11 @@ "config", "generators", "category", - "dragon_egg_siphoner", + "water_mill", "key", - "DragonEggSiphonerMaxEnergy", + "WaterMillMaxEnergy", "comment", - "Dragon Egg Siphoner Max Energy (Value in EU)" + "Water Mill Max Energy (Value in EU)" ], "api": 458752 } @@ -1732,8 +2408,8 @@ }, { "access": 9, - "name": "energyPerTick", - "desc": "I", + "name": "energyMultiplier", + "desc": "D", "annotations": [ { "desc": "Lreborncore/common/registration/config/ConfigRegistry;", @@ -1741,11 +2417,11 @@ "config", "generators", "category", - "dragon_egg_siphoner", + "water_mill", "key", - "DragonEggSiphonerEnergyPerTick", + "WaterMillEnergyPerTick", "comment", - "Dragon Egg Siphoner Energy Per Tick (Value in EU)" + "Water Mill Energy Multiplier" ], "api": 458752 } @@ -1753,44 +2429,8 @@ } ] }, - "techreborn/tiles/transformers/TileTransformer": { - "className": "techreborn/tiles/transformers/TileTransformer", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "IC2TransformersStyle", - "desc": "Z", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "misc", - "category", - "general", - "key", - "IC2TransformersStyle", - "comment", - "Input from dots side, output from other sides, like in IC2." - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/multiblock/TileVacuumFreezer": { - "className": "techreborn/tiles/machine/multiblock/TileVacuumFreezer", + "techreborn/blockentity/machine/tier1/IndustrialElectrolyzerBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/IndustrialElectrolyzerBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -1813,11 +2453,11 @@ "config", "machines", "category", - "vacuumfreezer", + "industrial_electrolyzer", "key", - "VacuumFreezerInput", + "IndustrialElectrolyzerMaxInput", "comment", - "Vacuum Freezer Max Input (Value in EU)" + "Industrial Electrolyzer Max Input (Value in EU)" ], "api": 458752 } @@ -1834,11 +2474,11 @@ "config", "machines", "category", - "vacuumfreezer", + "industrial_electrolyzer", "key", - "VacuumFreezerMaxEnergy", + "IndustrialElectrolyzerMaxEnergy", "comment", - "Vacuum Freezer Max Energy (Value in EU)" + "Industrial Electrolyzer Max Energy (Value in EU)" ], "api": 458752 } @@ -2575,331 +3215,8 @@ } ] }, - "techreborn/tiles/machine/tier1/TilePlayerDectector": { - "className": "techreborn/tiles/machine/tier1/TilePlayerDectector", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "player_detector", - "key", - "PlayerDetectorMaxInput", - "comment", - "Player Detector Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "player_detector", - "key", - "PlayerDetectorMaxEnergy", - "comment", - "Player Detector Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "euPerTick", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "player_detector", - "key", - "PlayerDetectorEUPerSecond", - "comment", - "Player Detector Energy Consumption per second (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/generator/advanced/TileThermalGenerator": { - "className": "techreborn/tiles/generator/advanced/TileThermalGenerator", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxOutput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "thermal_generator", - "key", - "ThermalGeneratorMaxOutput", - "comment", - "Thermal Generator Max Output (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "thermal_generator", - "key", - "ThermalGeneratorMaxEnergy", - "comment", - "Thermal Generator Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "tankCapacity", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "thermal_generator", - "key", - "ThermalGeneratorTankCapacity", - "comment", - "Thermal Generator Tank Capacity" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "energyPerTick", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "thermal_generator", - "key", - "ThermalGeneratorEnergyPerTick", - "comment", - "Thermal Generator Energy Per Tick (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/utils/BehaviorDispenseScrapbox": { - "className": "techreborn/utils/BehaviorDispenseScrapbox", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "dispenseScrapboxes", - "desc": "Z", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "misc", - "category", - "general", - "key", - "DispenserScrapbox", - "comment", - "Dispensers will open scrapboxes" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/tier1/TileRollingMachine": { - "className": "techreborn/tiles/machine/tier1/TileRollingMachine", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "rolling_machine", - "key", - "RollingMachineMaxInput", - "comment", - "Rolling Machine Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "energyPerTick", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "rolling_machine", - "key", - "RollingMachineEnergyPerTick", - "comment", - "Rolling Machine Energy Per Tick (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "runTime", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "rolling_machine", - "key", - "RollingMachineEnergyRunTime", - "comment", - "Rolling Machine Run Time" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "rolling_machine", - "key", - "RollingMachineMaxEnergy", - "comment", - "Rolling Machine Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 1, - "name": "currentRecipeOutput", - "desc": "Lnet/minecraft/class_1799;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nonnull;", - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/fusionReactor/TileFusionControlComputer": { - "className": "techreborn/tiles/fusionReactor/TileFusionControlComputer", + "techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity": { + "className": "techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -2997,8 +3314,8 @@ } ] }, - "techreborn/tiles/machine/tier3/TileQuantumChest": { - "className": "techreborn/tiles/machine/tier3/TileQuantumChest", + "techreborn/blockentity/machine/tier1/RecyclerBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/RecyclerBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -3009,6 +3326,167 @@ "api": 458752 } ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "recycler", + "key", + "RecyclerInput", + "comment", + "Recycler Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "recycler", + "key", + "RecyclerMaxEnergy", + "comment", + "Recycler Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "produceIC2Scrap", + "desc": "Z", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "recycler", + "key", + "produceIC2Scrap", + "comment", + "When enabled and when ic2 is installed the recycler will make ic2 scrap" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity": { + "className": "techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "methods": [ + { + "access": 1, + "name": "getTank", + "desc": "()Lreborncore/common/util/Tank;", + "annotations": [ + { + "desc": "Ljavax/annotation/Nullable;", + "api": 458752 + } + ] + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "industrial_sawmill", + "key", + "IndustrialSawmillMaxInput", + "comment", + "Industrial Sawmill Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "industrial_sawmill", + "key", + "IndustrialSawmillMaxEnergy", + "comment", + "Industrial Sawmill Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/tier3/QuantumTankBlockEntity": { + "className": "techreborn/blockentity/machine/tier3/QuantumTankBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "methods": [ + { + "access": 1, + "name": "getTank", + "desc": "()Lreborncore/common/util/Tank;", + "annotations": [ + { + "desc": "Ljavax/annotation/Nullable;", + "api": 458752 + } + ] + } + ], "fields": [ { "access": 9, @@ -3021,11 +3499,11 @@ "config", "machines", "category", - "quantum_chest", + "quantum_tank", "key", - "QuantumChestMaxStorage", + "QuantumTankMaxStorage", "comment", - "Maximum amount of items a Quantum Chest can store" + "Maximum amount of millibuckets a Quantum Tank can store" ], "api": 458752 } @@ -3033,24 +3511,23 @@ } ] }, - "techreborn/blocks/BlockAlarm": { - "className": "techreborn/blocks/BlockAlarm", + "techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity": { + "className": "techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], "methods": [ { "access": 1, - "name": "method_10123", - "desc": "(Lnet/minecraft/class_1922;)Lnet/minecraft/class_2586;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - }, - { - "access": 1, - "name": "method_9605", - "desc": "(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;", + "name": "getTank", + "desc": "()Lreborncore/common/util/Tank;", "annotations": [ { "desc": "Ljavax/annotation/Nullable;", @@ -3058,15 +3535,95 @@ } ] } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "fluidreplicator", + "key", + "FluidReplicatorMaxInput", + "comment", + "Fluid Replicator Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "fluidreplicator", + "key", + "FluidReplicatorMaxEnergy", + "comment", + "Fluid Replicator Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } ] }, - "techreborn/blocks/lighting/BlockLamp": { - "className": "techreborn/blocks/lighting/BlockLamp", + "techreborn/utils/BehaviorDispenseScrapbox": { + "className": "techreborn/utils/BehaviorDispenseScrapbox", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "dispenseScrapboxes", + "desc": "Z", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "misc", + "category", + "general", + "key", + "DispenserScrapbox", + "comment", + "Dispensers will open scrapboxes" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/world/RubberSaplingGenerator": { + "className": "techreborn/world/RubberSaplingGenerator", "methods": [ { - "access": 1, - "name": "method_9605", - "desc": "(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;", + "access": 4, + "name": "method_11430", + "desc": "(Ljava/util/Random;)Lnet/minecraft/class_2944;", "annotations": [ { "desc": "Ljavax/annotation/Nullable;", @@ -3076,179 +3633,8 @@ } ] }, - "techreborn/tiles/machine/tier1/TileAlloySmelter": { - "className": "techreborn/tiles/machine/tier1/TileAlloySmelter", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "alloy_smelter", - "key", - "AlloySmelterMaxInput", - "comment", - "Alloy Smelter Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "alloy_smelter", - "key", - "AlloySmelterMaxEnergy", - "comment", - "Alloy Smelter Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer": { - "className": "techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "industrial_electrolyzer", - "key", - "IndustrialElectrolyzerMaxInput", - "comment", - "Industrial Electrolyzer Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "industrial_electrolyzer", - "key", - "IndustrialElectrolyzerMaxEnergy", - "comment", - "Industrial Electrolyzer Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/tier1/TileScrapboxinator": { - "className": "techreborn/tiles/machine/tier1/TileScrapboxinator", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "scrapboxinator", - "key", - "ScrapboxinatorMaxInput", - "comment", - "Scrapboxinator Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "scrapboxinator", - "key", - "ScrapboxinatorMaxEnergy", - "comment", - "Scrapboxinator Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/tier1/TileCompressor": { - "className": "techreborn/tiles/machine/tier1/TileCompressor", + "techreborn/blockentity/machine/tier1/CompressorBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/CompressorBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -3304,78 +3690,64 @@ } ] }, - "techreborn/tiles/machine/iron/TileIronAlloyFurnace": { - "className": "techreborn/tiles/machine/iron/TileIronAlloyFurnace", - "annotations": [ + "techreborn/blocks/BlockAlarm": { + "className": "techreborn/blocks/BlockAlarm", + "methods": [ { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ] - }, - "techreborn/tiles/machine/multiblock/TileDistillationTower": { - "className": "techreborn/tiles/machine/multiblock/TileDistillationTower", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", + "access": 1, + "name": "method_10123", + "desc": "(Lnet/minecraft/class_1922;)Lnet/minecraft/class_2586;", "annotations": [ { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "Distillation_tower", - "key", - "DistillationTowerMaxInput", - "comment", - "Distillation Tower Max Input (Value in EU)" - ], + "desc": "Ljavax/annotation/Nullable;", "api": 458752 } ] }, { - "access": 9, - "name": "maxEnergy", - "desc": "I", + "access": 1, + "name": "method_9605", + "desc": "(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;", "annotations": [ { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "Distillation_tower", - "key", - "DistillationTowerMaxEnergy", - "comment", - "Distillation Tower Max Energy (Value in EU)" - ], + "desc": "Ljavax/annotation/Nullable;", "api": 458752 } ] } ] }, - "techreborn/tiles/generator/advanced/TileDieselGenerator": { - "className": "techreborn/tiles/generator/advanced/TileDieselGenerator", + "techreborn/blocks/lighting/BlockLamp": { + "className": "techreborn/blocks/lighting/BlockLamp", + "methods": [ + { + "access": 1, + "name": "method_9605", + "desc": "(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;", + "annotations": [ + { + "desc": "Ljavax/annotation/Nullable;", + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/iron/IronAlloyFurnaceBlockEntity": { + "className": "techreborn/blockentity/machine/iron/IronAlloyFurnaceBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ] + }, + "techreborn/blockentity/generator/advanced/GasTurbineBlockEntity": { + "className": "techreborn/blockentity/generator/advanced/GasTurbineBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -3398,11 +3770,11 @@ "config", "generators", "category", - "diesel_generator", + "gas_generator", "key", - "DieselGeneratorMaxOutput", + "GasGeneratorMaxOutput", "comment", - "Diesel Generator Max Output (Value in EU)" + "Gas Generator Max Output (Value in EU)" ], "api": 458752 } @@ -3419,11 +3791,11 @@ "config", "generators", "category", - "diesel_generator", + "gas_generator", "key", - "DieselGeneratorMaxEnergy", + "GasGeneratorMaxEnergy", "comment", - "Diesel Generator Max Energy (Value in EU)" + "Gas Generator Max Energy (Value in EU)" ], "api": 458752 } @@ -3440,11 +3812,11 @@ "config", "generators", "category", - "diesel_generator", + "gas_generator", "key", - "DieselGeneratorTankCapacity", + "GasGeneratorTankCapacity", "comment", - "Diesel Generator Tank Capacity" + "Gas Generator Tank Capacity" ], "api": 458752 } @@ -3461,11 +3833,11 @@ "config", "generators", "category", - "diesel_generator", + "gas_generator", "key", - "DieselGeneratorEnergyPerTick", + "GasGeneratorEnergyPerTick", "comment", - "Diesel Generator Energy Per Tick (Value in EU)" + "Gas Generator Energy Per Tick (Value in EU)" ], "api": 458752 } @@ -3473,8 +3845,8 @@ } ] }, - "techreborn/tiles/machine/tier3/TileMatterFabricator": { - "className": "techreborn/tiles/machine/tier3/TileMatterFabricator", + "techreborn/blockentity/transformers/TransformerBlockEntity": { + "className": "techreborn/blockentity/transformers/TransformerBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -3488,161 +3860,20 @@ "fields": [ { "access": 9, - "name": "maxInput", - "desc": "I", + "name": "IC2TransformersStyle", + "desc": "Z", "annotations": [ { "desc": "Lreborncore/common/registration/config/ConfigRegistry;", "values": [ "config", - "machines", + "misc", "category", - "matter_fabricator", + "general", "key", - "MatterFabricatorMaxInput", + "IC2TransformersStyle", "comment", - "Matter Fabricator Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "matter_fabricator", - "key", - "MatterFabricatorMaxEnergy", - "comment", - "Matter Fabricator Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "fabricationRate", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "matter_fabricator", - "key", - "MatterFabricatorFabricationRate", - "comment", - "Matter Fabricator Fabrication Rate, amount of amplifier units per UUM" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "energyPerAmp", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "matter_fabricator", - "key", - "MatterFabricatorEnergyPerAmp", - "comment", - "Matter Fabricator EU per amplifier unit, multiply this with the rate for total EU" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/generator/basic/TileWaterMill": { - "className": "techreborn/tiles/generator/basic/TileWaterMill", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxOutput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "water_mill", - "key", - "WaterMillMaxOutput", - "comment", - "Water Mill Max Output (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "water_mill", - "key", - "WaterMillMaxEnergy", - "comment", - "Water Mill Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "energyMultiplier", - "desc": "D", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "water_mill", - "key", - "WaterMillEnergyPerTick", - "comment", - "Water Mill Energy Multiplier" + "Input from dots side, output from other sides, like in IC2." ], "api": 458752 } @@ -3908,8 +4139,8 @@ } ] }, - "techreborn/tiles/storage/TileAdjustableSU": { - "className": "techreborn/tiles/storage/TileAdjustableSU", + "techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity": { + "className": "techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -3932,32 +4163,11 @@ "config", "machines", "category", - "aesu", + "implosion_compressor", "key", - "AesuMaxInput", + "ImplosionCompressorMaxInput", "comment", - "AESU Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxOutput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "aesu", - "key", - "AesuMaxOutput", - "comment", - "AESU Max Output (Value in EU)" + "Implosion Compressor Max Input (Value in EU)" ], "api": 458752 } @@ -3974,11 +4184,11 @@ "config", "machines", "category", - "aesu", + "implosion_compressor", "key", - "AesuMaxEnergy", + "ImplosionCompressorMaxEnergy", "comment", - "AESU Max Energy (Value in EU)" + "Implosion Compressor Max Energy (Value in EU)" ], "api": 458752 } @@ -3986,8 +4196,8 @@ } ] }, - "techreborn/tiles/machine/tier1/TileRecycler": { - "className": "techreborn/tiles/machine/tier1/TileRecycler", + "techreborn/blockentity/machine/tier1/PlayerDectectorBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/PlayerDectectorBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4010,11 +4220,11 @@ "config", "machines", "category", - "recycler", + "player_detector", "key", - "RecyclerInput", + "PlayerDetectorMaxInput", "comment", - "Recycler Max Input (Value in EU)" + "Player Detector Max Input (Value in EU)" ], "api": 458752 } @@ -4031,11 +4241,11 @@ "config", "machines", "category", - "recycler", + "player_detector", "key", - "RecyclerMaxEnergy", + "PlayerDetectorMaxEnergy", "comment", - "Recycler Max Energy (Value in EU)" + "Player Detector Max Energy (Value in EU)" ], "api": 458752 } @@ -4043,43 +4253,7 @@ }, { "access": 9, - "name": "produceIC2Scrap", - "desc": "Z", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "recycler", - "key", - "produceIC2Scrap", - "comment", - "When enabled and when ic2 is installed the recycler will make ic2 scrap" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/TileDigitalChest": { - "className": "techreborn/tiles/TileDigitalChest", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxStorage", + "name": "euPerTick", "desc": "I", "annotations": [ { @@ -4088,11 +4262,11 @@ "config", "machines", "category", - "digital_chest", + "player_detector", "key", - "DigitalChestMaxStorage", + "PlayerDetectorEUPerSecond", "comment", - "Maximum amount of items a Digital Chest can store" + "Player Detector Energy Consumption per second (Value in EU)" ], "api": 458752 } @@ -4100,24 +4274,8 @@ } ] }, - "techreborn/blocks/RubberTree": { - "className": "techreborn/blocks/RubberTree", - "methods": [ - { - "access": 4, - "name": "method_11430", - "desc": "(Ljava/util/Random;)Lnet/minecraft/class_2944;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/TileIndustrialCentrifuge": { - "className": "techreborn/tiles/TileIndustrialCentrifuge", + "techreborn/blockentity/machine/tier3/MatterFabricatorBlockEntity": { + "className": "techreborn/blockentity/machine/tier3/MatterFabricatorBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4140,11 +4298,11 @@ "config", "machines", "category", - "centrifuge", + "matter_fabricator", "key", - "CentrifugeMaxInput", + "MatterFabricatorMaxInput", "comment", - "Centrifuge Max Input (Value in EU)" + "Matter Fabricator Max Input (Value in EU)" ], "api": 458752 } @@ -4161,47 +4319,11 @@ "config", "machines", "category", - "centrifuge", + "matter_fabricator", "key", - "CentrifugeMaxEnergy", + "MatterFabricatorMaxEnergy", "comment", - "Centrifuge Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/tier3/TileChunkLoader": { - "className": "techreborn/tiles/machine/tier3/TileChunkLoader", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "chunk_loader", - "key", - "ChunkLoaderMaxInput", - "comment", - "Chunk Loader Max Input (Value in EU)" + "Matter Fabricator Max Energy (Value in EU)" ], "api": 458752 } @@ -4209,7 +4331,7 @@ }, { "access": 9, - "name": "maxEnergy", + "name": "fabricationRate", "desc": "I", "annotations": [ { @@ -4218,11 +4340,32 @@ "config", "machines", "category", - "chunk_loader", + "matter_fabricator", "key", - "ChunkLoaderMaxEnergy", + "MatterFabricatorFabricationRate", "comment", - "Chunk Loader Max Energy (Value in EU)" + "Matter Fabricator Fabrication Rate, amount of amplifier units per UUM" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "energyPerAmp", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "matter_fabricator", + "key", + "MatterFabricatorEnergyPerAmp", + "comment", + "Matter Fabricator EU per amplifier unit, multiply this with the rate for total EU" ], "api": 458752 } @@ -4230,8 +4373,8 @@ } ] }, - "techreborn/tiles/storage/lesu/TileLapotronicSU": { - "className": "techreborn/tiles/storage/lesu/TileLapotronicSU", + "techreborn/blockentity/storage/lesu/LapotronicSUBlockEntity": { + "className": "techreborn/blockentity/storage/lesu/LapotronicSUBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4308,6 +4451,63 @@ } ] }, + "techreborn/blockentity/machine/tier3/ChunkLoaderBlockEntity": { + "className": "techreborn/blockentity/machine/tier3/ChunkLoaderBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "chunk_loader", + "key", + "ChunkLoaderMaxInput", + "comment", + "Chunk Loader Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "chunk_loader", + "key", + "ChunkLoaderMaxEnergy", + "comment", + "Chunk Loader Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, "techreborn/api/generator/EFluidGenerator": { "className": "techreborn/api/generator/EFluidGenerator", "methods": [ @@ -4337,6 +4537,22 @@ } ] }, + "techreborn/blockentity/generator/BaseFluidGeneratorBlockEntity": { + "className": "techreborn/blockentity/generator/BaseFluidGeneratorBlockEntity", + "methods": [ + { + "access": 1, + "name": "getTank", + "desc": "()Lreborncore/common/util/Tank;", + "annotations": [ + { + "desc": "Ljavax/annotation/Nullable;", + "api": 458752 + } + ] + } + ] + }, "techreborn/items/armor/ItemCloakingDevice": { "className": "techreborn/items/armor/ItemCloakingDevice", "annotations": [ @@ -4350,8 +4566,8 @@ } ] }, - "techreborn/tiles/machine/multiblock/TileIndustrialSawmill": { - "className": "techreborn/tiles/machine/multiblock/TileIndustrialSawmill", + "techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity": { + "className": "techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4362,19 +4578,6 @@ "api": 458752 } ], - "methods": [ - { - "access": 1, - "name": "getTank", - "desc": "()Lreborncore/common/util/Tank;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - } - ], "fields": [ { "access": 9, @@ -4387,11 +4590,11 @@ "config", "machines", "category", - "industrial_sawmill", + "Distillation_tower", "key", - "IndustrialSawmillMaxInput", + "DistillationTowerMaxInput", "comment", - "Industrial Sawmill Max Input (Value in EU)" + "Distillation Tower Max Input (Value in EU)" ], "api": 458752 } @@ -4408,11 +4611,68 @@ "config", "machines", "category", - "industrial_sawmill", + "Distillation_tower", "key", - "IndustrialSawmillMaxEnergy", + "DistillationTowerMaxEnergy", "comment", - "Industrial Sawmill Max Energy (Value in EU)" + "Distillation Tower Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/multiblock/IndustrialBlastFurnaceBlockEntity": { + "className": "techreborn/blockentity/machine/multiblock/IndustrialBlastFurnaceBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "industrial_furnace", + "key", + "IndustrialFurnaceMaxInput", + "comment", + "Industrial Blast Furnace Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "industrial_furnace", + "key", + "IndustrialFurnaceMaxEnergy", + "comment", + "Industrial Blast Furnace Max Energy (Value in EU)" ], "api": 458752 } @@ -4462,8 +4722,122 @@ } ] }, - "techreborn/tiles/machine/tier1/TileAutoCraftingTable": { - "className": "techreborn/tiles/machine/tier1/TileAutoCraftingTable", + "techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "electric_furnace", + "key", + "ElectricFurnaceInput", + "comment", + "Electric Furnace Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "electric_furnace", + "key", + "ElectricFurnaceMaxEnergy", + "comment", + "Electric Furnace Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity": { + "className": "techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity", + "annotations": [ + { + "desc": "Lreborncore/common/registration/RebornRegister;", + "values": [ + "value", + "techreborn" + ], + "api": 458752 + } + ], + "fields": [ + { + "access": 9, + "name": "maxInput", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "vacuumfreezer", + "key", + "VacuumFreezerInput", + "comment", + "Vacuum Freezer Max Input (Value in EU)" + ], + "api": 458752 + } + ] + }, + { + "access": 9, + "name": "maxEnergy", + "desc": "I", + "annotations": [ + { + "desc": "Lreborncore/common/registration/config/ConfigRegistry;", + "values": [ + "config", + "machines", + "category", + "vacuumfreezer", + "key", + "VacuumFreezerMaxEnergy", + "comment", + "Vacuum Freezer Max Energy (Value in EU)" + ], + "api": 458752 + } + ] + } + ] + }, + "techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity": { + "className": "techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4477,8 +4851,8 @@ "methods": [ { "access": 1, - "name": "getIRecipe", - "desc": "()Lnet/minecraft/class_1860;", + "name": "getTank", + "desc": "()Lreborncore/common/util/Tank;", "annotations": [ { "desc": "Ljavax/annotation/Nullable;", @@ -4499,11 +4873,11 @@ "config", "machines", "category", - "autocrafter", + "industrial_grinder", "key", - "AutoCrafterInput", + "IndustrialGrinderMaxInput", "comment", - "AutoCrafting Table Max Input (Value in EU)" + "Industrial Grinder Max Input (Value in EU)" ], "api": 458752 } @@ -4520,11 +4894,11 @@ "config", "machines", "category", - "autocrafter", + "industrial_grinder", "key", - "AutoCrafterMaxEnergy", + "IndustrialGrinderMaxEnergy", "comment", - "AutoCrafting Table Max Energy (Value in EU)" + "Industrial Grinder Max Energy (Value in EU)" ], "api": 458752 } @@ -4532,8 +4906,8 @@ } ] }, - "techreborn/tiles/generator/TilePlasmaGenerator": { - "className": "techreborn/tiles/generator/TilePlasmaGenerator", + "techreborn/blockentity/machine/tier3/QuantumChestBlockEntity": { + "className": "techreborn/blockentity/machine/tier3/QuantumChestBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4547,106 +4921,7 @@ "fields": [ { "access": 9, - "name": "maxOutput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "plasma_generator", - "key", - "PlasmaGeneratorMaxOutput", - "comment", - "Plasma Generator Max Output (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "D", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "plasma_generator", - "key", - "PlasmaGeneratorMaxEnergy", - "comment", - "Plasma Generator Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "tankCapacity", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "plasma_generator", - "key", - "PlasmaGeneratorTankCapacity", - "comment", - "Plasma Generator Tank Capacity" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "energyPerTick", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "generators", - "category", - "plasma_generator", - "key", - "PlasmaGeneratorEnergyPerTick", - "comment", - "Plasma Generator Energy Per Tick (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/TileChargeOMat": { - "className": "techreborn/tiles/TileChargeOMat", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxOutput", + "name": "maxStorage", "desc": "I", "annotations": [ { @@ -4655,53 +4930,11 @@ "config", "machines", "category", - "charge_bench", + "quantum_chest", "key", - "ChargeBenchMaxOutput", + "QuantumChestMaxStorage", "comment", - "Charge Bench Max Output (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "charge_bench", - "key", - "ChargeBenchMaxInput", - "comment", - "Charge Bench Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "charge_bench", - "key", - "ChargeBenchMaxEnergy", - "comment", - "Charge Bench Max Energy (Value in EU)" + "Maximum amount of items a Quantum Chest can store" ], "api": 458752 } @@ -4736,135 +4969,24 @@ } ] }, - "techreborn/tiles/machine/tier1/TileGrinder": { - "className": "techreborn/tiles/machine/tier1/TileGrinder", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "grinder", - "key", - "GrinderInput", - "comment", - "Grinder Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "grinder", - "key", - "GrinderMaxEnergy", - "comment", - "Grinder Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/multiblock/TileFluidReplicator": { - "className": "techreborn/tiles/machine/multiblock/TileFluidReplicator", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], + "techreborn/utils/RecipeUtils": { + "className": "techreborn/utils/RecipeUtils", "methods": [ - { - "access": 1, - "name": "getTank", - "desc": "()Lreborncore/common/util/Tank;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - } - ], - "fields": [ { "access": 9, - "name": "maxInput", - "desc": "I", + "name": "getEmptyCell", + "desc": "(I)Lnet/minecraft/class_1799;", "annotations": [ { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "fluidreplicator", - "key", - "FluidReplicatorMaxInput", - "comment", - "Fluid Replicator Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "fluidreplicator", - "key", - "FluidReplicatorMaxEnergy", - "comment", - "Fluid Replicator Max Energy (Value in EU)" - ], + "desc": "Ljavax/annotation/Nonnull;", "api": 458752 } ] } ] }, - "techreborn/tiles/machine/multiblock/TileImplosionCompressor": { - "className": "techreborn/tiles/machine/multiblock/TileImplosionCompressor", + "techreborn/blockentity/machine/tier1/ExtractorBlockEntity": { + "className": "techreborn/blockentity/machine/tier1/ExtractorBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4887,11 +5009,11 @@ "config", "machines", "category", - "implosion_compressor", + "extractor", "key", - "ImplosionCompressorMaxInput", + "ExtractorInput", "comment", - "Implosion Compressor Max Input (Value in EU)" + "Extractor Max Input (Value in EU)" ], "api": 458752 } @@ -4908,11 +5030,11 @@ "config", "machines", "category", - "implosion_compressor", + "extractor", "key", - "ImplosionCompressorMaxEnergy", + "ExtractorMaxEnergy", "comment", - "Implosion Compressor Max Energy (Value in EU)" + "Extractor Max Energy (Value in EU)" ], "api": 458752 } @@ -4920,8 +5042,8 @@ } ] }, - "techreborn/tiles/generator/TileLightningRod": { - "className": "techreborn/tiles/generator/TileLightningRod", + "techreborn/blockentity/generator/basic/WindMillBlockEntity": { + "className": "techreborn/blockentity/generator/basic/WindMillBlockEntity", "annotations": [ { "desc": "Lreborncore/common/registration/RebornRegister;", @@ -4944,11 +5066,11 @@ "config", "generators", "category", - "lightning_rod", + "wind_mill", "key", - "LightningRodMaxOutput", + "WindMillMaxOutput", "comment", - "Lightning Rod Max Output (Value in EU)" + "Wind Mill Max Output (Value in EU)" ], "api": 458752 } @@ -4965,11 +5087,11 @@ "config", "generators", "category", - "lightning_rod", + "wind_mill", "key", - "LightningRodMaxEnergy", + "WindMillMaxEnergy", "comment", - "Lightning Rod Max Energy (Value in EU)" + "Wind Mill Max Energy (Value in EU)" ], "api": 458752 } @@ -4977,7 +5099,7 @@ }, { "access": 9, - "name": "chanceOfStrike", + "name": "baseEnergy", "desc": "I", "annotations": [ { @@ -4986,11 +5108,11 @@ "config", "generators", "category", - "lightning_rod", + "wind_mill", "key", - "LightningRodChanceOfStrike", + "WindMillEnergyPerTick", "comment", - "Chance of lightning striking a rod (Range: 0-70)" + "Wind Mill Energy Per Tick (Value in EU)" ], "api": 458752 } @@ -4998,8 +5120,8 @@ }, { "access": 9, - "name": "baseEnergyStrike", - "desc": "I", + "name": "thunderMultiplier", + "desc": "D", "annotations": [ { "desc": "Lreborncore/common/registration/config/ConfigRegistry;", @@ -5007,92 +5129,11 @@ "config", "generators", "category", - "lightning_rod", + "wind_mill", "key", - "LightningRodBaseStrikeEnergy", + "WindMillThunderMultiplier", "comment", - "Base amount of energy per strike (Value in EU)" - ], - "api": 458752 - } - ] - } - ] - }, - "techreborn/utils/RecipeUtils": { - "className": "techreborn/utils/RecipeUtils", - "methods": [ - { - "access": 9, - "name": "getEmptyCell", - "desc": "(I)Lnet/minecraft/class_1799;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nonnull;", - "api": 458752 - } - ] - } - ] - }, - "techreborn/world/RubberTreeGenerator": { - "className": "techreborn/world/RubberTreeGenerator", - "methods": [ - { - "access": 4, - "name": "method_11430", - "desc": "(Ljava/util/Random;)Lnet/minecraft/class_2944;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - } - ] - }, - "techreborn/tiles/machine/tier3/TileQuantumTank": { - "className": "techreborn/tiles/machine/tier3/TileQuantumTank", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "methods": [ - { - "access": 1, - "name": "getTank", - "desc": "()Lreborncore/common/util/Tank;", - "annotations": [ - { - "desc": "Ljavax/annotation/Nullable;", - "api": 458752 - } - ] - } - ], - "fields": [ - { - "access": 9, - "name": "maxStorage", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "quantum_tank", - "key", - "QuantumTankMaxStorage", - "comment", - "Maximum amount of millibuckets a Quantum Tank can store" + "Wind Mill Thunder Multiplier" ], "api": 458752 } @@ -5112,63 +5153,6 @@ "api": 458752 } ] - }, - "techreborn/tiles/machine/tier1/TileChemicalReactor": { - "className": "techreborn/tiles/machine/tier1/TileChemicalReactor", - "annotations": [ - { - "desc": "Lreborncore/common/registration/RebornRegister;", - "values": [ - "value", - "techreborn" - ], - "api": 458752 - } - ], - "fields": [ - { - "access": 9, - "name": "maxInput", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "chemical_reactor", - "key", - "ChemicalReactorMaxInput", - "comment", - "Chemical Reactor Max Input (Value in EU)" - ], - "api": 458752 - } - ] - }, - { - "access": 9, - "name": "maxEnergy", - "desc": "I", - "annotations": [ - { - "desc": "Lreborncore/common/registration/config/ConfigRegistry;", - "values": [ - "config", - "machines", - "category", - "chemical_reactor", - "key", - "ChemicalReactorMaxEnergy", - "comment", - "Chemical Reactor Max Energy (Value in EU)" - ], - "api": 458752 - } - ] - } - ] } } } \ No newline at end of file