Create/src/main/java/com/simibubi/create/AllBlocksNew.java

110 lines
4.1 KiB
Java
Raw Normal View History

package com.simibubi.create;
import static com.simibubi.create.modules.Sections.SCHEMATICS;
import com.simibubi.create.foundation.utility.data.AssetLookup;
import com.simibubi.create.foundation.utility.data.BlockStateGen;
import com.simibubi.create.modules.Sections;
import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock;
import com.simibubi.create.modules.contraptions.relays.elementary.CogwheelBlockItem;
import com.simibubi.create.modules.contraptions.relays.elementary.ShaftBlock;
import com.simibubi.create.modules.contraptions.relays.encased.ClutchBlock;
import com.simibubi.create.modules.contraptions.relays.encased.EncasedShaftBlock;
import com.simibubi.create.modules.contraptions.relays.encased.GearshiftBlock;
import com.simibubi.create.modules.contraptions.relays.gearbox.GearboxBlock;
import com.simibubi.create.modules.schematics.block.SchematicTableBlock;
import com.simibubi.create.modules.schematics.block.SchematicannonBlock;
import com.tterrag.registrate.util.entry.BlockEntry;
import net.minecraft.block.Blocks;
import net.minecraft.block.SoundType;
public class AllBlocksNew {
private static final CreateRegistrate REGISTRATE = Create.registrate();
static {
REGISTRATE.startSection(SCHEMATICS);
}
public static final BlockEntry<SchematicannonBlock> SCHEMATICANNON =
REGISTRATE.block("schematicannon", SchematicannonBlock::new)
.initialProperties(() -> Blocks.DISPENSER)
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov)))
.item()
.model(AssetLookup::customItemModel)
.build()
.register();
public static final BlockEntry<SchematicTableBlock> SCHEMATIC_TABLE =
REGISTRATE.block("schematic_table", SchematicTableBlock::new)
.initialProperties(() -> Blocks.LECTERN)
.blockstate((ctx, prov) -> prov.horizontalBlock(ctx.getEntry(), prov.models()
.getExistingFile(ctx.getId()), 0))
.simpleItem()
.register();
static {
REGISTRATE.startSection(Sections.KINETICS);
}
public static final BlockEntry<ShaftBlock> SHAFT = REGISTRATE.block("shaft", ShaftBlock::new)
.initialProperties(SharedProperties::kinetic)
.blockstate(BlockStateGen.axisBlockProvider(false))
.simpleItem()
.register();
public static final BlockEntry<CogWheelBlock> COGWHEEL = REGISTRATE.block("cogwheel", CogWheelBlock::small)
.initialProperties(SharedProperties::kinetic)
.properties(p -> p.sound(SoundType.WOOD))
.blockstate(BlockStateGen.axisBlockProvider(false))
.item(CogwheelBlockItem::new)
.build()
.register();
public static final BlockEntry<CogWheelBlock> LARGE_COGWHEEL =
REGISTRATE.block("large_cogwheel", CogWheelBlock::large)
.initialProperties(SharedProperties::kinetic)
.properties(p -> p.sound(SoundType.WOOD))
.blockstate(BlockStateGen.axisBlockProvider(false))
.item(CogwheelBlockItem::new)
.build()
.register();
public static final BlockEntry<EncasedShaftBlock> ENCASED_SHAFT =
REGISTRATE.block("encased_shaft", EncasedShaftBlock::new)
.initialProperties(SharedProperties::kinetic)
.blockstate(BlockStateGen.axisBlockProvider(true))
.item()
.model(AssetLookup::customItemModel)
.build()
.register();
public static final BlockEntry<GearboxBlock> GEARBOX = REGISTRATE.block("gearbox", GearboxBlock::new)
.initialProperties(SharedProperties::kinetic)
.blockstate(BlockStateGen.axisBlockProvider(true))
.item()
.model(AssetLookup::customItemModel)
.build()
.register();
public static final BlockEntry<ClutchBlock> CLUTCH = REGISTRATE.block("clutch", ClutchBlock::new)
.initialProperties(SharedProperties::kinetic)
.blockstate((c, p) -> BlockStateGen.axisBlock(c, p, AssetLookup.forPowered(c, p)))
.item()
.model(AssetLookup::customItemModel)
.build()
.register();
public static final BlockEntry<GearshiftBlock> GEARSHIFT = REGISTRATE.block("gearshift", GearshiftBlock::new)
.initialProperties(SharedProperties::kinetic)
.blockstate((c, p) -> BlockStateGen.axisBlock(c, p, AssetLookup.forPowered(c, p)))
.item()
.model(AssetLookup::customItemModel)
.build()
.register();
public static void register() {
}
}