mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
make decode and encode public
This commit is contained in:
@@ -15,15 +15,15 @@ public record SkinShuffleSkinRefreshV1Payload(
|
||||
SkinShuffleSkinRefreshV1Payload::decode
|
||||
);
|
||||
|
||||
private static void encode(FriendlyByteBuf buf, SkinShuffleSkinRefreshV1Payload value) {
|
||||
public static void encode(FriendlyByteBuf buf, SkinShuffleSkinRefreshV1Payload value) {
|
||||
var textureProperty = value.textureProperty();
|
||||
|
||||
buf.writeUtf(textureProperty.name());
|
||||
buf.writeUtf(textureProperty.value());
|
||||
buf.writeNullable(textureProperty.signature(), FriendlyByteBuf::writeUtf);
|
||||
}
|
||||
|
||||
private static SkinShuffleSkinRefreshV1Payload decode(FriendlyByteBuf buf) {
|
||||
|
||||
public static SkinShuffleSkinRefreshV1Payload decode(FriendlyByteBuf buf) {
|
||||
return new SkinShuffleSkinRefreshV1Payload(new Property(buf.readUtf(), buf.readUtf(), buf.readNullable(FriendlyByteBuf::readUtf)));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ public record SkinShuffleSkinRefreshV2Payload(
|
||||
SkinShuffleSkinRefreshV2Payload::encode,
|
||||
SkinShuffleSkinRefreshV2Payload::decode
|
||||
);
|
||||
|
||||
private static void encode(FriendlyByteBuf buf, SkinShuffleSkinRefreshV2Payload value) {
|
||||
|
||||
public static void encode(FriendlyByteBuf buf, SkinShuffleSkinRefreshV2Payload value) {
|
||||
var textureProperty = value.textureProperty();
|
||||
|
||||
buf.writeBoolean(textureProperty.hasSignature());
|
||||
@@ -27,8 +27,8 @@ public record SkinShuffleSkinRefreshV2Payload(
|
||||
buf.writeUtf(textureProperty.signature());
|
||||
}
|
||||
}
|
||||
|
||||
private static SkinShuffleSkinRefreshV2Payload decode(FriendlyByteBuf buf) {
|
||||
|
||||
public static SkinShuffleSkinRefreshV2Payload decode(FriendlyByteBuf buf) {
|
||||
if (buf.readBoolean()) {
|
||||
return new SkinShuffleSkinRefreshV2Payload(new Property(buf.readUtf(), buf.readUtf(), buf.readUtf()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user