2020-04-26 06:58:38 +02:00
|
|
|
package com.simibubi.create;
|
|
|
|
|
2020-05-02 18:07:46 +02:00
|
|
|
import static com.simibubi.create.modules.Sections.SCHEMATICS;
|
|
|
|
|
2020-05-12 14:06:50 +02:00
|
|
|
import com.simibubi.create.foundation.utility.data.AssetLookup;
|
2020-05-04 19:57:16 +02:00
|
|
|
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;
|
2020-05-12 14:06:50 +02:00
|
|
|
import com.simibubi.create.modules.contraptions.relays.encased.ClutchBlock;
|
2020-05-04 19:57:16 +02:00
|
|
|
import com.simibubi.create.modules.contraptions.relays.encased.EncasedShaftBlock;
|
2020-05-12 14:06:50 +02:00
|
|
|
import com.simibubi.create.modules.contraptions.relays.encased.GearshiftBlock;
|
|
|
|
import com.simibubi.create.modules.contraptions.relays.gearbox.GearboxBlock;
|
2020-04-26 06:58:38 +02:00
|
|
|
import com.simibubi.create.modules.schematics.block.SchematicTableBlock;
|
|
|
|
import com.simibubi.create.modules.schematics.block.SchematicannonBlock;
|
2020-05-12 05:18:49 +02:00
|
|
|
import com.tterrag.registrate.util.entry.BlockEntry;
|
2020-04-26 06:58:38 +02:00
|
|
|
|
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-02 18:07:46 +02:00
|
|
|
|
2020-04-26 06:58:38 +02:00
|
|
|
public class AllBlocksNew {
|
2020-05-11 22:34:02 +02:00
|
|
|
|
2020-04-26 06:58:38 +02:00
|
|
|
private static final CreateRegistrate REGISTRATE = Create.registrate();
|
2020-05-04 19:57:16 +02:00
|
|
|
|
2020-05-11 22:34:02 +02:00
|
|
|
static {
|
|
|
|
REGISTRATE.startSection(SCHEMATICS);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final BlockEntry<SchematicannonBlock> SCHEMATICANNON =
|
2020-05-12 05:18:49 +02:00
|
|
|
REGISTRATE.block("schematicannon", SchematicannonBlock::new)
|
2020-05-11 22:34:02 +02:00
|
|
|
.initialProperties(() -> Blocks.DISPENSER)
|
2020-05-12 14:06:50 +02:00
|
|
|
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov)))
|
2020-05-11 22:34:02 +02:00
|
|
|
.item()
|
2020-05-12 14:06:50 +02:00
|
|
|
.model(AssetLookup::customItemModel)
|
|
|
|
.build()
|
2020-05-12 05:18:49 +02:00
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
|
|
|
public static final BlockEntry<SchematicTableBlock> SCHEMATIC_TABLE =
|
2020-05-12 05:18:49 +02:00
|
|
|
REGISTRATE.block("schematic_table", SchematicTableBlock::new)
|
2020-05-11 22:34:02 +02:00
|
|
|
.initialProperties(() -> Blocks.LECTERN)
|
|
|
|
.blockstate((ctx, prov) -> prov.horizontalBlock(ctx.getEntry(), prov.models()
|
|
|
|
.getExistingFile(ctx.getId()), 0))
|
|
|
|
.simpleItem()
|
2020-05-12 05:18:49 +02:00
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
|
|
|
static {
|
|
|
|
REGISTRATE.startSection(Sections.KINETICS);
|
|
|
|
}
|
|
|
|
|
2020-05-12 05:18:49 +02:00
|
|
|
public static final BlockEntry<ShaftBlock> SHAFT = REGISTRATE.block("shaft", ShaftBlock::new)
|
2020-05-04 19:57:16 +02:00
|
|
|
.initialProperties(SharedProperties::kinetic)
|
2020-05-12 14:06:50 +02:00
|
|
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
2020-05-04 19:57:16 +02:00
|
|
|
.simpleItem()
|
2020-05-12 05:18:49 +02:00
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
2020-05-12 05:18:49 +02:00
|
|
|
public static final BlockEntry<CogWheelBlock> COGWHEEL = REGISTRATE.block("cogwheel", CogWheelBlock::small)
|
2020-05-11 22:34:02 +02:00
|
|
|
.initialProperties(SharedProperties::kinetic)
|
2020-05-04 19:57:16 +02:00
|
|
|
.properties(p -> p.sound(SoundType.WOOD))
|
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<CogWheelBlock> LARGE_COGWHEEL =
|
2020-05-12 05:18:49 +02:00
|
|
|
REGISTRATE.block("large_cogwheel", CogWheelBlock::large)
|
2020-05-11 22:34:02 +02:00
|
|
|
.initialProperties(SharedProperties::kinetic)
|
|
|
|
.properties(p -> p.sound(SoundType.WOOD))
|
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-12 05:18:49 +02:00
|
|
|
REGISTRATE.block("encased_shaft", EncasedShaftBlock::new)
|
2020-05-11 22:34:02 +02:00
|
|
|
.initialProperties(SharedProperties::kinetic)
|
2020-05-12 14:06:50 +02:00
|
|
|
.blockstate(BlockStateGen.axisBlockProvider(true))
|
2020-05-11 22:34:02 +02:00
|
|
|
.item()
|
2020-05-12 14:06:50 +02:00
|
|
|
.model(AssetLookup::customItemModel)
|
|
|
|
.build()
|
2020-05-12 05:18:49 +02:00
|
|
|
.register();
|
2020-05-11 22:34:02 +02:00
|
|
|
|
2020-05-12 14:06:50 +02:00
|
|
|
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();
|
|
|
|
|
2020-05-11 22:34:02 +02:00
|
|
|
public static void register() {
|
2020-05-04 19:57:16 +02:00
|
|
|
}
|
2020-04-26 06:58:38 +02:00
|
|
|
}
|