diff options
Diffstat (limited to 'runtime/src/main')
96 files changed, 543 insertions, 1193 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java index 69275ebc9..107522bc4 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java @@ -236,7 +236,7 @@ public class RoughlyEnoughItemsCoreClient { Minecraft client = Minecraft.getInstance(); NetworkManager.registerReceiver(NetworkManager.s2c(), RoughlyEnoughItemsNetwork.CREATE_ITEMS_MESSAGE_PACKET, (buf, context) -> { - ItemStack stack = buf.readJsonWithCodec(ItemStack.OPTIONAL_CODEC); + ItemStack stack = buf.readLenientJsonWithCodec(ItemStack.OPTIONAL_CODEC); String player = buf.readUtf(32767); if (client.player != null) { client.player.displayClientMessage(Component.literal(I18n.get("text.rei.cheat_items").replaceAll("\\{item_name}", EntryStacks.of(stack.copy()).asFormattedText().getString()).replaceAll("\\{item_count}", stack.copy().getCount() + "").replaceAll("\\{player_name}", player)), false); diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java index 511decbd6..99fd2cfca 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java @@ -90,7 +90,7 @@ public class RoughlyEnoughItemsNetwork { player.displayClientMessage(Component.translatable("text.rei.no_permission_cheat").withStyle(ChatFormatting.RED), false); return; } - ItemStack stack = buf.readJsonWithCodec(ItemStack.OPTIONAL_CODEC); |
