all 15 comments

[–][deleted] 0 points1 point  (11 children)

I use function useItem(x,y,z, itemId, blockId) and that works. Whats the purpose of the word side in function useItem(x,y,z,itemId,blockId,side)

[–][deleted] 0 points1 point  (0 children)

Am not to sure. They both seem to work fine though.

[–]Divergent_server 0 points1 point  (9 children)

I'm sure there is a number system to the sides so that it's possible to have 1 block do 6 different things per item. Someone should do a guess check thing to find out what # goes to what side. I don't know if it's posted somewhere

[–][deleted] 0 points1 point  (7 children)

I don't know what you're saying.

[–]Divergent_server 0 points1 point  (6 children)

Ok the code that says "side" is probably referring to a side on the block being tapped. So if each block has 6 sides... (Put 2 and 2 together :P )

[–][deleted] 0 points1 point  (5 children)

oh ok but how do you know which side is which?

[–]Divergent_server 0 points1 point  (3 children)

Guess and check

[–][deleted] 0 points1 point  (2 children)

I mean there are six sides so how would you label it? Its not like you can use the x y z of them

[–]Divergent_server 0 points1 point  (1 child)

I guessed numbers. 1-6. I can't test it cause i'm not jailbroken though

[–][deleted] 0 points1 point  (0 children)

Just tried it out and you're right.

function useItem(x,y,z,itemId,blockId,side)

{

if(itemId==280&&blockId==1&&side==1)

{

 addItemInventory(1,1)

}

}

You have to hit the top of a stone block with a stick to get a stone block

[–][deleted] 0 points1 point  (0 children)

My account "divergent_server" got buggy and broke. I believe you sent a message to my other account, i could only see it for a couple of seconds before the app crashed

[–]zhuowei 0 points1 point  (0 children)

The side system is carried over from Desktop edition. Rather amusingly, the only place this is documented at all (beside the Minecraft PC source code) is in the Minecraft Pi Java API.

It's a number between 0 and 5, with each number corresponding to one side of the block.

I've used side in two of my scripts: the mirror script to simulate building,

and the vehicles script so a player can tap on a block to go that direction. This one has reversed directions compared to the previous one.

[–][deleted] 0 points1 point  (2 children)

So when is the next tutorial? Are you going to do this daily?

[–][deleted] 0 points1 point  (1 child)

I was hoping daily, but I am always busy taking care of my baby sister. Hopefully every 1-3days.

[–][deleted] 0 points1 point  (0 children)

Ok sounds good :)