Topic category: Help with Minecraft modding (Java Edition)
I'm making an ore that I want to have the same properties as diamond ore (an ruby ore), so all I'm going to change in the end is its the texture and dropped item.
I have already copied all the properties exactly as they are in diamond ore.
- Hardness: 3
- Resistance: 3
- Tool able to destroy: pickaxe
- Tool harvest level to break with drop: 2
- Requires the correct tool for drops?: true
I set that the drop would be based on the loot table and applied its interactions to Fortune and Silk Touch. I also created a procedure to drop the same amount of XP from diamond ore orbs after breaking the ore.
It worked, and I obtained an ore that works in the same way as diamond ore, but there is a small detail that is not identical. Although my ore will not drop the item if a pickaxe of harvest level 2 or lower isn't being used, like diamond, the game still allows the player to mine that block at the same speed as they would break another block, using the same pickaxe. For example, a wooden pickaxe, in addition to not dropping diamond ore, takes a long time to break it, as the game understands that that pickaxe does not have the appropriate requirements to mine that block. Breaking my ore with the wooden pickaxe doesn't drop the item, but it also doesn't slow down the breaking speed, and I mine the block at the same speed as if I were mining a suitable block (e.g. Coal Ore)
This sounds like a dumb issue, but I really couldn't find a specific answer to this after searching the internet for so long.
I fixed this using using vanilla tags
Harvest level 0 (wood): forge:needs_wood_tool
Harvest level 0* (gold): forge:needs_gold_tool
Harvest level 1 (stone): minecraft:needs_stone_tool
Harvest level 2 (iron): minecraft:needs_iron_tool
Harvest level 3 (diamond): minecraft:needs_diamond_tool
Harvest level 4 (netherite): forge:needs_netherite_tool