diff --git a/src/generated/resources/assets/naturesaura/blockstates/depth_ingot_block.json b/src/generated/resources/assets/naturesaura/blockstates/depth_ingot_block.json new file mode 100644 index 00000000..d0188cf6 --- /dev/null +++ b/src/generated/resources/assets/naturesaura/blockstates/depth_ingot_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "naturesaura:block/depth_ingot_block" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/blockstates/sky_ingot_block.json b/src/generated/resources/assets/naturesaura/blockstates/sky_ingot_block.json new file mode 100644 index 00000000..0263fb93 --- /dev/null +++ b/src/generated/resources/assets/naturesaura/blockstates/sky_ingot_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "naturesaura:block/sky_ingot_block" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/block/depth_ingot_block.json b/src/generated/resources/assets/naturesaura/models/block/depth_ingot_block.json new file mode 100644 index 00000000..19320651 --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/block/depth_ingot_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "naturesaura:block/depth_ingot_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/block/sky_ingot_block.json b/src/generated/resources/assets/naturesaura/models/block/sky_ingot_block.json new file mode 100644 index 00000000..6195f58e --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/block/sky_ingot_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "naturesaura:block/sky_ingot_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/item/depth_ingot.json b/src/generated/resources/assets/naturesaura/models/item/depth_ingot.json new file mode 100644 index 00000000..95de97ae --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/item/depth_ingot.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "naturesaura:item/depth_ingot" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/item/depth_ingot_block.json b/src/generated/resources/assets/naturesaura/models/item/depth_ingot_block.json new file mode 100644 index 00000000..f2786a41 --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/item/depth_ingot_block.json @@ -0,0 +1,3 @@ +{ + "parent": "naturesaura:block/depth_ingot_block" +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/item/sky_ingot_block.json b/src/generated/resources/assets/naturesaura/models/item/sky_ingot_block.json new file mode 100644 index 00000000..59fd1568 --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/item/sky_ingot_block.json @@ -0,0 +1,3 @@ +{ + "parent": "naturesaura:block/sky_ingot_block" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json index eaf31b43..dba422d1 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -1,15 +1,15 @@ { "values": [ + "naturesaura:ancient_bark", "naturesaura:ancient_log", + "naturesaura:ancient_planks", "naturesaura:ancient_slab", + "naturesaura:ancient_stairs", + "naturesaura:auto_crafter", + "naturesaura:flower_generator", "naturesaura:nether_wart_mushroom", "naturesaura:oak_generator", - "naturesaura:auto_crafter", - "naturesaura:ancient_bark", - "naturesaura:ancient_planks", - "naturesaura:ancient_stairs", - "naturesaura:flower_generator", - "naturesaura:wood_stand", - "naturesaura:offering_table" + "naturesaura:offering_table", + "naturesaura:wood_stand" ] } \ 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 ab84b520..347917f8 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -1,47 +1,49 @@ { "values": [ - "naturesaura:gold_brick", - "naturesaura:spring", - "naturesaura:infused_stairs", - "naturesaura:potion_generator", - "naturesaura:infused_brick_stairs", - "naturesaura:aura_detector", - "naturesaura:spawn_lamp", "naturesaura:animal_container", - "naturesaura:powder_placer", - "naturesaura:weather_changer", - "naturesaura:grated_chute", - "naturesaura:crushing_catalyst", - "naturesaura:ender_crate", - "naturesaura:firework_generator", - "naturesaura:tainted_gold_block", - "naturesaura:placer", - "naturesaura:blast_furnace_booster", - "naturesaura:lower_limiter", "naturesaura:animal_generator", - "naturesaura:nether_grass", - "naturesaura:infused_iron_block", - "naturesaura:snow_creator", - "naturesaura:infused_stone", - "naturesaura:field_creator", - "naturesaura:nature_altar", - "naturesaura:gold_nether_brick", - "naturesaura:aura_timer", - "naturesaura:chunk_loader", "naturesaura:animal_spawner", + "naturesaura:aura_detector", + "naturesaura:aura_timer", + "naturesaura:blast_furnace_booster", "naturesaura:chorus_generator", - "naturesaura:infused_brick_slab", - "naturesaura:projectile_generator", - "naturesaura:furnace_heater", - "naturesaura:moss_generator", - "naturesaura:rf_converter", - "naturesaura:item_distributor", - "naturesaura:time_changer", + "naturesaura:chunk_loader", "naturesaura:conversion_catalyst", - "naturesaura:hopper_upgrade", - "naturesaura:pickup_stopper", - "naturesaura:infused_brick", + "naturesaura:crushing_catalyst", + "naturesaura:depth_ingot_block", + "naturesaura:ender_crate", + "naturesaura:field_creator", + "naturesaura:firework_generator", + "naturesaura:furnace_heater", "naturesaura:generator_limit_remover", - "naturesaura:infused_slab" + "naturesaura:gold_brick", + "naturesaura:gold_nether_brick", + "naturesaura:grated_chute", + "naturesaura:hopper_upgrade", + "naturesaura:infused_brick", + "naturesaura:infused_brick_slab", + "naturesaura:infused_brick_stairs", + "naturesaura:infused_iron_block", + "naturesaura:infused_slab", + "naturesaura:infused_stairs", + "naturesaura:infused_stone", + "naturesaura:item_distributor", + "naturesaura:lower_limiter", + "naturesaura:moss_generator", + "naturesaura:nature_altar", + "naturesaura:nether_grass", + "naturesaura:pickup_stopper", + "naturesaura:placer", + "naturesaura:potion_generator", + "naturesaura:powder_placer", + "naturesaura:projectile_generator", + "naturesaura:rf_converter", + "naturesaura:sky_ingot_block", + "naturesaura:snow_creator", + "naturesaura:spawn_lamp", + "naturesaura:spring", + "naturesaura:tainted_gold_block", + "naturesaura:time_changer", + "naturesaura:weather_changer" ] } \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/depth_ingot_block.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/depth_ingot_block.json new file mode 100644 index 00000000..4e02915c --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/depth_ingot_block.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:depth_ingot_block" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/sky_ingot_block.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/sky_ingot_block.json new file mode 100644 index 00000000..af9270d5 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/sky_ingot_block.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:sky_ingot_block" + } + ], + "rolls": 1.0 + } + ] +} \ 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 e943a1a5..f54cad32 100644 --- a/src/main/java/de/ellpeck/naturesaura/data/BlockTagProvider.java +++ b/src/main/java/de/ellpeck/naturesaura/data/BlockTagProvider.java @@ -2,6 +2,7 @@ package de.ellpeck.naturesaura.data; import de.ellpeck.naturesaura.NaturesAura; import de.ellpeck.naturesaura.blocks.ModBlocks; +import de.ellpeck.naturesaura.reg.IModItem; import de.ellpeck.naturesaura.reg.ModRegistry; import net.minecraft.data.DataGenerator; import net.minecraft.data.tags.BlockTagsProvider; @@ -14,6 +15,8 @@ import net.minecraft.world.level.material.Material; import net.minecraftforge.common.data.ExistingFileHelper; import org.jetbrains.annotations.Nullable; +import java.util.Comparator; + public class BlockTagProvider extends BlockTagsProvider { public static final TagKey ALTAR_WOOD = BlockTags.create(new ResourceLocation(NaturesAura.MOD_ID, "altar_wood")); @@ -40,15 +43,14 @@ public class BlockTagProvider extends BlockTagsProvider { this.tag(BlockTagProvider.ALTAR_GOLD_BRICK).add(ModBlocks.GOLD_BRICK, ModBlocks.GOLD_NETHER_BRICK); this.tag(BlockTagProvider.ALTAR_FANCY_BRICK).add(Blocks.RED_NETHER_BRICKS, Blocks.CHISELED_STONE_BRICKS); - for (var item : ModRegistry.ALL_ITEMS) { - if (!(item instanceof Block b)) - continue; + // sort these so that they don't change the json every time we run data (because it's a set) + ModRegistry.ALL_ITEMS.stream().sorted(Comparator.comparing(IModItem::getBaseName)).filter(i -> i instanceof Block).map(i -> (Block) i).forEach(b -> { 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); } - } + }); } } diff --git a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java index b2820e8f..9b3c060a 100644 --- a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java +++ b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java @@ -134,7 +134,9 @@ public final class ModRegistry { new BlockWeatherChanger(), new BlockRFConverter(), new BlockChunkLoader(), - new BlockLowerLimiter() + new BlockLowerLimiter(), + new BlockImpl("sky_ingot_block", Block.Properties.of(Material.METAL).sound(SoundType.METAL).strength(4F)), + new BlockImpl("depth_ingot_block", Block.Properties.of(Material.METAL).sound(SoundType.METAL).strength(6F)) ); Helper.populateObjectHolders(ModBlocks.class, event.getForgeRegistry()); }); @@ -209,7 +211,8 @@ public final class ModRegistry { new ItemBreakPrevention(), new ItemPetReviver(), new ItemNetheriteFinder(), - new ItemImpl("vacuum_bottle") + new ItemImpl("vacuum_bottle"), + new ItemImpl("depth_ingot") ); Helper.populateObjectHolders(ModItems.class, event.getForgeRegistry()); }); diff --git a/src/main/resources/assets/naturesaura/lang/en_us.json b/src/main/resources/assets/naturesaura/lang/en_us.json index d228ed22..07d3bd8f 100644 --- a/src/main/resources/assets/naturesaura/lang/en_us.json +++ b/src/main/resources/assets/naturesaura/lang/en_us.json @@ -79,6 +79,8 @@ "block.naturesaura.spring": "Everlasting Spring", "block.naturesaura.weather_changer": "Cloudshifter", "block.naturesaura.lower_limiter": "Aura Imbalance Ward", + "block.naturesaura.sky_ingot_block": "Block of the Skies", + "block.naturesaura.depth_ingot_block": "Block of the Depths", "item.naturesaura.eye": "Environmental Eye", "item.naturesaura.eye_improved": "Environmental Ocular", "item.naturesaura.gold_fiber": "Brilliant Fiber", @@ -103,6 +105,7 @@ "item.naturesaura.farming_stencil": "Farming Stencil", "item.naturesaura.bottle_two_the_rebottling": "Bottle and Cork", "item.naturesaura.sky_ingot": "Ingot of the Skies", + "item.naturesaura.depth_ingot": "Ingot of the Depths", "item.naturesaura.sky_pickaxe": "Skyseeker's Pickaxe", "item.naturesaura.sky_axe": "Skyseeker's Handaxe", "item.naturesaura.sky_shovel": "Skyseeker's Shovel", diff --git a/src/main/resources/assets/naturesaura/textures/block/depth_ingot_block.png b/src/main/resources/assets/naturesaura/textures/block/depth_ingot_block.png new file mode 100644 index 00000000..2e438963 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/block/depth_ingot_block.png differ diff --git a/src/main/resources/assets/naturesaura/textures/block/sky_ingot_block.png b/src/main/resources/assets/naturesaura/textures/block/sky_ingot_block.png new file mode 100644 index 00000000..18f811bb Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/block/sky_ingot_block.png differ diff --git a/src/main/resources/assets/naturesaura/textures/item/depth_ingot.png b/src/main/resources/assets/naturesaura/textures/item/depth_ingot.png new file mode 100644 index 00000000..251cfc92 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/item/depth_ingot.png differ diff --git a/src/main/resources/data/naturesaura/recipes/depth_ingot.json b/src/main/resources/data/naturesaura/recipes/depth_ingot.json new file mode 100644 index 00000000..632cce20 --- /dev/null +++ b/src/main/resources/data/naturesaura/recipes/depth_ingot.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "I" + ], + "key": { + "I": { + "item": "naturesaura:depth_ingot_block" + } + }, + "result": { + "item": "naturesaura:depth_ingot", + "count": 9 + } +} \ No newline at end of file diff --git a/src/main/resources/data/naturesaura/recipes/depth_ingot_block.json b/src/main/resources/data/naturesaura/recipes/depth_ingot_block.json new file mode 100644 index 00000000..a1369190 --- /dev/null +++ b/src/main/resources/data/naturesaura/recipes/depth_ingot_block.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "III", + "III", + "III" + ], + "key": { + "I": { + "item": "naturesaura:depth_ingot" + } + }, + "result": { + "item": "naturesaura:depth_ingot_block" + } +} \ No newline at end of file diff --git a/src/main/resources/data/naturesaura/recipes/depth_ingot_creation.json b/src/main/resources/data/naturesaura/recipes/depth_ingot_creation.json new file mode 100644 index 00000000..991004b5 --- /dev/null +++ b/src/main/resources/data/naturesaura/recipes/depth_ingot_creation.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "SGS", + "GIG", + "SGS" + ], + "key": { + "I": { + "item": "naturesaura:sky_ingot" + }, + "S": { + "item": "minecraft:netherite_scrap" + }, + "G": { + "item": "naturesaura:tainted_gold" + } + }, + "result": { + "item": "naturesaura:depth_ingot" + } +} \ No newline at end of file diff --git a/src/main/resources/data/naturesaura/recipes/sky_ingot.json b/src/main/resources/data/naturesaura/recipes/sky_ingot.json new file mode 100644 index 00000000..c9aa5eba --- /dev/null +++ b/src/main/resources/data/naturesaura/recipes/sky_ingot.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "I" + ], + "key": { + "I": { + "item": "naturesaura:sky_ingot_block" + } + }, + "result": { + "item": "naturesaura:sky_ingot", + "count": 9 + } +} \ No newline at end of file diff --git a/src/main/resources/data/naturesaura/recipes/sky_ingot_block.json b/src/main/resources/data/naturesaura/recipes/sky_ingot_block.json new file mode 100644 index 00000000..f9bc4312 --- /dev/null +++ b/src/main/resources/data/naturesaura/recipes/sky_ingot_block.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "III", + "III", + "III" + ], + "key": { + "I": { + "item": "naturesaura:sky_ingot" + } + }, + "result": { + "item": "naturesaura:sky_ingot_block" + } +} \ No newline at end of file