diff --git a/gradle.properties b/gradle.properties index 956a7c3..22d63af 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,22 +3,22 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -libzontreck=1.10.011624.1712 +libzontreck=1.10.013124.1729 ## Environment Properties # The Minecraft version must agree with the Forge version to get a valid artifact -minecraft_version=1.18.2 +minecraft_version=1.19.2 # The Minecraft version range can use any release version of Minecraft as bounds. # Snapshots, pre-releases, and release candidates are not guaranteed to sort properly # as they do not follow standard versioning conventions. -minecraft_version_range=[1.18.2,1.19) +minecraft_version_range=[1.19,1.20) # The Forge version must agree with the Minecraft version to get a valid artifact -forge_version=40.2.17 +forge_version=43.3.0 # The Forge version range can use any version of Forge as bounds or match the loader version range -forge_version_range=[40,) +forge_version_range=[43,) # The loader version range can only use the major version of Forge/FML as bounds -loader_version_range=[40,) +loader_version_range=[43,) # The mapping channel to use for mappings. # The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"]. # Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin. @@ -36,7 +36,7 @@ loader_version_range=[40,) mapping_channel=parchment # The mapping version to query from the mapping channel. # This must match the format required by the mapping channel. -mapping_version=2022.11.06-1.18.2 +mapping_version=2022.11.27-1.19.2 ## Mod Properties @@ -49,7 +49,7 @@ mod_name=WatchMyDurability # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1.2.011624.1736 +mod_version=1.2.013124.1802 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..249e583 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 81b8f92..ae04661 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip -networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..a69d9cb 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,11 +80,11 @@ do esac done -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,16 +143,12 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac diff --git a/gradlew.bat b/gradlew.bat index 6689b85..53a6b23 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -26,7 +26,6 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% diff --git a/src/main/java/dev/zontreck/wmd/WatchMyDurability.java b/src/main/java/dev/zontreck/wmd/WatchMyDurability.java index 4516de4..1707751 100644 --- a/src/main/java/dev/zontreck/wmd/WatchMyDurability.java +++ b/src/main/java/dev/zontreck/wmd/WatchMyDurability.java @@ -113,7 +113,7 @@ public class WatchMyDurability { @SubscribeEvent - public static void onJoin(ClientPlayerNetworkEvent.LoggedInEvent event){ + public static void onJoin(ClientPlayerNetworkEvent.LoggingIn event){ // Joined //LOGGER.info("PLAYER LOGGED IN"); LOGGER.info(": : : PLAYER LOGGED IN : : :"); @@ -126,7 +126,7 @@ public class WatchMyDurability } @SubscribeEvent - public static void onLeave(ClientPlayerNetworkEvent.LoggedOutEvent event){ + public static void onLeave(ClientPlayerNetworkEvent.LoggingOut event){ //LOGGER.info("PLAYER LOGGED OUT"); LOGGER.info(": : : PLAYER LOGGED OUT : : :"); WatchMyDurability.isInGame=false; @@ -135,7 +135,7 @@ public class WatchMyDurability } @SubscribeEvent - public static void onClone(ClientPlayerNetworkEvent.RespawnEvent event) + public static void onClone(ClientPlayerNetworkEvent.Clone event) { LOGGER.info(": : : : PLAYER RESPAWNED OR MOVED TO A NEW WORLD : : : :"); diff --git a/src/main/java/dev/zontreck/wmd/checkers/CheckHealth.java b/src/main/java/dev/zontreck/wmd/checkers/CheckHealth.java index c755b41..2e99518 100644 --- a/src/main/java/dev/zontreck/wmd/checkers/CheckHealth.java +++ b/src/main/java/dev/zontreck/wmd/checkers/CheckHealth.java @@ -44,7 +44,7 @@ public class CheckHealth extends Task Component chat = ChatHelpers.macro(Msg); Minecraft.getInstance().player.displayClientMessage(chat, false); - SoundEvent sv = SoundEvents.ENDER_DRAGON_GROWL; + SoundEvent sv = SoundEvents.WARDEN_ROAR; Helpers.Soundify(sv); } diff --git a/src/main/java/dev/zontreck/wmd/checkers/CheckHunger.java b/src/main/java/dev/zontreck/wmd/checkers/CheckHunger.java index 0485598..62407d2 100644 --- a/src/main/java/dev/zontreck/wmd/checkers/CheckHunger.java +++ b/src/main/java/dev/zontreck/wmd/checkers/CheckHunger.java @@ -40,7 +40,7 @@ public class CheckHunger extends Task Component chat = ChatHelpers.macro(Msg); Minecraft.getInstance().player.displayClientMessage(chat, false); - SoundEvent sv = SoundEvents.ENDER_DRAGON_GROWL; // It sounds like a growling stomach + SoundEvent sv = SoundEvents.WARDEN_ROAR; // It sounds like a growling stomach Helpers.Soundify(sv); } diff --git a/src/main/java/dev/zontreck/wmd/networking/ModMessages.java b/src/main/java/dev/zontreck/wmd/networking/ModMessages.java index a746213..727b396 100644 --- a/src/main/java/dev/zontreck/wmd/networking/ModMessages.java +++ b/src/main/java/dev/zontreck/wmd/networking/ModMessages.java @@ -31,31 +31,31 @@ public class ModMessages net.messageBuilder(WMDServerAvailable.class, id(), NetworkDirection.PLAY_TO_CLIENT) .encoder(WMDServerAvailable::toBytes) .decoder(WMDServerAvailable::new) - .consumer(WMDServerAvailable::handle) + .consumerMainThread(WMDServerAvailable::handle) .add(); net.messageBuilder(S2CResetConfig.class, id(), NetworkDirection.PLAY_TO_CLIENT) .encoder(S2CResetConfig::toBytes) .decoder(S2CResetConfig::new) - .consumer(S2CResetConfig::handle) + .consumerMainThread(S2CResetConfig::handle) .add(); net.messageBuilder(RequestClientConfig.class, id(), NetworkDirection.PLAY_TO_CLIENT) .encoder(RequestClientConfig::toBytes) .decoder(RequestClientConfig::new) - .consumer(RequestClientConfig::handle) + .consumerMainThread(RequestClientConfig::handle) .add(); net.messageBuilder(ClientConfigResponse.class, id(), NetworkDirection.PLAY_TO_SERVER) .encoder(ClientConfigResponse::toBytes) .decoder(ClientConfigResponse::new) - .consumer(ClientConfigResponse::handle) + .consumerMainThread(ClientConfigResponse::handle) .add(); net.messageBuilder(PushClientConfigUpdate.class, id(), NetworkDirection.PLAY_TO_CLIENT) .encoder(PushClientConfigUpdate::toBytes) .decoder(PushClientConfigUpdate::new) - .consumer(PushClientConfigUpdate::handle) + .consumerMainThread(PushClientConfigUpdate::handle) .add(); } diff --git a/src/main/java/dev/zontreck/wmd/networking/packets/c2s/ClientConfigResponse.java b/src/main/java/dev/zontreck/wmd/networking/packets/c2s/ClientConfigResponse.java index fcfec0f..f641a30 100644 --- a/src/main/java/dev/zontreck/wmd/networking/packets/c2s/ClientConfigResponse.java +++ b/src/main/java/dev/zontreck/wmd/networking/packets/c2s/ClientConfigResponse.java @@ -18,7 +18,6 @@ import dev.zontreck.wmd.networking.packets.s2c.S2CResetConfig; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; @@ -61,7 +60,7 @@ public class ClientConfigResponse { try { ChestGUI prompt = ChestGUI.builder().withGUIId(new ChestGUIIdentifier("wmdsettings")).withPlayer(player.getUUID()).withTitle("WMD Settings"); ItemStack wtd = new ItemStack(Items.DIAMOND_PICKAXE, 1); - wtd.setHoverName(new TextComponent("Watch Tool Durability")); + wtd.setHoverName(Component.literal("Watch Tool Durability")); prompt.withButton(new ChestGUIButton(wtd, (stack, container, lore) -> { var wd = !tag.getBoolean("watchDurability"); @@ -80,7 +79,7 @@ public class ClientConfigResponse { ); ItemStack wmhunger = new ItemStack(Items.APPLE, 1); - wmhunger.setHoverName(new TextComponent("Watch My Hunger")); + wmhunger.setHoverName(Component.literal("Watch My Hunger")); prompt.withButton(new ChestGUIButton(wmhunger, (stack, container, lore) -> { var eh = !tag.getBoolean("watchMyHunger"); @@ -95,7 +94,7 @@ public class ClientConfigResponse { .withInfo(new LoreEntry.Builder().text(ChatColor.doColors("!Dark_Green!Status: " + (enableHunger ? "!Dark_Green!Enabled" : "!Dark_Red!Disabled"))).build()) ); ItemStack wmhealth = new ItemStack(Items.PUFFERFISH, 1); - wmhealth.setHoverName(new TextComponent("Watch My Health")); + wmhealth.setHoverName(Component.literal("Watch My Health")); prompt.withButton(new ChestGUIButton(wmhealth, (stack, container, lore) -> { var eh = !tag.getBoolean("watchMyHealth"); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 9f98b3a..51e7343 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -6,7 +6,7 @@ # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion="[40,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion="[43,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. license="GPLv2" @@ -51,7 +51,7 @@ modId="forge" #mandatory # Does this dependency have to exist - if not, ordering below must be specified mandatory=true #mandatory # The version range of the dependency -versionRange="[40,)" #mandatory +versionRange="[43,)" #mandatory # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory ordering="NONE" # Side this dependency is applied on - BOTH, CLIENT or SERVER @@ -61,6 +61,12 @@ side="BOTH" modId="minecraft" mandatory=true # This version range declares a minimum of the current minecraft version up to but not including the next major version -versionRange="[1.18.2,1.19)" +versionRange="[1.19,1.20)" +ordering="NONE" +side="BOTH" +[[dependencies.watchmydurability]] +modId="libzontreck" +mandatory=true +versionRange="[1.10,1.11)" ordering="NONE" side="BOTH" \ No newline at end of file