Jump to content

[1.8.9] Rendering items inside item.


Elix_x

Recommended Posts

Good day everybody.

I would like to render items inside item.

Here's picture of what i mean:

GLIR20n.png

That is 1 item, that has

ItemStack[]

stored in nbt, from where each item is rendered, offseted from previous one.

 

In 1.7.10, i have done this using

IItemRenderer

: https://gist.github.com/elix-x/8a0f8ac9f61fea0830a6

In 1.8,

IItemRenderer

is no more, and i don't know how i can do this.

 

I know there's

ISmartItemModel

and other classes, but i'm new to this part of 1.8.9, so i don't know where to begin.

 

I would like to completely support all kind of items. Enchanted, and even (hopefully) blocks rendered with TESR.

 

How can i do this in 1.8.9?

 

Thanks for help!

If you have any questions - just ask!

Link to comment
Share on other sites

At least in 1.8, you can still tell Minecraft to render an ItemStack:

for each ItemStack stored in your item {
  translate offset amount;
  Minecraft.getMinecraft().getRenderItem().renderItemModel(stack);
}

However, there is no guarantee that the items will be 2D - you could have some serious clipping issues with 3D models, and I don't know of any way to determine the 'width' of a model.

 

As for ISmartItemModel, you just create a class that implements it and fill in the methods. Take a look at TheGreyGhost's MinecraftByExample code on Github and spend a couple hours playing around with it. You'll probably be able to figure it out.

 

EDIT: Ninja'd by diesieben, and his explanation sounds like the more proper way to go about it.

Link to comment
Share on other sites

At least in 1.8, you can still tell Minecraft to render an ItemStack

Yes, but you have nowhere to do that, as there is nothing like IItemRenderer or similar.

You're probably going to shoot me for this (I thought about doing so as I wrote it, so you're not alone), but you can cheat and do it inside of Item#getModel. It's on my list of things to 'fix' and do properly at some point, but with all the changes to rendering that happened within 1.8 and now 1.8.9, I was kind of waiting for a stable code base before I waste tons of my time learning it again (by that I mean in 1.8 there was an update that changed how rendering was done, specifically transformations, and negated hours of time I had spent getting my shields to render correctly... I still haven't fixed that, either).

 

@OP Since you are already in 1.8.9, you should just spend the time to learn how to do it properly.

Link to comment
Share on other sites

but with all the changes to rendering that happened within 1.8 and now 1.8.9, I was kind of waiting for a stable code base before I waste tons of my time learning it again

 

And this is why I haven't updated any of my mods. <3

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.

Link to comment
Share on other sites

You can use MultiModel to combine multiple models into one.

 

First of all, decide on a format to encode whatever data you need for the models (probably just a list of ResourceLocations) into a single ResourceLocation using a special resource domain. Now implement ICustomModelLoader and register it using ModelLoaderRegistry.registerLoader. In that loader you have 2 methods, accept and loadModel. In accept you check whether the given ResourceLocation is one of your special ones from step 1. In loadModel you decode that ResourceLocation so you get back the list of ResourceLocations for the individual models. Obtain all these models using ModelLoaderRegistry.getModel. This will give you an IModel for each model you want to combine.

You can now construct a MultiModel of the list of IModel instances. In this we will use the constructor that takes 3 arguments: IModel, IModelState and a Map. The first two are the "base" model, you could use these for like a holder of the contained items in your case or something like that. If you just want to combine models leave them as null.

Now for the Map argument. The Map has an entry for every model you want to combine. The keys are names for the parts (you can use anything you want here), the values are a Pair of IModel and IModelState. You can pass a TRSRTransformation as the IModelState to apply a specific translation to each individual model, or use IModel#getDefaultState if you don't want a translation.

Now that you have created the MultiModel you just need to return it.

 

Now you just need to point your Item at the special ResourceLocation that will trigger your loader and voila!

 

TL;DR: glhf.

Thanks.

I just don't get one part: will it create one combined model for all item stacks, or will it create new combined model for each item stack that it has to render?

Link to comment
Share on other sites

It will load and bake any models that you register for your Items. If you wish to make this dynamic, you have to wrap this whole thing in an ISmartItemModel and generate the models on the fly.

So considering, that my item holds other items that can be changed, in NBT, is should do all

MultiModel

stuff and wrap it in

ISmartItemModel

?

Ok. Thanks. I'll try.

Link to comment
Share on other sites

Ok, so i met a few problems:

-There's very many methods in

ISmartItemModel

that i don't know what to do with. For now, i just left them empty or return null.

-To get

IModel

, i need ResourceLocation. To get

ResourceLocation

from

ItemStack

, i need

ItemStack

,

EntityPlayer

and

int

. Where do i get

player

and

useRemaining

?

 

Also i noticed in

ModelLoader

, that if

ResourceLocation

is instance of

ModelResourceLocation

, it will use vanilla loader. And that's the only thing i can return in

Item.getModel

.

 

I was alos thinking about encoding player UUID and use remaining in to resource path of

ResourceLocation

, to decode them back in my

ISmartItemModel

. Is this the only way to go?

 

One last thing, should i in my

ISmartItemModel

also implement

IModel

? Because it apparently is not

IModel

already, and i can't return it in

ICustomModelLoader

.

 

EDIT: One more thing,

ISmartItemModel

requires me to return

IBakedModel

, but

MultiModel

isn't

IBakedModel

, and to

bake

it, it requires a lot of things i don't know where to get from.

 

Yes, i know that's a lot of questions and that i'm a noob in new models system.

Link to comment
Share on other sites

-There's very many methods in

ISmartItemModel

that i don't know what to do with. For now, i just left them empty or return null.

Only handleItemState will be called on the smart model, unless that method also returns a smart model, in which case that 2nd smart model will not be treated as smart.

Ok. I'll leave them empty.

-To get
IModel

, i need ResourceLocation. To get

ResourceLocation

from

ItemStack

, i need

ItemStack

,

EntityPlayer

and

int

. Where do i get

player

and

useRemaining

?

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(stack). This will give you an IBakedModel, see below on how to use it in your ISmartItemmodel.

That's what i was looking for!

Thanks!

Also i noticed in

ModelLoader

, that if

ResourceLocation

is instance of

ModelResourceLocation

, it will use vanilla loader. And that's the only thing i can return in

Item.getModel

.

You don't need to use Item.getModel at all.

Ok.

I was alos thinking about encoding player UUID and use remaining in to resource path of

ResourceLocation

, to decode them back in my

ISmartItemModel

. Is this the only way to go?

Why do you need them? :D

I needed them, because i didn't know correct way to get models.

One last thing, should i in my

ISmartItemModel

also implement

IModel

? Because it apparently is not

IModel

already, and i can't return it in

ICustomModelLoader

.

No. IModel is "unbaked". The IModel is what you produce in the model loader, it will then be baked into the smart model (or any other baked model). But I think you should not use a custom loader after all, a smart model is the better choice.

So, how should i register my

ISmartItemModel

then?

EDIT: One more thing,

ISmartItemModel

requires me to return

IBakedModel

, but

MultiModel

isn't

IBakedModel

, and to

bake

it, it requires a lot of things i don't know where to get from.

Since you do this from an ISmartItemModel and you are getting baked models for the individual items already (see above), you can construct MultiModel.Baked directly. Pass null for "base" (or a base model such as a holder shell for the items) and the map of sub models as "parts". To make your models flexible (IFlexibleBakedModel) first check if they already are using instanceof, if not use IFlexibleBakedModel.Wrapper with DefaultVertexFormats.ITEM.

Ok. Thank you!!!

 

I'll try all that, and see how it goes!

Link to comment
Share on other sites

2 things:

How exactly do i register my

ISmartItemModel

in

ModelBakeEvent

?

Right now, i'm calling

event.registry.putObject

, and using resource loaction that i return in my item.

 

Something went wrong, i don't quite know what exactly:

[10:39:06] [Client thread/FATAL]: Unreported exception thrown!
java.lang.NullPointerException
at net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ForgeHooksClient.java:387) ~[ForgeHooksClient.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelTransform(RenderItem.java:327) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelForEntity(RenderItem.java:312) ~[RenderItem.class:?]
at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:73) ~[itemRenderer.class:?]
at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:361) ~[itemRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:832) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1468) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:380) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
[10:39:06] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: ---- Minecraft Crash Report ----
// Sorry 

Time: 24.02.16 10:39
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ForgeHooksClient.java:387)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelTransform(RenderItem.java:327)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelForEntity(RenderItem.java:312)
at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:73)
at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:361)
at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:832)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1468)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107)
at net.minecraft.client.Minecraft.run(Minecraft.java:380)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ForgeHooksClient.java:387)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelTransform(RenderItem.java:327)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelForEntity(RenderItem.java:312)
at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:73)
at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:361)
at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:832)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1468)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player953'/645, l='MpServer', x=-1114,34, y=67,00, z=-173,44]]
Chunk stats: MultiplayerChunkCache: 603, 603
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: -1082,00,64,00,-193,00 - World: (-1082,64,-193), Chunk: (at 6,4,15 in -68,-13; contains blocks -1088,0,-208 to -1073,255,-193), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
Level time: 131653 game time, 2065 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 231 total; [EntitySquid['Squid'/512, l='MpServer', x=-1053,72, y=47,69, z=-184,88], EntitySquid['Squid'/516, l='MpServer', x=-1057,34, y=46,94, z=-175,81], EntitySquid['Squid'/517, l='MpServer', x=-1056,78, y=49,72, z=-163,38], EntityCreeper['Creeper'/519, l='MpServer', x=-1051,50, y=12,00, z=-117,50], EntityCreeper['Creeper'/552, l='MpServer', x=-1037,50, y=15,00, z=-161,50], EntityBat['Bat'/41, l='MpServer', x=-1182,89, y=20,00, z=-193,32], EntitySkeleton['Skeleton'/44, l='MpServer', x=-1192,59, y=23,00, z=-184,09], EntityZombie['Zombie'/46, l='MpServer', x=-1192,50, y=23,00, z=-169,50], EntitySkeleton['Skeleton'/87, l='MpServer', x=-1169,50, y=18,00, z=-238,91], EntitySquid['Squid'/88, l='MpServer', x=-1173,19, y=61,00, z=-192,13], EntitySkeleton['Skeleton'/89, l='MpServer', x=-1181,84, y=20,00, z=-191,56], EntitySquid['Squid'/90, l='MpServer', x=-1171,81, y=62,13, z=-193,53], EntitySquid['Squid'/91, l='MpServer', x=-1171,41, y=62,22, z=-187,50], EntitySquid['Squid'/92, l='MpServer', x=-1175,63, y=56,06, z=-193,50], EntitySquid['Squid'/93, l='MpServer', x=-1166,09, y=58,31, z=-182,78], EntitySquid['Squid'/95, l='MpServer', x=-1175,59, y=57,53, z=-142,16], EntityZombie['Zombie'/96, l='MpServer', x=-1162,53, y=15,00, z=-136,00], EntitySquid['Squid'/97, l='MpServer', x=-1172,78, y=46,47, z=-137,19], EntitySquid['Squid'/98, l='MpServer', x=-1171,63, y=59,19, z=-145,47], EntitySquid['Squid'/99, l='MpServer', x=-1168,56, y=56,78, z=-146,19], EntitySquid['Squid'/100, l='MpServer', x=-1165,13, y=60,31, z=-139,13], EntityCreeper['Creeper'/101, l='MpServer', x=-1177,19, y=18,00, z=-97,84], EntitySquid['Squid'/127, l='MpServer', x=-1162,31, y=58,41, z=-200,34], EntitySquid['Squid'/128, l='MpServer', x=-1156,75, y=59,44, z=-194,69], EntitySquid['Squid'/129, l='MpServer', x=-1163,66, y=62,19, z=-184,50], EntitySquid['Squid'/130, l='MpServer', x=-1164,78, y=62,09, z=-179,19], EntitySquid['Squid'/131, l='MpServer', x=-1171,47, y=62,19, z=-179,13], EntitySquid['Squid'/132, l='MpServer', x=-1165,25, y=58,63, z=-187,16], EntitySquid['Squid'/133, l='MpServer', x=-1160,88, y=50,97, z=-152,94], EntityPlayerSP['Player953'/645, l='MpServer', x=-1114,34, y=67,00, z=-173,44], EntitySquid['Squid'/134, l='MpServer', x=-1165,28, y=47,66, z=-149,53], EntitySquid['Squid'/135, l='MpServer', x=-1165,63, y=60,53, z=-153,16], EntitySquid['Squid'/136, l='MpServer', x=-1161,41, y=58,69, z=-146,41], EntitySquid['Squid'/137, l='MpServer', x=-1160,66, y=56,75, z=-153,59], EntitySquid['Squid'/138, l='MpServer', x=-1170,28, y=54,94, z=-149,34], EntityBat['Bat'/139, l='MpServer', x=-1149,36, y=19,16, z=-141,75], EntitySquid['Squid'/140, l='MpServer', x=-1158,75, y=46,19, z=-143,13], EntitySquid['Squid'/141, l='MpServer', x=-1160,63, y=58,00, z=-141,59], EntitySquid['Squid'/142, l='MpServer', x=-1163,50, y=62,41, z=-137,53], EntitySquid['Squid'/143, l='MpServer', x=-1155,13, y=49,81, z=-136,63], EntitySquid['Squid'/144, l='MpServer', x=-1158,09, y=59,56, z=-142,78], EntitySquid['Squid'/145, l='MpServer', x=-1166,00, y=58,09, z=-139,16], EntitySquid['Squid'/170, l='MpServer', x=-1139,47, y=52,56, z=-235,06], EntitySquid['Squid'/172, l='MpServer', x=-1136,09, y=48,13, z=-233,75], EntitySquid['Squid'/173, l='MpServer', x=-1142,25, y=50,19, z=-227,75], EntitySquid['Squid'/174, l='MpServer', x=-1138,84, y=59,09, z=-230,47], EntitySquid['Squid'/175, l='MpServer', x=-1140,13, y=57,56, z=-224,41], EntitySquid['Squid'/176, l='MpServer', x=-1140,44, y=51,50, z=-233,84], EntitySquid['Squid'/177, l='MpServer', x=-1146,94, y=56,72, z=-220,78], EntitySquid['Squid'/178, l='MpServer', x=-1142,59, y=55,28, z=-208,09], EntitySquid['Squid'/179, l='MpServer', x=-1140,91, y=55,34, z=-212,25], EntitySquid['Squid'/180, l='MpServer', x=-1145,50, y=53,41, z=-220,72], EntitySquid['Squid'/181, l='MpServer', x=-1132,50, y=57,25, z=-217,47], EntitySquid['Squid'/182, l='MpServer', x=-1142,03, y=55,09, z=-215,53], EntitySquid['Squid'/183, l='MpServer', x=-1136,00, y=56,22, z=-211,56], EntitySquid['Squid'/184, l='MpServer', x=-1142,88, y=49,72, z=-147,44], EntitySquid['Squid'/185, l='MpServer', x=-1149,44, y=51,44, z=-151,41], EntitySquid['Squid'/186, l='MpServer', x=-1154,94, y=52,66, z=-149,00], EntitySquid['Squid'/187, l='MpServer', x=-1152,56, y=47,97, z=-139,91], EntitySquid['Squid'/188, l='MpServer', x=-1149,69, y=47,88, z=-135,22], EntitySquid['Squid'/189, l='MpServer', x=-1141,72, y=49,88, z=-145,16], EntitySquid['Squid'/190, l='MpServer', x=-1151,22, y=45,97, z=-148,34], EntityZombie['Zombie'/191, l='MpServer', x=-1140,50, y=29,00, z=-115,50], EntitySquid['Squid'/192, l='MpServer', x=-1135,47, y=60,94, z=-116,25], EntitySkeleton['Skeleton'/193, l='MpServer', x=-1145,19, y=28,00, z=-117,44], EntitySquid['Squid'/196, l='MpServer', x=-1145,59, y=61,34, z=-117,09], EntitySquid['Squid'/224, l='MpServer', x=-1136,19, y=49,94, z=-230,19], EntitySquid['Squid'/225, l='MpServer', x=-1133,94, y=46,97, z=-227,28], EntitySquid['Squid'/226, l='MpServer', x=-1131,44, y=48,59, z=-223,03], EntitySquid['Squid'/227, l='MpServer', x=-1127,03, y=49,66, z=-227,16], EntitySquid['Squid'/228, l='MpServer', x=-1133,50, y=48,25, z=-236,13], EntitySquid['Squid'/229, l='MpServer', x=-1129,19, y=49,66, z=-230,50], EntitySquid['Squid'/231, l='MpServer', x=-1131,00, y=47,09, z=-221,91], EntitySquid['Squid'/232, l='MpServer', x=-1137,81, y=51,78, z=-222,34], EntitySquid['Squid'/233, l='MpServer', x=-1132,72, y=58,16, z=-224,66], EntitySquid['Squid'/234, l='MpServer', x=-1136,13, y=58,09, z=-222,31], EntitySquid['Squid'/235, l='MpServer', x=-1131,63, y=49,10, z=-193,95], EntitySquid['Squid'/236, l='MpServer', x=-1133,75, y=50,56, z=-188,91], EntitySquid['Squid'/237, l='MpServer', x=-1131,67, y=43,77, z=-186,74], EntitySquid['Squid'/238, l='MpServer', x=-1124,65, y=43,19, z=-184,82], EntitySquid['Squid'/239, l='MpServer', x=-1128,74, y=49,09, z=-179,42], EntitySquid['Squid'/240, l='MpServer', x=-1128,91, y=57,03, z=-113,84], EntitySquid['Squid'/241, l='MpServer', x=-1135,25, y=56,50, z=-121,25], EntitySquid['Squid'/242, l='MpServer', x=-1137,63, y=57,47, z=-113,19], EntitySquid['Squid'/243, l='MpServer', x=-1137,81, y=58,66, z=-113,88], EntitySquid['Squid'/286, l='MpServer', x=-1119,81, y=48,31, z=-224,00], EntitySquid['Squid'/287, l='MpServer', x=-1105,38, y=50,31, z=-236,97], EntitySquid['Squid'/288, l='MpServer', x=-1106,69, y=51,28, z=-224,00], EntitySquid['Squid'/289, l='MpServer', x=-1118,81, y=52,16, z=-228,03], EntitySquid['Squid'/290, l='MpServer', x=-1115,09, y=49,59, z=-227,84], EntitySquid['Squid'/291, l='MpServer', x=-1113,09, y=47,22, z=-227,50], EntitySquid['Squid'/292, l='MpServer', x=-1108,06, y=48,97, z=-224,38], EntitySquid['Squid'/293, l='MpServer', x=-1107,63, y=48,53, z=-231,28], EntitySquid['Squid'/294, l='MpServer', x=-1114,34, y=47,47, z=-223,53], EntitySquid['Squid'/295, l='MpServer', x=-1114,38, y=51,19, z=-222,59], EntityBat['Bat'/296, l='MpServer', x=-1110,31, y=19,19, z=-205,69], EntitySquid['Squid'/297, l='MpServer', x=-1111,12, y=47,06, z=-197,72], EntitySquid['Squid'/298, l='MpServer', x=-1115,55, y=50,60, z=-197,25], EntitySquid['Squid'/299, l='MpServer', x=-1117,31, y=42,06, z=-188,47], EntitySquid['Squid'/300, l='MpServer', x=-1114,13, y=49,97, z=-185,12], EntityItem['item.item.Ring.0'/301, l='MpServer', x=-1108,13, y=52,00, z=-170,19], EntityItem['item.item.Ring.0'/302, l='MpServer', x=-1108,13, y=51,00, z=-169,75], EntitySkeleton['Skeleton'/303, l='MpServer', x=-1112,50, y=16,00, z=-137,50], EntitySkeleton['Skeleton'/304, l='MpServer', x=-1115,95, y=16,32, z=-138,72], EntityCreeper['Creeper'/305, l='MpServer', x=-1109,50, y=17,00, z=-135,50], EntityBat['Bat'/306, l='MpServer', x=-1112,48, y=17,06, z=-133,10], EntitySquid['Squid'/307, l='MpServer', x=-1118,16, y=49,06, z=-137,28], EntitySkeleton['Skeleton'/3379, l='MpServer', x=-1177,50, y=22,00, z=-226,50], EntitySquid['Squid'/308, l='MpServer', x=-1116,19, y=54,13, z=-129,00], EntityCreeper['Creeper'/3380, l='MpServer', x=-1175,59, y=22,00, z=-225,89], EntitySquid['Squid'/309, l='MpServer', x=-1118,22, y=57,09, z=-130,38], EntitySquid['Squid'/310, l='MpServer', x=-1109,31, y=56,50, z=-134,38], EntitySquid['Squid'/311, l='MpServer', x=-1103,84, y=54,59, z=-133,28], EntitySquid['Squid'/312, l='MpServer', x=-1116,97, y=54,03, z=-126,13], EntitySquid['Squid'/313, l='MpServer', x=-1105,66, y=52,50, z=-123,94], EntitySquid['Squid'/314, l='MpServer', x=-1108,47, y=53,81, z=-133,44], EntitySquid['Squid'/315, l='MpServer', x=-1112,59, y=56,00, z=-127,28], EntitySquid['Squid'/316, l='MpServer', x=-1103,88, y=49,03, z=-139,41], EntitySquid['Squid'/317, l='MpServer', x=-1111,06, y=49,34, z=-112,09], EntitySquid['Squid'/318, l='MpServer', x=-1110,63, y=51,75, z=-109,41], EntitySquid['Squid'/319, l='MpServer', x=-1110,03, y=50,84, z=-130,38], EntitySquid['Squid'/320, l='MpServer', x=-1112,16, y=54,81, z=-128,88], EntitySquid['Squid'/321, l='MpServer', x=-1114,75, y=56,31, z=-107,41], EntitySquid['Squid'/322, l='MpServer', x=-1121,47, y=52,97, z=-117,22], EntitySquid['Squid'/323, l='MpServer', x=-1104,00, y=51,63, z=-113,22], EntitySquid['Squid'/324, l='MpServer', x=-1109,03, y=50,00, z=-110,63], EntitySquid['Squid'/327, l='MpServer', x=-1120,75, y=46,34, z=-110,34], EntitySquid['Squid'/334, l='MpServer', x=-1120,59, y=53,31, z=-108,25], EntitySquid['Squid'/335, l='MpServer', x=-1105,31, y=52,53, z=-113,88], EntitySkeleton['Skeleton'/355, l='MpServer', x=-1088,50, y=25,00, z=-249,13], EntitySkeleton['Skeleton'/356, l='MpServer', x=-1095,50, y=23,00, z=-242,50], EntitySkeleton['Skeleton'/357, l='MpServer', x=-1096,50, y=23,00, z=-241,50], EntityZombie['Zombie'/359, l='MpServer', x=-1093,19, y=22,00, z=-246,31], EntitySkeleton['Skeleton'/361, l='MpServer', x=-1092,53, y=22,00, z=-225,50], EntitySquid['Squid'/362, l='MpServer', x=-1101,44, y=47,88, z=-230,63], EntitySquid['Squid'/363, l='MpServer', x=-1100,38, y=48,09, z=-229,22], EntityZombie['Zombie'/364, l='MpServer', x=-1097,50, y=22,00, z=-223,13], EntitySquid['Squid'/365, l='MpServer', x=-1106,00, y=51,06, z=-216,75], EntitySquid['Squid'/366, l='MpServer', x=-1093,72, y=54,91, z=-213,50], EntitySquid['Squid'/367, l='MpServer', x=-1099,53, y=50,72, z=-215,13], EntitySquid['Squid'/368, l='MpServer', x=-1093,41, y=54,88, z=-205,13], EntitySquid['Squid'/369, l='MpServer', x=-1094,25, y=52,19, z=-216,34], EntitySquid['Squid'/370, l='MpServer', x=-1094,97, y=56,69, z=-218,41], EntitySquid['Squid'/371, l='MpServer', x=-1100,69, y=49,75, z=-205,09], EntitySquid['Squid'/372, l='MpServer', x=-1099,28, y=53,00, z=-210,69], EntityBat['Bat'/373, l='MpServer', x=-1085,34, y=29,10, z=-156,20], EntitySquid['Squid'/374, l='MpServer', x=-1103,19, y=48,81, z=-146,69], EntitySquid['Squid'/375, l='MpServer', x=-1089,50, y=46,50, z=-147,88], EntitySquid['Squid'/376, l='MpServer', x=-1095,16, y=46,13, z=-140,22], EntitySquid['Squid'/377, l='MpServer', x=-1097,66, y=46,03, z=-149,00], EntitySquid['Squid'/378, l='MpServer', x=-1095,94, y=49,13, z=-144,78], EntitySquid['Squid'/379, l='MpServer', x=-1097,25, y=47,56, z=-141,66], EntitySquid['Squid'/380, l='MpServer', x=-1097,41, y=45,50, z=-140,50], EntitySquid['Squid'/381, l='MpServer', x=-1099,00, y=48,31, z=-143,81], EntitySquid['Squid'/382, l='MpServer', x=-1103,63, y=43,34, z=-137,25], EntitySquid['Squid'/383, l='MpServer', x=-1094,16, y=46,06, z=-145,00], EntitySquid['Squid'/384, l='MpServer', x=-1095,41, y=42,28, z=-146,75], EntitySquid['Squid'/385, l='MpServer', x=-1092,41, y=44,47, z=-137,22], EntitySquid['Squid'/386, l='MpServer', x=-1097,97, y=52,13, z=-136,09], EntitySquid['Squid'/387, l='MpServer', x=-1091,13, y=51,34, z=-132,47], EntitySquid['Squid'/388, l='MpServer', x=-1086,09, y=51,53, z=-132,28], EntitySquid['Squid'/389, l='MpServer', x=-1097,34, y=54,09, z=-142,25], EntitySquid['Squid'/390, l='MpServer', x=-1096,75, y=54,97, z=-135,28], EntitySquid['Squid'/391, l='MpServer', x=-1089,38, y=54,50, z=-138,47], EntitySquid['Squid'/392, l='MpServer', x=-1096,28, y=53,84, z=-134,31], EntitySquid['Squid'/393, l='MpServer', x=-1097,34, y=51,69, z=-137,72], EntitySquid['Squid'/394, l='MpServer', x=-1102,78, y=54,06, z=-131,97], EntitySquid['Squid'/395, l='MpServer', x=-1107,25, y=55,19, z=-132,13], EntitySquid['Squid'/396, l='MpServer', x=-1106,50, y=50,84, z=-132,81], EntitySquid['Squid'/397, l='MpServer', x=-1097,44, y=49,75, z=-125,28], EntitySquid['Squid'/398, l='MpServer', x=-1096,56, y=52,31, z=-129,38], EntitySquid['Squid'/399, l='MpServer', x=-1100,53, y=51,09, z=-123,38], EntityZombie['Zombie'/400, l='MpServer', x=-1087,72, y=20,00, z=-123,16], EntitySquid['Squid'/401, l='MpServer', x=-1092,78, y=53,41, z=-125,19], EntitySquid['Squid'/402, l='MpServer', x=-1101,72, y=55,09, z=-117,13], EntitySquid['Squid'/403, l='MpServer', x=-1105,16, y=52,88, z=-116,06], EntitySquid['Squid'/404, l='MpServer', x=-1096,84, y=53,28, z=-121,41], EntitySquid['Squid'/405, l='MpServer', x=-1095,66, y=51,13, z=-117,72], EntitySquid['Squid'/406, l='MpServer', x=-1090,59, y=51,00, z=-121,66], EntitySquid['Squid'/407, l='MpServer', x=-1101,44, y=51,16, z=-130,97], EntityEnderman['Enderman'/408, l='MpServer', x=-1091,50, y=19,00, z=-100,50], EntitySquid['Squid'/435, l='MpServer', x=-1072,66, y=55,28, z=-220,53], EntitySquid['Squid'/437, l='MpServer', x=-1079,09, y=51,66, z=-238,91], EntitySquid['Squid'/438, l='MpServer', x=-1071,31, y=48,75, z=-230,31], EntitySquid['Squid'/439, l='MpServer', x=-1075,09, y=49,88, z=-208,63], EntitySquid['Squid'/440, l='MpServer', x=-1076,66, y=54,56, z=-216,72], EntitySquid['Squid'/441, l='MpServer', x=-1085,69, y=52,75, z=-219,41], EntitySquid['Squid'/442, l='MpServer', x=-1070,19, y=54,09, z=-217,72], EntitySquid['Squid'/443, l='MpServer', x=-1077,31, y=53,13, z=-219,34], EntitySquid['Squid'/444, l='MpServer', x=-1079,75, y=53,47, z=-215,69], EntitySquid['Squid'/445, l='MpServer', x=-1075,91, y=50,00, z=-224,03], EntitySkeleton['Skeleton'/446, l='MpServer', x=-1079,50, y=43,00, z=-193,91], EntityCreeper['Creeper'/447, l='MpServer', x=-1079,44, y=27,00, z=-156,97], EntityCreeper['Creeper'/448, l='MpServer', x=-1082,34, y=26,00, z=-145,97], EntityCreeper['Creeper'/449, l='MpServer', x=-1082,50, y=26,00, z=-152,50], EntitySquid['Squid'/450, l='MpServer', x=-1081,53, y=59,22, z=-152,06], EntitySquid['Squid'/451, l='MpServer', x=-1087,16, y=60,44, z=-145,97], EntitySquid['Squid'/452, l='MpServer', x=-1076,38, y=61,03, z=-146,38], EntitySquid['Squid'/453, l='MpServer', x=-1078,06, y=57,66, z=-132,47], EntitySquid['Squid'/454, l='MpServer', x=-1071,25, y=59,16, z=-134,00], EntitySquid['Squid'/455, l='MpServer', x=-1083,81, y=61,00, z=-140,19], EntitySquid['Squid'/456, l='MpServer', x=-1082,91, y=57,56, z=-141,34], EntitySquid['Squid'/457, l='MpServer', x=-1080,00, y=62,41, z=-128,09], EntitySquid['Squid'/458, l='MpServer', x=-1073,63, y=57,47, z=-139,41], EntitySquid['Squid'/459, l='MpServer', x=-1070,03, y=56,28, z=-132,19], EntitySquid['Squid'/460, l='MpServer', x=-1073,38, y=59,81, z=-124,25], EntitySquid['Squid'/461, l='MpServer', x=-1084,47, y=61,16, z=-143,59], EntitySquid['Squid'/462, l='MpServer', x=-1070,28, y=58,03, z=-125,31], EntitySquid['Squid'/463, l='MpServer', x=-1079,97, y=56,63, z=-124,81], EntitySquid['Squid'/475, l='MpServer', x=-1067,75, y=45,38, z=-233,53], EntitySquid['Squid'/476, l='MpServer', x=-1062,66, y=46,91, z=-230,53], EntitySquid['Squid'/477, l='MpServer', x=-1062,09, y=48,09, z=-229,94], EntitySquid['Squid'/478, l='MpServer', x=-1065,38, y=49,00, z=-226,44], EntitySquid['Squid'/479, l='MpServer', x=-1066,00, y=50,97, z=-233,13], EntitySquid['Squid'/480, l='MpServer', x=-1067,03, y=51,47, z=-228,41], EntitySquid['Squid'/481, l='MpServer', x=-1061,25, y=47,78, z=-225,56], EntitySquid['Squid'/482, l='MpServer', x=-1055,13, y=50,53, z=-236,00], EntitySquid['Squid'/483, l='MpServer', x=-1071,38, y=48,06, z=-225,25], EntitySquid['Squid'/484, l='MpServer', x=-1070,53, y=49,38, z=-222,31], EntitySquid['Squid'/485, l='MpServer', x=-1053,84, y=47,75, z=-169,91], EntitySkeleton['Skeleton'/486, l='MpServer', x=-1064,44, y=24,00, z=-148,09], EntityCreeper['Creeper'/487, l='MpServer', x=-1065,50, y=29,00, z=-158,50], EntityBat['Bat'/488, l='MpServer', x=-1068,00, y=26,10, z=-155,69], EntityBat['Bat'/489, l='MpServer', x=-1070,31, y=25,04, z=-158,47], EntitySquid['Squid'/490, l='MpServer', x=-1067,75, y=61,81, z=-155,19], EntitySquid['Squid'/491, l='MpServer', x=-1075,97, y=58,72, z=-145,88], EntitySquid['Squid'/492, l='MpServer', x=-1069,88, y=60,47, z=-143,09], EntitySquid['Squid'/493, l='MpServer', x=-1074,84, y=62,41, z=-147,69], EntitySquid['Squid'/494, l='MpServer', x=-1067,38, y=59,09, z=-135,31], EntitySquid['Squid'/495, l='MpServer', x=-1062,66, y=57,66, z=-123,19], EntitySquid['Squid'/511, l='MpServer', x=-1056,31, y=48,25, z=-238,50]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:383)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2645)
at net.minecraft.client.Minecraft.run(Minecraft.java:409)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
Minecraft Version: 1.8.9
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_73, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 490291800 bytes (467 MB) / 898105344 bytes (856 MB) up to 1717043200 bytes (1637 MB)
JVM Flags: 0 total; 
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
FML: MCP 9.19 Powered by Forge 11.15.1.1744 6 mods loaded, 6 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Forge{11.15.1.1744} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Baubles{1.1.3.0} [baubles] (Baubles-1.8.9-1.1.3.0-deobf.jar) 
UCHIJAAAA	excore{1.3.8} [EXCore] (bin) 
UCHIJAAAA	armorsets{2.0} [Armor Sets] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.4.13084 Compatibility Profile Context 14.301.1001.0' Renderer: 'AMD Radeon HD 8570D'
Launched Version: 1.8.9
LWJGL: 2.9.4
OpenGL: AMD Radeon HD 8570D GL version 4.4.13084 Compatibility Profile Context 14.301.1001.0, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

