emu.grasscutter.data.binout.AbilityMixinData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grasscutter Show documentation
Show all versions of grasscutter Show documentation
A server software reimplementation for an anime game.
package emu.grasscutter.data.binout;
import com.google.gson.*;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import java.io.Serializable;
import java.util.*;
public class AbilityMixinData implements Serializable {
private static final long serialVersionUID = -2001232313615923575L;
public enum Type {
AttachToGadgetStateMixin,
AttachToStateIDMixin,
ShieldBarMixin,
TileAttackManagerMixin;
}
@SerializedName("$type")
public Type type;
private JsonElement modifierName;
public List getModifierNames() {
if (modifierName.isJsonArray()) {
java.lang.reflect.Type listType = (new TypeToken>() {}).getType();
List list = (new Gson()).fromJson(modifierName, listType);
return list;
} else {
return Arrays.asList(modifierName.getAsString());
}
}
}