From ecf65f78dbe616c9691e411cd64cd719d6343c3a Mon Sep 17 00:00:00 2001 From: Halbear Date: Tue, 4 Aug 2026 02:06:33 +0100 Subject: [PATCH] Kopis Sword & Electrum Coin --- gradle.properties | 2 +- .../GuiScreens/ForgeWorkbenchGUIScreen.java | 2 + .../custom/blocks/Forge/ForgeItemRecipe.java | 2 + .../net/halbear/aotg/registries/ModItems.java | 13 +- .../net/halbear/aotg/registries/ModTabs.java | 4 +- .../ForgeWorkbenchGuiButtonHandler.java | 9 +- .../ageofthegods/Items/electrum_coin.json | 6 + .../assets/ageofthegods/Items/kopis.json | 6 + .../assets/ageofthegods/lang/en_us.json | 2 + .../models/item/electrum_coin.json | 6 + .../models/item/kopis/kopis_sword.json | 130 ++++++++++++++++++ .../textures/item/electrum_coin.png | Bin 0 -> 373 bytes .../textures/item/kopis_sword.png | Bin 0 -> 1104 bytes .../ageofthegods/recipe/electrum_coin.json | 11 ++ 14 files changed, 187 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/assets/ageofthegods/Items/electrum_coin.json create mode 100644 src/main/resources/assets/ageofthegods/Items/kopis.json create mode 100644 src/main/resources/assets/ageofthegods/models/item/electrum_coin.json create mode 100644 src/main/resources/assets/ageofthegods/models/item/kopis/kopis_sword.json create mode 100644 src/main/resources/assets/ageofthegods/textures/item/electrum_coin.png create mode 100644 src/main/resources/assets/ageofthegods/textures/item/kopis_sword.png create mode 100644 src/main/resources/data/ageofthegods/recipe/electrum_coin.json diff --git a/gradle.properties b/gradle.properties index 1c8bac2..5fb6867 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ mod_name=Age of the Gods # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=All Rights Reserved # The mod version. See https://semver.org/ -mod_version=0.0.2 +mod_version=0.0.3 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/net/halbear/aotg/custom/GuiScreens/ForgeWorkbenchGUIScreen.java b/src/main/java/net/halbear/aotg/custom/GuiScreens/ForgeWorkbenchGUIScreen.java index 977f22e..9787960 100644 --- a/src/main/java/net/halbear/aotg/custom/GuiScreens/ForgeWorkbenchGUIScreen.java +++ b/src/main/java/net/halbear/aotg/custom/GuiScreens/ForgeWorkbenchGUIScreen.java @@ -125,6 +125,8 @@ public class ForgeWorkbenchGUIScreen extends AbstractContainerScreen previewList = new ArrayList<>(); previewList.add(new ItemStack(ModItems.XIPHOS_SWORD.asItem())); + previewList.add(new ItemStack(ModItems.KOPIS_SWORD.asItem())); + previewList.add(new ItemStack(ModItems.ELECTRUM_COIN.asItem())); previewList.add(new ItemStack(ModItems.BRONZE_INGOT.asItem())); previewList.add(new ItemStack(ModItems.ORICHALCUM_INGOT.asItem())); previewList.add(new ItemStack(ModItems.ELECTRUM_INGOT.asItem())); diff --git a/src/main/java/net/halbear/aotg/custom/blocks/Forge/ForgeItemRecipe.java b/src/main/java/net/halbear/aotg/custom/blocks/Forge/ForgeItemRecipe.java index 16e9a8a..9f22d0b 100644 --- a/src/main/java/net/halbear/aotg/custom/blocks/Forge/ForgeItemRecipe.java +++ b/src/main/java/net/halbear/aotg/custom/blocks/Forge/ForgeItemRecipe.java @@ -16,6 +16,8 @@ public record ForgeItemRecipe(Item primaryOutcomeItem, Item[] RequiredItems, int public static final Map> ITEM_RECIPE_REVERSE_LOOKUP = new LinkedHashMap<>(); static{ FORGE_ITEM_RECIPE_MAP.put(ModItems.XIPHOS_SWORD.asItem(),new ForgeItemRecipe(ModItems.XIPHOS_SWORD.asItem(),new Item[]{ModItems.BRONZE_INGOT.asItem(), Items.STICK},new int[]{2,1})); + FORGE_ITEM_RECIPE_MAP.put(ModItems.KOPIS_SWORD.asItem(),new ForgeItemRecipe(ModItems.KOPIS_SWORD.asItem(),new Item[]{ModItems.BRONZE_INGOT.asItem(), Items.STICK},new int[]{2,1})); + FORGE_ITEM_RECIPE_MAP.put(ModItems.ELECTRUM_COIN.asItem(),new ForgeItemRecipe(ModItems.ELECTRUM_COIN.asItem(),new Item[]{ModItems.ELECTRUM_INGOT.asItem()},new int[]{1,0})); CompileReverseLookupMap(); } diff --git a/src/main/java/net/halbear/aotg/registries/ModItems.java b/src/main/java/net/halbear/aotg/registries/ModItems.java index 9728e2d..155c4ab 100644 --- a/src/main/java/net/halbear/aotg/registries/ModItems.java +++ b/src/main/java/net/halbear/aotg/registries/ModItems.java @@ -52,18 +52,29 @@ public class ModItems { public static final DeferredItem HARDENED_SLAG = RegisterItem("slag", Item::new); public static final DeferredItem RAW_ZINC = RegisterItem("raw_zinc", Item::new); public static final DeferredItem RAW_SILVER = RegisterItem("raw_silver", Item::new); + public static final DeferredItem ELECTRUM_COIN = RegisterItem("electrum_coin", Item::new); public static final DeferredItem RAW_TIN = RegisterItem("raw_tin", Item::new); public static final DeferredItem XIPHOS_SWORD = RegisterItem("xiphos", properties -> new Item(properties .tool(ModTiers.SWORD_TIER, BlockTags.SWORD_EFFICIENT, - 3.0f, + 4.6f, -2.4f, 1.0f ).durability(1900) ) ); + public static final DeferredItem KOPIS_SWORD = RegisterItem("kopis", + properties -> new Item(properties + .tool(ModTiers.SWORD_TIER, + BlockTags.SWORD_EFFICIENT, + 3.0f, + -1.5f, + 1.0f + ).durability(1800) + ) + ); private static DeferredItem RegisterItem(String Name, Function function){ DeferredItem newBlock = ITEMS.registerItem(Name, function); diff --git a/src/main/java/net/halbear/aotg/registries/ModTabs.java b/src/main/java/net/halbear/aotg/registries/ModTabs.java index 103f132..c83f0c9 100644 --- a/src/main/java/net/halbear/aotg/registries/ModTabs.java +++ b/src/main/java/net/halbear/aotg/registries/ModTabs.java @@ -39,6 +39,7 @@ public class ModTabs { output.accept(LIMESTONE_GRASS_ITEM.get()); output.accept(OLIVE_LEAVES_ITEM.get()); output.accept(OLIVE_LOG_ITEM.get()); + output.accept(OLIVE_PLANKS_ITEM.get()); output.accept(OLIVE_FENCE_GATE_ITEM.get()); output.accept(OLIVE_FENCE_ITEM.get()); output.accept(OLIVE_STAIRS_ITEM.get()); @@ -63,8 +64,9 @@ public class ModTabs { output.accept(ELECTRUM_INGOT.get()); output.accept(HEPATIZON_INGOT.get()); output.accept(ORICHALCUM_INGOT.get()); - output.accept(OLIVE_PLANKS_ITEM.get()); output.accept(HARDENED_SLAG.get()); output.accept(XIPHOS_SWORD.get()); + output.accept(KOPIS_SWORD.get()); + output.accept(ELECTRUM_COIN.get()); }).build()); } diff --git a/src/main/java/net/halbear/aotg/utility/Networking/ForgeWorkbenchGuiButtonHandler.java b/src/main/java/net/halbear/aotg/utility/Networking/ForgeWorkbenchGuiButtonHandler.java index c2f3433..01804eb 100644 --- a/src/main/java/net/halbear/aotg/utility/Networking/ForgeWorkbenchGuiButtonHandler.java +++ b/src/main/java/net/halbear/aotg/utility/Networking/ForgeWorkbenchGuiButtonHandler.java @@ -131,10 +131,13 @@ public record ForgeWorkbenchGuiButtonHandler(int buttonID, String ResultItem, in ItemStack Alloy = CraftResult[1]; ItemStack Slag = CraftResult[2]; ItemStack ResultItem = ItemStack.EMPTY; - if(Alloy.getItem() == item_recipe.RequiredItems()[0] && Alloy.getCount() >= item_recipe.RequiredItemCounts()[0] - && Secondary.getItem() == item_recipe.RequiredItems()[1] && Secondary.getCount() >= item_recipe.RequiredItemCounts()[1]){ + if(item_recipe.RequiredItems().length == 2 && Alloy.getItem() == item_recipe.RequiredItems()[0] && Alloy.getCount() >= item_recipe.RequiredItemCounts()[0] + && Secondary.getItem() == item_recipe.RequiredItems()[1] && Secondary.getCount() >= item_recipe.RequiredItemCounts()[1] || + item_recipe.RequiredItems().length == 1 && Alloy.getItem() == item_recipe.RequiredItems()[0] && Alloy.getCount() >= item_recipe.RequiredItemCounts()[0]){ Alloy.setCount(Alloy.getCount() - item_recipe.RequiredItemCounts()[0]); - Secondary.setCount(Secondary.getCount() - item_recipe.RequiredItemCounts()[1]); + if(item_recipe.RequiredItems().length == 2) { + Secondary.setCount(Secondary.getCount() - item_recipe.RequiredItemCounts()[1]); + } ResultItem = new ItemStack(item_recipe.primaryOutcomeItem(), 1); } forgeWorkbenchBlockEntity.setItem(2,ResultItem); diff --git a/src/main/resources/assets/ageofthegods/Items/electrum_coin.json b/src/main/resources/assets/ageofthegods/Items/electrum_coin.json new file mode 100644 index 0000000..e06c8de --- /dev/null +++ b/src/main/resources/assets/ageofthegods/Items/electrum_coin.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:item/electrum_coin" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/Items/kopis.json b/src/main/resources/assets/ageofthegods/Items/kopis.json new file mode 100644 index 0000000..fef4dd3 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/Items/kopis.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:item/kopis/kopis_sword" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/lang/en_us.json b/src/main/resources/assets/ageofthegods/lang/en_us.json index 93b23ca..3baabcf 100644 --- a/src/main/resources/assets/ageofthegods/lang/en_us.json +++ b/src/main/resources/assets/ageofthegods/lang/en_us.json @@ -27,6 +27,7 @@ "gui.ageofthegods.forge_workbench.title": "Forge", "item.ageofthegods.xiphos": "Xiphos", + "item.ageofthegods.kopis": "Kopis", "item.ageofthegods.zinc_ingot": "Zinc Ingot", "item.ageofthegods.raw_zinc": "Raw Zinc", "item.ageofthegods.raw_tin": "Raw Tin", @@ -35,6 +36,7 @@ "item.ageofthegods.silver_ingot": "Silver Ingot", "item.ageofthegods.bronze_ingot": "Bronze Ingot", "item.ageofthegods.electrum_ingot": "Electrum Ingot", + "item.ageofthegods.electrum_coin": "Electrum Coin", "item.ageofthegods.hepatizon_ingot": "Hepatizon Ingot", "item.ageofthegods.orichalcum_ingot": "Orichalcum Ingot", "item.ageofthegods.fluid_indicator_debug_item": "Molten Alloy Mixture: ", diff --git a/src/main/resources/assets/ageofthegods/models/item/electrum_coin.json b/src/main/resources/assets/ageofthegods/models/item/electrum_coin.json new file mode 100644 index 0000000..20bb82a --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/item/electrum_coin.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "ageofthegods:item/electrum_coin" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/item/kopis/kopis_sword.json b/src/main/resources/assets/ageofthegods/models/item/kopis/kopis_sword.json new file mode 100644 index 0000000..d81b69e --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/item/kopis/kopis_sword.json @@ -0,0 +1,130 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "0": "ageofthegods:item/kopis_sword", + "particle": "ageofthegods:item/kopis_sword" + }, + "elements": [ + { + "from": [5.5, -4, 7.5], + "to": [10.5, 5, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 0, 6.5]}, + "faces": { + "north": {"uv": [5, 0, 6.25, 2.25], "texture": "#0"}, + "east": {"uv": [6.5, 4.5, 6.75, 6.75], "texture": "#0"}, + "south": {"uv": [5, 2.5, 6.25, 4.75], "texture": "#0"}, + "west": {"uv": [7, 4.5, 7.25, 6.75], "texture": "#0"}, + "up": {"uv": [2.75, 7.5, 1.5, 7.25], "texture": "#0"}, + "down": {"uv": [4.25, 7.25, 3, 7.5], "texture": "#0"} + } + }, + { + "from": [5.5, -4, 8.5], + "to": [10.5, 5, 7.5], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 0, 7.5]}, + "faces": { + "north": {"uv": [5, 0, 6.25, 2.25], "texture": "#0"}, + "east": {"uv": [6.5, 4.5, 6.75, 6.75], "texture": "#0"}, + "south": {"uv": [5, 2.5, 6.25, 4.75], "texture": "#0"}, + "west": {"uv": [7, 4.5, 7.25, 6.75], "texture": "#0"}, + "up": {"uv": [2.75, 7.5, 1.5, 7.25], "texture": "#0"}, + "down": {"uv": [4.25, 7.25, 3, 7.5], "texture": "#0"} + } + }, + { + "from": [5.4, -4.1, 7.4], + "to": [10.6, 5.1, 8.6], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 0, 6.5]}, + "faces": { + "north": {"uv": [5, 5, 6.25, 7.25], "texture": "#0"}, + "east": {"uv": [6.5, 7, 6.75, 9.25], "texture": "#0"}, + "south": {"uv": [0, 6.5, 1.25, 8.75], "texture": "#0"}, + "west": {"uv": [7, 7, 7.25, 9.25], "texture": "#0"}, + "up": {"uv": [5.75, 7.75, 4.5, 7.5], "texture": "#0"}, + "down": {"uv": [8.75, 4.5, 7.5, 4.75], "texture": "#0"} + } + }, + { + "from": [4.5, 6, 8], + "to": [13.5, 31, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, 6, 7]}, + "faces": { + "north": {"uv": [4.75, 0, 2.5, 6.25], "texture": "#0"}, + "east": {"uv": [6, 7.5, 6, 13.75], "texture": "#0"}, + "south": {"uv": [2.5, 0, 4.75, 6.25], "texture": "#0"}, + "west": {"uv": [6.25, 7.5, 6.25, 13.75], "texture": "#0"}, + "up": {"uv": [3.75, 7.75, 1.5, 7.75], "texture": "#0"}, + "down": {"uv": [3.75, 8, 1.5, 8], "texture": "#0"} + } + }, + { + "from": [5, 5, 7.25], + "to": [11, 7, 8.75], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 5, 7]}, + "faces": { + "north": {"uv": [6.5, 0, 8, 0.5], "texture": "#0"}, + "east": {"uv": [7.5, 5, 8, 5.5], "texture": "#0"}, + "south": {"uv": [6.5, 0.75, 8, 1.25], "texture": "#0"}, + "west": {"uv": [7.5, 5.75, 8, 6.25], "texture": "#0"}, + "up": {"uv": [3, 7, 1.5, 6.5], "texture": "#0"}, + "down": {"uv": [8, 1.5, 6.5, 2], "texture": "#0"} + } + }, + { + "from": [4.75, 4.75, 7], + "to": [11.25, 7.25, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 5, 7]}, + "faces": { + "north": {"uv": [6.5, 2.25, 8, 2.75], "texture": "#0"}, + "east": {"uv": [7.5, 6.5, 8, 7], "texture": "#0"}, + "south": {"uv": [6.5, 3, 8, 3.5], "texture": "#0"}, + "west": {"uv": [7.5, 7.25, 8, 7.75], "texture": "#0"}, + "up": {"uv": [4.75, 7, 3.25, 6.5], "texture": "#0"}, + "down": {"uv": [8, 3.75, 6.5, 4.25], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [0, 90, 0], + "translation": [0, 4.5, 0.75] + }, + "thirdperson_lefthand": { + "rotation": [0, -90, 0], + "translation": [0, 4.25, 1.75] + }, + "firstperson_righthand": { + "rotation": [0, 90, 22], + "translation": [0, 3, 0], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_lefthand": { + "rotation": [0, -90, -22], + "translation": [0, 3.5, 0], + "scale": [0.5, 0.5, 0.5] + }, + "ground": { + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [0, 0, -45], + "translation": [-2.5, -2.5, 0], + "scale": [0.6, 0.6, 0.6] + }, + "head": { + "rotation": [-90, 0, 0], + "translation": [0, 7, 0] + }, + "fixed": { + "rotation": [0, 0, 45], + "translation": [2.75, -2.75, 0], + "scale": [0.7, 0.7, 0.7] + }, + "on_shelf": { + "rotation": [0, 0, -180], + "scale": [0.85, 0.85, 0.85] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/textures/item/electrum_coin.png b/src/main/resources/assets/ageofthegods/textures/item/electrum_coin.png new file mode 100644 index 0000000000000000000000000000000000000000..ca8be88d6e628fb60428afa64538da76a17700bc GIT binary patch literal 373 zcmV-*0gC>KP)Px$FG)l}R5*=&l09z1KoCaXA|C*`*$T^Y6Is+0Q7YU=h_tx^Tz~_lOO+e}>L@~# zArg`+S|UW_SWX%@C^sNYX0^Mv^ELL4_IvZQqv+84>%+x9k0%S&cCQf>qmB|n9h>-Z zzikC6-<*yz0M2#kfCYBkZykvFd3nCST;I(bMqiNk>To zR96M#$wKw~U^>bSBpqc9m@g&S#cbCVZh?+h z5e02QyW~*EPBs0((7D^2&Q|J_uboNTefwr<>23MMbhc6fKz}eK)UkPEG234=18<;a zkz@-6U{~VL=&;)`f6NtKt1NrpCfnQq@VAu!vYC?ku-gDQ=2n0Y0{H$c8%EJD*1Nw? Tx23)$00000NkvXXu0mjfVlAM! literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/ageofthegods/textures/item/kopis_sword.png b/src/main/resources/assets/ageofthegods/textures/item/kopis_sword.png new file mode 100644 index 0000000000000000000000000000000000000000..b53d6ab753d5d18e156ad5eabd644ea21b09f85d GIT binary patch literal 1104 zcmV-W1h4yvP)sOBl;~qOTzi)7K z?;ZneZ{J!Ofcy7W2O7-9L?Z%R9Dcd}socJGw%FDyjrrSm{Q|75^$QI%8S&DX02dYP zp4n2AGczWQo~F}yfh}j)n`b+R?D6?#{n=G6O9O1@4t8Q`OB~0Lpv>d z+8hTkG>FvjCIIOZ03@)Jqx`;jV82O}8$W&;6D@n%90y<~BVN1-80V{yGPh&4K>m^g zu3lLl0A#N*ZoO&GdlSIU*ExkcAmQxwYlV=Gz#g5@q??&-4^=2N${ ze4%*o;iLHuB6ooNHHyf8-UQ4q9ISPjAb|u~WejP6d{Q+Za?G0moI7{sv?*$6+mPyy zO3aTB}nj9Hu8K5cW(l8KomQ65LA9k ze=9)jI4V?zh5DmTP+imHw}ELyxHuEQ*%$x5e)~SM5W)sx02Lu%OhBC=ZMkDB?a+5; z0!Vh61Q$oyZJ=$*5%k%0KszR!3D8cSICi8!1$wNi{pRyV3G^H}f<8wB(2fZ&0yx*& zS$^N^zTK|-6mm3x{Y>b-7XjM2T|4KD3hGE8A=)HJoxm3Y=rv=sy$C?E0#|1t0b2=H zasX-q%*BKk0Z3Nk(Ua%qU)?$Y3Dn+s3086dnIGt9W3+o@X<)yc3=IfK!?u$-yHaH5 zH3=w(XBp?73VLK|(3V4dE?Em=2v$fyIgFFhMtGDl#NWajFW5X^CNeI|sRAt1zyW70C8-y-h(S3HKH>CsqIK; zf3gBXGoIS}vI0`uk