Skip to content

Carvable API

OliviaTheVampire edited this page Aug 11, 2019 · 8 revisions

BlockChiseler can be used to make blocks that can be chiseled to different variants of itself using items specified from a tag. The chiseled blocks should be added to a list including the original block in the start.

Example

public class ChiselerInit {

    public static void init() {
        List<Block> chiseledBlocks = Lists.newArrayList(Blocks.STONE, Blocks.COBBLESTONE, Blocks.STONE_BRICKS);
        BlockChiseler.create(new Identifier("modid", "chiseled_blocks"), Items.SHEARS, chiseledBlocks);
    }

}

You can alternatively use tags instead of a single item and for that you would have to do like this as an example

public class ChiselerInit {

    public static void init() {
        List<Block> chiseledBlocks = Lists.newArrayList(Blocks.STONE, Blocks.COBBLESTONE, Blocks.STONE_BRICKS);
        BlockChiseler.create(new Identifier("modid", "chiseled_blocks"), VTags.SHEARS, chiseledBlocks);
    }

}

Now you just need to call this in either your main class or add it to the entrypoints

Clone this wiki locally