initial populator reimplementation
This commit is contained in:
parent
9688d1d802
commit
b9d62c2253
13 changed files with 86 additions and 39 deletions
|
@ -128,7 +128,7 @@ public class BlockCactus extends Block
|
|||
}
|
||||
|
||||
Block block = worldIn.getState(pos.down()).getBlock();
|
||||
return block == Blocks.cactus || block == Blocks.sand;
|
||||
return block == Blocks.cactus || block == Blocks.sand || block == Blocks.red_sand;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,7 +41,7 @@ public class BlockDeadBush extends BlockBush
|
|||
*/
|
||||
protected boolean canPlaceBlockOn(Block ground)
|
||||
{
|
||||
return ground == Blocks.sand || ground == Blocks.hardened_clay || ground instanceof BlockColoredClay || ground == Blocks.dirt;
|
||||
return ground == Blocks.sand || ground == Blocks.red_sand || ground == Blocks.hardened_clay || ground instanceof BlockColoredClay || ground == Blocks.dirt || ground == Blocks.coarse_dirt;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -99,7 +99,20 @@ public abstract class Dimension extends Section {
|
|||
}
|
||||
|
||||
public static enum PopulatorType {
|
||||
NONE("none"), TERRANIAN("terranian"), MESARIAN("mesarian");
|
||||
NONE("none"),
|
||||
TERRANIAN("terranian"),
|
||||
MESARIAN("mesarian"),
|
||||
FOREST("forest"),
|
||||
ELVEN_FOREST("elven_forest"),
|
||||
ASTEROIDS("asteroids"),
|
||||
MUSHROOMS("mushrooms"),
|
||||
HELL("hell"),
|
||||
BLACKENED("blackened"),
|
||||
NO_MUSHROOMS("no_mushrooms"),
|
||||
TIAN("tian"),
|
||||
CHEESE("cheese"),
|
||||
CHAOS("chaos"),
|
||||
BASIC("basic");
|
||||
|
||||
private static final Map<String, PopulatorType> LOOKUP = Maps.newHashMap();
|
||||
|
||||
|
@ -440,8 +453,9 @@ public abstract class Dimension extends Section {
|
|||
return this;
|
||||
}
|
||||
|
||||
public final Dimension setMesarianReplacer(State surface) {
|
||||
public final Dimension setMesarianReplacer(State surface, State top) {
|
||||
this.surface = surface;
|
||||
this.top = top;
|
||||
this.replacerType = ReplacerType.MESARIAN;
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ public final class Space extends Dimension {
|
|||
private Space() {
|
||||
super(false);
|
||||
this.setPhysics(World.MAX_SIZE, 1L, 1L, 0.0f, 0.0f, 2.7f, 15);
|
||||
this.setStarBrightness(1.0f).setDeepStarBrightness(1.0f);
|
||||
this.setStarBrightness(1.0f).setDeepStarBrightness(1.0f).setPopulator(PopulatorType.ASTEROIDS);
|
||||
}
|
||||
|
||||
public final DimType getType() {
|
||||
|
|
|
@ -13,6 +13,7 @@ import common.dimension.Area;
|
|||
import common.dimension.CloudType;
|
||||
import common.dimension.DimType;
|
||||
import common.dimension.Dimension;
|
||||
import common.dimension.Dimension.PopulatorType;
|
||||
import common.dimension.Domain;
|
||||
import common.dimension.Galaxy;
|
||||
import common.dimension.Moon;
|
||||
|
@ -490,6 +491,7 @@ public abstract class UniverseRegistry {
|
|||
registerPlanet("Terra", new Planet(6378136, 8766144L, 24000L, 28.0f, 9.81f, 259.15f)
|
||||
.setPerlinGen(Blocks.stone.getState(), Blocks.water.getState(), 63)
|
||||
.setTerranianReplacer(Blocks.grass.getState(), Blocks.dirt.getState(), Blocks.gravel.getState(), Blocks.sand.getState())
|
||||
.setPopulator(PopulatorType.BASIC)
|
||||
.setBiomeGen(new Biome(8.0f, 80.0f), false, 4, 4, 6, 50).enableSnow()
|
||||
.setFrostBiomes(new Biome(-20.0f, 50.0f, Scaling.PLAINS_LOW), new Biome(-20.0f, 50.0f, Scaling.PLAINS_LOW), new Biome(-20.0f, 50.0f, Scaling.PLAINS_LOW), new Biome(-40.0f, 40.0f, Scaling.PLAINS_MEDIUM), new Biome(-8.0f, 80.0f, Scaling.PLAINS_MEDIUM))
|
||||
.setColdBiomes(new Biome(8.0f, 80.0f), new Biome(-12.0f, 30.0f, Scaling.HILLS_LARGE), new Biome(-10.0f, 80.0f, Scaling.PLAINS_MEDIUM), new Biome(12.0f, 40.0f, Scaling.PLAINS_LOW))
|
||||
|
@ -595,7 +597,7 @@ public abstract class UniverseRegistry {
|
|||
registerPlanet("gharoth", "Elbenplanet Gharoth", new Planet(2806382, 4837386L, 52960L, 30.0f, 10.0f, 257.3f + 8.0f) //TODO: check temp
|
||||
.setSimpleGen(Blocks.dirt.getState(), Blocks.water.getState(), 64)
|
||||
.setSimpleReplacer(Blocks.grass.getState(), Blocks.dirt.getState(), Blocks.gravel.getState(), Blocks.sand.getState())
|
||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableSnow()
|
||||
.setPopulator(PopulatorType.ELVEN_FOREST).enableCaves(Blocks.air.getState()).setDungeons(4).enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
|
@ -612,7 +614,7 @@ public abstract class UniverseRegistry {
|
|||
registerPlanet("transylvania", "Vampirplanet Transsylvanien", new Planet(8374921, 33850466L, 49760L, 20.0f, 10.0f, 255.5f)
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.water.getState(), 63)
|
||||
.setTerranianReplacer(Blocks.grass.getState(), Blocks.dirt.getState(), Blocks.gravel.getState(), Blocks.sand.getState()).setBiomeGen(new Biome(8.0f, 80.0f), true, 5, 3, 3, 30)
|
||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(10).enableSnow()
|
||||
.setPopulator(PopulatorType.FOREST).enableCavesRavines(Blocks.lava.getState()).setDungeons(10).enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
|
@ -642,7 +644,7 @@ public abstract class UniverseRegistry {
|
|||
});
|
||||
registerPlanet("mesar", "Wüstenplanet Me'sar", new Planet(0xff7f3f, 0xff6022, 0xff6f00, 9823183, 56643366L, 87340L, 11.0f, 333.15f)
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.air.getState(), 63, 0.2f, 0.4f)
|
||||
.setMesarianReplacer(Blocks.red_sand.getState())
|
||||
.setMesarianReplacer(Blocks.red_sand.getState(), Blocks.dirt.getState()).setPopulator(PopulatorType.MESARIAN)
|
||||
.enableCavesRavines(Blocks.lava.getState())
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
|
@ -661,6 +663,7 @@ public abstract class UniverseRegistry {
|
|||
registerPlanet("blackplanet", "Der Schwarze Planet", new Planet(0x000000, 0x000000, 0x000000, 13038204, 4632918508L, 204556L, 12.0f, 0.0f)
|
||||
.setPerlinGen(Blocks.blackened_stone.getState(), Blocks.goo.getState(), 63)
|
||||
.setSimpleAltReplacer(Blocks.blackened_soil.getState(), Blocks.blackened_dirt.getState(), Blocks.blackened_cobble.getState())
|
||||
.setPopulator(PopulatorType.BLACKENED)
|
||||
.enableCaves(Blocks.air.getState()).setDungeons(4)
|
||||
.addLake(Blocks.goo.getState(), null, null, 8, 8, 255, true)
|
||||
// .addOre(Blocks.PLACEHOLDER_ore.getState(), 0, 2, 3, 0, 12, false)
|
||||
|
@ -671,7 +674,7 @@ public abstract class UniverseRegistry {
|
|||
});
|
||||
|
||||
Dimension warp = new Semi(0x0c001f, 0x190033, 124072917, 285.0f, 3).setCloudTexture(CloudType.DENSE).setCloudHeight(238.0f)
|
||||
.setPerlinGen(Blocks.obsidian.getState(), Blocks.lava.getState(), 63, 1.0F, 2.0F)
|
||||
.setPerlinGen(Blocks.obsidian.getState(), Blocks.lava.getState(), 63, 1.0F, 2.0F).setPopulator(PopulatorType.CHAOS)
|
||||
.enableCavesRavines(Blocks.air.getState()).enableLongCaves().enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.obsidian.getState(), 8, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 1, 8, 255, false)
|
||||
|
@ -688,7 +691,8 @@ public abstract class UniverseRegistry {
|
|||
registerDomain("Tian'Xin", () -> {
|
||||
registerArea("Ni'enrath", new Area(0x7f00ff, 532109, 276.15f, 1).setLightColor(0x07000f).setBlockColor(0xcf6fff)
|
||||
.setPerlinGen(Blocks.tian.getState(), Blocks.spring_water.getState(), 63, 0.1F, 1.0F)
|
||||
.setSimpleAltReplacer(Blocks.tian_soil.getState(), Blocks.tian.getState()).enableLongCaves().enableSnow()
|
||||
.setSimpleAltReplacer(Blocks.tian_soil.getState(), Blocks.tian.getState())
|
||||
.setPopulator(PopulatorType.TIAN).enableLongCaves().enableSnow()
|
||||
.addLake(Blocks.spring_water.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
|
||||
.addLiquid(Blocks.flowing_spring_water.getState(), 50, 8, 255, false)
|
||||
.addSpawn(EntityCultivator.class, 50, 1, 1)
|
||||
|
@ -705,7 +709,7 @@ public abstract class UniverseRegistry {
|
|||
registerArea("thedric", "Kreis Thedric", new Area(0x330707, 105639735, 347.15f, 2).enableLongCaves().enableFortresses()
|
||||
.enableWorldCeiling().enableDenseFog()
|
||||
.setCavernGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||
.setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState())
|
||||
.setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState()).setPopulator(PopulatorType.HELL)
|
||||
.addSpawn(EntityFireDemon.class, 50, 4, 4)
|
||||
.addSpawn(EntityTiefling.class, 100, 4, 4)
|
||||
.addSpawn(EntityBloodElf.class, 10, 1, 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue