Skip to content

Commit

Permalink
✨ gold smithing template and new gold ingredient smithing recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
LocusAzzurro committed Mar 11, 2024
1 parent 9e07ea2 commit 5b8eb76
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.mineplugin.locusazzurro.icaruswings.common.item;

import net.minecraft.ChatFormatting;
import net.minecraft.Util;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.SmithingTemplateItem;
import org.mineplugin.locusazzurro.icaruswings.common.data.ModData;

import java.util.List;

public class GoldUpgradeSmithingTemplate extends SmithingTemplateItem {

private static final ChatFormatting TITLE_FORMAT = ChatFormatting.GRAY;
private static final ChatFormatting DESCRIPTION_FORMAT = ChatFormatting.BLUE;
private static final Component GOLD_UPGRADE_APPLIES_TO = Component.translatable(Util.makeDescriptionId("item", new ResourceLocation(ModData.MOD_ID, "smithing_template.gold_upgrade.applies_to"))).withStyle(DESCRIPTION_FORMAT);
private static final Component GOLD_UPGRADE_INGREDIENT = Component.translatable(Util.makeDescriptionId("item", new ResourceLocation(ModData.MOD_ID, "smithing_template.gold_upgrade.ingredients"))).withStyle(DESCRIPTION_FORMAT);
private static final Component GOLD_UPGRADE = Component.translatable(Util.makeDescriptionId("upgrade", new ResourceLocation(ModData.MOD_ID, "gold_upgrade"))).withStyle(TITLE_FORMAT);
private static final Component GOLD_UPGRADE_BASE_SLOT_DESCRIPTION = Component.translatable(Util.makeDescriptionId("item", new ResourceLocation(ModData.MOD_ID, "smithing_template.gold_upgrade.base_slot_description")));
private static final Component GOLD_UPGRADE_ADDITIONS_SLOT_DESCRIPTION = Component.translatable(Util.makeDescriptionId("item", new ResourceLocation(ModData.MOD_ID, "smithing_template.gold_upgrade.additions_slot_description")));
private static final ResourceLocation EMPTY_SLOT_INGOT = new ResourceLocation("item/empty_slot_ingot");
private static final ResourceLocation EMPTY_SLOT_STRING = new ResourceLocation(ModData.MOD_ID, "item/empty_slot_string");
private static final ResourceLocation EMPTY_SLOT_FEATHER = new ResourceLocation(ModData.MOD_ID, "item/empty_slot_feather");

public GoldUpgradeSmithingTemplate() {
super(GOLD_UPGRADE_APPLIES_TO, GOLD_UPGRADE_INGREDIENT, GOLD_UPGRADE,
GOLD_UPGRADE_BASE_SLOT_DESCRIPTION, GOLD_UPGRADE_ADDITIONS_SLOT_DESCRIPTION,
List.of(EMPTY_SLOT_STRING, EMPTY_SLOT_FEATHER), List.of(EMPTY_SLOT_INGOT));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import org.mineplugin.locusazzurro.icaruswings.common.data.WingsType;
import org.mineplugin.locusazzurro.icaruswings.common.item.*;

import java.util.function.Supplier;

public class ItemRegistry {
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ModData.MOD_ID);

Expand Down Expand Up @@ -44,7 +46,8 @@ public class ItemRegistry {
public static final RegistryObject<Item> ULTRAMARINE_GEM = ITEMS.register("ultramarine_gem", GemCurrency::new);
public static final RegistryObject<Item> SAPPHIRE_GEM = ITEMS.register("sapphire_gem", GemCurrency::new);
public static final RegistryObject<Item> BLUE_TOPAZ_GEM = ITEMS.register("blue_topaz_gem", GemCurrency::new);


public static final RegistryObject<Item> GOLD_UPGRADE_SMITHING_TEMPLATE = ITEMS.register("gold_upgrade_smithing_template", GoldUpgradeSmithingTemplate::new);
public static final RegistryObject<Item> REFORGED_NETHERITE_INGOT = ITEMS.register("reforged_netherite_ingot", WorldIngot::new);
public static final RegistryObject<Item> SYNAPSE_ALLOY_INGOT = ITEMS.register("synapse_alloy_ingot", WorldIngot::new);

Expand Down Expand Up @@ -247,6 +250,10 @@ public class ItemRegistry {
public static final RegistryObject<Item> MELON = ITEMS.register("melon", MelonItem::new);
public static final RegistryObject<Item> ICON_BADGE = ITEMS.register("icon_badge", IconBadge::new);

private static RegistryObject<Item> registerItem(String name, Supplier<Item> item){
return ITEMS.register(name, item);
}

}


Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@

"item.locusazzurro_icaruswings.icon_badge": "Icarus Wings Badge",

"upgrade.locusazzurro_icaruswings.gold_upgrade": "Gold Upgrade",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.additions_slot_description": "Add Gold Ingot",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.applies_to": "Feather & String",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.base_slot_description": "Add feather or string",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.ingredients": "Gold Ingot",

"entity.locusazzurro_icaruswings.artemis_missile": "Artemis Missile",
"entity.locusazzurro_icaruswings.time_bomb": "Time Singularity",
"entity.locusazzurro_icaruswings.time_rift_particle": "Time Rift Particle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@

"item.locusazzurro_icaruswings.icon_badge": "伊卡洛斯之翼徽章",

"upgrade.locusazzurro_icaruswings.gold_upgrade": "镀金升级",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.additions_slot_description": "放入金锭",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.applies_to": "羽毛或线",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.base_slot_description": "放入羽毛或线",
"item.locusazzurro_icaruswings.smithing_template.gold_upgrade.ingredients": "金锭",

"entity.locusazzurro_icaruswings.artemis_missile": "阿尔忒弥斯导弹",
"entity.locusazzurro_icaruswings.time_bomb": "时空奇点",
"entity.locusazzurro_icaruswings.time_rift_particle": "时空裂缝粒子",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "locusazzurro_icaruswings:item/gold_upgrade_smithing_template"
}
}
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
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"NNN",
"NGN",
"NNN"
],
"key": {
"G": {
"item": "locusazzurro_icaruswings:glistering_refined_beeswax_bar"
},
"N": {
"item": "minecraft:netherrack"
}
},
"result": {
"item": "locusazzurro_icaruswings:gold_upgrade_smithing_template",
"count": 1
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "minecraft:smithing",
"type": "minecraft:smithing_transform",
"base": {
"tag": "forge:feathers"
},
Expand All @@ -8,5 +8,8 @@
},
"result": {
"item": "locusazzurro_icaruswings:golden_feather"
},
"template": {
"item": "locusazzurro_icaruswings:gold_upgrade_smithing_template"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "minecraft:smithing",
"type": "minecraft:smithing_transform",
"base": {
"tag": "forge:string"
},
Expand All @@ -8,5 +8,8 @@
},
"result": {
"item": "locusazzurro_icaruswings:golden_string"
},
"template": {
"item": "locusazzurro_icaruswings:gold_upgrade_smithing_template"
}
}

0 comments on commit 5b8eb76

Please sign in to comment.