Skip to content

Commit

Permalink
Add Emerald Tools (w/o crafting)
Browse files Browse the repository at this point in the history
  • Loading branch information
xYundy committed Mar 16, 2024
1 parent 1d886fb commit df121ba
Show file tree
Hide file tree
Showing 19 changed files with 81 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ Project Link: [https://github.com/xYundy/SquaredAdditions](https://github.com/xY
* [Modding by Kaupenjoe](https://www.youtube.com/@ModdingByKaupenjoe)
* [Blockbench](https://www.blockbench.net) - A low-poly 3D model editor
* [Img Shields](https://shields.io)
* [Piskel](https://www.piskelapp.com/p/create/sprite)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down
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.7

# Mod Properties
mod_version=0.3.0
mod_version=0.4.0
maven_group=pl.xyundy.squaredadditions
archives_base_name=squaredadditions

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// 1.20.1 2024-03-07T23:18:18.414589 Squared Additions/Model Definitions
// 1.20.1 2024-03-16T18:24:45.868883 Squared Additions/Model Definitions
71776dfec5b5f01ce4a9d3b3e000c3bf53bd5bf5 assets/squaredadditions/models/item/copper_shovel.json
d12673ccac5079afad74fa93feb5535be7cbcb26 assets/squaredadditions/models/item/emerald_shovel.json
6f15bf8607ada3d987a355d2f2a351969840e7e1 assets/squaredadditions/models/item/emerald_sword.json
cbae0d76c7081cc2a6373ced0f6186dc4551aa9d assets/squaredadditions/models/item/emerald_axe.json
176ad04c6ba42342adc0e6c5fd107be0e63c65b6 assets/squaredadditions/models/item/emerald_hoe.json
9011be1ee37f6ae56b0d484b34eac096b9f6e907 assets/squaredadditions/models/item/emerald_pickaxe.json
5dc59b79a3e713f07045de3613f4ed4b3e29befc assets/squaredadditions/models/item/copper_sword.json
32fe678c1527b64ea225930db2db5251c0a7ba7a assets/squaredadditions/models/item/copper_pickaxe.json
f6bd2f2c35340d899a2928bdacb127ca28140e3d assets/squaredadditions/models/item/copper_hoe.json
e707267f36198cf7a546e3b58db73fa98b8e056a assets/squaredadditions/models/item/copper_axe.json
f6bd2f2c35340d899a2928bdacb127ca28140e3d assets/squaredadditions/models/item/copper_hoe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/emerald_axe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/emerald_hoe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/emerald_pickaxe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/emerald_shovel"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "squaredadditions:item/emerald_sword"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ public void generateItemModels(ItemModelGenerator itemModelGenerator) {
itemModelGenerator.register(ModItems.COPPER_SHOVEL, Models.HANDHELD);
itemModelGenerator.register(ModItems.COPPER_AXE, Models.HANDHELD);
itemModelGenerator.register(ModItems.COPPER_HOE, Models.HANDHELD);
itemModelGenerator.register(ModItems.EMERALD_SWORD, Models.HANDHELD);
itemModelGenerator.register(ModItems.EMERALD_PICKAXE, Models.HANDHELD);
itemModelGenerator.register(ModItems.EMERALD_SHOVEL, Models.HANDHELD);
itemModelGenerator.register(ModItems.EMERALD_AXE, Models.HANDHELD);
itemModelGenerator.register(ModItems.EMERALD_HOE, Models.HANDHELD);
}
}
17 changes: 17 additions & 0 deletions src/main/java/pl/xyundy/squaredadditions/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ public class ModItems {
public static final Item COPPER_HOE = registerItem("copper_hoe",
new HoeItem(ModToolMaterial.COPPER_INGOT, 0, 0f, new FabricItemSettings()));

public static final Item EMERALD_SWORD = registerItem("emerald_sword",
new SwordItem(ModToolMaterial.EMERALD, 2, 2f, new FabricItemSettings()));
public static final Item EMERALD_PICKAXE = registerItem("emerald_pickaxe",
new PickaxeItem(ModToolMaterial.EMERALD, 1, 1f, new FabricItemSettings()));
public static final Item EMERALD_SHOVEL = registerItem("emerald_shovel",
new ShovelItem(ModToolMaterial.EMERALD, 0, 0f, new FabricItemSettings()));
public static final Item EMERALD_AXE = registerItem("emerald_axe",
new AxeItem(ModToolMaterial.EMERALD, 6, -2f, new FabricItemSettings()));
public static final Item EMERALD_HOE = registerItem("emerald_hoe",
new HoeItem(ModToolMaterial.EMERALD, 0, 0f, new FabricItemSettings()));



private static Item registerItem(String name, Item item) {
Expand All @@ -32,12 +43,18 @@ private static Item registerItem(String name, Item item) {
public static void itemGroupCombat(FabricItemGroupEntries entries) {
entries.add(COPPER_SWORD);
entries.add(COPPER_PICKAXE);
entries.add(EMERALD_SWORD);
entries.add(EMERALD_PICKAXE);
}
public static void itemGroupTools(FabricItemGroupEntries entries) {
entries.add(COPPER_PICKAXE);
entries.add(COPPER_SHOVEL);
entries.add(COPPER_AXE);
entries.add(COPPER_HOE);
entries.add(EMERALD_PICKAXE);
entries.add(EMERALD_SHOVEL);
entries.add(EMERALD_AXE);
entries.add(EMERALD_HOE);
}

public static void registerModItems() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import java.util.function.Supplier;

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));
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));

private final int miningLevel;
private final int itemDurability;
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/assets/squaredadditions/lang/de_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
"item.squaredadditions.copper_shovel": "Kupfer Schaufel",
"item.squaredadditions.copper_hoe": "Kupfer Hacke",
"item.squaredadditions.copper_axe": "Kupfer Axt",
"item.squaredadditions.copper_pickaxe": "Kupfer Spitzhacke"
"item.squaredadditions.copper_pickaxe": "Kupfer Spitzhacke",
"item.squaredadditions.emerald_sword": "Smaragd Schwert",
"item.squaredadditions.emerald_shovel": "Smaragd Schaufel",
"item.squaredadditions.emerald_hoe": "Smaragd Hacke",
"item.squaredadditions.emerald_axe": "Smaragd Axt",
"item.squaredadditions.emerald_pickaxe": "Smaragd Spitzhacke"
}
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 @@ -9,5 +9,10 @@
"item.squaredadditions.copper_shovel": "Copper Shovel",
"item.squaredadditions.copper_hoe": "Copper Hoe",
"item.squaredadditions.copper_axe": "Copper Axe",
"item.squaredadditions.copper_pickaxe": "Copper Pickaxe"
"item.squaredadditions.copper_pickaxe": "Copper Pickaxe",
"item.squaredadditions.emerald_sword": "Emerald Sword",
"item.squaredadditions.emerald_shovel": "Emerald Shovel",
"item.squaredadditions.emerald_hoe": "Emerald Hoe",
"item.squaredadditions.emerald_axe": "Emerald Axe",
"item.squaredadditions.emerald_pickaxe": "Emerald 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 @@ -10,5 +10,10 @@
"item.squaredadditions.copper_shovel": "Miedziana Łopata",
"item.squaredadditions.copper_hoe": "Miedziana Motyka",
"item.squaredadditions.copper_axe": "Miedziana Siekiera",
"item.squaredadditions.copper_pickaxe": "Miedziany Kilof"
"item.squaredadditions.copper_pickaxe": "Miedziany Kilof",
"item.squaredadditions.emerald_sword": "Szmaragdowy Miecz",
"item.squaredadditions.emerald_shovel": "Szmaragdowa Łopata",
"item.squaredadditions.emerald_hoe": "Szmaragdowa Motyka",
"item.squaredadditions.emerald_axe": "Szmaragdowa Siekiera",
"item.squaredadditions.emerald_pickaxe": "Szmaragdowy 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.

0 comments on commit df121ba

Please sign in to comment.