From 945f71ae3029b99c11ac85bc927fdcaeb33e0c42 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 28 Jan 2023 10:29:59 +0100 Subject: [PATCH] fixed some blocks not being mineable with the correct tools Closes #284 --- .../minecraft/tags/blocks/mineable/axe.json | 15 ++++++ .../tags/blocks/mineable/pickaxe.json | 51 +++++++++++++++---- .../naturesaura/data/BlockTagProvider.java | 7 +-- 3 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json new file mode 100644 index 00000000..9272e035 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -0,0 +1,15 @@ +{ + "values": [ + "naturesaura:ancient_stairs", + "naturesaura:offering_table", + "naturesaura:wood_stand", + "naturesaura:auto_crafter", + "naturesaura:ancient_bark", + "naturesaura:oak_generator", + "naturesaura:ancient_slab", + "naturesaura:ancient_log", + "naturesaura:ancient_planks", + "naturesaura:nether_wart_mushroom", + "naturesaura:flower_generator" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index a8d3ed08..4a80aebf 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -1,15 +1,46 @@ { "values": [ - "naturesaura:spring", - "naturesaura:aura_timer", - "naturesaura:animal_container", - "naturesaura:blast_furnace_booster", - "naturesaura:snow_creator", - "naturesaura:chorus_generator", - "naturesaura:nether_grass", - "naturesaura:gold_nether_brick", - "naturesaura:gold_brick", + "naturesaura:pickup_stopper", + "naturesaura:rf_converter", + "naturesaura:infused_slab", + "naturesaura:aura_detector", + "naturesaura:infused_stairs", + "naturesaura:infused_iron_block", "naturesaura:item_distributor", - "naturesaura:weather_changer" + "naturesaura:placer", + "naturesaura:infused_stone", + "naturesaura:gold_brick", + "naturesaura:generator_limit_remover", + "naturesaura:crushing_catalyst", + "naturesaura:chunk_loader", + "naturesaura:projectile_generator", + "naturesaura:furnace_heater", + "naturesaura:powder_placer", + "naturesaura:animal_generator", + "naturesaura:animal_container", + "naturesaura:weather_changer", + "naturesaura:firework_generator", + "naturesaura:aura_timer", + "naturesaura:hopper_upgrade", + "naturesaura:spring", + "naturesaura:blast_furnace_booster", + "naturesaura:infused_brick_stairs", + "naturesaura:chorus_generator", + "naturesaura:time_changer", + "naturesaura:moss_generator", + "naturesaura:conversion_catalyst", + "naturesaura:snow_creator", + "naturesaura:ender_crate", + "naturesaura:gold_nether_brick", + "naturesaura:nature_altar", + "naturesaura:tainted_gold_block", + "naturesaura:spawn_lamp", + "naturesaura:nether_grass", + "naturesaura:field_creator", + "naturesaura:grated_chute", + "naturesaura:infused_brick", + "naturesaura:infused_brick_slab", + "naturesaura:potion_generator", + "naturesaura:animal_spawner" ] } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/naturesaura/data/BlockTagProvider.java b/src/main/java/de/ellpeck/naturesaura/data/BlockTagProvider.java index 906348ef..791f0d10 100644 --- a/src/main/java/de/ellpeck/naturesaura/data/BlockTagProvider.java +++ b/src/main/java/de/ellpeck/naturesaura/data/BlockTagProvider.java @@ -43,11 +43,8 @@ public class BlockTagProvider extends BlockTagsProvider { for (var item : ModRegistry.ALL_ITEMS) { if (!(item instanceof Block b)) continue; - var state = b.defaultBlockState(); - if (!state.requiresCorrectToolForDrops()) - continue; - var material = state.getMaterial(); - if (material == Material.STONE) { + var material = b.defaultBlockState().getMaterial(); + if (material == Material.STONE || material == Material.METAL) { this.tag(BlockTags.MINEABLE_WITH_PICKAXE).add(b); } else if (material == Material.WOOD) { this.tag(BlockTags.MINEABLE_WITH_AXE).add(b);