Jump to content

Recommended Posts

Posted (edited)

So basically as the Title says I am trying to get an Items IBakedModel and add it's quads to my custom IBakedModel. Though I have been successful in getting the Items IBakedModel, items seem to have a weird Black Plane that runs through it when rendered in the World. As shown below.

 

Images

  Reveal hidden contents

 

This is my IBakedModel (most of which is probably temporary).

  Reveal hidden contents

 

Edit: I have also used the ModelLoaderRegistry.getModel() to get the model, but to no avail.

Edited by Animefan8888

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

After a little bit more debugging I fixed this issue, but ran into another one. First the fix. Since most items have transparency you need to say that your block also has transparency. I did this by overriding Block#getBlockLayer and returned BlockRenderLayer.CUTOUT_MIPPED. Now on to the second issue. I need a way to get an IModel of any Item/Block. The problem with ModelLoaderRegistry.getModel is that some items have multiple models based on metadata and the same with blocks with variants. I need a way of reliably getting this for the ModelResourceLocation.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

After another day I have almost been able to get all models loaded. Though I am stuck on one thing while loading models. When someone calls ModelBakery.registerItemVaraints stores the model location in a private static Map<RegistryDelegate<Item>, Set<String>> which I get through reflection in my ClientProxy. Then when the ItemStack in my TileEntity changes I get the Model Location through this map if I have to by parsing the BlockState JSON at runtime, currently very inefficient I plan on storing them in a Map later on in a more efficient way. But the problem lies that I do not know how the Item is then connected to the Strings within the Set.

 

Code.

  Reveal hidden contents

If you need anything else please let me know.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

I have found the fantastic called shapers which is contained in the ItemModelMesher#shapers which I had to get via reflection. i found it by looking at how GuiContainer displays items in the GUI. I then use the information to look up in a blockstate json which I will proceed to store within a map. Now the one last problem I have run into is that for non ItemBlock models I cannot apply a TRSRTransformation. So I post here in hopes that I get an answer to how I can scale it, rotate it, and translate it.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.