Using VBOs: No
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x AMD A8-6600K APU with Radeon(tm) HD Graphics 
[10:39:06] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: #@!@# Game crashed! Crash report saved to: #@!@# C:\my\mcmodding\mods\Armor-Sets\1.8.9\run\.\crash-reports\crash-2016-02-24_10.39.06-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed

 

Client proxy:

public class ClientProxy implements IProxy {

public static final String MODELLOCATIONKEY = "ItemsSet";

public static KeyBinding armorSetKeyBinding = new KeyBinding("key.armorsets.armor", Keyboard.KEY_F, "category.armorsets");
public static KeyBinding baublesSetKeyBinding = new KeyBinding("key.armorsets.baubles", Keyboard.KEY_G, "category.armorsets");
public static KeyBinding armorBaublesSetKeyBinding = new KeyBinding("key.armorsets.armorbaubles", Keyboard.KEY_V, "category.armorsets");

@Override
public void preInit(FMLPreInitializationEvent event){

}

@Override
public void init(FMLInitializationEvent event){
	ClientRegistry.registerKeyBinding(armorSetKeyBinding);
	ClientRegistry.registerKeyBinding(baublesSetKeyBinding);
	ClientRegistry.registerKeyBinding(armorBaublesSetKeyBinding);

	FMLCommonHandler.instance().bus().register(new KeyBindingsCheckEvent());
	MinecraftForge.EVENT_BUS.register(new BakeModelEvent());
}

@Override
public void postInit(FMLPostInitializationEvent event){

}

}

 

