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

[1.11] qetQuads "rand" & huge performance hit with custom model


Kander16
 Share

Recommended Posts

Hi,

 

I was wondering what the "long rand" parameter does in getQuads().

 

Also, I got the custom model working. I can render two models inside the block.

The only thing is: I'm getting a huge performance hit (when it's rendering the game is around 8 fps, and when it isn't rendering the game is around 45 fps).

Is this normal, And can this problem be solved when I'll use the guava's cache? Or am I probably doing something wrong?

 

Thanks.

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

22 minutes ago, Kander16 said:

I was wondering what the "long rand" parameter does in getQuads().

It is a random number based on the block coordinates the model is rendered at. This is used to choose when a single variant is bound to multiple models.

 

As for your performance issue, please post your code.

Link to comment
Share on other sites

I did the recalculations so that I could see changes directly when in debug client.

 

I changed the code to this: https://hastebin.com/lifudijeba.java.

It's working faster now, but I'm still getting quite a performance hit.

At the moment I'm testing with fixed models in the quads.

Edited by Kander16

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

Hmmmm, indeed. I had another block placed, and that could have been the cause.

When creating a new world and placing as many ripening racks as many as I can, it works just fine. I'll try to figure out why the other block makes it so slow.

Thanks!

Edited by Kander16

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

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