### Resolve CorruptedFrameException Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/README.md Example of the error message encountered when command arguments are not properly wrapped for Velocity. ```text io.netty.handler.codec.CorruptedFrameException: Error decoding class com.velocitypowered.proxy.protocol.packet.AvailableCommandsPacket ``` -------------------------------- ### Project Build Commands Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/README.md Commands to clone the repository and build the project using Gradle. ```bash git clone https://github.com/adde0109/Proxy-Compatible-Forge.git ``` ```bash ./gradlew build ``` ```bash gradlew.exe build ``` -------------------------------- ### Register Config in Forge 1.19.2 - 1.21.10 (excluding 1.19.3) Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Demonstrates registration via FMLJavaModLoadingContext or by accessing the extension from ModLoadingContext. ```java import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.config.ModConfig; FMLJavaModLoadingContext.get() .registerConfig(ModConfig.Type.COMMON, Config.spec, fileName); ((FMLJavaModLoadingContext) ModLoadingContext.get().extension()) .registerConfig(ModConfig.Type.COMMON, Config.spec, fileName); ``` -------------------------------- ### Paper Server Channel Limit Configuration Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/README.md Disable the channel registration limit on Paper servers. ```bash -Dpaper.disableChannelLimit=true ``` -------------------------------- ### Register Display Test for Forge 1.17.1 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Uses IExtensionPoint.DisplayTest class to register the display test. ```java import net.minecraftforge.fml.IExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fmllegacy.network.FMLNetworkConstants; ModLoadingContext.get().registerExtensionPoint( IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest( () -> FMLNetworkConstants.IGNORESERVERONLY, (remoteVersion, isFromServer) -> true)); ``` -------------------------------- ### Update ServerboundCustomQueryPacket Data Handling Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ImplementationNotes.md Migrates packet data access from internal buffers to payload-based handling for 1.20.2 compatibility. ```java FriendlyByteBuf data = packet.getInternalData(); if(data == null) { throw new Exception("Got empty packet"); } ``` ```java FriendlyByteBuf data = packet.getInternalData(); if(packet.payload() == null) { throw new Exception("Got empty packet"); } FriendlyByteBuf data = new FriendlyByteBuf(Unpooled.buffer()); packet.payload().write(data); ``` -------------------------------- ### Update ClientboundCustomQueryPacket Instantiation Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ImplementationNotes.md Replaces direct buffer usage with DiscardedQueryPayload when constructing custom query packets. ```java import net.minecraft.network.protocol.login.ClientboundCustomQueryPacket; new ClientboundCustomQueryPacket(index, resourceLocation, byteBuff); ``` ```java import net.minecraft.network.protocol.login.ClientboundCustomQueryPacket; import net.minecraft.network.protocol.login.custom.DiscardedQueryPayload; new ClientboundCustomQueryPacket(index, new DiscardedQueryPayload(resourceLocation)); ``` -------------------------------- ### ModLoadingContext.registerDisplayTest Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md A convenience method for registering display test extension points. ```APIDOC ## ModLoadingContext.registerDisplayTest ### Description Registers a display test configuration directly, simplifying the process of setting up network version compatibility rules. ### Signature `void registerDisplayTest(Supplier displayTest)` ### Parameters - **displayTest** (Supplier) - A supplier providing the DisplayTest configuration, such as IExtensionPoint.DisplayTest.IGNORE_SERVER_VERSION. ``` -------------------------------- ### Velocity Channel Limit Configuration Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/README.md Adjust the maximum known packs to accommodate modded channel counts. ```bash -Dvelocity.max-known-packs=124 ``` -------------------------------- ### ModLoadingContext.registerExtensionPoint Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Registers an extension point for display testing to define how network version mismatches are handled. ```APIDOC ## ModLoadingContext.registerExtensionPoint ### Description Registers an extension point, specifically for display testing, to control how the mod handles network version checks between the client and server. ### Signature `void registerExtensionPoint(ExtensionPoint point, Supplier extension)` ### Parameters - **point** (ExtensionPoint) - The extension point type to register (e.g., IExtensionPoint.DisplayTest.class). - **extension** (Supplier) - A supplier providing the implementation for the display test logic. ``` -------------------------------- ### Update DisplayTest Extension Point (1.17.1 to 1.18) Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ImplementationNotes.md Updates the network constant reference for the DisplayTest extension point during the 1.17.1 to 1.18 migration. ```java ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true)); ``` ```java ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); ``` -------------------------------- ### Update DisplayTest Extension Point (1.18 to 1.19) Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ImplementationNotes.md Updates the network constant reference for the DisplayTest extension point during the 1.18 to 1.19 migration. ```java ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); ``` ```java ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, (a, b) -> true)); ``` -------------------------------- ### Define IGNORESERVERONLY String Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Provides the supplier for the IGNORESERVERONLY network constant across different Forge versions. ```java import net.minecraftforge.fml.network.FMLNetworkConstants; import java.util.function.Supplier; Supplier IGNORE_SERVER_ONLY = () -> FMLNetworkConstants.IGNORESERVERONLY; ``` ```java import net.minecraftforge.fmllegacy.network.FMLNetworkConstants; import java.util.function.Supplier; Supplier IGNORE_SERVER_ONLY = () -> FMLNetworkConstants.IGNORESERVERONLY; ``` ```java import net.minecraftforge.network.NetworkConstants; import java.util.function.Supplier; Supplier IGNORE_SERVER_ONLY = () -> NetworkConstants.IGNORESERVERONLY; ``` ```java import net.minecraftforge.fml.IExtensionPoint; import java.util.function.Supplier; Supplier IGNORE_SERVER_ONLY = () -> IExtensionPoint.DisplayTest.IGNORESERVERONLY; ``` -------------------------------- ### Register Config in Forge 1.17.1 - 1.21.10 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Utilizes the IConfigSpec interface for configuration registration in newer Forge versions. ```java import net.minecraftforge.fml.config.IConfigSpec; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.config.ModConfig; ModLoadingContext.get() .registerConfig(ModConfig.Type.COMMON, (IConfigSpec) spec, fileName); ``` -------------------------------- ### Register Display Test for Forge 1.18 - 1.19.4 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Uses NetworkConstants to define the ignore server-only behavior. ```java import net.minecraftforge.fml.IExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.network.NetworkConstants; ModLoadingContext.get().registerExtensionPoint( IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest( () -> NetworkConstants.IGNORESERVERONLY, (remoteVersion, isFromServer) -> true)); ``` -------------------------------- ### ModLoadingContext.registerConfig Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Registers a configuration file for a mod. This method is used to associate a configuration specification with a specific configuration type and filename. ```APIDOC ## ModLoadingContext.registerConfig ### Description Registers a configuration file for the mod using the provided configuration type, specification, and filename. ### Signature `void registerConfig(ModConfig.Type type, IConfigSpec spec, String fileName)` ### Parameters - **type** (ModConfig.Type) - The type of configuration (e.g., COMMON, CLIENT, SERVER). - **spec** (IConfigSpec) - The configuration specification object. - **fileName** (String) - The name of the configuration file to be created. ### Usage Example (Forge 1.17.1+) ```java ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, spec, "my-mod-common.toml"); ``` ``` -------------------------------- ### Register Display Test for Forge 1.13.2 - 1.16.5 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Uses ExtensionPoint.DISPLAYTEST to register a display test that ignores server-only version checks. ```java import net.minecraftforge.fml.ExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.network.FMLNetworkConstants; import org.apache.commons.lang3.tuple.Pair; ModLoadingContext.get().registerExtensionPoint( ExtensionPoint.DISPLAYTEST, () -> Pair.of( () -> FMLNetworkConstants.IGNORESERVERONLY, (remoteVersion, isFromServer) -> true)); ``` -------------------------------- ### Register Display Test for Forge 1.20.1 - 1.21.10 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Uses the IExtensionPoint.DisplayTest.IGNORESERVERONLY constant directly. ```java import net.minecraftforge.fml.IExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; ModLoadingContext.get().registerExtensionPoint( IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest( () -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, (remoteVersion, isFromServer) -> true)); ``` -------------------------------- ### Register Display Test using IGNORE_SERVER_VERSION Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Uses the IGNORE_SERVER_VERSION constant for specific Forge versions. ```java import net.minecraftforge.fml.IExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; ModLoadingContext.get().registerExtensionPoint( IExtensionPoint.DisplayTest.class, IExtensionPoint.DisplayTest.IGNORE_SERVER_VERSION); ModLoadingContext.get().registerDisplayTest( IExtensionPoint.DisplayTest.IGNORE_SERVER_VERSION); ``` -------------------------------- ### Access ModConfig.Reloading in 1.15 - 1.16.5 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModConfigEvent.md Use this class reference for configuration reloading in Forge versions 1.15 through 1.16.5. ```java import net.minecraftforge.fml.config.ModConfig; ModConfig.Reloading ``` -------------------------------- ### Update ExtensionPoint DisplayTest Registration Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ImplementationNotes.md Updates the registration of the DisplayTest extension point to use the IExtensionPoint.DisplayTest class structure required in 1.17.1. ```java ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, () -> Pair.of(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true)); ``` ```java ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true)); ``` -------------------------------- ### Access ModConfig.ConfigReloading in 1.13.2 - 1.14.4 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModConfigEvent.md Use this class reference for configuration reloading in Forge versions 1.13.2 through 1.14.4. ```java import net.minecraftforge.fml.config.ModConfig; ModConfig.ConfigReloading ``` -------------------------------- ### Access ModConfigEvent.Reloading in 1.17.1 - 1.21.5 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModConfigEvent.md Use this class reference for configuration reloading in Forge versions 1.17.1 through 1.21.5. ```java import net.minecraftforge.fml.event.config.ModConfigEvent; ModConfigEvent.Reloading ``` -------------------------------- ### Define IGNORE_SERVER_VERSION DisplayTest Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Configures the display test for ignoring server versions, with implementation variations based on the Forge version. ```java import net.minecraftforge.fml.IExtensionPoint; import java.util.function.Supplier; Supplier IGNORE_SERVER_VERSION = () -> new IExtensionPoint.DisplayTest( () -> FMLNetworkConstants.IGNORESERVERONLY, (remoteVersion, isFromServer) -> true); ``` ```java import net.minecraftforge.fml.IExtensionPoint; import java.util.function.Supplier; Supplier IGNORE_SERVER_VERSION = IExtensionPoint.DisplayTest.IGNORE_SERVER_VERSION; ``` ```java import net.minecraftforge.fml.IExtensionPoint; import net.minecraftforge.network.NetworkConstants; import java.util.function.Supplier; Supplier IGNORE_SERVER_VERSION = () -> new IExtensionPoint.DisplayTest( () -> NetworkConstants.IGNORESERVERONLY, (remoteVersion, isFromServer) -> true); ``` -------------------------------- ### Register Config in Forge 1.13.2 - 1.16.5 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModLoadingContext.md Use this approach for older Forge versions where ForgeConfigSpec is explicitly cast. ```java import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.config.ModConfig; ModLoadingContext.get() .registerConfig(ModConfig.Type.COMMON, (ForgeConfigSpec) spec, fileName); ``` -------------------------------- ### Velocity Plugin Message Payload Size Configuration Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/README.md Increase the maximum plugin message payload size to resolve CorruptedFrameException errors. ```bash -Dvelocity.max-plugin-message-payload-size=####### ``` -------------------------------- ### Access ModConfigEvent.Reloading Interface in 1.21.6 - 1.21.10 Source: https://github.com/adde0109/proxy-compatible-forge/blob/main/docs/development/ModConfigEvent.md In versions 1.21.6 through 1.21.10, ModConfigEvent.Reloading is defined as an interface. ```java import net.minecraftforge.fml.event.config.ModConfigEvent; // Now an Interface ModConfigEvent.Reloading ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.