Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

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

  • Author

Thanks, though I just figured out I can tell the class to extend BlockTorch and it fixes all the problems I had left. Crisis averted.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.