Skip to content

Instantly share code, notes, and snippets.

@NeusFear
Created February 8, 2018 23:41
Show Gist options
  • Save NeusFear/925536a84e6cd41af7e04076d03fe698 to your computer and use it in GitHub Desktop.
Save NeusFear/925536a84e6cd41af7e04076d03fe698 to your computer and use it in GitHub Desktop.
register blocks forge
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