0

Take a look:

/scoreboard players set @e[type=Item] HPLDropped 4 {Item:{id:minecraft:cobblestone}}

This command gives Cobblestone HPLDropped 4

/execute @e[score_HPLDropped_min=4,score_HPLDropped=4] ~ ~ ~ detect ~ ~-1 ~ minecraft:crafting_table -1 summon ArmorStand ~ ~-1 ~ {Tags:["HPLAdvancedCrafting"],Small:1,Invisible:1,Invulnerable:1,NoGravity:1}

This command summons ArmorStand where is crafting with Cobblestone dropped on it's top. The problem is i want this ArmorStand to be summoned in THE MIDDLE of the crafting table not where cobblestone was dropped. Do anyone know how to "round" this coordinates so ArmorStand will be summoned in THE MIDDLE of block under cobblestone?

2

Item frames are entities you can /summon which snap to the coordinate plane. You could summon an ItemFrame with a tag or give it a scoreboard value/special name and summon the armorstand from that later in the same tick. I used a system similar to this when creating my "Shelves" one command block creation.

I'm assuming you want to delete the cobblestone after summoning the ArmorStand, otherwise you will summon another similar ArmorStand each tick, or 20th of a second.

Example

(Your first command works fine)

/execute @e[score_HPLDropped_min=4,score_HPLDropped=4] ~ ~ ~ detect ~ ~-1 ~ minecraft:crafting_table -1 summon ItemFrame ~ ~-1 ~ {Tags:["HPLAdvancedCrafting"]}

/execute @e[type=ItemFrame,tag=HPLAdvancedCrafting] ~ ~ ~ summon ArmorStand ~ ~-1 ~ {Tags:["HPLAdvancedCrafting"],Small:1,Invisible:1,Invulnerable:1,NoGravity:1}

/execute @e[type=ArmorStand,tag=HPLAdvancedCrafting] ~ ~ ~ kill @e[type=ItemFrame,tag=HPLAdvancedCrafting,c=1]

/execute @e[type=ArmorStand,tag=HPLAdvancedCrafting] ~ ~ ~ kill @e[type=Item,score_HPLDropped_min=4,score_HPLDropped=4,c=1]

You'll want to play around with placement of the ArmorStand to get it exactly where you want it, and may find the Marker tag useful, but this should work.

| improve this answer | |
  • No problem, happy to help! :) – rustphoenix Mar 22 '16 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.