Confuzzled about Tile Entities

This forum is for anything that doesn't specifically have to do with Better Than Wolves
Post Reply
User avatar
SgtChuckle
Posts: 389
Joined: Thu Feb 23, 2012 12:55 pm

Confuzzled about Tile Entities

Post by SgtChuckle »

For a while now, I've thought I've known what a Tile Entity was. My understanding was that a TE was attached to any block that had "special properties" over that of normal blocks. One of the most common uses of a TE was to give a block a GUI, and another would be to give the block special redstone properties. But I've been reading some things about how FC didn't allow moulds to stay in crafting tables partly because that would require a TE to be attached to it, making crafting tables unpistonable like other TEs However, the furnace does have a TE. So that seems to break my "GUI rule". Also, I've seen builds that use a piston pushing a DB, meaning that it too has no TEs attached to it. Breaking my redstone rule. What in the flying french toast, then, causes a block to require TEs to perform functions? Is there some threshold of specialness? Help me understand >.<
Poppycocks wrote:Suggesting to hack the logo on all sides is akin to suggesting someone to take a crap out of a window if he doesn't like his toilet seat.
User avatar
Poppycocks
Posts: 825
Joined: Thu Dec 22, 2011 2:11 pm

Re: Confuzzled about Tile Entities

Post by Poppycocks »

Inventory.

Mostly.

Esentially it boils down to "Can I put all the extra data I need the block to store into 8 bits of metadata?". If yes, then it doesn't need an entity, if no, then using one might be the only way to do it.
Mason11987
Posts: 1159
Joined: Wed Jul 06, 2011 11:03 am

Re: Confuzzled about Tile Entities

Post by Mason11987 »

SgtChuckle wrote:For a while now, I've thought I've known what a Tile Entity was. My understanding was that a TE was attached to any block that had "special properties" over that of normal blocks. One of the most common uses of a TE was to give a block a GUI, and another would be to give the block special redstone properties. But I've been reading some things about how FC didn't allow moulds to stay in crafting tables partly because that would require a TE to be attached to it, making crafting tables unpistonable like other TEs However, the furnace does have a TE. So that seems to break my "GUI rule". Also, I've seen builds that use a piston pushing a DB, meaning that it too has no TEs attached to it. Breaking my redstone rule. What in the flying french toast, then, causes a block to require TEs to perform functions? Is there some threshold of specialness? Help me understand >.<
One way you can easily see the crafting table as something different then the furnace is in SMP. in SMP you can see what others place in the furnace, because it's actually stored there, you can't see other people crafting, since there isn't an actual inventory to the block.
User avatar
Eriottosan
Posts: 656
Joined: Sat Nov 26, 2011 8:27 am
Location: U.K.

Re: Confuzzled about Tile Entities

Post by Eriottosan »

Poppycocks wrote:Inventory.

Mostly.

Esentially it boils down to "Can I put all the extra data I need the block to store into 8 bits of metadata?". If yes, then it doesn't need an entity, if no, then using one might be the only way to do it.
That's pretty much it.

Regarding the OP:
SgtChuckle wrote:FC didn't allow moulds to stay in crafting tables partly because that would require a TE to be attached to it, making crafting tables unpistonable like other TEs
The crafting stuff is checked once stuff is added to the grid. And it's not stored once you leave (it all pops out), so the block doesn't need to remember what is in it.
SgtChuckle wrote:the furnace does have a TE
It remembers what you have in it, plus it has other stuff it has to remember such as how far along it is cooking wise.
SgtChuckle wrote:I've seen builds that use a piston pushing a DB
The DB doesn't store any data. It just sends out a pulse when something next to it changes.

Basically, imagine you have several A6 pieces of paper. You can write all your information for each piece of paper on each piece, right? Then you can move them around each other, one at a time, and don't have to remember what was where.
But say for one piece of paper, the information for it is more than the space available. So you place an extra piece of paper onto it with all your extra information. But that means if you move it, you have to move two bits of paper at the same time, which you can't do.
Result: You are a piston. You can move the single pieces of paper as they are normal blocks, but not the two on top of each other, as that is a block with a Tile Entity.

EDIT: Woah, I am in an odd mood today ...
私は日本語が大好きだ。だから、私と話すとき、日本語で書けば、日本語で書いてください。
I like Japanese, can you tell?
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Confuzzled about Tile Entities

Post by FlowerChild »

Poppycocks wrote:"Can I put all the extra data I need the block to store into 8 bits of metadata?"
4 bits actually :)

The other reason you'd want a Tile Entity is for reliable updates every tick, like with the Turntable.

But yes, it usually all comes down to the amount of data storage you need. A crafting table doesn't require one because nothing is stored in the actual block. It's just a chunk of wood that triggers an external crafting interface when clicked on.
User avatar
Poppycocks
Posts: 825
Joined: Thu Dec 22, 2011 2:11 pm

Re: Confuzzled about Tile Entities

Post by Poppycocks »

Well, I did feel a brain fart coming on when I was writing that :)
Post Reply