Compare commits

..

No commits in common. "1.18.2" and "main" have entirely different histories.
1.18.2 ... main

14 changed files with 105 additions and 80 deletions

View file

@ -2,7 +2,7 @@ plugins {
id 'eclipse' id 'eclipse'
id 'idea' id 'idea'
id 'maven-publish' id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1+' id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+' id 'org.parchmentmc.librarian.forgegradle' version '1.+'
} }
@ -41,6 +41,7 @@ minecraft {
// This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game.
// It is REQUIRED to be set to true for this template to function. // It is REQUIRED to be set to true for this template to function.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
copyIdeResources = true
// When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
// The folder name can be set on a run configuration using the "folderName" property. // The folder name can be set on a run configuration using the "folderName" property.
@ -53,7 +54,7 @@ minecraft {
// However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge. // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge.
// This default location is a best practice to automatically put the file in the right place in the final jar. // This default location is a best practice to automatically put the file in the right place in the final jar.
// See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information. // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations. // Default run configurations.
// These can be tweaked, removed, or duplicated as needed. // These can be tweaked, removed, or duplicated as needed.
@ -168,6 +169,24 @@ dependencies {
// http://www.gradle.org/docs/current/userguide/dependency_management.html // http://www.gradle.org/docs/current/userguide/dependency_management.html
} }
// This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
]
inputs.properties replaceProperties
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}
// Example for how to get properties into the manifest for reading at runtime. // Example for how to get properties into the manifest for reading at runtime.
tasks.named('jar', Jar).configure { tasks.named('jar', Jar).configure {

View file

@ -3,22 +3,22 @@
org.gradle.jvmargs=-Xmx3G org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false org.gradle.daemon=false
libzontreck=1.10.011624.1712 libzontreck=1.10.011524.0045
## Environment Properties ## Environment Properties
# The Minecraft version must agree with the Forge version to get a valid artifact # The Minecraft version must agree with the Forge version to get a valid artifact
minecraft_version=1.18.2 minecraft_version=1.20.1
# The Minecraft version range can use any release version of Minecraft as bounds. # 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 # Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
# as they do not follow standard versioning conventions. # as they do not follow standard versioning conventions.
minecraft_version_range=[1.18.2,1.19) minecraft_version_range=[1.20.1,1.21)
# The Forge version must agree with the Minecraft version to get a valid artifact # The Forge version must agree with the Minecraft version to get a valid artifact
forge_version=40.2.17 forge_version=47.2.0
# The Forge version range can use any version of Forge as bounds or match the loader version range # 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=[47,)
# The loader version range can only use the major version of Forge/FML as bounds # The loader version range can only use the major version of Forge/FML as bounds
loader_version_range=[40,) loader_version_range=[47,)
# The mapping channel to use for mappings. # The mapping channel to use for mappings.
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"]. # 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. # 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 mapping_channel=parchment
# The mapping version to query from the mapping channel. # The mapping version to query from the mapping channel.
# This must match the format required by the mapping channel. # This must match the format required by the mapping channel.
mapping_version=2022.11.06-1.18.2 mapping_version=2023.09.03-1.20.1
## Mod Properties ## 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. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3 mod_license=GPLv3
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=1.2.011624.1736 mod_version=1.2.011524.0055
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # 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. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html
@ -57,4 +57,4 @@ mod_group_id=dev.zontreck
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list. # The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=zontreck mod_authors=zontreck
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list. # The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=Watches the durability of tools, and or your hunger. mod_description=Watches the durability tools, and or your hunger.

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000 networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View file

@ -3,4 +3,8 @@ pluginManagement {
gradlePluginPortal() gradlePluginPortal()
maven { url = "https://maven.zontreck.com/repository/internal" } maven { url = "https://maven.zontreck.com/repository/internal" }
} }
}
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
} }

View file

@ -113,7 +113,7 @@ public class WatchMyDurability
{ {
@SubscribeEvent @SubscribeEvent
public static void onJoin(ClientPlayerNetworkEvent.LoggedInEvent event){ public static void onJoin(ClientPlayerNetworkEvent.LoggingIn event){
// Joined // Joined
//LOGGER.info("PLAYER LOGGED IN"); //LOGGER.info("PLAYER LOGGED IN");
LOGGER.info(": : : PLAYER LOGGED IN : : :"); LOGGER.info(": : : PLAYER LOGGED IN : : :");
@ -126,7 +126,7 @@ public class WatchMyDurability
} }
@SubscribeEvent @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");
LOGGER.info(": : : PLAYER LOGGED OUT : : :"); LOGGER.info(": : : PLAYER LOGGED OUT : : :");
WatchMyDurability.isInGame=false; WatchMyDurability.isInGame=false;
@ -135,7 +135,7 @@ public class WatchMyDurability
} }
@SubscribeEvent @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 : : : :"); LOGGER.info(": : : : PLAYER RESPAWNED OR MOVED TO A NEW WORLD : : : :");

View file

@ -2,7 +2,6 @@ package dev.zontreck.wmd.checkers;
import dev.zontreck.ariaslib.terminal.Task; import dev.zontreck.ariaslib.terminal.Task;
import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.wmd.types.Health; import dev.zontreck.wmd.types.Health;
import dev.zontreck.wmd.WatchMyDurability; import dev.zontreck.wmd.WatchMyDurability;
import dev.zontreck.wmd.configs.WMDClientConfig; import dev.zontreck.wmd.configs.WMDClientConfig;
@ -41,10 +40,10 @@ public class CheckHealth extends Task
if(current.shouldGiveAlert()) if(current.shouldGiveAlert())
{ {
String Msg = ChatColor.doColors("!Dark_Red!!bold!You need to eat!"); String Msg = ChatColor.doColors("!Dark_Red!!bold!You need to eat!");
Component chat = ChatHelpers.macro(Msg); Component chat = Component.literal(Msg);
Minecraft.getInstance().player.displayClientMessage(chat, false); Minecraft.getInstance().player.displayClientMessage(chat, false);
SoundEvent sv = SoundEvents.ENDER_DRAGON_GROWL; SoundEvent sv = SoundEvents.WARDEN_ROAR; // It sounds like a growling stomach
Helpers.Soundify(sv); Helpers.Soundify(sv);
} }

View file

@ -2,7 +2,6 @@ package dev.zontreck.wmd.checkers;
import dev.zontreck.ariaslib.terminal.Task; import dev.zontreck.ariaslib.terminal.Task;
import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.wmd.types.Hunger; import dev.zontreck.wmd.types.Hunger;
import dev.zontreck.wmd.WatchMyDurability; import dev.zontreck.wmd.WatchMyDurability;
import dev.zontreck.wmd.configs.WMDClientConfig; import dev.zontreck.wmd.configs.WMDClientConfig;
@ -37,10 +36,10 @@ public class CheckHunger extends Task
{ {
String Msg = ChatColor.doColors("!Dark_Red!!bold!You need to eat!"); String Msg = ChatColor.doColors("!Dark_Red!!bold!You need to eat!");
Component chat = ChatHelpers.macro(Msg); Component chat = Component.literal(Msg);
Minecraft.getInstance().player.displayClientMessage(chat, false); 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); Helpers.Soundify(sv);
} }

View file

@ -106,7 +106,7 @@ public class CheckInventory extends Task {
MutableComponent X = ChatHelpers.macro(replaced); MutableComponent X = Component.literal(replaced);
HoverEvent he = HoverTip.getItem(is1); HoverEvent he = HoverTip.getItem(is1);
Style s = Style.EMPTY.withFont(Style.DEFAULT_FONT).withHoverEvent(he); Style s = Style.EMPTY.withFont(Style.DEFAULT_FONT).withHoverEvent(he);

View file

@ -1,7 +1,6 @@
package dev.zontreck.wmd.commands.impl; package dev.zontreck.wmd.commands.impl;
import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import dev.zontreck.wmd.networking.ModMessages; import dev.zontreck.wmd.networking.ModMessages;
import dev.zontreck.wmd.networking.packets.s2c.RequestClientConfig; import dev.zontreck.wmd.networking.packets.s2c.RequestClientConfig;
import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.CommandSourceStack;
@ -16,11 +15,7 @@ public class SettingsCommand
public static int settingsPrompt(CommandSourceStack sender) public static int settingsPrompt(CommandSourceStack sender)
{ {
try { ModMessages.sendToPlayer(new RequestClientConfig(), sender.getPlayer());
ModMessages.sendToPlayer(new RequestClientConfig(), sender.getPlayerOrException());
} catch (CommandSyntaxException e) {
throw new RuntimeException(e);
}
return 0; return 0;
} }
} }

View file

@ -31,31 +31,31 @@ public class ModMessages
net.messageBuilder(WMDServerAvailable.class, id(), NetworkDirection.PLAY_TO_CLIENT) net.messageBuilder(WMDServerAvailable.class, id(), NetworkDirection.PLAY_TO_CLIENT)
.encoder(WMDServerAvailable::toBytes) .encoder(WMDServerAvailable::toBytes)
.decoder(WMDServerAvailable::new) .decoder(WMDServerAvailable::new)
.consumer(WMDServerAvailable::handle) .consumerMainThread(WMDServerAvailable::handle)
.add(); .add();
net.messageBuilder(S2CResetConfig.class, id(), NetworkDirection.PLAY_TO_CLIENT) net.messageBuilder(S2CResetConfig.class, id(), NetworkDirection.PLAY_TO_CLIENT)
.encoder(S2CResetConfig::toBytes) .encoder(S2CResetConfig::toBytes)
.decoder(S2CResetConfig::new) .decoder(S2CResetConfig::new)
.consumer(S2CResetConfig::handle) .consumerMainThread(S2CResetConfig::handle)
.add(); .add();
net.messageBuilder(RequestClientConfig.class, id(), NetworkDirection.PLAY_TO_CLIENT) net.messageBuilder(RequestClientConfig.class, id(), NetworkDirection.PLAY_TO_CLIENT)
.encoder(RequestClientConfig::toBytes) .encoder(RequestClientConfig::toBytes)
.decoder(RequestClientConfig::new) .decoder(RequestClientConfig::new)
.consumer(RequestClientConfig::handle) .consumerMainThread(RequestClientConfig::handle)
.add(); .add();
net.messageBuilder(ClientConfigResponse.class, id(), NetworkDirection.PLAY_TO_SERVER) net.messageBuilder(ClientConfigResponse.class, id(), NetworkDirection.PLAY_TO_SERVER)
.encoder(ClientConfigResponse::toBytes) .encoder(ClientConfigResponse::toBytes)
.decoder(ClientConfigResponse::new) .decoder(ClientConfigResponse::new)
.consumer(ClientConfigResponse::handle) .consumerMainThread(ClientConfigResponse::handle)
.add(); .add();
net.messageBuilder(PushClientConfigUpdate.class, id(), NetworkDirection.PLAY_TO_CLIENT) net.messageBuilder(PushClientConfigUpdate.class, id(), NetworkDirection.PLAY_TO_CLIENT)
.encoder(PushClientConfigUpdate::toBytes) .encoder(PushClientConfigUpdate::toBytes)
.decoder(PushClientConfigUpdate::new) .decoder(PushClientConfigUpdate::new)
.consumer(PushClientConfigUpdate::handle) .consumerMainThread(PushClientConfigUpdate::handle)
.add(); .add();
} }

View file

@ -18,7 +18,6 @@ import dev.zontreck.wmd.networking.packets.s2c.S2CResetConfig;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
@ -61,7 +60,7 @@ public class ClientConfigResponse {
try { try {
ChestGUI prompt = ChestGUI.builder().withGUIId(new ChestGUIIdentifier("wmdsettings")).withPlayer(player.getUUID()).withTitle("WMD Settings"); ChestGUI prompt = ChestGUI.builder().withGUIId(new ChestGUIIdentifier("wmdsettings")).withPlayer(player.getUUID()).withTitle("WMD Settings");
ItemStack wtd = new ItemStack(Items.DIAMOND_PICKAXE, 1); 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) -> { prompt.withButton(new ChestGUIButton(wtd, (stack, container, lore) -> {
var wd = !tag.getBoolean("watchDurability"); var wd = !tag.getBoolean("watchDurability");
@ -80,7 +79,7 @@ public class ClientConfigResponse {
); );
ItemStack wmhunger = new ItemStack(Items.APPLE, 1); 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) -> { prompt.withButton(new ChestGUIButton(wmhunger, (stack, container, lore) -> {
var eh = !tag.getBoolean("watchMyHunger"); 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()) .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); 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) -> { prompt.withButton(new ChestGUIButton(wmhealth, (stack, container, lore) -> {
var eh = !tag.getBoolean("watchMyHealth"); var eh = !tag.getBoolean("watchMyHealth");

View file

@ -29,16 +29,16 @@ public class S2CResetConfig
ctx.enqueueWork(()-> ctx.enqueueWork(()->
{ {
WMDClientConfig.WMD_PREFIX.set("!Dark_Gray![!Bold!!Dark_Green!WMD!Reset!!Dark_Gray!]!Reset!"); WMDClientConfig.WMD_PREFIX.set(WMDClientConfig.WMD_PREFIX.getDefault());
WMDClientConfig.WMD_PREFIX.save(); WMDClientConfig.WMD_PREFIX.save();
WMDClientConfig.EnableHealthAlert.set(false); WMDClientConfig.EnableHealthAlert.set(WMDClientConfig.EnableHealthAlert.getDefault());
WMDClientConfig.EnableHealthAlert.save(); WMDClientConfig.EnableHealthAlert.save();
WMDClientConfig.EnableHungerAlert.set(false); WMDClientConfig.EnableHungerAlert.set(WMDClientConfig.EnableHungerAlert.getDefault());
WMDClientConfig.EnableHealthAlert.save(); WMDClientConfig.EnableHealthAlert.save();
WMDClientConfig.EnableToolWatcher.set(true); WMDClientConfig.EnableToolWatcher.set(WMDClientConfig.EnableToolWatcher.getDefault());
WMDClientConfig.EnableToolWatcher.save(); WMDClientConfig.EnableToolWatcher.save();
}); });
} }

View file

@ -6,61 +6,71 @@
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version # 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="${loader_version_range}" #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. # 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. # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
license="GPLv2" license="${mod_license}"
# A URL to refer people to when problems occur with this mod # A URL to refer people to when problems occur with this mod
issueTrackerURL="https://github.com/zontreck/WatchMyDurability/issues" #optional #issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
# A list of mods - how many allowed here is determined by the individual mod loader # A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory [[mods]] #mandatory
# The modid of the mod # The modid of the mod
modId="watchmydurability" #mandatory modId="${mod_id}" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # The version number of the mod
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata version="${mod_version}" #mandatory
# see the associated build.gradle script for how to populate this completely automatically during a build
version="${file.jarVersion}" #mandatory
# A display name for the mod # A display name for the mod
displayName="WatchMyDurability" #mandatory displayName="${mod_name}" #mandatory
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ # A URL to query for updates for this mod. See the JSON update specification https://docs.minecraftforge.net/en/latest/misc/updatechecker/
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional #updateJSONURL="https://change.me.example.invalid/updates.json" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI # A URL for the "homepage" for this mod, displayed in the mod UI
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional #displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
# A file name (in the root of the mod JAR) containing a logo for display # A file name (in the root of the mod JAR) containing a logo for display
#logoFile="logo.png" #optional #logoFile="examplemod.png" #optional
# A text field displayed in the mod UI # A text field displayed in the mod UI
credits="zontreck, PossumTheWarrior" #optional #credits="" #optional
# A text field displayed in the mod UI # A text field displayed in the mod UI
authors="zontreck" #optional authors="${mod_authors}" #optional
# Display Test controls the display for your mod in the server connection screen # Display Test controls the display for your mod in the server connection screen
# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod. # MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod.
# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod. # IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod.
# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component. # IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component.
# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value. # NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value.
# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself. # IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself.
displayTest="IGNORE_ALL_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional) #displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional)
# The description text for the mod (multi line!) (#mandatory) # The description text for the mod (multi line!) (#mandatory)
description=''' description='''${mod_description}'''
Watches the durability of your tools, and your health!
'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.watchmydurability]] #optional [[dependencies.${mod_id}]] #optional
# the modid of the dependency # the modid of the dependency
modId="forge" #mandatory modId="forge" #mandatory
# Does this dependency have to exist - if not, ordering below must be specified # Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory mandatory=true #mandatory
# The version range of the dependency # The version range of the dependency
versionRange="[40,)" #mandatory versionRange="${forge_version_range}" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory # An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory
ordering="NONE" # BEFORE - This mod is loaded BEFORE the dependency
# Side this dependency is applied on - BOTH, CLIENT or SERVER # AFTER - This mod is loaded AFTER the dependency
side="BOTH" ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
side="BOTH"
# Here's another dependency # Here's another dependency
[[dependencies.watchmydurability]] [[dependencies.${mod_id}]]
modId="minecraft" modId="minecraft"
mandatory=true mandatory=true
# This version range declares a minimum of the current minecraft version up to but not including the next major version # 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="${minecraft_version_range}"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"
[[dependencies.${mod_id}]]
modId="libzontreck"
mandatory=true
versionRange="[1.10,1.11)"
ordering="NONE"
side="BOTH"
# Features are specific properties of the game environment, that you may want to declare you require. This example declares
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
# stop your mod loading on the server for example.
#[features.${mod_id}]
#openGLVersion="[3.2,)"

View file

@ -1,8 +1,8 @@
{ {
"pack": { "pack": {
"description": "WatchMyDurability resources", "description": {
"pack_format": 9, "text": "${mod_id} resources"
"forge:resource_pack_format": 8, },
"forge:data_pack_format": 9 "pack_format": 15
} }
} }