1

Command Block Help ll /testfor Help

GamingPotato44's Avatar GamingPotato447/22/16 11:38 pm
1 emeralds 165
Hi,

I am working on a map (using adventure mode) where you can place and pick up lava and I'm using these commands to change the normal buckets/lava buckets to ones that can be placed:

/testfor @a[r=1000] {Inventory:[{Slot:0b,id:"minecraft:­bucket"}]}

/replaceitem entity @a[r=1000] slot.hotbar.0 bucket {CanPlaceOn:["minecraft:lava"]}

and

/testfor @a[r=1000] {Inventory:[{Slot:0b,id:"minecraft:­lava_bucket"}]}

/replaceitem entity @a[r=1000] slot.hotbar.0 lava_bucket {CanPlaceOn:["minecraft:sandstone"]}

The problem is that it counts a bucket that already has a NBT tag so sometimes if you accidentally pick it up place it as the replacement is happening you lose or duplicate the lava. I tried slowing it down so this would happen less often but then it takes to long to update the items. So I was wondering if there was a way to specifically test for a block WITHOUT NBT tags. Also, I was wondering if there was a way to - for the second command - replace the item specifically for the player the /testfor command found.

Thank you for your help
-TheGamingPotato
Posted by GamingPotato44's Avatar
GamingPotato44
Level 1 : New Miner
0

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome