Skip to content

Commit

Permalink
Fixed emoji recipe now working
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Jul 13, 2024
1 parent 44b8d10 commit 0a21d30
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ public EmojiRecipeSerializer() {
this.codec = new StreamCodec<RegistryFriendlyByteBuf, EmojiRecipe>() {
@Override
public EmojiRecipe decode(RegistryFriendlyByteBuf registryFriendlyByteBuf) {
return null;
return new EmojiRecipe(registryFriendlyByteBuf.readUtf(), registryFriendlyByteBuf.readUtf(), registryFriendlyByteBuf.readUtf());
}

@Override
public void encode(RegistryFriendlyByteBuf o, EmojiRecipe emojiRecipe) {

public void encode(RegistryFriendlyByteBuf buff, EmojiRecipe emojiRecipe) {
buff.writeUtf(emojiRecipe.getCategory());
buff.writeUtf(emojiRecipe.getName());
buff.writeUtf(emojiRecipe.getUrl());
}
};
this.mapCodec = RecordCodecBuilder.mapCodec(instance -> {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Project
version=5.1.3
version=5.1.4
group=com.hrznstudio.emojiful

#Parchment
Expand Down

0 comments on commit 0a21d30

Please sign in to comment.