tweak Drill and Saw damage

- also removes redundant cast in AllTileEntities
This commit is contained in:
Zelophed 2020-08-28 21:24:08 +02:00
parent 7989bae1c0
commit a5e19673e3
5 changed files with 85 additions and 89 deletions

View file

@ -521,8 +521,8 @@
"death.attack.create.crush": "%1$s was processed by Crushing Wheels", "death.attack.create.crush": "%1$s was processed by Crushing Wheels",
"death.attack.create.fan_fire": "%1$s was burned to death by hot air", "death.attack.create.fan_fire": "%1$s was burned to death by hot air",
"death.attack.create.fan_lava": "%1$s was burned to death by lava fan", "death.attack.create.fan_lava": "%1$s was burned to death by lava fan",
"death.attack.create.mechanical_drill": "%1$s was impaled by Mechanical mechanical_drill", "death.attack.create.mechanical_drill": "%1$s was impaled by a Mechanical Drill",
"death.attack.create.mechanical_saw": "%1$s got cut in half by Mechanical Saw", "death.attack.create.mechanical_saw": "%1$s got cut in half by a Mechanical Saw",
"death.attack.create.cuckoo_clock_explosion": "%1$s was blown up by tampered cuckoo clock", "death.attack.create.cuckoo_clock_explosion": "%1$s was blown up by tampered cuckoo clock",
"create.block.deployer.damage_source_name": "a rogue Deployer", "create.block.deployer.damage_source_name": "a rogue Deployer",

View file

