Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for bows #24

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading