diff --git a/src/generated/resources/assets/anvilcraft/lang/en_ud.json b/src/generated/resources/assets/anvilcraft/lang/en_ud.json index c4e56c32f..979bdd50d 100644 --- a/src/generated/resources/assets/anvilcraft/lang/en_ud.json +++ b/src/generated/resources/assets/anvilcraft/lang/en_ud.json @@ -569,19 +569,30 @@ "tooltip.anvilcraft.item.cursed_gold_block": "pǝsɹnɔ ǝq ןןıʍ sɹǝıɹɹɐƆ", "tooltip.anvilcraft.item.cursed_gold_ingot": "pǝsɹnɔ ǝq ןןıʍ sɹǝıɹɹɐƆ", "tooltip.anvilcraft.item.cursed_gold_nugget": "pǝsɹnɔ ǝq ןןıʍ sɹǝıɹɹɐƆ", + "tooltip.anvilcraft.item.cut_ember_metal_block": "ɟooɹd ɹǝɥʇıM", + "tooltip.anvilcraft.item.cut_ember_metal_pillar": "ɟooɹd ɹǝɥʇıM", + "tooltip.anvilcraft.item.cut_ember_metal_slab": "ɟooɹd ɹǝɥʇıM", + "tooltip.anvilcraft.item.cut_ember_metal_stairs": "ɟooɹd ɹǝɥʇıM", "tooltip.anvilcraft.item.cut_heavy_iron_block": "ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.cut_heavy_iron_slab": "ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.cut_heavy_iron_stairs": "ɟooɹd uoısoןdxƎ", - "tooltip.anvilcraft.item.cut_royal_steel_block": "ɟooɹd ɹǝdǝǝɹƆ", - "tooltip.anvilcraft.item.cut_royal_steel_slab": "ɟooɹd ɹǝdǝǝɹƆ", - "tooltip.anvilcraft.item.cut_royal_steel_stairs": "ɟooɹd ɹǝdǝǝɹƆ", + "tooltip.anvilcraft.item.cut_royal_steel_block": "ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.cut_royal_steel_slab": "ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.cut_royal_steel_stairs": "ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.ember_anvil": "ɟooɹd ɹǝɥʇıM", + "tooltip.anvilcraft.item.ember_grindstone": "ɟooɹd ɹǝɥʇıM", + "tooltip.anvilcraft.item.ember_metal_block": "ɟooɹd ɹǝɥʇıM", + "tooltip.anvilcraft.item.ember_smithing_table": "ɟooɹd ɹǝɥʇıM", "tooltip.anvilcraft.item.ferrite_core_magnet_block": "sǝbɹɐɥɔ ǝʇɐɹǝuǝb oʇ sʞɔoןq ɹǝddoɔ ʇuǝɔɐظpɐ sǝsnɐɔ 'uoʇsıd ǝɥʇ ʎq pǝןןnd puɐ pǝɥsnd uǝɥʍ 'ʍoןǝq ןıʌuɐ ǝɥʇ buıʇɔɐɹʇʇⱯ", "tooltip.anvilcraft.item.geode": "ʇı buısn uǝɥʍ ǝpoǝ⅁ ʇsʎɥʇǝɯⱯ buıpunoɹɹns ǝɥʇ puıℲ", "tooltip.anvilcraft.item.heater": "Mʞ 9Ɩ sǝɯnsuoɔ 'ǝʌoqɐ ʞɔoןq ǝɥʇ buıʇɐǝH", "tooltip.anvilcraft.item.heavy_iron_beam": "ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.heavy_iron_block": "ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.heavy_iron_column": "ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.heavy_iron_door": "ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.heavy_iron_plate": "ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.heavy_iron_trapdoor": "ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.heavy_iron_wall": "ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.hollow_magnet_block": "sǝbɹɐɥɔ ǝʇɐɹǝuǝb oʇ sʞɔoןq ɹǝddoɔ ʇuǝɔɐظpɐ sǝsnɐɔ 'uoʇsıd ǝɥʇ ʎq pǝןןnd puɐ pǝɥsnd uǝɥʍ 'ʍoןǝq ןıʌuɐ ǝɥʇ buıʇɔɐɹʇʇⱯ", "tooltip.anvilcraft.item.induction_light": "Mʞ Ɩ sǝɯnsuoɔ 'ɥʇʍoɹb doɹɔ ǝzʎןɐʇɐƆ", "tooltip.anvilcraft.item.item_collector": "Mʞ0ϛƖ oʇ Mʞ0Ɛ ɯoɹɟ 'buıןooɔ puɐ ǝbuɐɹ uo pǝsɐq uoıʇdɯnsuoɔ ɹǝʍod ʇsnظpⱯ", @@ -600,10 +611,10 @@ "tooltip.anvilcraft.item.resin_block": "ʎʇıʇuƎbuıʌıꞀ sǝɹnʇɐǝɹɔ ǝןıʇsoɥ ʞɐǝʍ ɹo ʎןpuǝıɹɟ ǝɹnʇdɐɔ oʇ ǝs∩", "tooltip.anvilcraft.item.royal_anvil": "ʎʇıןıqıʇɐdɯoɔ ןnɟɹǝʍod puɐ ǝןqɐʞɐǝɹqu∩", "tooltip.anvilcraft.item.royal_anvil_hammer": "ǝɔɐɯ ɐ puɐ 'sǝןbbob 'ɥɔuǝɹʍ ɐ 'ןıʌuɐ uɐ 'ɹǝɯɯɐɥ ɐ s,ʇI", - "tooltip.anvilcraft.item.royal_grindstone": "buıɥsıunԀ puɐ sǝsɹnƆ buıʇɐuıɯıןƎ 'ɟooɹd ɹǝdǝǝɹƆ", - "tooltip.anvilcraft.item.royal_smithing_table": "ǝʇɐןdɯǝ⟘ buıɥʇıɯS ɹnoʎ buıʌɐS 'ɟooɹd ɹǝdǝǝɹƆ", - "tooltip.anvilcraft.item.royal_steel_block": "ɟooɹd ɹǝdǝǝɹƆ", - "tooltip.anvilcraft.item.smooth_royal_steel_block": "ɟooɹd ɹǝdǝǝɹƆ", + "tooltip.anvilcraft.item.royal_grindstone": "buıɥsıunԀ puɐ sǝsɹnƆ buıʇɐuıɯıןƎ 'ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.royal_smithing_table": "ǝʇɐןdɯǝ⟘ buıɥʇıɯS ɹnoʎ buıʌɐS 'ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.royal_steel_block": "ɟooɹd uoısoןdxƎ", + "tooltip.anvilcraft.item.smooth_royal_steel_block": "ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.structure_tool.click_to_copy": "ʎdoɔ oʇ ʞɔıןƆ", "tooltip.anvilcraft.item.structure_tool.data_removed": "pǝʌoɯǝᴚ ǝɹnʇɔnɹʇS", "tooltip.anvilcraft.item.structure_tool.max_pos": "%d :z '%d :ʎ '%d :x :xɐW", @@ -611,7 +622,7 @@ "tooltip.anvilcraft.item.structure_tool.must_cube": "ǝqnɔ ɐ ǝq ʇsnɯ ɐǝɹɐ pǝʇɔǝןǝs ǝɥ⟘", "tooltip.anvilcraft.item.structure_tool.must_odd": "ϛƖ pǝǝɔxǝ ʇouuɐɔ puɐ ppo ǝq ʇsnɯ ɐǝɹɐ pǝʇɔǝןǝs ǝɥʇ ɟo ɥʇbuǝן ǝpıs ǝɥ⟘", "tooltip.anvilcraft.item.structure_tool.size": "%d :z '%d :ʎ '%d :x :ǝzıS", - "tooltip.anvilcraft.item.tempering_glass": "ʇɔǝןןoɔ uo pǝɹınbǝɹ sןooʇ oN 'ɟooɹd ɹǝdǝǝɹƆ", + "tooltip.anvilcraft.item.tempering_glass": "ʇɔǝןןoɔ uo pǝɹınbǝɹ sןooʇ oN 'ɟooɹd uoısoןdxƎ", "tooltip.anvilcraft.item.topaz": "buıuʇɥbıן ɟo ɹǝʍod ǝɥʇ buıuıɐʇuoƆ", "tooltip.anvilcraft.item.transmission_pole": "8 ɟo ɥʇbuǝן uoıssıɯsuɐɹʇ ɐ ɥʇıʍ pıɹb ɹǝʍod ɐ pןınᗺ", "tooltip.anvilcraft.jade.power_information": "Mʞ %d/%d :pıɹ⅁ ɹǝʍoԀ", diff --git a/src/generated/resources/assets/anvilcraft/lang/en_us.json b/src/generated/resources/assets/anvilcraft/lang/en_us.json index 14981e115..9f0ad5852 100644 --- a/src/generated/resources/assets/anvilcraft/lang/en_us.json +++ b/src/generated/resources/assets/anvilcraft/lang/en_us.json @@ -569,19 +569,30 @@ "tooltip.anvilcraft.item.cursed_gold_block": "Carriers will be cursed", "tooltip.anvilcraft.item.cursed_gold_ingot": "Carriers will be cursed", "tooltip.anvilcraft.item.cursed_gold_nugget": "Carriers will be cursed", + "tooltip.anvilcraft.item.cut_ember_metal_block": "Wither proof", + "tooltip.anvilcraft.item.cut_ember_metal_pillar": "Wither proof", + "tooltip.anvilcraft.item.cut_ember_metal_slab": "Wither proof", + "tooltip.anvilcraft.item.cut_ember_metal_stairs": "Wither proof", "tooltip.anvilcraft.item.cut_heavy_iron_block": "Explosion proof", "tooltip.anvilcraft.item.cut_heavy_iron_slab": "Explosion proof", "tooltip.anvilcraft.item.cut_heavy_iron_stairs": "Explosion proof", - "tooltip.anvilcraft.item.cut_royal_steel_block": "Creeper proof", - "tooltip.anvilcraft.item.cut_royal_steel_slab": "Creeper proof", - "tooltip.anvilcraft.item.cut_royal_steel_stairs": "Creeper proof", + "tooltip.anvilcraft.item.cut_royal_steel_block": "Explosion proof", + "tooltip.anvilcraft.item.cut_royal_steel_slab": "Explosion proof", + "tooltip.anvilcraft.item.cut_royal_steel_stairs": "Explosion proof", + "tooltip.anvilcraft.item.ember_anvil": "Wither proof", + "tooltip.anvilcraft.item.ember_grindstone": "Wither proof", + "tooltip.anvilcraft.item.ember_metal_block": "Wither proof", + "tooltip.anvilcraft.item.ember_smithing_table": "Wither proof", "tooltip.anvilcraft.item.ferrite_core_magnet_block": "Attracting the anvil below, when pushed and pulled by the piston, causes adjacent copper blocks to generate charges", "tooltip.anvilcraft.item.geode": "Find the surrounding Amethyst Geode when using it", "tooltip.anvilcraft.item.heater": "Heating the block above, consumes 16 kW", "tooltip.anvilcraft.item.heavy_iron_beam": "Explosion proof", "tooltip.anvilcraft.item.heavy_iron_block": "Explosion proof", "tooltip.anvilcraft.item.heavy_iron_column": "Explosion proof", + "tooltip.anvilcraft.item.heavy_iron_door": "Explosion proof", "tooltip.anvilcraft.item.heavy_iron_plate": "Explosion proof", + "tooltip.anvilcraft.item.heavy_iron_trapdoor": "Explosion proof", + "tooltip.anvilcraft.item.heavy_iron_wall": "Explosion proof", "tooltip.anvilcraft.item.hollow_magnet_block": "Attracting the anvil below, when pushed and pulled by the piston, causes adjacent copper blocks to generate charges", "tooltip.anvilcraft.item.induction_light": "Catalyze crop growth, consumes 1 kW", "tooltip.anvilcraft.item.item_collector": "Adjust power consumption based on range and cooling, from 30kW to 150kW", @@ -600,10 +611,10 @@ "tooltip.anvilcraft.item.resin_block": "Use to capture friendly or weak hostile creatures LivingEntity", "tooltip.anvilcraft.item.royal_anvil": "Unbreakable and powerful compatibility", "tooltip.anvilcraft.item.royal_anvil_hammer": "It's a hammer, an anvil, a wrench, goggles, and a mace", - "tooltip.anvilcraft.item.royal_grindstone": "Creeper proof, Eliminating Curses and Punishing", - "tooltip.anvilcraft.item.royal_smithing_table": "Creeper proof, Saving your Smithing Template", - "tooltip.anvilcraft.item.royal_steel_block": "Creeper proof", - "tooltip.anvilcraft.item.smooth_royal_steel_block": "Creeper proof", + "tooltip.anvilcraft.item.royal_grindstone": "Explosion proof, Eliminating Curses and Punishing", + "tooltip.anvilcraft.item.royal_smithing_table": "Explosion proof, Saving your Smithing Template", + "tooltip.anvilcraft.item.royal_steel_block": "Explosion proof", + "tooltip.anvilcraft.item.smooth_royal_steel_block": "Explosion proof", "tooltip.anvilcraft.item.structure_tool.click_to_copy": "Click to copy", "tooltip.anvilcraft.item.structure_tool.data_removed": "Structure Removed", "tooltip.anvilcraft.item.structure_tool.max_pos": "Max: x: %d, y: %d, z: %d", @@ -611,7 +622,7 @@ "tooltip.anvilcraft.item.structure_tool.must_cube": "The selected area must be a cube", "tooltip.anvilcraft.item.structure_tool.must_odd": "The side length of the selected area must be odd and cannot exceed 15", "tooltip.anvilcraft.item.structure_tool.size": "Size: x: %d, y: %d, z: %d", - "tooltip.anvilcraft.item.tempering_glass": "Creeper proof, No tools required on collect", + "tooltip.anvilcraft.item.tempering_glass": "Explosion proof, No tools required on collect", "tooltip.anvilcraft.item.topaz": "Containing the power of lightning", "tooltip.anvilcraft.item.transmission_pole": "Build a power grid with a transmission length of 8", "tooltip.anvilcraft.jade.power_information": "Power Grid: %d/%d kW", diff --git a/src/generated/resources/data/anvilcraft/tags/item/explosion_proof.json b/src/generated/resources/data/anvilcraft/tags/item/explosion_proof.json index 5acf248db..86e1ed3e3 100644 --- a/src/generated/resources/data/anvilcraft/tags/item/explosion_proof.json +++ b/src/generated/resources/data/anvilcraft/tags/item/explosion_proof.json @@ -1,5 +1,22 @@ { "values": [ + "anvilcraft:ember_anvil", + "anvilcraft:ember_grindstone", + "anvilcraft:ember_smithing_table", + "anvilcraft:ember_metal_block", + "anvilcraft:cut_ember_metal_block", + "anvilcraft:cut_ember_metal_pillar", + "anvilcraft:cut_ember_metal_slab", + "anvilcraft:cut_ember_metal_stairs", + "anvilcraft:ember_glass", + "anvilcraft:ember_metal_pickaxe", + "anvilcraft:ember_metal_axe", + "anvilcraft:ember_metal_shovel", + "anvilcraft:ember_metal_hoe", + "anvilcraft:ember_metal_sword", + "anvilcraft:ember_anvil_hammer", + "anvilcraft:ember_metal_ingot", + "anvilcraft:ember_metal_nugget", "anvilcraft:earth_core_shard_block", "anvilcraft:earth_core_shard_ore", "anvilcraft:earth_core_shard" diff --git a/src/generated/resources/data/minecraft/tags/block/mineable/axe.json b/src/generated/resources/data/minecraft/tags/block/mineable/axe.json index 04726fb31..3f86d233c 100644 --- a/src/generated/resources/data/minecraft/tags/block/mineable/axe.json +++ b/src/generated/resources/data/minecraft/tags/block/mineable/axe.json @@ -1,9 +1,5 @@ { "values": [ - "anvilcraft:batch_crafter", - "anvilcraft:crab_trap", - "anvilcraft:chute", - "anvilcraft:magnetic_chute", - "anvilcraft:simple_chute" + "anvilcraft:crab_trap" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json index b18eb7ce2..e091167c5 100644 --- a/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json @@ -20,6 +20,7 @@ "anvilcraft:tesla_tower", "anvilcraft:induction_light", "anvilcraft:charge_collector", + "anvilcraft:load_monitor", "anvilcraft:power_converter_small", "anvilcraft:power_converter_middle", "anvilcraft:power_converter_big", @@ -35,12 +36,15 @@ "anvilcraft:ruby_laser", "anvilcraft:ruby_prism", "anvilcraft:block_comparator", + "anvilcraft:impact_pile", "anvilcraft:overseer", "anvilcraft:jewelcrafting_table", "anvilcraft:transparent_crafting_table", "anvilcraft:chute", "anvilcraft:magnetic_chute", "anvilcraft:simple_chute", + "anvilcraft:sliding_rail", + "anvilcraft:sliding_rail_stop", "anvilcraft:royal_steel_block", "anvilcraft:smooth_royal_steel_block", "anvilcraft:cut_royal_steel_block", @@ -75,7 +79,6 @@ "anvilcraft:topaz_block", "anvilcraft:ruby_block", "anvilcraft:sapphire_block", - "anvilcraft:resin_block", "anvilcraft:amber_block", "anvilcraft:mob_amber_block", "anvilcraft:resentful_amber_block", diff --git a/src/generated/resources/data/minecraft/tags/block/needs_diamond_tool.json b/src/generated/resources/data/minecraft/tags/block/needs_diamond_tool.json index 5253ef54f..3be0ab1d8 100644 --- a/src/generated/resources/data/minecraft/tags/block/needs_diamond_tool.json +++ b/src/generated/resources/data/minecraft/tags/block/needs_diamond_tool.json @@ -1,8 +1,22 @@ { "values": [ + "anvilcraft:ember_anvil", + "anvilcraft:ember_grindstone", + "anvilcraft:ember_smithing_table", + "anvilcraft:impact_pile", + "anvilcraft:ember_metal_block", + "anvilcraft:cut_ember_metal_block", + "anvilcraft:cut_ember_metal_pillar", + "anvilcraft:cut_ember_metal_slab", + "anvilcraft:cut_ember_metal_stairs", + "anvilcraft:heated_netherite_block", + "anvilcraft:redhot_netherite_block", + "anvilcraft:glowing_netherite_block", + "anvilcraft:incandescent_netherite_block", "anvilcraft:void_stone", "anvilcraft:earth_core_shard_ore", "anvilcraft:void_matter_block", - "anvilcraft:earth_core_shard_block" + "anvilcraft:earth_core_shard_block", + "anvilcraft:negative_matter_block" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json new file mode 100644 index 000000000..66c2a54db --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json @@ -0,0 +1,30 @@ +{ + "values": [ + "anvilcraft:royal_anvil", + "anvilcraft:royal_grindstone", + "anvilcraft:royal_smithing_table", + "anvilcraft:royal_steel_block", + "anvilcraft:smooth_royal_steel_block", + "anvilcraft:cut_royal_steel_block", + "anvilcraft:cut_royal_steel_pillar", + "anvilcraft:cut_royal_steel_slab", + "anvilcraft:cut_royal_steel_stairs", + "anvilcraft:heavy_iron_block", + "anvilcraft:polished_heavy_iron_block", + "anvilcraft:polished_heavy_iron_slab", + "anvilcraft:polished_heavy_iron_stairs", + "anvilcraft:cut_heavy_iron_block", + "anvilcraft:cut_heavy_iron_slab", + "anvilcraft:cut_heavy_iron_stairs", + "anvilcraft:heavy_iron_plate", + "anvilcraft:heavy_iron_column", + "anvilcraft:heavy_iron_beam", + "anvilcraft:heavy_iron_wall", + "anvilcraft:heavy_iron_door", + "anvilcraft:heavy_iron_trapdoor", + "anvilcraft:cursed_gold_block", + "anvilcraft:topaz_block", + "anvilcraft:ruby_block", + "anvilcraft:sapphire_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/needs_stone_tool.json b/src/generated/resources/data/minecraft/tags/block/needs_stone_tool.json new file mode 100644 index 000000000..8823a8d64 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/block/needs_stone_tool.json @@ -0,0 +1,7 @@ +{ + "values": [ + "anvilcraft:magnet_block", + "anvilcraft:hollow_magnet_block", + "anvilcraft:ferrite_core_magnet_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/walls.json b/src/generated/resources/data/minecraft/tags/block/walls.json index bb9c749aa..c0cc4a3ad 100644 --- a/src/generated/resources/data/minecraft/tags/block/walls.json +++ b/src/generated/resources/data/minecraft/tags/block/walls.json @@ -1,5 +1,6 @@ { "values": [ + "anvilcraft:heavy_iron_wall", "anvilcraft:reinforced_concrete_black_wall", "anvilcraft:reinforced_concrete_blue_wall", "anvilcraft:reinforced_concrete_brown_wall", @@ -15,7 +16,6 @@ "anvilcraft:reinforced_concrete_purple_wall", "anvilcraft:reinforced_concrete_red_wall", "anvilcraft:reinforced_concrete_white_wall", - "anvilcraft:reinforced_concrete_yellow_wall", - "anvilcraft:heavy_iron_wall" + "anvilcraft:reinforced_concrete_yellow_wall" ] } \ No newline at end of file diff --git a/src/main/java/dev/dubhe/anvilcraft/api/tooltip/ItemTooltipManager.java b/src/main/java/dev/dubhe/anvilcraft/api/tooltip/ItemTooltipManager.java index 37d1643db..fb7c18c94 100644 --- a/src/main/java/dev/dubhe/anvilcraft/api/tooltip/ItemTooltipManager.java +++ b/src/main/java/dev/dubhe/anvilcraft/api/tooltip/ItemTooltipManager.java @@ -33,8 +33,8 @@ public class ItemTooltipManager { map.put(ModBlocks.CRAB_TRAP.asItem(), "Placing it in the water to help you catch aquatic products"); map.put(ModItems.CRAB_CLAW.get(), "Increase touch length when holding"); map.put(ModBlocks.ROYAL_ANVIL.asItem(), "Unbreakable and powerful compatibility"); - map.put(ModBlocks.ROYAL_GRINDSTONE.asItem(), "Creeper proof, Eliminating Curses and Punishing"); - map.put(ModBlocks.ROYAL_SMITHING_TABLE.asItem(), "Creeper proof, Saving your Smithing Template"); + map.put(ModBlocks.ROYAL_GRINDSTONE.asItem(), "Explosion proof, Eliminating Curses and Punishing"); + map.put(ModBlocks.ROYAL_SMITHING_TABLE.asItem(), "Explosion proof, Saving your Smithing Template"); map.put(ModBlocks.HEATER.asItem(), "Heating the block above, consumes 16 kW"); map.put(ModBlocks.TRANSMISSION_POLE.asItem(), "Build a power grid with a transmission length of 8"); map.put(ModBlocks.CHARGE_COLLECTOR.asItem(), "Collecting charges to generate power"); @@ -43,24 +43,24 @@ public class ItemTooltipManager { map.put(ModBlocks.POWER_CONVERTER_BIG.asItem(), "Convert power into FE, consumes 9 kW"); map.put(ModBlocks.PIEZOELECTRIC_CRYSTAL.asItem(), "Charge generated by an anvil fall on it"); map.put( - ModBlocks.MAGNET_BLOCK.asItem(), - "Attracting the anvil below, when pushed and pulled by the piston, " - + "causes adjacent copper blocks to generate charges"); + ModBlocks.MAGNET_BLOCK.asItem(), + "Attracting the anvil below, when pushed and pulled by the piston, " + + "causes adjacent copper blocks to generate charges"); map.put( - ModBlocks.HOLLOW_MAGNET_BLOCK.asItem(), - "Attracting the anvil below, " - + "when pushed and pulled by the piston, causes adjacent copper blocks to generate charges"); + ModBlocks.HOLLOW_MAGNET_BLOCK.asItem(), + "Attracting the anvil below, " + + "when pushed and pulled by the piston, causes adjacent copper blocks to generate charges"); map.put( - ModBlocks.FERRITE_CORE_MAGNET_BLOCK.asItem(), - "Attracting the anvil below, " - + "when pushed and pulled by the piston, causes adjacent copper blocks to generate charges"); + ModBlocks.FERRITE_CORE_MAGNET_BLOCK.asItem(), + "Attracting the anvil below, " + + "when pushed and pulled by the piston, causes adjacent copper blocks to generate charges"); map.put(ModBlocks.BATCH_CRAFTER.asItem(), "consumes 1 kW"); - map.put(ModBlocks.ROYAL_STEEL_BLOCK.asItem(), "Creeper proof"); - map.put(ModBlocks.SMOOTH_ROYAL_STEEL_BLOCK.asItem(), "Creeper proof"); - map.put(ModBlocks.CUT_ROYAL_STEEL_BLOCK.asItem(), "Creeper proof"); - map.put(ModBlocks.CUT_ROYAL_STEEL_STAIRS.asItem(), "Creeper proof"); - map.put(ModBlocks.CUT_ROYAL_STEEL_SLAB.asItem(), "Creeper proof"); - map.put(ModBlocks.TEMPERING_GLASS.asItem(), "Creeper proof, No tools required on collect"); + map.put(ModBlocks.ROYAL_STEEL_BLOCK.asItem(), "Explosion proof"); + map.put(ModBlocks.SMOOTH_ROYAL_STEEL_BLOCK.asItem(), "Explosion proof"); + map.put(ModBlocks.CUT_ROYAL_STEEL_BLOCK.asItem(), "Explosion proof"); + map.put(ModBlocks.CUT_ROYAL_STEEL_STAIRS.asItem(), "Explosion proof"); + map.put(ModBlocks.CUT_ROYAL_STEEL_SLAB.asItem(), "Explosion proof"); + map.put(ModBlocks.TEMPERING_GLASS.asItem(), "Explosion proof, No tools required on collect"); map.put(ModBlocks.REMOTE_TRANSMISSION_POLE.asItem(), "Build a power grid with a transmission length of 8"); map.put(ModBlocks.HEAVY_IRON_BLOCK.asItem(), "Explosion proof"); map.put(ModBlocks.POLISHED_HEAVY_IRON_BLOCK.asItem(), "Explosion proof"); @@ -72,19 +72,30 @@ public class ItemTooltipManager { map.put(ModBlocks.HEAVY_IRON_PLATE.asItem(), "Explosion proof"); map.put(ModBlocks.HEAVY_IRON_COLUMN.asItem(), "Explosion proof"); map.put(ModBlocks.HEAVY_IRON_BEAM.asItem(), "Explosion proof"); + map.put(ModBlocks.HEAVY_IRON_WALL.asItem(), "Explosion proof"); + map.put(ModBlocks.HEAVY_IRON_DOOR.asItem(), "Explosion proof"); + map.put(ModBlocks.HEAVY_IRON_TRAPDOOR.asItem(), "Explosion proof"); map.put(ModBlocks.INDUCTION_LIGHT.asItem(), "Catalyze crop growth, consumes 1 kW"); map.put( - ModBlocks.ITEM_COLLECTOR.asItem(), - "Adjust power consumption based on range and cooling" + ", from 30kW to 150kW"); + ModBlocks.ITEM_COLLECTOR.asItem(), + "Adjust power consumption based on range and cooling" + ", from 30kW to 150kW"); + map.put(ModBlocks.EMBER_ANVIL.asItem(), "Wither proof"); + map.put(ModBlocks.EMBER_GRINDSTONE.asItem(), "Wither proof"); + map.put(ModBlocks.EMBER_SMITHING_TABLE.asItem(), "Wither proof"); + map.put(ModBlocks.EMBER_METAL_BLOCK.asItem(), "Wither proof"); + map.put(ModBlocks.CUT_EMBER_METAL_BLOCK.asItem(), "Wither proof"); + map.put(ModBlocks.CUT_EMBER_METAL_PILLAR.asItem(), "Wither proof"); + map.put(ModBlocks.CUT_EMBER_METAL_SLAB.asItem(), "Wither proof"); + map.put(ModBlocks.CUT_EMBER_METAL_STAIRS.asItem(), "Wither proof"); } public static final Map NEED_TOOLTIP_ITEM = Collections.unmodifiableMap(map); /** - * 添加工具提示 + * 为模组物品添加工具提示 * - * @param stack 物品堆 - * @param tooltip 提示类容 + * @param stack 需要添加工具提示的物品堆叠 + * @param tooltip 提示内容 */ public static void addTooltip(ItemStack stack, List tooltip) { Item item = stack.getItem(); @@ -97,9 +108,9 @@ public static void addTooltip(ItemStack stack, List tooltip) { if (stack.is(ModItemTags.REINFORCED_CONCRETE)) { ResourceLocation key = BuiltInRegistries.ITEM.getKey(item); tooltip.add( - 1, - Component.translatable("tooltip.%s.item.reinforced_concrete".formatted(key.getNamespace())) - .withStyle(ChatFormatting.GRAY)); + 1, + Component.translatable("tooltip.%s.item.reinforced_concrete".formatted(key.getNamespace())) + .withStyle(ChatFormatting.GRAY)); } } @@ -125,4 +136,4 @@ private static void reforgingTooltip(List tooltip) { Component.translatable("item.anvilcraft.fire_reforging.tooltip").withStyle(ChatFormatting.GOLD) ); } -} +} \ No newline at end of file diff --git a/src/main/java/dev/dubhe/anvilcraft/init/ModBlocks.java b/src/main/java/dev/dubhe/anvilcraft/init/ModBlocks.java index 530886e41..73691a5cb 100644 --- a/src/main/java/dev/dubhe/anvilcraft/init/ModBlocks.java +++ b/src/main/java/dev/dubhe/anvilcraft/init/ModBlocks.java @@ -178,7 +178,9 @@ public class ModBlocks { .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, ModBlockTags.MAGNET) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + ModBlockTags.MAGNET, + BlockTags.NEEDS_STONE_TOOL) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get()) .pattern("AAA") @@ -195,7 +197,9 @@ public class ModBlocks { .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, ModBlockTags.MAGNET) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + ModBlockTags.MAGNET, + BlockTags.NEEDS_STONE_TOOL) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get()) .pattern("AAA") @@ -213,7 +217,9 @@ public class ModBlocks { .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, ModBlockTags.MAGNET) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + ModBlockTags.MAGNET, + BlockTags.NEEDS_STONE_TOOL) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get()) .pattern("AAA") @@ -279,7 +285,9 @@ public class ModBlocks { .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.ANVIL, ModBlockTags.CANT_BROKEN_ANVIL, BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.ANVIL, + ModBlockTags.CANT_BROKEN_ANVIL, + BlockTags.MINEABLE_WITH_PICKAXE) .register(); public static final BlockEntry ROYAL_ANVIL = REGISTRATE @@ -295,10 +303,14 @@ public class ModBlocks { .save(provider, AnvilCraft.of("smithing/royal_anvil")); }) .initialProperties(() -> Blocks.ANVIL) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.ANVIL, ModBlockTags.CANT_BROKEN_ANVIL, BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.ANVIL, + ModBlockTags.CANT_BROKEN_ANVIL, + BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .register(); public static final BlockEntry ROYAL_GRINDSTONE = REGISTRATE .block("royal_grindstone", RoyalGrindstone::new) @@ -313,11 +325,12 @@ public class ModBlocks { .save(provider, AnvilCraft.of("smithing/royal_grindstone")); }) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .register(); public static final BlockEntry ROYAL_SMITHING_TABLE = REGISTRATE .block("royal_smithing_table", RoyalSmithingTableBlock::new) @@ -332,11 +345,12 @@ public class ModBlocks { .save(provider, AnvilCraft.of("smithing/royal_smithing_table")); }) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .register(); public static final BlockEntry EMBER_ANVIL = REGISTRATE @@ -352,13 +366,21 @@ public class ModBlocks { .save(provider, AnvilCraft.of("smithing/ember_anvil")); }) .initialProperties(() -> Blocks.ANVIL) - .tag(BlockTags.WITHER_IMMUNE, BlockTags.DRAGON_IMMUNE) - .properties(properties -> properties.lightLevel(state -> 9)) - .properties(BlockBehaviour.Properties::noOcclusion) + .tag(BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE, + BlockTags.ANVIL, + ModBlockTags.CANT_BROKEN_ANVIL, + BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) + .properties(properties -> properties.lightLevel(state -> 9) + .noOcclusion() + .strength(50.0f, 1200f)) .blockstate((ctx, provider) -> { }) - .simpleItem() - .tag(BlockTags.ANVIL, ModBlockTags.CANT_BROKEN_ANVIL, BlockTags.MINEABLE_WITH_PICKAXE) + .item() + .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) + .build() .register(); public static final BlockEntry EMBER_GRINDSTONE = REGISTRATE .block("ember_grindstone", EmberGrindstone::new) @@ -372,14 +394,19 @@ public class ModBlocks { .unlocks("hasitem", AnvilCraftDatagen.has(ModItems.EMBER_METAL_INGOT)) .save(provider, AnvilCraft.of("smithing/ember_grindstone")); }) - .tag(BlockTags.WITHER_IMMUNE, BlockTags.DRAGON_IMMUNE) - .properties(properties -> properties.lightLevel(state -> 9)) + .tag(BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE, + BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .properties(BlockBehaviour.Properties::noOcclusion) + .properties(properties -> properties.lightLevel(state -> 9) + .noOcclusion()) .blockstate((ctx, provider) -> { }) - .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .item() + .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) + .build() .register(); public static final BlockEntry EMBER_SMITHING_TABLE = REGISTRATE .block("ember_smithing_table", EmberSmithingTableBlock::new) @@ -393,14 +420,19 @@ public class ModBlocks { .unlocks("hasitem", AnvilCraftDatagen.has(ModItems.EMBER_METAL_INGOT)) .save(provider, AnvilCraft.of("smithing/ember_smithing_table")); }) - .tag(BlockTags.WITHER_IMMUNE, BlockTags.DRAGON_IMMUNE) - .properties(properties -> properties.lightLevel(state -> 9)) + .tag(BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE, + BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .properties(BlockBehaviour.Properties::noOcclusion) + .properties(properties -> properties.lightLevel(state -> 9) + .noOcclusion()) .blockstate((ctx, provider) -> { }) - .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .item() + .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) + .build() .register(); public static final BlockEntry CREATIVE_GENERATOR = REGISTRATE @@ -508,42 +540,42 @@ public class ModBlocks { }) .register(); public static final BlockEntry TESLA_TOWER = REGISTRATE - .block("tesla_tower", TeslaTowerBlock::new) - .initialProperties(ModBlocks.MAGNET_BLOCK) - .loot(AbstractMultiplePartBlock::loot) - .properties(properties -> properties.noOcclusion().lightLevel(state -> { - if (state.getValue(TeslaTowerBlock.HALF) != Vertical4PartHalf.TOP) return 0; - if (state.getValue(SWITCH) == Switch.OFF) return 0; - if (state.getValue(OVERLOAD)) return 6; - return 15; - })) - .blockstate((ctx, provider) -> { - }) - .item(TeslaTowerItem::new) - .model((ctx, provider) -> { provider.blockItem(ctx, "_overall"); }) - .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .recipe((ctx, provider) -> { - ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) - .pattern("ABA") - .pattern("ACA") - .pattern("ADA") - .define('A', ModItems.ROYAL_STEEL_INGOT) - .define('B', ModBlocks.TOPAZ_BLOCK) - .define('C', ModBlocks.TRANSMISSION_POLE) - .define('D', ModItems.CIRCUIT_BOARD) - .unlockedBy( - AnvilCraftDatagen.hasItem(ModItems.CIRCUIT_BOARD), - AnvilCraftDatagen.has(ModItems.CIRCUIT_BOARD)) - .unlockedBy( - AnvilCraftDatagen.hasItem(ModBlocks.TRANSMISSION_POLE), - AnvilCraftDatagen.has(ModBlocks.TRANSMISSION_POLE)) - .unlockedBy( - AnvilCraftDatagen.hasItem(ModBlocks.TOPAZ_BLOCK), - AnvilCraftDatagen.has(ModBlocks.TOPAZ_BLOCK)) - .save(provider); - }) - .register(); + .block("tesla_tower", TeslaTowerBlock::new) + .initialProperties(ModBlocks.MAGNET_BLOCK) + .loot(AbstractMultiplePartBlock::loot) + .properties(properties -> properties.noOcclusion().lightLevel(state -> { + if (state.getValue(TeslaTowerBlock.HALF) != Vertical4PartHalf.TOP) return 0; + if (state.getValue(SWITCH) == Switch.OFF) return 0; + if (state.getValue(OVERLOAD)) return 6; + return 15; + })) + .blockstate((ctx, provider) -> { + }) + .item(TeslaTowerItem::new) + .model((ctx, provider) -> { provider.blockItem(ctx, "_overall"); }) + .build() + .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .recipe((ctx, provider) -> { + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) + .pattern("ABA") + .pattern("ACA") + .pattern("ADA") + .define('A', ModItems.ROYAL_STEEL_INGOT) + .define('B', ModBlocks.TOPAZ_BLOCK) + .define('C', ModBlocks.TRANSMISSION_POLE) + .define('D', ModItems.CIRCUIT_BOARD) + .unlockedBy( + AnvilCraftDatagen.hasItem(ModItems.CIRCUIT_BOARD), + AnvilCraftDatagen.has(ModItems.CIRCUIT_BOARD)) + .unlockedBy( + AnvilCraftDatagen.hasItem(ModBlocks.TRANSMISSION_POLE), + AnvilCraftDatagen.has(ModBlocks.TRANSMISSION_POLE)) + .unlockedBy( + AnvilCraftDatagen.hasItem(ModBlocks.TOPAZ_BLOCK), + AnvilCraftDatagen.has(ModBlocks.TOPAZ_BLOCK)) + .save(provider); + }) + .register(); public static final BlockEntry INDUCTION_LIGHT = REGISTRATE .block("induction_light", InductionLightBlock::new) .initialProperties(ModBlocks.MAGNET_BLOCK) @@ -631,6 +663,7 @@ public class ModBlocks { .noOcclusion()) .blockstate((ctx, provider) -> { }) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) .item() .model((ctx, provider) -> provider.blockItem(ctx, "_0")) .build() @@ -796,7 +829,7 @@ public class ModBlocks { .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.MINEABLE_WITH_AXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get()) .pattern("ABA") @@ -1084,6 +1117,8 @@ public class ModBlocks { public static final BlockEntry IMPACT_PILE = REGISTRATE .block("impact_pile", ImpactPileBlock::new) .initialProperties(() -> Blocks.IRON_BLOCK) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) .blockstate((context, provider) -> provider.simpleBlock( context.get(), DangerUtil.genConfiguredModel("block/impact_pile").get())) @@ -1217,7 +1252,7 @@ public class ModBlocks { .item(BlockItem::new) .onRegister(blockItem -> Item.BY_BLOCK.put(ModBlocks.SIMPLE_CHUTE.get(), blockItem)) .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.MINEABLE_WITH_AXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModBlocks.CHUTE) .pattern("A A") @@ -1238,7 +1273,7 @@ public class ModBlocks { }) .item(BlockItem::new) .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.MINEABLE_WITH_AXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get()) .pattern(" A ") @@ -1260,7 +1295,7 @@ public class ModBlocks { .blockstate((ctx, provider) -> { }) .loot((tables, block) -> tables.dropOther(block, ModBlocks.CHUTE)) - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.MINEABLE_WITH_AXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) .register(); public static final BlockEntry MINERAL_FOUNTAIN = REGISTRATE .block("mineral_fountain", MineralFountainBlock::new) @@ -1284,65 +1319,67 @@ public class ModBlocks { .register(); public static BlockEntry SLIDING_RAIL = REGISTRATE - .block("sliding_rail", SlidingRailBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(it -> it - .mapColor(MapColor.COLOR_GRAY) - .friction(1.0204082f) - .pushReaction(PushReaction.PUSH_ONLY) - ) - .blockstate((ctx, provider) -> { - provider.getVariantBuilder(ctx.get()).forAllStates(blockState -> switch (blockState.getValue( - SlidingRailBlock.AXIS)) { - case X -> new ConfiguredModel[] { - ConfiguredModel.builder() - .modelFile(DangerUtil.genModModelFile("block/sliding_rail").get()) - .rotationY(90) - .buildLast()}; - case Z, Y -> DangerUtil.genConfiguredModel("block/sliding_rail") - .get(); - }); - }) - .item() - .model((ctx, provider) -> provider.blockItem(ctx)) - .build() - .recipe((ctx, provider) -> { - ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 1) - .pattern("A A") - .pattern("BAB") - .pattern("BBB") - .define('A', Blocks.BLUE_ICE) - .define('B', Items.IRON_INGOT) - .unlockedBy(AnvilCraftDatagen.hasItem(Blocks.BLUE_ICE), AnvilCraftDatagen.has(Blocks.BLUE_ICE)) - .save(provider); - }) - .register(); + .block("sliding_rail", SlidingRailBlock::new) + .initialProperties(() -> Blocks.IRON_BLOCK) + .properties(it -> it + .mapColor(MapColor.COLOR_GRAY) + .friction(1.0204082f) + .pushReaction(PushReaction.PUSH_ONLY) + ) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .blockstate((ctx, provider) -> { + provider.getVariantBuilder(ctx.get()).forAllStates(blockState -> switch (blockState.getValue( + SlidingRailBlock.AXIS)) { + case X -> new ConfiguredModel[] { + ConfiguredModel.builder() + .modelFile(DangerUtil.genModModelFile("block/sliding_rail").get()) + .rotationY(90) + .buildLast()}; + case Z, Y -> DangerUtil.genConfiguredModel("block/sliding_rail") + .get(); + }); + }) + .item() + .model((ctx, provider) -> provider.blockItem(ctx)) + .build() + .recipe((ctx, provider) -> { + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 1) + .pattern("A A") + .pattern("BAB") + .pattern("BBB") + .define('A', Blocks.BLUE_ICE) + .define('B', Items.IRON_INGOT) + .unlockedBy(AnvilCraftDatagen.hasItem(Blocks.BLUE_ICE), AnvilCraftDatagen.has(Blocks.BLUE_ICE)) + .save(provider); + }) + .register(); public static BlockEntry SLIDING_RAIL_STOP = REGISTRATE - .block("sliding_rail_stop", SlidingRailStopBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(it -> it - .mapColor(MapColor.COLOR_GRAY) - .friction(0.8241758242f) - .pushReaction(PushReaction.PUSH_ONLY) - ) - .blockstate((ctx, provider) -> { - provider.simpleBlock(ctx.get(), DangerUtil.genModModelFile("block/sliding_rail_stop").get()); - }) - .item() - .model((ctx, provider) -> provider.blockItem(ctx)) - .build() - .recipe((ctx, provider) -> { - ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 1) - .pattern("A A") - .pattern("BAB") - .pattern("BBB") - .define('A', Blocks.BLUE_ICE) - .define('B', Items.IRON_INGOT) - .unlockedBy(AnvilCraftDatagen.hasItem(Blocks.BLUE_ICE), AnvilCraftDatagen.has(Blocks.BLUE_ICE)) - .save(provider); - }) - .register(); + .block("sliding_rail_stop", SlidingRailStopBlock::new) + .initialProperties(() -> Blocks.IRON_BLOCK) + .properties(it -> it + .mapColor(MapColor.COLOR_GRAY) + .friction(0.8241758242f) + .pushReaction(PushReaction.PUSH_ONLY) + ) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .blockstate((ctx, provider) -> { + provider.simpleBlock(ctx.get(), DangerUtil.genModModelFile("block/sliding_rail_stop").get()); + }) + .item() + .model((ctx, provider) -> provider.blockItem(ctx)) + .build() + .recipe((ctx, provider) -> { + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 1) + .pattern("A A") + .pattern("BAB") + .pattern("BBB") + .define('A', Blocks.BLUE_ICE) + .define('B', Items.IRON_INGOT) + .unlockedBy(AnvilCraftDatagen.hasItem(Blocks.BLUE_ICE), AnvilCraftDatagen.has(Blocks.BLUE_ICE)) + .save(provider); + }) + .register(); static { REGISTRATE.defaultCreativeTab(ModItemGroups.ANVILCRAFT_BUILD_BLOCK.getKey()); @@ -1351,9 +1388,12 @@ public class ModBlocks { public static final BlockEntry ROYAL_STEEL_BLOCK = REGISTRATE .block("royal_steel_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.OVERSEER_BASE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.OVERSEER_BASE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1366,11 +1406,12 @@ public class ModBlocks { .register(); public static final BlockEntry SMOOTH_ROYAL_STEEL_BLOCK = REGISTRATE .block("smooth_royal_steel_block", Block::new) - .tag(ModBlockTags.OVERSEER_BASE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + ModBlockTags.OVERSEER_BASE) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.ROYAL_STEEL_BLOCK), @@ -1384,11 +1425,12 @@ public class ModBlocks { .register(); public static final BlockEntry CUT_ROYAL_STEEL_BLOCK = REGISTRATE .block("cut_royal_steel_block", Block::new) - .tag(ModBlockTags.OVERSEER_BASE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + ModBlockTags.OVERSEER_BASE) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 4) .pattern("AA") @@ -1410,13 +1452,14 @@ public class ModBlocks { .register(); public static final BlockEntry CUT_ROYAL_STEEL_PILLAR = REGISTRATE .block("cut_royal_steel_pillar", RotatedPillarBlock::new) - .tag(ModBlockTags.OVERSEER_BASE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + ModBlockTags.OVERSEER_BASE) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.CUT_ROYAL_STEEL_BLOCK), @@ -1437,16 +1480,17 @@ public class ModBlocks { .register(); public static final BlockEntry CUT_ROYAL_STEEL_SLAB = REGISTRATE .block("cut_royal_steel_slab", SlabBlock::new) - .tag(ModBlockTags.OVERSEER_BASE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + ModBlockTags.OVERSEER_BASE) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> provider.slabBlock( ctx.get(), AnvilCraft.of("block/cut_royal_steel_block"), AnvilCraft.of("block/cut_royal_steel_block"))) .simpleItem() .loot((tables, block) -> tables.add(block, tables.createSlabItemTable(block))) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 6) .pattern("AAA") @@ -1477,13 +1521,14 @@ public class ModBlocks { .block( "cut_royal_steel_stairs", (properties) -> new StairBlock(ModBlocks.CUT_ROYAL_STEEL_BLOCK.getDefaultState(), properties)) - .tag(ModBlockTags.OVERSEER_BASE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + ModBlockTags.OVERSEER_BASE) .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0F)) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate( (ctx, provider) -> provider.stairsBlock(ctx.get(), AnvilCraft.of("block/cut_royal_steel_block"))) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 4) .pattern("A ") @@ -1515,16 +1560,18 @@ public class ModBlocks { public static final BlockEntry EMBER_METAL_BLOCK = REGISTRATE .block("ember_metal_block", properties -> new EmberMetalBlock(properties, 0.5d)) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .tag(BlockTags.BEACON_BASE_BLOCKS) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .tag(BlockTags.WITHER_IMMUNE) - .tag(BlockTags.DRAGON_IMMUNE) + .tag(BlockTags.BEACON_BASE_BLOCKS, + BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL, + BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE) .properties(properties -> properties.lightLevel(state -> 9).noOcclusion()) .blockstate((context, provider) -> provider.simpleBlock( context.get(), DangerUtil.genConfiguredModel("block/ember_metal_block").get())) .item() .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) .build() .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) @@ -1542,17 +1589,18 @@ public class ModBlocks { public static final BlockEntry CUT_EMBER_METAL_BLOCK = REGISTRATE .block("cut_ember_metal_block", properties -> new EmberMetalBlock(properties, 0.1d)) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .tag(BlockTags.WITHER_IMMUNE) - .tag(BlockTags.DRAGON_IMMUNE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL, + BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .properties(properties -> properties.lightLevel(state -> 9)) - .properties(BlockBehaviour.Properties::noOcclusion) + .properties(properties -> properties.lightLevel(state -> 9).noOcclusion()) .blockstate((context, provider) -> provider.simpleBlock( context.get(), DangerUtil.genConfiguredModel("block/cut_ember_metal_block").get())) .item() .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) .build() .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 4) @@ -1576,16 +1624,17 @@ public class ModBlocks { public static final BlockEntry CUT_EMBER_METAL_PILLAR = REGISTRATE .block("cut_ember_metal_pillar", EmberMetalPillarBlock::new) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .tag(BlockTags.WITHER_IMMUNE) - .tag(BlockTags.DRAGON_IMMUNE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL, + BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .properties(properties -> properties.lightLevel(state -> 9)) - .properties(BlockBehaviour.Properties::noOcclusion) + .properties(properties -> properties.lightLevel(state -> 9).noOcclusion()) .blockstate((ctx, provider) -> { }) .item() .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) .build() .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { @@ -1607,16 +1656,17 @@ public class ModBlocks { public static final BlockEntry CUT_EMBER_METAL_SLAB = REGISTRATE .block("cut_ember_metal_slab", EmberMetalSlabBlock::new) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .tag(BlockTags.WITHER_IMMUNE) - .tag(BlockTags.DRAGON_IMMUNE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL, + BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .properties(properties -> properties.lightLevel(state -> 9)) - .properties(BlockBehaviour.Properties::noOcclusion) + .properties(properties -> properties.lightLevel(state -> 9).noOcclusion()) .blockstate((ctx, provider) -> { }) .item() .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) .build() .loot((tables, block) -> tables.add(block, tables.createSlabItemTable(block))) .recipe((ctx, provider) -> { @@ -1651,16 +1701,17 @@ public class ModBlocks { "cut_ember_metal_stairs", (properties) -> new EmberMetalStairBlock(ModBlocks.CUT_EMBER_METAL_BLOCK.getDefaultState(), properties)) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .tag(BlockTags.WITHER_IMMUNE) - .tag(BlockTags.DRAGON_IMMUNE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL, + BlockTags.WITHER_IMMUNE, + BlockTags.DRAGON_IMMUNE) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .properties(properties -> properties.lightLevel(state -> 9)) - .properties(BlockBehaviour.Properties::noOcclusion) + .properties(properties -> properties.lightLevel(state -> 9).noOcclusion()) .blockstate((ctx, provider) -> { }) .item() .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) .build() .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get(), 4) @@ -1693,12 +1744,13 @@ public class ModBlocks { public static final BlockEntry HEAVY_IRON_BLOCK = REGISTRATE .block("heavy_iron_block", Block::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) - .properties(BlockBehaviour.Properties::noOcclusion) + .properties(p -> p.noOcclusion().strength(5.0f, 1200f)) .blockstate((context, provider) -> provider.simpleBlock( context.get(), DangerUtil.genConfiguredModel("block/heavy_iron_block").get())) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1712,8 +1764,10 @@ public class ModBlocks { public static final BlockEntry POLISHED_HEAVY_IRON_BLOCK = REGISTRATE .block("polished_heavy_iron_block", Block::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1726,13 +1780,15 @@ public class ModBlocks { public static final BlockEntry POLISHED_HEAVY_IRON_SLAB = REGISTRATE .block("polished_heavy_iron_slab", SlabBlock::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> provider.slabBlock( ctx.get(), AnvilCraft.of("block/polished_heavy_iron_block"), AnvilCraft.of("block/polished_heavy_iron_block"))) .simpleItem() .loot((tables, block) -> tables.add(block, tables.createSlabItemTable(block))) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1755,10 +1811,12 @@ public class ModBlocks { "polished_heavy_iron_stairs", (properties) -> new StairBlock(ModBlocks.POLISHED_HEAVY_IRON_BLOCK.getDefaultState(), properties)) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> provider.stairsBlock(ctx.get(), AnvilCraft.of("block/polished_heavy_iron_block"))) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1777,8 +1835,10 @@ public class ModBlocks { public static final BlockEntry CUT_HEAVY_IRON_BLOCK = REGISTRATE .block("cut_heavy_iron_block", Block::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1792,13 +1852,15 @@ public class ModBlocks { public static final BlockEntry CUT_HEAVY_IRON_SLAB = REGISTRATE .block("cut_heavy_iron_slab", SlabBlock::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> provider.slabBlock( ctx.get(), AnvilCraft.of("block/cut_heavy_iron_block"), AnvilCraft.of("block/cut_heavy_iron_block"))) .simpleItem() .loot((tables, block) -> tables.add(block, tables.createSlabItemTable(block))) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1819,9 +1881,11 @@ public class ModBlocks { "cut_heavy_iron_stairs", (properties) -> new StairBlock(ModBlocks.CUT_HEAVY_IRON_BLOCK.getDefaultState(), properties)) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> provider.stairsBlock(ctx.get(), AnvilCraft.of("block/cut_heavy_iron_block"))) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1840,10 +1904,12 @@ public class ModBlocks { public static final BlockEntry HEAVY_IRON_PLATE = REGISTRATE .block("heavy_iron_plate", HeavyIronPlateBlock::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1856,10 +1922,12 @@ public class ModBlocks { public static final BlockEntry HEAVY_IRON_COLUMN = REGISTRATE .block("heavy_iron_column", Block::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> { }) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1872,13 +1940,15 @@ public class ModBlocks { public static final BlockEntry HEAVY_IRON_BEAM = REGISTRATE .block("heavy_iron_beam", HeavyIronBeamBlock::new) .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .properties(p -> p.strength(5.0f, 1200f)) .blockstate((ctx, provider) -> { }) .item() .model((ctx, provider) -> { }) .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL) .recipe((ctx, provider) -> { SingleItemRecipeBuilder.stonecutting( Ingredient.of(ModBlocks.HEAVY_IRON_BLOCK), @@ -1888,12 +1958,67 @@ public class ModBlocks { .save(provider, AnvilCraft.of("stonecutting/" + ctx.getName())); }) .register(); + public static final BlockEntry HEAVY_IRON_WALL = REGISTRATE + .block("heavy_iron_wall", HeavyIronWallBlock::new) + .initialProperties(() -> Blocks.IRON_BLOCK) + .properties(properties -> properties.strength(5.0f, 1200f).noOcclusion()) + .blockstate((ctx, provider) -> { + }) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.WALLS) + .recipe((ctx, provider) -> { + }) + .item() + .model((ctx, provide) -> provide.wallInventory( + "heavy_iron_wall", + AnvilCraft.of("block/heavy_iron_wall") + )) + .build() + .register(); + public static final BlockEntry HEAVY_IRON_DOOR = REGISTRATE + .block("heavy_iron_door", HeavyIronDoorBlock::new) + .initialProperties(() -> Blocks.IRON_DOOR) + .properties(properties -> properties.strength(5.0f, 1200f)) + .loot((l, b) -> { + l.add(b, l.createDoorTable(b)); + }) + .blockstate((ctx, provider) -> { + }) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.DOORS) + .item() + .model((ctx, prov) -> { + prov.generated(ctx); + }) + .build() + .register(); + public static final BlockEntry HEAVY_IRON_TRAPDOOR = REGISTRATE + .block("heavy_iron_trapdoor", HeavyIronTrapdoorBlock::new) + .initialProperties(() -> Blocks.IRON_TRAPDOOR) + .properties(properties -> properties.strength(5.0f, 1200f)) + .defaultLoot() + .blockstate((ctx, provider) -> { + }) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.TRAPDOORS) + .item() + .model((c, p) -> { + p.blockItem(c, "_bottom"); + }) + .build() + .register(); + public static final BlockEntry CURSED_GOLD_BLOCK = REGISTRATE .block("cursed_gold_block", Block::new) .initialProperties(() -> Blocks.GOLD_BLOCK) .item(CursedBlockItem::new) .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.BEACON_BASE_BLOCKS) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1910,7 +2035,9 @@ public class ModBlocks { .block("zinc_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_ZINC) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_ZINC) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1927,7 +2054,9 @@ public class ModBlocks { .block("tin_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_TIN) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_TIN) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1944,7 +2073,9 @@ public class ModBlocks { .block("titanium_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_TITANIUM) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_TITANIUM) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1963,7 +2094,9 @@ public class ModBlocks { .item() .initialProperties(() -> new Item.Properties().fireResistant()) .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_TUNGSTEN) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_TUNGSTEN) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1980,7 +2113,9 @@ public class ModBlocks { .block("lead_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_LEAD) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_LEAD) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -1997,7 +2132,9 @@ public class ModBlocks { .block("silver_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_SILVER) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_SILVER) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2014,7 +2151,9 @@ public class ModBlocks { .block("uranium_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_URANIUM) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_URANIUM) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2031,7 +2170,9 @@ public class ModBlocks { .block("bronze_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_BRONZE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_BRONZE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2048,7 +2189,9 @@ public class ModBlocks { .block("brass_block", Block::new) .initialProperties(() -> Blocks.IRON_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS, ModBlockTags.STORAGE_BLOCKS_BRASS) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.BEACON_BASE_BLOCKS, + ModBlockTags.STORAGE_BLOCKS_BRASS) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2066,7 +2209,9 @@ public class ModBlocks { .block("topaz_block", Block::new) .initialProperties(() -> Blocks.EMERALD_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.BEACON_BASE_BLOCKS) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2081,7 +2226,9 @@ public class ModBlocks { .block("ruby_block", Block::new) .initialProperties(() -> Blocks.EMERALD_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.BEACON_BASE_BLOCKS) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2096,7 +2243,9 @@ public class ModBlocks { .block("sapphire_block", Block::new) .initialProperties(() -> Blocks.EMERALD_BLOCK) .simpleItem() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.BEACON_BASE_BLOCKS) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_IRON_TOOL, + BlockTags.BEACON_BASE_BLOCKS) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2115,7 +2264,6 @@ public class ModBlocks { .properties(properties -> properties.sound(SoundType.HONEY_BLOCK)) .item(ResinBlockItem::new) .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE) .recipe((ctx, provider) -> { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) .pattern("AAA") @@ -2185,24 +2333,11 @@ public class ModBlocks { }) .tag(BlockTags.MINEABLE_WITH_PICKAXE) .register(); - - public static final BlockEntry CINERITE = REGISTRATE - .block("cinerite", (b) -> new ColoredFallingBlock(new ColorRGBA(0xDEDEDE), b)) - .initialProperties(() -> Blocks.SAND) - .simpleItem() - .tag(BlockTags.MINEABLE_WITH_SHOVEL) - .register(); - public static final BlockEntry QUARTZ_SAND = REGISTRATE - .block("quartz_sand", (b) -> new ColoredFallingBlock(new ColorRGBA(0xFFFFCD), b)) - .initialProperties(() -> Blocks.SAND) - .simpleItem() - .tag(BlockTags.MINEABLE_WITH_SHOVEL) - .register(); public static final BlockEntry TEMPERING_GLASS = REGISTRATE .block("tempering_glass", TransparentBlock::new) .initialProperties(() -> Blocks.GLASS) .properties(properties -> properties - .explosionResistance(15.0F) + .explosionResistance(1200.0f) .noOcclusion() .isValidSpawn(ModBlocks::never) .isRedstoneConductor(ModBlocks::never) @@ -2236,7 +2371,22 @@ public class ModBlocks { .tag(BlockTags.WITHER_IMMUNE) .tag(BlockTags.DRAGON_IMMUNE) .tag(Tags.Blocks.GLASS_BLOCKS) + .item() + .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) + .build() + .register(); + public static final BlockEntry CINERITE = REGISTRATE + .block("cinerite", (b) -> new ColoredFallingBlock(new ColorRGBA(0xDEDEDE), b)) + .initialProperties(() -> Blocks.SAND) + .simpleItem() + .tag(BlockTags.MINEABLE_WITH_SHOVEL) + .register(); + public static final BlockEntry QUARTZ_SAND = REGISTRATE + .block("quartz_sand", (b) -> new ColoredFallingBlock(new ColorRGBA(0xFFFFCD), b)) + .initialProperties(() -> Blocks.SAND) .simpleItem() + .tag(BlockTags.MINEABLE_WITH_SHOVEL) .register(); public static final BlockEntry NETHER_DUST = REGISTRATE @@ -2363,7 +2513,8 @@ public class ModBlocks { .initialProperties(() -> new Item.Properties().fireResistant()) .build() .loot((tables, block) -> tables.dropOther(block, Items.NETHERITE_BLOCK)) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) .register(); public static final BlockEntry HEATED_TUNGSTEN = REGISTRATE @@ -2384,7 +2535,8 @@ public class ModBlocks { .initialProperties(() -> new Item.Properties().fireResistant()) .build() .loot((tables, block) -> tables.dropOther(block, Items.NETHERITE_BLOCK)) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) .register(); public static final BlockEntry REDHOT_TUNGSTEN = REGISTRATE @@ -2406,7 +2558,8 @@ public class ModBlocks { .initialProperties(() -> new Item.Properties().fireResistant()) .build() .loot((tables, block) -> tables.dropOther(block, ModBlocks.HEATED_NETHERITE)) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) .register(); public static final BlockEntry GLOWING_TUNGSTEN = REGISTRATE @@ -2428,7 +2581,8 @@ public class ModBlocks { .initialProperties(() -> new Item.Properties().fireResistant()) .build() .loot((tables, block) -> tables.dropOther(block, ModBlocks.REDHOT_NETHERITE)) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) .register(); public static final BlockEntry INCANDESCENT_TUNGSTEN = REGISTRATE @@ -2686,7 +2840,9 @@ public class ModBlocks { .item() .tag(ModItemTags.VOID_RESISTANT) .build() - .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.NEEDS_DIAMOND_TOOL, ModBlockTags.STORAGE_BLOCKS_VOID_MATTER) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL, + ModBlockTags.STORAGE_BLOCKS_VOID_MATTER) .register(); public static final BlockEntry EARTH_CORE_SHARD_BLOCK = REGISTRATE @@ -2712,29 +2868,30 @@ public class ModBlocks { .register(); public static final BlockEntry NEGATIVE_MATTER_BLOCK = REGISTRATE - .block("negative_matter_block", NegativeMatterBlock::new) - .initialProperties(VOID_MATTER_BLOCK::get) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .properties(properties -> properties.lightLevel(state -> 0).noOcclusion()) - .blockstate((context, provider) -> provider.simpleBlock( - context.get(), - DangerUtil.genConfiguredModel("block/negative_matter_block").get())) - .item() - .initialProperties(Item.Properties::new) - .build() - .recipe((ctx, provider) -> { - ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) - .pattern("AAA") - .pattern("AAA") - .pattern("AAA") - .define('A', ModItems.NEGATIVE_MATTER) - .unlockedBy( - AnvilCraftDatagen.hasItem(ModItems.NEGATIVE_MATTER), - RegistrateRecipeProvider.has(ModItems.NEGATIVE_MATTER)) - .save(provider); - }) - .defaultLoot() - .register(); + .block("negative_matter_block", NegativeMatterBlock::new) + .initialProperties(() -> Blocks.NETHERITE_BLOCK) + .tag(BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.NEEDS_DIAMOND_TOOL) + .properties(properties -> properties.lightLevel(state -> 1).noOcclusion()) + .blockstate((context, provider) -> provider.simpleBlock( + context.get(), + DangerUtil.genConfiguredModel("block/negative_matter_block").get())) + .item() + .initialProperties(Item.Properties::new) + .build() + .recipe((ctx, provider) -> { + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) + .pattern("AAA") + .pattern("AAA") + .pattern("AAA") + .define('A', ModItems.NEGATIVE_MATTER) + .unlockedBy( + AnvilCraftDatagen.hasItem(ModItems.NEGATIVE_MATTER), + RegistrateRecipeProvider.has(ModItems.NEGATIVE_MATTER)) + .save(provider); + }) + .defaultLoot() + .register(); public static final BlockEntry LAVA_CAULDRON = REGISTRATE .block("lava_cauldron", LavaCauldronBlock::new) @@ -2795,52 +2952,6 @@ public class ModBlocks { .tag(BlockTags.MINEABLE_WITH_PICKAXE) .register(); - public static final BlockEntry HEAVY_IRON_WALL = REGISTRATE - .block("heavy_iron_wall", HeavyIronWallBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) - .properties(properties -> properties.explosionResistance(15.0f).noOcclusion()) - .blockstate((ctx, provider) -> { - }).tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.WALLS) - .recipe((ctx, provider) -> { - }) - .item() - .model((ctx, provide) -> provide.wallInventory( - "heavy_iron_wall", - AnvilCraft.of("block/heavy_iron_wall") - )) - .build() - .register(); - - public static final BlockEntry HEAVY_IRON_DOOR = REGISTRATE - .block("heavy_iron_door", HeavyIronDoorBlock::new) - .initialProperties(() -> Blocks.IRON_DOOR) - .properties(properties -> properties) - .loot((l, b) -> { - l.add(b, l.createDoorTable(b)); - }) - .blockstate((ctx, provider) -> { - }).tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.DOORS) - .item() - .model((ctx, prov) -> { - prov.generated(ctx); - }) - .build() - .register(); - - public static final BlockEntry HEAVY_IRON_TRAPDOOR = REGISTRATE - .block("heavy_iron_trapdoor", HeavyIronTrapdoorBlock::new) - .initialProperties(() -> Blocks.IRON_TRAPDOOR) - .properties(properties -> properties) - .defaultLoot() - .blockstate((ctx, provider) -> { - }).tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.TRAPDOORS) - .item() - .model((c, p) -> { - p.blockItem(c, "_bottom"); - }) - .build() - .register(); - public static final Object2ObjectMap> CEMENT_CAULDRONS = registerAllCementCauldrons(); @@ -2857,7 +2968,7 @@ private static Object2ObjectMap> regi return REGISTRATE .block("reinforced_concrete_" + color, ReinforcedConcreteBlock::new) .initialProperties(() -> Blocks.TERRACOTTA) - .properties(properties -> properties.explosionResistance(15.0f)) + .properties(properties -> properties.destroyTime(2.0f).explosionResistance(15.0f)) .item() .tag(ModItemTags.REINFORCED_CONCRETE) .build() @@ -2907,7 +3018,7 @@ private static Object2ObjectMap> registerReinforced return REGISTRATE .block("reinforced_concrete_" + color + "_slab", SlabBlock::new) .initialProperties(() -> Blocks.TERRACOTTA) - .properties(properties -> properties.explosionResistance(15.0f)) + .properties(properties -> properties.destroyTime(2.0f).explosionResistance(15.0f)) .item() .tag(ModItemTags.REINFORCED_CONCRETE) .build() @@ -2950,7 +3061,7 @@ private static Object2ObjectMap> registerReinforce "reinforced_concrete_" + color + "_stair", (properties) -> new StairBlock(parent.getDefaultState(), properties)) .initialProperties(() -> Blocks.TERRACOTTA) - .properties(properties -> properties.explosionResistance(15.0f)) + .properties(properties -> properties.destroyTime(2.0f).explosionResistance(15.0f)) .item() .tag(ModItemTags.REINFORCED_CONCRETE) .build() @@ -2989,7 +3100,7 @@ private static Object2ObjectMap> registerReinforced return REGISTRATE .block("reinforced_concrete_" + color + "_wall", WallBlock::new) .initialProperties(() -> Blocks.TERRACOTTA) - .properties(properties -> properties.explosionResistance(15.0f)) + .properties(properties -> properties.destroyTime(2.0f).explosionResistance(15.0f)) .blockstate((ctx, provider) -> provider.wallBlock(ctx.get(), AnvilCraft.of("block/reinforced_concrete_" + color + "_wall"))) .tag(BlockTags.MINEABLE_WITH_PICKAXE, BlockTags.WALLS) @@ -3292,4 +3403,4 @@ public static boolean never(BlockState state, BlockGetter blockGetter, BlockPos public static boolean never(BlockState state, BlockGetter blockGetter, BlockPos pos) { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java b/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java index bb73a66fc..9cb4d3120 100644 --- a/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java +++ b/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java @@ -260,7 +260,8 @@ public class ModItems { .save(provider, AnvilCraft.of("smithing/ember_metal_pickaxe")); }) .model((ctx, provider) -> provider.handheld(ctx)) - .tag(ItemTags.PICKAXES) + .tag(ItemTags.PICKAXES, + ModItemTags.EXPLOSION_PROOF) .register(); public static final ItemEntry EMBER_METAL_AXE = REGISTRATE .item("ember_metal_axe", EmberMetalAxeItem::new) @@ -275,7 +276,8 @@ public class ModItems { .save(provider, AnvilCraft.of("smithing/ember_metal_axe")); }) .model((ctx, provider) -> provider.handheld(ctx)) - .tag(ItemTags.AXES) + .tag(ItemTags.AXES, + ModItemTags.EXPLOSION_PROOF) .register(); public static final ItemEntry EMBER_METAL_SHOVEL = REGISTRATE .item("ember_metal_shovel", EmberMetalShovelItem::new) @@ -290,7 +292,8 @@ public class ModItems { .save(provider, AnvilCraft.of("smithing/ember_metal_shovel")); }) .model((ctx, provider) -> provider.handheld(ctx)) - .tag(ItemTags.SHOVELS) + .tag(ItemTags.SHOVELS, + ModItemTags.EXPLOSION_PROOF) .register(); public static final ItemEntry EMBER_METAL_HOE = REGISTRATE .item("ember_metal_hoe", EmberMetalHoeItem::new) @@ -305,7 +308,8 @@ public class ModItems { .save(provider, AnvilCraft.of("smithing/ember_metal_hoe")); }) .model((ctx, provider) -> provider.handheld(ctx)) - .tag(ItemTags.HOES) + .tag(ItemTags.HOES, + ModItemTags.EXPLOSION_PROOF) .register(); public static final ItemEntry EMBER_METAL_SWORD = REGISTRATE .item("ember_metal_sword", EmberMetalSwordItem::new) @@ -320,7 +324,8 @@ public class ModItems { .save(provider, AnvilCraft.of("smithing/ember_metal_sword")); }) .model((ctx, provider) -> provider.handheld(ctx)) - .tag(ItemTags.SWORDS) + .tag(ItemTags.SWORDS, + ModItemTags.EXPLOSION_PROOF) .register(); public static final ItemEntry ANVIL_HAMMER = REGISTRATE .item("anvil_hammer", AnvilHammerItem::new) @@ -373,12 +378,13 @@ public class ModItems { .unlocks("hasitem", AnvilCraftDatagen.has(ModItems.EMBER_METAL_INGOT)) .save(provider, AnvilCraft.of("smithing/ember_anvil_hammer")); }) - .tag(ItemTags.MACE_ENCHANTABLE) + .tag(ItemTags.MACE_ENCHANTABLE, + ModItemTags.EXPLOSION_PROOF) .properties(properties -> properties.durability(2031)) .model((ctx, provider) -> { }) .register(); - // 升级模板 + // 升级锻造模板 public static final ItemEntry ROYAL_STEEL_UPGRADE_SMITHING_TEMPLATE = REGISTRATE .item("royal_steel_upgrade_smithing_template", RoyalUpgradeTemplateItem::new) .register(); @@ -1376,9 +1382,10 @@ public class ModItems { }) .register(); - public static final ItemEntry EMBER_METAL_INGOT = REGISTRATE + public static final ItemEntry EMBER_METAL_INGOT = REGISTRATE .item("ember_metal_ingot", Item::new) .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) .recipe((ctx, provider) -> { ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get(), 9) .requires(ModBlocks.EMBER_METAL_BLOCK) @@ -1398,9 +1405,10 @@ public class ModItems { }) .register(); - public static final ItemEntry EMBER_METAL_NUGGET = REGISTRATE + public static final ItemEntry EMBER_METAL_NUGGET = REGISTRATE .item("ember_metal_nugget", Item::new) .initialProperties(() -> new Item.Properties().fireResistant()) + .tag(ModItemTags.EXPLOSION_PROOF) .recipe((ctx, provider) -> { ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get(), 9) .requires(ModItems.EMBER_METAL_INGOT) @@ -1412,39 +1420,39 @@ public class ModItems { .register(); public static final ItemEntry NEGATIVE_MATTER = REGISTRATE - .item("negative_matter", Item::new) - .initialProperties(Item.Properties::new) - .recipe((ctx, provider) -> { - ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get(), 9) - .requires(ModBlocks.NEGATIVE_MATTER_BLOCK) - .unlockedBy( - AnvilCraftDatagen.hasItem(ModBlocks.NEGATIVE_MATTER_BLOCK.asItem()), - AnvilCraftDatagen.has(ModBlocks.NEGATIVE_MATTER_BLOCK)) - .save(provider, AnvilCraft.of(BuiltInRegistries.ITEM.getKey(ctx.get()).getPath() + "_from_block")); - ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) - .pattern("AAA") - .pattern("AAA") - .pattern("AAA") - .define('A', ModItems.NEGATIVE_MATTER_NUGGET) - .unlockedBy( - AnvilCraftDatagen.hasItem(ModItems.NEGATIVE_MATTER_NUGGET), - RegistrateRecipeProvider.has(ModItems.NEGATIVE_MATTER_NUGGET)) - .save(provider); - }) - .register(); + .item("negative_matter", Item::new) + .initialProperties(Item.Properties::new) + .recipe((ctx, provider) -> { + ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get(), 9) + .requires(ModBlocks.NEGATIVE_MATTER_BLOCK) + .unlockedBy( + AnvilCraftDatagen.hasItem(ModBlocks.NEGATIVE_MATTER_BLOCK.asItem()), + AnvilCraftDatagen.has(ModBlocks.NEGATIVE_MATTER_BLOCK)) + .save(provider, AnvilCraft.of(BuiltInRegistries.ITEM.getKey(ctx.get()).getPath() + "_from_block")); + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ctx.get()) + .pattern("AAA") + .pattern("AAA") + .pattern("AAA") + .define('A', ModItems.NEGATIVE_MATTER_NUGGET) + .unlockedBy( + AnvilCraftDatagen.hasItem(ModItems.NEGATIVE_MATTER_NUGGET), + RegistrateRecipeProvider.has(ModItems.NEGATIVE_MATTER_NUGGET)) + .save(provider); + }) + .register(); public static final ItemEntry NEGATIVE_MATTER_NUGGET = REGISTRATE - .item("negative_matter_nugget", Item::new) - .initialProperties(Item.Properties::new) - .recipe((ctx, provider) -> { - ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get(), 9) - .requires(ModItems.NEGATIVE_MATTER) - .unlockedBy( - AnvilCraftDatagen.hasItem(ModItems.NEGATIVE_MATTER), - AnvilCraftDatagen.has(ModItems.NEGATIVE_MATTER)) - .save(provider, AnvilCraft.of(BuiltInRegistries.ITEM.getKey(ctx.get()).getPath() + "_from_ingot")); - }) - .register(); + .item("negative_matter_nugget", Item::new) + .initialProperties(Item.Properties::new) + .recipe((ctx, provider) -> { + ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get(), 9) + .requires(ModItems.NEGATIVE_MATTER) + .unlockedBy( + AnvilCraftDatagen.hasItem(ModItems.NEGATIVE_MATTER), + AnvilCraftDatagen.has(ModItems.NEGATIVE_MATTER)) + .save(provider, AnvilCraft.of(BuiltInRegistries.ITEM.getKey(ctx.get()).getPath() + "_from_ingot")); + }) + .register(); public static final ItemEntry OIL_BUCKET = REGISTRATE .item("oil_bucket", p -> new BucketItem(ModFluids.OIL.get(), p)) diff --git a/src/main/java/dev/dubhe/anvilcraft/mixin/ItemEntityMixin.java b/src/main/java/dev/dubhe/anvilcraft/mixin/ItemEntityMixin.java index 813f04a46..66ef28821 100644 --- a/src/main/java/dev/dubhe/anvilcraft/mixin/ItemEntityMixin.java +++ b/src/main/java/dev/dubhe/anvilcraft/mixin/ItemEntityMixin.java @@ -98,9 +98,12 @@ private void magnetization(CallbackInfo ci) { @Inject(method = "tick", at = @At(value = "HEAD")) private void voidResistant(CallbackInfo ci) { - if (this.getServer() == null) return; - if (this.getItem().is(ModItemTags.VOID_RESISTANT) - && this.getY() < this.level().getMinBuildHeight()) this.setDeltaMovement(0, 0.6f, 0); + if (!this.getItem().is(ModItemTags.VOID_RESISTANT)) return; + if(this.getY() < this.level().getMinBuildHeight() + 1) { + double dy = (this.level().getMinBuildHeight() - this.getY()) * 0.01; + dy += this.getDeltaMovement().y * -0.1; + this.addDeltaMovement(new Vec3(0, 0.04 + dy, 0)); + } } @Unique private static final Map REPAIR_EFFICIENCY = new HashMap<>();