When setting up block tags for custom blocks, they don't work in game when using the appropriate tool. Blocks all break at the speed the "minecraft:destroy_time" component is set to.
When trying to break a block that uses the "stone tag", the block does not break when using the appropriate tool. If you were to make a wood block, using an axe would not break that custom block.
Linked issues
is duplicated by 3
Attachments
Comments 18
Steps to Reproduce:
1. Create a custom wood block using an ADDON and in the 'minecraft:components' add "tag:wood": {}
2. In the 'minecraft:components' make the 'minecraft:destroy_time' equal to 2 (the same as a vanilla log)
3. Create a new world and /give yourself the block
4. Place it next to a vanilla log
3. Use a Diamond Axe to break both of them
Observed Results:
The Diamond Axe breaks the vanilla block at the expected speed but the custom wood block breaks at the same speed as if you were punching it with your fist.
Expected Results:
The Diamond Axe item should break all blocks tagged with the 'wood' tag at the same speed because inside its destroy_speeds it says that all blocks tagged with 'plant', 'wood', or 'pumpkin' would take the same amount of time.
[media]
1.19.62 it seems like the tags are half working.
If a custom block has "seconds_to_destroy" set to 15 and has "tag:iron_pick_diggable".
Vanilla iron pickaxe will take 15 seconds to break
Fist and incorrect tools take 15 seconds to break
Custom tool searching for tag "iron_pick_diggable" with speed set to 6 will break block in 4 seconds
Custom tool searching for tag "iron_pick_diggable" with speed set to 24 will break block in just under 1 seconds.
This approximately matches breaking iron_ore with the speed set to 6.
If the block has a tag searched for, then the block breaks at an increased rate (not the correct rate based on break time and tool speed).
I believe the issue is related to the break time calculation for custom blocks with tags and not tags not applying entirely.
I hope the above info helps to diagnose the problem so that we can just use a single speed calculation and not have to handle vanilla and custom blocks differently.
as for me, it still doesn't work, and besides, I don't know if it wouldn't be better to specify what tool should be used to destroy a given block or add this and that, i.e. tags for the block and the type of tool with which such a block should be destroyed
What they could do to fix this, is to make a new component for blocks, which could be called minecraft:on_player_destroying which could be similar to minecraft:on_player_placing.
Because, if you were to make an event, then do a sequence and then do a condition like query.get_equipped_item_name == 'diamond_pickaxe'. You could make it to where once it's being destroyed you could change the property of the block from true to false or so. Then you could just use permutations in order to detect if the property of the block is true or false. Then, you could change the block's mining speed using the component minecraft:destructible_by_mining. Now I feel like this could work as a temporary solution, for Mojang to add. While they actually fix the main issue.
Here's an example of what this could look like if it were ever added:
[media]Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – Feature Requests and Suggestions
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response
Is this still an issue in the latest version? If so, can you please add it to the affected versions (or mention it if you are not the reporter).
Also, just a reminder, to make your bug report as effective as possible, please try and include the following steps to reproduce the problem:
If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki