diff --git a/src/main/java/com/io/yutian/aulib/serialize/SerializeHelper.java b/src/main/java/com/io/yutian/aulib/serialize/SerializeHelper.java index 962ea72..6a5416c 100644 --- a/src/main/java/com/io/yutian/aulib/serialize/SerializeHelper.java +++ b/src/main/java/com/io/yutian/aulib/serialize/SerializeHelper.java @@ -84,6 +84,7 @@ public class SerializeHelper { } if (serializers.containsKey(clazz)) { Serializer serializer = serializers.get(clazz); + System.out.println(serializer+":"+serializer.deserialize(value)); return serializer.deserialize(value); } if (ISerializable.class.isAssignableFrom(clazz)) { @@ -165,9 +166,6 @@ public class SerializeHelper { } return jsonObject; } else { - if (clazz.toString().startsWith("net.minecraft")) { - return null; - } return serialize(value); } } diff --git a/src/main/java/com/io/yutian/aulib/serialize/serializers/ItemStackSerializer.java b/src/main/java/com/io/yutian/aulib/serialize/serializers/ItemStackSerializer.java index e427ffe..a29a288 100644 --- a/src/main/java/com/io/yutian/aulib/serialize/serializers/ItemStackSerializer.java +++ b/src/main/java/com/io/yutian/aulib/serialize/serializers/ItemStackSerializer.java @@ -13,10 +13,10 @@ public class ItemStackSerializer implements Serializer { public Object serialize(ItemStack value) { JSONObject jsonObject = new JSONObject(); net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(value); - jsonObject.put("Type", nmsItemStack.c().k().g().a()); + jsonObject.put("id", nmsItemStack.c().k().g().a()); jsonObject.put("Count", nmsItemStack.J()); NBTTagCompound nbtTagCompound = nmsItemStack.u(); - jsonObject.put("Tag", nbtTagCompound.toString()); + jsonObject.put("tag", nbtTagCompound.toString()); return jsonObject; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 9825133..5355491 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: AuLib main: com.io.yutian.aulib.AuLib -version: 1.6.1 +version: 1.6.2 api-version: 1.18 author: SuperYuTian \ No newline at end of file