2015-10-30 03:22:14 +00:00
|
|
|
package WayofTime.alchemicalWizardry.registry;
|
|
|
|
|
|
|
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|
|
|
import WayofTime.alchemicalWizardry.ConfigHandler;
|
|
|
|
import WayofTime.alchemicalWizardry.block.BlockAltar;
|
|
|
|
import WayofTime.alchemicalWizardry.block.BlockLifeEssence;
|
2015-10-31 04:20:23 +00:00
|
|
|
import WayofTime.alchemicalWizardry.block.BlockRitualHome;
|
|
|
|
import WayofTime.alchemicalWizardry.item.block.ItemBlockRitualHome;
|
2015-10-30 03:22:14 +00:00
|
|
|
import WayofTime.alchemicalWizardry.util.helper.InventoryRenderHelper;
|
|
|
|
import net.minecraft.block.Block;
|
2015-10-31 05:07:06 +00:00
|
|
|
import net.minecraft.client.resources.model.ModelResourceLocation;
|
|
|
|
import net.minecraft.item.Item;
|
2015-10-30 03:22:14 +00:00
|
|
|
import net.minecraft.item.ItemBlock;
|
2015-10-31 05:07:06 +00:00
|
|
|
import net.minecraftforge.client.model.ModelLoader;
|
2015-10-30 03:22:14 +00:00
|
|
|
import net.minecraftforge.fluids.FluidRegistry;
|
|
|
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
|
|
|
|
|
|
public class ModBlocks {
|
|
|
|
|
|
|
|
public static Block altar;
|
2015-10-31 04:20:23 +00:00
|
|
|
public static Block ritualStone;
|
2015-10-30 03:22:14 +00:00
|
|
|
|
|
|
|
public static Block lifeEssence;
|
|
|
|
|
|
|
|
public static Block crystal;
|
|
|
|
public static Block rune;
|
|
|
|
public static Block bloodStone;
|
|
|
|
|
|
|
|
public static void init() {
|
|
|
|
FluidRegistry.registerFluid(BlockLifeEssence.getLifeEssence());
|
|
|
|
lifeEssence = registerBlock(new BlockLifeEssence());
|
2015-10-31 04:20:23 +00:00
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
altar = registerBlock(new BlockAltar());
|
2015-10-31 04:20:23 +00:00
|
|
|
ritualStone = registerBlock(new BlockRitualHome(), ItemBlockRitualHome.class);
|
2015-10-30 03:22:14 +00:00
|
|
|
|
|
|
|
initTiles();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void initTiles() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void initRenders() {
|
|
|
|
InventoryRenderHelper renderHelper = AlchemicalWizardry.instance.getRenderHelper();
|
2015-10-30 05:22:08 +00:00
|
|
|
|
|
|
|
renderHelper.fluidRender(lifeEssence);
|
2015-10-31 04:20:23 +00:00
|
|
|
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualStone), 0);
|
|
|
|
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualStone), 1);
|
2015-10-30 03:22:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock, String name) {
|
|
|
|
if (!ConfigHandler.blockBlacklist.contains(name))
|
|
|
|
GameRegistry.registerBlock(block, itemBlock, name);
|
|
|
|
|
|
|
|
return block;
|
|
|
|
}
|
|
|
|
|
2015-10-31 04:20:23 +00:00
|
|
|
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock) {
|
|
|
|
return registerBlock(block, itemBlock, block.getClass().getSimpleName());
|
|
|
|
}
|
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
private static Block registerBlock(Block block, String name) {
|
|
|
|
if (!ConfigHandler.blockBlacklist.contains(name))
|
|
|
|
GameRegistry.registerBlock(block, name);
|
|
|
|
|
|
|
|
return block;
|
|
|
|
}
|
|
|
|
|
|
|
|
private static Block registerBlock(Block block) {
|
|
|
|
return registerBlock(block, block.getClass().getSimpleName());
|
|
|
|
}
|
|
|
|
}
|