Moving blocks
#11
Quote:If not, how about faking it through tile entities, like falling sand and gravel do? Convert the block into a tile entity, move that entity smoothly across, then convert it back into a block.

Hi again, it's me again, your beloved (hopefully) crazy assholeBig Grin
Xoft or anyone else in close relationship with blocks code in MCS, could you please explain to me what Tile Entity (minecraft term) capabilities are, protocol-wise? Like, what they can do? Can I set one to be at specified floating point coordinates, and have certain floating point speed?

Also, I'd like a wild guess on if minecraft client would freak out and shoot itself on spot, if I were to send to him, that there's a tile entity and it's a cobblestone.

In general, what's the process of initiating a tile entity on client by server's sent packet? Is it even there, doesn't client decides that those few blocks should now be a tile entities?

---------

You might have seen a PistonRock. So, what about lifting a whole area with a power of diamonds?Big Grin
Here, have a look: http://www.twitch.tv/taugeshtu/c/3599145
There are few bugs here and there (mostly related to setting blocks correctly on server side when lifting a pile of blocks), some are dealt with (client didn't saw correct block meta in some cases when using interblock-existing piston)

Ideally, I'd like to make a library for making block areas smoothly with vanilla client, probably even rotate them (with some approximation, of course), and then integrate it into Handy. Might come handy for all those hothead plugin writers around. But that's a distant. For now I'd like to move really big areas smoothly along one line, preferably continiously.
Reply
Thanks given by:
#12
Tile entities (or block entities as called by MCServer) are blocks with extra data within them like chests or note blocks. In vanilla minecraft you can't move them, so I have no idea how the client would respond to it.
I also have no idea what would happen if you would send a block entity to the client but it's a cobblestone block. I don't even know if it is possible.

The client does not decide if a block is an tile entity. The server decides it and then sends it to the client. You can see this when you use cBlockArea to place a chest. When placed you can't open the chest because cBlockArea doesn't support tile entities yet.

(Please correct me if I'm wrong.)
Reply
Thanks given by:
#13
What STR says is very right.

For MCS, tile entities are basically just entries in a list that are associated with the coordinates of a block that have extra data (i.e. contents, right click handlers, etc.) I'm fairly certain you can't 'send' a cobblestone tile entity - you can either update a client side tile entity via a packet (like a mob spawner's spinning mob type / command block text), or do special things with other packets (open a window for a chest). Internally to MCS, you can absolutely assign cobblestone to be a block entity that acts like a chest or whatever, the client doesn't care.

If you want to make any type of block move, you probably need to make a FallingSand entity, and assign it's blocktype and blockmeta to be what you want. As far as I know, block entities still can't move, they just store extra data.

For the PISTON_MOVING block, it stores a blocktype and meta, position and progress that animates a moving block. However, the client doesn't animate things that can't be moved (like a chest or furnace). I believe these things can't be moved because then the entry in the block entities list would become disassociated with the actual block in the world, and thus would be leaked.

(Correct me if I am mistaken too, I am very unsure of myself :P)

PS: Thank you, Taugeshtu, for using Windows 8 :)
Reply
Thanks given by:
#14
Well, looks like interblock pistons are the safest bet here. Jeez, minecraft's engine is so rigid...
It should be possile to temporaly replace blockEntities with regular blocks and then restore all their states back to normal. What I'm worried about is that I might not be able to move more than 15 blocks in one tick, I might have to push up the top bit first.... This would be annoying.

PS: What's so special about using Win 8? O_o
Reply
Thanks given by:
#15
Hmm.

Windows 8? Oh, its just that people are either using XP, 7, or Linux. I thought for a moment that I was the only one in the entire world who used itTongue
Reply
Thanks given by:
#16
Even HP is moving back from Win8 to Win7 in its new computersTongue
http://www.tomshardware.com/preview/prev...f8dd54b500
Reply
Thanks given by:
#17
Yes!Big Grin
Reply
Thanks given by:
#18
Only a very small offering of Windows 7. Do you all seriously hate change that much Sad
Reply
Thanks given by:
#19
I also had Windows 8 I liked the interface, but I downgraded to Windows 7 because there was a process that kept using 50% of my CPU even though I have a quad core.
Reply
Thanks given by:
#20
I guess the experience is different for everyone. What process was it?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)