Jump to content

[1.11] Game freezes for a while when chunk changes with my custom IBakedModel inside


Kander16

Recommended Posts

Hi,

 

I've made a custom IBakedModel, and for testing purposes I've placed around 30 of these blocks with the custom IBakedModel in 1 chunk.

Whenever I place / remove any block in the chunk or just change something inside the chunk, the game freezes for around a second and then continues with 60fps.

I think this is because getQuads is called many times at once (for each block). When around 10 blocks with custom IBakedModel are placed, I still don't have a lot of problems. But when I go above that, whenever I place or remove any block in that chunk, the game freezes for a while. The more blocks with custom IBakedModel there are placed, the longer the game freezes when adding or removing blocks.

 

Anyone that can help me with this?

 

Code:

 

RipeningRackModel: https://hastebin.com/jubohegora.java

RipeningRackBakedModel: https://hastebin.com/emaqolizuj.java

ModelHandler: https://hastebin.com/vedikamiku.java

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

Announcements



×
×
  • Create New...

Important Information

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