Merge remote-tracking branch 'origin/1.16' into 1.16
This commit is contained in:
commit
4d91f08279
6 changed files with 99 additions and 101 deletions
|
@ -69,12 +69,12 @@ license {
|
|||
group = 'TechReborn'
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:1.16-pre2"
|
||||
mappings "net.fabricmc:yarn:1.16-pre2+build.1:v2"
|
||||
minecraft "com.mojang:minecraft:1.16-pre8"
|
||||
mappings "net.fabricmc:yarn:1.16-pre8+build.2:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.8.7+build.201"
|
||||
|
||||
//Fabric api
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.11.6+build.355-1.16"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.12.4+build.365-1.16"
|
||||
|
||||
optionalDependency ("me.shedaniel:RoughlyEnoughItems:4.5.1")
|
||||
disabledOptionalDependency ('io.github.cottonmc:LibCD:2.3.0+1.15.2')
|
||||
|
|
|
@ -26,6 +26,7 @@ package techreborn.blockentity.generator;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
@ -65,6 +66,10 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
|
|||
|
||||
private SolarPanels panel;
|
||||
|
||||
public SolarPanelBlockEntity() {
|
||||
super(TRBlockEntities.SOLAR_PANEL);
|
||||
}
|
||||
|
||||
public SolarPanelBlockEntity(SolarPanels panel) {
|
||||
super(TRBlockEntities.SOLAR_PANEL);
|
||||
this.panel = panel;
|
||||
|
|
|
@ -53,7 +53,7 @@ public class GuiAutoCrafting extends GuiBase<BuiltScreenHandler> {
|
|||
}
|
||||
|
||||
public void renderItemStack(ItemStack stack, int x, int y) {
|
||||
MinecraftClient.getInstance().getItemRenderer().renderGuiItem(stack, x, y);
|
||||
MinecraftClient.getInstance().getItemRenderer().renderInGuiWithOverrides(stack, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -101,7 +101,7 @@ public class GuiIronFurnace extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
@Override
|
||||
public void renderBg(MatrixStack matrixStack, MinecraftClient mc, int mouseX, int mouseY) {
|
||||
mc.getItemRenderer().renderGuiItem(new ItemStack(Items.EXPERIENCE_BOTTLE), x, y);
|
||||
mc.getItemRenderer().renderInGuiWithOverrides(new ItemStack(Items.EXPERIENCE_BOTTLE), x, y);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,27 +33,27 @@ import techreborn.api.recipe.recipes.*;
|
|||
|
||||
public class ModRecipes {
|
||||
|
||||
public static final RebornRecipeType<RebornRecipe> ALLOY_SMELTER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:alloy_smelter"));
|
||||
public static final RebornRecipeType<RebornRecipe> ASSEMBLING_MACHINE = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:assembling_machine"));
|
||||
public static final RebornRecipeType<BlastFurnaceRecipe> BLAST_FURNACE = RecipeManager.newRecipeType(BlastFurnaceRecipe.class, new Identifier("techreborn:blast_furnace"));
|
||||
public static final RebornRecipeType<RebornRecipe> CENTRIFUGE = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:centrifuge"));
|
||||
public static final RebornRecipeType<RebornRecipe> CHEMICAL_REACTOR = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:chemical_reactor"));
|
||||
public static final RebornRecipeType<RebornRecipe> COMPRESSOR = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:compressor"));
|
||||
public static final RebornRecipeType<RebornRecipe> DISTILLATION_TOWER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:distillation_tower"));
|
||||
public static final RebornRecipeType<RebornRecipe> EXTRACTOR = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:extractor"));
|
||||
public static final RebornRecipeType<RebornRecipe> GRINDER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:grinder"));
|
||||
public static final RebornRecipeType<RebornRecipe> IMPLOSION_COMPRESSOR = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:implosion_compressor"));
|
||||
public static final RebornRecipeType<RebornRecipe> INDUSTRIAL_ELECTROLYZER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:industrial_electrolyzer"));
|
||||
public static final RebornRecipeType<IndustrialGrinderRecipe> INDUSTRIAL_GRINDER = RecipeManager.newRecipeType(IndustrialGrinderRecipe.class, new Identifier("techreborn:industrial_grinder"));
|
||||
public static final RebornRecipeType<IndustrialSawmillRecipe> INDUSTRIAL_SAWMILL = RecipeManager.newRecipeType(IndustrialSawmillRecipe.class, new Identifier("techreborn:industrial_sawmill"));
|
||||
public static final RebornRecipeType<RebornRecipe> RECYCLER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:recycler"));
|
||||
public static final RebornRecipeType<RebornRecipe> SCRAPBOX = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:scrapbox"));
|
||||
public static final RebornRecipeType<RebornRecipe> VACUUM_FREEZER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:vacuum_freezer"));
|
||||
public static final RebornRecipeType<FluidReplicatorRecipe> FLUID_REPLICATOR = RecipeManager.newRecipeType(FluidReplicatorRecipe.class, new Identifier("techreborn:fluid_replicator"));
|
||||
public static final RebornRecipeType<FusionReactorRecipe> FUSION_REACTOR = RecipeManager.newRecipeType(FusionReactorRecipe.class, new Identifier("techreborn:fusion_reactor"));
|
||||
public static final RebornRecipeType<RollingMachineRecipe> ROLLING_MACHINE = RecipeManager.newRecipeType(RollingMachineRecipe.class, new Identifier("techreborn:rolling_machine"));
|
||||
public static final RebornRecipeType<RebornRecipe> SOLID_CANNING_MACHINE = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:solid_canning_machine"));
|
||||
public static final RebornRecipeType<RebornRecipe> WIRE_MILL = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:wire_mill"));
|
||||
public static final RebornRecipeType<RebornRecipe> ALLOY_SMELTER = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:alloy_smelter"));
|
||||
public static final RebornRecipeType<RebornRecipe> ASSEMBLING_MACHINE = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:assembling_machine"));
|
||||
public static final RebornRecipeType<BlastFurnaceRecipe> BLAST_FURNACE = RecipeManager.newRecipeType(BlastFurnaceRecipe::new, new Identifier("techreborn:blast_furnace"));
|
||||
public static final RebornRecipeType<RebornRecipe> CENTRIFUGE = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:centrifuge"));
|
||||
public static final RebornRecipeType<RebornRecipe> CHEMICAL_REACTOR = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:chemical_reactor"));
|
||||
public static final RebornRecipeType<RebornRecipe> COMPRESSOR = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:compressor"));
|
||||
public static final RebornRecipeType<RebornRecipe> DISTILLATION_TOWER = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:distillation_tower"));
|
||||
public static final RebornRecipeType<RebornRecipe> EXTRACTOR = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:extractor"));
|
||||
public static final RebornRecipeType<RebornRecipe> GRINDER = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:grinder"));
|
||||
public static final RebornRecipeType<RebornRecipe> IMPLOSION_COMPRESSOR = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:implosion_compressor"));
|
||||
public static final RebornRecipeType<RebornRecipe> INDUSTRIAL_ELECTROLYZER = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:industrial_electrolyzer"));
|
||||
public static final RebornRecipeType<IndustrialGrinderRecipe> INDUSTRIAL_GRINDER = RecipeManager.newRecipeType(IndustrialGrinderRecipe::new, new Identifier("techreborn:industrial_grinder"));
|
||||
public static final RebornRecipeType<IndustrialSawmillRecipe> INDUSTRIAL_SAWMILL = RecipeManager.newRecipeType(IndustrialSawmillRecipe::new, new Identifier("techreborn:industrial_sawmill"));
|
||||
public static final RebornRecipeType<RebornRecipe> RECYCLER = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:recycler"));
|
||||
public static final RebornRecipeType<RebornRecipe> SCRAPBOX = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:scrapbox"));
|
||||
public static final RebornRecipeType<RebornRecipe> VACUUM_FREEZER = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:vacuum_freezer"));
|
||||
public static final RebornRecipeType<FluidReplicatorRecipe> FLUID_REPLICATOR = RecipeManager.newRecipeType(FluidReplicatorRecipe::new, new Identifier("techreborn:fluid_replicator"));
|
||||
public static final RebornRecipeType<FusionReactorRecipe> FUSION_REACTOR = RecipeManager.newRecipeType(FusionReactorRecipe::new, new Identifier("techreborn:fusion_reactor"));
|
||||
public static final RebornRecipeType<RollingMachineRecipe> ROLLING_MACHINE = RecipeManager.newRecipeType(RollingMachineRecipe::new, new Identifier("techreborn:rolling_machine"));
|
||||
public static final RebornRecipeType<RebornRecipe> SOLID_CANNING_MACHINE = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:solid_canning_machine"));
|
||||
public static final RebornRecipeType<RebornRecipe> WIRE_MILL = RecipeManager.newRecipeType(RebornRecipe::new, new Identifier("techreborn:wire_mill"));
|
||||
|
||||
public static RebornRecipeType<?> byName(Identifier identifier){
|
||||
return (RebornRecipeType<?>) Registry.RECIPE_SERIALIZER.get(identifier);
|
||||
|
|
|
@ -74,91 +74,84 @@ import techreborn.blockentity.transformers.MVTransformerBlockEntity;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TRBlockEntities {
|
||||
|
||||
private static List<BlockEntityType<?>> TYPES = new ArrayList<>();
|
||||
|
||||
|
||||
public static final BlockEntityType<StorageUnitBaseBlockEntity> STORAGE_UNIT = register(StorageUnitBaseBlockEntity.class, "storage_unit", TRContent.StorageUnit.values());
|
||||
public static final BlockEntityType<TankUnitBaseBlockEntity> TANK_UNIT = register(TankUnitBaseBlockEntity.class, "tank_unit", TRContent.TankUnit.values());
|
||||
public static final BlockEntityType<QuantumTankBlockEntity> QUANTUM_TANK = register(QuantumTankBlockEntity.class, "quantum_tank", TRContent.Machine.QUANTUM_TANK);
|
||||
public static final BlockEntityType<QuantumChestBlockEntity> QUANTUM_CHEST = register(QuantumChestBlockEntity.class, "quantum_chest", TRContent.Machine.QUANTUM_CHEST);
|
||||
public static final BlockEntityType<DigitalChestBlockEntity> DIGITAL_CHEST = register(DigitalChestBlockEntity.class, "digital_chest", TRContent.Machine.DIGITAL_CHEST);
|
||||
public static final BlockEntityType<CreativeQuantumChestBlockEntity> CREATIVE_QUANTUM_CHEST = register(CreativeQuantumChestBlockEntity.class, "creative_quantum_chest", TRContent.Machine.CREATIVE_QUANTUM_CHEST);
|
||||
public static final BlockEntityType<CreativeQuantumTankBlockEntity> CREATIVE_QUANTUM_TANK = register(CreativeQuantumTankBlockEntity.class, "creative_quantum_tank", TRContent.Machine.CREATIVE_QUANTUM_TANK);
|
||||
public static final BlockEntityType<DrainBlockEntity> DRAIN = register(DrainBlockEntity.class, "drain", TRContent.Machine.DRAIN);
|
||||
public static final BlockEntityType<ThermalGeneratorBlockEntity> THERMAL_GEN = register(ThermalGeneratorBlockEntity.class, "thermal_generator", TRContent.Machine.THERMAL_GENERATOR);
|
||||
public static final BlockEntityType<IndustrialCentrifugeBlockEntity> INDUSTRIAL_CENTRIFUGE = register(IndustrialCentrifugeBlockEntity.class, "industrial_centrifuge", TRContent.Machine.INDUSTRIAL_CENTRIFUGE);
|
||||
public static final BlockEntityType<RollingMachineBlockEntity> ROLLING_MACHINE = register(RollingMachineBlockEntity.class, "rolling_machine", TRContent.Machine.ROLLING_MACHINE);
|
||||
public static final BlockEntityType<IndustrialBlastFurnaceBlockEntity> INDUSTRIAL_BLAST_FURNACE = register(IndustrialBlastFurnaceBlockEntity.class, "industrial_blast_furnace", TRContent.Machine.INDUSTRIAL_BLAST_FURNACE);
|
||||
public static final BlockEntityType<AlloySmelterBlockEntity> ALLOY_SMELTER = register(AlloySmelterBlockEntity.class, "alloy_smelter", TRContent.Machine.ALLOY_SMELTER);
|
||||
public static final BlockEntityType<IndustrialGrinderBlockEntity> INDUSTRIAL_GRINDER = register(IndustrialGrinderBlockEntity.class, "industrial_grinder", TRContent.Machine.INDUSTRIAL_GRINDER);
|
||||
public static final BlockEntityType<ImplosionCompressorBlockEntity> IMPLOSION_COMPRESSOR = register(ImplosionCompressorBlockEntity.class, "implosion_compressor", TRContent.Machine.IMPLOSION_COMPRESSOR);
|
||||
public static final BlockEntityType<MatterFabricatorBlockEntity> MATTER_FABRICATOR = register(MatterFabricatorBlockEntity.class, "matter_fabricator", TRContent.Machine.MATTER_FABRICATOR);
|
||||
public static final BlockEntityType<ChunkLoaderBlockEntity> CHUNK_LOADER = register(ChunkLoaderBlockEntity.class, "chunk_loader", TRContent.Machine.CHUNK_LOADER);
|
||||
public static final BlockEntityType<ChargeOMatBlockEntity> CHARGE_O_MAT = register(ChargeOMatBlockEntity.class, "charge_o_mat", TRContent.Machine.CHARGE_O_MAT);
|
||||
public static final BlockEntityType<PlayerDectectorBlockEntity> PLAYER_DETECTOR = register(PlayerDectectorBlockEntity.class, "player_detector", TRContent.Machine.PLAYER_DETECTOR);
|
||||
public static final BlockEntityType<CableBlockEntity> CABLE = register(CableBlockEntity.class, "cable", TRContent.Cables.values());
|
||||
public static final BlockEntityType<MachineCasingBlockEntity> MACHINE_CASINGS = register(MachineCasingBlockEntity.class, "machine_casing", TRContent.MachineBlocks.getCasings());
|
||||
public static final BlockEntityType<DragonEggSyphonBlockEntity> DRAGON_EGG_SYPHON = register(DragonEggSyphonBlockEntity.class, "dragon_egg_syphon", TRContent.Machine.DRAGON_EGG_SYPHON);
|
||||
public static final BlockEntityType<AssemblingMachineBlockEntity> ASSEMBLY_MACHINE = register(AssemblingMachineBlockEntity.class, "assembly_machine", TRContent.Machine.ASSEMBLY_MACHINE);
|
||||
public static final BlockEntityType<DieselGeneratorBlockEntity> DIESEL_GENERATOR = register(DieselGeneratorBlockEntity.class, "diesel_generator", TRContent.Machine.DIESEL_GENERATOR);
|
||||
public static final BlockEntityType<IndustrialElectrolyzerBlockEntity> INDUSTRIAL_ELECTROLYZER = register(IndustrialElectrolyzerBlockEntity.class, "industrial_electrolyzer", TRContent.Machine.INDUSTRIAL_ELECTROLYZER);
|
||||
public static final BlockEntityType<SemiFluidGeneratorBlockEntity> SEMI_FLUID_GENERATOR = register(SemiFluidGeneratorBlockEntity.class, "semi_fluid_generator", TRContent.Machine.SEMI_FLUID_GENERATOR);
|
||||
public static final BlockEntityType<GasTurbineBlockEntity> GAS_TURBINE = register(GasTurbineBlockEntity.class, "gas_turbine", TRContent.Machine.GAS_TURBINE);
|
||||
public static final BlockEntityType<IronAlloyFurnaceBlockEntity> IRON_ALLOY_FURNACE = register(IronAlloyFurnaceBlockEntity.class, "iron_alloy_furnace", TRContent.Machine.IRON_ALLOY_FURNACE);
|
||||
public static final BlockEntityType<ChemicalReactorBlockEntity> CHEMICAL_REACTOR = register(ChemicalReactorBlockEntity.class, "chemical_reactor", TRContent.Machine.CHEMICAL_REACTOR);
|
||||
public static final BlockEntityType<InterdimensionalSUBlockEntity> INTERDIMENSIONAL_SU = register(InterdimensionalSUBlockEntity.class, "interdimensional_su", TRContent.Machine.INTERDIMENSIONAL_SU);
|
||||
public static final BlockEntityType<AdjustableSUBlockEntity> ADJUSTABLE_SU = register(AdjustableSUBlockEntity.class, "adjustable_su", TRContent.Machine.ADJUSTABLE_SU);
|
||||
public static final BlockEntityType<LapotronicSUBlockEntity> LAPOTRONIC_SU = register(LapotronicSUBlockEntity.class, "lapotronic_su", TRContent.Machine.LAPOTRONIC_SU);
|
||||
public static final BlockEntityType<LSUStorageBlockEntity> LSU_STORAGE = register(LSUStorageBlockEntity.class, "lsu_storage", TRContent.Machine.LSU_STORAGE);
|
||||
public static final BlockEntityType<DistillationTowerBlockEntity> DISTILLATION_TOWER = register(DistillationTowerBlockEntity.class, "distillation_tower", TRContent.Machine.DISTILLATION_TOWER);
|
||||
public static final BlockEntityType<VacuumFreezerBlockEntity> VACUUM_FREEZER = register(VacuumFreezerBlockEntity.class, "vacuum_freezer", TRContent.Machine.VACUUM_FREEZER);
|
||||
public static final BlockEntityType<FusionControlComputerBlockEntity> FUSION_CONTROL_COMPUTER = register(FusionControlComputerBlockEntity.class, "fusion_control_computer", TRContent.Machine.FUSION_CONTROL_COMPUTER);
|
||||
public static final BlockEntityType<LightningRodBlockEntity> LIGHTNING_ROD = register(LightningRodBlockEntity.class, "lightning_rod", TRContent.Machine.LIGHTNING_ROD);
|
||||
public static final BlockEntityType<IndustrialSawmillBlockEntity> INDUSTRIAL_SAWMILL = register(IndustrialSawmillBlockEntity.class, "industrial_sawmill", TRContent.Machine.INDUSTRIAL_SAWMILL);
|
||||
public static final BlockEntityType<SolidFuelGeneratorBlockEntity> SOLID_FUEL_GENEREATOR = register(SolidFuelGeneratorBlockEntity.class, "solid_fuel_generator", TRContent.Machine.SOLID_FUEL_GENERATOR);
|
||||
public static final BlockEntityType<ExtractorBlockEntity> EXTRACTOR = register(ExtractorBlockEntity.class, "extractor", TRContent.Machine.EXTRACTOR);
|
||||
public static final BlockEntityType<CompressorBlockEntity> COMPRESSOR = register(CompressorBlockEntity.class, "compressor", TRContent.Machine.COMPRESSOR);
|
||||
public static final BlockEntityType<ElectricFurnaceBlockEntity> ELECTRIC_FURNACE = register(ElectricFurnaceBlockEntity.class, "electric_furnace", TRContent.Machine.ELECTRIC_FURNACE);
|
||||
public static final BlockEntityType<SolarPanelBlockEntity> SOLAR_PANEL = register(SolarPanelBlockEntity.class, "solar_panel", TRContent.SolarPanels.values());
|
||||
public static final BlockEntityType<WaterMillBlockEntity> WATER_MILL = register(WaterMillBlockEntity.class, "water_mill", TRContent.Machine.WATER_MILL);
|
||||
public static final BlockEntityType<WindMillBlockEntity> WIND_MILL = register(WindMillBlockEntity.class, "wind_mill", TRContent.Machine.WIND_MILL);
|
||||
public static final BlockEntityType<RecyclerBlockEntity> RECYCLER = register(RecyclerBlockEntity.class, "recycler", TRContent.Machine.RECYCLER);
|
||||
public static final BlockEntityType<LowVoltageSUBlockEntity> LOW_VOLTAGE_SU = register(LowVoltageSUBlockEntity.class, "low_voltage_su", TRContent.Machine.LOW_VOLTAGE_SU);
|
||||
public static final BlockEntityType<MediumVoltageSUBlockEntity> MEDIUM_VOLTAGE_SU = register(MediumVoltageSUBlockEntity.class, "medium_voltage_su", TRContent.Machine.MEDIUM_VOLTAGE_SU);
|
||||
public static final BlockEntityType<HighVoltageSUBlockEntity> HIGH_VOLTAGE_SU = register(HighVoltageSUBlockEntity.class, "high_voltage_su", TRContent.Machine.HIGH_VOLTAGE_SU);
|
||||
public static final BlockEntityType<LVTransformerBlockEntity> LV_TRANSFORMER = register(LVTransformerBlockEntity.class, "lv_transformer", TRContent.Machine.LV_TRANSFORMER);
|
||||
public static final BlockEntityType<MVTransformerBlockEntity> MV_TRANSFORMER = register(MVTransformerBlockEntity.class, "mv_transformer", TRContent.Machine.MV_TRANSFORMER);
|
||||
public static final BlockEntityType<HVTransformerBlockEntity> HV_TRANSFORMER = register(HVTransformerBlockEntity.class, "hv_transformer", TRContent.Machine.HV_TRANSFORMER);
|
||||
public static final BlockEntityType<EVTransformerBlockEntity> EV_TRANSFORMER = register(EVTransformerBlockEntity.class, "ev_transformer", TRContent.Machine.EV_TRANSFORMER);
|
||||
public static final BlockEntityType<AutoCraftingTableBlockEntity> AUTO_CRAFTING_TABLE = register(AutoCraftingTableBlockEntity.class, "auto_crafting_table", TRContent.Machine.AUTO_CRAFTING_TABLE);
|
||||
public static final BlockEntityType<IronFurnaceBlockEntity> IRON_FURNACE = register(IronFurnaceBlockEntity.class, "iron_furnace", TRContent.Machine.IRON_FURNACE);
|
||||
public static final BlockEntityType<ScrapboxinatorBlockEntity> SCRAPBOXINATOR = register(ScrapboxinatorBlockEntity.class, "scrapboxinator", TRContent.Machine.SCRAPBOXINATOR);
|
||||
public static final BlockEntityType<PlasmaGeneratorBlockEntity> PLASMA_GENERATOR = register(PlasmaGeneratorBlockEntity.class, "plasma_generator", TRContent.Machine.PLASMA_GENERATOR);
|
||||
public static final BlockEntityType<LampBlockEntity> LAMP = register(LampBlockEntity.class, "lamp", TRContent.Machine.LAMP_INCANDESCENT, TRContent.Machine.LAMP_LED);
|
||||
public static final BlockEntityType<AlarmBlockEntity> ALARM = register(AlarmBlockEntity.class, "alarm", TRContent.Machine.ALARM);
|
||||
public static final BlockEntityType<FluidReplicatorBlockEntity> FLUID_REPLICATOR = register(FluidReplicatorBlockEntity.class, "fluid_replicator", TRContent.Machine.FLUID_REPLICATOR);
|
||||
public static final BlockEntityType<SoildCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register(SoildCanningMachineBlockEntity.class, "solid_canning_machine", TRContent.Machine.SOLID_CANNING_MACHINE);
|
||||
public static final BlockEntityType<WireMillBlockEntity> WIRE_MILL = register(WireMillBlockEntity.class, "wire_mill", TRContent.Machine.WIRE_MILL);
|
||||
public static final BlockEntityType<GreenhouseControllerBlockEntity> GREENHOUSE_CONTROLLER = register(GreenhouseControllerBlockEntity.class, "greenhouse_controller", TRContent.Machine.GREENHOUSE_CONTROLLER);
|
||||
public static final BlockEntityType<StorageUnitBaseBlockEntity> STORAGE_UNIT = register(StorageUnitBaseBlockEntity::new, "storage_unit", TRContent.StorageUnit.values());
|
||||
public static final BlockEntityType<TankUnitBaseBlockEntity> TANK_UNIT = register(TankUnitBaseBlockEntity::new, "tank_unit", TRContent.TankUnit.values());
|
||||
public static final BlockEntityType<QuantumTankBlockEntity> QUANTUM_TANK = register(QuantumTankBlockEntity::new, "quantum_tank", TRContent.Machine.QUANTUM_TANK);
|
||||
public static final BlockEntityType<QuantumChestBlockEntity> QUANTUM_CHEST = register(QuantumChestBlockEntity::new, "quantum_chest", TRContent.Machine.QUANTUM_CHEST);
|
||||
public static final BlockEntityType<DigitalChestBlockEntity> DIGITAL_CHEST = register(DigitalChestBlockEntity::new, "digital_chest", TRContent.Machine.DIGITAL_CHEST);
|
||||
public static final BlockEntityType<CreativeQuantumChestBlockEntity> CREATIVE_QUANTUM_CHEST = register(CreativeQuantumChestBlockEntity::new, "creative_quantum_chest", TRContent.Machine.CREATIVE_QUANTUM_CHEST);
|
||||
public static final BlockEntityType<CreativeQuantumTankBlockEntity> CREATIVE_QUANTUM_TANK = register(CreativeQuantumTankBlockEntity::new, "creative_quantum_tank", TRContent.Machine.CREATIVE_QUANTUM_TANK);
|
||||
public static final BlockEntityType<DrainBlockEntity> DRAIN = register(DrainBlockEntity::new, "drain", TRContent.Machine.DRAIN);
|
||||
public static final BlockEntityType<ThermalGeneratorBlockEntity> THERMAL_GEN = register(ThermalGeneratorBlockEntity::new, "thermal_generator", TRContent.Machine.THERMAL_GENERATOR);
|
||||
public static final BlockEntityType<IndustrialCentrifugeBlockEntity> INDUSTRIAL_CENTRIFUGE = register(IndustrialCentrifugeBlockEntity::new, "industrial_centrifuge", TRContent.Machine.INDUSTRIAL_CENTRIFUGE);
|
||||
public static final BlockEntityType<RollingMachineBlockEntity> ROLLING_MACHINE = register(RollingMachineBlockEntity::new, "rolling_machine", TRContent.Machine.ROLLING_MACHINE);
|
||||
public static final BlockEntityType<IndustrialBlastFurnaceBlockEntity> INDUSTRIAL_BLAST_FURNACE = register(IndustrialBlastFurnaceBlockEntity::new, "industrial_blast_furnace", TRContent.Machine.INDUSTRIAL_BLAST_FURNACE);
|
||||
public static final BlockEntityType<AlloySmelterBlockEntity> ALLOY_SMELTER = register(AlloySmelterBlockEntity::new, "alloy_smelter", TRContent.Machine.ALLOY_SMELTER);
|
||||
public static final BlockEntityType<IndustrialGrinderBlockEntity> INDUSTRIAL_GRINDER = register(IndustrialGrinderBlockEntity::new, "industrial_grinder", TRContent.Machine.INDUSTRIAL_GRINDER);
|
||||
public static final BlockEntityType<ImplosionCompressorBlockEntity> IMPLOSION_COMPRESSOR = register(ImplosionCompressorBlockEntity::new, "implosion_compressor", TRContent.Machine.IMPLOSION_COMPRESSOR);
|
||||
public static final BlockEntityType<MatterFabricatorBlockEntity> MATTER_FABRICATOR = register(MatterFabricatorBlockEntity::new, "matter_fabricator", TRContent.Machine.MATTER_FABRICATOR);
|
||||
public static final BlockEntityType<ChunkLoaderBlockEntity> CHUNK_LOADER = register(ChunkLoaderBlockEntity::new, "chunk_loader", TRContent.Machine.CHUNK_LOADER);
|
||||
public static final BlockEntityType<ChargeOMatBlockEntity> CHARGE_O_MAT = register(ChargeOMatBlockEntity::new, "charge_o_mat", TRContent.Machine.CHARGE_O_MAT);
|
||||
public static final BlockEntityType<PlayerDectectorBlockEntity> PLAYER_DETECTOR = register(PlayerDectectorBlockEntity::new, "player_detector", TRContent.Machine.PLAYER_DETECTOR);
|
||||
public static final BlockEntityType<CableBlockEntity> CABLE = register(CableBlockEntity::new, "cable", TRContent.Cables.values());
|
||||
public static final BlockEntityType<MachineCasingBlockEntity> MACHINE_CASINGS = register(MachineCasingBlockEntity::new, "machine_casing", TRContent.MachineBlocks.getCasings());
|
||||
public static final BlockEntityType<DragonEggSyphonBlockEntity> DRAGON_EGG_SYPHON = register(DragonEggSyphonBlockEntity::new, "dragon_egg_syphon", TRContent.Machine.DRAGON_EGG_SYPHON);
|
||||
public static final BlockEntityType<AssemblingMachineBlockEntity> ASSEMBLY_MACHINE = register(AssemblingMachineBlockEntity::new, "assembly_machine", TRContent.Machine.ASSEMBLY_MACHINE);
|
||||
public static final BlockEntityType<DieselGeneratorBlockEntity> DIESEL_GENERATOR = register(DieselGeneratorBlockEntity::new, "diesel_generator", TRContent.Machine.DIESEL_GENERATOR);
|
||||
public static final BlockEntityType<IndustrialElectrolyzerBlockEntity> INDUSTRIAL_ELECTROLYZER = register(IndustrialElectrolyzerBlockEntity::new, "industrial_electrolyzer", TRContent.Machine.INDUSTRIAL_ELECTROLYZER);
|
||||
public static final BlockEntityType<SemiFluidGeneratorBlockEntity> SEMI_FLUID_GENERATOR = register(SemiFluidGeneratorBlockEntity::new, "semi_fluid_generator", TRContent.Machine.SEMI_FLUID_GENERATOR);
|
||||
public static final BlockEntityType<GasTurbineBlockEntity> GAS_TURBINE = register(GasTurbineBlockEntity::new, "gas_turbine", TRContent.Machine.GAS_TURBINE);
|
||||
public static final BlockEntityType<IronAlloyFurnaceBlockEntity> IRON_ALLOY_FURNACE = register(IronAlloyFurnaceBlockEntity::new, "iron_alloy_furnace", TRContent.Machine.IRON_ALLOY_FURNACE);
|
||||
public static final BlockEntityType<ChemicalReactorBlockEntity> CHEMICAL_REACTOR = register(ChemicalReactorBlockEntity::new, "chemical_reactor", TRContent.Machine.CHEMICAL_REACTOR);
|
||||
public static final BlockEntityType<InterdimensionalSUBlockEntity> INTERDIMENSIONAL_SU = register(InterdimensionalSUBlockEntity::new, "interdimensional_su", TRContent.Machine.INTERDIMENSIONAL_SU);
|
||||
public static final BlockEntityType<AdjustableSUBlockEntity> ADJUSTABLE_SU = register(AdjustableSUBlockEntity::new, "adjustable_su", TRContent.Machine.ADJUSTABLE_SU);
|
||||
public static final BlockEntityType<LapotronicSUBlockEntity> LAPOTRONIC_SU = register(LapotronicSUBlockEntity::new, "lapotronic_su", TRContent.Machine.LAPOTRONIC_SU);
|
||||
public static final BlockEntityType<LSUStorageBlockEntity> LSU_STORAGE = register(LSUStorageBlockEntity::new, "lsu_storage", TRContent.Machine.LSU_STORAGE);
|
||||
public static final BlockEntityType<DistillationTowerBlockEntity> DISTILLATION_TOWER = register(DistillationTowerBlockEntity::new, "distillation_tower", TRContent.Machine.DISTILLATION_TOWER);
|
||||
public static final BlockEntityType<VacuumFreezerBlockEntity> VACUUM_FREEZER = register(VacuumFreezerBlockEntity::new, "vacuum_freezer", TRContent.Machine.VACUUM_FREEZER);
|
||||
public static final BlockEntityType<FusionControlComputerBlockEntity> FUSION_CONTROL_COMPUTER = register(FusionControlComputerBlockEntity::new, "fusion_control_computer", TRContent.Machine.FUSION_CONTROL_COMPUTER);
|
||||
public static final BlockEntityType<LightningRodBlockEntity> LIGHTNING_ROD = register(LightningRodBlockEntity::new, "lightning_rod", TRContent.Machine.LIGHTNING_ROD);
|
||||
public static final BlockEntityType<IndustrialSawmillBlockEntity> INDUSTRIAL_SAWMILL = register(IndustrialSawmillBlockEntity::new, "industrial_sawmill", TRContent.Machine.INDUSTRIAL_SAWMILL);
|
||||
public static final BlockEntityType<SolidFuelGeneratorBlockEntity> SOLID_FUEL_GENEREATOR = register(SolidFuelGeneratorBlockEntity::new, "solid_fuel_generator", TRContent.Machine.SOLID_FUEL_GENERATOR);
|
||||
public static final BlockEntityType<ExtractorBlockEntity> EXTRACTOR = register(ExtractorBlockEntity::new, "extractor", TRContent.Machine.EXTRACTOR);
|
||||
public static final BlockEntityType<CompressorBlockEntity> COMPRESSOR = register(CompressorBlockEntity::new, "compressor", TRContent.Machine.COMPRESSOR);
|
||||
public static final BlockEntityType<ElectricFurnaceBlockEntity> ELECTRIC_FURNACE = register(ElectricFurnaceBlockEntity::new, "electric_furnace", TRContent.Machine.ELECTRIC_FURNACE);
|
||||
public static final BlockEntityType<SolarPanelBlockEntity> SOLAR_PANEL = register(SolarPanelBlockEntity::new, "solar_panel", TRContent.SolarPanels.values());
|
||||
public static final BlockEntityType<WaterMillBlockEntity> WATER_MILL = register(WaterMillBlockEntity::new, "water_mill", TRContent.Machine.WATER_MILL);
|
||||
public static final BlockEntityType<WindMillBlockEntity> WIND_MILL = register(WindMillBlockEntity::new, "wind_mill", TRContent.Machine.WIND_MILL);
|
||||
public static final BlockEntityType<RecyclerBlockEntity> RECYCLER = register(RecyclerBlockEntity::new, "recycler", TRContent.Machine.RECYCLER);
|
||||
public static final BlockEntityType<LowVoltageSUBlockEntity> LOW_VOLTAGE_SU = register(LowVoltageSUBlockEntity::new, "low_voltage_su", TRContent.Machine.LOW_VOLTAGE_SU);
|
||||
public static final BlockEntityType<MediumVoltageSUBlockEntity> MEDIUM_VOLTAGE_SU = register(MediumVoltageSUBlockEntity::new, "medium_voltage_su", TRContent.Machine.MEDIUM_VOLTAGE_SU);
|
||||
public static final BlockEntityType<HighVoltageSUBlockEntity> HIGH_VOLTAGE_SU = register(HighVoltageSUBlockEntity::new, "high_voltage_su", TRContent.Machine.HIGH_VOLTAGE_SU);
|
||||
public static final BlockEntityType<LVTransformerBlockEntity> LV_TRANSFORMER = register(LVTransformerBlockEntity::new, "lv_transformer", TRContent.Machine.LV_TRANSFORMER);
|
||||
public static final BlockEntityType<MVTransformerBlockEntity> MV_TRANSFORMER = register(MVTransformerBlockEntity::new, "mv_transformer", TRContent.Machine.MV_TRANSFORMER);
|
||||
public static final BlockEntityType<HVTransformerBlockEntity> HV_TRANSFORMER = register(HVTransformerBlockEntity::new, "hv_transformer", TRContent.Machine.HV_TRANSFORMER);
|
||||
public static final BlockEntityType<EVTransformerBlockEntity> EV_TRANSFORMER = register(EVTransformerBlockEntity::new, "ev_transformer", TRContent.Machine.EV_TRANSFORMER);
|
||||
public static final BlockEntityType<AutoCraftingTableBlockEntity> AUTO_CRAFTING_TABLE = register(AutoCraftingTableBlockEntity::new, "auto_crafting_table", TRContent.Machine.AUTO_CRAFTING_TABLE);
|
||||
public static final BlockEntityType<IronFurnaceBlockEntity> IRON_FURNACE = register(IronFurnaceBlockEntity::new, "iron_furnace", TRContent.Machine.IRON_FURNACE);
|
||||
public static final BlockEntityType<ScrapboxinatorBlockEntity> SCRAPBOXINATOR = register(ScrapboxinatorBlockEntity::new, "scrapboxinator", TRContent.Machine.SCRAPBOXINATOR);
|
||||
public static final BlockEntityType<PlasmaGeneratorBlockEntity> PLASMA_GENERATOR = register(PlasmaGeneratorBlockEntity::new, "plasma_generator", TRContent.Machine.PLASMA_GENERATOR);
|
||||
public static final BlockEntityType<LampBlockEntity> LAMP = register(LampBlockEntity::new, "lamp", TRContent.Machine.LAMP_INCANDESCENT, TRContent.Machine.LAMP_LED);
|
||||
public static final BlockEntityType<AlarmBlockEntity> ALARM = register(AlarmBlockEntity::new, "alarm", TRContent.Machine.ALARM);
|
||||
public static final BlockEntityType<FluidReplicatorBlockEntity> FLUID_REPLICATOR = register(FluidReplicatorBlockEntity::new, "fluid_replicator", TRContent.Machine.FLUID_REPLICATOR);
|
||||
public static final BlockEntityType<SoildCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register(SoildCanningMachineBlockEntity::new, "solid_canning_machine", TRContent.Machine.SOLID_CANNING_MACHINE);
|
||||
public static final BlockEntityType<WireMillBlockEntity> WIRE_MILL = register(WireMillBlockEntity::new, "wire_mill", TRContent.Machine.WIRE_MILL);
|
||||
public static final BlockEntityType<GreenhouseControllerBlockEntity> GREENHOUSE_CONTROLLER = register(GreenhouseControllerBlockEntity::new, "greenhouse_controller", TRContent.Machine.GREENHOUSE_CONTROLLER);
|
||||
|
||||
public static <T extends BlockEntity> BlockEntityType<T> register(Class<T> tClass, String name, ItemConvertible... items) {
|
||||
return register(tClass, name, Arrays.stream(items).map(itemConvertible -> Block.getBlockFromItem(itemConvertible.asItem())).toArray(Block[]::new));
|
||||
public static <T extends BlockEntity> BlockEntityType<T> register(Supplier<T> supplier, String name, ItemConvertible... items) {
|
||||
return register(supplier, name, Arrays.stream(items).map(itemConvertible -> Block.getBlockFromItem(itemConvertible.asItem())).toArray(Block[]::new));
|
||||
}
|
||||
|
||||
public static <T extends BlockEntity> BlockEntityType<T> register(Class<T> tClass, String name, Block... blocks) {
|
||||
public static <T extends BlockEntity> BlockEntityType<T> register(Supplier<T> supplier, 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 extends BlockEntity> T createBlockEntity(Class<T> tClass){
|
||||
try {
|
||||
return tClass.newInstance();
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
throw new RuntimeException("Failed to createBlockEntity blockEntity", e);
|
||||
}
|
||||
return register(new Identifier(TechReborn.MOD_ID, name).toString(), BlockEntityType.Builder.create(supplier, blocks));
|
||||
}
|
||||
|
||||
public static <T extends BlockEntity> BlockEntityType<T> register(String id, BlockEntityType.Builder<T> builder) {
|
||||
|
|
Loading…
Add table
Reference in a new issue