diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-28 00:49:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-28 16:49:28 +1100 |
| commit | ea3ec354ba3bb5b4ac64b8032816b8e4c407f099 (patch) | |
| tree | 2a1b35a90a5b2e430ed8b09cfb0c6c8e28166039 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java | |
| parent | 0aa264dd9df3205cf9641f052b6622fd36b811d5 (diff) | |
| download | notenoughupdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.tar.gz notenoughupdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.tar.bz2 notenoughupdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.zip | |
more code clean up (#38)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java index 1cc34412..d1cc8040 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java @@ -32,7 +32,6 @@ import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; public class StorageManager { - private static final StorageManager INSTANCE = new StorageManager(); private static final Gson GSON = new GsonBuilder() .registerTypeAdapter(ItemStack.class, new ItemStackSerializer()) @@ -40,8 +39,7 @@ public class StorageManager { public static class ItemStackSerializer implements JsonSerializer<ItemStack> { @Override - public JsonElement serialize(ItemStack src, Type typeOfSrc, - JsonSerializationContext context) { + public JsonElement serialize(ItemStack src, Type typeOfSrc, JsonSerializationContext context) { NBTTagCompound tag = src.serializeNBT(); return nbtToJson(tag); } @@ -51,8 +49,7 @@ public class StorageManager { public static class ItemStackDeserilizer implements JsonDeserializer<ItemStack> { @Override - public ItemStack deserialize(JsonElement json, Type typeOfT, - JsonDeserializationContext context) throws JsonParseException { + public ItemStack deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { try { JsonObject object = json.getAsJsonObject(); |