BakeModelEvent:

public class BakeModelEvent {

@SubscribeEvent
public void bake(ModelBakeEvent event){
	event.modelRegistry.putObject(new ModelResourceLocation(ClientProxy.MODELLOCATIONKEY, ClientProxy.MODELLOCATIONKEY), new ItemItemsSetModel());
}

}

 

ISmartItemModel:

public class ItemItemsSetModel implements ISmartItemModel {

@Override
public List<BakedQuad> getFaceQuads(EnumFacing facing){
	return null;
}

@Override
public List<BakedQuad> getGeneralQuads(){
	return null;
}

@Override
public boolean isAmbientOcclusion(){
	return false;
}

@Override
public boolean isGui3d(){
	return false;
}

@Override
public boolean isBuiltInRenderer(){
	return false;
}

@Override
public TextureAtlasSprite getParticleTexture(){
	return null;
}

@Override
public ItemCameraTransforms getItemCameraTransforms(){
	return null;
}

@Override
public IBakedModel handleItemState(ItemStack itemstack){
	ItemStack[] items = ((ItemItemsSet) itemstack.getItem()).getItems(itemstack);
	ImmutableMap.Builder<String, IFlexibleBakedModel> parts = ImmutableMap.builder();
	for(ItemStack item : items){
		if(item != null){
			IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(item);
			if(model instanceof IFlexibleBakedModel){
				parts.put(item.toString(), (IFlexibleBakedModel) model);
			} else {
				parts.put(items.toString(), new IFlexibleBakedModel.Wrapper(model, DefaultVertexFormats.ITEM));
			}
		}
	}
	return new MultiModel.Baked(null, parts.build());
}

}

 

And my item (do not worry about abstract, right click and information methods, i'm testing with items that override this class):

public abstract class ItemItemsSet extends ItemItemsList {

@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){
	if(!world.isRemote){
		player.inventory.markDirty();
		if(hasPlayerItems(player)){
			ItemStack newItemstack = new ItemStack(this);
			setItems(newItemstack, getPlayerItems(player));
			setPlayerItems(player, getItems(itemstack));
			return newItemstack;
		} else {
			setPlayerItems(player, getItems(itemstack));
			itemstack.stackSize = 0;
			return itemstack;
		}
	}
	return itemstack;
}

public abstract boolean hasPlayerItems(EntityPlayer player);

public abstract ItemStack[] getPlayerItems(EntityPlayer player);

public abstract void setPlayerItems(EntityPlayer player, ItemStack[] items);

@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean debug){
	list.add("---");
	for(ItemStack item : getItems(itemstack)){
		if(item == null){
			list.add("");
		} else {
			if(!GuiScreen.isShiftKeyDown()){
				list.add(item.getDisplayName());
			} else {
				list.addAll(item.getTooltip(player, debug));
			}
		}
		list.add("---");
	}
}

@Override
@SideOnly(Side.CLIENT)
public ModelResourceLocation getModel(ItemStack itemstack, EntityPlayer player, int useRemaining){
	return new ModelResourceLocation(ClientProxy.MODELLOCATIONKEY, ClientProxy.MODELLOCATIONKEY);
}

}

Link to comment
Share on other sites

From looking at the error it seems as if one of the models you passed to the MultiModel is null. Use a debugger to find out why.

I'll look into it with debug then.

 

Also,

How exactly do i register my

ISmartItemModel

in

ModelBakeEvent

?

Right now, i'm calling

event.registry.putObject

, and using resource location that i return in my item.

Is this correct way to do it?

Link to comment
Share on other sites

Is this correct way to do it?

Yes, although I don't know what you mean by "return in my item". You set the model for an Item using ModelLoader.setCustomModelResourceLocation.

Ok. Thank you.

 

And i meant this:


@Override
@SideOnly(Side.CLIENT)
public ModelResourceLocation getModel(ItemStack itemstack, EntityPlayer player, int useRemaining){
	return new ModelResourceLocation(ClientProxy.MODELLOCATIONKEY, ClientProxy.MODELLOCATIONKEY);
}

}

(But i will remove it).

Link to comment
Share on other sites

  • 2 weeks later...

From looking at the error it seems as if one of the models you passed to the MultiModel is null. Use a debugger to find out why.

Actually it is not. It crashes on invoking this method on my

ISmartItemModel

.

 

EDIT: For now, i'm returning

ItemCameraTransforms.DEFAULT

and that fixed that crash. But.

[14:09:51] [Client thread/FATAL]: Unreported exception thrown!
java.lang.NullPointerException
at net.minecraft.client.renderer.entity.RenderItem.renderQuads(RenderItem.java:213) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderModel(RenderItem.java:128) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderModel(RenderItem.java:112) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderItem(RenderItem.java:153) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelTransform(RenderItem.java:329) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelForEntity(RenderItem.java:312) ~[RenderItem.class:?]
at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:73) ~[itemRenderer.class:?]
at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:361) ~[itemRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:832) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1468) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:380) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
[14:09:51] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: ---- Minecraft Crash Report ----
// Shall we play a game?

Time: 05.03.16 14:09
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at net.minecraft.client.renderer.entity.RenderItem.renderQuads(RenderItem.java:213)
at net.minecraft.client.renderer.entity.RenderItem.renderModel(RenderItem.java:128)
at net.minecraft.client.renderer.entity.RenderItem.renderModel(RenderItem.java:112)
at net.minecraft.client.renderer.entity.RenderItem.renderItem(RenderItem.java:153)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelTransform(RenderItem.java:329)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelForEntity(RenderItem.java:312)
at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:73)
at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:361)
at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:832)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1468)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107)
at net.minecraft.client.Minecraft.run(Minecraft.java:380)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.client.renderer.entity.RenderItem.renderQuads(RenderItem.java:213)
at net.minecraft.client.renderer.entity.RenderItem.renderModel(RenderItem.java:128)
at net.minecraft.client.renderer.entity.RenderItem.renderModel(RenderItem.java:112)
at net.minecraft.client.renderer.entity.RenderItem.renderItem(RenderItem.java:153)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelTransform(RenderItem.java:329)
at net.minecraft.client.renderer.entity.RenderItem.renderItemModelForEntity(RenderItem.java:312)
at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:73)
at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:361)
at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:832)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1468)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player766'/268, l='MpServer', x=-1114,34, y=67,00, z=-173,44]]
Chunk stats: MultiplayerChunkCache: 130, 130
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: -1082,00,64,00,-193,00 - World: (-1082,64,-193), Chunk: (at 6,4,15 in -68,-13; contains blocks -1088,0,-208 to -1073,255,-193), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
Level time: 133325 game time, 3737 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 110 total; [EntityPlayerSP['Player766'/268, l='MpServer', x=-1114,34, y=67,00, z=-173,44], EntitySkeleton['Skeleton'/21, l='MpServer', x=-1188,50, y=21,00, z=-195,50], EntitySkeleton['Skeleton'/33, l='MpServer', x=-1169,50, y=18,00, z=-238,91], EntityEnderman['Enderman'/34, l='MpServer', x=-1172,41, y=23,22, z=-226,25], EntitySkeleton['Skeleton'/35, l='MpServer', x=-1176,16, y=21,00, z=-227,31], EntitySquid['Squid'/36, l='MpServer', x=-1170,57, y=59,79, z=-175,05], EntitySquid['Squid'/37, l='MpServer', x=-1175,27, y=52,64, z=-153,13], EntitySquid['Squid'/39, l='MpServer', x=-1169,54, y=48,41, z=-110,69], EntityBat['Bat'/43, l='MpServer', x=-1169,31, y=24,10, z=-95,63], EntitySquid['Squid'/49, l='MpServer', x=-1161,63, y=58,41, z=-188,04], EntitySquid['Squid'/50, l='MpServer', x=-1162,64, y=56,10, z=-156,16], EntitySquid['Squid'/51, l='MpServer', x=-1167,69, y=47,84, z=-155,51], EntityZombie['Zombie'/52, l='MpServer', x=-1166,81, y=12,00, z=-136,50], EntityBat['Bat'/53, l='MpServer', x=-1149,44, y=18,06, z=-142,44], EntitySquid['Squid'/54, l='MpServer', x=-1157,81, y=60,04, z=-135,84], EntityBat['Bat'/55, l='MpServer', x=-1162,03, y=21,25, z=-101,91], EntitySkeleton['Skeleton'/56, l='MpServer', x=-1155,50, y=16,00, z=-95,50], EntityEnderman['Enderman'/57, l='MpServer', x=-1154,50, y=16,00, z=-94,50], EntitySquid['Squid'/66, l='MpServer', x=-1147,53, y=61,52, z=-236,98], EntitySquid['Squid'/67, l='MpServer', x=-1141,67, y=56,28, z=-221,56], EntitySquid['Squid'/68, l='MpServer', x=-1133,15, y=52,32, z=-219,26], EntitySquid['Squid'/69, l='MpServer', x=-1153,82, y=57,58, z=-198,94], EntitySquid['Squid'/70, l='MpServer', x=-1140,32, y=49,54, z=-188,93], EntitySquid['Squid'/71, l='MpServer', x=-1142,27, y=52,25, z=-158,81], EntitySquid['Squid'/72, l='MpServer', x=-1140,21, y=46,06, z=-133,03], EntitySquid['Squid'/73, l='MpServer', x=-1153,18, y=48,94, z=-145,78], EntityZombie['Zombie'/74, l='MpServer', x=-1140,50, y=29,00, z=-115,50], EntitySkeleton['Skeleton'/75, l='MpServer', x=-1150,72, y=25,00, z=-119,16], EntitySquid['Squid'/76, l='MpServer', x=-1148,29, y=61,45, z=-124,97], EntitySquid['Squid'/78, l='MpServer', x=-1138,30, y=48,63, z=-112,32], EntityBat['Bat'/80, l='MpServer', x=-1146,56, y=30,10, z=-95,44], EntitySquid['Squid'/88, l='MpServer', x=-1131,26, y=51,78, z=-234,00], EntitySquid['Squid'/90, l='MpServer', x=-1120,17, y=50,16, z=-233,28], EntitySquid['Squid'/91, l='MpServer', x=-1134,38, y=58,82, z=-225,09], EntitySquid['Squid'/92, l='MpServer', x=-1137,01, y=58,53, z=-209,75], EntitySquid['Squid'/93, l='MpServer', x=-1126,49, y=39,44, z=-181,13], EntitySquid['Squid'/94, l='MpServer', x=-1117,90, y=48,36, z=-141,78], EntitySquid['Squid'/95, l='MpServer', x=-1134,28, y=60,81, z=-113,82], EntitySquid['Squid'/96, l='MpServer', x=-1127,59, y=49,67, z=-110,78], EntitySquid['Squid'/98, l='MpServer', x=-1126,11, y=47,10, z=-111,89], EntitySquid['Squid'/112, l='MpServer', x=-1115,24, y=47,11, z=-230,15], EntitySquid['Squid'/113, l='MpServer', x=-1102,92, y=47,96, z=-231,72], EntitySquid['Squid'/114, l='MpServer', x=-1103,00, y=51,15, z=-224,55], EntitySquid['Squid'/115, l='MpServer', x=-1109,97, y=47,50, z=-203,26], EntityCreeper['Creeper'/116, l='MpServer', x=-1104,50, y=31,00, z=-181,50], EntityItem['item.item.Ring.0'/117, l='MpServer', x=-1108,13, y=52,00, z=-170,19], EntityItem['item.item.Ring.0'/118, l='MpServer', x=-1108,13, y=51,00, z=-169,75], EntitySquid['Squid'/119, l='MpServer', x=-1108,50, y=52,56, z=-168,79], EntitySkeleton['Skeleton'/120, l='MpServer', x=-1112,50, y=16,00, z=-137,50], EntitySquid['Squid'/121, l='MpServer', x=-1104,54, y=52,30, z=-129,91], EntitySquid['Squid'/122, l='MpServer', x=-1105,44, y=52,75, z=-136,91], EntitySquid['Squid'/123, l='MpServer', x=-1108,44, y=56,27, z=-117,62], EntitySquid['Squid'/124, l='MpServer', x=-1112,85, y=51,30, z=-121,24], EntitySquid['Squid'/125, l='MpServer', x=-1111,18, y=54,47, z=-128,91], EntitySkeleton['Skeleton'/138, l='MpServer', x=-1096,50, y=23,00, z=-241,50], EntitySkeleton['Skeleton'/139, l='MpServer', x=-1088,78, y=22,00, z=-229,06], EntityCreeper['Creeper'/140, l='MpServer', x=-1096,50, y=22,00, z=-225,50], EntityCreeper['Creeper'/141, l='MpServer', x=-1092,50, y=22,00, z=-226,50], EntitySquid['Squid'/142, l='MpServer', x=-1099,15, y=49,71, z=-233,66], EntitySquid['Squid'/143, l='MpServer', x=-1089,01, y=54,28, z=-212,78], EntitySquid['Squid'/144, l='MpServer', x=-1102,44, y=48,23, z=-207,96], EntitySkeleton['Skeleton'/145, l='MpServer', x=-1089,53, y=27,00, z=-177,91], EntityBat['Bat'/146, l='MpServer', x=-1101,66, y=32,38, z=-183,22], EntityBat['Bat'/147, l='MpServer', x=-1091,78, y=31,72, z=-166,97], EntityBat['Bat'/148, l='MpServer', x=-1093,44, y=31,06, z=-166,13], EntityBat['Bat'/149, l='MpServer', x=-1087,31, y=32,47, z=-156,25], EntitySquid['Squid'/150, l='MpServer', x=-1091,91, y=42,00, z=-146,53], EntitySquid['Squid'/151, l='MpServer', x=-1102,95, y=45,93, z=-145,81], EntitySquid['Squid'/152, l='MpServer', x=-1093,41, y=62,37, z=-145,25], EntitySquid['Squid'/153, l='MpServer', x=-1085,75, y=56,84, z=-142,99], EntitySquid['Squid'/154, l='MpServer', x=-1098,26, y=43,57, z=-143,67], EntitySquid['Squid'/155, l='MpServer', x=-1097,82, y=45,88, z=-145,16], EntitySquid['Squid'/156, l='MpServer', x=-1100,00, y=42,06, z=-144,85], EntitySquid['Squid'/157, l='MpServer', x=-1097,44, y=51,95, z=-137,82], EntitySquid['Squid'/158, l='MpServer', x=-1092,02, y=54,02, z=-132,21], EntitySkeleton['Skeleton'/159, l='MpServer', x=-1101,50, y=16,00, z=-122,50], EntityEnderman['Enderman'/160, l='MpServer', x=-1102,50, y=16,00, z=-122,50], EntityZombie['Zombie'/161, l='MpServer', x=-1094,50, y=17,00, z=-103,50], EntityZombie['Zombie'/162, l='MpServer', x=-1093,50, y=17,00, z=-103,50], EntitySkeleton['Skeleton'/169, l='MpServer', x=-1084,50, y=18,00, z=-209,50], EntitySquid['Squid'/170, l='MpServer', x=-1073,42, y=56,92, z=-211,22], EntitySquid['Squid'/171, l='MpServer', x=-1086,99, y=51,80, z=-210,72], EntitySquid['Squid'/172, l='MpServer', x=-1084,13, y=56,39, z=-215,99], EntityCreeper['Creeper'/173, l='MpServer', x=-1082,34, y=26,00, z=-145,97], EntityBat['Bat'/174, l='MpServer', x=-1078,50, y=28,10, z=-156,25], EntitySkeleton['Skeleton'/175, l='MpServer', x=-1087,09, y=25,00, z=-147,56], EntityZombie['Zombie'/176, l='MpServer', x=-1085,50, y=25,00, z=-149,50], EntityZombie['Zombie'/177, l='MpServer', x=-1080,50, y=28,00, z=-156,50], EntitySpider['Spider'/178, l='MpServer', x=-1082,50, y=28,00, z=-157,50], EntityBat['Bat'/179, l='MpServer', x=-1073,25, y=31,03, z=-153,72], EntityZombie['Zombie'/180, l='MpServer', x=-1080,50, y=27,00, z=-157,50], EntitySquid['Squid'/181, l='MpServer', x=-1077,60, y=59,84, z=-147,37], EntitySquid['Squid'/182, l='MpServer', x=-1075,16, y=61,91, z=-142,01], EntitySquid['Squid'/183, l='MpServer', x=-1070,75, y=59,21, z=-156,96], EntityZombie['Zombie'/184, l='MpServer', x=-1081,94, y=24,00, z=-129,34], EntitySkeleton['Skeleton'/185, l='MpServer', x=-1086,50, y=27,00, z=-140,50], EntitySquid['Squid'/186, l='MpServer', x=-1076,90, y=59,73, z=-134,22], EntitySkeleton['Skeleton'/187, l='MpServer', x=-1083,50, y=22,00, z=-125,50], EntitySkeleton['Skeleton'/188, l='MpServer', x=-1084,50, y=22,00, z=-125,50], EntityWitch['Witch'/193, l='MpServer', x=-1068,50, y=40,00, z=-204,50], EntityWitch['Witch'/194, l='MpServer', x=-1070,50, y=40,00, z=-202,50], EntitySkeleton['Skeleton'/195, l='MpServer', x=-1064,44, y=24,00, z=-148,09], EntityBat['Bat'/196, l='MpServer', x=-1068,00, y=26,10, z=-155,69], EntitySquid['Squid'/197, l='MpServer', x=-1056,75, y=46,74, z=-151,57], EntityZombie['Zombie'/198, l='MpServer', x=-1070,50, y=32,00, z=-156,50], EntityZombie['Zombie'/199, l='MpServer', x=-1071,50, y=32,00, z=-152,50], EntitySquid['Squid'/206, l='MpServer', x=-1051,33, y=46,56, z=-232,55], EntitySquid['Squid'/207, l='MpServer', x=-1054,04, y=56,48, z=-117,43], EntityZombie['Zombie'/208, l='MpServer', x=-1056,88, y=12,00, z=-105,06], EntityCreeper['Creeper'/223, l='MpServer', x=-1037,50, y=15,00, z=-161,50]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:383)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2645)
at net.minecraft.client.Minecraft.run(Minecraft.java:409)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
Minecraft Version: 1.8.9
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_73, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 418828088 bytes (399 MB) / 898629632 bytes (857 MB) up to 1717043200 bytes (1637 MB)
JVM Flags: 0 total; 
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
FML: MCP 9.19 Powered by Forge 11.15.1.1744 6 mods loaded, 6 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Forge{11.15.1.1744} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Baubles{1.1.3.0} [baubles] (Baubles-1.8.9-1.1.3.0-deobf.jar) 
UCHIJAAAA	excore{1.3.9} [EXCore] (bin) 
UCHIJAAAA	armorsets{2.0} [Armor Sets] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.4.13084 Compatibility Profile Context 14.301.1001.0' Renderer: 'AMD Radeon HD 8570D'
Launched Version: 1.8.9
LWJGL: 2.9.4
OpenGL: AMD Radeon HD 8570D GL version 4.4.13084 Compatibility Profile Context 14.301.1001.0, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

Using VBOs: No
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x AMD A8-6600K APU with Radeon(tm) HD Graphics 
[14:09:51] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: #@!@# Game crashed! Crash report saved to: #@!@# C:\my\mcmodding\mods\Armor-Sets\1.8.9\run\.\crash-reports\crash-2016-03-05_14.09.51-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed

 

EDIT 2: After removing this from item class:

@Override
@SideOnly(Side.CLIENT)
public ModelResourceLocation getModel(ItemStack itemstack, EntityPlayer player, int useRemaining){
	return ClientProxy.MODELLOCATION;
}

It does not crash any more, but item is rendered as untextured cube (missing texture).

 

And this is my current

ClientProxy

:

public class ClientProxy implements IProxy {

public static final ModelResourceLocation MODELLOCATION = new ModelResourceLocation("ItemsSet", "ItemsSet");

public static KeyBinding armorSetKeyBinding = new KeyBinding("key.armorsets.armor", Keyboard.KEY_F, "category.armorsets");
public static KeyBinding baublesSetKeyBinding = new KeyBinding("key.armorsets.baubles", Keyboard.KEY_G, "category.armorsets");
public static KeyBinding armorBaublesSetKeyBinding = new KeyBinding("key.armorsets.armorbaubles", Keyboard.KEY_V, "category.armorsets");

@Override
public void preInit(FMLPreInitializationEvent event){

}

@Override
public void init(FMLInitializationEvent event){
	ModelLoader.setCustomModelResourceLocation(ArmorSetsBase.itemArmorSet, 0, MODELLOCATION);

	ClientRegistry.registerKeyBinding(armorSetKeyBinding);
	ClientRegistry.registerKeyBinding(baublesSetKeyBinding);
	ClientRegistry.registerKeyBinding(armorBaublesSetKeyBinding);

	FMLCommonHandler.instance().bus().register(new KeyBindingsCheckEvent());
	MinecraftForge.EVENT_BUS.register(new BakeModelEvent());
}

@Override
public void postInit(FMLPostInitializationEvent event){

}

}

Link to comment
Share on other sites

Is your handleItemState being called before the crash?

If i keep

getModel

in my item class,

getItemCameraTransforms

is called and crashes the game,

