DISCLAMER: I'm new to Minecraft modding and Java, but I have some general understanding of programming and I've used Python and Lua before.
• What I've done till now:
- registered the block
- added textures to the block
- added a relevant item for when dropped
• Having problems with:
- making the block drop an item when broken, with a certain tool and tier
• Code:
public static final RegistryObject<Block> SOME_ORE = BLOCKS.register("some_ore", () -> new OreBlock(BlockBehaviour.Properties.copy(Blocks.IRON_ORE)));
• JSON:
- resources/data/somemod/loot_tables/blocks/some_ore.json
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "somemod:some_ore"
}
]
}
]
}
- resources/data/somemod/tags/blocks/needs_stone_tool.json
{
"replace": false,
"values": [
"somemod:some_ore"
]
}
- resources/data/somemod/tags/blocks/mineable/pickaxe.json
{
"replace": false,
"values": [
"somemod:some_ore"
]
}
• Description:
When the block is placed and I start hitting it with whatever, (doesn't matter, even if you have efficiency 5 diamond pick and haste 255) is always with the same speed and when broken it doesn't drop the relative item.
Forge version: 1.18.1-39.0.5