package sokratis12GR.ArmorPlus.registry;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import sokratis12GR.ArmorPlus.ArmorPlus;
import sokratis12GR.ArmorPlus.blocks.LavaCrystal;
import sokratis12GR.ArmorPlus.util.TextHelper;
import static sokratis12GR.ArmorPlus.ArmorPlus.logger;
/**
* sokratis12GR.ArmorPlus.registry
* ArmorPlus created by sokratis12GR on 6/13/2016 9:39 PM.
*/
public class ModBlocks {
public static Block LAVA_CRYSTAL;
public static void init() {
LAVA_CRYSTAL = new LavaCrystal();
}
public static void register() {
registerBlock(LAVA_CRYSTAL);
}
public static void registerRenders() {
registerRender(LAVA_CRYSTAL);
}
public static void registerBlock(Block block) {
GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
logger.info(TextHelper.localize("info." + ArmorPlus.MODID + ".console.load.blocks"));
}
public static void registerRender(Block block) {
Item item = Item.getItemFromBlock(block);
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation("armorplus:CompressedObsidian", "inventory"));
}
}