2020-04-26 06:58:38 +02:00
|
|
|
package com.simibubi.create;
|
|
|
|
|
2020-09-08 18:42:11 +02:00
|
|
|
import static com.simibubi.create.AllMovementBehaviours.addMovementBehaviour;
|
2020-05-28 01:29:26 +02:00
|
|
|
import static com.simibubi.create.AllTags.tagBlockAndItem;
|
2020-05-23 14:02:38 +02:00
|
|
|
import static com.simibubi.create.content.AllSections.SCHEMATICS;
|
2020-08-18 13:53:05 +02:00
|
|
|
import static com.simibubi.create.foundation.data.BlockStateGen.axisBlock;
|
2020-05-23 14:02:38 +02:00
|
|
|
import static com.simibubi.create.foundation.data.BlockStateGen.oxidizedBlockstate;
|
|
|
|
import static com.simibubi.create.foundation.data.CreateRegistrate.connectedTextures;
|
|
|
|
import static com.simibubi.create.foundation.data.ModelGen.customItemModel;
|
|
|
|
import static com.simibubi.create.foundation.data.ModelGen.oxidizedItemModel;
|
|
|
|
|
2020-07-06 23:37:44 +02:00
|
|
|
import com.simibubi.create.AllTags.AllBlockTags;
|
2020-08-31 12:49:36 +02:00
|
|
|
import com.simibubi.create.AllTags.AllItemTags;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.AllSections;
|
|
|
|
import com.simibubi.create.content.contraptions.base.CasingBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.actors.DrillBlock;
|
2020-08-08 23:16:22 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.DrillMovementBehaviour;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.HarvesterBlock;
|
2020-08-08 23:16:22 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.HarvesterMovementBehaviour;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.PloughBlock;
|
2020-08-08 23:16:22 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.PloughMovementBehaviour;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceBlock;
|
2020-08-08 23:16:22 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.SawMovementBehaviour;
|
2020-07-11 01:28:37 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.SeatBlock;
|
2020-08-08 23:16:22 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.actors.SeatMovementBehaviour;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.clock.CuckooClockBlock;
|
2020-05-24 15:58:25 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.crafter.CrafterCTBehaviour;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.crank.HandCrankBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock;
|
2020-08-08 23:16:22 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.deployer.DeployerMovementBehaviour;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.fan.EncasedFanBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.fan.NozzleBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelGenerator;
|
|
|
|
import com.simibubi.create.content.contraptions.components.flywheel.engine.FurnaceEngineBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.millstone.MillstoneBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.mixer.BasinOperatorBlockItem;
|
|
|
|
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerBlock;
|
2020-05-25 23:09:36 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorGenerator;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.saw.SawBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.saw.SawGenerator;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkBearingBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock.ChassisCTBehaviour;
|
2020-05-24 12:31:05 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock.MinecartAnchorBlock;
|
2020-06-14 22:24:46 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlockItem;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonHeadBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.PistonExtensionPoleBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock;
|
2020-06-09 23:49:39 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.tracks.ReinforcedRailBlock;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.components.turntable.TurntableBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock;
|
2020-08-25 20:12:33 +02:00
|
|
|
import com.simibubi.create.content.contraptions.fluids.PipeAttachmentModel;
|
2020-06-15 02:25:33 +02:00
|
|
|
import com.simibubi.create.content.contraptions.fluids.PumpBlock;
|
2020-08-28 22:45:27 +02:00
|
|
|
import com.simibubi.create.content.contraptions.fluids.actors.SpoutBlock;
|
2020-08-25 20:12:33 +02:00
|
|
|
import com.simibubi.create.content.contraptions.fluids.pipes.EncasedPipeBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.fluids.pipes.GlassFluidPipeBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankGenerator;
|
|
|
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankItem;
|
|
|
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankModel;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.processing.BasinBlock;
|
2020-07-23 17:41:15 +02:00
|
|
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
|
2020-08-05 00:41:07 +02:00
|
|
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlockItem;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftGenerator;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.belt.BeltBlock;
|
2020-05-24 12:31:05 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.belt.BeltColor;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.belt.BeltGenerator;
|
2020-07-07 16:03:49 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.belt.BeltModel;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.elementary.CogwheelBlockItem;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.AdjustablePulleyBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.ClutchBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltGenerator;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.encased.GearshiftBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.gauge.GaugeGenerator;
|
|
|
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock;
|
2020-07-08 22:24:33 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelCTBehaviour;
|
2020-06-20 16:10:07 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.chute.ChuteBlock;
|
2020-06-24 17:25:19 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.chute.ChuteGenerator;
|
|
|
|
import com.simibubi.create.content.logistics.block.chute.ChuteItem;
|
2020-06-20 20:02:27 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.depot.DepotBlock;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.diodes.AbstractDiodeGenerator;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterGenerator;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.PoweredLatchBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.PoweredLatchGenerator;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.PulseRepeaterBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.PulseRepeaterGenerator;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.ToggleLatchBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.diodes.ToggleLatchGenerator;
|
2020-07-08 13:41:55 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.funnel.AndesiteBeltFunnelBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.funnel.AndesiteFunnelBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.funnel.BeltFunnelGenerator;
|
|
|
|
import com.simibubi.create.content.logistics.block.funnel.BrassBeltFunnelBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.funnel.BrassFunnelBlock;
|
2020-09-08 18:42:11 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.funnel.FunnelMovementBehaviour;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.inventories.CreativeCrateBlock;
|
2020-06-16 12:54:24 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmBlock;
|
2020-07-01 22:02:00 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmItem;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverBlock;
|
2020-08-08 23:16:22 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.redstone.ContactMovementBehaviour;
|
2020-06-05 23:26:22 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.redstone.NixieTubeBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.redstone.NixieTubeGenerator;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock;
|
|
|
|
import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkGenerator;
|
|
|
|
import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchBlock;
|
|
|
|
import com.simibubi.create.content.schematics.block.SchematicTableBlock;
|
|
|
|
import com.simibubi.create.content.schematics.block.SchematicannonBlock;
|
|
|
|
import com.simibubi.create.foundation.config.StressConfigDefaults;
|
|
|
|
import com.simibubi.create.foundation.data.AssetLookup;
|
|
|
|
import com.simibubi.create.foundation.data.BlockStateGen;
|
|
|
|
import com.simibubi.create.foundation.data.BuilderTransformers;
|
|
|
|
import com.simibubi.create.foundation.data.CreateRegistrate;
|
|
|
|
import com.simibubi.create.foundation.data.ModelGen;
|
|
|
|
import com.simibubi.create.foundation.data.SharedProperties;
|
2020-08-31 12:49:36 +02:00
|
|
|
import com.simibubi.create.foundation.utility.DyeHelper;
|
2020-05-23 14:02:38 +02:00
|
|
|
import com.simibubi.create.foundation.worldgen.OxidizingBlock;
|
2020-05-12 05:18:49 +02:00
|
|
|
import com.tterrag.registrate.util.entry.BlockEntry;
|
2020-04-26 06:58:38 +02:00
|
|
|
|
2020-07-22 06:57:59 +02:00
|
|
|
import net.minecraft.block.AbstractBlock;
|
2020-08-31 12:49:36 +02:00
|
|
|
import net.minecraft.advancements.criterion.InventoryChangeTrigger;
|
|
|
|
import net.minecraft.advancements.criterion.ItemPredicate;
|
|
|
|
import net.minecraft.advancements.criterion.MinMaxBounds;
|
2020-09-20 06:37:27 +02:00
|
|
|
import net.minecraft.advancements.criterion.EntityPredicate.AndPredicate;
|
2020-05-15 04:07:19 +02:00
|
|
|
import net.minecraft.block.Block;
|
2020-05-02 18:07:46 +02:00
|
|
|
import net.minecraft.block.Blocks;
|
2020-05-04 19:57:16 +02:00
|
|
|
import net.minecraft.block.SoundType;
|
2020-05-19 15:25:21 +02:00
|
|
|
import net.minecraft.block.material.MaterialColor;
|
2020-05-19 16:41:54 +02:00
|
|
|
import net.minecraft.client.renderer.RenderType;
|
2020-08-31 12:49:36 +02:00
|
|
|
import net.minecraft.data.ShapedRecipeBuilder;
|
2020-07-11 01:28:37 +02:00
|
|
|
import net.minecraft.item.DyeColor;
|
2020-05-21 00:15:02 +02:00
|
|
|
import net.minecraft.state.properties.PistonType;
|
2020-05-15 04:07:19 +02:00
|
|
|
import net.minecraft.tags.BlockTags;
|
2020-08-31 12:49:36 +02:00
|
|
|
import net.minecraft.tags.ItemTags;
|
2020-07-08 01:36:34 +02:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2020-05-21 00:15:02 +02:00
|
|
|
import net.minecraftforge.client.model.generators.ConfiguredModel;
|
2020-05-15 04:07:19 +02:00
|
|
|
import net.minecraftforge.common.ToolType;
|
2020-05-02 18:07:46 +02:00
|
|
|
|
2020-05-22 20:12:53 +02:00
|
|
|
public class AllBlocks {
|
2020-05-11 22:34:02 +02:00
|
|
|
|
2020-05-15 04:32:36 +02:00
|
|
|
private static final CreateRegistrate REGISTRATE = Create.registrate()
|
2020-05-15 17:13:38 +02:00
|
|
|
.itemGroup(() -> Create.baseCreativeTab);
|
2020-05-04 19:57:16 +02:00
|
|
|
|
2020-05-18 22:01:09 +02:00
|
|
|
// Schematics
|
2020-05-19 15:25:21 +02:00
|
|
|
|
2020-05-11 22:34:02 +02:00
|
|
|
static {
|
|
|
|
REGISTRATE.startSection(SCHEMATICS);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final BlockEntry<SchematicannonBlock> SCHEMATICANNON =
|
2020-05-14 06:53:12 +02:00
|
|
|
REGISTRATE.block("schematicannon", SchematicannonBlock::new)
|
2020-05-13 21:56:46 +02:00
|
|
|
.initialProperties(() -> Blocks.DISPENSER)
|
|
|
|
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov)))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
2020-05-19 16:41:54 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-13 21:56:46 +02:00
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<SchematicTableBlock> SCHEMATIC_TABLE =
|
2020-05-14 06:53:12 +02:00
|
|
|
REGISTRATE.block("schematic_table", SchematicTableBlock::new)
|
2020-05-13 21:56:46 +02:00
|
|
|
.initialProperties(() -> Blocks.LECTERN)
|
|
|
|
.blockstate((ctx, prov) -> prov.horizontalBlock(ctx.getEntry(), prov.models()
|
|
|
|
.getExistingFile(ctx.getId()), 0))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
2020-05-18 22:01:09 +02:00
|
|
|
// Kinetics
|
2020-05-19 15:25:21 +02:00
|
|
|
|
2020-05-11 22:34:02 +02:00
|
|
|
static {
|
2020-05-23 14:02:38 +02:00
|
|
|
REGISTRATE.startSection(AllSections.KINETICS);
|
2020-05-11 22:34:02 +02:00
|
|
|
}
|
|
|
|
|
2020-05-14 06:53:12 +02:00
|
|
|
public static final BlockEntry<ShaftBlock> SHAFT = REGISTRATE.block("shaft", ShaftBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-13 21:56:46 +02:00
|
|
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
2020-05-14 06:53:12 +02:00
|
|
|
public static final BlockEntry<CogWheelBlock> COGWHEEL = REGISTRATE.block("cogwheel", CogWheelBlock::small)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-13 21:56:46 +02:00
|
|
|
.properties(p -> p.sound(SoundType.WOOD))
|
|
|
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
|
|
|
.item(CogwheelBlockItem::new)
|
|
|
|
.build()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CogWheelBlock> LARGE_COGWHEEL =
|
2020-05-14 06:53:12 +02:00
|
|
|
REGISTRATE.block("large_cogwheel", CogWheelBlock::large)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-04 19:57:16 +02:00
|
|
|
.properties(p -> p.sound(SoundType.WOOD))
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-12 14:06:50 +02:00
|
|
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
2020-05-11 22:34:02 +02:00
|
|
|
.item(CogwheelBlockItem::new)
|
2020-05-12 14:06:50 +02:00
|
|
|
.build()
|
2020-05-12 05:18:49 +02:00
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<EncasedShaftBlock> ENCASED_SHAFT =
|
2020-05-14 06:53:12 +02:00
|
|
|
REGISTRATE.block("encased_shaft", EncasedShaftBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-08-25 20:12:33 +02:00
|
|
|
.blockstate((c, p) -> axisBlock(c, p, blockState -> p.models()
|
|
|
|
.getExistingFile(p.modLoc("block/encased_shaft/" + blockState.get(EncasedShaftBlock.CASING)
|
2020-09-20 06:37:27 +02:00
|
|
|
.getString()))))
|
2020-08-18 13:53:05 +02:00
|
|
|
.loot((p, b) -> p.registerDropping(b, SHAFT.get()))
|
2020-05-12 14:06:50 +02:00
|
|
|
.register();
|
|
|
|
|
2020-05-14 06:53:12 +02:00
|
|
|
public static final BlockEntry<GearboxBlock> GEARBOX = REGISTRATE.block("gearbox", GearboxBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-13 21:56:46 +02:00
|
|
|
.blockstate(BlockStateGen.axisBlockProvider(true))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
2020-05-19 16:41:54 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-13 21:56:46 +02:00
|
|
|
.register();
|
|
|
|
|
2020-05-14 06:53:12 +02:00
|
|
|
public static final BlockEntry<ClutchBlock> CLUTCH = REGISTRATE.block("clutch", ClutchBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-13 21:56:46 +02:00
|
|
|
.blockstate((c, p) -> BlockStateGen.axisBlock(c, p, AssetLookup.forPowered(c, p)))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
2020-05-19 16:41:54 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-13 21:56:46 +02:00
|
|
|
.register();
|
|
|
|
|
2020-05-14 06:53:12 +02:00
|
|
|
public static final BlockEntry<GearshiftBlock> GEARSHIFT = REGISTRATE.block("gearshift", GearshiftBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-13 21:56:46 +02:00
|
|
|
.blockstate((c, p) -> BlockStateGen.axisBlock(c, p, AssetLookup.forPowered(c, p)))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
2020-05-19 16:41:54 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-13 21:56:46 +02:00
|
|
|
.register();
|
2020-05-15 17:13:38 +02:00
|
|
|
|
2020-05-18 22:01:09 +02:00
|
|
|
public static final BlockEntry<EncasedBeltBlock> ENCASED_BELT =
|
|
|
|
REGISTRATE.block("encased_belt", EncasedBeltBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-18 22:01:09 +02:00
|
|
|
.blockstate((c, p) -> new EncasedBeltGenerator((state, suffix) -> p.models()
|
|
|
|
.getExistingFile(p.modLoc("block/" + c.getName() + "/" + suffix))).generate(c, p))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
2020-05-19 16:41:54 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-18 22:01:09 +02:00
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<AdjustablePulleyBlock> ADJUSTABLE_PULLEY =
|
|
|
|
REGISTRATE.block("adjustable_pulley", AdjustablePulleyBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-18 22:01:09 +02:00
|
|
|
.blockstate((c, p) -> new EncasedBeltGenerator((state, suffix) -> {
|
|
|
|
String powered = state.get(AdjustablePulleyBlock.POWERED) ? "_powered" : "";
|
|
|
|
return p.models()
|
|
|
|
.withExistingParent(c.getName() + "_" + suffix + powered, p.modLoc("block/encased_belt/" + suffix))
|
|
|
|
.texture("side", p.modLoc("block/" + c.getName() + powered));
|
|
|
|
}).generate(c, p))
|
|
|
|
.item()
|
|
|
|
.model((c, p) -> p.withExistingParent(c.getName(), p.modLoc("block/encased_belt/item"))
|
|
|
|
.texture("side", p.modLoc("block/" + c.getName())))
|
|
|
|
.build()
|
|
|
|
.register();
|
|
|
|
|
2020-05-19 15:25:21 +02:00
|
|
|
public static final BlockEntry<BeltBlock> BELT = REGISTRATE.block("belt", BeltBlock::new)
|
|
|
|
.initialProperties(SharedProperties.beltMaterial, MaterialColor.GRAY)
|
2020-05-21 00:15:02 +02:00
|
|
|
.properties(p -> p.sound(SoundType.CLOTH))
|
2020-07-07 16:03:49 +02:00
|
|
|
.properties(p -> p.hardnessAndResistance(0.8F))
|
|
|
|
.blockstate(new BeltGenerator()::generate)
|
2020-05-19 15:25:21 +02:00
|
|
|
.transform(StressConfigDefaults.setImpact(1.0))
|
2020-05-28 01:29:26 +02:00
|
|
|
.onRegister(CreateRegistrate.blockColors(() -> BeltColor::new))
|
2020-07-07 16:03:49 +02:00
|
|
|
.onRegister(CreateRegistrate.blockModel(() -> BeltModel::new))
|
2020-05-19 15:25:21 +02:00
|
|
|
.register();
|
|
|
|
|
2020-06-05 23:26:22 +02:00
|
|
|
public static final BlockEntry<CreativeMotorBlock> CREATIVE_MOTOR =
|
|
|
|
REGISTRATE.block("creative_motor", CreativeMotorBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
|
|
|
.blockstate(new CreativeMotorGenerator()::generate)
|
|
|
|
.transform(StressConfigDefaults.setCapacity(16384.0))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
2020-05-19 16:41:54 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<WaterWheelBlock> WATER_WHEEL = REGISTRATE.block("water_wheel", WaterWheelBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-05-19 16:41:54 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalWheelProvider(false))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.transform(StressConfigDefaults.setCapacity(16.0))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<EncasedFanBlock> ENCASED_FAN = REGISTRATE.block("encased_fan", EncasedFanBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-19 16:41:54 +02:00
|
|
|
.blockstate(BlockStateGen.directionalBlockProvider(true))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.transform(StressConfigDefaults.setCapacity(16.0))
|
|
|
|
.transform(StressConfigDefaults.setImpact(2.0))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<NozzleBlock> NOZZLE = REGISTRATE.block("nozzle", NozzleBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-06 23:37:44 +02:00
|
|
|
.tag(AllBlockTags.BRITTLE.tag)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.directionalBlockProvider(true))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<TurntableBlock> TURNTABLE = REGISTRATE.block("turntable", TurntableBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.standardModel(c, p)))
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<HandCrankBlock> HAND_CRANK = REGISTRATE.block("hand_crank", HandCrankBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.directionalBlockProvider(true))
|
|
|
|
.transform(StressConfigDefaults.setCapacity(32.0))
|
2020-07-06 23:37:44 +02:00
|
|
|
.tag(AllBlockTags.BRITTLE.tag)
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CuckooClockBlock> CUCKOO_CLOCK =
|
|
|
|
REGISTRATE.block("cuckoo_clock", CuckooClockBlock::regular)
|
|
|
|
.transform(BuilderTransformers.cuckooClock())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CuckooClockBlock> MYSTERIOUS_CUCKOO_CLOCK =
|
|
|
|
REGISTRATE.block("mysterious_cuckoo_clock", CuckooClockBlock::mysterious)
|
|
|
|
.transform(BuilderTransformers.cuckooClock())
|
|
|
|
.lang("Cuckoo Clock")
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<MillstoneBlock> MILLSTONE = REGISTRATE.block("millstone", MillstoneBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p)))
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CrushingWheelBlock> CRUSHING_WHEEL =
|
|
|
|
REGISTRATE.block("crushing_wheel", CrushingWheelBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.transform(StressConfigDefaults.setImpact(8.0))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CrushingWheelControllerBlock> CRUSHING_WHEEL_CONTROLLER =
|
|
|
|
REGISTRATE.block("crushing_wheel_controller", CrushingWheelControllerBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.AIR)
|
|
|
|
.blockstate((c, p) -> p.getVariantBuilder(c.get())
|
|
|
|
.forAllStates(state -> ConfiguredModel.builder()
|
|
|
|
.modelFile(p.models()
|
|
|
|
.getExistingFile(p.mcLoc("block/air")))
|
|
|
|
.build()))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<MechanicalPressBlock> MECHANICAL_PRESS =
|
|
|
|
REGISTRATE.block("mechanical_press", MechanicalPressBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalBlockProvider(true))
|
|
|
|
.transform(StressConfigDefaults.setImpact(8.0))
|
|
|
|
.item(BasinOperatorBlockItem::new)
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<MechanicalMixerBlock> MECHANICAL_MIXER =
|
|
|
|
REGISTRATE.block("mechanical_mixer", MechanicalMixerBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p)))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
|
|
|
.item(BasinOperatorBlockItem::new)
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<BasinBlock> BASIN = REGISTRATE.block("basin", BasinBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.standardModel(ctx, prov)))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
2020-08-05 00:41:07 +02:00
|
|
|
public static final BlockEntry<BlazeBurnerBlock> BLAZE_BURNER =
|
|
|
|
REGISTRATE.block("blaze_burner", BlazeBurnerBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-09-20 06:37:27 +02:00
|
|
|
.properties(p -> p.luminance($ -> 12))
|
2020-08-05 00:41:07 +02:00
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.tag(AllBlockTags.FAN_TRANSPARENT.tag, AllBlockTags.FAN_HEATERS.tag)
|
|
|
|
.loot((lt, block) -> lt.registerLootTable(block, BlazeBurnerBlock.buildLootTable()))
|
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p)))
|
|
|
|
.item(BlazeBurnerBlockItem::withBlaze)
|
|
|
|
.model(AssetLookup.<BlazeBurnerBlockItem>customItemModel("blaze_burner", "block_with_blaze"))
|
|
|
|
.build()
|
|
|
|
.register();
|
2020-07-11 23:48:02 +02:00
|
|
|
|
2020-07-06 22:09:35 +02:00
|
|
|
public static final BlockEntry<DepotBlock> DEPOT = REGISTRATE.block("depot", DepotBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p)))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel("_", "block"))
|
|
|
|
.register();
|
2020-07-07 16:03:49 +02:00
|
|
|
|
2020-07-06 22:09:35 +02:00
|
|
|
public static final BlockEntry<ChuteBlock> CHUTE = REGISTRATE.block("chute", ChuteBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.blockstate(new ChuteGenerator()::generate)
|
|
|
|
.item(ChuteItem::new)
|
|
|
|
.transform(customItemModel("_", "block"))
|
|
|
|
.register();
|
2020-05-21 00:15:02 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<GaugeBlock> SPEEDOMETER = REGISTRATE.block("speedometer", GaugeBlock::speed)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(new GaugeGenerator()::generate)
|
|
|
|
.item()
|
2020-05-22 20:02:07 +02:00
|
|
|
.transform(ModelGen.customItemModel("gauge", "_", "item"))
|
2020-05-21 00:15:02 +02:00
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<GaugeBlock> STRESSOMETER = REGISTRATE.block("stressometer", GaugeBlock::stress)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(new GaugeGenerator()::generate)
|
|
|
|
.item()
|
2020-05-22 20:02:07 +02:00
|
|
|
.transform(ModelGen.customItemModel("gauge", "_", "item"))
|
2020-05-21 00:15:02 +02:00
|
|
|
.register();
|
|
|
|
|
2020-06-14 22:24:46 +02:00
|
|
|
// Fluids
|
2020-06-15 19:14:03 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<FluidPipeBlock> FLUID_PIPE = REGISTRATE.block("fluid_pipe", FluidPipeBlock::new)
|
2020-06-14 22:24:46 +02:00
|
|
|
.initialProperties(SharedProperties::softMetal)
|
|
|
|
.blockstate(BlockStateGen.pipe())
|
2020-08-25 20:12:33 +02:00
|
|
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::new))
|
2020-06-14 22:24:46 +02:00
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
2020-06-15 19:14:03 +02:00
|
|
|
|
2020-08-25 20:12:33 +02:00
|
|
|
public static final BlockEntry<EncasedPipeBlock> ENCASED_FLUID_PIPE =
|
|
|
|
REGISTRATE.block("encased_fluid_pipe", EncasedPipeBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
|
|
|
.blockstate((c, p) -> BlockStateGen.axisBlock(c, p, state -> p.models()
|
|
|
|
.cubeColumn(c.getName(), p.modLoc("block/copper_casing"), p.modLoc("block/encased_pipe"))))
|
|
|
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::new))
|
|
|
|
.loot((p, b) -> p.registerDropping(b, FLUID_PIPE.get()))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<GlassFluidPipeBlock> GLASS_FLUID_PIPE =
|
|
|
|
REGISTRATE.block("glass_fluid_pipe", GlassFluidPipeBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.blockstate((c, p) -> BlockStateGen.axisBlock(c, p, s -> p.models()
|
|
|
|
.getExistingFile(p.modLoc("block/fluid_pipe/window" + (s.get(GlassFluidPipeBlock.ALT) ? "_alt" : "")))))
|
|
|
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::new))
|
|
|
|
.loot((p, b) -> p.registerDropping(b, FLUID_PIPE.get()))
|
|
|
|
.register();
|
|
|
|
|
2020-06-15 19:14:03 +02:00
|
|
|
public static final BlockEntry<PumpBlock> MECHANICAL_PUMP = REGISTRATE.block("mechanical_pump", PumpBlock::new)
|
2020-06-15 02:25:33 +02:00
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-06-19 21:49:49 +02:00
|
|
|
.blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(true))
|
2020-08-25 20:12:33 +02:00
|
|
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::new))
|
2020-06-15 02:25:33 +02:00
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
2020-06-15 19:14:03 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<FluidTankBlock> FLUID_TANK = REGISTRATE.block("fluid_tank", FluidTankBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-07-19 00:22:14 +02:00
|
|
|
.blockstate(new FluidTankGenerator()::generate)
|
2020-06-15 19:14:03 +02:00
|
|
|
.onRegister(CreateRegistrate.blockModel(() -> FluidTankModel::new))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
2020-07-19 00:22:14 +02:00
|
|
|
.item(FluidTankItem::new)
|
2020-07-19 13:53:27 +02:00
|
|
|
.model(AssetLookup.<FluidTankItem>customItemModel("_", "block_single_window"))
|
2020-07-19 00:22:14 +02:00
|
|
|
.build()
|
2020-06-15 19:14:03 +02:00
|
|
|
.register();
|
|
|
|
|
2020-08-28 22:45:27 +02:00
|
|
|
public static final BlockEntry<SpoutBlock> SPOUT = REGISTRATE.block("spout", SpoutBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
|
|
|
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov)))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
2020-06-14 22:24:46 +02:00
|
|
|
// Contraptions
|
2020-06-15 19:14:03 +02:00
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
public static final BlockEntry<MechanicalPistonBlock> MECHANICAL_PISTON =
|
|
|
|
REGISTRATE.block("mechanical_piston", MechanicalPistonBlock::normal)
|
|
|
|
.transform(BuilderTransformers.mechanicalPiston(PistonType.DEFAULT))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<MechanicalPistonBlock> STICKY_MECHANICAL_PISTON =
|
|
|
|
REGISTRATE.block("sticky_mechanical_piston", MechanicalPistonBlock::sticky)
|
|
|
|
.transform(BuilderTransformers.mechanicalPiston(PistonType.STICKY))
|
|
|
|
.register();
|
|
|
|
|
2020-06-20 13:18:21 +02:00
|
|
|
public static final BlockEntry<PistonExtensionPoleBlock> PISTON_EXTENSION_POLE =
|
|
|
|
REGISTRATE.block("piston_extension_pole", PistonExtensionPoleBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.PISTON_HEAD)
|
|
|
|
.blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(false))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
public static final BlockEntry<MechanicalPistonHeadBlock> MECHANICAL_PISTON_HEAD =
|
|
|
|
REGISTRATE.block("mechanical_piston_head", MechanicalPistonHeadBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.PISTON_HEAD)
|
2020-06-20 13:18:21 +02:00
|
|
|
.loot((p, b) -> p.registerDropping(b, PISTON_EXTENSION_POLE.get()))
|
2020-06-19 21:49:49 +02:00
|
|
|
.blockstate((c, p) -> BlockStateGen.directionalBlockIgnoresWaterlogged(c, p, state -> p.models()
|
2020-05-21 00:15:02 +02:00
|
|
|
.getExistingFile(p.modLoc("block/mechanical_piston/" + state.get(MechanicalPistonHeadBlock.TYPE)
|
2020-07-23 04:34:05 +02:00
|
|
|
.name() + "/head"))))
|
2020-05-21 00:15:02 +02:00
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<MechanicalBearingBlock> MECHANICAL_BEARING =
|
|
|
|
REGISTRATE.block("mechanical_bearing", MechanicalBearingBlock::new)
|
|
|
|
.transform(BuilderTransformers.bearing("mechanical", "gearbox"))
|
|
|
|
.transform(StressConfigDefaults.setCapacity(512.0))
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<ClockworkBearingBlock> CLOCKWORK_BEARING =
|
|
|
|
REGISTRATE.block("clockwork_bearing", ClockworkBearingBlock::new)
|
|
|
|
.transform(BuilderTransformers.bearing("clockwork", "brass_gearbox"))
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<PulleyBlock> ROPE_PULLEY = REGISTRATE.block("rope_pulley", PulleyBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalAxisBlockProvider(true))
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
|
|
|
.item()
|
2020-05-19 16:41:54 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-19 01:07:45 +02:00
|
|
|
.register();
|
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
public static final BlockEntry<PulleyBlock.RopeBlock> ROPE = REGISTRATE.block("rope", PulleyBlock.RopeBlock::new)
|
|
|
|
.initialProperties(SharedProperties.beltMaterial, MaterialColor.BROWN)
|
2020-07-06 23:37:44 +02:00
|
|
|
.tag(AllBlockTags.BRITTLE.tag)
|
2020-05-21 00:15:02 +02:00
|
|
|
.properties(p -> p.sound(SoundType.CLOTH))
|
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.get(), p.models()
|
|
|
|
.getExistingFile(p.modLoc("block/rope_pulley/" + c.getName()))))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<PulleyBlock.MagnetBlock> PULLEY_MAGNET =
|
|
|
|
REGISTRATE.block("pulley_magnet", PulleyBlock.MagnetBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-06 23:37:44 +02:00
|
|
|
.tag(AllBlockTags.BRITTLE.tag)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.get(), p.models()
|
|
|
|
.getExistingFile(p.modLoc("block/rope_pulley/" + c.getName()))))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CartAssemblerBlock> CART_ASSEMBLER =
|
|
|
|
REGISTRATE.block("cart_assembler", CartAssemblerBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.cartAssembler())
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.tag(BlockTags.RAILS)
|
2020-06-11 12:57:02 +02:00
|
|
|
.item(CartAssemblerBlockItem::new)
|
2020-06-13 20:41:08 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-21 00:15:02 +02:00
|
|
|
.register();
|
2020-06-15 19:14:03 +02:00
|
|
|
|
2020-06-09 23:49:39 +02:00
|
|
|
public static final BlockEntry<ReinforcedRailBlock> REINFORCED_RAIL =
|
2020-06-15 19:14:03 +02:00
|
|
|
REGISTRATE.block("reinforced_rail", ReinforcedRailBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-15 19:14:03 +02:00
|
|
|
.blockstate(BlockStateGen.reinforcedRail())
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.tag(BlockTags.RAILS)
|
|
|
|
.item()
|
|
|
|
.model((c, p) -> p.blockItem(() -> c.getEntry()
|
|
|
|
.getBlock(), "/block"))
|
|
|
|
.build()
|
|
|
|
.register();
|
2020-05-21 00:15:02 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<MinecartAnchorBlock> MINECART_ANCHOR =
|
|
|
|
REGISTRATE.block("minecart_anchor", MinecartAnchorBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate((c, p) -> p.simpleBlock(c.get(), p.models()
|
|
|
|
.getExistingFile(p.modLoc("block/cart_assembler/" + c.getName()))))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<LinearChassisBlock> LINEAR_CHASSIS =
|
2020-05-31 19:17:00 +02:00
|
|
|
REGISTRATE.block("linear_chassis", LinearChassisBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.linearChassis())
|
2020-05-28 01:29:26 +02:00
|
|
|
.onRegister(connectedTextures(new ChassisCTBehaviour()))
|
2020-05-21 00:15:02 +02:00
|
|
|
.lang("Linear Chassis")
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
2020-05-31 19:17:00 +02:00
|
|
|
public static final BlockEntry<LinearChassisBlock> SECONDARY_LINEAR_CHASSIS =
|
|
|
|
REGISTRATE.block("secondary_linear_chassis", LinearChassisBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.linearChassis())
|
2020-05-28 01:29:26 +02:00
|
|
|
.onRegister(connectedTextures(new ChassisCTBehaviour()))
|
2020-05-21 00:15:02 +02:00
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<RadialChassisBlock> RADIAL_CHASSIS =
|
2020-05-31 19:17:00 +02:00
|
|
|
REGISTRATE.block("radial_chassis", RadialChassisBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.radialChassis())
|
|
|
|
.item()
|
|
|
|
.model((c, p) -> {
|
|
|
|
String path = "block/" + c.getName();
|
|
|
|
p.cubeColumn(c.getName(), p.modLoc(path + "_side"), p.modLoc(path + "_end"));
|
|
|
|
})
|
|
|
|
.build()
|
|
|
|
.register();
|
|
|
|
|
2020-05-31 19:17:00 +02:00
|
|
|
public static final BlockEntry<DrillBlock> MECHANICAL_DRILL = REGISTRATE.block("mechanical_drill", DrillBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.directionalBlockProvider(true))
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(new DrillMovementBehaviour()))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
2020-05-31 19:17:00 +02:00
|
|
|
public static final BlockEntry<SawBlock> MECHANICAL_SAW = REGISTRATE.block("mechanical_saw", SawBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(new SawGenerator()::generate)
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(new SawMovementBehaviour()))
|
2020-05-21 00:15:02 +02:00
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.model((c, p) -> p.blockItem(() -> c.getEntry()
|
|
|
|
.getBlock(), "/horizontal"))
|
|
|
|
.build()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<DeployerBlock> DEPLOYER = REGISTRATE.block("deployer", DeployerBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.directionalAxisBlockProvider())
|
|
|
|
.transform(StressConfigDefaults.setImpact(4.0))
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(new DeployerMovementBehaviour()))
|
2020-05-21 00:15:02 +02:00
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<PortableStorageInterfaceBlock> PORTABLE_STORAGE_INTERFACE =
|
|
|
|
REGISTRATE.block("portable_storage_interface", PortableStorageInterfaceBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-09-13 00:59:14 +02:00
|
|
|
// .onRegister(addMovementBehaviour(new StorageInterfaceMovement()))
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.directionalBlockProvider(false))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
2020-06-05 23:26:22 +02:00
|
|
|
public static final BlockEntry<HarvesterBlock> MECHANICAL_HARVESTER =
|
|
|
|
REGISTRATE.block("mechanical_harvester", HarvesterBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(new HarvesterMovementBehaviour()))
|
2020-06-05 23:26:22 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalBlockProvider(true))
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
2020-05-21 00:15:02 +02:00
|
|
|
|
2020-06-05 23:26:22 +02:00
|
|
|
public static final BlockEntry<PloughBlock> MECHANICAL_PLOUGH =
|
|
|
|
REGISTRATE.block("mechanical_plough", PloughBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(new PloughMovementBehaviour()))
|
2020-06-05 23:26:22 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalBlockProvider(false))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
2020-05-21 00:15:02 +02:00
|
|
|
|
2020-07-11 01:28:37 +02:00
|
|
|
static {
|
|
|
|
for (DyeColor colour : DyeColor.values()) {
|
2020-09-20 06:37:27 +02:00
|
|
|
String colourName = colour.getString();
|
2020-08-09 14:36:07 +02:00
|
|
|
SeatMovementBehaviour movementBehaviour = new SeatMovementBehaviour();
|
2020-07-11 01:28:37 +02:00
|
|
|
REGISTRATE.block(colourName + "_seat", p -> new SeatBlock(p, colour == DyeColor.RED))
|
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(movementBehaviour))
|
2020-07-11 01:28:37 +02:00
|
|
|
.blockstate((c, p) -> {
|
|
|
|
p.simpleBlock(c.get(), p.models()
|
|
|
|
.withExistingParent(colourName + "_seat", p.modLoc("block/seat"))
|
|
|
|
.texture("1", p.modLoc("block/seat/top_" + colourName))
|
|
|
|
.texture("2", p.modLoc("block/seat/side_" + colourName)));
|
|
|
|
})
|
2020-08-31 12:49:36 +02:00
|
|
|
.recipe((c, p) -> {
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(c.get())
|
|
|
|
.patternLine("#")
|
|
|
|
.patternLine("-")
|
|
|
|
.key('#', DyeHelper.getWoolOfDye(colour))
|
|
|
|
.key('-', ItemTags.WOODEN_SLABS)
|
|
|
|
.addCriterion("has_wool",
|
2020-09-20 06:37:27 +02:00
|
|
|
new InventoryChangeTrigger.Instance(AndPredicate.EMPTY, MinMaxBounds.IntBound.UNBOUNDED,
|
2020-08-31 12:49:36 +02:00
|
|
|
MinMaxBounds.IntBound.UNBOUNDED, MinMaxBounds.IntBound.UNBOUNDED,
|
|
|
|
new ItemPredicate[] { ItemPredicate.Builder.create()
|
|
|
|
.tag(ItemTags.WOOL)
|
|
|
|
.build() }))
|
|
|
|
.build(p, Create.asResource("crafting/kinetics/" + c.getName()));
|
|
|
|
ShapedRecipeBuilder.shapedRecipe(c.get())
|
|
|
|
.patternLine("#")
|
|
|
|
.patternLine("-")
|
|
|
|
.key('#', DyeHelper.getTagOfDye(colour))
|
|
|
|
.key('-', AllItemTags.SEATS.tag)
|
|
|
|
.addCriterion("has_seat",
|
2020-09-20 06:37:27 +02:00
|
|
|
new InventoryChangeTrigger.Instance(AndPredicate.EMPTY, MinMaxBounds.IntBound.UNBOUNDED,
|
2020-08-31 12:49:36 +02:00
|
|
|
MinMaxBounds.IntBound.UNBOUNDED, MinMaxBounds.IntBound.UNBOUNDED,
|
|
|
|
new ItemPredicate[] { ItemPredicate.Builder.create()
|
|
|
|
.tag(AllItemTags.SEATS.tag)
|
|
|
|
.build() }))
|
|
|
|
.build(p, Create.asResource("crafting/kinetics/" + c.getName() + "_from_other_seat"));
|
|
|
|
})
|
|
|
|
.tag(AllBlockTags.SEATS.tag)
|
|
|
|
.item()
|
|
|
|
.tag(AllItemTags.SEATS.tag)
|
|
|
|
.build()
|
2020-07-11 01:28:37 +02:00
|
|
|
.register();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
public static final BlockEntry<CasingBlock> ANDESITE_CASING = REGISTRATE.block("andesite_casing", CasingBlock::new)
|
|
|
|
.transform(BuilderTransformers.casing(AllSpriteShifts.ANDESITE_CASING))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CasingBlock> BRASS_CASING = REGISTRATE.block("brass_casing", CasingBlock::new)
|
|
|
|
.transform(BuilderTransformers.casing(AllSpriteShifts.BRASS_CASING))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CasingBlock> COPPER_CASING = REGISTRATE.block("copper_casing", CasingBlock::new)
|
|
|
|
.transform(BuilderTransformers.casing(AllSpriteShifts.COPPER_CASING))
|
|
|
|
.register();
|
|
|
|
|
2020-08-05 00:41:07 +02:00
|
|
|
public static final BlockEntry<CasingBlock> SHADOW_STEEL_CASING =
|
|
|
|
REGISTRATE.block("shadow_steel_casing", CasingBlock::new)
|
|
|
|
.transform(BuilderTransformers.casing(AllSpriteShifts.SHADOW_STEEL_CASING))
|
2020-08-31 12:49:36 +02:00
|
|
|
.lang("Shadow Casing")
|
2020-08-05 00:41:07 +02:00
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CasingBlock> REFINED_RADIANCE_CASING =
|
|
|
|
REGISTRATE.block("refined_radiance_casing", CasingBlock::new)
|
|
|
|
.transform(BuilderTransformers.casing(AllSpriteShifts.REFINED_RADIANCE_CASING))
|
2020-09-20 06:37:27 +02:00
|
|
|
.properties(p -> p.luminance($ -> 12))
|
2020-08-31 12:49:36 +02:00
|
|
|
.lang("Radiant Casing")
|
2020-08-05 00:41:07 +02:00
|
|
|
.register();
|
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
public static final BlockEntry<MechanicalCrafterBlock> MECHANICAL_CRAFTER =
|
|
|
|
REGISTRATE.block("mechanical_crafter", MechanicalCrafterBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalBlockProvider(true))
|
|
|
|
.transform(StressConfigDefaults.setImpact(2.0))
|
2020-05-28 01:29:26 +02:00
|
|
|
.onRegister(CreateRegistrate.connectedTextures(new CrafterCTBehaviour()))
|
2020-05-21 00:15:02 +02:00
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<SequencedGearshiftBlock> SEQUENCED_GEARSHIFT =
|
|
|
|
REGISTRATE.block("sequenced_gearshift", SequencedGearshiftBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(new SequencedGearshiftGenerator()::generate)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
2020-05-22 20:02:07 +02:00
|
|
|
public static final BlockEntry<FlywheelBlock> FLYWHEEL = REGISTRATE.block("flywheel", FlywheelBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-07-22 06:57:59 +02:00
|
|
|
.properties(AbstractBlock.Properties::nonOpaque)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-22 20:02:07 +02:00
|
|
|
.blockstate(new FlywheelGenerator()::generate)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
public static final BlockEntry<FurnaceEngineBlock> FURNACE_ENGINE =
|
|
|
|
REGISTRATE.block("furnace_engine", FurnaceEngineBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-07-06 23:37:44 +02:00
|
|
|
.tag(AllBlockTags.BRITTLE.tag)
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalBlockProvider(true))
|
|
|
|
.transform(StressConfigDefaults.setCapacity(1024.0))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
2020-05-22 20:02:07 +02:00
|
|
|
|
2020-05-21 00:15:02 +02:00
|
|
|
public static final BlockEntry<SpeedControllerBlock> ROTATION_SPEED_CONTROLLER =
|
|
|
|
REGISTRATE.block("rotation_speed_controller", SpeedControllerBlock::new)
|
2020-05-22 20:02:07 +02:00
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-06-05 13:02:11 +02:00
|
|
|
.transform(StressConfigDefaults.setNoImpact())
|
2020-05-21 00:15:02 +02:00
|
|
|
.blockstate(BlockStateGen.horizontalAxisBlockProvider(true))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
2020-05-22 20:02:07 +02:00
|
|
|
// Logistics
|
|
|
|
|
|
|
|
static {
|
2020-05-23 14:02:38 +02:00
|
|
|
REGISTRATE.startSection(AllSections.LOGISTICS);
|
2020-05-22 20:02:07 +02:00
|
|
|
}
|
|
|
|
|
2020-07-06 22:09:35 +02:00
|
|
|
public static final BlockEntry<ArmBlock> MECHANICAL_ARM = REGISTRATE.block("mechanical_arm", ArmBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-07-10 19:48:04 +02:00
|
|
|
.blockstate((c, p) -> p.getVariantBuilder(c.get())
|
|
|
|
.forAllStates(s -> ConfiguredModel.builder()
|
|
|
|
.modelFile(AssetLookup.partialBaseModel(c, p))
|
|
|
|
.rotationX(s.get(ArmBlock.CEILING) ? 180 : 0)
|
|
|
|
.build()))
|
2020-07-06 22:09:35 +02:00
|
|
|
.transform(StressConfigDefaults.setImpact(8.0))
|
|
|
|
.item(ArmItem::new)
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
2020-07-07 16:03:49 +02:00
|
|
|
|
2020-07-08 01:36:34 +02:00
|
|
|
public static final BlockEntry<AndesiteFunnelBlock> ANDESITE_FUNNEL =
|
|
|
|
REGISTRATE.block("andesite_funnel", AndesiteFunnelBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(FunnelMovementBehaviour.andesite()))
|
2020-07-08 01:36:34 +02:00
|
|
|
.transform(BuilderTransformers.funnel("andesite", Create.asResource("block/andesite_casing")))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<AndesiteBeltFunnelBlock> ANDESITE_BELT_FUNNEL =
|
|
|
|
REGISTRATE.block("andesite_belt_funnel", AndesiteBeltFunnelBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-09-14 21:10:38 +02:00
|
|
|
.blockstate(new BeltFunnelGenerator("andesite", new ResourceLocation("block/polished_andesite"))::generate)
|
2020-07-08 01:36:34 +02:00
|
|
|
.loot((p, b) -> p.registerDropping(b, ANDESITE_FUNNEL.get()))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<BrassFunnelBlock> BRASS_FUNNEL =
|
|
|
|
REGISTRATE.block("brass_funnel", BrassFunnelBlock::new)
|
2020-07-06 22:09:35 +02:00
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(FunnelMovementBehaviour.brass()))
|
2020-07-08 01:36:34 +02:00
|
|
|
.transform(BuilderTransformers.funnel("brass", Create.asResource("block/brass_casing")))
|
2020-07-06 22:09:35 +02:00
|
|
|
.register();
|
2020-07-07 16:03:49 +02:00
|
|
|
|
2020-07-08 01:36:34 +02:00
|
|
|
public static final BlockEntry<BrassBeltFunnelBlock> BRASS_BELT_FUNNEL =
|
|
|
|
REGISTRATE.block("brass_belt_funnel", BrassBeltFunnelBlock::new)
|
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-09-14 21:10:38 +02:00
|
|
|
.blockstate(new BeltFunnelGenerator("brass", Create.asResource("block/brass_block"))::generate)
|
2020-07-08 01:36:34 +02:00
|
|
|
.loot((p, b) -> p.registerDropping(b, BRASS_FUNNEL.get()))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<BeltTunnelBlock> ANDESITE_TUNNEL =
|
|
|
|
REGISTRATE.block("andesite_tunnel", BeltTunnelBlock::new)
|
|
|
|
.transform(BuilderTransformers.beltTunnel("andesite", new ResourceLocation("block/polished_andesite")))
|
|
|
|
.register();
|
|
|
|
|
2020-07-08 22:24:33 +02:00
|
|
|
public static final BlockEntry<BrassTunnelBlock> BRASS_TUNNEL =
|
|
|
|
REGISTRATE.block("brass_tunnel", BrassTunnelBlock::new)
|
2020-07-08 01:36:34 +02:00
|
|
|
.transform(BuilderTransformers.beltTunnel("brass", Create.asResource("block/brass_block")))
|
2020-07-08 22:24:33 +02:00
|
|
|
.onRegister(connectedTextures(new BrassTunnelCTBehaviour()))
|
2020-07-07 16:03:49 +02:00
|
|
|
.register();
|
2020-05-22 20:02:07 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<RedstoneContactBlock> REDSTONE_CONTACT =
|
|
|
|
REGISTRATE.block("redstone_contact", RedstoneContactBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
2020-09-08 18:42:11 +02:00
|
|
|
.onRegister(addMovementBehaviour(new ContactMovementBehaviour()))
|
2020-05-22 20:02:07 +02:00
|
|
|
.blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.forPowered(c, p)))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel("_", "block"))
|
|
|
|
.register();
|
|
|
|
|
2020-09-13 00:59:14 +02:00
|
|
|
public static final BlockEntry<BeltObserverBlock> BELT_OBSERVER =
|
|
|
|
REGISTRATE.block("belt_observer", BeltObserverBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
|
|
|
.blockstate(BlockStateGen.beltObserver())
|
2020-05-22 20:02:07 +02:00
|
|
|
.item()
|
2020-09-13 00:59:14 +02:00
|
|
|
.transform(customItemModel())
|
2020-05-22 20:02:07 +02:00
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<StockpileSwitchBlock> STOCKPILE_SWITCH =
|
|
|
|
REGISTRATE.block("stockpile_switch", StockpileSwitchBlock::new)
|
|
|
|
.initialProperties(SharedProperties::stone)
|
|
|
|
.blockstate((c, p) -> p.horizontalBlock(c.get(),
|
|
|
|
AssetLookup.withIndicator(c, p, $ -> AssetLookup.standardModel(c, p), StockpileSwitchBlock.INDICATOR)))
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<AdjustableCrateBlock> ADJUSTABLE_CRATE =
|
|
|
|
REGISTRATE.block("adjustable_crate", AdjustableCrateBlock::new)
|
|
|
|
.transform(BuilderTransformers.crate("brass"))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<CreativeCrateBlock> CREATIVE_CRATE =
|
|
|
|
REGISTRATE.block("creative_crate", CreativeCrateBlock::new)
|
|
|
|
.transform(BuilderTransformers.crate("creative"))
|
|
|
|
.register();
|
|
|
|
|
2020-09-13 00:59:14 +02:00
|
|
|
public static final BlockEntry<NixieTubeBlock> NIXIE_TUBE = REGISTRATE.block("nixie_tube", NixieTubeBlock::new)
|
2020-06-16 12:54:24 +02:00
|
|
|
.initialProperties(SharedProperties::softMetal)
|
2020-09-20 06:37:27 +02:00
|
|
|
.properties(p -> p.luminance($ -> 5))
|
2020-09-13 00:59:14 +02:00
|
|
|
.blockstate(new NixieTubeGenerator()::generate)
|
|
|
|
.addLayer(() -> RenderType::getTranslucent)
|
2020-05-22 20:02:07 +02:00
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
2020-09-13 00:59:14 +02:00
|
|
|
public static final BlockEntry<RedstoneLinkBlock> REDSTONE_LINK =
|
|
|
|
REGISTRATE.block("redstone_link", RedstoneLinkBlock::new)
|
|
|
|
.initialProperties(SharedProperties::wooden)
|
2020-07-06 23:37:44 +02:00
|
|
|
.tag(AllBlockTags.BRITTLE.tag)
|
2020-09-13 00:59:14 +02:00
|
|
|
.blockstate(new RedstoneLinkGenerator()::generate)
|
2020-06-05 23:26:22 +02:00
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
2020-09-13 00:59:14 +02:00
|
|
|
.transform(customItemModel("_", "transmitter"))
|
2020-05-22 20:02:07 +02:00
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<AnalogLeverBlock> ANALOG_LEVER =
|
|
|
|
REGISTRATE.block("analog_lever", AnalogLeverBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.LEVER)
|
|
|
|
.blockstate((c, p) -> p.horizontalFaceBlock(c.get(), AssetLookup.partialBaseModel(c, p)))
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<PulseRepeaterBlock> PULSE_REPEATER =
|
|
|
|
REGISTRATE.block("pulse_repeater", PulseRepeaterBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.REPEATER)
|
|
|
|
.blockstate(new PulseRepeaterGenerator()::generate)
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel("diodes", "pulse_repeater"))
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<AdjustableRepeaterBlock> ADJUSTABLE_REPEATER =
|
|
|
|
REGISTRATE.block("adjustable_repeater", AdjustableRepeaterBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.REPEATER)
|
|
|
|
.blockstate(new AdjustableRepeaterGenerator()::generate)
|
|
|
|
.item()
|
|
|
|
.model(AbstractDiodeGenerator.diodeItemModel(true))
|
|
|
|
.build()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<AdjustableRepeaterBlock> ADJUSTABLE_PULSE_REPEATER =
|
|
|
|
REGISTRATE.block("adjustable_pulse_repeater", AdjustableRepeaterBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.REPEATER)
|
|
|
|
.blockstate(new AdjustableRepeaterGenerator()::generate)
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.model(AbstractDiodeGenerator.diodeItemModel(true))
|
|
|
|
.build()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<PoweredLatchBlock> POWERED_LATCH =
|
|
|
|
REGISTRATE.block("powered_latch", PoweredLatchBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.REPEATER)
|
|
|
|
.blockstate(new PoweredLatchGenerator()::generate)
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.simpleItem()
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<ToggleLatchBlock> POWERED_TOGGLE_LATCH =
|
|
|
|
REGISTRATE.block("powered_toggle_latch", ToggleLatchBlock::new)
|
|
|
|
.initialProperties(() -> Blocks.REPEATER)
|
|
|
|
.blockstate(new ToggleLatchGenerator()::generate)
|
|
|
|
.addLayer(() -> RenderType::getCutoutMipped)
|
|
|
|
.item()
|
|
|
|
.transform(customItemModel("diodes", "latch_off"))
|
|
|
|
.register();
|
|
|
|
|
2020-05-18 22:01:09 +02:00
|
|
|
// Materials
|
2020-05-19 15:25:21 +02:00
|
|
|
|
2020-05-15 17:13:38 +02:00
|
|
|
static {
|
2020-05-23 14:02:38 +02:00
|
|
|
REGISTRATE.startSection(AllSections.MATERIALS);
|
2020-05-15 17:13:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public static final BlockEntry<OxidizingBlock> COPPER_ORE =
|
|
|
|
REGISTRATE.block("copper_ore", p -> new OxidizingBlock(p, 1))
|
|
|
|
.initialProperties(() -> Blocks.IRON_ORE)
|
|
|
|
.transform(oxidizedBlockstate())
|
|
|
|
.transform(tagBlockAndItem("ores/copper"))
|
2020-05-15 05:17:31 +02:00
|
|
|
.transform(oxidizedItemModel())
|
2020-05-15 17:13:38 +02:00
|
|
|
.register();
|
|
|
|
|
2020-05-15 04:07:19 +02:00
|
|
|
public static final BlockEntry<Block> ZINC_ORE = REGISTRATE.block("zinc_ore", Block::new)
|
|
|
|
.initialProperties(() -> Blocks.GOLD_BLOCK)
|
2020-05-15 17:13:38 +02:00
|
|
|
.properties(p -> p.harvestLevel(2)
|
2020-09-05 18:39:06 +02:00
|
|
|
.harvestTool(ToolType.PICKAXE)
|
|
|
|
.sound(SoundType.STONE))
|
2020-05-15 04:07:19 +02:00
|
|
|
.transform(tagBlockAndItem("ores/zinc"))
|
2020-05-15 17:13:38 +02:00
|
|
|
.build()
|
2020-05-15 04:07:19 +02:00
|
|
|
.register();
|
2020-05-15 17:13:38 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<OxidizingBlock> COPPER_BLOCK =
|
2020-09-22 22:00:44 +02:00
|
|
|
REGISTRATE.block("copper_block", p -> new OxidizingBlock(p, 1 / 32f))
|
2020-05-15 17:13:38 +02:00
|
|
|
.initialProperties(() -> Blocks.IRON_BLOCK)
|
|
|
|
.transform(tagBlockAndItem("storage_blocks/copper"))
|
2020-05-15 05:17:31 +02:00
|
|
|
.transform(oxidizedItemModel())
|
2020-05-15 17:13:38 +02:00
|
|
|
.transform(oxidizedBlockstate())
|
|
|
|
.register();
|
|
|
|
|
|
|
|
public static final BlockEntry<OxidizingBlock> COPPER_SHINGLES =
|
|
|
|
REGISTRATE.block("copper_shingles", p -> new OxidizingBlock(p, 1 / 32f))
|
|
|
|
.initialProperties(() -> Blocks.IRON_BLOCK)
|
|
|
|
.item()
|
|
|
|
.transform(oxidizedItemModel())
|
|
|
|
.transform(oxidizedBlockstate())
|
|
|
|
.register();
|
|
|
|
|
2020-08-05 00:41:07 +02:00
|
|
|
public static final BlockEntry<OxidizingBlock> COPPER_TILES =
|
|
|
|
REGISTRATE.block("copper_tiles", p -> new OxidizingBlock(p, 1 / 32f))
|
|
|
|
.initialProperties(() -> Blocks.IRON_BLOCK)
|
|
|
|
.item()
|
|
|
|
.transform(oxidizedItemModel())
|
|
|
|
.transform(oxidizedBlockstate())
|
|
|
|
.register();
|
|
|
|
|
2020-09-22 22:00:44 +02:00
|
|
|
public static final BlockEntry<Block> ZINC_BLOCK = REGISTRATE.block("zinc_block", p -> new Block(p))
|
2020-05-15 04:07:19 +02:00
|
|
|
.initialProperties(() -> Blocks.IRON_BLOCK)
|
|
|
|
.transform(tagBlockAndItem("storage_blocks/zinc"))
|
2020-05-15 17:13:38 +02:00
|
|
|
.build()
|
2020-05-15 04:07:19 +02:00
|
|
|
.register();
|
2020-05-15 17:13:38 +02:00
|
|
|
|
2020-09-22 22:00:44 +02:00
|
|
|
public static final BlockEntry<Block> BRASS_BLOCK =
|
|
|
|
REGISTRATE.block("brass_block", p -> new Block(p))
|
2020-06-19 18:37:11 +02:00
|
|
|
.initialProperties(() -> Blocks.IRON_BLOCK)
|
|
|
|
.transform(tagBlockAndItem("storage_blocks/brass"))
|
|
|
|
.build()
|
|
|
|
.register();
|
2020-05-12 14:06:50 +02:00
|
|
|
|
2020-05-28 01:29:26 +02:00
|
|
|
// Load this class
|
2020-06-05 23:26:22 +02:00
|
|
|
|
2020-05-13 01:11:07 +02:00
|
|
|
public static void register() {}
|
2020-05-13 21:56:46 +02:00
|
|
|
|
2020-04-26 06:58:38 +02:00
|
|
|
}
|