handleItemState

is not being called.

If i remove

getModel

from my item class, neither of methods is getting called.

 

I'll repost my code on gist: https://gist.github.com/elix-x/8a0f8ac9f61fea0830a6 (

ItemItemsSetRenderer

is what i used in 1.7.10).

Link to comment
Share on other sites

Do not use getModel. You have to use setCustomModelResourceLocation to tell Minecraft about your Model.

As i said, if i remove

getModel

(and keep

setCustomModelResourceLocation

) none of my

ISmartItemModel

methods is called.

Link to comment
Share on other sites

I just put together a very simple test. It works just fine, the Item has the stick model in game.

Moving everything to pre init fixed everything.

 

Now i have to deal with 3 things:

-Change item rendering based on view. I think that i should wrap

MultiModel

in

IFlexibleBakedModel

.

-Offset each rendered item by 0.1, so they look stacked.

-Glint effect. I have no clues for that one.

 

EDIT: Wrappping

MultiModel

in

IFlexibleBakedModel

worked (gist updated), but now it crashes when i throw it in world:

[17:34:58] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering entity in world
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:428) ~[RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337) ~[RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304) ~[RenderManager.class:?]
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672) ~[RenderGlobal.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1369) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:380) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.NullPointerException
at net.minecraft.client.renderer.entity.RenderEntityItem.func_177077_a(RenderEntityItem.java:45) ~[RenderEntityItem.class:?]
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:115) ~[RenderEntityItem.class:?]
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:16) ~[RenderEntityItem.class:?]
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380) ~[RenderManager.class:?]
... 21 more
[17:34:58] [server thread/INFO] [FML]: Applying holder lookups
[17:34:58] [server thread/INFO] [FML]: Holder lookups applied
[17:34:58] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: ---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!

Time: 06.03.16 17:34
Description: Rendering entity in world

java.lang.NullPointerException: Rendering entity in world
at net.minecraft.client.renderer.entity.RenderEntityItem.func_177077_a(RenderEntityItem.java:45)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:115)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:16)
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1369)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107)
at net.minecraft.client.Minecraft.run(Minecraft.java:380)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.client.renderer.entity.RenderEntityItem.func_177077_a(RenderEntityItem.java:45)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:115)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:16)

-- Entity being rendered --
Details:
Entity Type: Item (net.minecraft.entity.item.EntityItem)
Entity ID: 5750
Entity Name: item.item.armorset
Entity's Exact location: -1114,76, 68,16, -173,51
Entity's Block location: -1115,00,68,00,-174,00 - World: (-1115,68,-174), Chunk: (at 5,4,2 in -70,-11; contains blocks -1120,0,-176 to -1105,255,-161), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
Entity's Momentum: -0,25, -0,15, -0,01
Entity's Rider: ~~ERROR~~ NullPointerException: null
Entity's Vehicle: ~~ERROR~~ NullPointerException: null

-- Renderer details --
Details:
Assigned renderer: net.minecraft.client.renderer.entity.RenderEntityItem@4d54b03f
Location: -0,08,1,28,-0,01 - World: (-1,1,-1), Chunk: (at 15,0,15 in -1,-1; contains blocks -16,0,-16 to -1,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Rotation: 11.25
Delta: 0.21573651
Stacktrace:
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1369)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player573'/212, l='MpServer', x=-1114,48, y=67,00, z=-173,49]]
Chunk stats: MultiplayerChunkCache: 603, 603
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: -1082,00,64,00,-193,00 - World: (-1082,64,-193), Chunk: (at 6,4,15 in -68,-13; contains blocks -1088,0,-208 to -1073,255,-193), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
Level time: 137725 game time, 8137 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 91 total; [EntityBat['Bat'/128, l='MpServer', x=-1084,25, y=27,10, z=-147,81], EntityZombie['Zombie'/129, l='MpServer', x=-1082,31, y=28,00, z=-149,31], EntitySkeleton['Skeleton'/130, l='MpServer', x=-1077,97, y=28,00, z=-151,50], EntityBat['Bat'/131, l='MpServer', x=-1069,20, y=29,70, z=-156,73], EntitySquid['Squid'/132, l='MpServer', x=-1083,50, y=59,06, z=-156,41], EntitySkeleton['Skeleton'/133, l='MpServer', x=-1080,47, y=25,00, z=-129,13], EntitySquid['Squid'/134, l='MpServer', x=-1088,19, y=55,63, z=-140,13], EntitySquid['Squid'/135, l='MpServer', x=-1082,56, y=58,44, z=-146,28], EntityZombie['Zombie'/136, l='MpServer', x=-1087,53, y=26,00, z=-126,94], EntitySquid['Squid'/137, l='MpServer', x=-1081,13, y=38,81, z=-124,59], EntitySquid['Squid'/138, l='MpServer', x=-1085,72, y=49,16, z=-124,91], EntitySquid['Squid'/139, l='MpServer', x=-1084,16, y=50,50, z=-123,59], EntitySkeleton['Skeleton'/13, l='MpServer', x=-1189,97, y=24,00, z=-199,50], EntityBat['Bat'/144, l='MpServer', x=-1068,00, y=26,10, z=-155,69], EntityBat['Bat'/145, l='MpServer', x=-1070,25, y=27,10, z=-159,13], EntityBat['Bat'/146, l='MpServer', x=-1069,75, y=31,10, z=-157,41], EntityBat['Bat'/147, l='MpServer', x=-1069,53, y=26,10, z=-159,06], EntityBat['Bat'/148, l='MpServer', x=-1070,03, y=32,00, z=-155,27], EntityZombie['Zombie'/20, l='MpServer', x=-1186,63, y=19,00, z=-140,09], EntityZombie['Zombie'/149, l='MpServer', x=-1070,97, y=32,00, z=-152,88], EntitySquid['Squid'/150, l='MpServer', x=-1063,84, y=59,59, z=-132,09], EntityCreeper['Creeper'/22, l='MpServer', x=-1193,94, y=27,00, z=-126,56], EntitySquid['Squid'/151, l='MpServer', x=-1062,16, y=59,63, z=-122,28], EntityCreeper['Creeper'/23, l='MpServer', x=-1190,47, y=17,00, z=-111,06], EntitySquid['Squid'/152, l='MpServer', x=-1061,38, y=58,78, z=-111,91], EntityEnderman['Enderman'/27, l='MpServer', x=-1177,38, y=20,00, z=-229,97], EntitySkeleton['Skeleton'/28, l='MpServer', x=-1175,44, y=21,00, z=-226,84], EntitySquid['Squid'/29, l='MpServer', x=-1165,59, y=52,25, z=-225,75], EntityCreeper['Creeper'/30, l='MpServer', x=-1176,22, y=18,00, z=-96,22], EntityBat['Bat'/31, l='MpServer', x=-1169,31, y=24,10, z=-95,63], EntitySquid['Squid'/37, l='MpServer', x=-1157,97, y=55,50, z=-214,28], EntitySquid['Squid'/38, l='MpServer', x=-1161,25, y=53,53, z=-214,38], EntitySquid['Squid'/39, l='MpServer', x=-1154,47, y=49,53, z=-223,88], EntitySquid['Squid'/40, l='MpServer', x=-1166,16, y=50,66, z=-177,38], EntityZombie['Zombie'/41, l='MpServer', x=-1161,94, y=14,00, z=-136,53], EntitySquid['Squid'/42, l='MpServer', x=-1165,75, y=48,50, z=-136,94], EntitySkeleton['Skeleton'/43, l='MpServer', x=-1155,09, y=24,00, z=-119,47], EntitySquid['Squid'/52, l='MpServer', x=-1157,00, y=59,09, z=-226,97], EntitySquid['Squid'/53, l='MpServer', x=-1143,53, y=55,44, z=-191,31], EntitySquid['Squid'/54, l='MpServer', x=-1150,63, y=53,91, z=-153,13], EntitySquid['Squid'/55, l='MpServer', x=-1138,49, y=50,47, z=-171,14], EntitySquid['Squid'/56, l='MpServer', x=-1140,63, y=49,66, z=-148,06], EntitySquid['Squid'/57, l='MpServer', x=-1145,31, y=40,03, z=-114,28], EntityZombie['Zombie'/58, l='MpServer', x=-1141,94, y=28,00, z=-115,50], EntitySquid['Squid'/66, l='MpServer', x=-1121,78, y=54,19, z=-233,09], EntitySquid['Squid'/67, l='MpServer', x=-1115,50, y=43,25, z=-205,63], EntitySquid['Squid'/68, l='MpServer', x=-1125,84, y=43,29, z=-160,00], EntitySquid['Squid'/69, l='MpServer', x=-1133,78, y=44,72, z=-144,13], EntitySquid['Squid'/70, l='MpServer', x=-1119,25, y=40,03, z=-149,91], EntitySquid['Squid'/71, l='MpServer', x=-1119,19, y=51,77, z=-148,12], EntitySquid['Squid'/72, l='MpServer', x=-1123,44, y=46,56, z=-110,94], EntitySquid['Squid'/73, l='MpServer', x=-1134,72, y=48,53, z=-133,38], EntitySquid['Squid'/74, l='MpServer', x=-1126,16, y=45,28, z=-123,06], EntitySquid['Squid'/75, l='MpServer', x=-1123,91, y=50,84, z=-126,81], EntitySquid['Squid'/77, l='MpServer', x=-1129,28, y=51,34, z=-110,38], EntitySquid['Squid'/78, l='MpServer', x=-1124,56, y=60,72, z=-115,22], EntityPlayerSP['Player573'/212, l='MpServer', x=-1114,48, y=67,00, z=-173,49], EntitySquid['Squid'/86, l='MpServer', x=-1112,41, y=50,66, z=-213,78], EntitySquid['Squid'/87, l='MpServer', x=-1123,81, y=51,81, z=-210,59], EntitySquid['Squid'/88, l='MpServer', x=-1110,91, y=47,16, z=-130,47], EntityCreeper['Creeper'/89, l='MpServer', x=-1106,72, y=11,19, z=-116,72], EntityZombie['Zombie'/90, l='MpServer', x=-1106,72, y=11,00, z=-115,88], EntitySquid['Squid'/91, l='MpServer', x=-1116,09, y=51,97, z=-111,47], EntitySkeleton['Skeleton'/95, l='MpServer', x=-1092,75, y=22,00, z=-248,19], EntityCreeper['Creeper'/96, l='MpServer', x=-1096,56, y=22,00, z=-226,06], EntityCreeper['Creeper'/97, l='MpServer', x=-1102,03, y=22,00, z=-215,63], EntityBat['Bat'/98, l='MpServer', x=-1100,49, y=22,10, z=-215,82], EntityZombie['Zombie'/99, l='MpServer', x=-1091,28, y=18,40, z=-207,31], EntitySpider['Spider'/100, l='MpServer', x=-1085,72, y=27,09, z=-184,06], EntityCreeper['Creeper'/101, l='MpServer', x=-1099,59, y=31,00, z=-170,94], EntitySquid['Squid'/102, l='MpServer', x=-1086,47, y=40,56, z=-146,19], EntitySkeleton['Skeleton'/103, l='MpServer', x=-1088,44, y=27,00, z=-138,03], EntityZombie['Zombie'/104, l='MpServer', x=-1088,50, y=26,00, z=-136,09], EntitySquid['Squid'/105, l='MpServer', x=-1097,88, y=61,19, z=-134,69], EntitySquid['Squid'/106, l='MpServer', x=-1088,25, y=50,38, z=-136,50], EntitySkeleton['Skeleton'/107, l='MpServer', x=-1102,22, y=16,00, z=-122,41], EntitySquid['Squid'/108, l='MpServer', x=-1099,91, y=42,56, z=-119,50], EntitySquid['Squid'/109, l='MpServer', x=-1092,50, y=48,59, z=-117,69], EntityZombie['Zombie'/111, l='MpServer', x=-1105,00, y=11,01, z=-116,14], EntityEnderman['Enderman'/112, l='MpServer', x=-1096,50, y=24,00, z=-104,72], EntitySquid['Squid'/118, l='MpServer', x=-1078,84, y=48,81, z=-230,47], EntityItem['item.item.armorset'/5750, l='MpServer', x=-1114,76, y=68,16, z=-173,51], EntitySquid['Squid'/119, l='MpServer', x=-1081,34, y=61,03, z=-206,50], EntityBat['Bat'/120, l='MpServer', x=-1082,75, y=19,10, z=-204,75], EntityWitch['Witch'/121, l='MpServer', x=-1071,13, y=42,00, z=-205,50], EntityZombie['Zombie'/122, l='MpServer', x=-1074,97, y=42,00, z=-193,56], EntityWitch['Witch'/123, l='MpServer', x=-1079,34, y=43,00, z=-195,13], EntitySquid['Squid'/124, l='MpServer', x=-1077,31, y=61,53, z=-205,50], EntitySkeleton['Skeleton'/125, l='MpServer', x=-1087,97, y=26,00, z=-177,16], EntityCreeper['Creeper'/126, l='MpServer', x=-1079,97, y=26,00, z=-149,34], EntityBat['Bat'/127, l='MpServer', x=-1078,50, y=28,10, z=-156,25]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:383)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2645)
at net.minecraft.client.Minecraft.run(Minecraft.java:401)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
Minecraft Version: 1.8.9
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_73, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 393484120 bytes (375 MB) / 889716736 bytes (848 MB) up to 1717043200 bytes (1637 MB)
JVM Flags: 0 total; 
IntCache: cache: 3, tcache: 0, allocated: 13, tallocated: 95
FML: MCP 9.19 Powered by Forge 11.15.1.1744 7 mods loaded, 7 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Forge{11.15.1.1744} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Baubles{1.1.3.0} [baubles] (Baubles-1.8.9-1.1.3.0-deobf.jar) 
UCHIJAAAA	excore{1.4} [EXCore] (bin) 
UCHIJAAAA	armorsets{2.0} [Armor Sets] (bin) 
UCHIJAAAA	examplemod{1.0} [examplemod] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.4.13084 Compatibility Profile Context 14.301.1001.0' Renderer: 'AMD Radeon HD 8570D'
Launched Version: 1.8.9
LWJGL: 2.9.4
OpenGL: AMD Radeon HD 8570D GL version 4.4.13084 Compatibility Profile Context 14.301.1001.0, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

