1

Testing for a chest help

EnderCat17's Avatar EnderCat1710/13/15 12:41 am
11/11/2015 9:26 am
EnderCat17's Avatar EnderCat17
so i am trying make a custom crafting recipe but i was wondering if there was anyway to look if there is a named chest (or in my case a dispenser) with items in it?

thanks ~ EnderCat
Posted by EnderCat17's Avatar
EnderCat17
Level 13 : Journeyman Dragon
15

Create an account or sign in to comment.

14

1
11/11/2015 9:26 am
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
bump
1
11/10/2015 1:16 pm
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
bump
1
11/08/2015 9:53 am
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
hey guys i got the crafting working but if there is more then one in the world it makes it so all of them get what comes out of it (i am useing /blockdata to do it) please help
1
11/06/2015 5:55 pm
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
is there any way to make a spawn egg that will kill that armor stand but ONLY that armor stand? (p.s. it will work if i can put a enchented item in the crafting table named remove and if that works i will do it)

Edit:oh and btw how do you do /replace item on that dispenser? and can you have more then one crafting table and have it work?
1
11/06/2015 12:23 pm
Level 19 : Journeyman Engineer
DoYouEvenTriangle
DoYouEvenTriangle's Avatar
Yea forsure
/scoreboard players add @e[type=Item] dropped 1 {Item:{id:"minecraft:crafting_table"},OnGround:1b}

/execute @e[score_dropped_min=1] ~ ~ ~ /setblock ~ ~ ~ dispenser 1

/execute @e[score_dropped_min=1] ~ ~ ~ /blockdata ~ ~ ~ {CustomName:hi}

/kill @e[score_dropped_min=1]
1
11/05/2015 11:44 pm
Level 19 : Journeyman Engineer
DoYouEvenTriangle
DoYouEvenTriangle's Avatar
EnderCat17so i am trying make a custom crafting recipe but i was wondering if there was anyway to look if there is a named chest (or in my case a dispenser) with items in it?

thanks ~ EnderCat


Yea in this case I'd use a invisible Armor stand to check for items. I'm going to guess you already have the way you add your custom crafting machine into the world, also I'm sure you want to check for specific items instead of any item.

So using this code
/summon ArmorStand ~ ~ ~ {CustomName:customcraft,Invisible:1,Marker:1,Invulnerable:1,NoGravity:1}

/execute @e[name=customcraft] ~ ~-1 ~ detect ~ ~ ~ /testforblock ~ ~ ~ dispenser -1 {Items:[{id:minecraft:stick,Damage:0s,Slot:0b,Count:1b}]}
the best way to get this code is by placing a command block over the dispenser with this code /blockdata ~ ~-1 ~ {} then copy all the code place in the testforblock data spot
1
11/05/2015 7:55 pm
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
anyone know how to set a block at a dropped crafting table?
1
11/05/2015 11:56 pm
Level 19 : Journeyman Engineer
DoYouEvenTriangle
DoYouEvenTriangle's Avatar
add a scoreboard dummy,
scoreboard objectives add dropped dummy

/scoreboard players add @e[type=Item] dropped 1 {Item:{id:"minecraft:crafting_table"},OnGround:1b}

/execute @e[score_dropped_min=1] ~ ~ ~ /setblock ~ ~ ~ bedrock

/kill @e[score_dropped_min=1]
1
11/06/2015 11:45 am
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
thank you so much but is there anyway to change that bedrock into a named dispenser facing up?
1
10/18/2015 1:15 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
Yeah, there is no way to automatically check throughout the whole world. The best you could do would be to spawn an invisible armor stand or something wherever a player puts down one of the dispensers (How you detect that is up to you really). That way you could execute a testforblock on all the armor stands.
1
10/17/2015 11:50 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
eeehm no...
the only way to do that is to use
/execute @a ~ ~ ~ detect <block> <subid> <command>
there is no datatag part included in that command, so you won't be able to test for items
1
10/14/2015 11:14 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
You can /testforblock a dropper with items using the 'Items' tag:testforblock x y z dropper -1 {Items:[{id:"<first item name here>",Slot:<slot number here>},{<same formatting as the first item>}]}
To add more items, just add more sets of {} inside the square brackets, and put and id and slot number in for each one. id's should be surrounded by quotes and have 'minecraft:' in front of them (i.e. "minecraft:stone"). Slot numbering starts at 0, and I'm not sure exactly what order they go up from there. I'd assume they start in the bottom left, then go up going to the right, and then jump to the next row up. You may have to play around a bit if I'm wrong.
1
10/17/2015 11:38 am
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
i have done this but i was wondering if there was a way to look through the WHOLE world for it (btw the slots start from right top)
1
10/17/2015 11:51 am
Level 18 : Journeyman Mage
ZachDevv
ZachDevv's Avatar
You could always set up a line of command blocks checking throughout a big area (individually) for that chest and stuff. Not sure, not that good with redstone.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome