I'm migrating a script from 1.18 to 1.19 to set all the mining levels of sky stone blocks to diamond, which is a fairly simple program:
function modAE2BlockTags(event){
const skyStoneBlocks = [
"sky_stone_block", "smooth_sky_stone_block", "sky_stone_brick", "sky_stone_small_brick",
"sky_stone_chest", "smooth_sky_stone_chest", "sky_stone_tank", "sky_stone_stairs",
"smooth_sky_stone_stairs", "sky_stone_brick_stairs", "sky_stone_small_brick_stairs",
"sky_stone_wall", "smooth_sky_stone_wall", "sky_stone_brick_wall",
"sky_stone_small_brick_wall", "sky_stone_slab", "smooth_sky_stone_slab",
"sky_stone_brick_slab", "sky_stone_small_brick_slab"
];
skyStoneBlocks.forEach((e) => {
e = "ae2:" + e;
event.add('minecraft:needs_diamond_tool',e)
});
}
While the function does indeed add the right tag to all blocks, it seems that the tag isn't actually capable of modifying the mining level of the blocks, as both jade and a mining test tell me that it can still be mined with iron tools.
Do mining levels work differently in 1.19.2 or is it an issue with my code?