Jump to content

Tile Entity vs. Multiple Block sub classes and more block ID


spenny12369

Recommended Posts

I've recently been working on a mod which requires the creation of a fairly high amount of unique blocks. The small amount of block metadata has restricted me from simply multi blocking my problems away, as I have other data riding on the metadata. I was wondering if incorporating tile entities for the sole purpose of block differentiation ( i. e. I wouldn't be using most of the other features of tile entities ) would be effective, as I feel I am going to sponge up too many block ID's. Additionally, granted I know little about their performance, I fear the performance hit of using tile entities over blocks. Any feedback would be appreciated.

Link to comment
Share on other sites

  • 2 weeks later...

How will the tile entity itself be able differentiate which type of block it is? I have a multiblock mod of my own which uses metadata to determine the appropriate tile entity and, if I'm not mistaken, Minecraft uses metadata to determine texturing for anvils and ovens.

 

From my own experience, the performance hit of using a tile entity over a block isn't that large. If you're curious to test it, try replacing dirt or something with brewing stands or another tile entity in a test world.

Link to comment
Share on other sites

How will the tile entity itself be able differentiate which type of block it is?

it would simply use an int/enum field to identify what it is. this field would be setup by the item used to place the block containing this TE.

 

From my own experience, the performance hit of using a tile entity over a block isn't that large. If you're curious to test it, try replacing dirt or something with brewing stands or another tile entity in a test world.

Disk space needed to save a TE is considerably bigger than just the block itselft, but unless it's naturally occuring block you have nothing to worry about. Not sure about in-game performance though, MC synchronizes TEs server->client even when not forced to, it might get ugly with a lot of TEs, but I haven't really tested it (also it might have been just a bug caused by my mod).

mnn.getNativeLang() != English

If I helped you please click on 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.