Skip to content

Commit

Permalink
use registry buf to send play c2s mc:register packet
Browse files Browse the repository at this point in the history
  • Loading branch information
deirn committed Apr 12, 2024
1 parent 32a0ca1 commit c519b66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static ClientPlayPacketHandler get() {

@Override
protected Packet<?> createVanillaRegisterPacket(Set<ResourceLocation> channels, Consumer<RegistryFriendlyByteBuf> buf) {
return PlatformProxy.INSTANCE.createVanillaRegisterPlayC2SPacket(channels, buf);
return PlatformProxy.INSTANCE.createVanillaRegisterPlayC2SPacket(listener.registryAccess(), channels, buf);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public Packet<?> createVanillaRegisterConfigS2CPacket(Set<ResourceLocation> chan
return ClientboundCustomPayloadPacket.CONFIG_STREAM_CODEC.decode(createBuf(null, writer));
}

public Packet<?> createVanillaRegisterPlayC2SPacket(Set<ResourceLocation> channels, Consumer<? extends FriendlyByteBuf> writer) {
return ServerboundCustomPayloadPacket.STREAM_CODEC.decode(createBuf(null, writer));
public Packet<?> createVanillaRegisterPlayC2SPacket(RegistryAccess registry, Set<ResourceLocation> channels, Consumer<? extends FriendlyByteBuf> writer) {
return ServerboundCustomPayloadPacket.STREAM_CODEC.decode(createBuf(registry, writer));
}

public Packet<?> createVanillaRegisterPlayS2CPacket(RegistryAccess registry, Set<ResourceLocation> channels, Consumer<RegistryFriendlyByteBuf> writer) {
Expand Down

0 comments on commit c519b66

Please sign in to comment.