mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-01 14:38:55 +00:00
.
This commit is contained in:
1 parent
a3912d7889
commit
1e28214ce9
10 files changed
+80
-24
No files matched your search
@@ -74,7 +74,7 @@ public class StorageManager {
|
||||
|
||||
public static void Save(SiegeEquipment equipment) {
|
||||
|
||||
storage = new File(folder, "Example.json");
|
||||
storage = new File(folder, equipment.EquipmentName + ".json");
|
||||
FileWriter writer;
|
||||
try {
|
||||
writer = new FileWriter(storage, false);
|
||||
@@ -95,7 +95,7 @@ public class StorageManager {
|
||||
public CrunchProjectile deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
|
||||
JsonObject Object = json.getAsJsonObject();
|
||||
JsonElement type = Object.get(TypeName);
|
||||
System.out.println(type.getAsString());
|
||||
|
||||
switch (type.getAsString()) {
|
||||
case "Entity":
|
||||
return gson.fromJson(Object, EntityProjectile.class);
|
||||
|
||||
Reference in new issue
Block a user