diff --git a/gradle.properties b/gradle.properties index aba151a..3c96b34 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html - minecraft_version=1.20.5 - yarn_mappings=1.20.5+build.1 - loader_version=0.15.10 + minecraft_version=1.21 + yarn_mappings=1.21+build.1 + loader_version=0.15.11 # Mod Properties mod_version = 1.0+build.1 @@ -15,4 +15,4 @@ org.gradle.jvmargs=-Xmx1G # Dependencies # check this on https://modmuss50.me/fabric.html - fabric_version=0.97.8+1.20.6 + fabric_version=0.100.1+1.21 diff --git a/src/main/java/net/hypixel/modapi/fabric/FabricModAPI.java b/src/main/java/net/hypixel/modapi/fabric/FabricModAPI.java index 9d4fb89..bf31ea8 100644 --- a/src/main/java/net/hypixel/modapi/fabric/FabricModAPI.java +++ b/src/main/java/net/hypixel/modapi/fabric/FabricModAPI.java @@ -13,6 +13,7 @@ import net.minecraft.network.PacketByteBuf; import net.minecraft.network.codec.PacketCodec; import net.minecraft.network.packet.CustomPayload; +import net.minecraft.util.Identifier; import org.slf4j.Logger; public class FabricModAPI implements ClientModInitializer { @@ -70,7 +71,7 @@ private static void registerPacketSender() { private static void registerClientbound(String identifier) { try { - CustomPayload.Id clientboundId = CustomPayload.id(identifier); + CustomPayload.Id clientboundId = new CustomPayload.Id<>(Identifier.of(identifier)); PacketCodec codec = ClientboundHypixelPayload.buildCodec(clientboundId); PayloadTypeRegistry.playS2C().register(clientboundId, codec); PayloadTypeRegistry.configurationS2C().register(clientboundId, codec); @@ -111,7 +112,7 @@ private static void handleIncomingPayload(String identifier, ClientboundHypixelP private static void registerServerbound(String identifier) { try { - CustomPayload.Id serverboundId = CustomPayload.id(identifier); + CustomPayload.Id serverboundId = new CustomPayload.Id<>(Identifier.of(identifier)); PacketCodec codec = ServerboundHypixelPayload.buildCodec(serverboundId); PayloadTypeRegistry.playC2S().register(serverboundId, codec); PayloadTypeRegistry.configurationC2S().register(serverboundId, codec);