Created
June 19, 2020 15:57
-
-
Save ByteLaw5/82f88d54d1c618b9a23a1e57c39d358a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createRegistry just adds the deferred to a list so I won't have to manually add them, and the init method is for loading the class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bytelaw.bytesstructures.block; | |
import net.minecraft.block.*; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.block.material.MaterialColor; | |
import net.minecraftforge.common.ToolType; | |
import net.minecraftforge.fml.RegistryObject; | |
import net.minecraftforge.registries.DeferredRegister; | |
import net.minecraftforge.registries.ForgeRegistries; | |
import static com.bytelaw.bytesstructures.RegUtil.createRegistry; | |
public class BytesBlocks { | |
public static final DeferredRegister<Block> BLOCKS = createRegistry(ForgeRegistries.BLOCKS); | |
public static final RegistryObject<Block> | |
ANCIENT_BRICKS = BLOCKS.register("ancient_bricks", () -> new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(1.75F, 6.0F).harvestLevel(1).harvestTool(ToolType.PICKAXE))), | |
ANCIENT_PILLAR = BLOCKS.register("ancient_pillar", () -> new RotatedPillarBlock(Block.Properties.create(Material.ROCK).hardnessAndResistance(1.75F, 6.0F).harvestLevel(1).harvestTool(ToolType.PICKAXE))), | |
ANCIENT_CHISELED_BRICKS = BLOCKS.register("ancient_chiseled_bricks", () -> new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(1.75F, 6.0F).harvestLevel(1).harvestTool(ToolType.PICKAXE))), | |
ANCIENT_BRICK_SLAB = BLOCKS.register("ancient_brick_slab", () -> new SlabBlock(Block.Properties.create(Material.ROCK).hardnessAndResistance(1.75F, 6.0F).harvestLevel(1).harvestTool(ToolType.PICKAXE))), | |
BLACK_WALNUT_LEAVES = BLOCKS.register("black_walnut_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).tickRandomly().sound(SoundType.PLANT).notSolid().hardnessAndResistance(0.2F))), | |
BLACK_WALNUT_LOG = BLOCKS.register("black_walnut_log", () -> new LogBlock(MaterialColor.BLACK, Block.Properties.create(Material.WOOD, MaterialColor.BROWN).hardnessAndResistance(2.0F).sound(SoundType.WOOD))), | |
BLACK_WALNUT_SAPLING = BLOCKS.register("black_walnut_sapling", () -> new BlackWalnutSaplingBlock(Block.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().hardnessAndResistance(0.0F).sound(SoundType.PLANT))), | |
WALNUT = BLOCKS.register("walnut", () -> new WalnutBlock(Block.Properties.create(Material.PLANTS).tickRandomly().doesNotBlockMovement().hardnessAndResistance(0.0F).sound(SoundType.PLANT))); | |
public static void init() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment