Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.3] Issues with texture


American2050
 Share

Recommended Posts

I'm having an issue with the rendering of a simple texture that worked perfectly as expected in 1.12.2 but on 1.16.3 it looks just weird.

 

render.thumb.png.232ad60312077cfc1a6870e36a51d3ba.png

 

The .json on models/item is:

 

{
    "parent": "item/generated",
    "textures": {
        "layer0": "machinecards:items/frame"
    }
}

 

The texture is attached.

 

In 1.12.2 the item class extended Item and implemented IHasModel. Not sure if that means anything or not since I don't remember how Forge 1.12.2 worked. But I think IHasModel was a default thing to do for items?

 

Any idea how to "fix" this so it renders again as it used to in 1.12.

 

Thanks in advance.

 

 

frame.png

Edited by American2050
Link to comment
Share on other sites

1 hour ago, American2050 said:

In 1.12.2 the item class extended Item and implemented IHasModel. Not sure if that means anything or not since I don't remember how Forge 1.12.2 worked. But I think IHasModel was a default thing to do for items?

No, it wasn't. It was propagated by someone which caused the following response on the Common Issues and Recommendations thread "Using an interface (usually called IHasModel) on your Item and/or Block classes to denote that they are capable of registering a model is an anti-pattern and not necessary. All items require a model to be registered for them and usually no type-specific information from the item is needed, only the registry name, which is accessible for all items by default."

 

As for the issue above, that's just how minecraft constructs their quads for generated item models if I'm not mistaken. If you would like to 'fix' the issue, then use a model creator (e.g. Blockbench) to create the model yourself and use that as the parent.

  • Thanks 1
Link to comment
Share on other sites

33 minutes ago, ChampionAsh5357 said:

No, it wasn't. It was propagated by someone which caused the following response on the Common Issues and Recommendations thread "Using an interface (usually called IHasModel) on your Item and/or Block classes to denote that they are capable of registering a model is an anti-pattern and not necessary. All items require a model to be registered for them and usually no type-specific information from the item is needed, only the registry name, which is accessible for all items by default."

 

As for the issue above, that's just how minecraft constructs their quads for generated item models if I'm not mistaken. If you would like to 'fix' the issue, then use a model creator (e.g. Blockbench) to create the model yourself and use that as the parent.

I see. Thanks a lot.

 

And one question. How would I "register" for the items the different models (States) it can have. I tried looking at the vanilla Clock but on Items, it's just a generic Item without anything special on it. (I'm guessing Vanilla is changing the texture from some event class). How should I implement multiple models for my item and change between them.

Link to comment
Share on other sites

14 minutes ago, American2050 said:

How should I implement multiple models for my item and change between them.

Either create multiple items if there is no reason to store them in one specific place or register a property using ItemModelProperties::registerProperty. From there, the predicate system has not changed from previous versions.

  • Thanks 1
Link to comment
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.   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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.