add import/load command
This commit is contained in:
parent
96fb940087
commit
614e859146
9 changed files with 178 additions and 32 deletions
|
@ -10,9 +10,11 @@ import common.log.Log;
|
|||
import common.rng.PerlinGen;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Displayable;
|
||||
import common.util.ExtMath;
|
||||
import common.util.Identifyable;
|
||||
|
||||
public enum Biome {
|
||||
public enum Biome implements Identifyable, Displayable {
|
||||
NONE(0, "none", "<Keins>", 0x000000),
|
||||
PLAINS(1, "plains", "Ebene", 0x8db360, 12.0f, 40.0f),
|
||||
DESERT(2, "desert", "Wüste", 0xfa9418, 60.0f, 0.0f),
|
||||
|
@ -232,4 +234,12 @@ public enum Biome {
|
|||
double d1 = (double)ExtMath.clampf(this.humidity * 0.01f, 0.0F, 1.0F);
|
||||
return Colorizer.getFoliageColor(d0, d1);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,6 +92,7 @@ public abstract class UniverseRegistry {
|
|||
Dimension dim = Dimension.getByTag(list.get(z));
|
||||
if(!REGISTRY.containsKey(dim.getDimensionId()) && !ALIASES.containsKey(dim.getDimensionName()))
|
||||
register(dim);
|
||||
nextDimId = dim.getDimensionId() + 1 > nextDimId ? dim.getDimensionId() + 1 : nextDimId;
|
||||
}
|
||||
|
||||
list = tag.getList("Names");
|
||||
|
@ -253,6 +254,7 @@ public abstract class UniverseRegistry {
|
|||
|
||||
public static Planet registerPlanet(String star, String name, String custom, int sky, int fog, int clouds, long orbit, long rotation,
|
||||
float offset, float gravity, float temperature, int brightness) {
|
||||
star = star == null ? new Random().pick(Lists.newArrayList(STAR_MAP.keySet())).getDimensionName() : star;
|
||||
if(!ALIASES.containsKey(star) || ALIASES.get(star).getType() != DimType.STAR || ALIASES.containsKey(name))
|
||||
return null;
|
||||
Planet dim = new Planet(nextDimId++, name, sky, fog, clouds, orbit, rotation, offset, gravity, temperature, brightness);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue