Can has json version of a scarpet value
This commit is contained in:
1 parent
b48c52cce4
commit
e759a368b9
5 files changed
+57
-3
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package carpet.script.value;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonNull;
|
||||
import net.minecraft.nbt.StringTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
|
||||
@@ -60,4 +62,10 @@ public class NullValue extends NumericValue // TODO check nonsingleton code
|
||||
if (!force) throw new NBTSerializableValue.IncompatibleTypeException(this);
|
||||
return StringTag.of("null");
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonElement toJson()
|
||||
{
|
||||
return JsonNull.INSTANCE;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user