Skip to content

Commit

Permalink
Update ItemTranslator#getClientboundItemType
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Jan 7, 2025
1 parent e67578e commit 6f328e5
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.api.type.types.version.Types1_20_5;
import com.viaversion.viaversion.api.type.types.version.Types1_21;
import com.viaversion.viaversion.api.type.types.version.Types1_21_2;
import com.viaversion.viaversion.api.type.types.version.Types1_21_4;
import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ClientboundPackets1_12_1;
import io.netty.buffer.Unpooled;
import net.minecraft.client.MinecraftClient;
Expand Down Expand Up @@ -131,8 +134,14 @@ public static Type<Item> getClientboundItemType(final ProtocolVersion targetVers
return Types.ITEM1_13_2;
} else if (targetVersion.olderThan(ProtocolVersion.v1_20_5)) {
return Types.ITEM1_20_2;
} else {
} else if (targetVersion.olderThan(ProtocolVersion.v1_21)) {
return Types1_20_5.ITEM;
} else if (targetVersion.olderThan(ProtocolVersion.v1_21_2)) {
return Types1_21.ITEM;
} else if (targetVersion.olderThan(ProtocolVersion.v1_21_4)) {
return Types1_21_2.ITEM;
} else {
return Types1_21_4.ITEM;
}
}

Expand Down

0 comments on commit 6f328e5

Please sign in to comment.