Skip to content

Commit

Permalink
Merge pull request #24 from Seeloewen/master
Browse files Browse the repository at this point in the history
Add support for bows
  • Loading branch information
RappyTV authored Aug 2, 2024
2 parents 4f02148 + d8ed3a8 commit 38c354a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ labyMod {
author = "RappyTV"
description = "Stops you from using your currently used tool when its almost destroyed."
minecraftVersion = "*"
version = System.getenv().getOrDefault("VERSION", "1.4.1")
version = System.getenv().getOrDefault("VERSION", "1.4.2")
}

minecraft {
Expand Down
11 changes: 7 additions & 4 deletions core/src/main/java/com/rappytv/toolwarn/util/WarnTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ public enum Type {
AXE(2, 0),
SHOVEL(3, 0),
HOE(0, 1),
CROSSBOW(1, 1),
LIGHTER(2, 1),
SHEARS(3, 1),
TRIDENT(0, 2);
BOW(1, 1),
CROSSBOW(2, 1),
LIGHTER(3, 1),
SHEARS(0, 2),
TRIDENT(1, 2);

private final ResourceLocation sprite = ResourceLocation.create("toolwarn", "textures/tools.png");
private final int x;
Expand Down Expand Up @@ -102,6 +103,8 @@ public static Type getByItem(ItemStack itemStack) {
return SHOVEL;
} else if (path.endsWith("_hoe")) {
return HOE;
} else if (path.equalsIgnoreCase("bow")) {
return BOW;
} else if (path.equalsIgnoreCase("crossbow")) {
return CROSSBOW;
} else if (path.equalsIgnoreCase("flint_and_steel")) {
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/assets/toolwarn/i18n/de_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"axe": "Axt",
"shovel": "Schaufel",
"hoe": "Hacke",
"bow": "Bogen",
"crossbow": "Armbrust",
"lighter": "Feuerzeug",
"shears": "Schere",
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/assets/toolwarn/i18n/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"axe": "Axe",
"shovel": "Shovel",
"hoe": "Hoe",
"bow": "Bow",
"crossbow": "Crossbow",
"lighter": "Flint and steel",
"shears": "Shears",
Expand Down
Binary file modified core/src/main/resources/assets/toolwarn/textures/tools.png
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 38c354a

Please sign in to comment.