
American2050
Members-
Posts
553 -
Joined
Everything posted by American2050
-
So I never thought of that, till I got today into loading a new world and notice that an event handler on my mod keeps running when player loads a new world. So I have an event handler that makes different things happen in the world, like placing blocks, or spawning lightning. Problem I noticed today, when I loaded a new world, while the event was still running, the event kept running in the new world until in completed. What would be the best way to make sure the event should only run on the world that triggered it? I guess I could pass some world ID or something, but want to hear from the forum ideas first. Thanks a lot.
-
Is there a way to disable the Forge outputs on console?
American2050 replied to American2050's topic in Modder Support
Yes for that stuff I already contacte a couple of mod developers. Thanksfully some of them agree that the spam was too much. Like PlaceMod outputing a line for every Schematic loaded on the pack (About 6500 Schematic) used to be on those days. Now they cleaned the schematics a lot and also added config to disable that outout on the console. Same with other mods developers showing information like "Config file created" or "found" and stuff like that (Mea culpa, I used to do the same on my mod as I forgot some of those lines from when developing the configs files) -
Is there a way to disable the Forge outputs on console?
American2050 replied to American2050's topic in Modder Support
I'm on that already, but it's a long journey, specially when a lot of the mods are still in Alpha or Beta stages. Having an option on Forge itself, would be usefull on this cases. My idea is that a final user (Players of X ModPacks) don't really need that information showing on console, I understand it's handy for ModPack developers and in case of crashes, but I like the idea of the final players getting a cleaner interface and a cleaner console, and not a bunch of red lines that will make them think that the pack is loasing with bunch of errors and all that. -
Is there a way to disable the Forge outputs on console?
American2050 replied to American2050's topic in Modder Support
no hacks and ASM needed just edit the log4j confit However console spam shouldn't be a issue for you so there is still no reason to. Well, on a pack with close to 100 Mods it get's kinda messy all the information shown there. I know it's not a big issue, it's just something personal, I never liked that. Gonna take a look on that about Log4J but I don't think that's something I can get working on a ModPack distribution right? That would be a way to reduce the console outputs just locally? -
Is there a way to disable the Forge outputs on console?
American2050 replied to American2050's topic in Modder Support
To reduce Console spam -
Is there a way to disable the Forge outputs on console?
American2050 replied to American2050's topic in Modder Support
Wont those still be on the .log file? Or maybe a way to make them dissapear from Console, and make them only exist on the .log files for those that need it. -
So, I'm making a block that based on different values, it changes the bounding box. The idea is a block that starts with just a center cube of 6x6x6 and each time it has a neighbour block to conect to on some side it adds a cube to connect to the block next to it. I came with this, but not sure if it's a good idea, or if it should be done in a different way. Pixel is: final static double PIXEL = 1D/16D; state = state.getActualState(source, pos); double initX = 5*PIXEL; double initY = 5*PIXEL; double initZ = 5*PIXEL; double finalX = 11*PIXEL; double finalY = 11*PIXEL; double finalZ = 11*PIXEL; if (((Boolean)state.getValue(UP)).booleanValue()){ finalY = 16*PIXEL; } if (((Boolean)state.getValue(DOWN)).booleanValue()){ initY = 0*PIXEL; } if (((Boolean)state.getValue(NORTH)).booleanValue()){ initZ = 0*PIXEL; } if (((Boolean)state.getValue(SOUTH)).booleanValue()){ finalZ = 16*PIXEL; } if (((Boolean)state.getValue(EAST)).booleanValue()){ finalX = 16*PIXEL; } if (((Boolean)state.getValue(WEST)).booleanValue()){ initX = 0*PIXEL; } return new AxisAlignedBB(initX, initY, initZ, finalX, finalY, finalZ); If you need a more graphical representation of what this block looks like let me know.
-
I'm confuse on how to work with this capabilities to be compatible with other mods. Let's say I have a Solar Panel producing internal energy. Is it me that have to seach for other TE around me and send energy to them? Or they will try to extract energy from? In any (or both) of the cases, is there a general guideline of things to consider when doing all this? I'm not sure how to start.
-
Does EnderIO use the Forge capability system? Probably no, I have seen that they still have the COFH API on their 1.10.2 version, so maybe that's the problem. I will keep going the forge way and make my own cables and storage to get some practice. Or maybe add some mod to my dev environment that does use the Forge Capability System Anyone know of a good tutorial out there on all the code that needs to be considering when handling energy?
-
So... One question. I have 2 TE, one that uses the Forge implementation of IEnergyStorage and anotherone that is using a COFH IEnergyHandler On the one using the Forge Method I have canExtract and canReceive both set to true, but an EnderIO cable wont connect with my TE. On the one using the COFH Method I have canConnectEnergy set to true an the cable does connect. PS: I also have this 2 methods on the Forge one @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if(capability==CapabilityEnergy.ENERGY) return true; return false; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { // TODO Auto-generated method stub return (T)storage; } I guess I'm not registering something.
-
Guys I have a question, I have never look into trying to produce/consume/hold energy into a mod before. My problem/question is. How do mods in 1.9+ support RF if the API from the COFH Team is 2 years old and it wasn't updated (at least that I know of) How would you handle RF, I don't know where to start. Thanks a lot.
-
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
Ok, gonna experiment with that, I believe I understand what you mean Thanks a lot for the help. I can't believe this got so complicated, lol. But I see where this is going and why it's done this way. PS: Do you know where I can look at how Vanilla does it for the ItemBlock for the Furnace, and for the wools? I'm sure that will help me a lot. -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
It turns out that when I register it like ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), block.getMetaFromState(block.getDefaultState()), modelLocation); It doesn't render, as block.getMetaFromState(block.getDefaultState()) is returning a 2 (The default meta for the Facing North) But if I try: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, modelLocation); Forcing to use a 0 there, makes the block render in hand... -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
No it's the block, I'm not passing any state. public static final Block AIM_FURNACE = new BlockAIMFurnace("block_aim_furnace", false); registerBlock(AIM_FURNACE); public static void registerBlock(Block block) { GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); } At this point I believe I need a complete rewrite on how I'm registering the blocks, but already tried to replicate what your code does, and it not only didn't got the block to render in hand, but also something broke and the furnace when placed in world was always facing the direction. What makes "Special" or so different to other blocks that do work, the registering of a furnace? I can't find in the vanilla code, what they doing different for them. -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
And isn't that what this line should already be doing? ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), block.getMetaFromState(block.getDefaultState()), modelLocation); I'm so confuse. From looking at your code, the final method ends up registering the item for the block on the same way right? But you also have a Class for your Item Block, but I dont see Vanilla doing that for furnaces, or Wools if that's the case. -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
But, don't I need only 1 for a Furnace? I mean, on my hand, the furnace will always be one of the 4 variants, for instance, the default one, facing north. So the valied state for that block as an item, should only be one and not the 4 facings. Sorry I'm confuse. Still didn't tried what you sent, I will have to take closer look at what that code is exactly doing. -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
Thanks gonna take a look at that tomorrow and tell you how it went, my head is about to exploit by now -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
This line when the itemblock gets registered: ModelResourceLocation modelLocation = new ModelResourceLocation(block.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), block.getMetaFromState(block.getDefaultState()), modelLocation); Log.info(Item.getItemFromBlock(block) + " "+ block.getMetaFromState(block.getDefaultState()) + " " + modelLocation); is outputing: net.minecraft.item.ItemBlock@61cf810c 2 aim:block_aim_furnace#inventory So it's telling it to use the right metadata of 2. Maybe I forgot to modify something on the code I took from the Vanilla furnace so far? (Still work to be done in this class) package com.mramericanmike.aim.blocks; import java.util.Random; import javax.annotation.Nullable; import com.mramericanmike.aim.ModInfo; import com.mramericanmike.aim.creativetab.ModCreativeTab; import com.mramericanmike.aim.init.ModBlocks; import com.mramericanmike.aim.tileentity.TileEntityAIMFurnace; import net.minecraft.block.BlockHorizontal; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.Container; import net.minecraft.inventory.InventoryHelper; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.Mirror; import net.minecraft.util.Rotation; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockAIMFurnace extends GenericModBlockContainer { public static final PropertyDirection FACING = BlockHorizontal.FACING; private final boolean isBurning; private static boolean keepInventory; public BlockAIMFurnace(String name, boolean isBurning) { super(Material.IRON, name); this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); this.isBurning = isBurning; if(isBurning){ this.setCreativeTab(CreativeTabs.SEARCH); } else{ this.setCreativeTab(ModCreativeTab.MOD_TAB); } } /** * Get the Item that this Block should drop when harvested. */ @Nullable public Item getItemDropped(IBlockState state, Random rand, int fortune) { return Item.getItemFromBlock(ModBlocks.AIM_FURNACE); } public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) { this.setDefaultFacing(worldIn, pos, state); } private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state) { if (!worldIn.isRemote) { IBlockState iblockstate = worldIn.getBlockState(pos.north()); IBlockState iblockstate1 = worldIn.getBlockState(pos.south()); IBlockState iblockstate2 = worldIn.getBlockState(pos.west()); IBlockState iblockstate3 = worldIn.getBlockState(pos.east()); EnumFacing enumfacing = (EnumFacing)state.getValue(FACING); if (enumfacing == EnumFacing.NORTH && iblockstate.isFullBlock() && !iblockstate1.isFullBlock()) { enumfacing = EnumFacing.SOUTH; } else if (enumfacing == EnumFacing.SOUTH && iblockstate1.isFullBlock() && !iblockstate.isFullBlock()) { enumfacing = EnumFacing.NORTH; } else if (enumfacing == EnumFacing.WEST && iblockstate2.isFullBlock() && !iblockstate3.isFullBlock()) { enumfacing = EnumFacing.EAST; } else if (enumfacing == EnumFacing.EAST && iblockstate3.isFullBlock() && !iblockstate2.isFullBlock()) { enumfacing = EnumFacing.WEST; } worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); } } @SideOnly(Side.CLIENT) @SuppressWarnings("incomplete-switch") public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) { if (this.isBurning) { EnumFacing enumfacing = (EnumFacing)stateIn.getValue(FACING); double d0 = (double)pos.getX() + 0.5D; double d1 = (double)pos.getY() + rand.nextDouble() * 6.0D / 16.0D; double d2 = (double)pos.getZ() + 0.5D; double d3 = 0.52D; double d4 = rand.nextDouble() * 0.6D - 0.3D; if (rand.nextDouble() < 0.1D) { worldIn.playSound((double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false); } switch (enumfacing) { case WEST: worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); break; case EAST: worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]); break; case NORTH: worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); break; case SOUTH: worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D, new int[0]); } } } public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { return true; } else { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityAIMFurnace) { playerIn.displayGUIChest((TileEntityAIMFurnace)tileentity); // playerIn.addStat(StatList.FURNACE_INTERACTION); } return true; } } public static void setState(boolean active, World worldIn, BlockPos pos) { IBlockState iblockstate = worldIn.getBlockState(pos); TileEntity tileentity = worldIn.getTileEntity(pos); keepInventory = true; if (active) { // worldIn.setBlockState(pos, ModBlocks.AIM_FURNACE_LIT.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); // worldIn.setBlockState(pos, ModBlocks.AIM_FURNACE_LIT.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); } else { worldIn.setBlockState(pos, ModBlocks.AIM_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); worldIn.setBlockState(pos, ModBlocks.AIM_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); } keepInventory = false; if (tileentity != null) { tileentity.validate(); worldIn.setTileEntity(pos, tileentity); } } /** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityAIMFurnace(); } /** * Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the * IBlockstate */ public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); } /** * Called by ItemBlocks after a block is set in the world, to allow post-place logic */ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2); if (stack.hasDisplayName()) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityAIMFurnace) { ((TileEntityAIMFurnace)tileentity).setCustomInventoryName(stack.getDisplayName()); } } } public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { if (!keepInventory) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityAIMFurnace) { InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityAIMFurnace)tileentity); worldIn.updateComparatorOutputLevel(pos, this); } } super.breakBlock(worldIn, pos, state); } public boolean hasComparatorInputOverride(IBlockState state) { return true; } public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos) { return Container.calcRedstone(worldIn.getTileEntity(pos)); } public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) { return new ItemStack(ModBlocks.AIM_FURNACE); } /** * The type of render function called. 3 for standard block models, 2 for TESR's, 1 for liquids, -1 is no render */ public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; } /** * Convert the given metadata into a BlockState for this Block */ public IBlockState getStateFromMeta(int meta) { EnumFacing enumfacing = EnumFacing.getFront(meta); if (enumfacing.getAxis() == EnumFacing.Axis.Y) { enumfacing = EnumFacing.NORTH; } return this.getDefaultState().withProperty(FACING, enumfacing); } /** * Convert the BlockState into the correct metadata value */ public int getMetaFromState(IBlockState state) { return ((EnumFacing)state.getValue(FACING)).getIndex(); } /** * Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed * blockstate. */ public IBlockState withRotation(IBlockState state, Rotation rot) { return state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING))); } /** * Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed * blockstate. */ public IBlockState withMirror(IBlockState state, Mirror mirrorIn) { return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING))); } protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {FACING}); } } -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
Well, I guess when I register it from inventory, it's getting the default state from metadata 2, that is "facing=north" but now that you mention that, I will add "facing=up" and "facing=down" just in case and let you know if that helps. Up and down didn't helped. -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
This is how they get registered. public static void registerBlock(Block block) { GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); } On the other blocks it works, on the furnace, for some reason it does not. I'm almost sure the problem could be something related with the variants and facing, but dunno, the other block has also 2 variants, but it has no problem showing on inventory. -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
Not sure? I need my own renderer? I though this code takes care of that, and all my others blocks in this mod and in other mods works. public static void registerRender(Block block) { ModelResourceLocation modelLocation = new ModelResourceLocation(block.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), block.getMetaFromState(block.getDefaultState()), modelLocation); } And that gets called on the ClientProxy public class ClientProxy extends CommonProxy { @Override public void registerRender() { //Register Renders on Client Side Only ModItems.registerRenders(); ModBlocks.registerRenders(); } @Override public void otherInits() { } } I guess all that on my code is correct. It works in other of my mods and it's working for my other block I have so far in this mod, and also for an Ore I just added. It's the Furnace that's having problems. Also, you told me about adding an "inventory" variant, but the furnace in Vanilla doesn't has it neither. My problem must be somewhere else, not really sure where. -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
I tried that earlier today and didn't helped either... Unless I did it wrong. Like this? block_aim_furnace.json (on assets/aim/blockstates) { "variants": { "facing=north": { "model": "aim:block_aim_furnace" }, "facing=south": { "model": "aim:block_aim_furnace", "y": 180 }, "facing=west": { "model": "aim:block_aim_furnace", "y": 270 }, "facing=east": { "model": "aim:block_aim_furnace", "y": 90 }, "inventory": { "model": "aim:block_aim_furnace" } } } Try a posting the log. This are the logs. Thanks for the help fml-client-latest.log latest.log http://pastebin.com/me9Q7g4E -
[1.10.2] Block renders on world but not in hand
American2050 replied to American2050's topic in Modder Support
I tried that earlier today and didn't helped either... Unless I did it wrong. Like this? block_aim_furnace.json (on assets/aim/blockstates) { "variants": { "facing=north": { "model": "aim:block_aim_furnace" }, "facing=south": { "model": "aim:block_aim_furnace", "y": 180 }, "facing=west": { "model": "aim:block_aim_furnace", "y": 270 }, "facing=east": { "model": "aim:block_aim_furnace", "y": 90 }, "inventory": { "model": "aim:block_aim_furnace" } } } PS: I check the log and the word "furnace" is not on it, neither is "inventory" or any report of missing texture or variant. This is the .json of my other block that did work: { "variants": { "hasore=false": { "model": "aim:block_chamber" }, "hasore=true": { "model": "aim:block_chamber" } } } -
Yes I know, this has been asked in forever I believe, but everything I found and read didn't helped me. I must be missing some minor detail that I don't know of and that's why I'm having this problem. Weird enough on the same Mod I have another block that works perfectly. I'm sure the problem is because it's a furnace with 4 variants and I must be missing something for when I register it as an item, but dunno what. Here are the .json and the way I register the block. PS: As for now I'm using the vanilla textures until I fix this block_aim_furnace.json (on assets/aim/blockstates) { "variants": { "facing=north": { "model": "aim:block_aim_furnace" }, "facing=south": { "model": "aim:block_aim_furnace", "y": 180 }, "facing=west": { "model": "aim:block_aim_furnace", "y": 270 }, "facing=east": { "model": "aim:block_aim_furnace", "y": 90 } } } block_aim_furnace.json (on assets/aim/models/block) { "parent": "block/orientable", "textures": { "top": "blocks/furnace_top", "front": "blocks/furnace_front_off", "side": "blocks/furnace_side" } } block_aim_furnace.json (on assets/aim/models/item) { "parent": "aim:block/block_aim_furnace" } The register: public class ModBlocks { //CREATE THE BLOCKS public static final Block BLOCK_CHAMBER = new BlockChamber(Material.IRON, "block_chamber"); public static final Block AIM_FURNACE = new BlockAIMFurnace("block_aim_furnace", false); // public static final Block AIM_FURNACE_LIT = new BlockAIMFurnace("block_aim_furnace_lit", true); public static void registerBlocks() { registerBlock(BLOCK_CHAMBER); registerBlock(AIM_FURNACE); // registerBlock(AIM_FURNACE_LIT); } //This gets called on ClientPoxy public static void registerRenders() { registerRender(BLOCK_CHAMBER); registerRender(AIM_FURNACE); // registerRender(AIM_FURNACE_LIT); } public static void registerBlock(Block block) { GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); } public static void registerRender(Block block) { ModelResourceLocation modelLocation = new ModelResourceLocation(block.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), block.getMetaFromState(block.getDefaultState()), modelLocation); } } At this point I don't know what I could be missing. On the Block: public int getMetaFromState(IBlockState state) { return ((EnumFacing)state.getValue(FACING)).getIndex(); } ^^That returns 2 for the furnace.