Jump to content

Recommended Posts

Posted

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"));
}


}

Posted

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.

Posted

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.

Posted

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.

Posted

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.

 

Posted

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.

Posted

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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.