From fadebbc17b8ff91cc3bdaead117d106fe82af2dc Mon Sep 17 00:00:00 2001 From: Gerrygames Date: Mon, 21 Jan 2019 14:18:24 +0100 Subject: [PATCH] rewrite items in metadata --- .../protocol1_12_2to1_13/packets/EntityPackets1_13.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/EntityPackets1_13.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/EntityPackets1_13.java index 99438011..205335d5 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/EntityPackets1_13.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/EntityPackets1_13.java @@ -13,6 +13,7 @@ import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.Protocol1_12_2To1_13; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data.EntityTypeMapping; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data.PaintingMapping; import us.myles.ViaVersion.api.PacketWrapper; +import us.myles.ViaVersion.api.minecraft.item.Item; import us.myles.ViaVersion.api.minecraft.metadata.Metadata; import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_12; import us.myles.ViaVersion.api.remapper.PacketHandler; @@ -399,6 +400,12 @@ public class EntityPackets1_13 extends EntityRewriter { } } + // Rewrite items + else if (typeId == 6) { + meta.setMetaType(MetaType1_12.Slot); + BlockItemPackets1_13.toClient((Item) meta.getValue()); + } + // Discontinue particles else if (typeId == 15) { meta.setMetaType(MetaType1_12.Discontinued);