Using VBOs: No
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x AMD A8-6600K APU with Radeon(tm) HD Graphics 
[17:34:58] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: #@!@# Game crashed! Crash report saved to: #@!@# C:\my\mcmodding\mods\Armor-Sets\1.8.9\run\.\crash-reports\crash-2016-03-06_17.34.58-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed

 

I thought i don't have to fill methods in

IPerspectiveAwareModel

either.

Link to comment
Share on other sites

-Change item rendering based on view. I think that i should wrap

MultiModel[code] in [code]IFlexibleBakedModel

.

Not sure what you mean here. What kind of view?

Perspective (gui, first person, third person...).

-Offset each rendered item by 0.1, so they look stacked.
When baking the models you have to supply an IModelState. A possibility here is a TRSRTransformation which allows you to apply any transformation matrix you would like to the model before it's baked.

Ok. But how can i offset

VertexFormat

, i don't see methods there.

-Glint effect. I have no clues for that one.

Neither do I. Sorry.

I heard somewhere, that it requires gl calls and core mods. Sigh.

Link to comment
Share on other sites

Perspective (gui, first person, third person...).

You can return an IPerspectiveAwareModel from your ISmartItemModel. In there you can combine the baked multi model with Matrix4f depending on where it is rendered.

I already did that, and it crashed.

EDIT: Wrappping

MultiModel

in

IFlexibleBakedModel

worked (gist updated), but now it crashes when i throw it in world:

[17:34:58] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering entity in world
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:428) ~[RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337) ~[RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304) ~[RenderManager.class:?]
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672) ~[RenderGlobal.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1369) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:380) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.NullPointerException
at net.minecraft.client.renderer.entity.RenderEntityItem.func_177077_a(RenderEntityItem.java:45) ~[RenderEntityItem.class:?]
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:115) ~[RenderEntityItem.class:?]
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:16) ~[RenderEntityItem.class:?]
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380) ~[RenderManager.class:?]
... 21 more
[17:34:58] [server thread/INFO] [FML]: Applying holder lookups
[17:34:58] [server thread/INFO] [FML]: Holder lookups applied
[17:34:58] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: ---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!

Time: 06.03.16 17:34
Description: Rendering entity in world

java.lang.NullPointerException: Rendering entity in world
at net.minecraft.client.renderer.entity.RenderEntityItem.func_177077_a(RenderEntityItem.java:45)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:115)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:16)
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1369)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107)
at net.minecraft.client.Minecraft.run(Minecraft.java:380)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.client.renderer.entity.RenderEntityItem.func_177077_a(RenderEntityItem.java:45)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:115)
at net.minecraft.client.renderer.entity.RenderEntityItem.doRender(RenderEntityItem.java:16)

-- Entity being rendered --
Details:
Entity Type: Item (net.minecraft.entity.item.EntityItem)
Entity ID: 5750
Entity Name: item.item.armorset
Entity's Exact location: -1114,76, 68,16, -173,51
Entity's Block location: -1115,00,68,00,-174,00 - World: (-1115,68,-174), Chunk: (at 5,4,2 in -70,-11; contains blocks -1120,0,-176 to -1105,255,-161), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
Entity's Momentum: -0,25, -0,15, -0,01
Entity's Rider: ~~ERROR~~ NullPointerException: null
Entity's Vehicle: ~~ERROR~~ NullPointerException: null

