diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java index ff57ebdb8..0c78d098c 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java @@ -455,7 +455,8 @@ public abstract class Protocol T get(Class objectClass) { + @Nullable + public T get(Class objectClass) { return (T) storedObjects.get(objectClass); } diff --git a/common/src/main/java/us/myles/ViaVersion/api/rewriters/ItemRewriter.java b/common/src/main/java/us/myles/ViaVersion/api/rewriters/ItemRewriter.java index b91efa56e..d83af1076 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/rewriters/ItemRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/api/rewriters/ItemRewriter.java @@ -69,7 +69,7 @@ public class ItemRewriter { handler(wrapper -> { byte slot; do { - slot = wrapper.read(Type.BYTE); + slot = wrapper.passthrough(Type.BYTE); // & 0x7F into an extra variable if slot is needed toClient.rewrite(wrapper.passthrough(type)); } while ((slot & 0xFFFFFF80) != 0);