Skip to content

Commit

Permalink
Add rose gold tools
Browse files Browse the repository at this point in the history
  • Loading branch information
xYundy committed Apr 5, 2024
1 parent 407bffd commit b585ebf
Show file tree
Hide file tree
Showing 22 changed files with 178 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.10
loader_version=0.15.9

# Mod Properties
mod_version=0.5.0
mod_version=0.6.0
maven_group=pl.xyundy.squaredadditions
archives_base_name=squaredadditions

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
// 1.20.1 2024-04-02T21:58:30.934128 Squared Additions/Model Definitions
// 1.20.1 2024-04-05T08:43:00.272929 Squared Additions/Model Definitions
3ceb6fe4e90e966a3f55f5738ca042b18f9a0ca1 assets/squaredadditions/models/block/rose_gold_block.json
6f15bf8607ada3d987a355d2f2a351969840e7e1 assets/squaredadditions/models/item/emerald_sword.json
cbae0d76c7081cc2a6373ced0f6186dc4551aa9d assets/squaredadditions/models/item/emerald_axe.json
f6d93aff2c2a7ee3e0f25897e8bd9c986ae407d5 assets/squaredadditions/blockstates/rose_gold_block.json
cbae0d76c7081cc2a6373ced0f6186dc4551aa9d assets/squaredadditions/models/item/emerald_axe.json
176ad04c6ba42342adc0e6c5fd107be0e63c65b6 assets/squaredadditions/models/item/emerald_hoe.json
0aa7b4259ef0cf273586e6aa78649b2887b01a87 assets/squaredadditions/models/item/rose_gold_ingot.json
5dc59b79a3e713f07045de3613f4ed4b3e29befc assets/squaredadditions/models/item/copper_sword.json
0aa7b4259ef0cf273586e6aa78649b2887b01a87 assets/squaredadditions/models/item/rose_gold_ingot.json
12047fd9df8844630b95d8484150f8da8291f3eb assets/squaredadditions/models/item/rose_gold_hoe.json
c6e40631f77833c121192098a1fe019f0572a914 assets/squaredadditions/models/item/rose_gold_axe.json
853303f1702ea6f952ad21034610a267e3cd5e1b assets/squaredadditions/models/item/rose_gold_sword.json
d78948e974a2e61bfaa7452b3087855095fda779 assets/squaredadditions/models/item/rose_gold_shovel.json
71776dfec5b5f01ce4a9d3b3e000c3bf53bd5bf5 assets/squaredadditions/models/item/copper_shovel.json
39afaac6b756f9390a49ed7cc14c1988f5027523 assets/squaredadditions/models/item/rose_gold_block.json
d12673ccac5079afad74fa93feb5535be7cbcb26 assets/squaredadditions/models/item/emerald_shovel.json
b365b18395cbd842714e2bfba774cb4db1810954 assets/squaredadditions/models/item/rose_gold_pickaxe.json
9011be1ee37f6ae56b0d484b34eac096b9f6e907 assets/squaredadditions/models/item/emerald_pickaxe.json
32fe678c1527b64ea225930db2db5251c0a7ba7a assets/squaredadditions/models/item/copper_pickaxe.json
e707267f36198cf7a546e3b58db73fa98b8e056a assets/squaredadditions/models/item/copper_axe.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/rose_gold_axe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/rose_gold_hoe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/rose_gold_pickaxe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/rose_gold_shovel"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/rose_gold_sword"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public void generateItemModels(ItemModelGenerator itemModelGenerator) {
itemModelGenerator.register(ModItems.EMERALD_SHOVEL, Models.HANDHELD);
itemModelGenerator.register(ModItems.EMERALD_AXE, Models.HANDHELD);
itemModelGenerator.register(ModItems.EMERALD_HOE, Models.HANDHELD);
itemModelGenerator.register(ModItems.ROSE_GOLD_SWORD, Models.HANDHELD);
itemModelGenerator.register(ModItems.ROSE_GOLD_PICKAXE, Models.HANDHELD);
itemModelGenerator.register(ModItems.ROSE_GOLD_SHOVEL, Models.HANDHELD);
itemModelGenerator.register(ModItems.ROSE_GOLD_AXE, Models.HANDHELD);
itemModelGenerator.register(ModItems.ROSE_GOLD_HOE, Models.HANDHELD);

itemModelGenerator.register(ModItems.ROSE_GOLD_INGOT, Models.GENERATED);
}
Expand Down
22 changes: 20 additions & 2 deletions src/main/java/pl/xyundy/squaredadditions/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ public class ModItems {

public static final Item ROSE_GOLD_INGOT = registerItem("rose_gold_ingot",
new Item(new FabricItemSettings()));
public static final Item ROSE_GOLD_SWORD = registerItem("rose_gold_sword",
new SwordItem(ModToolMaterial.ROSE_GOLD_INGOT, 3, -2.4F, new FabricItemSettings()));
public static final Item ROSE_GOLD_PICKAXE = registerItem("rose_gold_pickaxe",
new PickaxeItem(ModToolMaterial.ROSE_GOLD_INGOT, 1, -2.8F, new FabricItemSettings()));
public static final Item ROSE_GOLD_SHOVEL = registerItem("rose_gold_shovel",
new ShovelItem(ModToolMaterial.ROSE_GOLD_INGOT, 1.5F, -3.0F, new FabricItemSettings()));
public static final Item ROSE_GOLD_AXE = registerItem("rose_gold_axe",
new AxeItem(ModToolMaterial.ROSE_GOLD_INGOT, 6.0F, -3.0F, new FabricItemSettings()));
public static final Item ROSE_GOLD_HOE = registerItem("rose_gold_hoe",
new HoeItem(ModToolMaterial.ROSE_GOLD_INGOT, -1, -3.0F, new FabricItemSettings()));

private static Item registerItem(String name, Item item) {
return Registry.register(Registries.ITEM, new Identifier(SquaredAdditions.MOD_ID, name), item);
Expand All @@ -44,10 +54,13 @@ private static Item registerItem(String name, Item item) {

public static void itemGroupCombat(FabricItemGroupEntries entries) {
entries.add(COPPER_SWORD);
entries.add(COPPER_PICKAXE);
entries.add(COPPER_AXE);

entries.add(EMERALD_SWORD);
entries.add(EMERALD_PICKAXE);
entries.add(EMERALD_AXE);

entries.add(ROSE_GOLD_SWORD);
entries.add(ROSE_GOLD_AXE);
}
public static void itemGroupTools(FabricItemGroupEntries entries) {
entries.add(COPPER_PICKAXE);
Expand All @@ -59,6 +72,11 @@ public static void itemGroupTools(FabricItemGroupEntries entries) {
entries.add(EMERALD_SHOVEL);
entries.add(EMERALD_AXE);
entries.add(EMERALD_HOE);

entries.add(ROSE_GOLD_PICKAXE);
entries.add(ROSE_GOLD_SHOVEL);
entries.add(ROSE_GOLD_AXE);
entries.add(ROSE_GOLD_HOE);
}

public static void itemGroupIngredient(FabricItemGroupEntries entries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

public enum ModToolMaterial implements ToolMaterial {
COPPER_INGOT(ToolMaterials.STONE.getMiningLevel(), ToolMaterials.WOOD.getDurability(), ToolMaterials.IRON.getMiningSpeedMultiplier(), ToolMaterials.IRON.getAttackDamage(), ToolMaterials.STONE.getEnchantability(), () -> Ingredient.ofItems(Items.COPPER_INGOT)),
EMERALD(ToolMaterials.IRON.getMiningLevel(), ToolMaterials.DIAMOND.getDurability(), ToolMaterials.DIAMOND.getMiningSpeedMultiplier(), ToolMaterials.IRON.getAttackDamage(), ToolMaterials.DIAMOND.getEnchantability(), () -> Ingredient.ofItems(Items.EMERALD));
EMERALD(ToolMaterials.IRON.getMiningLevel(), ToolMaterials.DIAMOND.getDurability(), ToolMaterials.DIAMOND.getMiningSpeedMultiplier(), ToolMaterials.IRON.getAttackDamage(), ToolMaterials.DIAMOND.getEnchantability(), () -> Ingredient.ofItems(Items.EMERALD)),
ROSE_GOLD_INGOT(ToolMaterials.GOLD.getMiningLevel(), ToolMaterials.GOLD.getDurability() + COPPER_INGOT.getDurability(), ToolMaterials.GOLD.getMiningSpeedMultiplier(), ToolMaterials.GOLD.getAttackDamage(), ToolMaterials.GOLD.getEnchantability(), () -> Ingredient.ofItems(ModItems.ROSE_GOLD_INGOT));

private final int miningLevel;
private final int itemDurability;
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/assets/squaredadditions/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
"item.squaredadditions.emerald_axe": "Emerald Axe",
"item.squaredadditions.emerald_pickaxe": "Emerald Pickaxe",
"item.squaredadditions.rose_gold_ingot": "Rose Gold Ingot",
"block.squaredadditions.rose_gold_block": "Rose Gold Block"
"block.squaredadditions.rose_gold_block": "Rose Gold Block",
"item.squaredadditions.rose_gold_sword": "Rose Gold Sword",
"item.squaredadditions.rose_gold_shovel": "Rose Gold Shovel",
"item.squaredadditions.rose_gold_hoe": "Rose Gold Hoe",
"item.squaredadditions.rose_gold_axe": "Rose Gold Axe",
"item.squaredadditions.rose_gold_pickaxe": "Rose Gold Pickaxe"
}
7 changes: 6 additions & 1 deletion src/main/resources/assets/squaredadditions/lang/pl_pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@
"item.squaredadditions.emerald_axe": "Szmaragdowa Siekiera",
"item.squaredadditions.emerald_pickaxe": "Szmaragdowy Kilof",
"item.squaredadditions.rose_gold_ingot": "Sztabka Różowego Złota",
"block.squaredadditions.rose_gold_block": "Blok Różowego Złota"
"block.squaredadditions.rose_gold_block": "Blok Różowego Złota",
"item.squaredadditions.rose_gold_sword": "Różowozłoty Miecz",
"item.squaredadditions.rose_gold_shovel": "Różowozłota Łopata",
"item.squaredadditions.rose_gold_hoe": "Różowozłota Motyka",
"item.squaredadditions.rose_gold_axe": "Różowozłota Siekiera",
"item.squaredadditions.rose_gold_pickaxe": "Różowozłoty Kilof"
}
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
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"RR ",
"RS ",
" S "
],
"key": {
"R": {
"item": "squaredadditions:rose_gold_ingot"
},
"S": {
"item": "minecraft:stick"
}
},
"result": {
"item": "squaredadditions:rose_gold_axe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"RR ",
" S ",
" S "
],
"key": {
"R": {
"item": "squaredadditions:rose_gold_ingot"
},
"S": {
"item": "minecraft:stick"
}
},
"result": {
"item": "squaredadditions:rose_gold_hoe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"RRR",
" S ",
" S "
],
"key": {
"R": {
"item": "squaredadditions:rose_gold_ingot"
},
"S": {
"item": "minecraft:stick"
}
},
"result": {
"item": "squaredadditions:rose_gold_pickaxe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
" R ",
" S ",
" S "
],
"key": {
"R": {
"item": "squaredadditions:rose_gold_ingot"
},
"S": {
"item": "minecraft:stick"
}
},
"result": {
"item": "squaredadditions:rose_gold_shovel"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
" R ",
" R ",
" S "
],
"key": {
"R": {
"item": "squaredadditions:rose_gold_ingot"
},
"S": {
"item": "minecraft:stick"
}
},
"result": {
"item": "squaredadditions:rose_gold_sword"
}
}

0 comments on commit b585ebf

Please sign in to comment.