-- Renderer details --
Details:
Assigned renderer: net.minecraft.client.renderer.entity.RenderEntityItem@4d54b03f
Location: -0,08,1,28,-0,01 - World: (-1,1,-1), Chunk: (at 15,0,15 in -1,-1; contains blocks -16,0,-16 to -1,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Rotation: 11.25
Delta: 0.21573651
Stacktrace:
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:337)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:304)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:672)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1369)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player573'/212, l='MpServer', x=-1114,48, y=67,00, z=-173,49]]
Chunk stats: MultiplayerChunkCache: 603, 603
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: -1082,00,64,00,-193,00 - World: (-1082,64,-193), Chunk: (at 6,4,15 in -68,-13; contains blocks -1088,0,-208 to -1073,255,-193), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
Level time: 137725 game time, 8137 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 91 total; [EntityBat['Bat'/128, l='MpServer', x=-1084,25, y=27,10, z=-147,81], EntityZombie['Zombie'/129, l='MpServer', x=-1082,31, y=28,00, z=-149,31], EntitySkeleton['Skeleton'/130, l='MpServer', x=-1077,97, y=28,00, z=-151,50], EntityBat['Bat'/131, l='MpServer', x=-1069,20, y=29,70, z=-156,73], EntitySquid['Squid'/132, l='MpServer', x=-1083,50, y=59,06, z=-156,41], EntitySkeleton['Skeleton'/133, l='MpServer', x=-1080,47, y=25,00, z=-129,13], EntitySquid['Squid'/134, l='MpServer', x=-1088,19, y=55,63, z=-140,13], EntitySquid['Squid'/135, l='MpServer', x=-1082,56, y=58,44, z=-146,28], EntityZombie['Zombie'/136, l='MpServer', x=-1087,53, y=26,00, z=-126,94], EntitySquid['Squid'/137, l='MpServer', x=-1081,13, y=38,81, z=-124,59], EntitySquid['Squid'/138, l='MpServer', x=-1085,72, y=49,16, z=-124,91], EntitySquid['Squid'/139, l='MpServer', x=-1084,16, y=50,50, z=-123,59], EntitySkeleton['Skeleton'/13, l='MpServer', x=-1189,97, y=24,00, z=-199,50], EntityBat['Bat'/144, l='MpServer', x=-1068,00, y=26,10, z=-155,69], EntityBat['Bat'/145, l='MpServer', x=-1070,25, y=27,10, z=-159,13], EntityBat['Bat'/146, l='MpServer', x=-1069,75, y=31,10, z=-157,41], EntityBat['Bat'/147, l='MpServer', x=-1069,53, y=26,10, z=-159,06], EntityBat['Bat'/148, l='MpServer', x=-1070,03, y=32,00, z=-155,27], EntityZombie['Zombie'/20, l='MpServer', x=-1186,63, y=19,00, z=-140,09], EntityZombie['Zombie'/149, l='MpServer', x=-1070,97, y=32,00, z=-152,88], EntitySquid['Squid'/150, l='MpServer', x=-1063,84, y=59,59, z=-132,09], EntityCreeper['Creeper'/22, l='MpServer', x=-1193,94, y=27,00, z=-126,56], EntitySquid['Squid'/151, l='MpServer', x=-1062,16, y=59,63, z=-122,28], EntityCreeper['Creeper'/23, l='MpServer', x=-1190,47, y=17,00, z=-111,06], EntitySquid['Squid'/152, l='MpServer', x=-1061,38, y=58,78, z=-111,91], EntityEnderman['Enderman'/27, l='MpServer', x=-1177,38, y=20,00, z=-229,97], EntitySkeleton['Skeleton'/28, l='MpServer', x=-1175,44, y=21,00, z=-226,84], EntitySquid['Squid'/29, l='MpServer', x=-1165,59, y=52,25, z=-225,75], EntityCreeper['Creeper'/30, l='MpServer', x=-1176,22, y=18,00, z=-96,22], EntityBat['Bat'/31, l='MpServer', x=-1169,31, y=24,10, z=-95,63], EntitySquid['Squid'/37, l='MpServer', x=-1157,97, y=55,50, z=-214,28], EntitySquid['Squid'/38, l='MpServer', x=-1161,25, y=53,53, z=-214,38], EntitySquid['Squid'/39, l='MpServer', x=-1154,47, y=49,53, z=-223,88], EntitySquid['Squid'/40, l='MpServer', x=-1166,16, y=50,66, z=-177,38], EntityZombie['Zombie'/41, l='MpServer', x=-1161,94, y=14,00, z=-136,53], EntitySquid['Squid'/42, l='MpServer', x=-1165,75, y=48,50, z=-136,94], EntitySkeleton['Skeleton'/43, l='MpServer', x=-1155,09, y=24,00, z=-119,47], EntitySquid['Squid'/52, l='MpServer', x=-1157,00, y=59,09, z=-226,97], EntitySquid['Squid'/53, l='MpServer', x=-1143,53, y=55,44, z=-191,31], EntitySquid['Squid'/54, l='MpServer', x=-1150,63, y=53,91, z=-153,13], EntitySquid['Squid'/55, l='MpServer', x=-1138,49, y=50,47, z=-171,14], EntitySquid['Squid'/56, l='MpServer', x=-1140,63, y=49,66, z=-148,06], EntitySquid['Squid'/57, l='MpServer', x=-1145,31, y=40,03, z=-114,28], EntityZombie['Zombie'/58, l='MpServer', x=-1141,94, y=28,00, z=-115,50], EntitySquid['Squid'/66, l='MpServer', x=-1121,78, y=54,19, z=-233,09], EntitySquid['Squid'/67, l='MpServer', x=-1115,50, y=43,25, z=-205,63], EntitySquid['Squid'/68, l='MpServer', x=-1125,84, y=43,29, z=-160,00], EntitySquid['Squid'/69, l='MpServer', x=-1133,78, y=44,72, z=-144,13], EntitySquid['Squid'/70, l='MpServer', x=-1119,25, y=40,03, z=-149,91], EntitySquid['Squid'/71, l='MpServer', x=-1119,19, y=51,77, z=-148,12], EntitySquid['Squid'/72, l='MpServer', x=-1123,44, y=46,56, z=-110,94], EntitySquid['Squid'/73, l='MpServer', x=-1134,72, y=48,53, z=-133,38], EntitySquid['Squid'/74, l='MpServer', x=-1126,16, y=45,28, z=-123,06], EntitySquid['Squid'/75, l='MpServer', x=-1123,91, y=50,84, z=-126,81], EntitySquid['Squid'/77, l='MpServer', x=-1129,28, y=51,34, z=-110,38], EntitySquid['Squid'/78, l='MpServer', x=-1124,56, y=60,72, z=-115,22], EntityPlayerSP['Player573'/212, l='MpServer', x=-1114,48, y=67,00, z=-173,49], EntitySquid['Squid'/86, l='MpServer', x=-1112,41, y=50,66, z=-213,78], EntitySquid['Squid'/87, l='MpServer', x=-1123,81, y=51,81, z=-210,59], EntitySquid['Squid'/88, l='MpServer', x=-1110,91, y=47,16, z=-130,47], EntityCreeper['Creeper'/89, l='MpServer', x=-1106,72, y=11,19, z=-116,72], EntityZombie['Zombie'/90, l='MpServer', x=-1106,72, y=11,00, z=-115,88], EntitySquid['Squid'/91, l='MpServer', x=-1116,09, y=51,97, z=-111,47], EntitySkeleton['Skeleton'/95, l='MpServer', x=-1092,75, y=22,00, z=-248,19], EntityCreeper['Creeper'/96, l='MpServer', x=-1096,56, y=22,00, z=-226,06], EntityCreeper['Creeper'/97, l='MpServer', x=-1102,03, y=22,00, z=-215,63], EntityBat['Bat'/98, l='MpServer', x=-1100,49, y=22,10, z=-215,82], EntityZombie['Zombie'/99, l='MpServer', x=-1091,28, y=18,40, z=-207,31], EntitySpider['Spider'/100, l='MpServer', x=-1085,72, y=27,09, z=-184,06], EntityCreeper['Creeper'/101, l='MpServer', x=-1099,59, y=31,00, z=-170,94], EntitySquid['Squid'/102, l='MpServer', x=-1086,47, y=40,56, z=-146,19], EntitySkeleton['Skeleton'/103, l='MpServer', x=-1088,44, y=27,00, z=-138,03], EntityZombie['Zombie'/104, l='MpServer', x=-1088,50, y=26,00, z=-136,09], EntitySquid['Squid'/105, l='MpServer', x=-1097,88, y=61,19, z=-134,69], EntitySquid['Squid'/106, l='MpServer', x=-1088,25, y=50,38, z=-136,50], EntitySkeleton['Skeleton'/107, l='MpServer', x=-1102,22, y=16,00, z=-122,41], EntitySquid['Squid'/108, l='MpServer', x=-1099,91, y=42,56, z=-119,50], EntitySquid['Squid'/109, l='MpServer', x=-1092,50, y=48,59, z=-117,69], EntityZombie['Zombie'/111, l='MpServer', x=-1105,00, y=11,01, z=-116,14], EntityEnderman['Enderman'/112, l='MpServer', x=-1096,50, y=24,00, z=-104,72], EntitySquid['Squid'/118, l='MpServer', x=-1078,84, y=48,81, z=-230,47], EntityItem['item.item.armorset'/5750, l='MpServer', x=-1114,76, y=68,16, z=-173,51], EntitySquid['Squid'/119, l='MpServer', x=-1081,34, y=61,03, z=-206,50], EntityBat['Bat'/120, l='MpServer', x=-1082,75, y=19,10, z=-204,75], EntityWitch['Witch'/121, l='MpServer', x=-1071,13, y=42,00, z=-205,50], EntityZombie['Zombie'/122, l='MpServer', x=-1074,97, y=42,00, z=-193,56], EntityWitch['Witch'/123, l='MpServer', x=-1079,34, y=43,00, z=-195,13], EntitySquid['Squid'/124, l='MpServer', x=-1077,31, y=61,53, z=-205,50], EntitySkeleton['Skeleton'/125, l='MpServer', x=-1087,97, y=26,00, z=-177,16], EntityCreeper['Creeper'/126, l='MpServer', x=-1079,97, y=26,00, z=-149,34], EntityBat['Bat'/127, l='MpServer', x=-1078,50, y=28,10, z=-156,25]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:383)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2645)
at net.minecraft.client.Minecraft.run(Minecraft.java:401)
at net.minecraft.client.main.Main.main(Main.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
Minecraft Version: 1.8.9
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_73, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 393484120 bytes (375 MB) / 889716736 bytes (848 MB) up to 1717043200 bytes (1637 MB)
JVM Flags: 0 total; 
IntCache: cache: 3, tcache: 0, allocated: 13, tallocated: 95
FML: MCP 9.19 Powered by Forge 11.15.1.1744 7 mods loaded, 7 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Forge{11.15.1.1744} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1744.jar) 
UCHIJAAAA	Baubles{1.1.3.0} [baubles] (Baubles-1.8.9-1.1.3.0-deobf.jar) 
UCHIJAAAA	excore{1.4} [EXCore] (bin) 
UCHIJAAAA	armorsets{2.0} [Armor Sets] (bin) 
UCHIJAAAA	examplemod{1.0} [examplemod] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.4.13084 Compatibility Profile Context 14.301.1001.0' Renderer: 'AMD Radeon HD 8570D'
Launched Version: 1.8.9
LWJGL: 2.9.4
OpenGL: AMD Radeon HD 8570D GL version 4.4.13084 Compatibility Profile Context 14.301.1001.0, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

Using VBOs: No
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x AMD A8-6600K APU with Radeon(tm) HD Graphics 
[17:34:58] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: #@!@# Game crashed! Crash report saved to: #@!@# C:\my\mcmodding\mods\Armor-Sets\1.8.9\run\.\crash-reports\crash-2016-03-06_17.34.58-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed

 

I thought i don't have to fill methods in

IPerspectiveAwareModel

either.

Ok. But how can i offset

VertexFormat

, i don't see methods there.

You don't.

But then, how do i offset each item by +0.1 from previous item?

I heard somewhere, that it requires gl calls and core mods. Sigh.

You can probably make it work somehow, but that is over my head.

Ok. I'll look into it when i'll fix everything else.

Link to comment
Share on other sites

I already did that, and it crashed.

Show your code.

gist updated

https://gist.github.com/elix-x/8a0f8ac9f61fea0830a6

I already did that, and it crashed.

Show your code.

But then, how do i offset each item by +0.1 from previous item?

When baking the models you have to supply an IModelState. A possibility here is a TRSRTransformation which allows you to apply any transformation matrix you would like to the model before it's baked.

MultiModel.Baked

(what you told me to use) requires

VertexFormat

.

Should i use

MultiModel.bake

instead? Where should i take all the arguments?

Link to comment
Share on other sites

Right, right.

I have consulted fry the rendering god on IRC (he made basically all this model stuff). The fix for this is that you need to transform the baked quads in the baked models manually.

So:

 

- Create new lists (ImmutableList.Builder) for general quads and face quads (for each of EnumFacing.values()).

- Pipe all general / face quads from the models you want to combine into their respective lists and in that process transform them using this (courtesy of fry). That will apply a matrix to them.

- Return a new baked model (not multi model anymore) built from those lists.

 

This is not as pretty, but it's the only way to fix your problem.

Thanks. Wow. This is not looking easy. But i'll try.

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.
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

    • I am following a tutorial for modding minecraft 1.20.1, and while running the mod with the minecraft of the idea, no errors was present but, when I switched to real minecraft, it started to want a default constructor "public ZeroToAutomation()" instead of the one recomended by the video "public ZeroToAutomation(FMLJavaModLoadingContext context) {...}", and I can't use the default constructor because I need the FMLJavaModLoadingContext to register the blocks and items.   The problem is at: "net/myself/zerotoautomation/ZeroToAutomation.java" the file contains the default constructor, "Logger"s, and the code for the mod the defaut constructor was added after an error requesting it the Loggers was used to see which methods/constructors was used by the Launcher   things that I tried to fix the issue: remove the default constructor, but an error appeared "net.myself.zerotoautomation.ZeroToAutomation.<init>()", and nothing else on the class runs adding an "public static void init()" method, but it changed nothing   The mod files: https://github.com/Matwaua/Zero_To_Automation/tree/not-finished
    • It is an issue/conflict with distanthorizons
    • I have been trying to combat this issue between oculus and embeddium and to no avail... I have already tried a few online tutorials on how to get this working but it doesn't work at all. https://pastebin.com/geQgifjc
    • wow you sound like fun to play with
    • Instale el mod en mi servidor y este se queda iniciando por horas, en la consola me habla de algo de permisos y trate de seguir la ruta que me da pero no existe.   [13:05:32 INFO]: CustomNPC Permissions available: [13:05:32 INFO]: customnpcs.edit.blocks [13:05:32 INFO]: customnpcs.edit.villager [13:05:32 INFO]: customnpcs.global.bank [13:05:32 INFO]: customnpcs.global.dialog [13:05:32 INFO]: customnpcs.global.faction [13:05:32 INFO]: customnpcs.global.linked [13:05:32 INFO]: customnpcs.global.naturalspawn [13:05:32 INFO]: customnpcs.global.playerdata [13:05:32 INFO]: customnpcs.global.quest [13:05:32 INFO]: customnpcs.global.recipe [13:05:32 INFO]: customnpcs.global.transport [13:05:32 INFO]: customnpcs.npc.advanced [13:05:32 INFO]: customnpcs.npc.ai [13:05:32 INFO]: customnpcs.npc.clone [13:05:32 INFO]: customnpcs.npc.create [13:05:32 INFO]: customnpcs.npc.delete [13:05:32 INFO]: customnpcs.npc.display [13:05:32 INFO]: customnpcs.npc.freeze [13:05:32 INFO]: customnpcs.npc.gui [13:05:32 INFO]: customnpcs.npc.inventory [13:05:32 INFO]: customnpcs.npc.reset [13:05:32 INFO]: customnpcs.npc.stats [13:05:32 INFO]: customnpcs.scenes [13:05:32 INFO]: customnpcs.soulstone.all [13:05:32 INFO]: customnpcs.spawner.create [13:05:32 INFO]: customnpcs.spawner.mob [13:05:32 INFO]: customnpcs.tool.mounter [13:05:32 INFO]: customnpcs.tool.nbtbook [13:05:32 INFO]: customnpcs.tool.pather [13:05:32 INFO]: customnpcs.tool.scripter
  • Topics

×
×
  • Create New...

Important Information

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