Jump to content

Recommended Posts

Posted

I've been hard at work trying to make my first mod, and I've finally got most of the issues worked out and have a (nearly) working set of .json files for my block. I'm basically making a torch with a different texture and recipe, and everything's worked fine until I changed the blockstates json file from a simple one to the one the vanilla torch uses. Here's what I have right now:

 

{

  "variants": {

    "facing=up": { "model": "braziermod:brazier" },

    "facing=east": { "model": "braziermod:brazier_wall" },

    "facing=south": { "model": "braziermod:brazier_wall", "y": 90 },

    "facing=west": { "model": "braziermod:brazier_wall", "y": 180 },

    "facing=north": { "model": "braziermod:brazier_wall", "y": 270 }

  }

}

 

The result is a black-and-purple-checker texture on a cube. I think the issue is that the class file for the block doesn't do anything to set the block state when it's placed, but in my internet searches I haven't found out how to do it and I can't look through the thousand obfuscated classes in the vanilla .jar to find out how Mojang did it. How can I solve this?

 

This is my first time asking for help here, apologies if I have done so poorly.

Posted

Hi

 

This troubleshooting guide might help

http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html

and perhaps this background information on states

http://greyminecraftcoder.blogspot.co.at/2014/12/blocks-18.html

 

Also this example mod (MBE03)

https://github.com/TheGreyGhost/MinecraftByExample

 

For vanilla see BlockTorch.

 

you are probably missing

    protected BlockState createBlockState()

    {

        return new BlockState(this, new IProperty[] {FACING});

    }

?

 

-TGG

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.