1

Setblock Help

Frost770's Avatar Frost7704/24/15 4:55 pm
1 emeralds 235 4
4/29/2015 1:57 am
hokage3211's Avatar hokage3211
Hey, I'm trying to create a game where players can break certain blocks (that a command block will summon). So how can I make things so that once the player has broken them, and collect them, so that the blocks can only be placed on certain other blocks?

(In my case, set a block to red wool that can only be placed on orange glass, and set a block to blue wool that can only be placed on blue glass.)

Thanks!
Posted by Frost770's Avatar
Frost770
Level 1 : New Miner
2

Create an account or sign in to comment.

4

1
04/29/2015 1:57 am
Level 49 : Master Engineer
hokage3211
hokage3211's Avatar
You can try a set of four command blocks that does this:
sets the scoreboard value of a player when they have the specific color of wool that isn't name something special so it's traceable in their inventory (The blocks that are the ones to actually be placed down should be named something to differentiate them)
then when the player has that scoreboard, clear one of that wool from their inventory
then using the same scoreboard requirements, give them one of the special wool with the data tag for placing only on certain blocks
after that, simply have a command block that sets their scoreboard value back to 0

these should be run in quick succession in this order to quickly take and give the wool from the player.

I hope this idea at least helps, or you can do what jmal said and use entitydata on any item that is the dropped wool and give it the data tag for only being placed on certain types of blocks.
1
04/24/2015 7:21 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
Both of the above issues are true. As well, normal blocks (like wool) lose all data tags when placed in the world, so the player destroying them would simply give them a normal wool block.

The only real workaround I can think of would be to change the data of the block when the player has already destroyed the block, maybe you could target the item entity right as the block is destroyed with the /entitydata command. You'll also have to use something besides different colors of glass, since you can't target specific damage values with CanPlaceOn.
1
04/24/2015 5:25 pm
Level 32 : Artisan Architect
TheArchitect_95
TheArchitect_95's Avatar
I don't think it's possible to specify data values with the CanPlaceOn tag. Nor is the CanPlaceOn tag used with the setblock command.
1
04/24/2015 5:04 pm
Level 43 : Master Button Pusher
ClashAssassin
ClashAssassin's Avatar
im confused. Are you trying to say that you need help getting custom tile drops?
Click to reveal
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome