2

Does anyone know how I could change the drop of honeycomb_block with only command blocks? But not like that gives it to the nearest players and it would have to have NBT data:

obsidian{display:{Name:'{"extra":[{"bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"dark_green","text":"MEGA OBSIDIAN"}],"text":""}'},Enchantments:[{id:"minecraft:unbreaking",lvl:1s}]} 1

If anyone knows how, then please let me know, because I've been looking through YouTube and Google for ways or just tutorials.

2

1 Answer 1

2

Using a scoreboard, kill command, and item summoning/give command (I'll use a give command in this example), this is easily achievable.

First, create a scoreboard which detects when the player mines honeycomb.

scoreboard objectives add block_broken minecraft.mined:minecraft.honeycomb_block

Then, you need to kill the honeycomb block.

execute as @a[scores={block_broken=1..}] at @s run kill @e[limit=1,sort=nearest,type=item,nbt={Item:{id:"minecraft:honeycomb_block",Count:1b}}]

Next, give the player your item.

give @a[scores={block_broken=1..}] <your_item>

Finally, reset their scoreboard value

scoreboard players set @a[scores={block_broken=1..}] block_broken 0

However, this is quite painful to work with if you want to add more content or update to a newer version. I would recommend looking into datapacks or plugin/mod creation as they are faster, safer, and easier to work with than standard command blocks.

2
  • im gonna try this right now. thank you
    – lolmanjack
    Jun 25, 2023 at 20:17
  • My pleasure, lolmanjack! Please be sure to accept the answer if it satisfies your question. Jun 25, 2023 at 20:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .