Move data source meta data from the compressed binary into DB columns
This commit is contained in:
+36
-11
@@ -37,23 +37,34 @@ package com.seibel.distanthorizons.api.enums.worldGeneration;
|
||||
*/
|
||||
public enum EDhApiWorldGenerationStep
|
||||
{
|
||||
EMPTY(0),
|
||||
STRUCTURE_START(1),
|
||||
STRUCTURE_REFERENCE(2),
|
||||
BIOMES(3),
|
||||
NOISE(4),
|
||||
SURFACE(5),
|
||||
CARVERS(6),
|
||||
LIQUID_CARVERS(7),
|
||||
FEATURES(8),
|
||||
LIGHT(9);
|
||||
EMPTY(0, "empty"),
|
||||
STRUCTURE_START(1, "structure_start"),
|
||||
STRUCTURE_REFERENCE(2, "structure_reference"),
|
||||
BIOMES(3, "biomes"),
|
||||
NOISE(4, "noise"),
|
||||
SURFACE(5, "surface"),
|
||||
CARVERS(6, "carvers"),
|
||||
LIQUID_CARVERS(7, "liquid_carvers"),
|
||||
FEATURES(8, "features"),
|
||||
LIGHT(9, "light");
|
||||
|
||||
|
||||
|
||||
/** used when serializing this enum. */
|
||||
public final String name;
|
||||
public final byte value;
|
||||
|
||||
EDhApiWorldGenerationStep(int value) { this.value = (byte) value; }
|
||||
|
||||
EDhApiWorldGenerationStep(int value, String name)
|
||||
{
|
||||
this.value = (byte) value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
//=========//
|
||||
// parsing //
|
||||
//=========//
|
||||
|
||||
/** @return null if the value doesn't correspond to a {@link EDhApiWorldGenerationStep}. */
|
||||
public static EDhApiWorldGenerationStep fromValue(int value)
|
||||
@@ -69,4 +80,18 @@ public enum EDhApiWorldGenerationStep
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @return null if the value doesn't correspond to a {@link EDhApiWorldGenerationStep}. */
|
||||
public static EDhApiWorldGenerationStep fromName(String name)
|
||||
{
|
||||
for (EDhApiWorldGenerationStep genStep : EDhApiWorldGenerationStep.values())
|
||||
{
|
||||
if (genStep.name.equals(name))
|
||||
{
|
||||
return genStep;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user