Fix falling_block not being serializable

This commit is contained in:
libraryaddict 2020-11-30 03:05:13 +13:00
parent eb9eeca691
commit 6f9b2dfd6d

View File

@ -1223,6 +1223,7 @@ public class DisguiseUtilities {
} }
GsonBuilder gsonBuilder = new GsonBuilder(); GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.disableHtmlEscaping(); gsonBuilder.disableHtmlEscaping();
gsonBuilder.registerTypeAdapter(MetaIndex.class, new SerializerMetaIndex()); gsonBuilder.registerTypeAdapter(MetaIndex.class, new SerializerMetaIndex());
@ -1232,13 +1233,14 @@ public class DisguiseUtilities {
gsonBuilder.registerTypeAdapter(PropertyMap.class, new PropertyMap.Serializer()); gsonBuilder.registerTypeAdapter(PropertyMap.class, new PropertyMap.Serializer());
gsonBuilder.registerTypeHierarchyAdapter(ItemStack.class, new SerializerItemStack()); gsonBuilder.registerTypeHierarchyAdapter(ItemStack.class, new SerializerItemStack());
if (NmsVersion.v1_13.isSupported()) {
gsonBuilder.registerTypeHierarchyAdapter(BlockData.class, new SerializerBlockData());
}
// Gotta register all the flag watcher stuff before I make this one
gsonBuilder.registerTypeAdapter(FlagWatcher.class, new SerializerFlagWatcher(gsonBuilder.create())); gsonBuilder.registerTypeAdapter(FlagWatcher.class, new SerializerFlagWatcher(gsonBuilder.create()));
gsonBuilder.registerTypeAdapter(Disguise.class, new SerializerDisguise()); gsonBuilder.registerTypeAdapter(Disguise.class, new SerializerDisguise());
if (NmsVersion.v1_13.isSupported()) {
gsonBuilder.registerTypeAdapter(BlockData.class, new SerializerBlockData());
}
gson = gsonBuilder.create(); gson = gsonBuilder.create();
if (!profileCache.exists()) { if (!profileCache.exists()) {