Jump to content

Recommended Posts

Posted

Hi,

 

I'm creating a block with 10 blockstates and the memory usage raises very fast.

I can't even completely start the program because the memory usage is too high.

I've noticed that the more blockStates I add into the "createBlockState()" method, the more memory usage I need.

 

My blockstates currently exists out of:

 

- 9 Enums

- 1 Boolean

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

 

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

Posted

I'm making a ripening rack, which can hold 8 cheese spots. Every cheese spot can have 12 different cheeses.

I currently have:

 

- 1 BlockState for the facings

- 1 BlockState for checking if a block is on top

- 8 BlockStates for each cheese spot (Which is done using enums).

 

I'm doing it using getActualState().

 

How could I make this to work?

Thanks.

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

 

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

Posted

Hey DIesieben07.

 

I found this information

TileEntitySpecialRenderer is often a better (simpler!) choice if the block is animated, or needs fancy rendering, for

  example like an animated chest, or the lettering on a sign.  You must give your block a TileEntity as well.

IBakedModel#getQuads is often a better (more realistic) choice if the block should have shaded lighting like a normal block,

  or if there are very many of the block and they don't need to store information (can calculate their state from adjacent

  blocks). For example - a chameleon block that changes its colour to match the colours of its neighbours

at https://raw.githubusercontent.com/TheGreyGhost/MinecraftByExample/master/src/main/java/minecraftbyexample/mbe04_block_dynamic_block_model1/Notes.txt.

 

When I started this thread, I didn't mention that I'm storing the information of my block in a TileEntity.

Does this change the situation? And can I still use the cache with the TESR?

If I would use the TESR: how can I render the json models?

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

 

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

Posted

Ok. So if I understand you correctly, the part I quoted is wrong in it's statement because "letters on a sign" are static and not animated?

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

 

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

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.