mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-21 03:33:23 +00:00
fix reading custom mantle flags from json
This commit is contained in:
parent
11cfd85f6a
commit
6964b99744
@ -36,7 +36,6 @@ import com.volmit.iris.util.data.DataProvider;
|
||||
import com.volmit.iris.util.io.IO;
|
||||
import com.volmit.iris.util.json.JSONObject;
|
||||
import com.volmit.iris.util.mantle.flag.MantleFlag;
|
||||
import com.volmit.iris.util.mantle.flag.ReservedFlag;
|
||||
import com.volmit.iris.util.math.Position2;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.noise.CNG;
|
||||
@ -244,9 +243,9 @@ public class IrisDimension extends IrisRegistrant {
|
||||
@Desc("The Subterrain Fluid Layer Height")
|
||||
private int caveLavaHeight = 8;
|
||||
@RegistryListFunction(ComponentFlagFunction.class)
|
||||
@ArrayType(type = ReservedFlag.class)
|
||||
@ArrayType(type = String.class)
|
||||
@Desc("Collection of disabled components")
|
||||
private KList<ReservedFlag> disabledComponents = new KList<>();
|
||||
private KList<MantleFlag> disabledComponents = new KList<>();
|
||||
@Desc("A list of globally applied pre-processors")
|
||||
@ArrayType(type = IrisPreProcessors.class)
|
||||
private KList<IrisPreProcessors> globalPreProcessors = new KList<>();
|
||||
|
@ -52,6 +52,6 @@ public sealed interface MantleFlag permits CustomFlag, ReservedFlag {
|
||||
static MantleFlag of(int ordinal) {
|
||||
if (ordinal < MIN_ORDINAL || ordinal > MAX_ORDINAL)
|
||||
throw new IllegalArgumentException("Ordinal must be between " + MIN_ORDINAL + " and " + MAX_ORDINAL);
|
||||
return new CustomFlag("custom:"+ordinal, ordinal);
|
||||
return new CustomFlag("CUSTOM:"+ordinal, ordinal);
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
public class MantleFlagAdapter extends TypeAdapter<MantleFlag> {
|
||||
private static final String CUSTOM = "custom:";
|
||||
private static final String CUSTOM = "CUSTOM:";
|
||||
private static final int CUSTOM_LENGTH = CUSTOM.length();
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user