Skip to content

Commit 7f39589

Browse files
committed
Bump version to 0.1.1, drop 1.20.5+ support, add 1.21 support
1 parent 9d74171 commit 7f39589

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ subprojects {
1010
apply(plugin = "maven-publish")
1111

1212
group = "wtf.choco"
13-
version = "0.1.0"
13+
version = "0.1.1"
1414

1515
java {
1616
toolchain {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
minecraft_version=1.20.5
2-
fabric_version=0.97.8+1.20.5
1+
minecraft_version=1.21
2+
fabric_version=0.100.4+1.21
33
loader_version=0.15.11

networking-fabric/src/main/java/wtf/choco/network/fabric/FabricChannelRegistrar.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void registerClientboundMessageHandler(@NotNull NamespacedKey channel, @N
7979
return;
8080
}
8181

82-
ResourceLocation channelKey = new ResourceLocation(channel.namespace(), channel.key());
82+
ResourceLocation channelKey = ResourceLocation.fromNamespaceAndPath(channel.namespace(), channel.key());
8383
ClientPlayNetworking.registerGlobalReceiver(payloadType, (payload, context) -> {
8484
MessageByteBuffer buffer = new MessageByteBuffer(protocol, payload.data());
8585

@@ -111,7 +111,7 @@ public void registerServerboundMessageHandler(@NotNull NamespacedKey channel, @N
111111
return;
112112
}
113113

114-
ResourceLocation channelKey = new ResourceLocation(channel.namespace(), channel.key());
114+
ResourceLocation channelKey = ResourceLocation.fromNamespaceAndPath(channel.namespace(), channel.key());
115115
ServerPlayNetworking.registerGlobalReceiver(payloadType, (payload, context) -> {
116116
MessageByteBuffer buffer = new MessageByteBuffer(protocol, payload.data());
117117

@@ -314,7 +314,7 @@ protected S onSuccessfulServerboundMessage(@NotNull MinecraftServer server, @Not
314314
private CustomPacketPayload.Type<RawDataPayload> initTypeIfNecessary(NamespacedKey channel) {
315315
CustomPacketPayload.Type<RawDataPayload> type = RawDataPayload.getType();
316316
if (type == null) {
317-
RawDataPayload.setType(type = CustomPacketPayload.createType(channel.toString()));
317+
RawDataPayload.setType(type = new CustomPacketPayload.Type<>(ResourceLocation.parse(channel.toString())));
318318
}
319319
return type;
320320
}

0 commit comments

Comments
 (0)