@ -60,11 +60,7 @@ import com.simibubi.create.content.contraptions.relays.advanced.sequencer.Sequen
import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer; import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer;
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity; 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.*;
import com.simibubi.create.content.contraptions.relays.encased.ClutchTileEntity;
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftRenderer;
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity;
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftRenderer;
import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer; import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer;
import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity; import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity;
import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity; import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity;
@ -93,12 +89,7 @@ import com.simibubi.create.content.logistics.block.mechanicalArm.ArmRenderer;
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity;
import com.simibubi.create.content.logistics.block.packager.PackagerRenderer; import com.simibubi.create.content.logistics.block.packager.PackagerRenderer;
import com.simibubi.create.content.logistics.block.packager.PackagerTileEntity; import com.simibubi.create.content.logistics.block.packager.PackagerTileEntity;
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer; import com.simibubi.create.content.logistics.block.redstone.*;
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity;
import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer;
import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity;
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.LinkedTransposerTileEntity;
import com.simibubi.create.content.logistics.block.transposer.TransposerTileEntity; import com.simibubi.create.content.logistics.block.transposer.TransposerTileEntity;
import com.simibubi.create.content.schematics.block.SchematicTableTileEntity; import com.simibubi.create.content.schematics.block.SchematicTableTileEntity;
@ -106,100 +97,97 @@ import com.simibubi.create.content.schematics.block.SchematicannonRenderer;
import com.simibubi.create.content.schematics.block.SchematicannonTileEntity; import com.simibubi.create.content.schematics.block.SchematicannonTileEntity;
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer; import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
import com.tterrag.registrate.util.entry.TileEntityEntry; import com.tterrag.registrate.util.entry.TileEntityEntry;
import com.tterrag.registrate.util.nullness.NonNullFunction;
import net.minecraft.tileentity.TileEntityType;
public class AllTileEntities { public class AllTileEntities {
// Schematics // Schematics
public static final TileEntityEntry<SchematicannonTileEntity> SCHEMATICANNON = Create.registrate() public static final TileEntityEntry<SchematicannonTileEntity> SCHEMATICANNON = Create.registrate()
.tileEntity("schematicannon", (NonNullFunction<TileEntityType<SchematicannonTileEntity>, ? extends SchematicannonTileEntity>) SchematicannonTileEntity::new) .tileEntity("schematicannon", SchematicannonTileEntity::new)
.validBlocks(AllBlocks.SCHEMATICANNON) .validBlocks(AllBlocks.SCHEMATICANNON)
.renderer(() -> SchematicannonRenderer::new) .renderer(() -> SchematicannonRenderer::new)
.register(); .register();
public static final TileEntityEntry<SchematicTableTileEntity> SCHEMATIC_TABLE = Create.registrate() public static final TileEntityEntry<SchematicTableTileEntity> SCHEMATIC_TABLE = Create.registrate()
.tileEntity("schematic_table", (NonNullFunction<TileEntityType<SchematicTableTileEntity>, ? extends SchematicTableTileEntity>) SchematicTableTileEntity::new) .tileEntity("schematic_table", SchematicTableTileEntity::new)
.validBlocks(AllBlocks.SCHEMATIC_TABLE) .validBlocks(AllBlocks.SCHEMATIC_TABLE)
//.renderer(() -> renderer) //.renderer(() -> renderer)
.register(); .register();
// Kinetics // Kinetics
public static final TileEntityEntry<SimpleKineticTileEntity> SIMPLE_KINETIC = Create.registrate() public static final TileEntityEntry<SimpleKineticTileEntity> SIMPLE_KINETIC = Create.registrate()
.tileEntity("simple_kinetic", (NonNullFunction<TileEntityType<SimpleKineticTileEntity>, ? extends SimpleKineticTileEntity>) SimpleKineticTileEntity::new) .tileEntity("simple_kinetic", SimpleKineticTileEntity::new)
.validBlocks(AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT) .validBlocks(AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT)
.renderer(() -> KineticTileEntityRenderer::new) .renderer(() -> KineticTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<CreativeMotorTileEntity> MOTOR = Create.registrate() public static final TileEntityEntry<CreativeMotorTileEntity> MOTOR = Create.registrate()
.tileEntity("motor", (NonNullFunction<TileEntityType<CreativeMotorTileEntity>, ? extends CreativeMotorTileEntity>) CreativeMotorTileEntity::new) .tileEntity("motor", CreativeMotorTileEntity::new)
.validBlocks(AllBlocks.CREATIVE_MOTOR) .validBlocks(AllBlocks.CREATIVE_MOTOR)
.renderer(() -> CreativeMotorRenderer::new) .renderer(() -> CreativeMotorRenderer::new)
.register(); .register();
public static final TileEntityEntry<GearboxTileEntity> GEARBOX = Create.registrate() public static final TileEntityEntry<GearboxTileEntity> GEARBOX = Create.registrate()
.tileEntity("gearbox", (NonNullFunction<TileEntityType<GearboxTileEntity>, ? extends GearboxTileEntity>) GearboxTileEntity::new) .tileEntity("gearbox", GearboxTileEntity::new)
.validBlocks(AllBlocks.GEARBOX) .validBlocks(AllBlocks.GEARBOX)
.renderer(() -> GearboxRenderer::new) .renderer(() -> GearboxRenderer::new)
.register(); .register();
public static final TileEntityEntry<EncasedShaftTileEntity> ENCASED_SHAFT = Create.registrate() public static final TileEntityEntry<EncasedShaftTileEntity> ENCASED_SHAFT = Create.registrate()
.tileEntity("encased_shaft", (NonNullFunction<TileEntityType<EncasedShaftTileEntity>, ? extends EncasedShaftTileEntity>) EncasedShaftTileEntity::new) .tileEntity("encased_shaft", EncasedShaftTileEntity::new)
.validBlocks(AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT) .validBlocks(AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT)
.renderer(() -> EncasedShaftRenderer::new) .renderer(() -> EncasedShaftRenderer::new)
.register(); .register();
public static final TileEntityEntry<AdjustablePulleyTileEntity> ADJUSTABLE_PULLEY = Create.registrate() public static final TileEntityEntry<AdjustablePulleyTileEntity> ADJUSTABLE_PULLEY = Create.registrate()
.tileEntity("adjustable_pulley", (NonNullFunction<TileEntityType<AdjustablePulleyTileEntity>, ? extends AdjustablePulleyTileEntity>) AdjustablePulleyTileEntity::new) .tileEntity("adjustable_pulley", AdjustablePulleyTileEntity::new)
.validBlocks(AllBlocks.ADJUSTABLE_PULLEY) .validBlocks(AllBlocks.ADJUSTABLE_PULLEY)
.renderer(() -> EncasedShaftRenderer::new) .renderer(() -> EncasedShaftRenderer::new)
.register(); .register();
public static final TileEntityEntry<EncasedFanTileEntity> ENCASED_FAN = Create.registrate() public static final TileEntityEntry<EncasedFanTileEntity> ENCASED_FAN = Create.registrate()
.tileEntity("encased_fan", (NonNullFunction<TileEntityType<EncasedFanTileEntity>, ? extends EncasedFanTileEntity>) EncasedFanTileEntity::new) .tileEntity("encased_fan", EncasedFanTileEntity::new)
.validBlocks(AllBlocks.ENCASED_FAN) .validBlocks(AllBlocks.ENCASED_FAN)
.renderer(() -> EncasedFanRenderer::new) .renderer(() -> EncasedFanRenderer::new)
.register(); .register();
public static final TileEntityEntry<NozzleTileEntity> NOZZLE = Create.registrate() public static final TileEntityEntry<NozzleTileEntity> NOZZLE = Create.registrate()
.tileEntity("nozzle", (NonNullFunction<TileEntityType<NozzleTileEntity>, ? extends NozzleTileEntity>) NozzleTileEntity::new) .tileEntity("nozzle", NozzleTileEntity::new)
.validBlocks(AllBlocks.NOZZLE) .validBlocks(AllBlocks.NOZZLE)
//.renderer(() -> renderer) //.renderer(() -> renderer)
.register(); .register();
public static final TileEntityEntry<ClutchTileEntity> CLUTCH = Create.registrate() public static final TileEntityEntry<ClutchTileEntity> CLUTCH = Create.registrate()
.tileEntity("clutch", (NonNullFunction<TileEntityType<ClutchTileEntity>, ? extends ClutchTileEntity>) ClutchTileEntity::new) .tileEntity("clutch", ClutchTileEntity::new)
.validBlocks(AllBlocks.CLUTCH) .validBlocks(AllBlocks.CLUTCH)
.renderer(() -> SplitShaftRenderer::new) .renderer(() -> SplitShaftRenderer::new)
.register(); .register();
public static final TileEntityEntry<GearshiftTileEntity> GEARSHIFT = Create.registrate() public static final TileEntityEntry<GearshiftTileEntity> GEARSHIFT = Create.registrate()
.tileEntity("gearshift", (NonNullFunction<TileEntityType<GearshiftTileEntity>, ? extends GearshiftTileEntity>) GearshiftTileEntity::new) .tileEntity("gearshift", GearshiftTileEntity::new)
.validBlocks(AllBlocks.GEARSHIFT) .validBlocks(AllBlocks.GEARSHIFT)
.renderer(() -> SplitShaftRenderer::new) .renderer(() -> SplitShaftRenderer::new)
.register(); .register();
public static final TileEntityEntry<TurntableTileEntity> TURNTABLE = Create.registrate() public static final TileEntityEntry<TurntableTileEntity> TURNTABLE = Create.registrate()
.tileEntity("turntable", (NonNullFunction<TileEntityType<TurntableTileEntity>, ? extends TurntableTileEntity>) TurntableTileEntity::new) .tileEntity("turntable", TurntableTileEntity::new)
.validBlocks(AllBlocks.TURNTABLE) .validBlocks(AllBlocks.TURNTABLE)
.renderer(() -> KineticTileEntityRenderer::new) .renderer(() -> KineticTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<HandCrankTileEntity> HAND_CRANK = Create.registrate() public static final TileEntityEntry<HandCrankTileEntity> HAND_CRANK = Create.registrate()
.tileEntity("hand_crank", (NonNullFunction<TileEntityType<HandCrankTileEntity>, ? extends HandCrankTileEntity>) HandCrankTileEntity::new) .tileEntity("hand_crank", HandCrankTileEntity::new)
.validBlocks(AllBlocks.HAND_CRANK) .validBlocks(AllBlocks.HAND_CRANK)
.renderer(() -> HandCrankRenderer::new) .renderer(() -> HandCrankRenderer::new)
.register(); .register();
public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK = Create.registrate() public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK = Create.registrate()
.tileEntity("cuckoo_clock", (NonNullFunction<TileEntityType<CuckooClockTileEntity>, ? extends CuckooClockTileEntity>) CuckooClockTileEntity::new) .tileEntity("cuckoo_clock", CuckooClockTileEntity::new)
.validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK) .validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK)
.renderer(() -> CuckooClockRenderer::new) .renderer(() -> CuckooClockRenderer::new)
.register(); .register();
public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP = Create.registrate() public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP = Create.registrate()
.tileEntity("mechanical_pump", (NonNullFunction<TileEntityType<PumpTileEntity>, ? extends PumpTileEntity>) PumpTileEntity::new) .tileEntity("mechanical_pump", PumpTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_PUMP) .validBlocks(AllBlocks.MECHANICAL_PUMP)
.renderer(() -> PumpRenderer::new) .renderer(() -> PumpRenderer::new)
.register(); .register();
@ -221,287 +209,288 @@ public class AllTileEntities {
.register(); .register();
public static final TileEntityEntry<FluidTankTileEntity> FLUID_TANK = Create.registrate() public static final TileEntityEntry<FluidTankTileEntity> FLUID_TANK = Create.registrate()
.tileEntity("fluid_tank", (NonNullFunction<TileEntityType<FluidTankTileEntity>, ? extends FluidTankTileEntity>) FluidTankTileEntity::new) .tileEntity("fluid_tank", FluidTankTileEntity::new)
.validBlocks(AllBlocks.FLUID_TANK) .validBlocks(AllBlocks.FLUID_TANK)
.renderer(() -> FluidTankRenderer::new) .renderer(() -> FluidTankRenderer::new)
.register(); .register();
public static final TileEntityEntry<BeltTileEntity> BELT = Create.registrate() public static final TileEntityEntry<BeltTileEntity> BELT = Create.registrate()
.tileEntity("belt", (NonNullFunction<TileEntityType<BeltTileEntity>, ? extends BeltTileEntity>) BeltTileEntity::new) .tileEntity("belt", BeltTileEntity::new)
.validBlocks(AllBlocks.BELT) .validBlocks(AllBlocks.BELT)
.renderer(() -> BeltRenderer::new) .renderer(() -> BeltRenderer::new)
.register(); .register();
public static final TileEntityEntry<ChuteTileEntity> CHUTE = Create.registrate() public static final TileEntityEntry<ChuteTileEntity> CHUTE = Create.registrate()
.tileEntity("chute", (NonNullFunction<TileEntityType<ChuteTileEntity>, ? extends ChuteTileEntity>) ChuteTileEntity::new) .tileEntity("chute", ChuteTileEntity::new)
.validBlocks(AllBlocks.CHUTE) .validBlocks(AllBlocks.CHUTE)
.renderer(() -> ChuteRenderer::new) .renderer(() -> ChuteRenderer::new)
.register(); .register();
public static final TileEntityEntry<BeltTunnelTileEntity> ANDESITE_TUNNEL = Create.registrate() public static final TileEntityEntry<BeltTunnelTileEntity> ANDESITE_TUNNEL = Create.registrate()
.tileEntity("andesite_tunnel", (NonNullFunction<TileEntityType<BeltTunnelTileEntity>, ? extends BeltTunnelTileEntity>) BeltTunnelTileEntity::new) .tileEntity("andesite_tunnel", BeltTunnelTileEntity::new)
.validBlocks(AllBlocks.ANDESITE_TUNNEL) .validBlocks(AllBlocks.ANDESITE_TUNNEL)
.renderer(() -> BeltTunnelRenderer::new) .renderer(() -> BeltTunnelRenderer::new)
.register(); .register();
public static final TileEntityEntry<BrassTunnelTileEntity> BRASS_TUNNEL = Create.registrate() public static final TileEntityEntry<BrassTunnelTileEntity> BRASS_TUNNEL = Create.registrate()
.tileEntity("brass_tunnel", (NonNullFunction<TileEntityType<BrassTunnelTileEntity>, ? extends BrassTunnelTileEntity>) BrassTunnelTileEntity::new) .tileEntity("brass_tunnel", BrassTunnelTileEntity::new)
.validBlocks(AllBlocks.BRASS_TUNNEL) .validBlocks(AllBlocks.BRASS_TUNNEL)
.renderer(() -> BeltTunnelRenderer::new) .renderer(() -> BeltTunnelRenderer::new)
.register(); .register();
public static final TileEntityEntry<ArmTileEntity> MECHANICAL_ARM = Create.registrate() public static final TileEntityEntry<ArmTileEntity> MECHANICAL_ARM = Create.registrate()
.tileEntity("mechanical_arm", (NonNullFunction<TileEntityType<ArmTileEntity>, ? extends ArmTileEntity>) ArmTileEntity::new) .tileEntity("mechanical_arm", ArmTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_ARM) .validBlocks(AllBlocks.MECHANICAL_ARM)
.renderer(() -> ArmRenderer::new) .renderer(() -> ArmRenderer::new)
.register(); .register();
public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = Create.registrate() public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = Create.registrate()
.tileEntity("mechanical_piston", (NonNullFunction<TileEntityType<MechanicalPistonTileEntity>, ? extends MechanicalPistonTileEntity>) MechanicalPistonTileEntity::new) .tileEntity("mechanical_piston", MechanicalPistonTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON) .validBlocks(AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON)
.renderer(() -> MechanicalPistonRenderer::new) .renderer(() -> MechanicalPistonRenderer::new)
.register(); .register();
public static final TileEntityEntry<MechanicalBearingTileEntity> MECHANICAL_BEARING = Create.registrate() public static final TileEntityEntry<MechanicalBearingTileEntity> MECHANICAL_BEARING = Create.registrate()
.tileEntity("mechanical_bearing", (NonNullFunction<TileEntityType<MechanicalBearingTileEntity>, ? extends MechanicalBearingTileEntity>) MechanicalBearingTileEntity::new) .tileEntity("mechanical_bearing", MechanicalBearingTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_BEARING) .validBlocks(AllBlocks.MECHANICAL_BEARING)
.renderer(() -> BearingRenderer::new) .renderer(() -> BearingRenderer::new)
.register(); .register();
public static final TileEntityEntry<ClockworkBearingTileEntity> CLOCKWORK_BEARING = Create.registrate() public static final TileEntityEntry<ClockworkBearingTileEntity> CLOCKWORK_BEARING = Create.registrate()
.tileEntity("clockwork_bearing", (NonNullFunction<TileEntityType<ClockworkBearingTileEntity>, ? extends ClockworkBearingTileEntity>) ClockworkBearingTileEntity::new) .tileEntity("clockwork_bearing", ClockworkBearingTileEntity::new)
.validBlocks(AllBlocks.CLOCKWORK_BEARING) .validBlocks(AllBlocks.CLOCKWORK_BEARING)
.renderer(() -> BearingRenderer::new) .renderer(() -> BearingRenderer::new)
.register(); .register();
public static final TileEntityEntry<PulleyTileEntity> ROPE_PULLEY = Create.registrate() public static final TileEntityEntry<PulleyTileEntity> ROPE_PULLEY = Create.registrate()
.tileEntity("rope_pulley", (NonNullFunction<TileEntityType<PulleyTileEntity>, ? extends PulleyTileEntity>) PulleyTileEntity::new) .tileEntity("rope_pulley", PulleyTileEntity::new)
.validBlocks(AllBlocks.ROPE_PULLEY) .validBlocks(AllBlocks.ROPE_PULLEY)
.renderer(() -> PulleyRenderer::new) .renderer(() -> PulleyRenderer::new)
.register(); .register();
public static final TileEntityEntry<ChassisTileEntity> CHASSIS = Create.registrate() public static final TileEntityEntry<ChassisTileEntity> CHASSIS = Create.registrate()
.tileEntity("chassis", (NonNullFunction<TileEntityType<ChassisTileEntity>, ? extends ChassisTileEntity>) ChassisTileEntity::new) .tileEntity("chassis", ChassisTileEntity::new)
.validBlocks(AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS) .validBlocks(AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS)
//.renderer(() -> renderer) //.renderer(() -> renderer)
.register(); .register();
public static final TileEntityEntry<DrillTileEntity> DRILL = Create.registrate() public static final TileEntityEntry<DrillTileEntity> DRILL = Create.registrate()
.tileEntity("drill", (NonNullFunction<TileEntityType<DrillTileEntity>, ? extends DrillTileEntity>) DrillTileEntity::new) .tileEntity("drill", DrillTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_DRILL) .validBlocks(AllBlocks.MECHANICAL_DRILL)
.renderer(() -> DrillRenderer::new) .renderer(() -> DrillRenderer::new)
.register(); .register();
public static final TileEntityEntry<SawTileEntity> SAW = Create.registrate() public static final TileEntityEntry<SawTileEntity> SAW = Create.registrate()
.tileEntity("saw", (NonNullFunction<TileEntityType<SawTileEntity>, ? extends SawTileEntity>) SawTileEntity::new) .tileEntity("saw", SawTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_SAW) .validBlocks(AllBlocks.MECHANICAL_SAW)
.renderer(() -> SawRenderer::new) .renderer(() -> SawRenderer::new)
.register(); .register();
public static final TileEntityEntry<HarvesterTileEntity> HARVESTER = Create.registrate() public static final TileEntityEntry<HarvesterTileEntity> HARVESTER = Create.registrate()
.tileEntity("harvester", (NonNullFunction<TileEntityType<HarvesterTileEntity>, ? extends HarvesterTileEntity>) HarvesterTileEntity::new) .tileEntity("harvester", HarvesterTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_HARVESTER) .validBlocks(AllBlocks.MECHANICAL_HARVESTER)
.renderer(() -> HarvesterRenderer::new) .renderer(() -> HarvesterRenderer::new)
.register(); .register();
public static final TileEntityEntry<FlywheelTileEntity> FLYWHEEL = Create.registrate() public static final TileEntityEntry<FlywheelTileEntity> FLYWHEEL = Create.registrate()
.tileEntity("flywheel", (NonNullFunction<TileEntityType<FlywheelTileEntity>, ? extends FlywheelTileEntity>) FlywheelTileEntity::new) .tileEntity("flywheel", FlywheelTileEntity::new)
.validBlocks(AllBlocks.FLYWHEEL) .validBlocks(AllBlocks.FLYWHEEL)
.renderer(() -> FlywheelRenderer::new) .renderer(() -> FlywheelRenderer::new)
.register(); .register();
public static final TileEntityEntry<FurnaceEngineTileEntity> FURNACE_ENGINE = Create.registrate() public static final TileEntityEntry<FurnaceEngineTileEntity> FURNACE_ENGINE = Create.registrate()
.tileEntity("furnace_engine", (NonNullFunction<TileEntityType<FurnaceEngineTileEntity>, ? extends FurnaceEngineTileEntity>) FurnaceEngineTileEntity::new) .tileEntity("furnace_engine", FurnaceEngineTileEntity::new)
.validBlocks(AllBlocks.FURNACE_ENGINE) .validBlocks(AllBlocks.FURNACE_ENGINE)
.renderer(() -> EngineRenderer::new) .renderer(() -> EngineRenderer::new)
.register(); .register();
public static final TileEntityEntry<MillstoneTileEntity> MILLSTONE = Create.registrate() public static final TileEntityEntry<MillstoneTileEntity> MILLSTONE = Create.registrate()
.tileEntity("millstone", (NonNullFunction<TileEntityType<MillstoneTileEntity>, ? extends MillstoneTileEntity>) MillstoneTileEntity::new) .tileEntity("millstone", MillstoneTileEntity::new)
.validBlocks(AllBlocks.MILLSTONE) .validBlocks(AllBlocks.MILLSTONE)
.renderer(() -> MillstoneRenderer::new) .renderer(() -> MillstoneRenderer::new)
.register(); .register();
public static final TileEntityEntry<CrushingWheelTileEntity> CRUSHING_WHEEL = Create.registrate() public static final TileEntityEntry<CrushingWheelTileEntity> CRUSHING_WHEEL = Create.registrate()
.tileEntity("crushing_wheel", (NonNullFunction<TileEntityType<CrushingWheelTileEntity>, ? extends CrushingWheelTileEntity>) CrushingWheelTileEntity::new) .tileEntity("crushing_wheel", CrushingWheelTileEntity::new)
.validBlocks(AllBlocks.CRUSHING_WHEEL) .validBlocks(AllBlocks.CRUSHING_WHEEL)
.renderer(() -> KineticTileEntityRenderer::new) .renderer(() -> KineticTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<CrushingWheelControllerTileEntity> CRUSHING_WHEEL_CONTROLLER = Create.registrate() public static final TileEntityEntry<CrushingWheelControllerTileEntity> CRUSHING_WHEEL_CONTROLLER = Create.registrate()
.tileEntity("crushing_wheel_controller", (NonNullFunction<TileEntityType<CrushingWheelControllerTileEntity>, ? extends CrushingWheelControllerTileEntity>) CrushingWheelControllerTileEntity::new) .tileEntity("crushing_wheel_controller", CrushingWheelControllerTileEntity::new)
.validBlocks(AllBlocks.CRUSHING_WHEEL_CONTROLLER) .validBlocks(AllBlocks.CRUSHING_WHEEL_CONTROLLER)
//.renderer(() -> renderer) //.renderer(() -> renderer)
.register(); .register();
public static final TileEntityEntry<WaterWheelTileEntity> WATER_WHEEL = Create.registrate() public static final TileEntityEntry<WaterWheelTileEntity> WATER_WHEEL = Create.registrate()
.tileEntity("water_wheel", (NonNullFunction<TileEntityType<WaterWheelTileEntity>, ? extends WaterWheelTileEntity>) WaterWheelTileEntity::new) .tileEntity("water_wheel", WaterWheelTileEntity::new)
.validBlocks(AllBlocks.WATER_WHEEL) .validBlocks(AllBlocks.WATER_WHEEL)
.renderer(() -> KineticTileEntityRenderer::new) .renderer(() -> KineticTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<MechanicalPressTileEntity> MECHANICAL_PRESS = Create.registrate() public static final TileEntityEntry<MechanicalPressTileEntity> MECHANICAL_PRESS = Create.registrate()
.tileEntity("mechanical_press", (NonNullFunction<TileEntityType<MechanicalPressTileEntity>, ? extends MechanicalPressTileEntity>) MechanicalPressTileEntity::new) .tileEntity("mechanical_press", MechanicalPressTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_PRESS) .validBlocks(AllBlocks.MECHANICAL_PRESS)
.renderer(() -> MechanicalPressRenderer::new) .renderer(() -> MechanicalPressRenderer::new)
.register(); .register();
public static final TileEntityEntry<MechanicalMixerTileEntity> MECHANICAL_MIXER = Create.registrate() public static final TileEntityEntry<MechanicalMixerTileEntity> MECHANICAL_MIXER = Create.registrate()
.tileEntity("mechanical_mixer", (NonNullFunction<TileEntityType<MechanicalMixerTileEntity>, ? extends MechanicalMixerTileEntity>) MechanicalMixerTileEntity::new) .tileEntity("mechanical_mixer", MechanicalMixerTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_MIXER) .validBlocks(AllBlocks.MECHANICAL_MIXER)
.renderer(() -> MechanicalMixerRenderer::new) .renderer(() -> MechanicalMixerRenderer::new)
.register(); .register();
public static final TileEntityEntry<DeployerTileEntity> DEPLOYER = Create.registrate() public static final TileEntityEntry<DeployerTileEntity> DEPLOYER = Create.registrate()
.tileEntity("deployer", (NonNullFunction<TileEntityType<DeployerTileEntity>, ? extends DeployerTileEntity>) DeployerTileEntity::new) .tileEntity("deployer", DeployerTileEntity::new)
.validBlocks(AllBlocks.DEPLOYER) .validBlocks(AllBlocks.DEPLOYER)
.renderer(() -> DeployerRenderer::new) .renderer(() -> DeployerRenderer::new)
.register(); .register();
public static final TileEntityEntry<BasinTileEntity> BASIN = Create.registrate() public static final TileEntityEntry<BasinTileEntity> BASIN = Create.registrate()
.tileEntity("basin", (NonNullFunction<TileEntityType<BasinTileEntity>, ? extends BasinTileEntity>) BasinTileEntity::new) .tileEntity("basin", BasinTileEntity::new)
.validBlocks(AllBlocks.BASIN) .validBlocks(AllBlocks.BASIN)
.renderer(() -> BasinRenderer::new) .renderer(() -> BasinRenderer::new)
.register(); .register();
public static final TileEntityEntry<BlazeBurnerTileEntity> HEATER = Create.registrate() public static final TileEntityEntry<BlazeBurnerTileEntity> HEATER = Create.registrate()
.tileEntity("blaze_heater", (NonNullFunction<TileEntityType<BlazeBurnerTileEntity>, ? extends BlazeBurnerTileEntity>) BlazeBurnerTileEntity::new) .tileEntity("blaze_heater", BlazeBurnerTileEntity::new)
.validBlocks(AllBlocks.BLAZE_BURNER) .validBlocks(AllBlocks.BLAZE_BURNER)
.renderer(() -> BlazeBurnerRenderer::new) .renderer(() -> BlazeBurnerRenderer::new)
.register(); .register();
public static final TileEntityEntry<MechanicalCrafterTileEntity> MECHANICAL_CRAFTER = Create.registrate() public static final TileEntityEntry<MechanicalCrafterTileEntity> MECHANICAL_CRAFTER = Create.registrate()
.tileEntity("mechanical_crafter", (NonNullFunction<TileEntityType<MechanicalCrafterTileEntity>, ? extends MechanicalCrafterTileEntity>) MechanicalCrafterTileEntity::new) .tileEntity("mechanical_crafter", MechanicalCrafterTileEntity::new)
.validBlocks(AllBlocks.MECHANICAL_CRAFTER) .validBlocks(AllBlocks.MECHANICAL_CRAFTER)
.renderer(() -> MechanicalCrafterRenderer::new) .renderer(() -> MechanicalCrafterRenderer::new)
.register(); .register();
public static final TileEntityEntry<SequencedGearshiftTileEntity> SEQUENCED_GEARSHIFT = Create.registrate() public static final TileEntityEntry<SequencedGearshiftTileEntity> SEQUENCED_GEARSHIFT = Create.registrate()
.tileEntity("sequenced_gearshift", (NonNullFunction<TileEntityType<SequencedGearshiftTileEntity>, ? extends SequencedGearshiftTileEntity>) SequencedGearshiftTileEntity::new) .tileEntity("sequenced_gearshift", SequencedGearshiftTileEntity::new)
.validBlocks(AllBlocks.SEQUENCED_GEARSHIFT) .validBlocks(AllBlocks.SEQUENCED_GEARSHIFT)
.renderer(() -> SplitShaftRenderer::new) .renderer(() -> SplitShaftRenderer::new)
.register(); .register();
public static final TileEntityEntry<SpeedControllerTileEntity> ROTATION_SPEED_CONTROLLER = Create.registrate() public static final TileEntityEntry<SpeedControllerTileEntity> ROTATION_SPEED_CONTROLLER = Create.registrate()
.tileEntity("rotation_speed_controller", (NonNullFunction<TileEntityType<SpeedControllerTileEntity>, ? extends SpeedControllerTileEntity>) SpeedControllerTileEntity::new) .tileEntity("rotation_speed_controller", SpeedControllerTileEntity::new)
.validBlocks(AllBlocks.ROTATION_SPEED_CONTROLLER) .validBlocks(AllBlocks.ROTATION_SPEED_CONTROLLER)
.renderer(() -> SpeedControllerRenderer::new) .renderer(() -> SpeedControllerRenderer::new)
.register(); .register();
public static final TileEntityEntry<SpeedGaugeTileEntity> SPEEDOMETER = Create.registrate() public static final TileEntityEntry<SpeedGaugeTileEntity> SPEEDOMETER = Create.registrate()
.tileEntity("speedometer", (NonNullFunction<TileEntityType<SpeedGaugeTileEntity>, ? extends SpeedGaugeTileEntity>) SpeedGaugeTileEntity::new) .tileEntity("speedometer", SpeedGaugeTileEntity::new)
.validBlocks(AllBlocks.SPEEDOMETER) .validBlocks(AllBlocks.SPEEDOMETER)
.renderer(() -> GaugeRenderer::speed) .renderer(() -> GaugeRenderer::speed)
.register(); .register();
public static final TileEntityEntry<StressGaugeTileEntity> STRESSOMETER = Create.registrate() public static final TileEntityEntry<StressGaugeTileEntity> STRESSOMETER = Create.registrate()
.tileEntity("stressometer", (NonNullFunction<TileEntityType<StressGaugeTileEntity>, ? extends StressGaugeTileEntity>) StressGaugeTileEntity::new) .tileEntity("stressometer", StressGaugeTileEntity::new)
.validBlocks(AllBlocks.STRESSOMETER) .validBlocks(AllBlocks.STRESSOMETER)
.renderer(() -> GaugeRenderer::stress) .renderer(() -> GaugeRenderer::stress)
.register(); .register();
public static final TileEntityEntry<AnalogLeverTileEntity> ANALOG_LEVER = Create.registrate() public static final TileEntityEntry<AnalogLeverTileEntity> ANALOG_LEVER = Create.registrate()
.tileEntity("analog_lever", (NonNullFunction<TileEntityType<AnalogLeverTileEntity>, ? extends AnalogLeverTileEntity>) AnalogLeverTileEntity::new) .tileEntity("analog_lever", AnalogLeverTileEntity::new)
.validBlocks(AllBlocks.ANALOG_LEVER) .validBlocks(AllBlocks.ANALOG_LEVER)
.renderer(() -> AnalogLeverRenderer::new) .renderer(() -> AnalogLeverRenderer::new)
.register(); .register();
public static final TileEntityEntry<CartAssemblerTileEntity> CART_ASSEMBLER = Create.registrate() public static final TileEntityEntry<CartAssemblerTileEntity> CART_ASSEMBLER = Create.registrate()
.tileEntity("cart_assembler", (NonNullFunction<TileEntityType<CartAssemblerTileEntity>, ? extends CartAssemblerTileEntity>) CartAssemblerTileEntity::new) .tileEntity("cart_assembler", CartAssemblerTileEntity::new)
.validBlocks(AllBlocks.CART_ASSEMBLER) .validBlocks(AllBlocks.CART_ASSEMBLER)
//.renderer(() -> renderer) //.renderer(() -> renderer)
.register(); .register();
// Logistics // Logistics
public static final TileEntityEntry<RedstoneLinkTileEntity> REDSTONE_LINK = Create.registrate() public static final TileEntityEntry<RedstoneLinkTileEntity> REDSTONE_LINK = Create.registrate()
.tileEntity("redstone_link", (NonNullFunction<TileEntityType<RedstoneLinkTileEntity>, ? extends RedstoneLinkTileEntity>) RedstoneLinkTileEntity::new) .tileEntity("redstone_link", RedstoneLinkTileEntity::new)
.validBlocks(AllBlocks.REDSTONE_LINK) .validBlocks(AllBlocks.REDSTONE_LINK)
.renderer(() -> SmartTileEntityRenderer::new) .renderer(() -> SmartTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<NixieTubeTileEntity> NIXIE_TUBE = Create.registrate() public static final TileEntityEntry<NixieTubeTileEntity> NIXIE_TUBE = Create.registrate()
.tileEntity("nixie_tube", (NonNullFunction<TileEntityType<NixieTubeTileEntity>, ? extends NixieTubeTileEntity>) NixieTubeTileEntity::new) .tileEntity("nixie_tube", NixieTubeTileEntity::new)
.validBlocks(AllBlocks.NIXIE_TUBE) .validBlocks(AllBlocks.NIXIE_TUBE)
.renderer(() -> NixieTubeRenderer::new) .renderer(() -> NixieTubeRenderer::new)
.register(); .register();
public static final TileEntityEntry<StockpileSwitchTileEntity> STOCKPILE_SWITCH = Create.registrate() public static final TileEntityEntry<StockpileSwitchTileEntity> STOCKPILE_SWITCH = Create.registrate()
.tileEntity("stockpile_switch", (NonNullFunction<TileEntityType<StockpileSwitchTileEntity>, ? extends StockpileSwitchTileEntity>) StockpileSwitchTileEntity::new) .tileEntity("stockpile_switch", StockpileSwitchTileEntity::new)
.validBlocks(AllBlocks.STOCKPILE_SWITCH) .validBlocks(AllBlocks.STOCKPILE_SWITCH)
//.renderer(() -> renderer) //.renderer(() -> renderer)
.register(); .register();
public static final TileEntityEntry<AdjustableCrateTileEntity> ADJUSTABLE_CRATE = Create.registrate() public static final TileEntityEntry<AdjustableCrateTileEntity> ADJUSTABLE_CRATE = Create.registrate()
.tileEntity("adjustable_crate", (NonNullFunction<TileEntityType<AdjustableCrateTileEntity>, ? extends AdjustableCrateTileEntity>) AdjustableCrateTileEntity::new) .tileEntity("adjustable_crate", AdjustableCrateTileEntity::new)
.validBlocks(AllBlocks.ADJUSTABLE_CRATE) .validBlocks(AllBlocks.ADJUSTABLE_CRATE)
//.renderer(() -> renderer) //.renderer(() -> renderer)
.register(); .register();
public static final TileEntityEntry<CreativeCrateTileEntity> CREATIVE_CRATE = Create.registrate() public static final TileEntityEntry<CreativeCrateTileEntity> CREATIVE_CRATE = Create.registrate()
.tileEntity("creative_crate", (NonNullFunction<TileEntityType<CreativeCrateTileEntity>, ? extends CreativeCrateTileEntity>) CreativeCrateTileEntity::new) .tileEntity("creative_crate", CreativeCrateTileEntity::new)
.validBlocks(AllBlocks.CREATIVE_CRATE) .validBlocks(AllBlocks.CREATIVE_CRATE)
.renderer(() -> SmartTileEntityRenderer::new) .renderer(() -> SmartTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<DepotTileEntity> DEPOT = Create.registrate() public static final TileEntityEntry<DepotTileEntity> DEPOT = Create.registrate()
.tileEntity("depot", (NonNullFunction<TileEntityType<DepotTileEntity>, ? extends DepotTileEntity>) DepotTileEntity::new) .tileEntity("depot", DepotTileEntity::new)
.validBlocks(AllBlocks.DEPOT) .validBlocks(AllBlocks.DEPOT)
.renderer(() -> DepotRenderer::new) .renderer(() -> DepotRenderer::new)
.register(); .register();
public static final TileEntityEntry<FunnelTileEntity> FUNNEL = Create.registrate() public static final TileEntityEntry<FunnelTileEntity> FUNNEL = Create.registrate()
.tileEntity("funnel", (NonNullFunction<TileEntityType<FunnelTileEntity>, ? extends FunnelTileEntity>) FunnelTileEntity::new) .tileEntity("funnel", FunnelTileEntity::new)
.validBlocks(AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.BRASS_CHUTE_FUNNEL, AllBlocks.ANDESITE_FUNNEL, AllBlocks.ANDESITE_BELT_FUNNEL, AllBlocks.ANDESITE_CHUTE_FUNNEL) .validBlocks(AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.BRASS_CHUTE_FUNNEL, AllBlocks.ANDESITE_FUNNEL, AllBlocks.ANDESITE_BELT_FUNNEL, AllBlocks.ANDESITE_CHUTE_FUNNEL)
.renderer(() -> FunnelRenderer::new) .renderer(() -> FunnelRenderer::new)
.register(); .register();
public static final TileEntityEntry<PackagerTileEntity> PACKAGER = Create.registrate() public static final TileEntityEntry<PackagerTileEntity> PACKAGER = Create.registrate()
.tileEntity("packager", (NonNullFunction<TileEntityType<PackagerTileEntity>, ? extends PackagerTileEntity>) PackagerTileEntity::new) .tileEntity("packager", PackagerTileEntity::new)
.validBlocks(AllBlocks.PACKAGER) .validBlocks(AllBlocks.PACKAGER)
.renderer(() -> PackagerRenderer::new) .renderer(() -> PackagerRenderer::new)
.register(); .register();
public static final TileEntityEntry<ExtractorTileEntity> EXTRACTOR = Create.registrate() public static final TileEntityEntry<ExtractorTileEntity> EXTRACTOR = Create.registrate()
.tileEntity("extractor", (NonNullFunction<TileEntityType<ExtractorTileEntity>, ? extends ExtractorTileEntity>) ExtractorTileEntity::new) .tileEntity("extractor", ExtractorTileEntity::new)
.validBlocks(AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR) .validBlocks(AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR)
.renderer(() -> SmartTileEntityRenderer::new) .renderer(() -> SmartTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<LinkedExtractorTileEntity> LINKED_EXTRACTOR = Create.registrate() public static final TileEntityEntry<LinkedExtractorTileEntity> LINKED_EXTRACTOR = Create.registrate()
.tileEntity("linked_extractor", (NonNullFunction<TileEntityType<LinkedExtractorTileEntity>, ? extends LinkedExtractorTileEntity>) LinkedExtractorTileEntity::new) .tileEntity("linked_extractor", LinkedExtractorTileEntity::new)
.validBlocks(AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR) .validBlocks(AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR)
.renderer(() -> SmartTileEntityRenderer::new) .renderer(() -> SmartTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<TransposerTileEntity> TRANSPOSER = Create.registrate() public static final TileEntityEntry<TransposerTileEntity> TRANSPOSER = Create.registrate()
.tileEntity("transposer", (NonNullFunction<TileEntityType<TransposerTileEntity>, ? extends TransposerTileEntity>) TransposerTileEntity::new) .tileEntity("transposer", TransposerTileEntity::new)
.validBlocks(AllBlocks.TRANSPOSER, AllBlocks.VERTICAL_TRANSPOSER) .validBlocks(AllBlocks.TRANSPOSER, AllBlocks.VERTICAL_TRANSPOSER)
.renderer(() -> SmartTileEntityRenderer::new) .renderer(() -> SmartTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<LinkedTransposerTileEntity> LINKED_TRANSPOSER = Create.registrate() public static final TileEntityEntry<LinkedTransposerTileEntity> LINKED_TRANSPOSER = Create.registrate()
.tileEntity("linked_transposer", (NonNullFunction<TileEntityType<LinkedTransposerTileEntity>, ? extends LinkedTransposerTileEntity>) LinkedTransposerTileEntity::new) .tileEntity("linked_transposer", LinkedTransposerTileEntity::new)
.validBlocks(AllBlocks.LINKED_TRANSPOSER, AllBlocks.VERTICAL_LINKED_TRANSPOSER) .validBlocks(AllBlocks.LINKED_TRANSPOSER, AllBlocks.VERTICAL_LINKED_TRANSPOSER)
.renderer(() -> SmartTileEntityRenderer::new) .renderer(() -> SmartTileEntityRenderer::new)
.register(); .register();
public static final TileEntityEntry<BeltObserverTileEntity> BELT_OBSERVER = Create.registrate() public static final TileEntityEntry<BeltObserverTileEntity> BELT_OBSERVER = Create.registrate()
.tileEntity("belt_observer", (NonNullFunction<TileEntityType<BeltObserverTileEntity>, ? extends BeltObserverTileEntity>) BeltObserverTileEntity::new) .tileEntity("belt_observer", BeltObserverTileEntity::new)
.validBlocks(AllBlocks.BELT_OBSERVER) .validBlocks(AllBlocks.BELT_OBSERVER)
.renderer(() -> BeltObserverRenderer::new) .renderer(() -> BeltObserverRenderer::new)
.register(); .register();
public static final TileEntityEntry<AdjustableRepeaterTileEntity> ADJUSTABLE_REPEATER = Create.registrate() public static final TileEntityEntry<AdjustableRepeaterTileEntity> ADJUSTABLE_REPEATER = Create.registrate()
.tileEntity("adjustable_repeater", (NonNullFunction<TileEntityType<AdjustableRepeaterTileEntity>, ? extends AdjustableRepeaterTileEntity>) AdjustableRepeaterTileEntity::new) .tileEntity("adjustable_repeater", AdjustableRepeaterTileEntity::new)
.validBlocks(AllBlocks.ADJUSTABLE_REPEATER) .validBlocks(AllBlocks.ADJUSTABLE_REPEATER)
.renderer(() -> AdjustableRepeaterRenderer::new) .renderer(() -> AdjustableRepeaterRenderer::new)
.register(); .register();
public static final TileEntityEntry<AdjustablePulseRepeaterTileEntity> ADJUSTABLE_PULSE_REPEATER = Create.registrate() public static final TileEntityEntry<AdjustablePulseRepeaterTileEntity> ADJUSTABLE_PULSE_REPEATER = Create.registrate()
.tileEntity("adjustable_pulse_repeater", (NonNullFunction<TileEntityType<AdjustablePulseRepeaterTileEntity>, ? extends AdjustablePulseRepeaterTileEntity>) AdjustablePulseRepeaterTileEntity::new) .tileEntity("adjustable_pulse_repeater", AdjustablePulseRepeaterTileEntity::new)
.validBlocks(AllBlocks.ADJUSTABLE_PULSE_REPEATER) .validBlocks(AllBlocks.ADJUSTABLE_PULSE_REPEATER)
.renderer(() -> AdjustableRepeaterRenderer::new) .renderer(() -> AdjustableRepeaterRenderer::new)
.register(); .register();
public static void register() {} public static void register() {
}
} }

View file

@ -60,9 +60,10 @@ public class BlockBreakingMovementBehaviour extends MovementBehaviour {
&& ((ContraptionEntity) passenger).getContraption() == context.contraption) && ((ContraptionEntity) passenger).getContraption() == context.contraption)
continue Entities; continue Entities;
float damage = (float) MathHelper.clamp(Math.abs(context.relativeMotion.length() * 10) + 1, 5, 20); if (damageSource != null && !world.isRemote) {
if (damageSource != null && !world.isRemote) float damage = (float) MathHelper.clamp(6 * Math.pow(context.relativeMotion.length(), 0.4) + 1, 2, 10);
entity.attackEntityFrom(damageSource, damage); entity.attackEntityFrom(damageSource, damage);
}
if (throwsEntities() && (world.isRemote == (entity instanceof PlayerEntity))) { if (throwsEntities() && (world.isRemote == (entity instanceof PlayerEntity))) {
Vec3d motionBoost = context.motion.add(0, context.motion.length() / 4f, 0); Vec3d motionBoost = context.motion.add(0, context.motion.length() / 4f, 0);
int maxBoost = 4; int maxBoost = 4;

View file

@ -49,7 +49,7 @@ public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTile
withTileEntityDo(worldIn, pos, te -> { withTileEntityDo(worldIn, pos, te -> {
if (te.getSpeed() == 0) if (te.getSpeed() == 0)
return; return;
entityIn.attackEntityFrom(damageSourceDrill, MathHelper.clamp(Math.abs(te.getSpeed() / 32f) + 1, 0, 20)); entityIn.attackEntityFrom(damageSourceDrill, (float) getDamage(te.getSpeed()));
}); });
} }
@ -89,4 +89,11 @@ public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTile
return DrillTileEntity.class; return DrillTileEntity.class;
} }
public static double getDamage(float speed) {
float speedAbs = Math.abs(speed);
double sub1 = Math.min(speedAbs / 16, 2);
double sub2 = Math.min(speedAbs / 32, 4);
double sub3 = Math.min(speedAbs / 64, 4);
return MathHelper.clamp(sub1 + sub2 + sub3, 1, 10);
}
} }

View file

@ -3,11 +3,12 @@ package com.simibubi.create.content.contraptions.components.saw;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock;
import com.simibubi.create.content.contraptions.components.actors.DrillBlock;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.material.PushReaction; import net.minecraft.block.material.PushReaction;
@ -22,7 +23,6 @@ import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis; import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
@ -30,7 +30,6 @@ import net.minecraft.world.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
@ -78,7 +77,7 @@ public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTile
withTileEntityDo(worldIn, pos, te -> { withTileEntityDo(worldIn, pos, te -> {
if (te.getSpeed() == 0) if (te.getSpeed() == 0)
return; return;
entityIn.attackEntityFrom(damageSourceSaw, MathHelper.clamp(Math.abs(te.getSpeed() / 32f) + 1, 0, 20)); entityIn.attackEntityFrom(damageSourceSaw, (float) DrillBlock.getDamage(te.getSpeed()));
}); });
} }