public class DataFix
extends java.lang.Object
| Constructor and Description |
|---|
DataFix(java.lang.String tag,
java.util.function.Function<com.google.gson.JsonObject,com.google.gson.JsonElement> dataFixer)
Constructs a new DataFix with a String tag target and a
Function that accepts a JsonObject
representing the generator settings and outputs a nullable JsonElement to add or replace a value at said tag. |
| Modifier and Type | Method and Description |
|---|---|
java.util.function.Function<com.google.gson.JsonObject,com.google.gson.JsonElement> |
getDataFixer()
Gets the data fixer function.
|
java.lang.String |
getTag()
Gets the generator settings tag.
|
public DataFix(java.lang.String tag,
java.util.function.Function<com.google.gson.JsonObject,com.google.gson.JsonElement> dataFixer)
Function that accepts a JsonObject
representing the generator settings and outputs a nullable JsonElement to add or replace a value at said tag.tag - The generator setting target.dataFixer - A function that returns the new value for the tag. The returned value may be null, in which case no change will occur.public java.lang.String getTag()
public java.util.function.Function<com.google.gson.JsonObject,com.google.gson.JsonElement> getDataFixer()