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

[1.7.2]How much memory do tileEntityies really use?


Recommended Posts

I will start with this: I know next to nothing about memory usage in java, other than tile entities use more memory than blocks which aren't even actual instances of an object, but just an id for each location. I need a way of getting the locations of all my blocks, in only a certain world.  What would be the best way of doing this, making tile entities for each block, or having a list of a new object that stores a world and coordinates?

Link to post
Share on other sites

The most important thing about TileEntities is that not that they take more memory (of course, yes they do, I'll get to that later), but that they are ticking every single game tick, which can really affect the TPS when you're having a lot of them around. You can disable that though by setting

canUpdate

in your TileEntity class to false.

 

Now to the memory aspect, it depends™. On a 64 bit VM it will take for example more memory, than on a 32 bit VM. You can google "Java determine size of object", and you will find that this is not an easy task to do.

 

Should you use TileEntities? I say yes, but again, it depends on how many of your block will actually be in the world.

Link to post
Share on other sites

The most important thing about TileEntities is that not that they take more memory (of course, yes they do, I'll get to that later), but that they are ticking every single game tick, which can really affect the TPS when you're having a lot of them around. You can disable that though by setting

canUpdate

in your TileEntity class to false.

 

That's a really useful tip actually.  I can see a lot of uses of non-updating (or selectively updating) tile entities.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to post
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.

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.