JSON models hurt my head
This commit is contained in:
parent
f3645a35fa
commit
b45172294d
6 changed files with 132 additions and 0 deletions
|
@ -4,6 +4,8 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|||
import WayofTime.alchemicalWizardry.ConfigHandler;
|
||||
import WayofTime.alchemicalWizardry.block.BlockAltar;
|
||||
import WayofTime.alchemicalWizardry.block.BlockLifeEssence;
|
||||
import WayofTime.alchemicalWizardry.block.BlockRitualHome;
|
||||
import WayofTime.alchemicalWizardry.item.block.ItemBlockRitualHome;
|
||||
import WayofTime.alchemicalWizardry.util.helper.InventoryRenderHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
@ -13,6 +15,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||
public class ModBlocks {
|
||||
|
||||
public static Block altar;
|
||||
public static Block ritualStone;
|
||||
|
||||
public static Block lifeEssence;
|
||||
|
||||
|
@ -23,7 +26,9 @@ public class ModBlocks {
|
|||
public static void init() {
|
||||
FluidRegistry.registerFluid(BlockLifeEssence.getLifeEssence());
|
||||
lifeEssence = registerBlock(new BlockLifeEssence());
|
||||
|
||||
altar = registerBlock(new BlockAltar());
|
||||
ritualStone = registerBlock(new BlockRitualHome(), ItemBlockRitualHome.class);
|
||||
|
||||
initTiles();
|
||||
}
|
||||
|
@ -36,6 +41,8 @@ public class ModBlocks {
|
|||
InventoryRenderHelper renderHelper = AlchemicalWizardry.instance.getRenderHelper();
|
||||
|
||||
renderHelper.fluidRender(lifeEssence);
|
||||
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualStone), 0);
|
||||
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualStone), 1);
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock, String name) {
|
||||
|
@ -45,6 +52,10 @@ public class ModBlocks {
|
|||
return block;
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock) {
|
||||
return registerBlock(block, itemBlock, block.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block, String name) {
|
||||
if (!ConfigHandler.blockBlacklist.contains(name))
|
||||
GameRegistry.registerBlock(block, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue