From 6d40d8a4bacad7bb0956f9e8e24599130d4caa44 Mon Sep 17 00:00:00 2001 From: Seeloewen Date: Tue, 23 Jul 2024 12:59:53 +0200 Subject: [PATCH 1/3] Add support for bows --- .../listener/ConfigMigrationListener.java | 3 +++ .../com/rappytv/toolwarn/util/WarnTool.java | 11 +++++++---- .../resources/assets/toolwarn/i18n/de_de.json | 1 + .../resources/assets/toolwarn/i18n/en_us.json | 1 + .../assets/toolwarn/textures/tools.png | Bin 6377 -> 9204 bytes 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java b/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java index 05e9c38..701f6d5 100644 --- a/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java +++ b/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java @@ -41,6 +41,7 @@ private void migrateFromOne(ConfigurationVersionUpdateEvent event) { int pickaxe = defaultPercentage; int axe = defaultPercentage; int shovel = defaultPercentage; + int bow = defaultPercentage; int crossbow = defaultPercentage; int lighter = defaultPercentage; int shears = defaultPercentage; @@ -55,6 +56,7 @@ private void migrateFromOne(ConfigurationVersionUpdateEvent event) { pickaxe = config.get("pickaxePercentage").getAsInt(); axe = config.get("axePercentage").getAsInt(); shovel = config.get("shovelPercentage").getAsInt(); + bow = config.get("bowPercentage").getAsInt(); crossbow = config.get("crossbowPercentage").getAsInt(); lighter = config.get("lighterPercentage").getAsInt(); shears = config.get("shearsPercentage").getAsInt(); @@ -68,6 +70,7 @@ private void migrateFromOne(ConfigurationVersionUpdateEvent event) { tools.add(gson.toJsonTree(new WarnTool(Type.PICKAXE, warnSound, lastHitSound, pickaxe, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.AXE, warnSound, lastHitSound, axe, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.SHOVEL, warnSound, lastHitSound, shovel, openChat, lastHitWarn))); + tools.add(gson.toJsonTree(new WarnTool(Type.BOW, warnSound, lastHitSound, bow, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.CROSSBOW, warnSound, lastHitSound, crossbow, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.LIGHTER, warnSound, lastHitSound, lighter, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.SHEARS, warnSound, lastHitSound, shears, openChat, lastHitWarn))); diff --git a/core/src/main/java/com/rappytv/toolwarn/util/WarnTool.java b/core/src/main/java/com/rappytv/toolwarn/util/WarnTool.java index ada5414..1aec941 100644 --- a/core/src/main/java/com/rappytv/toolwarn/util/WarnTool.java +++ b/core/src/main/java/com/rappytv/toolwarn/util/WarnTool.java @@ -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; @@ -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")) { diff --git a/core/src/main/resources/assets/toolwarn/i18n/de_de.json b/core/src/main/resources/assets/toolwarn/i18n/de_de.json index 1a00470..2f5a5a4 100644 --- a/core/src/main/resources/assets/toolwarn/i18n/de_de.json +++ b/core/src/main/resources/assets/toolwarn/i18n/de_de.json @@ -34,6 +34,7 @@ "axe": "Axt", "shovel": "Schaufel", "hoe": "Hacke", + "bow": "Bogen", "crossbow": "Armbrust", "lighter": "Feuerzeug", "shears": "Schere", diff --git a/core/src/main/resources/assets/toolwarn/i18n/en_us.json b/core/src/main/resources/assets/toolwarn/i18n/en_us.json index d707cf3..3ee40c3 100644 --- a/core/src/main/resources/assets/toolwarn/i18n/en_us.json +++ b/core/src/main/resources/assets/toolwarn/i18n/en_us.json @@ -34,6 +34,7 @@ "axe": "Axe", "shovel": "Shovel", "hoe": "Hoe", + "bow": "Bow", "crossbow": "Crossbow", "lighter": "Flint and steel", "shears": "Shears", diff --git a/core/src/main/resources/assets/toolwarn/textures/tools.png b/core/src/main/resources/assets/toolwarn/textures/tools.png index 470ad8f99deefc193fd23855257ca758984b9fba..ed6b03fb5e45162ef55c0f54f8406c619096755d 100644 GIT binary patch literal 9204 zcmeHMcU)6h+P-uPii(b+0ue=QA)P=Z1_h*vuoM*pA-TDMP?C^DIt0t00*YWq1awps z6jV@AKx7oLP(+&26)A!=DFJEUO+eJ0*Yh8PG;^KcfdzxhPV9|%tnbr2Lw5UGDdxf6Xg9vY;8|yLs z*Y~ou4;Gk}`j7tZ{dj@fTKTFtt;1M_`T;9UHn~xGB}v;$8kbCX2%0p^{zvX(*BJ*| z3+SBYwsX#i@n-zo2TUb<+yb=-1Z>@YroO(ViN5|9gJ3gagQCdBk1Xf^YGHlJYK`)` zRqu|TC%rK=Txzx;-1&U^0{h))zYnT-rm>a7QklxV`zYbIatmD?l^tX@cFR3}lWS69 zXqtsuoqn+A_r{=DpW?UK!@zl4FzL-gIh#T(_Syc^sB2++wo9WU5P{Ro3d*eChn8PcTm87@@iAG)qk~cHw_dPg zU(BAVi=(~A_CB6VyIJ#ytB@9UeqQk$qXo9V1upBl^}Anqn!WptBJ$8oeM3+67rX62 zW7_o97ng0?EM;5fylivk=CDKZ=QMOjemg=j*F583i{`FNn7tsnQEq%+eHy{6)S6|r zN}@04^+3M%oYyi{=G9{x?sN=HZxG0)q^IQ6Nj7gVVSC?hoja#aRx>3tCQHtt6IgC> zpKg5QeWLnt(}%-KLDmwB?#t|T@2nxUXa@mYd~(y0hK4z(S6L6-&(DuvjE4f#mtI_*7pci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2&@a;gWI`J3W0y#xpaUM1G Date: Fri, 2 Aug 2024 00:53:32 +0200 Subject: [PATCH 2/3] Remove unnecessary migration for bows --- .../com/rappytv/toolwarn/listener/ConfigMigrationListener.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java b/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java index 701f6d5..05e9c38 100644 --- a/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java +++ b/core/src/main/java/com/rappytv/toolwarn/listener/ConfigMigrationListener.java @@ -41,7 +41,6 @@ private void migrateFromOne(ConfigurationVersionUpdateEvent event) { int pickaxe = defaultPercentage; int axe = defaultPercentage; int shovel = defaultPercentage; - int bow = defaultPercentage; int crossbow = defaultPercentage; int lighter = defaultPercentage; int shears = defaultPercentage; @@ -56,7 +55,6 @@ private void migrateFromOne(ConfigurationVersionUpdateEvent event) { pickaxe = config.get("pickaxePercentage").getAsInt(); axe = config.get("axePercentage").getAsInt(); shovel = config.get("shovelPercentage").getAsInt(); - bow = config.get("bowPercentage").getAsInt(); crossbow = config.get("crossbowPercentage").getAsInt(); lighter = config.get("lighterPercentage").getAsInt(); shears = config.get("shearsPercentage").getAsInt(); @@ -70,7 +68,6 @@ private void migrateFromOne(ConfigurationVersionUpdateEvent event) { tools.add(gson.toJsonTree(new WarnTool(Type.PICKAXE, warnSound, lastHitSound, pickaxe, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.AXE, warnSound, lastHitSound, axe, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.SHOVEL, warnSound, lastHitSound, shovel, openChat, lastHitWarn))); - tools.add(gson.toJsonTree(new WarnTool(Type.BOW, warnSound, lastHitSound, bow, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.CROSSBOW, warnSound, lastHitSound, crossbow, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.LIGHTER, warnSound, lastHitSound, lighter, openChat, lastHitWarn))); tools.add(gson.toJsonTree(new WarnTool(Type.SHEARS, warnSound, lastHitSound, shears, openChat, lastHitWarn))); From d8ed3a8db4c8d432af265a8890027f18fe399cdb Mon Sep 17 00:00:00 2001 From: Seeloewen Date: Fri, 2 Aug 2024 03:02:31 +0200 Subject: [PATCH 3/3] Bump version to 1.4.2 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 528d87b..13b71a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 {