Vault optimizations / Removed unloader

This commit is contained in:
Anuken
2018-07-14 10:47:18 -04:00
parent 642842888a
commit 59ade6cf09
12 changed files with 259 additions and 256 deletions
+3 -2
View File
@@ -259,12 +259,13 @@ public class TypeIO{
@WriteClass(Item.class)
public static void writeItem(ByteBuffer buffer, Item item){
buffer.put((byte) item.id);
buffer.put(item == null ? -1 : (byte) item.id);
}
@ReadClass(Item.class)
public static Item readItem(ByteBuffer buffer){
return Item.getByID(buffer.get());
byte id = buffer.get();
return id == -1 ? null : Item.getByID(id);
}
@WriteClass(Recipe.class)