Jump to content

Recommended Posts

Posted

I have a B3D model made in blender. It has no texture, it just has colors applied to the material / mesh, however, in-game it does not take effect. Here is my .JSON code and my model loading code.

 

JSON

{
    "forge_marker": 1,
    "variants": 
{
        "inventory": 
	{
            "model": "armed:m4.b3d",
            "transform": "forge:default-tool"
        }
    }
}

 

Loading

ModelLoaderRegistry.registerLoader(B3DLoader.instance);
		B3DLoader.instance.addDomain(MainReference.ID);
		ModelLoader.setCustomModelResourceLocation(MainInitialization.ITEMS.get("m4"), 0, 
				new ModelResourceLocation(MainReference.ID + ":" + "m4", "inventory"));

 

Does the B3DLoader not support this or do I have to do something in the .JSON to tell it to use the model's material colors? If anyone knows how this works and could tell me, I'd be appreciative.

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Posted

I don't think that the loader supports Materials. But other than that, how did you made your b3d models work? My models still error with no root mesh in model location error. I tried everything in the json files, but i can't get it working.

 

In Blender you need to make sure you have one object that is named "mesh"

If you have multiple objects select all of them and press Ctrl+J to merge them.

Like this:

wiXcdox.png

Posted

I don't think that the loader supports Materials. But other than that, how did you made your b3d models work? My models still error with no root mesh in model location error. I tried everything in the json files, but i can't get it working.

 

Of course they support materials - that's what makes up a mesh and it's different features. What I meant to say was "colored materials." Guess I'll just have to use textures.

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Posted

Minor correction:

Materials are a combination of things, the bit that "isn't supported" is likely the shader, which handles  how lighting affects the object (hint: Minecraft has no lights).

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.

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.