Jump to content

Recommended Posts

Posted

Been beating my head against the wall for a while on this one.

 

I am creating a block that should change it's model based on whether or not it is next to another one.

 

However I'm having this error and I can't seem to figure out what's going on.

 

Here is a single instance of the error

http://pastebin.com/eEja2LJT

 

There are four block models

shelf_center_oak.json

shelf_left_oak.json

shelf_right_oak.json

shelf_single_oak.json

 

My BlockShelf.json (BlockState)

http://pastebin.com/8c1sx859

 

and finally my BlockShelf.java class

http://pastebin.com/AhAvZtcw

 

Any insight would be greatly appreciated. Though I am not yet familiar with the inner workings of MinecraftForge, nor would I call myself a Java expert, I am a Software Engineer and perfectly ok with Googling something i don't understand in your answer :)

TitanCraft is coming... This will be updated with a link once available

Posted

That's not how Forge's blockstates format works. The format is documented here.

 

The

defaults

section can only contain the same values as a single variant would, it can't have multiple variants in it.

 

Each key in the

variants

section can either be a fully-defined variant (e.g.

connections=4,facing=east

or

normal

) or a property name (e.g.

connections

).

 

The value of a fully-defined variant key can either be an array of variants (in which case one will be chosen at random when the model is rendered) or a single variant (must not have an object as the first value, otherwise the deserialiser won't recognise it as a fully-defined variant).

 

The value of a property name key must be an object that maps each value of the property to a variant.

 

You can see some examples of the format here, here and here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Awesome, thank you for the examples. I took a step away for a bit and while talking with my niece it suddenly occurred to me that I was thinking of the BlockState json in totally the wrong way.

 

This is what I have now. and though I'm changing the model in the wrong directions it is working, and that's a simple fix.

 

[EDIT] had my left and right backwards

 

{
  "forge_marker": 1,
  "defaults": {
    "model": "titancraft:shelf_single_oak"
  },
  "variants": {
    "connections": {
      "1": {
        "model": "titancraft:shelf_right_oak"
      },
      "2": {
        "model": "titancraft:shelf_left_oak"
      },
      "3": {
        "model": "titancraft:shelf_center_oak"
      },
      "4": {
        "model": "titancraft:shelf_single_oak"
      }
    },
    "facing": {
      "north": {

      },
      "east": {
        "y": 90
      },
      "south": {
        "y": 180
      },
      "west": {
        "y": 270
      }
    }
  }
}

 

TitanCraft is coming... This will be updated with a link once available

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Alright, here is the log file https://mclo.gs/5eCwafV
    • Please read the FAQ (https://forums.minecraftforge.net/topic/125488-rules-and-frequently-asked-questions-faq/) and post log files as described there, using a site such as https://mclo.gs/ and post the link here.  
    • I tried updating the mods in my modpack which caused incompatibilities so i have tried to revert them back to their older versions i was using before. In the logs it doesnt show me any clear incompatibilities except for tfmg & entity texture features, but when i try to remove those it still doesn't work. I have tried removing the forge-client.toml file which was a suggestion i found on  a few other posts. This is the log file i get. [inline log removed] Any help would be appreciated. Thanks in advance
    • I don't use KubeJS, never even heard of it. But after doing what "Ugdhar" suggested earlier in this post with the "config/Mekanism/generator-storage.toml", I tried going into an individual save's serverconfig folder, and just deleting everything except the parcool folder (I have that mod installed.) Then, a bit of loading and temporary freezing later, seems to have worked. Even when quitting to menu and loading back in, or also when quitting to menu, exiting to desktop, and re-launching MC, choose a save and loading it.
    • [Mekanism] Broken tags in Mekanism recipes detected, please check server logs for details. You will be missing some recipes and machines may not accept expected inputs. Do you use KubeJS? It is some kind of bug with it and not fixed A workaround is setting "allowAsyncStreams" to false in the KubeJS common config file https://github.com/KubeJS-Mods/KubeJS/issues/1016   For the rest of your issues, keep deleting these files - now it is the jei-server.toml file If the file is not in config, check the worldsave serverconfig folder These files usually break after updating mods, game crashes or force closing the game    
  • Topics

×
×
  • Create New...

Important Information

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