diff --git a/src/generated/resources/data/forge/tags/items/raw_materials/silver.json b/src/generated/resources/data/forge/tags/items/raw_materials/silver.json new file mode 100644 index 000000000..1e3818d82 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/raw_materials/silver.json @@ -0,0 +1,5 @@ +{ + "values": [ + "iceandfire:raw_silver" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks.json b/src/generated/resources/data/forge/tags/items/storage_blocks.json index 5fff0f838..5d04d0c9a 100644 --- a/src/generated/resources/data/forge/tags/items/storage_blocks.json +++ b/src/generated/resources/data/forge/tags/items/storage_blocks.json @@ -8,6 +8,7 @@ "iceandfire:dragonsteel_lightning_block", "iceandfire:sapphire_block", "iceandfire:silver_block", + "iceandfire:raw_silver_block", "iceandfire:dragon_bone_block" ] } \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/raw_silver.json b/src/generated/resources/data/forge/tags/items/storage_blocks/raw_silver.json new file mode 100644 index 000000000..c9b85f570 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/raw_silver.json @@ -0,0 +1,5 @@ +{ + "values": [ + "iceandfire:raw_silver_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/iceandfire/recipes/raw_silver_block_to_raw_silver.json b/src/generated/resources/data/iceandfire/recipes/raw_silver_block_to_raw_silver.json new file mode 100644 index 000000000..914b626df --- /dev/null +++ b/src/generated/resources/data/iceandfire/recipes/raw_silver_block_to_raw_silver.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "iceandfire:raw_silver_block" + } + ], + "result": { + "count": 9, + "item": "iceandfire:raw_silver" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/iceandfire/recipes/raw_silver_to_raw_silver_block.json b/src/generated/resources/data/iceandfire/recipes/raw_silver_to_raw_silver_block.json new file mode 100644 index 000000000..6df34934d --- /dev/null +++ b/src/generated/resources/data/iceandfire/recipes/raw_silver_to_raw_silver_block.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": { + "item": "iceandfire:raw_silver" + } + }, + "pattern": [ + "###", + "###", + "###" + ], + "result": { + "item": "iceandfire:raw_silver_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/iceandfire/recipes/silver_ingot_from_blasting_raw_silver.json b/src/generated/resources/data/iceandfire/recipes/silver_ingot_from_blasting_raw_silver.json new file mode 100644 index 000000000..a45d28a86 --- /dev/null +++ b/src/generated/resources/data/iceandfire/recipes/silver_ingot_from_blasting_raw_silver.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:blasting", + "cookingtime": 100, + "experience": 0.7, + "group": "raw_silver", + "ingredient": { + "item": "iceandfire:raw_silver" + }, + "result": "iceandfire:silver_ingot" +} \ No newline at end of file diff --git a/src/generated/resources/data/iceandfire/recipes/silver_ingot_from_smelting_raw_silver.json b/src/generated/resources/data/iceandfire/recipes/silver_ingot_from_smelting_raw_silver.json new file mode 100644 index 000000000..e036f798c --- /dev/null +++ b/src/generated/resources/data/iceandfire/recipes/silver_ingot_from_smelting_raw_silver.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:smelting", + "cookingtime": 200, + "experience": 0.7, + "group": "raw_silver", + "ingredient": { + "item": "iceandfire:raw_silver" + }, + "result": "iceandfire:silver_ingot" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json index 7dded49aa..f811cdee8 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json @@ -2,6 +2,7 @@ "values": [ "iceandfire:silver_ore", "iceandfire:deepslate_silver_ore", - "iceandfire:silver_block" + "iceandfire:silver_block", + "iceandfire:raw_silver_block" ] } \ No newline at end of file diff --git a/src/main/java/com/github/alexthe666/iceandfire/block/IafBlockRegistry.java b/src/main/java/com/github/alexthe666/iceandfire/block/IafBlockRegistry.java index 5b8485adc..9f75affd0 100644 --- a/src/main/java/com/github/alexthe666/iceandfire/block/IafBlockRegistry.java +++ b/src/main/java/com/github/alexthe666/iceandfire/block/IafBlockRegistry.java @@ -42,6 +42,7 @@ public class IafBlockRegistry { public static final RegistryObject SILVER_ORE = register("silver_ore", () -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE).strength(3, 3).requiresCorrectToolForDrops())); public static final RegistryObject DEEPSLATE_SILVER_ORE = register("deepslate_silver_ore", () -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE).strength(3, 3).requiresCorrectToolForDrops())); public static final RegistryObject SILVER_BLOCK = register("silver_block", () -> BlockGeneric.builder(3.0F, 5.0F, SoundType.METAL, Material.METAL)); + public static final RegistryObject RAW_SILVER_BLOCK = register("raw_silver_block", () -> BlockGeneric.builder(3.0F, 5.0F, SoundType.STONE, Material.STONE)); public static final RegistryObject SAPPHIRE_ORE = register("sapphire_ore", () -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE).strength(4, 3).requiresCorrectToolForDrops(), UniformInt.of(3, 7))); public static final RegistryObject SAPPHIRE_BLOCK = register("sapphire_block", () -> BlockGeneric.builder(3.0F, 6.0F, SoundType.METAL, Material.METAL)); public static final RegistryObject CHARRED_DIRT = register("chared_dirt", () -> BlockReturningState.builder(0.5F, 0.0F, SoundType.GRAVEL, Material.DIRT, Blocks.DIRT.defaultBlockState())); diff --git a/src/main/java/com/github/alexthe666/iceandfire/datagen/IafRecipes.java b/src/main/java/com/github/alexthe666/iceandfire/datagen/IafRecipes.java index 3360e4831..c67eec8d2 100644 --- a/src/main/java/com/github/alexthe666/iceandfire/datagen/IafRecipes.java +++ b/src/main/java/com/github/alexthe666/iceandfire/datagen/IafRecipes.java @@ -19,6 +19,7 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.item.*; import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.Tags; @@ -539,7 +540,14 @@ private void createShaped(@NotNull final Consumer consumer) { IafItemRegistry.MYRMEX_JUNGLE_HOE.get() ); + SimpleCookingRecipeBuilder.cooking(Ingredient.of(IafItemRegistry.RAW_SILVER.get()), IafItemRegistry.SILVER_INGOT.get(), 0.7f, 200, RecipeSerializer.SMELTING_RECIPE) + .group("raw_silver") + .unlockedBy(getHasName(IafItemRegistry.RAW_SILVER.get()), has(IafItemRegistry.RAW_SILVER.get())).save(consumer, location(getItemName(IafItemRegistry.SILVER_INGOT.get())) + "_from_smelting_" + getItemName(IafItemRegistry.RAW_SILVER.get())); + SimpleCookingRecipeBuilder.cooking(Ingredient.of(IafItemRegistry.RAW_SILVER.get()), IafItemRegistry.SILVER_INGOT.get(), 0.7f, 100, RecipeSerializer.BLASTING_RECIPE) + .group("raw_silver") + .unlockedBy(getHasName(IafItemRegistry.RAW_SILVER.get()), has(IafItemRegistry.RAW_SILVER.get())).save(consumer, location(getItemName(IafItemRegistry.SILVER_INGOT.get())) + "_from_blasting_" + getItemName(IafItemRegistry.RAW_SILVER.get())); compact(consumer, IafItemRegistry.SILVER_INGOT.get(), IafBlockRegistry.SILVER_BLOCK.get()); + compact(consumer, IafItemRegistry.RAW_SILVER.get(), IafBlockRegistry.RAW_SILVER_BLOCK.get()); compact(consumer, IafItemRegistry.SILVER_NUGGET.get(), IafItemRegistry.SILVER_INGOT.get()); armorSet(consumer, IafItemTags.INGOTS_SILVER, diff --git a/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafBlockTags.java b/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafBlockTags.java index 6d8ad923a..77b3cff9f 100644 --- a/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafBlockTags.java +++ b/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafBlockTags.java @@ -106,7 +106,8 @@ protected void addTags() { tag(BlockTags.NEEDS_STONE_TOOL) .add(IafBlockRegistry.SILVER_ORE.get()) .add(IafBlockRegistry.DEEPSLATE_SILVER_ORE.get()) - .add(IafBlockRegistry.SILVER_BLOCK.get()); + .add(IafBlockRegistry.SILVER_BLOCK.get()) + .add(IafBlockRegistry.RAW_SILVER_BLOCK.get()); tag(BlockTags.NEEDS_IRON_TOOL) .add(IafBlockRegistry.SAPPHIRE_ORE.get()) diff --git a/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafItemTags.java b/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafItemTags.java index 3e8959424..8af0b24c6 100644 --- a/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafItemTags.java +++ b/src/main/java/com/github/alexthe666/iceandfire/datagen/tags/IafItemTags.java @@ -162,6 +162,7 @@ protected void addTags() { .add(IafBlockRegistry.DRAGONSTEEL_LIGHTNING_BLOCK.get().asItem()) .add(IafBlockRegistry.SAPPHIRE_BLOCK.get().asItem()) .add(IafBlockRegistry.SILVER_BLOCK.get().asItem()) + .add(IafBlockRegistry.RAW_SILVER_BLOCK.get().asItem()) .add(IafBlockRegistry.DRAGON_BONE_BLOCK.get().asItem()); tag(DRAGON_FOOD_MEAT) @@ -294,8 +295,10 @@ protected void addTags() { tag(INGOTS_SILVER).add(IafItemRegistry.SILVER_INGOT.get().asItem()); tag(NUGGETS_COPPER).add(IafItemRegistry.COPPER_NUGGET.get()); tag(NUGGETS_SILVER).add(IafItemRegistry.SILVER_NUGGET.get()); + tag(createForgeKey("raw_materials/silver")).add(IafItemRegistry.RAW_SILVER.get()); tag(GEMS_SAPPHIRE).add(IafItemRegistry.SAPPHIRE_GEM.get()); tag(STORAGE_BLOCKS_SILVER).add(IafBlockRegistry.SILVER_BLOCK.get().asItem()); + tag(createForgeKey(STORAGE_BLOCK_PATH + "/raw_silver")).add(IafBlockRegistry.RAW_SILVER_BLOCK.get().asItem()); tag(createForgeKey(STORAGE_BLOCK_PATH + "/sapphire")).add(IafBlockRegistry.SAPPHIRE_BLOCK.get().asItem()); tag(BONES_WITHER).add(IafItemRegistry.WITHERBONE.get()); } diff --git a/src/main/java/com/github/alexthe666/iceandfire/item/IafItemRegistry.java b/src/main/java/com/github/alexthe666/iceandfire/item/IafItemRegistry.java index 4a31387b3..7003a1dd9 100644 --- a/src/main/java/com/github/alexthe666/iceandfire/item/IafItemRegistry.java +++ b/src/main/java/com/github/alexthe666/iceandfire/item/IafItemRegistry.java @@ -68,6 +68,7 @@ public class IafItemRegistry { public static final RegistryObject SAPPHIRE_GEM = registerItem("sapphire_gem", ItemGeneric::new); public static final RegistryObject SILVER_INGOT = registerItem("silver_ingot", ItemGeneric::new); public static final RegistryObject SILVER_NUGGET = registerItem("silver_nugget", ItemGeneric::new); + public static final RegistryObject RAW_SILVER = registerItem("raw_silver", ItemGeneric::new); public static final RegistryObject COPPER_NUGGET = registerItem("copper_nugget", ItemGeneric::new); public static final RegistryObject SILVER_HELMET = registerItem("armor_silver_metal_helmet", () -> new ItemSilverArmor(SILVER_ARMOR_MATERIAL, EquipmentSlot.HEAD)); public static final RegistryObject SILVER_CHESTPLATE = registerItem("armor_silver_metal_chestplate", () -> new ItemSilverArmor(SILVER_ARMOR_MATERIAL, EquipmentSlot.CHEST)); diff --git a/src/main/java/com/github/alexthe666/iceandfire/item/ItemGeneric.java b/src/main/java/com/github/alexthe666/iceandfire/item/ItemGeneric.java index 993f880be..677c52a9d 100644 --- a/src/main/java/com/github/alexthe666/iceandfire/item/ItemGeneric.java +++ b/src/main/java/com/github/alexthe666/iceandfire/item/ItemGeneric.java @@ -30,7 +30,7 @@ public ItemGeneric(int textLength, boolean hide) { } public ItemGeneric(int textLength, int stacksize) { - super(new Item.Properties().tab(IceAndFire.TAB_ITEMS).stacksTo(1)); + super(new Item.Properties().tab(IceAndFire.TAB_ITEMS).stacksTo(stacksize)); this.description = textLength; } diff --git a/src/main/resources/assets/iceandfire/blockstates/raw_silver_block.json b/src/main/resources/assets/iceandfire/blockstates/raw_silver_block.json new file mode 100644 index 000000000..8c8de4ef2 --- /dev/null +++ b/src/main/resources/assets/iceandfire/blockstates/raw_silver_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "iceandfire:block/raw_silver_block" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/iceandfire/lang/en_us.json b/src/main/resources/assets/iceandfire/lang/en_us.json index 80483a6e3..88dac2d2f 100644 --- a/src/main/resources/assets/iceandfire/lang/en_us.json +++ b/src/main/resources/assets/iceandfire/lang/en_us.json @@ -21,6 +21,7 @@ "block.iceandfire.deepslate_silver_ore": "Deepslate Silver Ore", "block.iceandfire.sapphire_ore": "Sapphire Ore", "block.iceandfire.silver_block": "Silver Block", + "block.iceandfire.raw_silver_block": "Raw Silver Block", "block.iceandfire.sapphire_block": "Sapphire Block", "block.iceandfire.chared_dirt": "Charred Dirt", "block.iceandfire.chared_grass": "Charred Grass", @@ -132,6 +133,7 @@ "item.iceandfire.manuscript": "Manuscript", "item.iceandfire.sapphire_gem": "Sapphire", "item.iceandfire.amythest_gem": "Amethyst", + "item.iceandfire.raw_silver": "Raw Silver", "item.iceandfire.silver_ingot": "Silver Ingot", "item.iceandfire.silver_nugget": "Silver Nugget", "item.iceandfire.copper_nugget": "Copper Nugget", diff --git a/src/main/resources/assets/iceandfire/models/block/raw_silver_block.json b/src/main/resources/assets/iceandfire/models/block/raw_silver_block.json new file mode 100644 index 000000000..43564697e --- /dev/null +++ b/src/main/resources/assets/iceandfire/models/block/raw_silver_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "iceandfire:block/raw_silver_block" + } +} diff --git a/src/main/resources/assets/iceandfire/models/item/raw_silver.json b/src/main/resources/assets/iceandfire/models/item/raw_silver.json new file mode 100644 index 000000000..6fa2bc0fd --- /dev/null +++ b/src/main/resources/assets/iceandfire/models/item/raw_silver.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "iceandfire:item/raw_silver" + } +} diff --git a/src/main/resources/assets/iceandfire/models/item/raw_silver_block.json b/src/main/resources/assets/iceandfire/models/item/raw_silver_block.json new file mode 100644 index 000000000..9adcc2ef3 --- /dev/null +++ b/src/main/resources/assets/iceandfire/models/item/raw_silver_block.json @@ -0,0 +1,3 @@ +{ + "parent": "iceandfire:block/raw_silver_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/iceandfire/textures/block/deepslate_silver_ore.png b/src/main/resources/assets/iceandfire/textures/block/deepslate_silver_ore.png index 7a97efad5..212a53ad8 100644 Binary files a/src/main/resources/assets/iceandfire/textures/block/deepslate_silver_ore.png and b/src/main/resources/assets/iceandfire/textures/block/deepslate_silver_ore.png differ diff --git a/src/main/resources/assets/iceandfire/textures/block/raw_silver_block.png b/src/main/resources/assets/iceandfire/textures/block/raw_silver_block.png new file mode 100644 index 000000000..795ed40e4 Binary files /dev/null and b/src/main/resources/assets/iceandfire/textures/block/raw_silver_block.png differ diff --git a/src/main/resources/assets/iceandfire/textures/block/sapphire_ore.png b/src/main/resources/assets/iceandfire/textures/block/sapphire_ore.png index 0f1a5a553..c3787a545 100644 Binary files a/src/main/resources/assets/iceandfire/textures/block/sapphire_ore.png and b/src/main/resources/assets/iceandfire/textures/block/sapphire_ore.png differ diff --git a/src/main/resources/assets/iceandfire/textures/block/silver_ore.png b/src/main/resources/assets/iceandfire/textures/block/silver_ore.png index 3256e4667..e5a9ea2e6 100644 Binary files a/src/main/resources/assets/iceandfire/textures/block/silver_ore.png and b/src/main/resources/assets/iceandfire/textures/block/silver_ore.png differ diff --git a/src/main/resources/assets/iceandfire/textures/item/raw_silver.png b/src/main/resources/assets/iceandfire/textures/item/raw_silver.png new file mode 100644 index 000000000..88f6256ca Binary files /dev/null and b/src/main/resources/assets/iceandfire/textures/item/raw_silver.png differ diff --git a/src/main/resources/assets/iceandfire/textures/item/silver_ingot.png b/src/main/resources/assets/iceandfire/textures/item/silver_ingot.png index d29799b0b..87c744c51 100644 Binary files a/src/main/resources/assets/iceandfire/textures/item/silver_ingot.png and b/src/main/resources/assets/iceandfire/textures/item/silver_ingot.png differ diff --git a/src/main/resources/data/iceandfire/loot_tables/blocks/deepslate_silver_ore.json b/src/main/resources/data/iceandfire/loot_tables/blocks/deepslate_silver_ore.json index efa3c9622..8e2e6bffe 100644 --- a/src/main/resources/data/iceandfire/loot_tables/blocks/deepslate_silver_ore.json +++ b/src/main/resources/data/iceandfire/loot_tables/blocks/deepslate_silver_ore.json @@ -2,17 +2,46 @@ "type": "minecraft:block", "pools": [ { - "name": "silver_ore", "rolls": 1, + "name": "silver_ore", "entries": [ { - "type": "minecraft:item", - "name": "iceandfire:deepslate_silver_ore" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "iceandfire:deepslate_silver_ore" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:ore_drops" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "iceandfire:raw_silver" + } + ] } ] } diff --git a/src/main/resources/data/iceandfire/loot_tables/blocks/raw_silver_block.json b/src/main/resources/data/iceandfire/loot_tables/blocks/raw_silver_block.json new file mode 100644 index 000000000..b1a520e7d --- /dev/null +++ b/src/main/resources/data/iceandfire/loot_tables/blocks/raw_silver_block.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "iceandfire:raw_silver_block" + } + ], + "rolls": 1 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/iceandfire/loot_tables/blocks/silver_ore.json b/src/main/resources/data/iceandfire/loot_tables/blocks/silver_ore.json index 701647280..f4dd1141d 100644 --- a/src/main/resources/data/iceandfire/loot_tables/blocks/silver_ore.json +++ b/src/main/resources/data/iceandfire/loot_tables/blocks/silver_ore.json @@ -2,17 +2,46 @@ "type": "minecraft:block", "pools": [ { - "name": "silver_ore", "rolls": 1, + "name": "silver_ore", "entries": [ { - "type": "minecraft:item", - "name": "iceandfire:silver_ore" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "iceandfire:silver_ore" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:ore_drops" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "iceandfire:raw_silver" + } + ] } ] } diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index c9449d860..028cc4e3b 100644 --- a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -31,6 +31,7 @@ "iceandfire:silver_ore", "iceandfire:sapphire_ore", "iceandfire:silver_block", + "iceandfire:raw_silver_block", "iceandfire:sapphire_block", "iceandfire:chared_stone", "iceandfire:chared_cobblestone",