WIP: configuration
This commit is contained in:
parent
92d4ccab6c
commit
9f2b1b50c4
8 changed files with 276 additions and 225 deletions
|
@ -57,9 +57,12 @@ import ru.betterend.blocks.basis.BlockWallMushroom;
|
|||
import ru.betterend.blocks.basis.BlockWallPlant;
|
||||
import ru.betterend.blocks.complex.StoneMaterial;
|
||||
import ru.betterend.blocks.complex.WoodenMaterial;
|
||||
import ru.betterend.config.MainConfig;
|
||||
import ru.betterend.tab.CreativeTab;
|
||||
|
||||
public class EndBlocks {
|
||||
private static final MainConfig CONFIG = MainConfig.getInstance();
|
||||
|
||||
// Terrain //
|
||||
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new BlockEndstoneDust());
|
||||
public static final Block END_MYCELIUM = registerBlock("end_mycelium", new BlockTerrain(MaterialColor.LIGHT_BLUE));
|
||||
|
@ -176,6 +179,9 @@ public class EndBlocks {
|
|||
public static void register() {}
|
||||
|
||||
public static Block registerBlock(Identifier id, Block block) {
|
||||
if (!CONFIG.getBoolean("blocks", id.getPath(), true)) {
|
||||
return block;
|
||||
}
|
||||
Registry.register(Registry.BLOCK, id, block);
|
||||
EndItems.registerItem(id, new BlockItem(block, new Item.Settings().group(CreativeTab.END_TAB)));
|
||||
return block;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue