2019-07-11 19:55:11 +02:00
|
|
|
package com.simibubi.create;
|
|
|
|
|
2020-03-29 04:10:23 +02:00
|
|
|
import java.util.function.Function;
|
2019-07-11 19:55:11 +02:00
|
|
|
import java.util.function.Supplier;
|
|
|
|
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.DrillRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.HarvesterRenderer;
|
|
|
|
import com.simibubi.create.content.contraptions.components.actors.HarvesterTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.clock.CuckooClockRenderer;
|
|
|
|
import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.crank.HandCrankRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.crank.HandCrankTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.deployer.DeployerRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.fan.EncasedFanRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.fan.EncasedFanTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.fan.NozzleTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelRenderer;
|
|
|
|
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineRenderer;
|
|
|
|
import com.simibubi.create.content.contraptions.components.flywheel.engine.FurnaceEngineTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.millstone.MillstoneRenderer;
|
|
|
|
import com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.saw.SawRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.saw.SawTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingRenderer;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkBearingTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyRenderer;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.turntable.TurntableTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.processing.BasinRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerRenderer;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.AdjustablePulleyTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.ClutchTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftRenderer;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearshiftTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.diodes.AdjustablePulseRepeaterTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterRenderer;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.extractor.ExtractorTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.extractor.LinkedExtractorTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer;
|
2020-05-28 01:29:26 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.transposer.LinkedTransposerTileEntity;
|
|
|
|
import com.simibubi.create.content.logistics.block.transposer.TransposerTileEntity;
|
|
|
|
import com.simibubi.create.content.schematics.block.SchematicTableTileEntity;
|
|
|
|
import com.simibubi.create.content.schematics.block.SchematicannonRenderer;
|
|
|
|
import com.simibubi.create.content.schematics.block.SchematicannonTileEntity;
|
|
|
|
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
2019-10-15 22:22:19 +02:00
|
|
|
import com.simibubi.create.foundation.utility.Lang;
|
2019-07-11 19:55:11 +02:00
|
|
|
|
2019-08-06 18:13:33 +02:00
|
|
|
import net.minecraft.block.Block;
|
2019-07-13 12:55:28 +02:00
|
|
|
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
2020-03-29 04:10:23 +02:00
|
|
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
2019-07-11 19:55:11 +02:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.tileentity.TileEntityType;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
2019-07-15 12:10:57 +02:00
|
|
|
import net.minecraftforge.api.distmarker.Dist;
|
|
|
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
2019-12-05 23:42:01 +01:00
|
|
|
import net.minecraftforge.event.RegistryEvent;
|
2019-07-13 12:55:28 +02:00
|
|
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
2019-07-11 19:55:11 +02:00
|
|
|
|
|
|
|
public enum AllTileEntities {
|
|
|
|
|
2019-08-06 18:13:33 +02:00
|
|
|
// Schematics
|
2020-05-22 20:12:53 +02:00
|
|
|
SCHEMATICANNON(SchematicannonTileEntity::new, AllBlocks.SCHEMATICANNON),
|
|
|
|
SCHEMATIC_TABLE(SchematicTableTileEntity::new, AllBlocks.SCHEMATIC_TABLE),
|
2019-07-11 19:55:11 +02:00
|
|
|
|
2019-08-06 18:13:33 +02:00
|
|
|
// Kinetics
|
2020-05-22 20:12:53 +02:00
|
|
|
SIMPLE_KINETIC(SimpleKineticTileEntity::new, AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL,
|
|
|
|
AllBlocks.ENCASED_SHAFT),
|
2020-05-25 23:09:36 +02:00
|
|
|
MOTOR(CreativeMotorTileEntity::new, AllBlocks.CREATIVE_MOTOR),
|
2020-05-22 20:12:53 +02:00
|
|
|
GEARBOX(GearboxTileEntity::new, AllBlocks.GEARBOX),
|
|
|
|
ENCASED_SHAFT(EncasedShaftTileEntity::new, AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT),
|
|
|
|
ADJUSTABLE_PULLEY(AdjustablePulleyTileEntity::new, AllBlocks.ADJUSTABLE_PULLEY),
|
|
|
|
ENCASED_FAN(EncasedFanTileEntity::new, AllBlocks.ENCASED_FAN),
|
|
|
|
NOZZLE(NozzleTileEntity::new, AllBlocks.NOZZLE),
|
|
|
|
CLUTCH(ClutchTileEntity::new, AllBlocks.CLUTCH),
|
|
|
|
GEARSHIFT(GearshiftTileEntity::new, AllBlocks.GEARSHIFT),
|
|
|
|
TURNTABLE(TurntableTileEntity::new, AllBlocks.TURNTABLE),
|
|
|
|
HAND_CRANK(HandCrankTileEntity::new, AllBlocks.HAND_CRANK),
|
|
|
|
CUCKOO_CLOCK(CuckooClockTileEntity::new, AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK),
|
|
|
|
|
|
|
|
BELT(BeltTileEntity::new, AllBlocks.BELT),
|
|
|
|
BELT_TUNNEL(BeltTunnelTileEntity::new, AllBlocks.BELT_TUNNEL),
|
|
|
|
MECHANICAL_PISTON(MechanicalPistonTileEntity::new, AllBlocks.MECHANICAL_PISTON,
|
|
|
|
AllBlocks.STICKY_MECHANICAL_PISTON),
|
|
|
|
MECHANICAL_BEARING(MechanicalBearingTileEntity::new, AllBlocks.MECHANICAL_BEARING),
|
|
|
|
CLOCKWORK_BEARING(ClockworkBearingTileEntity::new, AllBlocks.CLOCKWORK_BEARING),
|
|
|
|
ROPE_PULLEY(PulleyTileEntity::new, AllBlocks.ROPE_PULLEY),
|
|
|
|
CHASSIS(ChassisTileEntity::new, AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS,
|
2020-05-31 19:17:00 +02:00
|
|
|
AllBlocks.SECONDARY_LINEAR_CHASSIS),
|
|
|
|
DRILL(DrillTileEntity::new, AllBlocks.MECHANICAL_DRILL),
|
|
|
|
SAW(SawTileEntity::new, AllBlocks.MECHANICAL_SAW),
|
|
|
|
HARVESTER(HarvesterTileEntity::new, AllBlocks.MECHANICAL_HARVESTER),
|
2020-05-22 20:12:53 +02:00
|
|
|
FLYWHEEL(FlywheelTileEntity::new, AllBlocks.FLYWHEEL),
|
|
|
|
FURNACE_ENGINE(FurnaceEngineTileEntity::new, AllBlocks.FURNACE_ENGINE),
|
|
|
|
|
|
|
|
MILLSTONE(MillstoneTileEntity::new, AllBlocks.MILLSTONE),
|
|
|
|
CRUSHING_WHEEL(CrushingWheelTileEntity::new, AllBlocks.CRUSHING_WHEEL),
|
|
|
|
CRUSHING_WHEEL_CONTROLLER(CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER),
|
|
|
|
WATER_WHEEL(WaterWheelTileEntity::new, AllBlocks.WATER_WHEEL),
|
|
|
|
MECHANICAL_PRESS(MechanicalPressTileEntity::new, AllBlocks.MECHANICAL_PRESS),
|
|
|
|
MECHANICAL_MIXER(MechanicalMixerTileEntity::new, AllBlocks.MECHANICAL_MIXER),
|
|
|
|
DEPLOYER(DeployerTileEntity::new, AllBlocks.DEPLOYER),
|
|
|
|
BASIN(BasinTileEntity::new, AllBlocks.BASIN),
|
|
|
|
MECHANICAL_CRAFTER(MechanicalCrafterTileEntity::new, AllBlocks.MECHANICAL_CRAFTER),
|
|
|
|
SEQUENCED_GEARSHIFT(SequencedGearshiftTileEntity::new, AllBlocks.SEQUENCED_GEARSHIFT),
|
|
|
|
ROTATION_SPEED_CONTROLLER(SpeedControllerTileEntity::new, AllBlocks.ROTATION_SPEED_CONTROLLER),
|
|
|
|
SPEEDOMETER(SpeedGaugeTileEntity::new, AllBlocks.SPEEDOMETER),
|
|
|
|
STRESSOMETER(StressGaugeTileEntity::new, AllBlocks.STRESSOMETER),
|
|
|
|
ANALOG_LEVER(AnalogLeverTileEntity::new, AllBlocks.ANALOG_LEVER),
|
|
|
|
CART_ASSEMBLER(CartAssemblerTileEntity::new, AllBlocks.CART_ASSEMBLER),
|
2019-08-17 00:57:36 +02:00
|
|
|
|
2019-08-25 10:14:15 +02:00
|
|
|
// Logistics
|
2020-05-22 20:12:53 +02:00
|
|
|
REDSTONE_LINK(RedstoneLinkTileEntity::new, AllBlocks.REDSTONE_LINK),
|
|
|
|
STOCKPILE_SWITCH(StockpileSwitchTileEntity::new, AllBlocks.STOCKPILE_SWITCH),
|
|
|
|
ADJUSTABLE_CRATE(AdjustableCrateTileEntity::new, AllBlocks.ADJUSTABLE_CRATE),
|
|
|
|
CREATIVE_CRATE(CreativeCrateTileEntity::new, AllBlocks.CREATIVE_CRATE),
|
|
|
|
EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR),
|
|
|
|
LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR,
|
|
|
|
AllBlocks.VERTICAL_LINKED_EXTRACTOR),
|
|
|
|
TRANSPOSER(TransposerTileEntity::new, AllBlocks.TRANSPOSER, AllBlocks.VERTICAL_TRANSPOSER),
|
|
|
|
LINKED_TRANSPOSER(LinkedTransposerTileEntity::new, AllBlocks.LINKED_TRANSPOSER,
|
|
|
|
AllBlocks.VERTICAL_LINKED_TRANSPOSER),
|
|
|
|
FUNNEL(FunnelTileEntity::new, AllBlocks.FUNNEL, AllBlocks.VERTICAL_FUNNEL),
|
|
|
|
BELT_OBSERVER(BeltObserverTileEntity::new, AllBlocks.BELT_OBSERVER),
|
|
|
|
ADJUSTABLE_REPEATER(AdjustableRepeaterTileEntity::new, AllBlocks.ADJUSTABLE_REPEATER),
|
|
|
|
ADJUSTABLE_PULSE_REPEATER(AdjustablePulseRepeaterTileEntity::new, AllBlocks.ADJUSTABLE_PULSE_REPEATER),
|
2019-10-11 05:56:32 +02:00
|
|
|
|
2019-08-26 20:21:03 +02:00
|
|
|
;
|
2019-08-28 19:45:41 +02:00
|
|
|
|
2019-07-11 19:55:11 +02:00
|
|
|
private Supplier<? extends TileEntity> supplier;
|
|
|
|
public TileEntityType<?> type;
|
2020-04-26 06:58:38 +02:00
|
|
|
private Supplier<? extends Block>[] blocks;
|
2019-07-11 19:55:11 +02:00
|
|
|
|
2020-04-26 06:58:38 +02:00
|
|
|
@SafeVarargs
|
|
|
|
private AllTileEntities(Supplier<? extends TileEntity> supplier, Supplier<? extends Block>... blocks) {
|
2019-07-11 19:55:11 +02:00
|
|
|
this.supplier = supplier;
|
2019-08-06 18:13:33 +02:00
|
|
|
this.blocks = blocks;
|
2019-07-11 19:55:11 +02:00
|
|
|
}
|
2019-10-18 13:14:03 +02:00
|
|
|
|
2019-10-11 05:56:32 +02:00
|
|
|
public boolean typeOf(TileEntity te) {
|
2020-05-21 00:15:02 +02:00
|
|
|
return te.getType()
|
|
|
|
.equals(type);
|
2019-10-11 05:56:32 +02:00
|
|
|
}
|
2019-07-11 19:55:11 +02:00
|
|
|
|
2019-12-05 23:42:01 +01:00
|
|
|
public static void register(RegistryEvent.Register<TileEntityType<?>> event) {
|
2019-07-11 19:55:11 +02:00
|
|
|
for (AllTileEntities tileEntity : values()) {
|
2019-08-06 18:13:33 +02:00
|
|
|
Block[] blocks = new Block[tileEntity.blocks.length];
|
|
|
|
for (int i = 0; i < blocks.length; i++)
|
2020-03-28 02:27:43 +01:00
|
|
|
blocks[i] = tileEntity.blocks[i].get();
|
2019-08-17 00:57:36 +02:00
|
|
|
|
2019-10-15 22:22:19 +02:00
|
|
|
ResourceLocation resourceLocation = new ResourceLocation(Create.ID, Lang.asId(tileEntity.name()));
|
2020-05-21 00:15:02 +02:00
|
|
|
tileEntity.type = TileEntityType.Builder.create(tileEntity.supplier, blocks)
|
|
|
|
.build(null)
|
|
|
|
.setRegistryName(resourceLocation);
|
|
|
|
event.getRegistry()
|
|
|
|
.register(tileEntity.type);
|
2019-07-11 19:55:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-15 12:10:57 +02:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2019-07-11 19:55:11 +02:00
|
|
|
public static void registerRenderers() {
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(SCHEMATICANNON, SchematicannonRenderer::new);
|
|
|
|
|
2020-05-22 20:02:07 +02:00
|
|
|
bind(SIMPLE_KINETIC, KineticTileEntityRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(TURNTABLE, KineticTileEntityRenderer::new);
|
2020-05-25 23:09:36 +02:00
|
|
|
bind(MOTOR, CreativeMotorRenderer::new);
|
|
|
|
bind(ENCASED_SHAFT, EncasedShaftRenderer::new);
|
|
|
|
bind(ADJUSTABLE_PULLEY, EncasedShaftRenderer::new);
|
|
|
|
bind(DRILL, DrillRenderer::new);
|
|
|
|
bind(SAW, SawRenderer::new);
|
|
|
|
bind(ENCASED_FAN, EncasedFanRenderer::new);
|
|
|
|
bind(GEARBOX, GearboxRenderer::new);
|
|
|
|
bind(GEARSHIFT, SplitShaftRenderer::new);
|
|
|
|
bind(CLUTCH, SplitShaftRenderer::new);
|
|
|
|
bind(SEQUENCED_GEARSHIFT, SplitShaftRenderer::new);
|
|
|
|
bind(BELT, BeltRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(WATER_WHEEL, KineticTileEntityRenderer::new);
|
2020-05-25 23:09:36 +02:00
|
|
|
bind(HAND_CRANK, HandCrankRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(CUCKOO_CLOCK, CuckooClockRenderer::new);
|
2020-05-25 23:09:36 +02:00
|
|
|
bind(ANALOG_LEVER, AnalogLeverRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
|
2020-05-25 23:09:36 +02:00
|
|
|
bind(MECHANICAL_PISTON, MechanicalPistonRenderer::new);
|
|
|
|
bind(MECHANICAL_BEARING, BearingRenderer::new);
|
|
|
|
bind(CLOCKWORK_BEARING, BearingRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(ROPE_PULLEY, PulleyRenderer::new);
|
2020-05-21 00:15:02 +02:00
|
|
|
bind(HARVESTER, HarvesterRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
|
2020-03-29 04:28:49 +02:00
|
|
|
bind(MILLSTONE, MillstoneRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(CRUSHING_WHEEL, KineticTileEntityRenderer::new);
|
2020-05-25 23:09:36 +02:00
|
|
|
bind(MECHANICAL_PRESS, MechanicalPressRenderer::new);
|
|
|
|
bind(MECHANICAL_MIXER, MechanicalMixerRenderer::new);
|
|
|
|
bind(MECHANICAL_CRAFTER, MechanicalCrafterRenderer::new);
|
|
|
|
bind(SPEEDOMETER, disp -> new GaugeRenderer(disp, GaugeBlock.Type.SPEED));
|
|
|
|
bind(STRESSOMETER, disp -> new GaugeRenderer(disp, GaugeBlock.Type.STRESS));
|
|
|
|
bind(BASIN, BasinRenderer::new);
|
|
|
|
bind(DEPLOYER, DeployerRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(FLYWHEEL, FlywheelRenderer::new);
|
|
|
|
bind(FURNACE_ENGINE, EngineRenderer::new);
|
|
|
|
bind(ROTATION_SPEED_CONTROLLER, SpeedControllerRenderer::new);
|
|
|
|
|
2020-05-11 00:23:28 +02:00
|
|
|
bind(CREATIVE_CRATE, SmartTileEntityRenderer::new);
|
2020-05-22 20:02:07 +02:00
|
|
|
bind(REDSTONE_LINK, SmartTileEntityRenderer::new);
|
2020-03-29 04:10:23 +02:00
|
|
|
bind(EXTRACTOR, SmartTileEntityRenderer::new);
|
|
|
|
bind(LINKED_EXTRACTOR, SmartTileEntityRenderer::new);
|
|
|
|
bind(TRANSPOSER, SmartTileEntityRenderer::new);
|
|
|
|
bind(LINKED_TRANSPOSER, SmartTileEntityRenderer::new);
|
2020-05-22 20:02:07 +02:00
|
|
|
bind(FUNNEL, SmartTileEntityRenderer::new);
|
2020-05-25 23:09:36 +02:00
|
|
|
bind(BELT_TUNNEL, BeltTunnelRenderer::new);
|
|
|
|
bind(BELT_OBSERVER, BeltObserverRenderer::new);
|
2020-05-22 20:02:07 +02:00
|
|
|
bind(ADJUSTABLE_REPEATER, AdjustableRepeaterRenderer::new);
|
|
|
|
bind(ADJUSTABLE_PULSE_REPEATER, AdjustableRepeaterRenderer::new);
|
2019-07-11 19:55:11 +02:00
|
|
|
}
|
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
@SuppressWarnings("unchecked") // TODO 1.15 this generic stuff is incompatible with the enum system - need
|
|
|
|
// strong types
|
2019-07-15 12:10:57 +02:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2020-05-21 00:15:02 +02:00
|
|
|
private static <T extends TileEntity> void bind(AllTileEntities type,
|
|
|
|
Function<? super TileEntityRendererDispatcher, ? extends TileEntityRenderer<?>> renderer) {
|
|
|
|
ClientRegistry.bindTileEntityRenderer((TileEntityType<T>) type.type,
|
|
|
|
(Function<TileEntityRendererDispatcher, TileEntityRenderer<T>>) renderer);
|
2019-07-13 12:55:28 +02:00
|
|
|
}
|
2019-07-11 19:55:11 +02:00
|
|
|
|
|
|
|
}
|