Blockus

Blockus

7M Downloads

Use Fabric API content registries for stripped and flattened blocks

haykam821 opened this issue ยท 0 comments

commented

Strippable blocks and flattenable blocks both have content registries in the Fabric API fabric-content-registries-v0, but Blockus opts to modify the internal map instead:

public static void addStrippables() {
AxeItem.STRIPPED_BLOCKS = new HashMap<>(AxeItem.STRIPPED_BLOCKS);
AxeItem.STRIPPED_BLOCKS.put(BlockusBlocks.WHITE_OAK_LOG, BlockusBlocks.STRIPPED_WHITE_OAK_LOG);
AxeItem.STRIPPED_BLOCKS.put(BlockusBlocks.WHITE_OAK_WOOD, BlockusBlocks.STRIPPED_WHITE_OAK_WOOD);
}
public static void addPathBlocks() {
ShovelItem.PATH_STATES = new HashMap<>(ShovelItem.PATH_STATES);
ShovelItem.PATH_STATES.put(Blocks.DIRT_PATH, BlockusBlocks.PATH.getDefaultState());
ShovelItem.PATH_STATES.put(BlockusBlocks.PATH, Blocks.DIRT.getDefaultState());
}