Posted December 30, 20159 yr I made a block like a pumpkin that has a face on only one side, but whenever I place the block down it faces north, no matter what. I have it set to "block/orientable" in the .json model file, and I've tried to copy over the code from the pumpkin class to make it work, but it doesn't. Here's my block class public class ModBlocks { public static Block jack_omelon; public static void init() { jack_omelon = new BlockTest(Material.gourd).setUnlocalizedName("jack_omelon").setCreativeTab(PinesMod.tabPinesMod).setHardness(1.0F).setLightLevel(2.0F); } public static void register() { GameRegistry.registerBlock(jack_omelon, jack_omelon.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(jack_omelon); } public static void registerRender(Block block) { Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } }
December 30, 20159 yr 1) I see "render" and "mesher" refs in a class that is not side-only. 2) Why is your block class not descended from class Block? 3) For that matter, why does it not extend vanilla class BlockDirectional? The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
December 30, 20159 yr 2) Why is your block class not descended from class Block? 3) For that matter, why does it not extend vanilla class BlockDirectional? That's his main class, not his block class. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
December 31, 20159 yr So how do I make it orientable? You'd have to post your block code. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
December 31, 20159 yr Author I might have learned how to make blocks a bit differently than normal. That was what rendered my block, created my block, and created the item. Here's my model file { "parent": "block/orientable", "textures": { "top": "pm:blocks/jack_omelon_top", "front": "pm:blocks/jack_omelon", "side": "pm:blocks/jack_omelon_side" } } It also doesn't register it as orientable, claiming it's misspelled.
December 31, 20159 yr Hesus Frakking Christiana. I want the block class, that's the model json. This, I want this: BlockTest Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
December 31, 20159 yr Author Ohh, sorry about that. public class BlockTest extends Block { public BlockTest(Material materialIn) { super(materialIn); // TODO Auto-generated constructor stub } }
December 31, 20159 yr why does it not extend vanilla class BlockDirectional? Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
December 31, 20159 yr 2) Why is your block class not descended from class Block? 3) For that matter, why does it not extend vanilla class BlockDirectional? That's his main class, not his block class. Then his main class needs a bunch of annotations and required FML event handlers, and that mesher ref could still get him into trouble. The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
December 31, 20159 yr Author why does it not extend vanilla class BlockDirectional? Solved! This whole time I had been putting the Pumpkin code allowing it to be orientable in the wrong class! I put it it the BlockTest class and it worked. Thanks!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.