Created
February 8, 2018 23:41
-
-
Save NeusFear/925536a84e6cd41af7e04076d03fe698 to your computer and use it in GitHub Desktop.
register blocks forge
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
public class FFBBlocks { | |
public static Block maple_log; | |
public static void init(){ | |
maple_log = registerBlock(new BlockMapleWoodLog(), "maple_log", false); | |
} | |
public static Block registerBlock(Block block, String blockName, boolean registerItemModels) { | |
Preconditions.checkNotNull(block, "Cannot register a null block"); | |
block.setUnlocalizedName(blockName); | |
block.setCreativeTab(FFBTabs.tabFoxForgeBiomes); | |
if(registerItemModels) { | |
new ItemBlock(block).setRegistryName(block.getRegistryName()); | |
} | |
return block; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment