diff --git a/build.gradle b/build.gradle index d55b489..783d07c 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'idea' id 'maven-publish' id 'java-library' - id 'net.minecraftforge.gradle' version '5.1.+' + id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'org.parchmentmc.librarian.forgegradle' version '1.+' } @@ -53,7 +53,7 @@ minecraft { // 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. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html - //copyIdeResources = true + copyIdeResources = true // 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. @@ -187,7 +187,7 @@ dependencies { // 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 { +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, @@ -200,7 +200,7 @@ dependencies { filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { expand replaceProperties + [project: project] } -}*/ +} // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { diff --git a/gradle.properties b/gradle.properties index 84387da..5ff2ff9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,25 +4,25 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -parchment_version=2022.11.06 +parchment_version=2023.09.03 # luckperms_api_version=5.4 -libac=1.4.19 -eventsbus=1.0.31 +libac=1.4.46 +eventsbus=1.0.45 ## Environment Properties # 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. # 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.20.1,1.21) # 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 -forge_version_range=[40,) +forge_version_range=[47,) # 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 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. @@ -40,7 +40,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=2023.09.03-1.20.1 ## Mod Properties @@ -53,7 +53,7 @@ mod_name=Zontreck Library Mod # 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.10.012124.1709 +mod_version=1.10.021324.2257 # 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.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661..fae0804 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME 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 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index 7f4682f..8a72e7b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,4 +3,8 @@ pluginManagement { gradlePluginPortal() maven { url = "https://maven.zontreck.com/repository/internal" } } -} \ No newline at end of file +} + +plugins { + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' +} diff --git a/src/main/java/dev/zontreck/libzontreck/blocks/BlockImitation.java b/src/main/java/dev/zontreck/libzontreck/blocks/BlockImitation.java new file mode 100644 index 0000000..ab23bd1 --- /dev/null +++ b/src/main/java/dev/zontreck/libzontreck/blocks/BlockImitation.java @@ -0,0 +1,95 @@ +package dev.zontreck.libzontreck.blocks; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; + +/** + * Code partially taken from HT's TreeChop + *

+ * Source Material + */ +public abstract class BlockImitation extends Block +{ + public BlockImitation(Properties pProperties) { + super(pProperties); + } + + + public abstract BlockState getImitatedBlockState(BlockGetter level, BlockPos pos); + + public abstract void updateImitation(BlockState newState, BlockGetter level, BlockPos pos); + + @Override + public void animateTick(BlockState blockState, Level level, BlockPos pos, RandomSource random) { + BlockState imitatedBlockState = getImitatedBlockState(level, pos); + imitatedBlockState.getBlock().animateTick(imitatedBlockState, level, pos, random); + } + + @Override + public void stepOn(Level level, BlockPos pos, BlockState blockState, Entity entity) { + BlockState imitatedBlockState = getImitatedBlockState(level, pos); + imitatedBlockState.getBlock().stepOn(level, pos, imitatedBlockState, entity); + } + + @Override + public void fallOn(Level level, BlockState blockState, BlockPos pos, Entity entity, float speed) { + BlockState imitatedBlockState = getImitatedBlockState(level, pos); + imitatedBlockState.getBlock().fallOn(level, imitatedBlockState, pos, entity, speed); + } + + @Override + public ItemStack getCloneItemStack(BlockGetter level, BlockPos pos, BlockState blockState) { + BlockState imitatedBlockState = getImitatedBlockState(level, pos); + return imitatedBlockState.getBlock().getCloneItemStack(level, pos, imitatedBlockState); + } + + @Override + public void handlePrecipitation(BlockState blockState, Level level, BlockPos pos, Biome.Precipitation precipitation) { + BlockState imitatedBlockState = getImitatedBlockState(level, pos); + imitatedBlockState.getBlock().handlePrecipitation(imitatedBlockState, level, pos, precipitation); + } + + @Override + public int getLightBlock(BlockState blockState, BlockGetter level, BlockPos pos) { + return super.getLightBlock(blockState, level, pos); + } + + @Override + public float getShadeBrightness(BlockState blockState, BlockGetter level, BlockPos pos) { + return super.getShadeBrightness(blockState, level, pos); + } + + @Override + public int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos pos) { + return getImitatedBlockState(level, pos).getAnalogOutputSignal(level, pos); + } + + @Override + public void randomTick(BlockState blockState, ServerLevel level, BlockPos pos, RandomSource random) { + getImitatedBlockState(level, pos).randomTick(level, pos, random); + } + + @Override + public void tick(BlockState blockState, ServerLevel level, BlockPos pos, RandomSource random) { + getImitatedBlockState(level, pos).tick(level, pos, random); + } + + @Override + public int getSignal(BlockState blockState, BlockGetter level, BlockPos pos, Direction direction) { + return getImitatedBlockState(level, pos).getSignal(level, pos, direction); + } + + @Override + public int getDirectSignal(BlockState blockState, BlockGetter level, BlockPos pos, Direction direction) { + return getImitatedBlockState(level, pos).getDirectSignal(level, pos, direction); + } +} diff --git a/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java b/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java index 445281c..8e41c10 100644 --- a/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java +++ b/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java @@ -199,7 +199,7 @@ public class ChestGUI { updateUtilityButtons(); MinecraftForge.EVENT_BUS.post(new OpenGUIEvent(id, player, this)); - NetworkHooks.openGui(ServerUtilities.getPlayerByID(player.toString()), new SimpleMenuProvider(ChestGUIMenu.getServerMenu(this), ChatHelpers.macro(((MenuTitle != "") ? MenuTitle : "No Title")))); + NetworkHooks.openScreen(ServerUtilities.getPlayerByID(player.toString()), new SimpleMenuProvider(ChestGUIMenu.getServerMenu(this), ChatHelpers.macro((MenuTitle != "") ? MenuTitle : "No Title"))); } } diff --git a/src/main/java/dev/zontreck/libzontreck/currency/Account.java b/src/main/java/dev/zontreck/libzontreck/currency/Account.java index bef02ff..e0b81f8 100644 --- a/src/main/java/dev/zontreck/libzontreck/currency/Account.java +++ b/src/main/java/dev/zontreck/libzontreck/currency/Account.java @@ -6,6 +6,7 @@ import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.libzontreck.currency.events.TransactionHistoryFlushEvent; import dev.zontreck.libzontreck.profiles.Profile; import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException; +import net.minecraft.core.UUIDUtil; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.NbtUtils; diff --git a/src/main/java/dev/zontreck/libzontreck/events/ForgeEventHandlers.java b/src/main/java/dev/zontreck/libzontreck/events/ForgeEventHandlers.java index 22895f2..c2813ec 100644 --- a/src/main/java/dev/zontreck/libzontreck/events/ForgeEventHandlers.java +++ b/src/main/java/dev/zontreck/libzontreck/events/ForgeEventHandlers.java @@ -23,9 +23,9 @@ import net.minecraftforge.fml.common.Mod; public class ForgeEventHandlers { @SubscribeEvent - public void onPlayerTick(LivingEvent.LivingUpdateEvent ev) + public void onPlayerTick(LivingEvent.LivingTickEvent ev) { - if(ServerUtilities.isClient()) return; + if(ev.getEntity().level().isClientSide) return; if(ev.getEntity() instanceof ServerPlayer player) { @@ -44,11 +44,11 @@ public class ForgeEventHandlers { @SubscribeEvent public void onPlayerJoin(final PlayerEvent.PlayerLoggedInEvent ev) { - if(ServerUtilities.isClient())return; + if(ev.getEntity().level().isClientSide)return; ServerPlayer player = (ServerPlayer)ev.getEntity(); Profile prof = Profile.factory(player); - ServerLevel level = player.getLevel(); + ServerLevel level = player.serverLevel(); MinecraftForge.EVENT_BUS.post(new ProfileLoadedEvent(prof, player, level)); @@ -68,7 +68,7 @@ public class ForgeEventHandlers { public void onLeave(final PlayerEvent.PlayerLoggedOutEvent ev) { LibZontreck.LIBZONTRECK_SERVER_AVAILABLE=false; // Yes do this even on the client! - if(ServerUtilities.isClient()) return; + if(ev.getEntity().level().isClientSide)return; // Get player profile, send disconnect alert, then commit profile and remove it from memory try { diff --git a/src/main/java/dev/zontreck/libzontreck/menus/ChestGUIScreen.java b/src/main/java/dev/zontreck/libzontreck/menus/ChestGUIScreen.java index c736c76..9ae9ee4 100644 --- a/src/main/java/dev/zontreck/libzontreck/menus/ChestGUIScreen.java +++ b/src/main/java/dev/zontreck/libzontreck/menus/ChestGUIScreen.java @@ -1,9 +1,9 @@ package dev.zontreck.libzontreck.menus; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import dev.zontreck.libzontreck.LibZontreck; import dev.zontreck.libzontreck.chestgui.ChestGUI; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.renderer.GameRenderer; import net.minecraft.network.chat.Component; @@ -35,7 +35,7 @@ public class ChestGUIScreen extends AbstractContainerScreen { } @Override - public void render(PoseStack pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { + public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { this.renderBackground(pGuiGraphics); super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); this.renderTooltip(pGuiGraphics, pMouseX, pMouseY); @@ -50,18 +50,17 @@ public class ChestGUIScreen extends AbstractContainerScreen { } @Override - protected void renderBg(PoseStack guiGraphics, float v, int i, int i1) { + protected void renderBg(GuiGraphics guiGraphics, float v, int i, int i1) { renderBackground(guiGraphics); RenderSystem.setShader(GameRenderer::getPositionTexShader); RenderSystem.setShaderColor(1,1,1,1); RenderSystem.setShaderTexture(0, TEXTURE); - blit(guiGraphics, this.leftPos, this.topPos, 0, 0, imageWidth, imageHeight); + guiGraphics.blit(TEXTURE, this.leftPos, this.topPos, 0, 0, imageWidth, imageHeight); } @Override - protected void renderLabels(PoseStack pGuiGraphics, int pMouseX, int pMouseY) { - - drawString(pGuiGraphics, this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752); + protected void renderLabels(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) { + pGuiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false); } } diff --git a/src/main/java/dev/zontreck/libzontreck/networking/ModMessages.java b/src/main/java/dev/zontreck/libzontreck/networking/ModMessages.java index 5345c37..002a9ac 100644 --- a/src/main/java/dev/zontreck/libzontreck/networking/ModMessages.java +++ b/src/main/java/dev/zontreck/libzontreck/networking/ModMessages.java @@ -49,21 +49,21 @@ public class ModMessages { net.messageBuilder(S2CPlaySoundPacket.class, PACKET_ID.getAndIncrement(), NetworkDirection.PLAY_TO_CLIENT) .decoder(S2CPlaySoundPacket::new) - .encoder(S2CPlaySoundPacket::toBytes) - .consumer(S2CPlaySoundPacket::handle) - .add(); + .encoder(S2CPlaySoundPacket::toBytes) + .consumerMainThread(S2CPlaySoundPacket::handle) + .add(); net.messageBuilder(S2CCloseChestGUI.class, PACKET_ID.getAndIncrement(), NetworkDirection.PLAY_TO_CLIENT) .decoder(S2CCloseChestGUI::new) .encoder(S2CCloseChestGUI::toBytes) - .consumer(S2CCloseChestGUI::handle) + .consumerMainThread(S2CCloseChestGUI::handle) .add(); net.messageBuilder(S2CServerAvailable.class, PACKET_ID.getAndIncrement(), NetworkDirection.PLAY_TO_CLIENT) .decoder(S2CServerAvailable::new) .encoder(S2CServerAvailable::toBytes) - .consumer(S2CServerAvailable::handle) + .consumerMainThread(S2CServerAvailable::handle) .add(); } diff --git a/src/main/java/dev/zontreck/libzontreck/networking/packets/S2CPlaySoundPacket.java b/src/main/java/dev/zontreck/libzontreck/networking/packets/S2CPlaySoundPacket.java index da1732b..4d79616 100644 --- a/src/main/java/dev/zontreck/libzontreck/networking/packets/S2CPlaySoundPacket.java +++ b/src/main/java/dev/zontreck/libzontreck/networking/packets/S2CPlaySoundPacket.java @@ -48,8 +48,7 @@ public class S2CPlaySoundPacket implements IPacket ctx.enqueueWork(()->{ // We are on the client now, enqueue the sound! - SoundEvent ev = new SoundEvent(sound); - + SoundEvent ev = SoundEvent.createFixedRangeEvent(sound, 2.0f); // Play sound for player! Minecraft.getInstance().player.playSound(ev, 1, BinUtil.getARandomInstance().nextFloat(0, 1)); }); diff --git a/src/main/java/dev/zontreck/libzontreck/types/ModMenuTypes.java b/src/main/java/dev/zontreck/libzontreck/types/ModMenuTypes.java index 0e8d0e8..cfecba4 100644 --- a/src/main/java/dev/zontreck/libzontreck/types/ModMenuTypes.java +++ b/src/main/java/dev/zontreck/libzontreck/types/ModMenuTypes.java @@ -13,7 +13,7 @@ import net.minecraftforge.registries.RegistryObject; public class ModMenuTypes { - public static DeferredRegister> REGISTRY = DeferredRegister.create(ForgeRegistries.CONTAINERS, LibZontreck.MOD_ID); + public static DeferredRegister> REGISTRY = DeferredRegister.create(ForgeRegistries.MENU_TYPES, LibZontreck.MOD_ID); public static RegistryObject> CHEST_GUI_MENU = registerMenuType(ChestGUIMenu::new, "chestgui"); diff --git a/src/main/java/dev/zontreck/libzontreck/util/ChatHelpers.java b/src/main/java/dev/zontreck/libzontreck/util/ChatHelpers.java index 02f6f56..fb6dc04 100644 --- a/src/main/java/dev/zontreck/libzontreck/util/ChatHelpers.java +++ b/src/main/java/dev/zontreck/libzontreck/util/ChatHelpers.java @@ -111,7 +111,7 @@ public class ChatHelpers { */ public static MutableComponent macro(String input, String... inputs) { - return new TextComponent(macroize(input,inputs)); + return Component.literal(macroize(input,inputs)); } /** * Returns the output with colors applied, and chat entries replaced using [number] as the format diff --git a/src/main/java/dev/zontreck/libzontreck/util/SNbtIo.java b/src/main/java/dev/zontreck/libzontreck/util/SNbtIo.java index 40fcbb6..120a93e 100644 --- a/src/main/java/dev/zontreck/libzontreck/util/SNbtIo.java +++ b/src/main/java/dev/zontreck/libzontreck/util/SNbtIo.java @@ -3,7 +3,6 @@ package dev.zontreck.libzontreck.util; import com.mojang.brigadier.exceptions.CommandSyntaxException; import dev.zontreck.ariaslib.util.FileIO; import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.NbtIo; import net.minecraft.nbt.NbtUtils; import java.io.File; @@ -43,4 +42,4 @@ public class SNbtIo String snbt = NbtUtils.structureToSnbt(tag); FileIO.writeFile(path.toFile().getAbsolutePath(), snbt); } -} +} \ No newline at end of file diff --git a/src/main/java/dev/zontreck/libzontreck/util/ServerUtilities.java b/src/main/java/dev/zontreck/libzontreck/util/ServerUtilities.java index d1b753b..abd8d57 100644 --- a/src/main/java/dev/zontreck/libzontreck/util/ServerUtilities.java +++ b/src/main/java/dev/zontreck/libzontreck/util/ServerUtilities.java @@ -40,7 +40,7 @@ public class ServerUtilities channel.messageBuilder(type, ModMessages.id(), packet.getDirection()) .decoder(decoder) .encoder(X::toBytes) - .consumer(X::handle) + .consumerMainThread(X::handle) .add(); } diff --git a/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java b/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java index 2a2afad..fa69b61 100644 --- a/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java +++ b/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java @@ -35,7 +35,7 @@ public class WorldPosition { } public WorldPosition(ServerPlayer player) { - this(new Vector3(player.position()), player.getLevel()); + this(new Vector3(player.position()), player.serverLevel()); } public WorldPosition(Vector3 pos, ServerLevel lvl) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index a69184f..a1b1cbb 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -6,32 +6,30 @@ # 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="${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. # 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 -issueTrackerURL="https://github.com/zontreck/LibZontreckMod/issues/" #optional +issueTrackerURL="https://github.com/zontreck/LibZontreckMod/issues" #optional # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod -modId="libzontreck" #mandatory -# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it -# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata -# see the associated build.gradle script for how to populate this completely automatically during a build -version="${file.jarVersion}" #mandatory +modId="${mod_id}" #mandatory +# The version number of the mod +version="${mod_version}" #mandatory # A display name for the mod -displayName="LibZontreck" #mandatory -# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ +displayName="${mod_name}" #mandatory +# 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 # A URL for the "homepage" for this mod, displayed in the mod UI #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 #logoFile="examplemod.png" #optional # A text field displayed in the mod UI -credits="Zontreck" #optional +#credits="" #optional # 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 # 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. @@ -41,26 +39,32 @@ authors="zontreck" #optional #displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional) # The description text for the mod (multi line!) (#mandatory) -description=''' -This is a library mod for common code for all zontreck's mods. -''' +description='''${mod_description}''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. -[[dependencies.libzontreck]] #optional -# the modid of the dependency -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 -# 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 -side="BOTH" +[[dependencies.${mod_id}]] #optional + # the modid of the dependency + 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="${forge_version_range}" #mandatory + # An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory + # BEFORE - This mod is loaded BEFORE the dependency + # AFTER - This mod is loaded AFTER the dependency + ordering="NONE" + # Side this dependency is applied on - BOTH, CLIENT, or SERVER + side="BOTH" # Here's another dependency -[[dependencies.libzontreck]] -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)" -ordering="NONE" -side="BOTH" \ No newline at end of file +[[dependencies.${mod_id}]] + 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="${minecraft_version_range}" + 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,)" \ No newline at end of file diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 954af3c..eca79ae 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,8 +1,8 @@ { "pack": { - "description": "LibZontreck resources", - "pack_format": 9, - "forge:resource_pack_format": 8, - "forge:data_pack_format": 9 + "description": { + "text": "${mod_id} resources" + }, + "pack_format": 15 } } \ No newline at end of file