Skip to content

Commit

Permalink
Merge pull request #5140 from SiverDX/1_19/raw_silver
Browse files Browse the repository at this point in the history
Added raw silver (1.19.2)
  • Loading branch information
TheBv authored Feb 13, 2024
2 parents b0d6e0d + 19d8a7d commit df42cf7
Show file tree
Hide file tree
Showing 29 changed files with 196 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"iceandfire:raw_silver"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"iceandfire:dragonsteel_lightning_block",
"iceandfire:sapphire_block",
"iceandfire:silver_block",
"iceandfire:raw_silver_block",
"iceandfire:dragon_bone_block"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"iceandfire:raw_silver_block"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "iceandfire:raw_silver_block"
}
],
"result": {
"count": 9,
"item": "iceandfire:raw_silver"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"key": {
"#": {
"item": "iceandfire:raw_silver"
}
},
"pattern": [
"###",
"###",
"###"
],
"result": {
"item": "iceandfire:raw_silver_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "minecraft:blasting",
"cookingtime": 100,
"experience": 0.7,
"group": "raw_silver",
"ingredient": {
"item": "iceandfire:raw_silver"
},
"result": "iceandfire:silver_ingot"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "minecraft:smelting",
"cookingtime": 200,
"experience": 0.7,
"group": "raw_silver",
"ingredient": {
"item": "iceandfire:raw_silver"
},
"result": "iceandfire:silver_ingot"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"values": [
"iceandfire:silver_ore",
"iceandfire:deepslate_silver_ore",
"iceandfire:silver_block"
"iceandfire:silver_block",
"iceandfire:raw_silver_block"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class IafBlockRegistry {
public static final RegistryObject<Block> SILVER_ORE = register("silver_ore", () -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE).strength(3, 3).requiresCorrectToolForDrops()));
public static final RegistryObject<Block> DEEPSLATE_SILVER_ORE = register("deepslate_silver_ore", () -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE).strength(3, 3).requiresCorrectToolForDrops()));
public static final RegistryObject<Block> SILVER_BLOCK = register("silver_block", () -> BlockGeneric.builder(3.0F, 5.0F, SoundType.METAL, Material.METAL));
public static final RegistryObject<Block> RAW_SILVER_BLOCK = register("raw_silver_block", () -> BlockGeneric.builder(3.0F, 5.0F, SoundType.STONE, Material.STONE));
public static final RegistryObject<Block> SAPPHIRE_ORE = register("sapphire_ore", () -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE).strength(4, 3).requiresCorrectToolForDrops(), UniformInt.of(3, 7)));
public static final RegistryObject<Block> SAPPHIRE_BLOCK = register("sapphire_block", () -> BlockGeneric.builder(3.0F, 6.0F, SoundType.METAL, Material.METAL));
public static final RegistryObject<Block> CHARRED_DIRT = register("chared_dirt", () -> BlockReturningState.builder(0.5F, 0.0F, SoundType.GRAVEL, Material.DIRT, Blocks.DIRT.defaultBlockState()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -539,7 +540,14 @@ private void createShaped(@NotNull final Consumer<FinishedRecipe> 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class IafItemRegistry {
public static final RegistryObject<Item> SAPPHIRE_GEM = registerItem("sapphire_gem", ItemGeneric::new);
public static final RegistryObject<Item> SILVER_INGOT = registerItem("silver_ingot", ItemGeneric::new);
public static final RegistryObject<Item> SILVER_NUGGET = registerItem("silver_nugget", ItemGeneric::new);
public static final RegistryObject<Item> RAW_SILVER = registerItem("raw_silver", ItemGeneric::new);
public static final RegistryObject<Item> COPPER_NUGGET = registerItem("copper_nugget", ItemGeneric::new);
public static final RegistryObject<Item> SILVER_HELMET = registerItem("armor_silver_metal_helmet", () -> new ItemSilverArmor(SILVER_ARMOR_MATERIAL, EquipmentSlot.HEAD));
public static final RegistryObject<Item> SILVER_CHESTPLATE = registerItem("armor_silver_metal_chestplate", () -> new ItemSilverArmor(SILVER_ARMOR_MATERIAL, EquipmentSlot.CHEST));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "iceandfire:block/raw_silver_block"
}
}
}
2 changes: 2 additions & 0 deletions src/main/resources/assets/iceandfire/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "iceandfire:block/raw_silver_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "iceandfire:item/raw_silver"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "iceandfire:block/raw_silver_block"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit df42cf7

Please sign in to comment.