Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.9.4] [SOLVED Block json's
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
Bektor

[1.9.4] [SOLVED Block json's

By Bektor, June 18, 2016 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Bektor    13

Bektor

Bektor    13

  • Dragon Slayer
  • Bektor
  • Forge Modder
  • 13
  • 852 posts
Posted June 18, 2016

Hi,

 

I'm currently looking into the Forge json file system, (so the ones with "forge_marker": 1) cause I was using always

the vanilla system but now I want to use the forge one.

 

So I've got one question: For the Forge json system, do I still need the jsons in models.block and models.item?

 

Thx in advance.

Bektor

  • Quote

Share this post


Link to post
Share on other sites

p455w0rd    5

p455w0rd

p455w0rd    5

  • Stone Miner
  • p455w0rd
  • Forge Modder
  • 5
  • 61 posts
Posted June 18, 2016

it depends on how you're making your model..if you're using a JSON model (ala Crayfish's Model Creator or the like), then yes

  • Quote

Share this post


Link to post
Share on other sites

Bektor    13

Bektor

Bektor    13

  • Dragon Slayer
  • Bektor
  • Forge Modder
  • 13
  • 852 posts
Posted June 18, 2016

it depends on how you're making your model..if you're using a JSON model (ala Crayfish's Model Creator or the like), then yes

Well, currently I'm only using the standard block model with a different texture for my blocks.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45597 posts
Posted June 18, 2016

Then a blockstate.json is enough.

  • Quote

Share this post


Link to post
Share on other sites

Bektor    13

Bektor

Bektor    13

  • Dragon Slayer
  • Bektor
  • Forge Modder
  • 13
  • 852 posts
Posted June 18, 2016

Then a blockstate.json is enough.

Ok, then I'm wondering why it is not rendering in the inventory (just shows a missing texture plane there, in the world it renders correctly):

 

{
    "forge_marker": 1,
    "defaults": {
       	"textures": {
       	    "all": "primevalforest:blocks/grass_top"
       	}
    },
    "variants": {
        "normal": { "model": "cube_all" },
        "inventory": { "model": "cube_all" }
    }
}

 

And for these normal blocks:

Do I still have to do this:

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), meta, new ModelResourceLocation(block.getRegistryName(), "inventory"));

Or can I remove that line of code?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45597 posts
Posted June 18, 2016

Use ModelLoader.setCustomModelResourceLocation instead.

  • Quote

Share this post


Link to post
Share on other sites

Bektor    13

Bektor

Bektor    13

  • Dragon Slayer
  • Bektor
  • Forge Modder
  • 13
  • 852 posts
Posted June 18, 2016

Use ModelLoader.setCustomModelResourceLocation instead.

Ok, but it does still not render correctly in the inventory and in the hand.

ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(BlockList.modSand), 0, new ModelResourceLocation(BlockList.modSand.getRegistryName(), "inventory"));

And yeah, it's actually a sand block with a grass texture because I've got no other texture yet.

 

EDIT:

[00:31:40] [Client thread/DEBUG] [FML/]: Item json isn't found for 'primevalforest:sand#inventory', trying to load the variant from the blockstate json

That's all what the log says. It shows this error two times.

  • Quote

Share this post


Link to post
Share on other sites

Choonster    1622

Choonster

Choonster    1622

  • Reality Controller
  • Choonster
  • Forge Modder
  • 1622
  • 5050 posts
Posted June 19, 2016

If the problem is solved, post the solution so others having similar problems can find it in the future.

  • Quote

Share this post


Link to post
Share on other sites

Bektor    13

Bektor

Bektor    13

  • Dragon Slayer
  • Bektor
  • Forge Modder
  • 13
  • 852 posts
Posted June 19, 2016

Solution: ItemBlock has to be registered to be rendered extra.

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • solitone
      Distinguish singleplayer vs. multiplayer

      By solitone · Posted 7 minutes ago

      Ok, although I can’t crash the server. I don’t even get an exception with my code. And when I get an exception (when I break a computer block and the breakBlock method is executed) the server does not crash.   I’m not objecting what you’re saying. I’m just confused. I’m trying to understand why I don’t crash the server. Is it because I’m testing it running both the server and the client through IntelliJ IDEA (i.e. via runServer and runClient Gradle tasks)? Still, I have also tried with client and server running on two different machines, and the breakBlock method does not crash the server, it just throw an uncaught exception. So perhaps does it depend on the java version?   Thanks
    • DaemonUmbra
      Forge 1.12.2 Installer Crash

      By DaemonUmbra · Posted 24 minutes ago

      Please read the Logs section of my signature below and provide the appropriate log in the appropriate manner.
    • Choonster
      [1.14.4] [Solved] Persisting player health on dimension change

      By Choonster · Posted 44 minutes ago

      Yes. The client loses the attribute (which may be a Vanilla bug, I'm not sure), but the server retains the correct value and re-syncs it to the client.
    • DragonITA
      [1.14.4] Why minecraft with mod dont want start?

      By DragonITA · Posted 48 minutes ago

      But who i make a misstake
    • DragonITA
      [1.14.4] Why minecraft with mod dont want start?

      By DragonITA · Posted 51 minutes ago

      Yes   No, but is similar
  • Topics

    • solitone
      6
      Distinguish singleplayer vs. multiplayer

      By solitone
      Started Thursday at 08:20 PM

    • NoMercyPro
      1
      Forge 1.12.2 Installer Crash

      By NoMercyPro
      Started 1 hour ago

    • FireController1847
      6
      [1.14.4] [Solved] Persisting player health on dimension change

      By FireController1847
      Started 5 hours ago

    • DragonITA
      6
      [1.14.4] Why minecraft with mod dont want start?

      By DragonITA
      Started 14 hours ago

    • fump
      1
      Unstable ModPack 1.12.2

      By fump
      Started 9 hours ago

  • Who's Online (See full list)

    • ShetiPhian
    • loordgek
    • aliteraryhigh
    • solitone
    • Ocelot
    • plugsmustard
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.9.4] [SOLVED Block json's
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community