Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.10-SNAPSHOT'
id 'maven-publish'
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.9
loader_version=0.16.10

# Mod Properties
mod_version = 1.0.1+build.1
Expand All @@ -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.102.0+1.21
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/hypixel/modapi/fabric/FabricModAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,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 {
Expand Down Expand Up @@ -79,7 +80,7 @@ private static void registerPacketSender() {

private static void registerClientbound(String identifier) {
try {
CustomPayload.Id<ClientboundHypixelPayload> clientboundId = CustomPayload.id(identifier);
CustomPayload.Id<ClientboundHypixelPayload> clientboundId = new CustomPayload.Id<>(Identifier.of(identifier));
PacketCodec<PacketByteBuf, ClientboundHypixelPayload> codec = ClientboundHypixelPayload.buildCodec(clientboundId);
PayloadTypeRegistry.playS2C().register(clientboundId, codec);
PayloadTypeRegistry.configurationS2C().register(clientboundId, codec);
Expand Down Expand Up @@ -131,7 +132,7 @@ private static void handleIncomingPayload(String identifier, ClientboundHypixelP

private static void registerServerbound(String identifier) {
try {
CustomPayload.Id<ServerboundHypixelPayload> serverboundId = CustomPayload.id(identifier);
CustomPayload.Id<ServerboundHypixelPayload> serverboundId = new CustomPayload.Id<>(Identifier.of(identifier));
PacketCodec<PacketByteBuf, ServerboundHypixelPayload> codec = ServerboundHypixelPayload.buildCodec(serverboundId);
PayloadTypeRegistry.playC2S().register(serverboundId, codec);
PayloadTypeRegistry.configurationC2S().register(serverboundId, codec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
import net.minecraft.network.PacketByteBuf;
import net.minecraft.network.codec.PacketCodec;
import net.minecraft.network.packet.CustomPayload;
import net.minecraft.util.Identifier;

public class ServerboundHypixelPayload implements CustomPayload {
private final Id<ServerboundHypixelPayload> id;
private final HypixelPacket packet;

public ServerboundHypixelPayload(HypixelPacket packet) {
this.id = CustomPayload.id(packet.getIdentifier());
this.id = new CustomPayload.Id<>(Identifier.of(packet.getIdentifier()));
this.packet = packet;
}

Expand Down