misc refactoring
This commit is contained in:
parent
eba8f6ea98
commit
10ba39c70b
85 changed files with 512 additions and 526 deletions
|
@ -95,7 +95,7 @@ import client.window.Wheel;
|
||||||
import client.window.Window;
|
import client.window.Window;
|
||||||
import client.window.WindowEvent;
|
import client.window.WindowEvent;
|
||||||
import client.world.WorldClient;
|
import client.world.WorldClient;
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.collect.Maps;
|
import common.collect.Maps;
|
||||||
|
@ -1730,7 +1730,7 @@ public class Client implements IThreadListener {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseBiome biome = null;
|
Biome biome = null;
|
||||||
String bline;
|
String bline;
|
||||||
String lline;
|
String lline;
|
||||||
if(this.world.isBlockLoaded(blockpos)) {
|
if(this.world.isBlockLoaded(blockpos)) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import client.renderer.particle.EffectRenderer;
|
||||||
import client.renderer.texture.DynamicTexture;
|
import client.renderer.texture.DynamicTexture;
|
||||||
import client.renderer.texture.TextureMap;
|
import client.renderer.texture.TextureMap;
|
||||||
import client.world.WorldClient;
|
import client.world.WorldClient;
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
|
@ -1144,7 +1144,7 @@ public class EntityRenderer {
|
||||||
for (int l = 0; l < k; ++l)
|
for (int l = 0; l < k; ++l)
|
||||||
{
|
{
|
||||||
BlockPos blockpos1 = world.getPrecipitationHeight(blockpos.add(this.random.zrange(i) - this.random.zrange(i), 0, this.random.zrange(i) - this.random.zrange(i)));
|
BlockPos blockpos1 = world.getPrecipitationHeight(blockpos.add(this.random.zrange(i) - this.random.zrange(i), 0, this.random.zrange(i) - this.random.zrange(i)));
|
||||||
BaseBiome biomegenbase = world.getBiomeGenForCoords(blockpos1);
|
Biome biomegenbase = world.getBiomeGenForCoords(blockpos1);
|
||||||
BlockPos blockpos2 = blockpos1.down();
|
BlockPos blockpos2 = blockpos1.down();
|
||||||
Block block = world.getState(blockpos2).getBlock();
|
Block block = world.getState(blockpos2).getBlock();
|
||||||
float temp = World.ABSOLUTE_ZERO + world.getTempOffset() + biomegenbase.getTemperature(blockpos1);
|
float temp = World.ABSOLUTE_ZERO + world.getTempOffset() + biomegenbase.getTemperature(blockpos1);
|
||||||
|
@ -1253,7 +1253,7 @@ public class EntityRenderer {
|
||||||
double d3 = (double)this.rainXCoords[i2] * 0.5D;
|
double d3 = (double)this.rainXCoords[i2] * 0.5D;
|
||||||
double d4 = (double)this.rainYCoords[i2] * 0.5D;
|
double d4 = (double)this.rainYCoords[i2] * 0.5D;
|
||||||
blockpos$mutableblockpos.set(l1, 0, k1);
|
blockpos$mutableblockpos.set(l1, 0, k1);
|
||||||
BaseBiome biomegenbase = world.getBiomeGenForCoords(blockpos$mutableblockpos);
|
Biome biomegenbase = world.getBiomeGenForCoords(blockpos$mutableblockpos);
|
||||||
|
|
||||||
// if (biomegenbase.canRain() || biomegenbase.isSnowyBiome())
|
// if (biomegenbase.canRain() || biomegenbase.isSnowyBiome())
|
||||||
// {
|
// {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.tileentity.TileEntity;
|
import common.tileentity.TileEntity;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -125,7 +125,7 @@ public class RegionRenderCache extends ChunkCache implements IWorldAccess
|
||||||
return i << 20 | j << 4;
|
return i << 20 | j << 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getBiomeGenForCoords(BlockPos pos)
|
public Biome getBiomeGenForCoords(BlockPos pos)
|
||||||
{
|
{
|
||||||
return this.worldObj.getBiomeGenForCoords(pos);
|
return this.worldObj.getBiomeGenForCoords(pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,13 +15,13 @@ import common.collect.Maps;
|
||||||
import common.collect.Sets;
|
import common.collect.Sets;
|
||||||
import common.init.BlockRegistry;
|
import common.init.BlockRegistry;
|
||||||
import common.init.FluidRegistry;
|
import common.init.FluidRegistry;
|
||||||
import common.init.IRegistry;
|
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.init.RegistrySimple;
|
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
import common.util.IRegistry;
|
||||||
|
import common.util.RegistrySimple;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
public abstract class ModelBakery
|
public abstract class ModelBakery
|
||||||
|
|
|
@ -13,8 +13,8 @@ import common.collect.Maps;
|
||||||
import common.init.BlockRegistry;
|
import common.init.BlockRegistry;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.FluidRegistry;
|
import common.init.FluidRegistry;
|
||||||
import common.init.IRegistry;
|
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
import common.util.IRegistry;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
public class ModelManager
|
public class ModelManager
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Set;
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.renderer.particle.EntityFX;
|
import client.renderer.particle.EntityFX;
|
||||||
import client.renderer.particle.EntityFirework;
|
import client.renderer.particle.EntityFirework;
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.collect.Sets;
|
import common.collect.Sets;
|
||||||
|
@ -759,7 +759,7 @@ public class WorldClient extends AWorldClient
|
||||||
public Vec3 getSkyColor(Entity entity, float partial) {
|
public Vec3 getSkyColor(Entity entity, float partial) {
|
||||||
BlockPos pos = new BlockPos(ExtMath.floord(entity.posX), ExtMath.floord(entity.posY),
|
BlockPos pos = new BlockPos(ExtMath.floord(entity.posX), ExtMath.floord(entity.posY),
|
||||||
ExtMath.floord(entity.posZ));
|
ExtMath.floord(entity.posZ));
|
||||||
BaseBiome biome = this.getBiomeGenForCoords(pos);
|
Biome biome = this.getBiomeGenForCoords(pos);
|
||||||
Vec3 vec;
|
Vec3 vec;
|
||||||
if(biome.skyColor != 0xffffffff)
|
if(biome.skyColor != 0xffffffff)
|
||||||
vec = new Vec3(biome.skyColor);
|
vec = new Vec3(biome.skyColor);
|
||||||
|
@ -815,7 +815,7 @@ public class WorldClient extends AWorldClient
|
||||||
|
|
||||||
public Vec3 getCloudColour(Entity entity, float partialTicks) {
|
public Vec3 getCloudColour(Entity entity, float partialTicks) {
|
||||||
Vec3 color = new Vec3(this.dimension.getCloudColor());
|
Vec3 color = new Vec3(this.dimension.getCloudColor());
|
||||||
BaseBiome biome = this.getBiomeGenForCoords(new BlockPos(ExtMath.floord(entity.posX), ExtMath.floord(entity.posY),
|
Biome biome = this.getBiomeGenForCoords(new BlockPos(ExtMath.floord(entity.posX), ExtMath.floord(entity.posY),
|
||||||
ExtMath.floord(entity.posZ)));
|
ExtMath.floord(entity.posZ)));
|
||||||
if(biome.cloudColor != 0xffffffff)
|
if(biome.cloudColor != 0xffffffff)
|
||||||
color = new Vec3(biome.cloudColor);
|
color = new Vec3(biome.cloudColor);
|
||||||
|
@ -854,7 +854,7 @@ public class WorldClient extends AWorldClient
|
||||||
|
|
||||||
public Vec3 getFogColor(Entity entity, float partialTicks) {
|
public Vec3 getFogColor(Entity entity, float partialTicks) {
|
||||||
Vec3 color = new Vec3(this.dimension.getFogColor());
|
Vec3 color = new Vec3(this.dimension.getFogColor());
|
||||||
BaseBiome biome = this.getBiomeGenForCoords(new BlockPos(ExtMath.floord(entity.posX), ExtMath.floord(entity.posY),
|
Biome biome = this.getBiomeGenForCoords(new BlockPos(ExtMath.floord(entity.posX), ExtMath.floord(entity.posY),
|
||||||
ExtMath.floord(entity.posZ)));
|
ExtMath.floord(entity.posZ)));
|
||||||
if(biome.fogColor != 0xffffffff)
|
if(biome.fogColor != 0xffffffff)
|
||||||
color = new Vec3(biome.fogColor);
|
color = new Vec3(biome.fogColor);
|
||||||
|
|
|
@ -12,7 +12,7 @@ import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
|
|
||||||
public enum BaseBiome {
|
public enum Biome {
|
||||||
NONE(0, "none", "<Keins>", 0x000000),
|
NONE(0, "none", "<Keins>", 0x000000),
|
||||||
PLAINS(1, "plains", "Ebene", 0x8db360, 12.0f, 40.0f),
|
PLAINS(1, "plains", "Ebene", 0x8db360, 12.0f, 40.0f),
|
||||||
DESERT(2, "desert", "Wüste", 0xfa9418, 60.0f, 0.0f),
|
DESERT(2, "desert", "Wüste", 0xfa9418, 60.0f, 0.0f),
|
||||||
|
@ -85,11 +85,11 @@ public enum BaseBiome {
|
||||||
MESAPLATEAUFM(166, "mesaPlateauFM", "Mesa-Waldplateau M", 0xb09765, 0.0f, 0.0f, 0xffffff, 9470285, 10387789),
|
MESAPLATEAUFM(166, "mesaPlateauFM", "Mesa-Waldplateau M", 0xb09765, 0.0f, 0.0f, 0xffffff, 9470285, 10387789),
|
||||||
MESAPLATEAUM(167, "mesaPlateauM", "Mesa-Plateau M", 0xca8c65, 0.0f, 0.0f, 0xffffff, 9470285, 10387789);
|
MESAPLATEAUM(167, "mesaPlateauM", "Mesa-Plateau M", 0xca8c65, 0.0f, 0.0f, 0xffffff, 9470285, 10387789);
|
||||||
|
|
||||||
public static final BaseBiome DEF_BIOME = FOREST;
|
public static final Biome DEF_BIOME = FOREST;
|
||||||
private static final PerlinGen TEMP_NOISE = new PerlinGen(new Random(1234L), 1);
|
private static final PerlinGen TEMP_NOISE = new PerlinGen(new Random(836430928262265276L), 1);
|
||||||
private static final PerlinGen COLOR_NOISE = new PerlinGen(new Random(2345L), 1);
|
private static final PerlinGen COLOR_NOISE = new PerlinGen(new Random(6549321755809421L), 1);
|
||||||
private static final BaseBiome[] BIOMES = new BaseBiome[256];
|
private static final Biome[] BIOMES = new Biome[256];
|
||||||
private static final Map<String, BaseBiome> LOOKUP = Maps.newTreeMap();
|
private static final Map<String, Biome> LOOKUP = Maps.newTreeMap();
|
||||||
|
|
||||||
public final int id;
|
public final int id;
|
||||||
public final String name;
|
public final String name;
|
||||||
|
@ -105,7 +105,7 @@ public enum BaseBiome {
|
||||||
public final int cloudColor;
|
public final int cloudColor;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
for(BaseBiome biome : values()) {
|
for(Biome biome : values()) {
|
||||||
BIOMES[biome.id] = biome;
|
BIOMES[biome.id] = biome;
|
||||||
if(LOOKUP.containsKey(biome.name.toLowerCase()))
|
if(LOOKUP.containsKey(biome.name.toLowerCase()))
|
||||||
throw new IllegalStateException("Biom \"" + biome.name + "\" ist als ID " + LOOKUP.get(biome.name.toLowerCase()).id + " und " + biome.id + " definiert");
|
throw new IllegalStateException("Biom \"" + biome.name + "\" ist als ID " + LOOKUP.get(biome.name.toLowerCase()).id + " und " + biome.id + " definiert");
|
||||||
|
@ -113,7 +113,7 @@ public enum BaseBiome {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BaseBiome getBiome(int id)
|
public static Biome getBiome(int id)
|
||||||
{
|
{
|
||||||
if (id >= 0 && id < BIOMES.length)
|
if (id >= 0 && id < BIOMES.length)
|
||||||
{
|
{
|
||||||
|
@ -126,11 +126,11 @@ public enum BaseBiome {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BaseBiome getBiomeDef(int id)
|
public static Biome getBiomeDef(int id)
|
||||||
{
|
{
|
||||||
if (id >= 0 && id < BIOMES.length)
|
if (id >= 0 && id < BIOMES.length)
|
||||||
{
|
{
|
||||||
BaseBiome biome = BIOMES[id];
|
Biome biome = BIOMES[id];
|
||||||
return biome == null ? DEF_BIOME : biome;
|
return biome == null ? DEF_BIOME : biome;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -144,8 +144,8 @@ public enum BaseBiome {
|
||||||
return Lists.newArrayList(LOOKUP.keySet());
|
return Lists.newArrayList(LOOKUP.keySet());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BaseBiome findByName(String name) {
|
public static Biome findByName(String name) {
|
||||||
BaseBiome biome = LOOKUP.get(name.toLowerCase().replace(" ", "").replace("_", ""));
|
Biome biome = LOOKUP.get(name.toLowerCase().replace(" ", "").replace("_", ""));
|
||||||
if(biome == null) {
|
if(biome == null) {
|
||||||
int z;
|
int z;
|
||||||
try {
|
try {
|
||||||
|
@ -159,7 +159,7 @@ public enum BaseBiome {
|
||||||
return biome;
|
return biome;
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseBiome(int id, String name, String display, int color, float temperature, float humidity, int waterColor, int grassColor, int foliageColor, int skyColor, int fogColor, int cloudColor) {
|
private Biome(int id, String name, String display, int color, float temperature, float humidity, int waterColor, int grassColor, int foliageColor, int skyColor, int fogColor, int cloudColor) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.display = display;
|
this.display = display;
|
||||||
|
@ -174,19 +174,19 @@ public enum BaseBiome {
|
||||||
this.cloudColor = cloudColor;
|
this.cloudColor = cloudColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseBiome(int id, String name, String display, int color, float temperature, float humidity, int waterColor, int grassColor, int foliageColor) {
|
private Biome(int id, String name, String display, int color, float temperature, float humidity, int waterColor, int grassColor, int foliageColor) {
|
||||||
this(id, name, display, color, temperature, humidity, waterColor, grassColor, foliageColor, 0xffffffff, 0xffffffff, 0xffffffff);
|
this(id, name, display, color, temperature, humidity, waterColor, grassColor, foliageColor, 0xffffffff, 0xffffffff, 0xffffffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseBiome(int id, String name, String display, int color, float temperature, float humidity) {
|
private Biome(int id, String name, String display, int color, float temperature, float humidity) {
|
||||||
this(id, name, display, color, temperature, humidity, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
|
this(id, name, display, color, temperature, humidity, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseBiome(int id, String name, String display, int color, float temperature) {
|
private Biome(int id, String name, String display, int color, float temperature) {
|
||||||
this(id, name, display, color, temperature, 50.0f, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
|
this(id, name, display, color, temperature, 50.0f, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseBiome(int id, String name, String display, int color) {
|
private Biome(int id, String name, String display, int color) {
|
||||||
this(id, name, display, color, 0.0f, 50.0f, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
|
this(id, name, display, color, 0.0f, 50.0f, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import common.world.State;
|
||||||
public interface IBiome {
|
public interface IBiome {
|
||||||
public static abstract class BiomeProvider {
|
public static abstract class BiomeProvider {
|
||||||
private static BiomeProvider provider = new BiomeProvider() {
|
private static BiomeProvider provider = new BiomeProvider() {
|
||||||
public IBiome getBiome(BaseBiome base) {
|
public IBiome getBiome(Biome base) {
|
||||||
return new IBiome() {
|
return new IBiome() {
|
||||||
public State getFiller() {
|
public State getFiller() {
|
||||||
return BlockRegistry.getRegisteredBlock("air").getState();
|
return BlockRegistry.getRegisteredBlock("air").getState();
|
||||||
|
@ -28,14 +28,14 @@ public interface IBiome {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public abstract IBiome getBiome(BaseBiome base);
|
public abstract IBiome getBiome(Biome base);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setProvider(BiomeProvider provider) {
|
public static void setProvider(BiomeProvider provider) {
|
||||||
BiomeProvider.provider = provider;
|
BiomeProvider.provider = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBiome getBiome(BaseBiome base) {
|
public static IBiome getBiome(Biome base) {
|
||||||
return BiomeProvider.provider.getBiome(base);
|
return BiomeProvider.provider.getBiome(base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ import common.dispenser.PositionImpl;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.DispenserRegistry;
|
import common.init.DispenserRegistry;
|
||||||
import common.init.RegistryDefaulted;
|
|
||||||
import common.inventory.Container;
|
import common.inventory.Container;
|
||||||
import common.inventory.InventoryHelper;
|
import common.inventory.InventoryHelper;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
|
@ -26,6 +25,7 @@ import common.tileentity.TileEntity;
|
||||||
import common.tileentity.TileEntityDispenser;
|
import common.tileentity.TileEntityDispenser;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
import common.util.RegistryDefaulted;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import common.world.World;
|
import common.world.World;
|
||||||
import common.world.AWorldServer;
|
import common.world.AWorldServer;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package common.color;
|
package common.color;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.IWorldAccess;
|
import common.world.IWorldAccess;
|
||||||
|
|
||||||
|
@ -8,21 +8,21 @@ public enum Colorizer {
|
||||||
NONE(0xffffff), BASIC(0x37b500), PINE(0x3f993f), BIRCH(0x68a723);
|
NONE(0xffffff), BASIC(0x37b500), PINE(0x3f993f), BIRCH(0x68a723);
|
||||||
|
|
||||||
private interface ColorResolver {
|
private interface ColorResolver {
|
||||||
int getColorAtPos(BaseBiome biome, BlockPos pos);
|
int getColorAtPos(Biome biome, BlockPos pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final ColorResolver GRASS_COLOR = new ColorResolver() {
|
private static final ColorResolver GRASS_COLOR = new ColorResolver() {
|
||||||
public int getColorAtPos(BaseBiome biome, BlockPos pos) {
|
public int getColorAtPos(Biome biome, BlockPos pos) {
|
||||||
return biome.getGrassColorAtPos(pos);
|
return biome.getGrassColorAtPos(pos);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
private static final ColorResolver FOLIAGE_COLOR = new ColorResolver() {
|
private static final ColorResolver FOLIAGE_COLOR = new ColorResolver() {
|
||||||
public int getColorAtPos(BaseBiome biome, BlockPos pos) {
|
public int getColorAtPos(Biome biome, BlockPos pos) {
|
||||||
return biome.getFoliageColorAtPos(pos);
|
return biome.getFoliageColorAtPos(pos);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
private static final ColorResolver WATER_COLOR_MULTIPLIER = new ColorResolver() {
|
private static final ColorResolver WATER_COLOR_MULTIPLIER = new ColorResolver() {
|
||||||
public int getColorAtPos(BaseBiome biome, BlockPos pos) {
|
public int getColorAtPos(Biome biome, BlockPos pos) {
|
||||||
return biome.waterColor;
|
return biome.waterColor;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.biome.IBiome;
|
import common.biome.IBiome;
|
||||||
import common.block.LeavesType;
|
import common.block.LeavesType;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
|
@ -270,7 +270,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
private int addRarity = 50; // b.layered
|
private int addRarity = 50; // b.layered
|
||||||
private int seaLevel = 0; // g.perlin, g.cavern, g.simple, g.destroyed, lake (r), r.biome, r.simple, r.alternate, ...
|
private int seaLevel = 0; // g.perlin, g.cavern, g.simple, g.destroyed, lake (r), r.biome, r.simple, r.alternate, ...
|
||||||
|
|
||||||
private BaseBiome defaultBiome = BaseBiome.NONE; // biomegen
|
private Biome defaultBiome = Biome.NONE; // biomegen
|
||||||
|
|
||||||
private State filler = Blocks.air.getState(); // caves+rav, liquid, ore, g.perlin, g.cavern, g.island,
|
private State filler = Blocks.air.getState(); // caves+rav, liquid, ore, g.perlin, g.cavern, g.island,
|
||||||
// g.simple, g.flat (sealevel), r.biome, r.simple, r.alternate, r.toplayer
|
// g.simple, g.flat (sealevel), r.biome, r.simple, r.alternate, r.toplayer
|
||||||
|
@ -283,11 +283,11 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
private State ceiling = null; // chunk
|
private State ceiling = null; // chunk
|
||||||
private State caveFiller = Blocks.air.getState(); // cavebase, ravine
|
private State caveFiller = Blocks.air.getState(); // cavebase, ravine
|
||||||
private State[] layers = null; // g.flat
|
private State[] layers = null; // g.flat
|
||||||
private BaseBiome[] frostBiomes = null; // b.layered
|
private Biome[] frostBiomes = null; // b.layered
|
||||||
private BaseBiome[] coldBiomes = null; // b.layered
|
private Biome[] coldBiomes = null; // b.layered
|
||||||
private BaseBiome[] mediumBiomes = null; // b.layered
|
private Biome[] mediumBiomes = null; // b.layered
|
||||||
private BaseBiome[] hotBiomes = null; // b.layered
|
private Biome[] hotBiomes = null; // b.layered
|
||||||
private BaseBiome[] addBiomes = null; // b.layered
|
private Biome[] addBiomes = null; // b.layered
|
||||||
|
|
||||||
private final List<FeatureOre> ores = Lists.newArrayList();
|
private final List<FeatureOre> ores = Lists.newArrayList();
|
||||||
private final List<FeatureLake> lakes = Lists.newArrayList();
|
private final List<FeatureLake> lakes = Lists.newArrayList();
|
||||||
|
@ -462,12 +462,12 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Dimension setBiomeGen(BaseBiome mainBiome, boolean semiFixed, int biomeSize, int riverSize, int snowRarity, int seaRarity) {
|
public final Dimension setBiomeGen(Biome mainBiome, boolean semiFixed, int biomeSize, int riverSize, int snowRarity, int seaRarity) {
|
||||||
return this.setBiomeGen(mainBiome, semiFixed, biomeSize, riverSize, snowRarity, seaRarity, 1);
|
return this.setBiomeGen(mainBiome, semiFixed, biomeSize, riverSize, snowRarity, seaRarity, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Dimension setBiomeGen(BaseBiome mainBiome, boolean semiFixed, int biomeSize, int riverSize, int snowRarity, int seaRarity,
|
public final Dimension setBiomeGen(Biome mainBiome, boolean semiFixed, int biomeSize, int riverSize, int snowRarity, int seaRarity,
|
||||||
int addRarity, BaseBiome ... add) {
|
int addRarity, Biome ... add) {
|
||||||
this.defaultBiome = mainBiome;
|
this.defaultBiome = mainBiome;
|
||||||
IBiome biome = IBiome.getBiome(mainBiome);
|
IBiome biome = IBiome.getBiome(mainBiome);
|
||||||
this.top = biome.getFiller();
|
this.top = biome.getFiller();
|
||||||
|
@ -482,27 +482,27 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Dimension setFrostBiomes(BaseBiome ... biomes) {
|
public final Dimension setFrostBiomes(Biome ... biomes) {
|
||||||
this.frostBiomes = biomes;
|
this.frostBiomes = biomes;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Dimension setColdBiomes(BaseBiome ... biomes) {
|
public final Dimension setColdBiomes(Biome ... biomes) {
|
||||||
this.coldBiomes = biomes;
|
this.coldBiomes = biomes;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Dimension setMediumBiomes(BaseBiome ... biomes) {
|
public final Dimension setMediumBiomes(Biome ... biomes) {
|
||||||
this.mediumBiomes = biomes;
|
this.mediumBiomes = biomes;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Dimension setHotBiomes(BaseBiome ... biomes) {
|
public final Dimension setHotBiomes(Biome ... biomes) {
|
||||||
this.hotBiomes = biomes;
|
this.hotBiomes = biomes;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Dimension setBiome(BaseBiome value) {
|
public final Dimension setBiome(Biome value) {
|
||||||
this.defaultBiome = value;
|
this.defaultBiome = value;
|
||||||
IBiome biome = IBiome.getBiome(value);
|
IBiome biome = IBiome.getBiome(value);
|
||||||
this.top = biome.getFiller();
|
this.top = biome.getFiller();
|
||||||
|
@ -1010,7 +1010,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
this.addRarity = tag.getInteger("AddRarity");
|
this.addRarity = tag.getInteger("AddRarity");
|
||||||
// this.biomeRarity = tag.getInteger("BiomeRarity");
|
// this.biomeRarity = tag.getInteger("BiomeRarity");
|
||||||
this.seaLevel = tag.getInteger("SeaLevel");
|
this.seaLevel = tag.getInteger("SeaLevel");
|
||||||
this.defaultBiome = BaseBiome.findByName(tag.getString("DefaultBiome"));
|
this.defaultBiome = Biome.findByName(tag.getString("DefaultBiome"));
|
||||||
this.semiFixed = tag.getBoolean("SemiFixed");
|
this.semiFixed = tag.getBoolean("SemiFixed");
|
||||||
this.defaultWeather = Weather.getByName(tag.getString("DefaultWeather"));
|
this.defaultWeather = Weather.getByName(tag.getString("DefaultWeather"));
|
||||||
this.defaultWeather = this.defaultWeather == null ? Weather.CLEAR : this.defaultWeather;
|
this.defaultWeather = this.defaultWeather == null ? Weather.CLEAR : this.defaultWeather;
|
||||||
|
@ -1043,9 +1043,9 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
this.addBiomes = null;
|
this.addBiomes = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.addBiomes = new BaseBiome[list.tagCount()];
|
this.addBiomes = new Biome[list.tagCount()];
|
||||||
for(int z = 0; z < this.addBiomes.length; z++) {
|
for(int z = 0; z < this.addBiomes.length; z++) {
|
||||||
this.addBiomes[z] = BaseBiome.findByName(list.getStringTagAt(z));
|
this.addBiomes[z] = Biome.findByName(list.getStringTagAt(z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1058,9 +1058,9 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
this.frostBiomes = null;
|
this.frostBiomes = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.frostBiomes = new BaseBiome[list.tagCount()];
|
this.frostBiomes = new Biome[list.tagCount()];
|
||||||
for(int z = 0; z < this.frostBiomes.length; z++) {
|
for(int z = 0; z < this.frostBiomes.length; z++) {
|
||||||
this.frostBiomes[z] = BaseBiome.findByName(list.getStringTagAt(z));
|
this.frostBiomes[z] = Biome.findByName(list.getStringTagAt(z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1073,9 +1073,9 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
this.coldBiomes = null;
|
this.coldBiomes = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.coldBiomes = new BaseBiome[list.tagCount()];
|
this.coldBiomes = new Biome[list.tagCount()];
|
||||||
for(int z = 0; z < this.coldBiomes.length; z++) {
|
for(int z = 0; z < this.coldBiomes.length; z++) {
|
||||||
this.coldBiomes[z] = BaseBiome.findByName(list.getStringTagAt(z));
|
this.coldBiomes[z] = Biome.findByName(list.getStringTagAt(z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1088,9 +1088,9 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
this.mediumBiomes = null;
|
this.mediumBiomes = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.mediumBiomes = new BaseBiome[list.tagCount()];
|
this.mediumBiomes = new Biome[list.tagCount()];
|
||||||
for(int z = 0; z < this.mediumBiomes.length; z++) {
|
for(int z = 0; z < this.mediumBiomes.length; z++) {
|
||||||
this.mediumBiomes[z] = BaseBiome.findByName(list.getStringTagAt(z));
|
this.mediumBiomes[z] = Biome.findByName(list.getStringTagAt(z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1103,9 +1103,9 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
this.hotBiomes = null;
|
this.hotBiomes = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.hotBiomes = new BaseBiome[list.tagCount()];
|
this.hotBiomes = new Biome[list.tagCount()];
|
||||||
for(int z = 0; z < this.hotBiomes.length; z++) {
|
for(int z = 0; z < this.hotBiomes.length; z++) {
|
||||||
this.hotBiomes[z] = BaseBiome.findByName(list.getStringTagAt(z));
|
this.hotBiomes[z] = Biome.findByName(list.getStringTagAt(z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1272,35 +1272,35 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
}
|
}
|
||||||
if(this.addBiomes != null) {
|
if(this.addBiomes != null) {
|
||||||
NBTTagList list = new NBTTagList();
|
NBTTagList list = new NBTTagList();
|
||||||
for(BaseBiome biome : this.addBiomes) {
|
for(Biome biome : this.addBiomes) {
|
||||||
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
||||||
}
|
}
|
||||||
tag.setTag("AddBiomes", list);
|
tag.setTag("AddBiomes", list);
|
||||||
}
|
}
|
||||||
if(this.frostBiomes != null) {
|
if(this.frostBiomes != null) {
|
||||||
NBTTagList list = new NBTTagList();
|
NBTTagList list = new NBTTagList();
|
||||||
for(BaseBiome biome : this.frostBiomes) {
|
for(Biome biome : this.frostBiomes) {
|
||||||
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
||||||
}
|
}
|
||||||
tag.setTag("FrostBiomes", list);
|
tag.setTag("FrostBiomes", list);
|
||||||
}
|
}
|
||||||
if(this.coldBiomes != null) {
|
if(this.coldBiomes != null) {
|
||||||
NBTTagList list = new NBTTagList();
|
NBTTagList list = new NBTTagList();
|
||||||
for(BaseBiome biome : this.coldBiomes) {
|
for(Biome biome : this.coldBiomes) {
|
||||||
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
||||||
}
|
}
|
||||||
tag.setTag("ColdBiomes", list);
|
tag.setTag("ColdBiomes", list);
|
||||||
}
|
}
|
||||||
if(this.mediumBiomes != null) {
|
if(this.mediumBiomes != null) {
|
||||||
NBTTagList list = new NBTTagList();
|
NBTTagList list = new NBTTagList();
|
||||||
for(BaseBiome biome : this.mediumBiomes) {
|
for(Biome biome : this.mediumBiomes) {
|
||||||
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
||||||
}
|
}
|
||||||
tag.setTag("MediumBiomes", list);
|
tag.setTag("MediumBiomes", list);
|
||||||
}
|
}
|
||||||
if(this.hotBiomes != null) {
|
if(this.hotBiomes != null) {
|
||||||
NBTTagList list = new NBTTagList();
|
NBTTagList list = new NBTTagList();
|
||||||
for(BaseBiome biome : this.hotBiomes) {
|
for(Biome biome : this.hotBiomes) {
|
||||||
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
list.appendTag(new NBTTagString(biome.name.toLowerCase()));
|
||||||
}
|
}
|
||||||
tag.setTag("HotBiomes", list);
|
tag.setTag("HotBiomes", list);
|
||||||
|
@ -1430,7 +1430,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
return this.biomeSize;
|
return this.biomeSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getDefaultBiome() {
|
public Biome getDefaultBiome() {
|
||||||
return this.defaultBiome;
|
return this.defaultBiome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1450,7 +1450,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
return this.seaRarity;
|
return this.seaRarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome[] getAddBiomes() {
|
public Biome[] getAddBiomes() {
|
||||||
return this.addBiomes;
|
return this.addBiomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1458,19 +1458,19 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
return this.addRarity;
|
return this.addRarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome[] getHotBiomes() {
|
public Biome[] getHotBiomes() {
|
||||||
return this.hotBiomes;
|
return this.hotBiomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome[] getMediumBiomes() {
|
public Biome[] getMediumBiomes() {
|
||||||
return this.mediumBiomes;
|
return this.mediumBiomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome[] getColdBiomes() {
|
public Biome[] getColdBiomes() {
|
||||||
return this.coldBiomes;
|
return this.coldBiomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome[] getFrostBiomes() {
|
public Biome[] getFrostBiomes() {
|
||||||
return this.frostBiomes;
|
return this.frostBiomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package common.dimension;
|
package common.dimension;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
|
|
||||||
public final class Space extends Dimension {
|
public final class Space extends Dimension {
|
||||||
public static final Space INSTANCE = new Space();
|
public static final Space INSTANCE = new Space();
|
||||||
|
@ -8,7 +8,7 @@ public final class Space extends Dimension {
|
||||||
private Space() {
|
private Space() {
|
||||||
super(0, "space");
|
super(0, "space");
|
||||||
this.setPhysics(1L, 1L, 0.0f, 0.0f, 2.7f, 15).setTimeQualifier(8);
|
this.setPhysics(1L, 1L, 0.0f, 0.0f, 2.7f, 15).setTimeQualifier(8);
|
||||||
this.setBiome(BaseBiome.SPACE).setStarBrightness(1.0f).setDeepStarBrightness(1.0f);
|
this.setBiome(Biome.SPACE).setStarBrightness(1.0f).setDeepStarBrightness(1.0f);
|
||||||
this.setCustomName("Der Weltraum");
|
this.setCustomName("Der Weltraum");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import common.ai.EntityAITempt;
|
||||||
import common.ai.EntityAIWander;
|
import common.ai.EntityAIWander;
|
||||||
import common.ai.EntityAIWatchClosest;
|
import common.ai.EntityAIWatchClosest;
|
||||||
import common.attributes.Attributes;
|
import common.attributes.Attributes;
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.collect.Maps;
|
import common.collect.Maps;
|
||||||
import common.color.DyeColor;
|
import common.color.DyeColor;
|
||||||
import common.entity.item.EntityItem;
|
import common.entity.item.EntityItem;
|
||||||
|
@ -303,9 +303,9 @@ public class EntitySheep extends EntityAnimal
|
||||||
DyeColor.MAGENTA, DyeColor.ORANGE, DyeColor.PINK, DyeColor.PURPLE, DyeColor.RED
|
DyeColor.MAGENTA, DyeColor.ORANGE, DyeColor.PINK, DyeColor.PURPLE, DyeColor.RED
|
||||||
};
|
};
|
||||||
|
|
||||||
public static DyeColor getRandomSheepColor(Random random, BaseBiome biome)
|
public static DyeColor getRandomSheepColor(Random random, Biome biome)
|
||||||
{
|
{
|
||||||
if(biome == BaseBiome.SNOWLAND)
|
if(biome == Biome.SNOWLAND)
|
||||||
return DyeColor.WHITE;
|
return DyeColor.WHITE;
|
||||||
int i = random.zrange(140);
|
int i = random.zrange(140);
|
||||||
return i < 20 ? DyeColor.BLACK :
|
return i < 20 ? DyeColor.BLACK :
|
||||||
|
|
|
@ -3,7 +3,7 @@ package common.entity.npc;
|
||||||
import common.ai.EntityAIBase;
|
import common.ai.EntityAIBase;
|
||||||
import common.ai.EntityMoveHelper;
|
import common.ai.EntityMoveHelper;
|
||||||
import common.attributes.Attributes;
|
import common.attributes.Attributes;
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.entity.DamageSource;
|
import common.entity.DamageSource;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
|
@ -396,9 +396,9 @@ public class EntitySlime extends EntityNPC
|
||||||
// {
|
// {
|
||||||
// if (this.worldObj.getDifficulty() != Difficulty.PEACEFUL)
|
// if (this.worldObj.getDifficulty() != Difficulty.PEACEFUL)
|
||||||
// {
|
// {
|
||||||
BaseBiome biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos);
|
Biome biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos);
|
||||||
|
|
||||||
if (biomegenbase == BaseBiome.SWAMPLAND && this.posY > 50.0D && this.posY < 70.0D && this.rand.floatv() < 0.5F && this.rand.floatv() < this.worldObj.getCurrentMoonPhaseFactor() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.zrange(8))
|
if (biomegenbase == Biome.SWAMPLAND && this.posY > 50.0D && this.posY < 70.0D && this.rand.floatv() < 0.5F && this.rand.floatv() < this.worldObj.getCurrentMoonPhaseFactor() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.zrange(8))
|
||||||
{
|
{
|
||||||
return super.getCanSpawnHere();
|
return super.getCanSpawnHere();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@ import common.color.DyeColor;
|
||||||
import common.init.FluidRegistry.LiquidType;
|
import common.init.FluidRegistry.LiquidType;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
import common.material.Material;
|
||||||
|
import common.util.ObjectIntIdentityMap;
|
||||||
|
import common.util.RegistryNamespacedDefaultedByKey;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
public abstract class BlockRegistry {
|
public abstract class BlockRegistry {
|
||||||
|
|
|
@ -38,6 +38,7 @@ import common.tileentity.TileEntityDispenser;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
import common.util.RegistryDefaulted;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import common.world.World;
|
import common.world.World;
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ public abstract class DispenserRegistry {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for(EntityEggInfo egg : EntityRegistry.SPAWN_EGGS.values()) {
|
for(EntityEggInfo egg : EntityRegistry.SPAWN_EGGS.values()) {
|
||||||
REGISTRY.putObject(ItemRegistry.getRegisteredItem(egg.spawnedID.toLowerCase() + "_spawner"),
|
REGISTRY.putObject(ItemRegistry.getRegisteredItem(egg.id.toLowerCase() + "_spawner"),
|
||||||
disp);
|
disp);
|
||||||
}
|
}
|
||||||
REGISTRY.putObject(Items.fireworks, new BehaviorDefaultDispenseItem()
|
REGISTRY.putObject(Items.fireworks, new BehaviorDefaultDispenseItem()
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
package common.init;
|
package common.init;
|
||||||
|
|
||||||
public class EntityEggInfo
|
public class EntityEggInfo {
|
||||||
{
|
public final String id;
|
||||||
public final String spawnedID;
|
public final String origin;
|
||||||
public final String origin;
|
public final int color1;
|
||||||
public final int primaryColor;
|
public final int color2;
|
||||||
public final int secondaryColor;
|
|
||||||
// public final StatBase killStat;
|
|
||||||
// public final StatBase killedByStat;
|
|
||||||
|
|
||||||
public EntityEggInfo(String id, String origin, int baseColor, int spotColor)
|
public EntityEggInfo(String id, String origin, int color1, int color2) {
|
||||||
{
|
this.id = id;
|
||||||
this.spawnedID = id;
|
this.origin = origin;
|
||||||
this.origin = origin;
|
this.color1 = color1;
|
||||||
this.primaryColor = baseColor;
|
this.color2 = color2;
|
||||||
this.secondaryColor = spotColor;
|
}
|
||||||
// this.killStat = new StatBase("stat.killEntity." + this.spawnedID, EntityRegistry.getEntityName(this.spawnedID) + " getötet");
|
}
|
||||||
// this.killedByStat = new StatBase("stat.entityKilledBy." + this.spawnedID,
|
|
||||||
// "Von " + EntityRegistry.getEntityName(this.spawnedID) + " getötet");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ import common.item.ItemWall;
|
||||||
import common.item.ItemWeatherToken;
|
import common.item.ItemWeatherToken;
|
||||||
import common.potion.Potion;
|
import common.potion.Potion;
|
||||||
import common.potion.PotionHelper;
|
import common.potion.PotionHelper;
|
||||||
|
import common.util.RegistryNamespaced;
|
||||||
import common.world.Weather;
|
import common.world.Weather;
|
||||||
|
|
||||||
public abstract class ItemRegistry {
|
public abstract class ItemRegistry {
|
||||||
|
@ -371,7 +372,7 @@ public abstract class ItemRegistry {
|
||||||
registerItem("tnt_minecart", (new ItemMinecart(EntityCart.EnumMinecartType.TNT)).setDisplay("TNT-Lore")
|
registerItem("tnt_minecart", (new ItemMinecart(EntityCart.EnumMinecartType.TNT)).setDisplay("TNT-Lore")
|
||||||
.setColor(TextColor.RED));
|
.setColor(TextColor.RED));
|
||||||
for(EntityEggInfo egg : EntityRegistry.SPAWN_EGGS.values()) {
|
for(EntityEggInfo egg : EntityRegistry.SPAWN_EGGS.values()) {
|
||||||
registerItem(egg.spawnedID.toLowerCase() + "_spawner", (new ItemMonsterPlacer(egg.spawnedID))
|
registerItem(egg.id.toLowerCase() + "_spawner", (new ItemMonsterPlacer(egg.id))
|
||||||
.setDisplay("Spawner").setMaxStackSize(ItemStack.MAX_SIZE));
|
.setDisplay("Spawner").setMaxStackSize(ItemStack.MAX_SIZE));
|
||||||
}
|
}
|
||||||
for(SpeciesInfo species : SpeciesRegistry.SPECIMEN) {
|
for(SpeciesInfo species : SpeciesRegistry.SPECIMEN) {
|
||||||
|
|
|
@ -39,8 +39,6 @@ public abstract class TileRegistry {
|
||||||
static void register() {
|
static void register() {
|
||||||
addMapping(TileEntityFurnace.class, "Furnace");
|
addMapping(TileEntityFurnace.class, "Furnace");
|
||||||
addMapping(TileEntityChest.class, "Chest");
|
addMapping(TileEntityChest.class, "Chest");
|
||||||
// addMapping(TileEntityWarpChest.class, "WarpChest");
|
|
||||||
// addMapping(BlockJukebox.TileEntityJukebox.class, "RecordPlayer");
|
|
||||||
addMapping(TileEntityDispenser.class, "Trap");
|
addMapping(TileEntityDispenser.class, "Trap");
|
||||||
addMapping(TileEntityDropper.class, "Dropper");
|
addMapping(TileEntityDropper.class, "Dropper");
|
||||||
addMapping(TileEntitySign.class, "Sign");
|
addMapping(TileEntitySign.class, "Sign");
|
||||||
|
@ -49,14 +47,11 @@ public abstract class TileRegistry {
|
||||||
addMapping(TileEntityPiston.class, "Piston");
|
addMapping(TileEntityPiston.class, "Piston");
|
||||||
addMapping(TileEntityBrewingStand.class, "Cauldron");
|
addMapping(TileEntityBrewingStand.class, "Cauldron");
|
||||||
addMapping(TileEntityEnchantmentTable.class, "EnchantTable");
|
addMapping(TileEntityEnchantmentTable.class, "EnchantTable");
|
||||||
// addMapping(TileEntityPortal.class, "Portal");
|
|
||||||
// addMapping(TileEntityCommandBlock.class, "Control");
|
|
||||||
addMapping(TileEntityBeacon.class, "Beacon");
|
addMapping(TileEntityBeacon.class, "Beacon");
|
||||||
addMapping(TileEntitySkull.class, "Skull");
|
addMapping(TileEntitySkull.class, "Skull");
|
||||||
addMapping(TileEntityDaylightDetector.class, "DLDetector");
|
addMapping(TileEntityDaylightDetector.class, "DLDetector");
|
||||||
addMapping(TileEntityHopper.class, "Hopper");
|
addMapping(TileEntityHopper.class, "Hopper");
|
||||||
addMapping(TileEntityComparator.class, "Comparator");
|
addMapping(TileEntityComparator.class, "Comparator");
|
||||||
// addMapping(TileEntityFlowerPot.class, "FlowerPot");
|
|
||||||
addMapping(TileEntityBanner.class, "Banner");
|
addMapping(TileEntityBanner.class, "Banner");
|
||||||
addMapping(TileEntityTianReactor.class, "TianReactor");
|
addMapping(TileEntityTianReactor.class, "TianReactor");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockColored;
|
import common.block.BlockColored;
|
||||||
import common.block.BlockSand;
|
import common.block.BlockSand;
|
||||||
import common.block.LeavesType;
|
import common.block.LeavesType;
|
||||||
|
@ -526,12 +526,12 @@ public abstract class UniverseRegistry {
|
||||||
259.15f).setTimeQualifier(0)
|
259.15f).setTimeQualifier(0)
|
||||||
.setPerlinGen(Blocks.stone.getState(), Blocks.water.getState(), 63)
|
.setPerlinGen(Blocks.stone.getState(), Blocks.water.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.gravel.getState())
|
.setBiomeReplacer(Blocks.gravel.getState())
|
||||||
.setBiomeGen(BaseBiome.FOREST, false, 4, 4, 6, 50, 50, BaseBiome.MUSHROOMPLAINS).enableMobs().enableSnow()
|
.setBiomeGen(Biome.FOREST, false, 4, 4, 6, 50, 50, Biome.MUSHROOMPLAINS).enableMobs().enableSnow()
|
||||||
.setFrostBiomes(BaseBiome.ICEPLAINS, BaseBiome.ICEPLAINS, BaseBiome.ICEPLAINS, BaseBiome.COLDTAIGA, BaseBiome.MEGATAIGA)
|
.setFrostBiomes(Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.COLDTAIGA, Biome.MEGATAIGA)
|
||||||
.setColdBiomes(BaseBiome.FOREST, BaseBiome.EXTREMEHILLS, BaseBiome.TAIGA, BaseBiome.PLAINS, BaseBiome.BLACKENED)
|
.setColdBiomes(Biome.FOREST, Biome.EXTREMEHILLS, Biome.TAIGA, Biome.PLAINS, Biome.BLACKENED)
|
||||||
.setMediumBiomes(BaseBiome.FOREST, BaseBiome.ROOFEDFOREST, BaseBiome.EXTREMEHILLS, BaseBiome.PLAINS, BaseBiome.BIRCHFOREST,
|
.setMediumBiomes(Biome.FOREST, Biome.ROOFEDFOREST, Biome.EXTREMEHILLS, Biome.PLAINS, Biome.BIRCHFOREST,
|
||||||
BaseBiome.SWAMPLAND, BaseBiome.JUNGLE, BaseBiome.BLACKENED)
|
Biome.SWAMPLAND, Biome.JUNGLE, Biome.BLACKENED)
|
||||||
.setHotBiomes(BaseBiome.DESERT, BaseBiome.DESERT, BaseBiome.DESERT, BaseBiome.SAVANNA, BaseBiome.SAVANNA, BaseBiome.PLAINS)
|
.setHotBiomes(Biome.DESERT, Biome.DESERT, Biome.DESERT, Biome.SAVANNA, Biome.SAVANNA, Biome.PLAINS)
|
||||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(8).setWorldFloor(Blocks.bedrock.getState())
|
.enableCavesRavines(Blocks.lava.getState()).setDungeons(8).setWorldFloor(Blocks.bedrock.getState())
|
||||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||||
.addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true)
|
.addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true)
|
||||||
|
@ -549,7 +549,7 @@ public abstract class UniverseRegistry {
|
||||||
.addOre(Blocks.cinnabar_ore.getState(), 1, 0, 11, 0, 24, false)
|
.addOre(Blocks.cinnabar_ore.getState(), 1, 0, 11, 0, 24, false)
|
||||||
.enableVillages().enableMineshafts().enableScattered().enableStrongholds(), "sol");
|
.enableVillages().enableMineshafts().enableScattered().enableStrongholds(), "sol");
|
||||||
registerDimension("Luna", new Moon(3, "luna", 0x333333, 0x333333, 655728L, 655728L, 1.62f, 210.0f, 8)
|
registerDimension("Luna", new Moon(3, "luna", 0x333333, 0x333333, 655728L, 655728L, 1.62f, 210.0f, 8)
|
||||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63).setBiome(BaseBiome.MOON)
|
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63).setBiome(Biome.MOON)
|
||||||
.setTimeQualifier(1), "terra");
|
.setTimeQualifier(1), "terra");
|
||||||
|
|
||||||
registerDimension("Merkur", new Planet(4, "mercury", 0x666666, 0x535353, 0x858585, 2111297L, 1407509L, 3.7f, 440.0f)
|
registerDimension("Merkur", new Planet(4, "mercury", 0x666666, 0x535353, 0x858585, 2111297L, 1407509L, 3.7f, 440.0f)
|
||||||
|
@ -592,7 +592,7 @@ public abstract class UniverseRegistry {
|
||||||
registerDimension("Gi'rok", new Star(100, "girok", 0xff8f00, 232.0f, 5220.0f, Blocks.lava.getState(), 112).setTimeQualifier(2), "solar");
|
registerDimension("Gi'rok", new Star(100, "girok", 0xff8f00, 232.0f, 5220.0f, Blocks.lava.getState(), 112).setTimeQualifier(2), "solar");
|
||||||
registerDimension("'Elbenplanet Gharoth'", new Planet(101, "gharoth", 0xffffffff, 0xc0d8ff, 0xffffff, 4837386L, 52960L, 30.0f, 10.0f, 257.3f)
|
registerDimension("'Elbenplanet Gharoth'", new Planet(101, "gharoth", 0xffffffff, 0xc0d8ff, 0xffffff, 4837386L, 52960L, 30.0f, 10.0f, 257.3f)
|
||||||
.setTimeQualifier(2).setSimpleGen(Blocks.dirt.getState(), Blocks.water.getState(), 64)
|
.setTimeQualifier(2).setSimpleGen(Blocks.dirt.getState(), Blocks.water.getState(), 64)
|
||||||
.setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(BaseBiome.ELVENFOREST)
|
.setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(Biome.ELVENFOREST)
|
||||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs().enableSnow()
|
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs().enableSnow()
|
||||||
.setWorldFloor(Blocks.bedrock.getState())
|
.setWorldFloor(Blocks.bedrock.getState())
|
||||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||||
|
@ -603,7 +603,7 @@ public abstract class UniverseRegistry {
|
||||||
.addOre(Blocks.gyriyn_ore.getState(), 0, 2, 3, 0, 12, false), "girok");
|
.addOre(Blocks.gyriyn_ore.getState(), 0, 2, 3, 0, 12, false), "girok");
|
||||||
registerDimension("'Vampirplanet Transsylvanien'", new Planet(102, "transylvania", 0xffffffff, 0xc0d8ff, 0xffffff, 33850466L, 49760L, 20.0f, 10.0f, 255.5f)
|
registerDimension("'Vampirplanet Transsylvanien'", new Planet(102, "transylvania", 0xffffffff, 0xc0d8ff, 0xffffff, 33850466L, 49760L, 20.0f, 10.0f, 255.5f)
|
||||||
.setTimeQualifier(5).setPerlinGen(Blocks.rock.getState(), Blocks.water.getState(), 63)
|
.setTimeQualifier(5).setPerlinGen(Blocks.rock.getState(), Blocks.water.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.gravel.getState()).setBiomeGen(BaseBiome.FOREST, true, 5, 3, 3, 30)
|
.setBiomeReplacer(Blocks.gravel.getState()).setBiomeGen(Biome.FOREST, true, 5, 3, 3, 30)
|
||||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(10).enableMobs().enableSnow()
|
.enableCavesRavines(Blocks.lava.getState()).setDungeons(10).enableMobs().enableSnow()
|
||||||
.setWorldFloor(Blocks.bedrock.getState())
|
.setWorldFloor(Blocks.bedrock.getState())
|
||||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||||
|
@ -615,12 +615,12 @@ public abstract class UniverseRegistry {
|
||||||
.addOre(Blocks.ardite_ore.getState(), 0, 2, 3, 0, 12, false)
|
.addOre(Blocks.ardite_ore.getState(), 0, 2, 3, 0, 12, false)
|
||||||
.addOre(Blocks.nichun_ore.getState(), 0, 10, 1, 0, 10, false), "girok");
|
.addOre(Blocks.nichun_ore.getState(), 0, 10, 1, 0, 10, false), "girok");
|
||||||
registerDimension("'Eismond Yrdinath'", new Moon(103, "yrdinath", 0xccccff, 0xccccff, 46743637L, 17460L, 2.5f, 239.15f, 8).setTimeQualifier(4)
|
registerDimension("'Eismond Yrdinath'", new Moon(103, "yrdinath", 0xccccff, 0xccccff, 46743637L, 17460L, 2.5f, 239.15f, 8).setTimeQualifier(4)
|
||||||
.setPerlinGen(Blocks.snow.getState(), Blocks.ice.getState(), 63).setBiome(BaseBiome.SNOWLAND)
|
.setPerlinGen(Blocks.snow.getState(), Blocks.ice.getState(), 63).setBiome(Biome.SNOWLAND)
|
||||||
.setWorldFloor(Blocks.air.getState()).enableMobs().enableSnow().setWeather(Weather.SNOW), "transylvania");
|
.setWorldFloor(Blocks.air.getState()).enableMobs().enableSnow().setWeather(Weather.SNOW), "transylvania");
|
||||||
registerDimension("'Wüstenplanet Me'sar'", new Planet(104, "mesar", 0xff7f3f, 0xff6022, 0xff6f00, 56643366L, 87340L, 11.0f, 333.15f)
|
registerDimension("'Wüstenplanet Me'sar'", new Planet(104, "mesar", 0xff7f3f, 0xff6022, 0xff6f00, 56643366L, 87340L, 11.0f, 333.15f)
|
||||||
.setTimeQualifier(5).setPerlinGen(Blocks.rock.getState(), Blocks.air.getState(), 63)
|
.setTimeQualifier(5).setPerlinGen(Blocks.rock.getState(), Blocks.air.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.sand.getState().withProperty(BlockSand.VARIANT, BlockSand.EnumType.RED_SAND))
|
.setBiomeReplacer(Blocks.sand.getState().withProperty(BlockSand.VARIANT, BlockSand.EnumType.RED_SAND))
|
||||||
.setBiomeGen(BaseBiome.MESA, true, 3, 1000, 100000, 100000)
|
.setBiomeGen(Biome.MESA, true, 3, 1000, 100000, 100000)
|
||||||
.enableCavesRavines(Blocks.lava.getState()).enableMobs()
|
.enableCavesRavines(Blocks.lava.getState()).enableMobs()
|
||||||
.setWorldFloor(Blocks.bedrock.getState())
|
.setWorldFloor(Blocks.bedrock.getState())
|
||||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||||
|
@ -637,7 +637,7 @@ public abstract class UniverseRegistry {
|
||||||
registerDimension("Ov'rol", new Star(120, "ovrol", 0x000000, 302.0f, 12666.0f, Blocks.goo.getState(), 192), "blvck");
|
registerDimension("Ov'rol", new Star(120, "ovrol", 0x000000, 302.0f, 12666.0f, Blocks.goo.getState(), 192), "blvck");
|
||||||
registerDimension("'Schwarzplanet'", new Planet(121, "blackplanet", 0x000000, 0x000000, 0x000000, 4632918508L, 204556L, 12.0f, 0.0f)
|
registerDimension("'Schwarzplanet'", new Planet(121, "blackplanet", 0x000000, 0x000000, 0x000000, 4632918508L, 204556L, 12.0f, 0.0f)
|
||||||
.setPerlinGen(Blocks.blackened_stone.getState(), Blocks.goo.getState(), 63)
|
.setPerlinGen(Blocks.blackened_stone.getState(), Blocks.goo.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.blackened_cobble.getState()).setBiome(BaseBiome.BLACKENED)
|
.setBiomeReplacer(Blocks.blackened_cobble.getState()).setBiome(Biome.BLACKENED)
|
||||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs()
|
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs()
|
||||||
.setWorldFloor(Blocks.bedrock.getState())
|
.setWorldFloor(Blocks.bedrock.getState())
|
||||||
.addLake(Blocks.goo.getState(), null, null, 8, 8, 255, true)
|
.addLake(Blocks.goo.getState(), null, null, 8, 8, 255, true)
|
||||||
|
@ -646,7 +646,7 @@ public abstract class UniverseRegistry {
|
||||||
|
|
||||||
registerDimension("Der Warp", new Semi(-1, "warp", 0x0c001f, 0x0c001f, 0x190033, 285.0f, 3).setCloudTexture("clouds_dense").setCloudHeight(238.0f)
|
registerDimension("Der Warp", new Semi(-1, "warp", 0x0c001f, 0x0c001f, 0x190033, 285.0f, 3).setCloudTexture("clouds_dense").setCloudHeight(238.0f)
|
||||||
.setPerlinGen(Blocks.obsidian.getState(), Blocks.lava.getState(), 63)
|
.setPerlinGen(Blocks.obsidian.getState(), Blocks.lava.getState(), 63)
|
||||||
.setBiome(BaseBiome.CHAOS).enableCavesRavines(Blocks.air.getState()).enableLongCaves().enableMobs().enableSnow()
|
.setBiome(Biome.CHAOS).enableCavesRavines(Blocks.air.getState()).enableLongCaves().enableMobs().enableSnow()
|
||||||
.addLake(Blocks.water.getState(), null, Blocks.obsidian.getState(), 8, 0, 255, false)
|
.addLake(Blocks.water.getState(), null, Blocks.obsidian.getState(), 8, 0, 255, false)
|
||||||
.addLake(Blocks.lava.getState(), null, null, 1, 8, 255, false)
|
.addLake(Blocks.lava.getState(), null, null, 1, 8, 255, false)
|
||||||
.addLiquid(Blocks.flowing_water.getState(), 1, 8, 255, false)
|
.addLiquid(Blocks.flowing_water.getState(), 1, 8, 255, false)
|
||||||
|
@ -656,7 +656,7 @@ public abstract class UniverseRegistry {
|
||||||
|
|
||||||
registerDomain("Tian'Xin", "tianxin");
|
registerDomain("Tian'Xin", "tianxin");
|
||||||
registerDimension("Ni'enrath", new Area(-2, "nienrath", 0x7f00ff, 0x7f00ff, 276.15f, 1)
|
registerDimension("Ni'enrath", new Area(-2, "nienrath", 0x7f00ff, 0x7f00ff, 276.15f, 1)
|
||||||
.setPerlinGen(Blocks.tian.getState(), Blocks.water.getState(), 63).setBiome(BaseBiome.TIAN)
|
.setPerlinGen(Blocks.tian.getState(), Blocks.water.getState(), 63).setBiome(Biome.TIAN)
|
||||||
.setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow()
|
.setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow()
|
||||||
.addLake(Blocks.water.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
|
.addLake(Blocks.water.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
|
||||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false), "tianxin");
|
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false), "tianxin");
|
||||||
|
@ -670,32 +670,32 @@ public abstract class UniverseRegistry {
|
||||||
.setWorldFloor(Blocks.air.getState()).setWorldCeiling(Blocks.bedrock.getState()).enableDenseFog()
|
.setWorldFloor(Blocks.air.getState()).setWorldCeiling(Blocks.bedrock.getState()).enableDenseFog()
|
||||||
.setCavernGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
.setCavernGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||||
.setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState())
|
.setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState())
|
||||||
.setBiome(BaseBiome.UPPERHELL), "hell");
|
.setBiome(Biome.UPPERHELL), "hell");
|
||||||
registerDimension("Kreis Kyroth", new Area(-1002, "kyroth", 0x990000, 0x990000, 387.15f, 3).enableLongCaves().enableMobs()
|
registerDimension("Kreis Kyroth", new Area(-1002, "kyroth", 0x990000, 0x990000, 387.15f, 3).enableLongCaves().enableMobs()
|
||||||
.setWorldFloor(Blocks.air.getState())
|
.setWorldFloor(Blocks.air.getState())
|
||||||
.setSimpleGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 64)
|
.setSimpleGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 64)
|
||||||
.setSimpleReplacer(Blocks.obsidian.getState(), Blocks.soul_sand.getState())
|
.setSimpleReplacer(Blocks.obsidian.getState(), Blocks.soul_sand.getState())
|
||||||
.setBiome(BaseBiome.LOWERHELL)
|
.setBiome(Biome.LOWERHELL)
|
||||||
.addLake(Blocks.lava.getState(), null, null, 4, 8, 255, false)
|
.addLake(Blocks.lava.getState(), null, null, 4, 8, 255, false)
|
||||||
.addLiquid(Blocks.flowing_lava.getState(), 40, 8, 255, true), "hell");
|
.addLiquid(Blocks.flowing_lava.getState(), 40, 8, 255, true), "hell");
|
||||||
registerDimension("Kreis Ahrd", new Area(-1003, "ahrd", 0xcc0000, 0xcc0000, 467.15f, 15).enableLongCaves().enableMobs()
|
registerDimension("Kreis Ahrd", new Area(-1003, "ahrd", 0xcc0000, 0xcc0000, 467.15f, 15).enableLongCaves().enableMobs()
|
||||||
.setWorldFloor(Blocks.air.getState())
|
.setWorldFloor(Blocks.air.getState())
|
||||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
.setPerlinGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(BaseBiome.HELLHILLS)
|
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.HELLHILLS)
|
||||||
.addLake(Blocks.lava.getState(), Blocks.soul_sand.getState(), Blocks.soul_sand.getState(),
|
.addLake(Blocks.lava.getState(), Blocks.soul_sand.getState(), Blocks.soul_sand.getState(),
|
||||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true), "hell");
|
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true), "hell");
|
||||||
registerDimension("Kreis Mizorath", new Area(-1004, "mizorath", 0xff0000, 0xff0000, 1067.15f, 15).enableMobs()
|
registerDimension("Kreis Mizorath", new Area(-1004, "mizorath", 0xff0000, 0xff0000, 1067.15f, 15).enableMobs()
|
||||||
.setWorldFloor(Blocks.air.getState())
|
.setWorldFloor(Blocks.air.getState())
|
||||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.blood.getState(), 63)
|
.setPerlinGen(Blocks.hellrock.getState(), Blocks.blood.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(BaseBiome.SOULPLAINS), "hell");
|
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS), "hell");
|
||||||
registerDimension("Kreis Dargoth", new Area(-1005, "dargoth", 0xff3f0c, 0xff3f0c, 1707.15f, 15).enableMobs()
|
registerDimension("Kreis Dargoth", new Area(-1005, "dargoth", 0xff3f0c, 0xff3f0c, 1707.15f, 15).enableMobs()
|
||||||
.setWorldFloor(Blocks.air.getState())
|
.setWorldFloor(Blocks.air.getState())
|
||||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.magma.getState(), 63)
|
.setPerlinGen(Blocks.hellrock.getState(), Blocks.magma.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(BaseBiome.SOULPLAINS), "hell");
|
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS), "hell");
|
||||||
registerDimension("Kreis Aasirith", new Area(-1006, "aasirith", 0x191919, 0x191919, 2482.0f, 1).enableLongCaves().enableMobs()
|
registerDimension("Kreis Aasirith", new Area(-1006, "aasirith", 0x191919, 0x191919, 2482.0f, 1).enableLongCaves().enableMobs()
|
||||||
.setWorldFloor(Blocks.air.getState())
|
.setWorldFloor(Blocks.air.getState())
|
||||||
.setPerlinGen(Blocks.rock.getState(), Blocks.magma.getState(), 63)
|
.setPerlinGen(Blocks.rock.getState(), Blocks.magma.getState(), 63)
|
||||||
.setBiomeReplacer(Blocks.ash.getState()).setBiome(BaseBiome.ASHLAND)
|
.setBiomeReplacer(Blocks.ash.getState()).setBiome(Biome.ASHLAND)
|
||||||
.addLake(Blocks.lava.getState(), Blocks.rock.getState(), Blocks.rock.getState(),
|
.addLake(Blocks.lava.getState(), Blocks.rock.getState(), Blocks.rock.getState(),
|
||||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true), "hell");
|
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true), "hell");
|
||||||
|
|
||||||
|
@ -749,7 +749,7 @@ public abstract class UniverseRegistry {
|
||||||
dtag.setInteger("SeaRarity", 50);
|
dtag.setInteger("SeaRarity", 50);
|
||||||
dtag.setInteger("AddRarity", 50);
|
dtag.setInteger("AddRarity", 50);
|
||||||
dtag.setInteger("SeaLevel", 0);
|
dtag.setInteger("SeaLevel", 0);
|
||||||
dtag.setString("DefaultBiome", BaseBiome.NONE.name.toLowerCase());
|
dtag.setString("DefaultBiome", Biome.NONE.name.toLowerCase());
|
||||||
dtag.setBoolean("SemiFixed", false);
|
dtag.setBoolean("SemiFixed", false);
|
||||||
// dtag.setString("DefaultWeather", Weather.CLEAR.getName());
|
// dtag.setString("DefaultWeather", Weather.CLEAR.getName());
|
||||||
dtag.setString("DefaultLeaves", LeavesType.SPRING.getName());
|
dtag.setString("DefaultLeaves", LeavesType.SPRING.getName());
|
||||||
|
@ -768,11 +768,11 @@ public abstract class UniverseRegistry {
|
||||||
return dim;
|
return dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Dimension addFlatPreset(String name, BaseBiome biome, boolean populate, State main, Object ... layers) {
|
private static Dimension addFlatPreset(String name, Biome biome, boolean populate, State main, Object ... layers) {
|
||||||
return addFlatPreset(name, "terra", biome, populate, main, layers);
|
return addFlatPreset(name, "terra", biome, populate, main, layers);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Dimension addFlatPreset(String name, String base, BaseBiome biome, boolean populate, State main, Object ... layers) {
|
private static Dimension addFlatPreset(String name, String base, Biome biome, boolean populate, State main, Object ... layers) {
|
||||||
Dimension dim = addPreset("Flach - " + name, base, "ClearGenerator:1b" + (populate ? "" : ",NoPopulation:1b"));
|
Dimension dim = addPreset("Flach - " + name, base, "ClearGenerator:1b" + (populate ? "" : ",NoPopulation:1b"));
|
||||||
dim.setBiome(biome);
|
dim.setBiome(biome);
|
||||||
if(main != null)
|
if(main != null)
|
||||||
|
@ -795,33 +795,33 @@ public abstract class UniverseRegistry {
|
||||||
addPreset("Chaotische Höhlen", "UpperLmtScale:2.0,LowerLmtScale:64.0,SeaLevel:6");
|
addPreset("Chaotische Höhlen", "UpperLmtScale:2.0,LowerLmtScale:64.0,SeaLevel:6");
|
||||||
addPreset("Viel Glück", "LiquidBlock:lava,SeaLevel:40");
|
addPreset("Viel Glück", "LiquidBlock:lava,SeaLevel:40");
|
||||||
|
|
||||||
addFlatPreset("Klassisch", BaseBiome.PLAINS, false, Blocks.dirt.getState(), Blocks.bedrock.getState(), 2, Blocks.dirt.getState(),
|
addFlatPreset("Klassisch", Biome.PLAINS, false, Blocks.dirt.getState(), Blocks.bedrock.getState(), 2, Blocks.dirt.getState(),
|
||||||
Blocks.grass.getState()).enableVillages();
|
Blocks.grass.getState()).enableVillages();
|
||||||
|
|
||||||
addFlatPreset("Abbauwelt", BaseBiome.EXTREMEHILLS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 230, Blocks.stone.getState(),
|
addFlatPreset("Abbauwelt", Biome.EXTREMEHILLS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 230, Blocks.stone.getState(),
|
||||||
5, Blocks.dirt.getState(), Blocks.grass.getState()).enableStrongholds().enableMineshafts().setDungeons(8);
|
5, Blocks.dirt.getState(), Blocks.grass.getState()).enableStrongholds().enableMineshafts().setDungeons(8);
|
||||||
|
|
||||||
addFlatPreset("Wasserwelt", BaseBiome.SEA, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 5, Blocks.stone.getState(),
|
addFlatPreset("Wasserwelt", Biome.SEA, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 5, Blocks.stone.getState(),
|
||||||
52, Blocks.dirt.getState(), 5, Blocks.sand.getState(), 90, Blocks.water.getState());
|
52, Blocks.dirt.getState(), 5, Blocks.sand.getState(), 90, Blocks.water.getState());
|
||||||
|
|
||||||
addFlatPreset("Oberfläche", BaseBiome.PLAINS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(),
|
addFlatPreset("Oberfläche", Biome.PLAINS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(),
|
||||||
3, Blocks.dirt.getState(), Blocks.grass.getState()).setBiomeReplacer(Blocks.gravel.getState()).enableVillages().enableStrongholds().enableMineshafts().setDungeons(8)
|
3, Blocks.dirt.getState(), Blocks.grass.getState()).setBiomeReplacer(Blocks.gravel.getState()).enableVillages().enableStrongholds().enableMineshafts().setDungeons(8)
|
||||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false).addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true);
|
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false).addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true);
|
||||||
|
|
||||||
addFlatPreset("Verschneites Königreich", BaseBiome.ICEPLAINS, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(),
|
addFlatPreset("Verschneites Königreich", Biome.ICEPLAINS, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(),
|
||||||
3, Blocks.dirt.getState(), Blocks.grass.getState(), Blocks.snow_layer.getState()).enableVillages();
|
3, Blocks.dirt.getState(), Blocks.grass.getState(), Blocks.snow_layer.getState()).enableVillages();
|
||||||
|
|
||||||
addFlatPreset("Verschneites Königreich +", BaseBiome.ICEPLAINS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(),
|
addFlatPreset("Verschneites Königreich +", Biome.ICEPLAINS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(),
|
||||||
3, Blocks.dirt.getState(), Blocks.grass.getState(), Blocks.snow_layer.getState()).setBiomeReplacer(Blocks.gravel.getState()).enableVillages()
|
3, Blocks.dirt.getState(), Blocks.grass.getState(), Blocks.snow_layer.getState()).setBiomeReplacer(Blocks.gravel.getState()).enableVillages()
|
||||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false);
|
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false);
|
||||||
|
|
||||||
addFlatPreset("Unendliche Grube", BaseBiome.PLAINS, false, Blocks.dirt.getState(), 2, Blocks.cobblestone.getState(), 3, Blocks.dirt.getState(), Blocks.grass.getState())
|
addFlatPreset("Unendliche Grube", Biome.PLAINS, false, Blocks.dirt.getState(), 2, Blocks.cobblestone.getState(), 3, Blocks.dirt.getState(), Blocks.grass.getState())
|
||||||
.setBiomeReplacer(Blocks.gravel.getState()).enableVillages();
|
.setBiomeReplacer(Blocks.gravel.getState()).enableVillages();
|
||||||
|
|
||||||
addFlatPreset("Wüste", BaseBiome.DESERT, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 3, Blocks.stone.getState(), 52, Blocks.sandstone.getState())
|
addFlatPreset("Wüste", Biome.DESERT, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 3, Blocks.stone.getState(), 52, Blocks.sandstone.getState())
|
||||||
.enableVillages().enableScattered();
|
.enableVillages().enableScattered();
|
||||||
|
|
||||||
addFlatPreset("Redstonewelt", BaseBiome.DESERT, false, Blocks.sandstone.getState(), Blocks.bedrock.getState(), 3, Blocks.stone.getState(),
|
addFlatPreset("Redstonewelt", Biome.DESERT, false, Blocks.sandstone.getState(), Blocks.bedrock.getState(), 3, Blocks.stone.getState(),
|
||||||
52, Blocks.sandstone.getState());
|
52, Blocks.sandstone.getState());
|
||||||
|
|
||||||
addPreset("Leer", "ClearGenerator:1b");
|
addPreset("Leer", "ClearGenerator:1b");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package common.item;
|
package common.item;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.color.TextColor;
|
import common.color.TextColor;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -14,7 +14,7 @@ public class ItemInfoWand extends ItemWand {
|
||||||
|
|
||||||
public void onUse(ItemStack stack, EntityNPC player, AWorldServer world, Vec3 vec)
|
public void onUse(ItemStack stack, EntityNPC player, AWorldServer world, Vec3 vec)
|
||||||
{
|
{
|
||||||
BaseBiome biome = world.getBiomeGenForCoords(new BlockPos(vec.xCoord, 0, vec.zCoord));
|
Biome biome = world.getBiomeGenForCoords(new BlockPos(vec.xCoord, 0, vec.zCoord));
|
||||||
player.connection.addHotbar(TextColor.NEON + "* Position bei Level %d: %.3f %.3f %.3f, %s [%d], %.2f °C", world.dimension.getDimensionId(),
|
player.connection.addHotbar(TextColor.NEON + "* Position bei Level %d: %.3f %.3f %.3f, %s [%d], %.2f °C", world.dimension.getDimensionId(),
|
||||||
vec.xCoord, vec.yCoord, vec.zCoord,
|
vec.xCoord, vec.yCoord, vec.zCoord,
|
||||||
biome.display, biome.id, world.getTemperatureC(new BlockPos(vec)));
|
biome.display, biome.id, world.getTemperatureC(new BlockPos(vec)));
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class ItemMonsterPlacer extends Item
|
||||||
public int getColorFromItemStack(ItemStack stack, int renderPass)
|
public int getColorFromItemStack(ItemStack stack, int renderPass)
|
||||||
{
|
{
|
||||||
EntityEggInfo egg = EntityRegistry.SPAWN_EGGS.get(this.entityId);
|
EntityEggInfo egg = EntityRegistry.SPAWN_EGGS.get(this.entityId);
|
||||||
return egg != null ? (renderPass == 0 ? egg.primaryColor : egg.secondaryColor) : 16777215;
|
return egg != null ? (renderPass == 0 ? egg.color1 : egg.color2) : 16777215;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addInformation(ItemStack stack, EntityNPC player, List<String> tooltip) {
|
public void addInformation(ItemStack stack, EntityNPC player, List<String> tooltip) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package common.init;
|
package common.util;
|
||||||
|
|
||||||
public interface IObjectIntIterable<T> extends Iterable<T>
|
public interface IObjectIntIterable<T> extends Iterable<T>
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
package common.init;
|
package common.util;
|
||||||
|
|
||||||
public interface IRegistry<K, V> extends Iterable<V>
|
public interface IRegistry<K, V> extends Iterable<V>
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
package common.init;
|
package common.util;
|
||||||
|
|
||||||
import java.util.IdentityHashMap;
|
import java.util.IdentityHashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -6,7 +6,6 @@ import java.util.List;
|
||||||
|
|
||||||
import common.collect.Iterators;
|
import common.collect.Iterators;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.util.Predicates;
|
|
||||||
|
|
||||||
public class ObjectIntIdentityMap<T> implements IObjectIntIterable<T>
|
public class ObjectIntIdentityMap<T> implements IObjectIntIterable<T>
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
package common.init;
|
package common.util;
|
||||||
|
|
||||||
public class RegistryDefaulted<K, V> extends RegistrySimple<K, V>
|
public class RegistryDefaulted<K, V> extends RegistrySimple<K, V>
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
package common.init;
|
package common.util;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
||||||
package common.init;
|
package common.util;
|
||||||
|
|
||||||
public class RegistryNamespacedDefaultedByKey<K, V> extends RegistryNamespaced<K, V>
|
public class RegistryNamespacedDefaultedByKey<K, V> extends RegistryNamespaced<K, V>
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
package common.init;
|
package common.util;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.ITileEntityProvider;
|
import common.block.ITileEntityProvider;
|
||||||
import common.collect.Maps;
|
import common.collect.Maps;
|
||||||
|
@ -63,7 +63,7 @@ public class Chunk {
|
||||||
Arrays.fill(this.biomes, (byte)-1);
|
Arrays.fill(this.biomes, (byte)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Chunk(World world, short[] data, int height, State base, State ceil, Random rand, BaseBiome[] biomes, int x, int z) {
|
public Chunk(World world, short[] data, int height, State base, State ceil, Random rand, Biome[] biomes, int x, int z) {
|
||||||
this(world, x, z);
|
this(world, x, z);
|
||||||
boolean sky = !world.dimension.hasNoLight();
|
boolean sky = !world.dimension.hasNoLight();
|
||||||
for(int bx = 0; bx < 16; ++bx) {
|
for(int bx = 0; bx < 16; ++bx) {
|
||||||
|
@ -956,18 +956,18 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getBiome(BlockPos pos, BiomeGenerator gen) {
|
public Biome getBiome(BlockPos pos, BiomeGenerator gen) {
|
||||||
int x = pos.getX() & 15;
|
int x = pos.getX() & 15;
|
||||||
int z = pos.getZ() & 15;
|
int z = pos.getZ() & 15;
|
||||||
int o = this.biomes[z << 4 | x] & 255;
|
int o = this.biomes[z << 4 | x] & 255;
|
||||||
|
|
||||||
if(o == 255) {
|
if(o == 255) {
|
||||||
BaseBiome biome = gen == null ? BaseBiome.DEF_BIOME : gen.getBiomeGenerator(pos, BaseBiome.DEF_BIOME);
|
Biome biome = gen == null ? Biome.DEF_BIOME : gen.getBiomeGenerator(pos, Biome.DEF_BIOME);
|
||||||
o = biome.id;
|
o = biome.id;
|
||||||
this.biomes[z << 4 | x] = (byte)(o & 255);
|
this.biomes[z << 4 | x] = (byte)(o & 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
return BaseBiome.getBiomeDef(o);
|
return Biome.getBiomeDef(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getBiomes() {
|
public byte[] getBiomes() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package common.world;
|
package common.world;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.tileentity.TileEntity;
|
import common.tileentity.TileEntity;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
|
||||||
|
@ -8,5 +8,5 @@ public interface IWorldAccess extends IBlockAccess
|
||||||
{
|
{
|
||||||
TileEntity getTileEntity(BlockPos pos);
|
TileEntity getTileEntity(BlockPos pos);
|
||||||
int getCombinedLight(BlockPos pos, int lightValue);
|
int getCombinedLight(BlockPos pos, int lightValue);
|
||||||
BaseBiome getBiomeGenForCoords(BlockPos pos);
|
Biome getBiomeGenForCoords(BlockPos pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockHopper;
|
import common.block.BlockHopper;
|
||||||
import common.block.BlockLiquid;
|
import common.block.BlockLiquid;
|
||||||
|
@ -133,11 +133,11 @@ public abstract class World implements IWorldAccess {
|
||||||
this.gravity = Math.signum(this.gravity) * 0.075;
|
this.gravity = Math.signum(this.gravity) * 0.075;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getBiomeGenForCoords(final BlockPos pos) {
|
public Biome getBiomeGenForCoords(final BlockPos pos) {
|
||||||
if(this.isBlockLoaded(pos))
|
if(this.isBlockLoaded(pos))
|
||||||
return this.getChunk(pos).getBiome(pos, null);
|
return this.getChunk(pos).getBiome(pos, null);
|
||||||
else
|
else
|
||||||
return BaseBiome.DEF_BIOME;
|
return Biome.DEF_BIOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAirBlock(BlockPos pos) {
|
public boolean isAirBlock(BlockPos pos) {
|
||||||
|
|
|
@ -2,15 +2,15 @@ package common.worldgen;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
|
||||||
public interface BiomeGenerator {
|
public interface BiomeGenerator {
|
||||||
public void genFactors(double[] factors, int xPos, int zPos, int sizeX, int sizeZ);
|
public void genFactors(double[] factors, int xPos, int zPos, int sizeX, int sizeZ);
|
||||||
public BaseBiome getBiomeGenerator(BlockPos pos, BaseBiome def);
|
public Biome getBiomeGenerator(BlockPos pos, Biome def);
|
||||||
public void getGenBiomes(BaseBiome[] biomes, int x, int z, int width, int height);
|
public void getGenBiomes(Biome[] biomes, int x, int z, int width, int height);
|
||||||
public void getChunkBiomes(BaseBiome[] oldBiomeList, int x, int z, int width, int depth);
|
public void getChunkBiomes(Biome[] oldBiomeList, int x, int z, int width, int depth);
|
||||||
public void getBiomes(BaseBiome[] listToReuse, int x, int z, int width, int length, boolean cacheFlag);
|
public void getBiomes(Biome[] listToReuse, int x, int z, int width, int length, boolean cacheFlag);
|
||||||
public boolean areBiomesViable(int x, int z, int size, Set<BaseBiome> allowed);
|
public boolean areBiomesViable(int x, int z, int size, Set<Biome> allowed);
|
||||||
public void cleanupCache();
|
public void cleanupCache();
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.GenericFutureListener;
|
import io.netty.util.concurrent.GenericFutureListener;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.clipboard.ReorderRegistry;
|
import server.clipboard.ReorderRegistry;
|
||||||
import server.clipboard.RotationRegistry;
|
import server.clipboard.RotationRegistry;
|
||||||
import server.command.CommandEnvironment;
|
import server.command.CommandEnvironment;
|
||||||
|
@ -148,7 +148,7 @@ public final class Server implements IThreadListener {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Util.checkOs();
|
Util.checkOs();
|
||||||
Registry.setup("Server thread");
|
Registry.setup("Server thread");
|
||||||
Biome.setAsProvider();
|
GenBiome.setAsProvider();
|
||||||
UniverseRegistry.register();
|
UniverseRegistry.register();
|
||||||
RotationRegistry.register();
|
RotationRegistry.register();
|
||||||
ReorderRegistry.register();
|
ReorderRegistry.register();
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
|
||||||
public class BiomeBeach extends Biome
|
public class BiomeBeach extends GenBiome
|
||||||
{
|
{
|
||||||
public BiomeBeach(boolean cold)
|
public BiomeBeach(boolean cold)
|
||||||
{
|
{
|
||||||
super(cold ? BaseBiome.COLDBEACH : BaseBiome.BEACH);
|
super(cold ? Biome.COLDBEACH : Biome.BEACH);
|
||||||
this.topBlock = Blocks.sand.getState();
|
this.topBlock = Blocks.sand.getState();
|
||||||
this.fillerBlock = Blocks.sand.getState();
|
this.fillerBlock = Blocks.sand.getState();
|
||||||
this.treesPerChunk = -999;
|
this.treesPerChunk = -999;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockFlower;
|
import common.block.BlockFlower;
|
||||||
import common.entity.npc.EntityMetalhead;
|
import common.entity.npc.EntityMetalhead;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
@ -10,11 +10,11 @@ import common.util.BlockPos;
|
||||||
import server.worldgen.tree.WorldGenBaseTree;
|
import server.worldgen.tree.WorldGenBaseTree;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeBlackened extends Biome {
|
public class BiomeBlackened extends GenBiome {
|
||||||
protected final WorldGenTree treeGen = new WorldGenBaseTree(false, Blocks.blackwood_log.getState(), Blocks.blackwood_leaves.getState());
|
protected final WorldGenTree treeGen = new WorldGenBaseTree(false, Blocks.blackwood_log.getState(), Blocks.blackwood_leaves.getState());
|
||||||
|
|
||||||
public BiomeBlackened() {
|
public BiomeBlackened() {
|
||||||
super(BaseBiome.BLACKENED);
|
super(Biome.BLACKENED);
|
||||||
this.topBlock = Blocks.blackened_soil.getState();
|
this.topBlock = Blocks.blackened_soil.getState();
|
||||||
this.fillerBlock = Blocks.blackened_dirt.getState();
|
this.fillerBlock = Blocks.blackened_dirt.getState();
|
||||||
this.treesPerChunk = 3;
|
this.treesPerChunk = 3;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
@ -12,13 +12,13 @@ import server.world.WorldServer;
|
||||||
import server.worldgen.FeatureGenerator;
|
import server.worldgen.FeatureGenerator;
|
||||||
import server.worldgen.foliage.WorldGenMushroom;
|
import server.worldgen.foliage.WorldGenMushroom;
|
||||||
|
|
||||||
public class BiomeChaos extends Biome
|
public class BiomeChaos extends GenBiome
|
||||||
{
|
{
|
||||||
protected FeatureGenerator mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
protected FeatureGenerator mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
||||||
|
|
||||||
public BiomeChaos()
|
public BiomeChaos()
|
||||||
{
|
{
|
||||||
super(BaseBiome.CHAOS);
|
super(Biome.CHAOS);
|
||||||
this.topBlock = Blocks.obsidian.getState();
|
this.topBlock = Blocks.obsidian.getState();
|
||||||
this.fillerBlock = Blocks.obsidian.getState();
|
this.fillerBlock = Blocks.obsidian.getState();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
@ -8,11 +8,11 @@ import common.util.BlockPos;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
import server.worldgen.feature.WorldGenDesertWells;
|
import server.worldgen.feature.WorldGenDesertWells;
|
||||||
|
|
||||||
public class BiomeDesert extends Biome
|
public class BiomeDesert extends GenBiome
|
||||||
{
|
{
|
||||||
public BiomeDesert(boolean hills)
|
public BiomeDesert(boolean hills)
|
||||||
{
|
{
|
||||||
super(hills ? BaseBiome.DESERTHILLS : BaseBiome.DESERT);
|
super(hills ? Biome.DESERTHILLS : Biome.DESERT);
|
||||||
this.topBlock = Blocks.sand.getState();
|
this.topBlock = Blocks.sand.getState();
|
||||||
this.fillerBlock = Blocks.sand.getState();
|
this.fillerBlock = Blocks.sand.getState();
|
||||||
this.treesPerChunk = -999;
|
this.treesPerChunk = -999;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public class BiomeExterminated extends Biome {
|
public class BiomeExterminated extends GenBiome {
|
||||||
public BiomeExterminated() {
|
public BiomeExterminated() {
|
||||||
super(BaseBiome.EXTERMINATED);
|
super(Biome.EXTERMINATED);
|
||||||
this.topBlock = Blocks.air.getState();
|
this.topBlock = Blocks.air.getState();
|
||||||
this.fillerBlock = Blocks.air.getState();
|
this.fillerBlock = Blocks.air.getState();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockDoublePlant;
|
import common.block.BlockDoublePlant;
|
||||||
import common.block.BlockFlower;
|
import common.block.BlockFlower;
|
||||||
import common.entity.animal.EntityWolf;
|
import common.entity.animal.EntityWolf;
|
||||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenBirch;
|
||||||
import server.worldgen.tree.WorldGenDarkOak;
|
import server.worldgen.tree.WorldGenDarkOak;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeForest extends Biome
|
public class BiomeForest extends GenBiome
|
||||||
{
|
{
|
||||||
private static final BlockDoublePlant.EnumPlantType[] FLOWER_TYPES = new BlockDoublePlant.EnumPlantType[] {
|
private static final BlockDoublePlant.EnumPlantType[] FLOWER_TYPES = new BlockDoublePlant.EnumPlantType[] {
|
||||||
BlockDoublePlant.EnumPlantType.SYRINGA, BlockDoublePlant.EnumPlantType.ROSE, BlockDoublePlant.EnumPlantType.PAEONIA
|
BlockDoublePlant.EnumPlantType.SYRINGA, BlockDoublePlant.EnumPlantType.ROSE, BlockDoublePlant.EnumPlantType.PAEONIA
|
||||||
|
@ -42,7 +42,7 @@ public class BiomeForest extends Biome
|
||||||
protected WorldGenBigTree mapleBig = new WorldGenBigTree(false, Blocks.maple_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE),
|
protected WorldGenBigTree mapleBig = new WorldGenBigTree(false, Blocks.maple_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE),
|
||||||
Blocks.maple_leaves.getState()); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
Blocks.maple_leaves.getState()); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
||||||
|
|
||||||
public BiomeForest(BaseBiome base, int type)
|
public BiomeForest(Biome base, int type)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.subType = type;
|
this.subType = type;
|
||||||
|
@ -195,9 +195,9 @@ public class BiomeForest extends Biome
|
||||||
super.decorate(worldIn, rand, pos);
|
super.decorate(worldIn, rand, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome createMutatedBiome(BaseBiome base)
|
protected GenBiome createMutatedBiome(Biome base)
|
||||||
{
|
{
|
||||||
if (this.base == BaseBiome.FOREST)
|
if (this.base == Biome.FOREST)
|
||||||
{
|
{
|
||||||
BiomeForest biomegenforest = new BiomeForest(base, 1);
|
BiomeForest biomegenforest = new BiomeForest(base, 1);
|
||||||
biomegenforest.setScaling(this.depth, this.scale + 0.2F);
|
biomegenforest.setScaling(this.depth, this.scale + 0.2F);
|
||||||
|
@ -205,7 +205,7 @@ public class BiomeForest extends Biome
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return this.base != BaseBiome.BIRCHFOREST && this.base != BaseBiome.BIRCHFORESTHILLS ? new BiomeMutated(base, this)
|
return this.base != Biome.BIRCHFOREST && this.base != Biome.BIRCHFORESTHILLS ? new BiomeMutated(base, this)
|
||||||
{
|
{
|
||||||
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
|
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.entity.npc.EntityBloodElf;
|
import common.entity.npc.EntityBloodElf;
|
||||||
import common.entity.npc.EntityCultivator;
|
import common.entity.npc.EntityCultivator;
|
||||||
import common.entity.npc.EntityFireDemon;
|
import common.entity.npc.EntityFireDemon;
|
||||||
|
@ -18,7 +18,7 @@ import server.worldgen.feature.WorldGenGlowStone;
|
||||||
import server.worldgen.feature.WorldGenHellLava;
|
import server.worldgen.feature.WorldGenHellLava;
|
||||||
import server.worldgen.foliage.WorldGenMushroom;
|
import server.worldgen.foliage.WorldGenMushroom;
|
||||||
|
|
||||||
public class BiomeHell extends Biome
|
public class BiomeHell extends GenBiome
|
||||||
{
|
{
|
||||||
private final int subtype;
|
private final int subtype;
|
||||||
private final WorldGenFire fireGen;
|
private final WorldGenFire fireGen;
|
||||||
|
@ -30,7 +30,7 @@ public class BiomeHell extends Biome
|
||||||
private final WorldGenMushroom brownMushroomGen;
|
private final WorldGenMushroom brownMushroomGen;
|
||||||
private final WorldGenMushroom redMushroomGen;
|
private final WorldGenMushroom redMushroomGen;
|
||||||
|
|
||||||
public BiomeHell(BaseBiome base, int subtype)
|
public BiomeHell(Biome base, int subtype)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.subtype = subtype;
|
this.subtype = subtype;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -10,7 +10,7 @@ import server.worldgen.FeatureOres;
|
||||||
import server.worldgen.tree.WorldGenTaiga2;
|
import server.worldgen.tree.WorldGenTaiga2;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeHills extends Biome
|
public class BiomeHills extends GenBiome
|
||||||
{
|
{
|
||||||
// private FeatureGenerator theWorldGenerator = new FeatureOres(Blocks.monster_egg.getDefaultState().withProperty(BlockSilverfish.VARIANT, BlockSilverfish.EnumType.STONE), false, 7, 9, 0, 64);
|
// private FeatureGenerator theWorldGenerator = new FeatureOres(Blocks.monster_egg.getDefaultState().withProperty(BlockSilverfish.VARIANT, BlockSilverfish.EnumType.STONE), false, 7, 9, 0, 64);
|
||||||
private FeatureOres theEmeraldGenerator = new FeatureOres(Blocks.emerald_ore.getState(), 3, 5, 1, 4, 32, false);
|
private FeatureOres theEmeraldGenerator = new FeatureOres(Blocks.emerald_ore.getState(), 3, 5, 1, 4, 32, false);
|
||||||
|
@ -20,7 +20,7 @@ public class BiomeHills extends Biome
|
||||||
private int field_150637_aG = 2;
|
private int field_150637_aG = 2;
|
||||||
private int field_150638_aH;
|
private int field_150638_aH;
|
||||||
|
|
||||||
protected BiomeHills(BaseBiome base, boolean large)
|
protected BiomeHills(Biome base, boolean large)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.field_150638_aH = this.field_150635_aE;
|
this.field_150638_aH = this.field_150635_aE;
|
||||||
|
@ -87,14 +87,14 @@ public class BiomeHills extends Biome
|
||||||
/**
|
/**
|
||||||
* this creates a mutation specific to Hills biomes
|
* this creates a mutation specific to Hills biomes
|
||||||
*/
|
*/
|
||||||
private BiomeHills mutateHills(Biome p_150633_1_)
|
private BiomeHills mutateHills(GenBiome p_150633_1_)
|
||||||
{
|
{
|
||||||
this.field_150638_aH = this.field_150637_aG;
|
this.field_150638_aH = this.field_150637_aG;
|
||||||
this.setScaling(p_150633_1_.depth, p_150633_1_.scale);
|
this.setScaling(p_150633_1_.depth, p_150633_1_.scale);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome createMutatedBiome(BaseBiome base)
|
protected GenBiome createMutatedBiome(Biome base)
|
||||||
{
|
{
|
||||||
return (new BiomeHills(base, false)).mutateHills(this);
|
return (new BiomeHills(base, false)).mutateHills(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockTallGrass;
|
import common.block.BlockTallGrass;
|
||||||
import common.entity.animal.EntityChicken;
|
import common.entity.animal.EntityChicken;
|
||||||
import common.entity.animal.EntityOcelot;
|
import common.entity.animal.EntityOcelot;
|
||||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenBaseTree;
|
||||||
import server.worldgen.tree.WorldGenJungle;
|
import server.worldgen.tree.WorldGenJungle;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeJungle extends Biome
|
public class BiomeJungle extends GenBiome
|
||||||
{
|
{
|
||||||
private static final State LOG = Blocks.jungle_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
private static final State LOG = Blocks.jungle_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
||||||
private static final State LEAVES = Blocks.jungle_leaves.getState(); // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
private static final State LEAVES = Blocks.jungle_leaves.getState(); // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
||||||
|
@ -26,7 +26,7 @@ public class BiomeJungle extends Biome
|
||||||
|
|
||||||
private final boolean edge;
|
private final boolean edge;
|
||||||
|
|
||||||
public BiomeJungle(BaseBiome base, boolean edge)
|
public BiomeJungle(Biome base, boolean edge)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.edge = edge;
|
this.edge = edge;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package server.biome;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockColored;
|
import common.block.BlockColored;
|
||||||
import common.block.BlockDirt;
|
import common.block.BlockDirt;
|
||||||
|
@ -19,7 +19,7 @@ import server.world.WorldServer;
|
||||||
import server.worldgen.ChunkPrimer;
|
import server.worldgen.ChunkPrimer;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeMesa extends Biome
|
public class BiomeMesa extends GenBiome
|
||||||
{
|
{
|
||||||
private final boolean bryce;
|
private final boolean bryce;
|
||||||
private final boolean soil;
|
private final boolean soil;
|
||||||
|
@ -30,7 +30,7 @@ public class BiomeMesa extends Biome
|
||||||
private PerlinGen highBryceGen;
|
private PerlinGen highBryceGen;
|
||||||
private PerlinGen clayColorGen;
|
private PerlinGen clayColorGen;
|
||||||
|
|
||||||
public BiomeMesa(BaseBiome base, boolean bryce, boolean soil)
|
public BiomeMesa(Biome base, boolean bryce, boolean soil)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.bryce = bryce;
|
this.bryce = bryce;
|
||||||
|
@ -317,9 +317,9 @@ public class BiomeMesa extends Biome
|
||||||
return this.layers[(y + i + 64) % 64];
|
return this.layers[(y + i + 64) % 64];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome createMutatedBiome(BaseBiome base)
|
protected GenBiome createMutatedBiome(Biome base)
|
||||||
{
|
{
|
||||||
boolean bryce = this.base == BaseBiome.MESA;
|
boolean bryce = this.base == Biome.MESA;
|
||||||
BiomeMesa mesa = new BiomeMesa(base, bryce, this.soil);
|
BiomeMesa mesa = new BiomeMesa(base, bryce, this.soil);
|
||||||
|
|
||||||
if (!bryce)
|
if (!bryce)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
@ -8,11 +8,11 @@ import common.util.BlockPos;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
import server.worldgen.FeatureOres;
|
import server.worldgen.FeatureOres;
|
||||||
|
|
||||||
public class BiomeMoon extends Biome {
|
public class BiomeMoon extends GenBiome {
|
||||||
private FeatureOres cheeseGenerator = new FeatureOres(Blocks.moon_cheese.getState(), 8, 8, 12, 24, 52, false);
|
private FeatureOres cheeseGenerator = new FeatureOres(Blocks.moon_cheese.getState(), 8, 8, 12, 24, 52, false);
|
||||||
|
|
||||||
public BiomeMoon() {
|
public BiomeMoon() {
|
||||||
super(BaseBiome.MOON);
|
super(Biome.MOON);
|
||||||
this.topBlock = Blocks.moon_rock.getState();
|
this.topBlock = Blocks.moon_rock.getState();
|
||||||
this.fillerBlock = Blocks.moon_rock.getState();
|
this.fillerBlock = Blocks.moon_rock.getState();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.entity.animal.EntityMooshroom;
|
import common.entity.animal.EntityMooshroom;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
|
||||||
public class BiomeMushroom extends Biome
|
public class BiomeMushroom extends GenBiome
|
||||||
{
|
{
|
||||||
public BiomeMushroom()
|
public BiomeMushroom()
|
||||||
{
|
{
|
||||||
super(BaseBiome.MUSHROOMPLAINS);
|
super(Biome.MUSHROOMPLAINS);
|
||||||
this.treesPerChunk = -100;
|
this.treesPerChunk = -100;
|
||||||
this.flowersPerChunk = -100;
|
this.flowersPerChunk = -100;
|
||||||
this.grassPerChunk = -100;
|
this.grassPerChunk = -100;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -8,11 +8,11 @@ import server.world.WorldServer;
|
||||||
import server.worldgen.ChunkPrimer;
|
import server.worldgen.ChunkPrimer;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeMutated extends Biome
|
public class BiomeMutated extends GenBiome
|
||||||
{
|
{
|
||||||
protected Biome baseBiome;
|
protected GenBiome baseBiome;
|
||||||
|
|
||||||
public BiomeMutated(BaseBiome base, Biome biome)
|
public BiomeMutated(Biome base, GenBiome biome)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.baseBiome = biome;
|
this.baseBiome = biome;
|
||||||
|
@ -63,7 +63,7 @@ public class BiomeMutated extends Biome
|
||||||
return this.baseBiome.genBigTreeChance(rand);
|
return this.baseBiome.genBigTreeChance(rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class <? extends Biome > getBiomeClass()
|
public Class <? extends GenBiome > getBiomeClass()
|
||||||
{
|
{
|
||||||
return this.baseBiome.getBiomeClass();
|
return this.baseBiome.getBiomeClass();
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ public class BiomeMutated extends Biome
|
||||||
/**
|
/**
|
||||||
* returns true if the biome specified is equal to this biome
|
* returns true if the biome specified is equal to this biome
|
||||||
*/
|
*/
|
||||||
public boolean isEqualTo(Biome biome)
|
public boolean isEqualTo(GenBiome biome)
|
||||||
{
|
{
|
||||||
return this.baseBiome.isEqualTo(biome);
|
return this.baseBiome.isEqualTo(biome);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
@ -8,9 +8,9 @@ import common.util.BlockPos;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
import server.worldgen.ChunkPrimer;
|
import server.worldgen.ChunkPrimer;
|
||||||
|
|
||||||
public class BiomeNone extends Biome {
|
public class BiomeNone extends GenBiome {
|
||||||
public BiomeNone() {
|
public BiomeNone() {
|
||||||
super(BaseBiome.NONE);
|
super(Biome.NONE);
|
||||||
this.topBlock = Blocks.air.getState();
|
this.topBlock = Blocks.air.getState();
|
||||||
this.fillerBlock = Blocks.air.getState();
|
this.fillerBlock = Blocks.air.getState();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockDoublePlant;
|
import common.block.BlockDoublePlant;
|
||||||
import common.block.BlockFlower;
|
import common.block.BlockFlower;
|
||||||
import common.entity.animal.EntityHorse;
|
import common.entity.animal.EntityHorse;
|
||||||
|
@ -8,7 +8,7 @@ import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public class BiomePlains extends Biome
|
public class BiomePlains extends GenBiome
|
||||||
{
|
{
|
||||||
private static final BlockFlower.EnumFlowerType[] TULIP_TYPES = new BlockFlower.EnumFlowerType[] {
|
private static final BlockFlower.EnumFlowerType[] TULIP_TYPES = new BlockFlower.EnumFlowerType[] {
|
||||||
BlockFlower.EnumFlowerType.ORANGE_TULIP, BlockFlower.EnumFlowerType.RED_TULIP,
|
BlockFlower.EnumFlowerType.ORANGE_TULIP, BlockFlower.EnumFlowerType.RED_TULIP,
|
||||||
|
@ -23,7 +23,7 @@ public class BiomePlains extends Biome
|
||||||
|
|
||||||
protected BiomePlains()
|
protected BiomePlains()
|
||||||
{
|
{
|
||||||
super(BaseBiome.PLAINS);
|
super(Biome.PLAINS);
|
||||||
this.setScaling(Scaling.PLAINS_LOW);
|
this.setScaling(Scaling.PLAINS_LOW);
|
||||||
this.mobs.add(new RngSpawn(EntityHorse.class, 5, 2, 6));
|
this.mobs.add(new RngSpawn(EntityHorse.class, 5, 2, 6));
|
||||||
this.treesPerChunk = -999;
|
this.treesPerChunk = -999;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockDirt;
|
import common.block.BlockDirt;
|
||||||
import common.block.BlockDoublePlant;
|
import common.block.BlockDoublePlant;
|
||||||
import common.entity.animal.EntityHorse;
|
import common.entity.animal.EntityHorse;
|
||||||
|
@ -12,13 +12,13 @@ import server.worldgen.ChunkPrimer;
|
||||||
import server.worldgen.tree.WorldGenSavanna;
|
import server.worldgen.tree.WorldGenSavanna;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeSavanna extends Biome
|
public class BiomeSavanna extends GenBiome
|
||||||
{
|
{
|
||||||
private static final WorldGenSavanna field_150627_aC = new WorldGenSavanna(false);
|
private static final WorldGenSavanna field_150627_aC = new WorldGenSavanna(false);
|
||||||
|
|
||||||
protected BiomeSavanna(boolean plateau)
|
protected BiomeSavanna(boolean plateau)
|
||||||
{
|
{
|
||||||
super(plateau ? BaseBiome.SAVANNAPLATEAU : BaseBiome.SAVANNA);
|
super(plateau ? Biome.SAVANNAPLATEAU : Biome.SAVANNA);
|
||||||
this.mobs.add(new RngSpawn(EntityHorse.class, 1, 2, 6));
|
this.mobs.add(new RngSpawn(EntityHorse.class, 1, 2, 6));
|
||||||
this.treesPerChunk = 1;
|
this.treesPerChunk = 1;
|
||||||
this.flowersPerChunk = 4;
|
this.flowersPerChunk = 4;
|
||||||
|
@ -30,9 +30,9 @@ public class BiomeSavanna extends Biome
|
||||||
return (WorldGenTree)(rand.rarity(5) ? field_150627_aC : this.worldGeneratorTrees);
|
return (WorldGenTree)(rand.rarity(5) ? field_150627_aC : this.worldGeneratorTrees);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome createMutatedBiome(BaseBiome base)
|
protected GenBiome createMutatedBiome(Biome base)
|
||||||
{
|
{
|
||||||
Biome biomegenbase = new BiomeSavanna.Mutated(base, this);
|
GenBiome biomegenbase = new BiomeSavanna.Mutated(base, this);
|
||||||
biomegenbase.depth = this.depth * 0.5F + 0.3F;
|
biomegenbase.depth = this.depth * 0.5F + 0.3F;
|
||||||
biomegenbase.scale = this.scale * 0.5F + 1.2F;
|
biomegenbase.scale = this.scale * 0.5F + 1.2F;
|
||||||
return biomegenbase;
|
return biomegenbase;
|
||||||
|
@ -55,7 +55,7 @@ public class BiomeSavanna extends Biome
|
||||||
|
|
||||||
public static class Mutated extends BiomeMutated
|
public static class Mutated extends BiomeMutated
|
||||||
{
|
{
|
||||||
public Mutated(BaseBiome base, Biome p_i45382_2_)
|
public Mutated(Biome base, GenBiome p_i45382_2_)
|
||||||
{
|
{
|
||||||
super(base, p_i45382_2_);
|
super(base, p_i45382_2_);
|
||||||
this.treesPerChunk = 2;
|
this.treesPerChunk = 2;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
@ -11,13 +11,13 @@ import server.worldgen.feature.WorldGenIceSpike;
|
||||||
import server.worldgen.tree.WorldGenTaiga2;
|
import server.worldgen.tree.WorldGenTaiga2;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeSnow extends Biome
|
public class BiomeSnow extends GenBiome
|
||||||
{
|
{
|
||||||
private final WorldGenIceSpike spikeGen = new WorldGenIceSpike();
|
private final WorldGenIceSpike spikeGen = new WorldGenIceSpike();
|
||||||
private final WorldGenIcePath pathGen = new WorldGenIcePath(4);
|
private final WorldGenIcePath pathGen = new WorldGenIcePath(4);
|
||||||
private final boolean spiky;
|
private final boolean spiky;
|
||||||
|
|
||||||
public BiomeSnow(BaseBiome base, boolean spiky)
|
public BiomeSnow(Biome base, boolean spiky)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.spiky = spiky;
|
this.spiky = spiky;
|
||||||
|
@ -55,9 +55,9 @@ public class BiomeSnow extends Biome
|
||||||
return new WorldGenTaiga2(false);
|
return new WorldGenTaiga2(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome createMutatedBiome(BaseBiome base)
|
protected GenBiome createMutatedBiome(Biome base)
|
||||||
{
|
{
|
||||||
Biome biomegenbase = (new BiomeSnow(base, true)).enableColdBeach().setScaling(this.depth + 0.1F, this.scale + 0.1F);
|
GenBiome biomegenbase = (new BiomeSnow(base, true)).enableColdBeach().setScaling(this.depth + 0.1F, this.scale + 0.1F);
|
||||||
biomegenbase.depth = this.depth + 0.3F;
|
biomegenbase.depth = this.depth + 0.3F;
|
||||||
biomegenbase.scale = this.scale + 0.4F;
|
biomegenbase.scale = this.scale + 0.4F;
|
||||||
return biomegenbase;
|
return biomegenbase;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.entity.animal.EntitySheep;
|
import common.entity.animal.EntitySheep;
|
||||||
import common.entity.npc.EntitySpirit;
|
import common.entity.npc.EntitySpirit;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
|
||||||
public class BiomeSnowLand extends Biome
|
public class BiomeSnowLand extends GenBiome
|
||||||
{
|
{
|
||||||
public BiomeSnowLand()
|
public BiomeSnowLand()
|
||||||
{
|
{
|
||||||
super(BaseBiome.SNOWLAND);
|
super(Biome.SNOWLAND);
|
||||||
this.topBlock = Blocks.snow.getState();
|
this.topBlock = Blocks.snow.getState();
|
||||||
this.fillerBlock = Blocks.snow.getState();
|
this.fillerBlock = Blocks.snow.getState();
|
||||||
this.mushroomsPerChunk = -1;
|
this.mushroomsPerChunk = -1;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockDirt;
|
import common.block.BlockDirt;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
@ -10,7 +10,7 @@ import server.world.WorldServer;
|
||||||
import server.worldgen.FeatureGenerator;
|
import server.worldgen.FeatureGenerator;
|
||||||
import server.worldgen.feature.WorldGenAsteroid;
|
import server.worldgen.feature.WorldGenAsteroid;
|
||||||
|
|
||||||
public class BiomeSpace extends Biome
|
public class BiomeSpace extends GenBiome
|
||||||
{
|
{
|
||||||
protected FeatureGenerator asteroidGen1 = new WorldGenAsteroid(Blocks.stone.getState(),
|
protected FeatureGenerator asteroidGen1 = new WorldGenAsteroid(Blocks.stone.getState(),
|
||||||
Blocks.rock.getState());
|
Blocks.rock.getState());
|
||||||
|
@ -19,7 +19,7 @@ public class BiomeSpace extends Biome
|
||||||
|
|
||||||
public BiomeSpace()
|
public BiomeSpace()
|
||||||
{
|
{
|
||||||
super(BaseBiome.SPACE);
|
super(Biome.SPACE);
|
||||||
this.topBlock = Blocks.air.getState();
|
this.topBlock = Blocks.air.getState();
|
||||||
this.fillerBlock = Blocks.air.getState();
|
this.fillerBlock = Blocks.air.getState();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
|
||||||
public class BiomeStoneBeach extends Biome
|
public class BiomeStoneBeach extends GenBiome
|
||||||
{
|
{
|
||||||
public BiomeStoneBeach()
|
public BiomeStoneBeach()
|
||||||
{
|
{
|
||||||
super(BaseBiome.STONEBEACH);
|
super(Biome.STONEBEACH);
|
||||||
// this.mobs.clear();
|
// this.mobs.clear();
|
||||||
this.topBlock = Blocks.stone.getState();
|
this.topBlock = Blocks.stone.getState();
|
||||||
this.fillerBlock = Blocks.stone.getState();
|
this.fillerBlock = Blocks.stone.getState();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockDirectional;
|
import common.block.BlockDirectional;
|
||||||
import common.block.BlockFlower;
|
import common.block.BlockFlower;
|
||||||
import common.entity.npc.EntitySlime;
|
import common.entity.npc.EntitySlime;
|
||||||
|
@ -13,11 +13,11 @@ import server.world.WorldServer;
|
||||||
import server.worldgen.ChunkPrimer;
|
import server.worldgen.ChunkPrimer;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeSwamp extends Biome
|
public class BiomeSwamp extends GenBiome
|
||||||
{
|
{
|
||||||
protected BiomeSwamp()
|
protected BiomeSwamp()
|
||||||
{
|
{
|
||||||
super(BaseBiome.SWAMPLAND);
|
super(Biome.SWAMPLAND);
|
||||||
this.treesPerChunk = 2;
|
this.treesPerChunk = 2;
|
||||||
this.flowersPerChunk = 1;
|
this.flowersPerChunk = 1;
|
||||||
this.deadBushPerChunk = 1;
|
this.deadBushPerChunk = 1;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockDirt;
|
import common.block.BlockDirt;
|
||||||
import common.block.BlockDoublePlant;
|
import common.block.BlockDoublePlant;
|
||||||
import common.block.BlockTallGrass;
|
import common.block.BlockTallGrass;
|
||||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenTaiga1;
|
||||||
import server.worldgen.tree.WorldGenTaiga2;
|
import server.worldgen.tree.WorldGenTaiga2;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeTaiga extends Biome
|
public class BiomeTaiga extends GenBiome
|
||||||
{
|
{
|
||||||
private static final WorldGenTaiga1 field_150639_aC = new WorldGenTaiga1();
|
private static final WorldGenTaiga1 field_150639_aC = new WorldGenTaiga1();
|
||||||
private static final WorldGenTaiga2 field_150640_aD = new WorldGenTaiga2(false);
|
private static final WorldGenTaiga2 field_150640_aD = new WorldGenTaiga2(false);
|
||||||
|
@ -27,7 +27,7 @@ public class BiomeTaiga extends Biome
|
||||||
private static final WorldGenBlockBlob field_150643_aG = new WorldGenBlockBlob(Blocks.mossy_cobblestone, 0);
|
private static final WorldGenBlockBlob field_150643_aG = new WorldGenBlockBlob(Blocks.mossy_cobblestone, 0);
|
||||||
private int field_150644_aH;
|
private int field_150644_aH;
|
||||||
|
|
||||||
public BiomeTaiga(BaseBiome base, int p_i45385_2_)
|
public BiomeTaiga(Biome base, int p_i45385_2_)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.field_150644_aH = p_i45385_2_;
|
this.field_150644_aH = p_i45385_2_;
|
||||||
|
@ -108,8 +108,8 @@ public class BiomeTaiga extends Biome
|
||||||
this.generateBiomeTerrain(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
|
this.generateBiomeTerrain(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome createMutatedBiome(BaseBiome base)
|
protected GenBiome createMutatedBiome(Biome base)
|
||||||
{
|
{
|
||||||
return this.base == BaseBiome.MEGATAIGA ? (new BiomeTaiga(base, 2)).setScaling(this.depth, this.scale) : super.createMutatedBiome(base);
|
return this.base == Biome.MEGATAIGA ? (new BiomeTaiga(base, 2)).setScaling(this.depth, this.scale) : super.createMutatedBiome(base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.BlockFlower;
|
import common.block.BlockFlower;
|
||||||
import common.entity.animal.EntityBat;
|
import common.entity.animal.EntityBat;
|
||||||
import common.entity.animal.EntityMouse;
|
import common.entity.animal.EntityMouse;
|
||||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenBaseTree;
|
||||||
import server.worldgen.tree.WorldGenBigTree;
|
import server.worldgen.tree.WorldGenBigTree;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeTian extends Biome
|
public class BiomeTian extends GenBiome
|
||||||
{
|
{
|
||||||
protected FeatureGenerator spikeGen = new WorldGenSpikes(Blocks.tian_soil, 128, 2, 3, Blocks.obsidian.getState(), true);
|
protected FeatureGenerator spikeGen = new WorldGenSpikes(Blocks.tian_soil, 128, 2, 3, Blocks.obsidian.getState(), true);
|
||||||
protected FeatureGenerator mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
protected FeatureGenerator mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
||||||
|
@ -32,7 +32,7 @@ public class BiomeTian extends Biome
|
||||||
|
|
||||||
public BiomeTian()
|
public BiomeTian()
|
||||||
{
|
{
|
||||||
super(BaseBiome.TIAN);
|
super(Biome.TIAN);
|
||||||
this.topBlock = Blocks.tian_soil.getState();
|
this.topBlock = Blocks.tian_soil.getState();
|
||||||
this.fillerBlock = Blocks.tian.getState();
|
this.fillerBlock = Blocks.tian.getState();
|
||||||
this.mushroomsPerChunk = -1;
|
this.mushroomsPerChunk = -1;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.entity.animal.EntitySquid;
|
import common.entity.animal.EntitySquid;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
|
|
||||||
public class BiomeWater extends Biome {
|
public class BiomeWater extends GenBiome {
|
||||||
private final boolean river;
|
private final boolean river;
|
||||||
|
|
||||||
public BiomeWater(BaseBiome base, boolean river) {
|
public BiomeWater(Biome base, boolean river) {
|
||||||
super(base);
|
super(base);
|
||||||
this.river = river;
|
this.river = river;
|
||||||
this.disableBeach();
|
this.disableBeach();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.biome;
|
package server.biome;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.biome.IBiome;
|
import common.biome.IBiome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockColored;
|
import common.block.BlockColored;
|
||||||
|
@ -61,70 +61,70 @@ import server.worldgen.tree.WorldGenSwamp;
|
||||||
import server.worldgen.tree.WorldGenTaiga2;
|
import server.worldgen.tree.WorldGenTaiga2;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public abstract class Biome implements IBiome {
|
public abstract class GenBiome implements IBiome {
|
||||||
public static final Biome[] BIOMES = new Biome[256];
|
public static final GenBiome[] BIOMES = new GenBiome[256];
|
||||||
|
|
||||||
public static final Biome none = (new BiomeNone());
|
public static final GenBiome none = (new BiomeNone());
|
||||||
|
|
||||||
public static final Biome plains = (new BiomePlains());
|
public static final GenBiome plains = (new BiomePlains());
|
||||||
public static final Biome desert = (new BiomeDesert(false)).setScaling(Scaling.PLAINS_LOW);
|
public static final GenBiome desert = (new BiomeDesert(false)).setScaling(Scaling.PLAINS_LOW);
|
||||||
public static final Biome extremeHills = (new BiomeHills(BaseBiome.EXTREMEHILLS, false)).setScaling(Scaling.HILLS_LARGE);
|
public static final GenBiome extremeHills = (new BiomeHills(Biome.EXTREMEHILLS, false)).setScaling(Scaling.HILLS_LARGE);
|
||||||
public static final Biome forest = (new BiomeForest(BaseBiome.FOREST, 0));
|
public static final GenBiome forest = (new BiomeForest(Biome.FOREST, 0));
|
||||||
public static final Biome taiga = (new BiomeTaiga(BaseBiome.TAIGA, 0)).setScaling(Scaling.PLAINS_MEDIUM);
|
public static final GenBiome taiga = (new BiomeTaiga(Biome.TAIGA, 0)).setScaling(Scaling.PLAINS_MEDIUM);
|
||||||
public static final Biome swampland = (new BiomeSwamp()).setScaling(Scaling.SEA_POND);
|
public static final GenBiome swampland = (new BiomeSwamp()).setScaling(Scaling.SEA_POND);
|
||||||
public static final Biome river = (new BiomeWater(BaseBiome.RIVER, true)).setScaling(Scaling.SEA_SHALLOW);
|
public static final GenBiome river = (new BiomeWater(Biome.RIVER, true)).setScaling(Scaling.SEA_SHALLOW);
|
||||||
|
|
||||||
public static final Biome exterminated = (new BiomeExterminated());
|
public static final GenBiome exterminated = (new BiomeExterminated());
|
||||||
public static final Biome space = (new BiomeSpace());
|
public static final GenBiome space = (new BiomeSpace());
|
||||||
|
|
||||||
public static final Biome frozenSea = (new BiomeWater(BaseBiome.FROZENSEA, false)).enableColdBeach().setScaling(Scaling.SEA_MEDIUM);
|
public static final GenBiome frozenSea = (new BiomeWater(Biome.FROZENSEA, false)).enableColdBeach().setScaling(Scaling.SEA_MEDIUM);
|
||||||
public static final Biome frozenRiver = (new BiomeWater(BaseBiome.FROZENRIVER, true)).enableColdBeach().setScaling(Scaling.SEA_SHALLOW);
|
public static final GenBiome frozenRiver = (new BiomeWater(Biome.FROZENRIVER, true)).enableColdBeach().setScaling(Scaling.SEA_SHALLOW);
|
||||||
public static final Biome icePlains = (new BiomeSnow(BaseBiome.ICEPLAINS, false)).enableColdBeach().setScaling(Scaling.PLAINS_LOW);
|
public static final GenBiome icePlains = (new BiomeSnow(Biome.ICEPLAINS, false)).enableColdBeach().setScaling(Scaling.PLAINS_LOW);
|
||||||
public static final Biome iceMountains = (new BiomeSnow(BaseBiome.ICEMOUNTAINS, false)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome iceMountains = (new BiomeSnow(Biome.ICEMOUNTAINS, false)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome mushroomPlains = (new BiomeMushroom()).setScaling(Scaling.PLAINS_VARYING);
|
public static final GenBiome mushroomPlains = (new BiomeMushroom()).setScaling(Scaling.PLAINS_VARYING);
|
||||||
public static final Biome blackened = (new BiomeBlackened());
|
public static final GenBiome blackened = (new BiomeBlackened());
|
||||||
public static final Biome beach = (new BiomeBeach(false)).setScaling(Scaling.SEA_SHORE);
|
public static final GenBiome beach = (new BiomeBeach(false)).setScaling(Scaling.SEA_SHORE);
|
||||||
public static final Biome desertHills = (new BiomeDesert(true)).setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome desertHills = (new BiomeDesert(true)).setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome forestHills = (new BiomeForest(BaseBiome.FORESTHILLS, 0)).setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome forestHills = (new BiomeForest(Biome.FORESTHILLS, 0)).setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome taigaHills = (new BiomeTaiga(BaseBiome.TAIGAHILLS, 0)).setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome taigaHills = (new BiomeTaiga(Biome.TAIGAHILLS, 0)).setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome extremeHillsEdge = (new BiomeHills(BaseBiome.EXTREMEHILLSEDGE, true)).setScaling(Scaling.HILLS_MEDIUM);
|
public static final GenBiome extremeHillsEdge = (new BiomeHills(Biome.EXTREMEHILLSEDGE, true)).setScaling(Scaling.HILLS_MEDIUM);
|
||||||
public static final Biome jungle = (new BiomeJungle(BaseBiome.JUNGLE, false));
|
public static final GenBiome jungle = (new BiomeJungle(Biome.JUNGLE, false));
|
||||||
public static final Biome jungleHills = (new BiomeJungle(BaseBiome.JUNGLEHILLS, false)).setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome jungleHills = (new BiomeJungle(Biome.JUNGLEHILLS, false)).setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome jungleEdge = (new BiomeJungle(BaseBiome.JUNGLEEDGE, true));
|
public static final GenBiome jungleEdge = (new BiomeJungle(Biome.JUNGLEEDGE, true));
|
||||||
public static final Biome sea = (new BiomeWater(BaseBiome.SEA, false)).setScaling(Scaling.SEA_MEDIUM);
|
public static final GenBiome sea = (new BiomeWater(Biome.SEA, false)).setScaling(Scaling.SEA_MEDIUM);
|
||||||
public static final Biome stoneBeach = (new BiomeStoneBeach()).setScaling(Scaling.SEA_VARYING);
|
public static final GenBiome stoneBeach = (new BiomeStoneBeach()).setScaling(Scaling.SEA_VARYING);
|
||||||
public static final Biome coldBeach = (new BiomeBeach(true)).setScaling(Scaling.SEA_SHORE).enableColdBeach();
|
public static final GenBiome coldBeach = (new BiomeBeach(true)).setScaling(Scaling.SEA_SHORE).enableColdBeach();
|
||||||
public static final Biome birchForest = (new BiomeForest(BaseBiome.BIRCHFOREST, 2));
|
public static final GenBiome birchForest = (new BiomeForest(Biome.BIRCHFOREST, 2));
|
||||||
public static final Biome birchForestHills = (new BiomeForest(BaseBiome.BIRCHFORESTHILLS, 2)).setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome birchForestHills = (new BiomeForest(Biome.BIRCHFORESTHILLS, 2)).setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome roofedForest = (new BiomeForest(BaseBiome.ROOFEDFOREST, 3));
|
public static final GenBiome roofedForest = (new BiomeForest(Biome.ROOFEDFOREST, 3));
|
||||||
public static final Biome coldTaiga = (new BiomeTaiga(BaseBiome.COLDTAIGA, 0)).enableColdBeach().setScaling(Scaling.PLAINS_MEDIUM);
|
public static final GenBiome coldTaiga = (new BiomeTaiga(Biome.COLDTAIGA, 0)).enableColdBeach().setScaling(Scaling.PLAINS_MEDIUM);
|
||||||
public static final Biome coldTaigaHills = (new BiomeTaiga(BaseBiome.COLDTAIGAHILLS, 0)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome coldTaigaHills = (new BiomeTaiga(Biome.COLDTAIGAHILLS, 0)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome megaTaiga = (new BiomeTaiga(BaseBiome.MEGATAIGA, 1)).setScaling(Scaling.PLAINS_MEDIUM);
|
public static final GenBiome megaTaiga = (new BiomeTaiga(Biome.MEGATAIGA, 1)).setScaling(Scaling.PLAINS_MEDIUM);
|
||||||
public static final Biome megaTaigaHills = (new BiomeTaiga(BaseBiome.MEGATAIGAHILLS, 1)).setScaling(Scaling.HILLS_LOW);
|
public static final GenBiome megaTaigaHills = (new BiomeTaiga(Biome.MEGATAIGAHILLS, 1)).setScaling(Scaling.HILLS_LOW);
|
||||||
public static final Biome extremeHillsPlus = (new BiomeHills(BaseBiome.EXTREMEHILLSPLUS, true)).setScaling(Scaling.HILLS_LARGE);
|
public static final GenBiome extremeHillsPlus = (new BiomeHills(Biome.EXTREMEHILLSPLUS, true)).setScaling(Scaling.HILLS_LARGE);
|
||||||
public static final Biome savanna = (new BiomeSavanna(false)).setScaling(Scaling.PLAINS_LOW);
|
public static final GenBiome savanna = (new BiomeSavanna(false)).setScaling(Scaling.PLAINS_LOW);
|
||||||
public static final Biome savannaPlateau = (new BiomeSavanna(true)).setScaling(Scaling.HILLS_PLATEAU);
|
public static final GenBiome savannaPlateau = (new BiomeSavanna(true)).setScaling(Scaling.HILLS_PLATEAU);
|
||||||
|
|
||||||
public static final Biome mesa = (new BiomeMesa(BaseBiome.MESA, false, false));
|
public static final GenBiome mesa = (new BiomeMesa(Biome.MESA, false, false));
|
||||||
public static final Biome mesaPlateau_F = (new BiomeMesa(BaseBiome.MESAPLATEAUF, false, true)).setScaling(Scaling.HILLS_PLATEAU);
|
public static final GenBiome mesaPlateau_F = (new BiomeMesa(Biome.MESAPLATEAUF, false, true)).setScaling(Scaling.HILLS_PLATEAU);
|
||||||
public static final Biome mesaPlateau = (new BiomeMesa(BaseBiome.MESAPLATEAU, false, false)).setScaling(Scaling.HILLS_PLATEAU);
|
public static final GenBiome mesaPlateau = (new BiomeMesa(Biome.MESAPLATEAU, false, false)).setScaling(Scaling.HILLS_PLATEAU);
|
||||||
|
|
||||||
public static final Biome snowLand = (new BiomeSnowLand()).enableColdBeach();
|
public static final GenBiome snowLand = (new BiomeSnowLand()).enableColdBeach();
|
||||||
public static final Biome tian = (new BiomeTian()).setScaling(Scaling.VARYING_MEDIUM);
|
public static final GenBiome tian = (new BiomeTian()).setScaling(Scaling.VARYING_MEDIUM);
|
||||||
public static final Biome elvenForest = (new BiomeForest(BaseBiome.ELVENFOREST, 4));
|
public static final GenBiome elvenForest = (new BiomeForest(Biome.ELVENFOREST, 4));
|
||||||
public static final Biome upperHell = (new BiomeHell(BaseBiome.UPPERHELL, 0));
|
public static final GenBiome upperHell = (new BiomeHell(Biome.UPPERHELL, 0));
|
||||||
public static final Biome lowerHell = (new BiomeHell(BaseBiome.LOWERHELL, 1));
|
public static final GenBiome lowerHell = (new BiomeHell(Biome.LOWERHELL, 1));
|
||||||
public static final Biome hellHills = (new BiomeHell(BaseBiome.HELLHILLS, 1)).setScaling(Scaling.HILLS_LARGE);
|
public static final GenBiome hellHills = (new BiomeHell(Biome.HELLHILLS, 1)).setScaling(Scaling.HILLS_LARGE);
|
||||||
public static final Biome soulPlains = (new BiomeHell(BaseBiome.SOULPLAINS, 1)).setScaling(Scaling.SEA_POND);
|
public static final GenBiome soulPlains = (new BiomeHell(Biome.SOULPLAINS, 1)).setScaling(Scaling.SEA_POND);
|
||||||
public static final Biome ashLand = (new BiomeHell(BaseBiome.ASHLAND, 2)).setScaling(Scaling.PLAINS_LOW);
|
public static final GenBiome ashLand = (new BiomeHell(Biome.ASHLAND, 2)).setScaling(Scaling.PLAINS_LOW);
|
||||||
public static final Biome moon = (new BiomeMoon()).setScaling(Scaling.PLAINS_LOW);
|
public static final GenBiome moon = (new BiomeMoon()).setScaling(Scaling.PLAINS_LOW);
|
||||||
public static final Biome chaos = (new BiomeChaos()).setScaling(Scaling.VARYING_CHAOTIC);
|
public static final GenBiome chaos = (new BiomeChaos()).setScaling(Scaling.VARYING_CHAOTIC);
|
||||||
|
|
||||||
protected static final PerlinGen TREE_NOISE;
|
protected static final PerlinGen TREE_NOISE = new PerlinGen(new Random(726528729282625L), 8);
|
||||||
protected static final PerlinGen GRASS_NOISE;
|
protected static final PerlinGen GRASS_NOISE = new PerlinGen(new Random(297363826225L), 1);
|
||||||
protected static final FeatureDoublePlant DOUBLE_PLANT_GEN;
|
protected static final FeatureDoublePlant DOUBLE_PLANT_GEN = new FeatureDoublePlant();
|
||||||
|
|
||||||
public final BaseBiome base;
|
public final Biome base;
|
||||||
|
|
||||||
protected final WeightedList<RngSpawn> mobs = new WeightedList<RngSpawn>();
|
protected final WeightedList<RngSpawn> mobs = new WeightedList<RngSpawn>();
|
||||||
protected final WorldGenBaseTree worldGeneratorTrees = new WorldGenBaseTree(false);
|
protected final WorldGenBaseTree worldGeneratorTrees = new WorldGenBaseTree(false);
|
||||||
|
@ -165,7 +165,7 @@ public abstract class Biome implements IBiome {
|
||||||
protected int clayExtPerChunk = 0; // 10
|
protected int clayExtPerChunk = 0; // 10
|
||||||
protected int bigMushroomsPerChunk = 0;
|
protected int bigMushroomsPerChunk = 0;
|
||||||
|
|
||||||
public static Biome getBiome(int id)
|
public static GenBiome getBiome(int id)
|
||||||
{
|
{
|
||||||
if (id >= 0 && id < BIOMES.length)
|
if (id >= 0 && id < BIOMES.length)
|
||||||
{
|
{
|
||||||
|
@ -173,20 +173,43 @@ public abstract class Biome implements IBiome {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Log.JNI.warn("Biom-ID ist nicht im Bereich: " + id + ", verwende " + BaseBiome.DEF_BIOME.id + " (" + BaseBiome.DEF_BIOME.name + ")");
|
Log.JNI.warn("Biom-ID ist nicht im Bereich: " + id + ", verwende " + Biome.DEF_BIOME.id + " (" + Biome.DEF_BIOME.name + ")");
|
||||||
return BIOMES[BaseBiome.DEF_BIOME.id];
|
return BIOMES[Biome.DEF_BIOME.id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setAsProvider() {
|
public static void setAsProvider() {
|
||||||
IBiome.setProvider(new IBiome.BiomeProvider() {
|
IBiome.setProvider(new IBiome.BiomeProvider() {
|
||||||
public final IBiome getBiome(BaseBiome base) {
|
public final IBiome getBiome(Biome base) {
|
||||||
return BIOMES[base.id];
|
return BIOMES[base.id];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome(BaseBiome base) {
|
static {
|
||||||
|
desert.createMutatedBiome(Biome.DESERTM);
|
||||||
|
forest.createMutatedBiome(Biome.FLOWERFOREST);
|
||||||
|
taiga.createMutatedBiome(Biome.TAIGAM);
|
||||||
|
swampland.createMutatedBiome(Biome.SWAMPLANDM);
|
||||||
|
icePlains.createMutatedBiome(Biome.ICEPLAINSSPIKES);
|
||||||
|
jungle.createMutatedBiome(Biome.JUNGLEM);
|
||||||
|
jungleEdge.createMutatedBiome(Biome.JUNGLEEDGEM);
|
||||||
|
coldTaiga.createMutatedBiome(Biome.COLDTAIGAM);
|
||||||
|
savanna.createMutatedBiome(Biome.SAVANNAM);
|
||||||
|
savannaPlateau.createMutatedBiome(Biome.SAVANNAPLATEAUM);
|
||||||
|
mesa.createMutatedBiome(Biome.MESABRYCE);
|
||||||
|
mesaPlateau_F.createMutatedBiome(Biome.MESAPLATEAUFM);
|
||||||
|
mesaPlateau.createMutatedBiome(Biome.MESAPLATEAUM);
|
||||||
|
birchForest.createMutatedBiome(Biome.BIRCHFORESTM);
|
||||||
|
birchForestHills.createMutatedBiome(Biome.BIRCHFORESTHILLSM);
|
||||||
|
roofedForest.createMutatedBiome(Biome.ROOFEDFORESTM);
|
||||||
|
megaTaiga.createMutatedBiome(Biome.MEGASPRUCETAIGA);
|
||||||
|
extremeHills.createMutatedBiome(Biome.EXTREMEHILLSM);
|
||||||
|
extremeHillsPlus.createMutatedBiome(Biome.EXTREMEHILLSPLUSM);
|
||||||
|
megaTaiga.createMutatedBiome(Biome.REDWOODTAIGAHILLSM);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected GenBiome(Biome base) {
|
||||||
BIOMES[base.id] = this;
|
BIOMES[base.id] = this;
|
||||||
this.base = base;
|
this.base = base;
|
||||||
this.addMobs(this.mobs);
|
this.addMobs(this.mobs);
|
||||||
|
@ -210,12 +233,12 @@ public abstract class Biome implements IBiome {
|
||||||
mobs.add(new RngSpawn(EntityMouse.class, 10, 8, 8));
|
mobs.add(new RngSpawn(EntityMouse.class, 10, 8, 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final Biome setScaling(Scaling scaling)
|
protected final GenBiome setScaling(Scaling scaling)
|
||||||
{
|
{
|
||||||
return this.setScaling(scaling.depth, scaling.scale);
|
return this.setScaling(scaling.depth, scaling.scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final Biome setScaling(float depth, float scale)
|
protected final GenBiome setScaling(float depth, float scale)
|
||||||
{
|
{
|
||||||
this.depth = depth;
|
this.depth = depth;
|
||||||
this.scale = scale;
|
this.scale = scale;
|
||||||
|
@ -252,13 +275,13 @@ public abstract class Biome implements IBiome {
|
||||||
return this.topBlock;
|
return this.topBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome enableColdBeach()
|
protected GenBiome enableColdBeach()
|
||||||
{
|
{
|
||||||
this.allowColdBeach = true;
|
this.allowColdBeach = true;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome disableBeach()
|
protected GenBiome disableBeach()
|
||||||
{
|
{
|
||||||
this.disallowBeach = true;
|
this.disallowBeach = true;
|
||||||
return this;
|
return this;
|
||||||
|
@ -829,17 +852,17 @@ public abstract class Biome implements IBiome {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Biome createMutatedBiome(BaseBiome base)
|
protected GenBiome createMutatedBiome(Biome base)
|
||||||
{
|
{
|
||||||
return new BiomeMutated(base, this);
|
return new BiomeMutated(base, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class <? extends Biome > getBiomeClass()
|
public Class <? extends GenBiome > getBiomeClass()
|
||||||
{
|
{
|
||||||
return this.getClass();
|
return this.getClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEqualTo(Biome biome)
|
public boolean isEqualTo(GenBiome biome)
|
||||||
{
|
{
|
||||||
return biome == this ? true : (biome == null ? false : this.getBiomeClass() == biome.getBiomeClass());
|
return biome == this ? true : (biome == null ? false : this.getBiomeClass() == biome.getBiomeClass());
|
||||||
}
|
}
|
||||||
|
@ -848,32 +871,4 @@ public abstract class Biome implements IBiome {
|
||||||
{
|
{
|
||||||
return this.base.temperature < -12.0f ? Temperature.COLD : (this.base.temperature < 20.0f ? Temperature.MEDIUM : Temperature.WARM);
|
return this.base.temperature < -12.0f ? Temperature.COLD : (this.base.temperature < 20.0f ? Temperature.MEDIUM : Temperature.WARM);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
{
|
|
||||||
desert.createMutatedBiome(BaseBiome.DESERTM);
|
|
||||||
forest.createMutatedBiome(BaseBiome.FLOWERFOREST);
|
|
||||||
taiga.createMutatedBiome(BaseBiome.TAIGAM);
|
|
||||||
swampland.createMutatedBiome(BaseBiome.SWAMPLANDM);
|
|
||||||
icePlains.createMutatedBiome(BaseBiome.ICEPLAINSSPIKES);
|
|
||||||
jungle.createMutatedBiome(BaseBiome.JUNGLEM);
|
|
||||||
jungleEdge.createMutatedBiome(BaseBiome.JUNGLEEDGEM);
|
|
||||||
coldTaiga.createMutatedBiome(BaseBiome.COLDTAIGAM);
|
|
||||||
savanna.createMutatedBiome(BaseBiome.SAVANNAM);
|
|
||||||
savannaPlateau.createMutatedBiome(BaseBiome.SAVANNAPLATEAUM);
|
|
||||||
mesa.createMutatedBiome(BaseBiome.MESABRYCE);
|
|
||||||
mesaPlateau_F.createMutatedBiome(BaseBiome.MESAPLATEAUFM);
|
|
||||||
mesaPlateau.createMutatedBiome(BaseBiome.MESAPLATEAUM);
|
|
||||||
birchForest.createMutatedBiome(BaseBiome.BIRCHFORESTM);
|
|
||||||
birchForestHills.createMutatedBiome(BaseBiome.BIRCHFORESTHILLSM);
|
|
||||||
roofedForest.createMutatedBiome(BaseBiome.ROOFEDFORESTM);
|
|
||||||
megaTaiga.createMutatedBiome(BaseBiome.MEGASPRUCETAIGA);
|
|
||||||
extremeHills.createMutatedBiome(BaseBiome.EXTREMEHILLSM);
|
|
||||||
extremeHillsPlus.createMutatedBiome(BaseBiome.EXTREMEHILLSPLUSM);
|
|
||||||
megaTaiga.createMutatedBiome(BaseBiome.REDWOODTAIGAHILLSM);
|
|
||||||
|
|
||||||
TREE_NOISE = new PerlinGen(new Random(667L), 8);
|
|
||||||
GRASS_NOISE = new PerlinGen(new Random(2345L), 1);
|
|
||||||
DOUBLE_PLANT_GEN = new FeatureDoublePlant();
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@ import java.util.Map.Entry;
|
||||||
import java.util.zip.GZIPInputStream;
|
import java.util.zip.GZIPInputStream;
|
||||||
import java.util.zip.InflaterInputStream;
|
import java.util.zip.InflaterInputStream;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockCactus;
|
import common.block.BlockCactus;
|
||||||
import common.block.BlockCarpet;
|
import common.block.BlockCarpet;
|
||||||
|
@ -916,7 +916,7 @@ public abstract class Converter {
|
||||||
}
|
}
|
||||||
tag.setTag("Sections", sections);
|
tag.setTag("Sections", sections);
|
||||||
byte[] biomes = new byte[256];
|
byte[] biomes = new byte[256];
|
||||||
Arrays.fill(biomes, (byte)(BaseBiome.DEF_BIOME.id & 255));
|
Arrays.fill(biomes, (byte)(Biome.DEF_BIOME.id & 255));
|
||||||
tag.setByteArray("Biomes", biomes);
|
tag.setByteArray("Biomes", biomes);
|
||||||
}
|
}
|
||||||
NBTTagList ents = tag.getTagList("Entities", 10);
|
NBTTagList ents = tag.getTagList("Entities", 10);
|
||||||
|
|
|
@ -16,7 +16,7 @@ import common.util.ChunkPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.world.Chunk;
|
import common.world.Chunk;
|
||||||
import common.world.World;
|
import common.world.World;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.biome.RngSpawn;
|
import server.biome.RngSpawn;
|
||||||
|
|
||||||
public abstract class Spawner {
|
public abstract class Spawner {
|
||||||
|
@ -162,7 +162,7 @@ public abstract class Spawner {
|
||||||
return spawned;
|
return spawned;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void generate(WorldServer world, Biome biome, int x, int z, int sx, int sz, Random rand) {
|
public static void generate(WorldServer world, GenBiome biome, int x, int z, int sx, int sz, Random rand) {
|
||||||
int iters = 0;
|
int iters = 0;
|
||||||
while(rand.floatv() < biome.getMobGenChance()) {
|
while(rand.floatv() < biome.getMobGenChance()) {
|
||||||
if(iters++ == 10)
|
if(iters++ == 10)
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.TreeSet;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockDoor;
|
import common.block.BlockDoor;
|
||||||
import common.block.BlockEventData;
|
import common.block.BlockEventData;
|
||||||
|
@ -85,7 +85,7 @@ import common.worldgen.FeatureLake;
|
||||||
import common.worldgen.FeatureLiquid;
|
import common.worldgen.FeatureLiquid;
|
||||||
import common.worldgen.FeatureOre;
|
import common.worldgen.FeatureOre;
|
||||||
import server.Server;
|
import server.Server;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.biome.RngSpawn;
|
import server.biome.RngSpawn;
|
||||||
import server.clipboard.ClipboardBlock;
|
import server.clipboard.ClipboardBlock;
|
||||||
import server.network.Player;
|
import server.network.Player;
|
||||||
|
@ -146,7 +146,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
private final IntHashMap<EntityTrackerEntry> trackMap = new IntHashMap();
|
private final IntHashMap<EntityTrackerEntry> trackMap = new IntHashMap();
|
||||||
private final Map<String, WorldSavedData> dataMap = Maps.<String, WorldSavedData>newHashMap();
|
private final Map<String, WorldSavedData> dataMap = Maps.<String, WorldSavedData>newHashMap();
|
||||||
private final List<WorldSavedData> dataList = Lists.<WorldSavedData>newArrayList();
|
private final List<WorldSavedData> dataList = Lists.<WorldSavedData>newArrayList();
|
||||||
private final BaseBiome[] biomes = new BaseBiome[256];
|
private final Biome[] biomes = new Biome[256];
|
||||||
|
|
||||||
private MapGenCaves caveGen;
|
private MapGenCaves caveGen;
|
||||||
private MapGenBigCaves bigCaveGen;
|
private MapGenBigCaves bigCaveGen;
|
||||||
|
@ -193,11 +193,11 @@ public final class WorldServer extends AWorldServer {
|
||||||
|
|
||||||
private BiomeGenerator createBiomeGenerator(Random rand) {
|
private BiomeGenerator createBiomeGenerator(Random rand) {
|
||||||
return this.dimension.getBiomeSize() > 0 ? new BiomeGenLayered(rand.longv(), this.dimension.getDefaultBiome(), this.dimension.isSemiFixed(), this.dimension.getBiomeSize(), this.dimension.getRiverSize(),
|
return this.dimension.getBiomeSize() > 0 ? new BiomeGenLayered(rand.longv(), this.dimension.getDefaultBiome(), this.dimension.isSemiFixed(), this.dimension.getBiomeSize(), this.dimension.getRiverSize(),
|
||||||
this.dimension.getSnowRarity(), this.dimension.getSeaRarity(), this.dimension.getAddBiomes() == null ? new BaseBiome[0] : this.dimension.getAddBiomes(), this.dimension.getAddRarity(),
|
this.dimension.getSnowRarity(), this.dimension.getSeaRarity(), this.dimension.getAddBiomes() == null ? new Biome[0] : this.dimension.getAddBiomes(), this.dimension.getAddRarity(),
|
||||||
this.dimension.getHotBiomes() == null ? new BaseBiome[] {this.dimension.getDefaultBiome()} : this.dimension.getHotBiomes(),
|
this.dimension.getHotBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getHotBiomes(),
|
||||||
this.dimension.getMediumBiomes() == null ? new BaseBiome[] {this.dimension.getDefaultBiome()} : this.dimension.getMediumBiomes(),
|
this.dimension.getMediumBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getMediumBiomes(),
|
||||||
this.dimension.getColdBiomes() == null ? new BaseBiome[] {this.dimension.getDefaultBiome()} : this.dimension.getColdBiomes(),
|
this.dimension.getColdBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getColdBiomes(),
|
||||||
this.dimension.getFrostBiomes() == null ? new BaseBiome[] {this.dimension.getDefaultBiome()} : this.dimension.getFrostBiomes()) : new BiomeGenSingle(this.dimension.getDefaultBiome());
|
this.dimension.getFrostBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getFrostBiomes()) : new BiomeGenSingle(this.dimension.getDefaultBiome());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ChunkGenerator createChunkGenerator(Random rand) {
|
private ChunkGenerator createChunkGenerator(Random rand) {
|
||||||
|
@ -334,7 +334,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
// GeneratorSettings settings = !debug && !this.exterminated ? dim.getSettings() : null;
|
// GeneratorSettings settings = !debug && !this.exterminated ? dim.getSettings() : null;
|
||||||
if(debug) {
|
if(debug) {
|
||||||
this.liquid = Blocks.air.getState();
|
this.liquid = Blocks.air.getState();
|
||||||
this.biomeGen = new BiomeGenSingle(BaseBiome.NONE);
|
this.biomeGen = new BiomeGenSingle(Biome.NONE);
|
||||||
this.generator = new GeneratorDebug();
|
this.generator = new GeneratorDebug();
|
||||||
this.replacer = null;
|
this.replacer = null;
|
||||||
this.populate = false;
|
this.populate = false;
|
||||||
|
@ -596,13 +596,13 @@ public final class WorldServer extends AWorldServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private WeightedList<RngSpawn> getSpawnTypes(BlockPos pos) {
|
private WeightedList<RngSpawn> getSpawnTypes(BlockPos pos) {
|
||||||
BaseBiome biome = this.getBiomeGenForCoords(pos);
|
Biome biome = this.getBiomeGenForCoords(pos);
|
||||||
if(this.bridgeGen != null && (this.bridgeGen.isPresent(pos)
|
if(this.bridgeGen != null && (this.bridgeGen.isPresent(pos)
|
||||||
|| (this.bridgeGen.isPositionInStructure(this, pos) && this.getState(pos.down()).getBlock() == Blocks.blood_brick)))
|
|| (this.bridgeGen.isPositionInStructure(this, pos) && this.getState(pos.down()).getBlock() == Blocks.blood_brick)))
|
||||||
return MobConstants.FORTRESS_MOBS;
|
return MobConstants.FORTRESS_MOBS;
|
||||||
else if(this.scatteredGen != null && this.scatteredGen.hasMageHut(pos))
|
else if(this.scatteredGen != null && this.scatteredGen.hasMageHut(pos))
|
||||||
return MobConstants.MAGEHUT_MOBS;
|
return MobConstants.MAGEHUT_MOBS;
|
||||||
return Biome.BIOMES[biome.id].getMobs();
|
return GenBiome.BIOMES[biome.id].getMobs();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RngSpawn getSpawnListEntryForTypeAt(BlockPos pos) {
|
public RngSpawn getSpawnListEntryForTypeAt(BlockPos pos) {
|
||||||
|
@ -623,11 +623,11 @@ public final class WorldServer extends AWorldServer {
|
||||||
return this.biomeGen;
|
return this.biomeGen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getBiomeGenForCoords(final BlockPos pos) {
|
public Biome getBiomeGenForCoords(final BlockPos pos) {
|
||||||
if(this.isBlockLoaded(pos))
|
if(this.isBlockLoaded(pos))
|
||||||
return this.getChunk(pos).getBiome(pos, this.biomeGen);
|
return this.getChunk(pos).getBiome(pos, this.biomeGen);
|
||||||
else
|
else
|
||||||
return this.biomeGen.getBiomeGenerator(pos, BaseBiome.DEF_BIOME);
|
return this.biomeGen.getBiomeGenerator(pos, Biome.DEF_BIOME);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemData(String dataID, WorldSavedData worldSavedDataIn) {
|
public void setItemData(String dataID, WorldSavedData worldSavedDataIn) {
|
||||||
|
@ -1537,7 +1537,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
int bx = x * 16;
|
int bx = x * 16;
|
||||||
int bz = z * 16;
|
int bz = z * 16;
|
||||||
BlockPos pos = new BlockPos(bx, 0, bz);
|
BlockPos pos = new BlockPos(bx, 0, bz);
|
||||||
Biome biome = Biome.BIOMES[this.getBiomeGenForCoords(pos.add(16, 0, 16)).id];
|
GenBiome biome = GenBiome.BIOMES[this.getBiomeGenForCoords(pos.add(16, 0, 16)).id];
|
||||||
this.grng.setSeed(this.seed);
|
this.grng.setSeed(this.seed);
|
||||||
long sx = this.grng.longv() / 2L * 2L + 1L;
|
long sx = this.grng.longv() / 2L * 2L + 1L;
|
||||||
long sz = this.grng.longv() / 2L * 2L + 1L;
|
long sz = this.grng.longv() / 2L * 2L + 1L;
|
||||||
|
@ -1741,7 +1741,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
this.scatteredGen = null;
|
this.scatteredGen = null;
|
||||||
this.bridgeGen = null;
|
this.bridgeGen = null;
|
||||||
this.generator = new GeneratorDestroyed(this.dimension.getSeaLevel());
|
this.generator = new GeneratorDestroyed(this.dimension.getSeaLevel());
|
||||||
this.biomeGen = new BiomeGenSingle(BaseBiome.EXTERMINATED);
|
this.biomeGen = new BiomeGenSingle(Biome.EXTERMINATED);
|
||||||
this.replacer = null;
|
this.replacer = null;
|
||||||
this.populate = false;
|
this.populate = false;
|
||||||
this.liquid = Blocks.air.getState();
|
this.liquid = Blocks.air.getState();
|
||||||
|
@ -2245,7 +2245,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
// return new LazyBlock(state, this, position);
|
// return new LazyBlock(state, this, position);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public final boolean setBiome(BlockPos position, BaseBiome biome) {
|
public final boolean setBiome(BlockPos position, Biome biome) {
|
||||||
Chunk chunk = this.getChunk(position);
|
Chunk chunk = this.getChunk(position);
|
||||||
if((chunk != null) && (chunk.isLoaded())) {
|
if((chunk != null) && (chunk.isLoaded())) {
|
||||||
chunk.getBiomes()[((position.getZ() & 0xF) << 4 | position.getX() & 0xF)] = (byte)biome.id;
|
chunk.getBiomes()[((position.getZ() & 0xF) << 4 | position.getX() & 0xF)] = (byte)biome.id;
|
||||||
|
@ -2254,7 +2254,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setBiomes(BlockPos start, BlockPos end, BaseBiome biome) {
|
public final void setBiomes(BlockPos start, BlockPos end, Biome biome) {
|
||||||
Set<ChunkPos> chunks = Sets.newHashSet();
|
Set<ChunkPos> chunks = Sets.newHashSet();
|
||||||
for(int x = start.getX(); x <= end.getX(); x++) {
|
for(int x = start.getX(); x <= end.getX(); x++) {
|
||||||
for(int z = start.getZ(); z <= end.getZ(); z++) {
|
for(int z = start.getZ(); z <= end.getZ(); z++) {
|
||||||
|
@ -2299,7 +2299,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBlockinHighHumidity(BlockPos pos) {
|
public boolean isBlockinHighHumidity(BlockPos pos) {
|
||||||
BaseBiome biomegenbase = this.getBiomeGenForCoords(pos);
|
Biome biomegenbase = this.getBiomeGenForCoords(pos);
|
||||||
return biomegenbase.isHighHumidity();
|
return biomegenbase.isHighHumidity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package server.worldgen;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.LongHashMap;
|
import common.util.LongHashMap;
|
||||||
|
@ -33,7 +33,7 @@ public class BiomeGenLayered implements BiomeGenerator {
|
||||||
private class CacheBlock
|
private class CacheBlock
|
||||||
{
|
{
|
||||||
public final double[] factors = new double[256];
|
public final double[] factors = new double[256];
|
||||||
public final BaseBiome[] biomes = new BaseBiome[256];
|
public final Biome[] biomes = new Biome[256];
|
||||||
public int xPosition;
|
public int xPosition;
|
||||||
public int zPosition;
|
public int zPosition;
|
||||||
public long lastAccessTime;
|
public long lastAccessTime;
|
||||||
|
@ -46,7 +46,7 @@ public class BiomeGenLayered implements BiomeGenerator {
|
||||||
BiomeGenLayered.this.getBiomes(this.biomes, x << 4, z << 4, 16, 16, false);
|
BiomeGenLayered.this.getBiomes(this.biomes, x << 4, z << 4, 16, 16, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getBiomeGenAt(int x, int z)
|
public Biome getBiomeGenAt(int x, int z)
|
||||||
{
|
{
|
||||||
return this.biomes[x & 15 | (z & 15) << 4];
|
return this.biomes[x & 15 | (z & 15) << 4];
|
||||||
}
|
}
|
||||||
|
@ -67,8 +67,8 @@ public class BiomeGenLayered implements BiomeGenerator {
|
||||||
// this();
|
// this();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public BiomeGenLayered(long seed, BaseBiome def, boolean fixed, int biomeSize, int riverSize, int snowRarity, int seaRarity,
|
public BiomeGenLayered(long seed, Biome def, boolean fixed, int biomeSize, int riverSize, int snowRarity, int seaRarity,
|
||||||
BaseBiome[] add, int addRarity, BaseBiome[] hot, BaseBiome[] medium, BaseBiome[] cold, BaseBiome[] frost) {
|
Biome[] add, int addRarity, Biome[] hot, Biome[] medium, Biome[] cold, Biome[] frost) {
|
||||||
// GenLayer[] layers = GenLayer.getLayers(seed, fixedBiome, biomeSize, riverSize, snowRarity, seaRarity, shroomRarity, biomeRarity);
|
// GenLayer[] layers = GenLayer.getLayers(seed, fixedBiome, biomeSize, riverSize, snowRarity, seaRarity, shroomRarity, biomeRarity);
|
||||||
GenLayer layer0t1 = new GenLayerBase(1L);
|
GenLayer layer0t1 = new GenLayerBase(1L);
|
||||||
layer0t1 = new GenLayerFuzzyZoom(2000L, layer0t1);
|
layer0t1 = new GenLayerFuzzyZoom(2000L, layer0t1);
|
||||||
|
@ -163,10 +163,10 @@ public class BiomeGenLayered implements BiomeGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getBiomeGenerator(BlockPos pos, BaseBiome def) {
|
public Biome getBiomeGenerator(BlockPos pos, Biome def) {
|
||||||
int x = pos.getX();
|
int x = pos.getX();
|
||||||
int z = pos.getZ();
|
int z = pos.getZ();
|
||||||
BaseBiome biome = this.getBiomeCacheBlock(x, z).getBiomeGenAt(x, z);
|
Biome biome = this.getBiomeCacheBlock(x, z).getBiomeGenAt(x, z);
|
||||||
return biome == null ? def : biome;
|
return biome == null ? def : biome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ public class BiomeGenLayered implements BiomeGenerator {
|
||||||
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
|
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
|
||||||
|
|
||||||
for(int i = 0; i < width * length; ++i) {
|
for(int i = 0; i < width * length; ++i) {
|
||||||
BaseBiome biome = BaseBiome.getBiomeDef(aint[i]);
|
Biome biome = Biome.getBiomeDef(aint[i]);
|
||||||
listToReuse[i] = (double)biome.getFactor();
|
listToReuse[i] = (double)biome.getFactor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,43 +192,43 @@ public class BiomeGenLayered implements BiomeGenerator {
|
||||||
int[] aint = this.biomeIndexLayer.getInts(xPos, zPos, sizeX, sizeZ);
|
int[] aint = this.biomeIndexLayer.getInts(xPos, zPos, sizeX, sizeZ);
|
||||||
|
|
||||||
for(int i = 0; i < sizeX * sizeZ; ++i) {
|
for(int i = 0; i < sizeX * sizeZ; ++i) {
|
||||||
BaseBiome biome = BaseBiome.getBiomeDef(aint[i]);
|
Biome biome = Biome.getBiomeDef(aint[i]);
|
||||||
factors[i] = (double)biome.getFactor();
|
factors[i] = (double)biome.getFactor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGenBiomes(BaseBiome[] biomes, int x, int z, int width, int height) {
|
public void getGenBiomes(Biome[] biomes, int x, int z, int width, int height) {
|
||||||
IntCache.resetIntCache();
|
IntCache.resetIntCache();
|
||||||
|
|
||||||
int[] aint = this.genBiomes.getInts(x, z, width, height);
|
int[] aint = this.genBiomes.getInts(x, z, width, height);
|
||||||
|
|
||||||
for(int i = 0; i < width * height; ++i) {
|
for(int i = 0; i < width * height; ++i) {
|
||||||
biomes[i] = BaseBiome.getBiomeDef(aint[i]);
|
biomes[i] = Biome.getBiomeDef(aint[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getChunkBiomes(BaseBiome[] oldBiomeList, int x, int z, int width, int depth) {
|
public void getChunkBiomes(Biome[] oldBiomeList, int x, int z, int width, int depth) {
|
||||||
this.getBiomes(oldBiomeList, x, z, width, depth, true);
|
this.getBiomes(oldBiomeList, x, z, width, depth, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBiomes(BaseBiome[] listToReuse, int x, int z, int width, int length, boolean cache) {
|
public void getBiomes(Biome[] listToReuse, int x, int z, int width, int length, boolean cache) {
|
||||||
IntCache.resetIntCache();
|
IntCache.resetIntCache();
|
||||||
|
|
||||||
if(cache && width == 16 && length == 16 && (x & 15) == 0 && (z & 15) == 0) {
|
if(cache && width == 16 && length == 16 && (x & 15) == 0 && (z & 15) == 0) {
|
||||||
BaseBiome[] biomes = this.getBiomeCacheBlock(x, z).biomes;
|
Biome[] biomes = this.getBiomeCacheBlock(x, z).biomes;
|
||||||
System.arraycopy(biomes, 0, listToReuse, 0, width * length);
|
System.arraycopy(biomes, 0, listToReuse, 0, width * length);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
|
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
|
||||||
|
|
||||||
for(int i = 0; i < width * length; ++i) {
|
for(int i = 0; i < width * length; ++i) {
|
||||||
listToReuse[i] = BaseBiome.getBiomeDef(aint[i]);
|
listToReuse[i] = Biome.getBiomeDef(aint[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean areBiomesViable(int x, int z, int size, Set<BaseBiome> allowed) {
|
public boolean areBiomesViable(int x, int z, int size, Set<Biome> allowed) {
|
||||||
IntCache.resetIntCache();
|
IntCache.resetIntCache();
|
||||||
int i = x - size >> 2;
|
int i = x - size >> 2;
|
||||||
int j = z - size >> 2;
|
int j = z - size >> 2;
|
||||||
|
@ -239,7 +239,7 @@ public class BiomeGenLayered implements BiomeGenerator {
|
||||||
int[] aint = this.genBiomes.getInts(i, j, i1, j1);
|
int[] aint = this.genBiomes.getInts(i, j, i1, j1);
|
||||||
|
|
||||||
for(int k1 = 0; k1 < i1 * j1; ++k1) {
|
for(int k1 = 0; k1 < i1 * j1; ++k1) {
|
||||||
BaseBiome biome = BaseBiome.getBiome(aint[k1]);
|
Biome biome = Biome.getBiome(aint[k1]);
|
||||||
|
|
||||||
if(!allowed.contains(biome)) {
|
if(!allowed.contains(biome)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -3,30 +3,30 @@ package server.worldgen;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.worldgen.BiomeGenerator;
|
import common.worldgen.BiomeGenerator;
|
||||||
|
|
||||||
public class BiomeGenSingle implements BiomeGenerator {
|
public class BiomeGenSingle implements BiomeGenerator {
|
||||||
private final BaseBiome biome;
|
private final Biome biome;
|
||||||
|
|
||||||
public BiomeGenSingle(BaseBiome biome) {
|
public BiomeGenSingle(Biome biome) {
|
||||||
this.biome = biome;
|
this.biome = biome;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBiome getBiomeGenerator(BlockPos pos, BaseBiome def) {
|
public Biome getBiomeGenerator(BlockPos pos, Biome def) {
|
||||||
return this.biome;
|
return this.biome;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGenBiomes(BaseBiome[] biomes, int x, int z, int width, int height) {
|
public void getGenBiomes(Biome[] biomes, int x, int z, int width, int height) {
|
||||||
Arrays.fill(biomes, 0, width * height, this.biome);
|
Arrays.fill(biomes, 0, width * height, this.biome);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getChunkBiomes(BaseBiome[] oldBiomeList, int x, int z, int width, int depth) {
|
public void getChunkBiomes(Biome[] oldBiomeList, int x, int z, int width, int depth) {
|
||||||
Arrays.fill(oldBiomeList, 0, width * depth, this.biome);
|
Arrays.fill(oldBiomeList, 0, width * depth, this.biome);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBiomes(BaseBiome[] listToReuse, int x, int z, int width, int length, boolean cache) {
|
public void getBiomes(Biome[] listToReuse, int x, int z, int width, int length, boolean cache) {
|
||||||
Arrays.fill(listToReuse, 0, width * length, this.biome);
|
Arrays.fill(listToReuse, 0, width * length, this.biome);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public class BiomeGenSingle implements BiomeGenerator {
|
||||||
// : null;
|
// : null;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public boolean areBiomesViable(int x, int z, int size, Set<BaseBiome> allowed) {
|
public boolean areBiomesViable(int x, int z, int size, Set<Biome> allowed) {
|
||||||
return allowed.contains(this.biome);
|
return allowed.contains(this.biome);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package server.worldgen;
|
package server.worldgen;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public interface BlockReplacer {
|
public interface BlockReplacer {
|
||||||
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, BaseBiome[] biomes);
|
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, Biome[] biomes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.LightType;
|
import common.world.LightType;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public class FeatureLakes
|
public class FeatureLakes
|
||||||
|
@ -163,7 +163,7 @@ public class FeatureLakes
|
||||||
|
|
||||||
if (worldIn.getState(blockpos).getBlock() == replace && worldIn.getLightFor(LightType.SKY, position.add(i2, j4, j3)) > 0)
|
if (worldIn.getState(blockpos).getBlock() == replace && worldIn.getLightFor(LightType.SKY, position.add(i2, j4, j3)) > 0)
|
||||||
{
|
{
|
||||||
Biome biomegenbase = Biome.BIOMES[worldIn.getBiomeGenForCoords(blockpos).id];
|
GenBiome biomegenbase = GenBiome.BIOMES[worldIn.getBiomeGenForCoords(blockpos).id];
|
||||||
|
|
||||||
if (biomegenbase.topBlock.getBlock() == Blocks.mycelium)
|
if (biomegenbase.topBlock.getBlock() == Blocks.mycelium)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package server.worldgen;
|
package server.worldgen;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.dimension.Dimension;
|
import common.dimension.Dimension;
|
||||||
import common.rng.NoiseGen;
|
import common.rng.NoiseGen;
|
||||||
import common.rng.OctaveGen;
|
import common.rng.OctaveGen;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public class GeneratorPerlin implements ChunkGenerator
|
public class GeneratorPerlin implements ChunkGenerator
|
||||||
|
@ -52,7 +52,7 @@ public class GeneratorPerlin implements ChunkGenerator
|
||||||
private final double[] lowerNoise = new double[825];
|
private final double[] lowerNoise = new double[825];
|
||||||
private final double[] upperNoise = new double[825];
|
private final double[] upperNoise = new double[825];
|
||||||
private final double[] depthNoise = new double[25];
|
private final double[] depthNoise = new double[25];
|
||||||
private final BaseBiome[] biomes = new BaseBiome[100];
|
private final Biome[] biomes = new Biome[100];
|
||||||
|
|
||||||
// public GeneratorNew(Random rand, GeneratorSettings settings)
|
// public GeneratorNew(Random rand, GeneratorSettings settings)
|
||||||
// {
|
// {
|
||||||
|
@ -197,13 +197,13 @@ public class GeneratorPerlin implements ChunkGenerator
|
||||||
float min = 0.0F;
|
float min = 0.0F;
|
||||||
float sum = 0.0F;
|
float sum = 0.0F;
|
||||||
int range = 2;
|
int range = 2;
|
||||||
Biome biome = Biome.BIOMES[this.biomes[u + 2 + (v + 2) * 10].id];
|
GenBiome biome = GenBiome.BIOMES[this.biomes[u + 2 + (v + 2) * 10].id];
|
||||||
|
|
||||||
for (int a = -range; a <= range; ++a)
|
for (int a = -range; a <= range; ++a)
|
||||||
{
|
{
|
||||||
for (int b = -range; b <= range; ++b)
|
for (int b = -range; b <= range; ++b)
|
||||||
{
|
{
|
||||||
Biome biome2 = Biome.BIOMES[this.biomes[u + a + 2 + (v + b + 2) * 10].id];
|
GenBiome biome2 = GenBiome.BIOMES[this.biomes[u + a + 2 + (v + b + 2) * 10].id];
|
||||||
float bmin = this.biomeDepthOffset + biome2.depth * this.biomeDepthWeight;
|
float bmin = this.biomeDepthOffset + biome2.depth * this.biomeDepthWeight;
|
||||||
float bmax = this.biomeScaleOffset + biome2.scale * this.biomeScaleWeight;
|
float bmax = this.biomeScaleOffset + biome2.scale * this.biomeScaleWeight;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package server.worldgen;
|
package server.worldgen;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.rng.NoiseGen;
|
import common.rng.NoiseGen;
|
||||||
import common.rng.OctaveGen;
|
import common.rng.OctaveGen;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public class ReplacerAltBiome implements BlockReplacer
|
public class ReplacerAltBiome implements BlockReplacer
|
||||||
|
@ -47,7 +47,7 @@ public class ReplacerAltBiome implements BlockReplacer
|
||||||
this.block = filler.getBlock();
|
this.block = filler.getBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, BaseBiome[] biomes)
|
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, Biome[] biomes)
|
||||||
{
|
{
|
||||||
int seaLevel = world.getSeaLevel();
|
int seaLevel = world.getSeaLevel();
|
||||||
double scale = 0.03125D;
|
double scale = 0.03125D;
|
||||||
|
@ -58,7 +58,7 @@ public class ReplacerAltBiome implements BlockReplacer
|
||||||
{
|
{
|
||||||
for(int px = 0; px < 16; px++)
|
for(int px = 0; px < 16; px++)
|
||||||
{
|
{
|
||||||
Biome biome = Biome.BIOMES[biomes[pz * 16 + px].id];
|
GenBiome biome = GenBiome.BIOMES[biomes[pz * 16 + px].id];
|
||||||
boolean alt2 = this.alt2Noise[pz + px * 16] + rand.doublev() * 0.20000000000000001D > 0.0D;
|
boolean alt2 = this.alt2Noise[pz + px * 16] + rand.doublev() * 0.20000000000000001D > 0.0D;
|
||||||
boolean alt1 = this.alt1Noise[px + pz * 16] + rand.doublev() * 0.20000000000000001D > 3D;
|
boolean alt1 = this.alt1Noise[px + pz * 16] + rand.doublev() * 0.20000000000000001D > 3D;
|
||||||
int excl = (int)(this.exclNoise[pz + px * 16] / 3D + 3D + rand.doublev() * 0.25D);
|
int excl = (int)(this.exclNoise[pz + px * 16] / 3D + 3D + rand.doublev() * 0.25D);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.worldgen;
|
package server.worldgen;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.material.Material;
|
import common.material.Material;
|
||||||
import common.rng.OctaveGen;
|
import common.rng.OctaveGen;
|
||||||
|
@ -38,7 +38,7 @@ public class ReplacerAltSurface implements BlockReplacer
|
||||||
this.fillerBlock = filler.getBlock();
|
this.fillerBlock = filler.getBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, BaseBiome[] biomes)
|
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, Biome[] biomes)
|
||||||
{
|
{
|
||||||
int i = world.getSeaLevel() + 1;
|
int i = world.getSeaLevel() + 1;
|
||||||
double d0 = 0.03125D;
|
double d0 = 0.03125D;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package server.worldgen;
|
package server.worldgen;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.rng.PerlinGen;
|
import common.rng.PerlinGen;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public class ReplacerBiome implements BlockReplacer
|
public class ReplacerBiome implements BlockReplacer
|
||||||
|
@ -16,7 +16,7 @@ public class ReplacerBiome implements BlockReplacer
|
||||||
this.stoneNoiseGen = new PerlinGen(rand, 4);
|
this.stoneNoiseGen = new PerlinGen(rand, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, BaseBiome[] biomes)
|
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, Biome[] biomes)
|
||||||
{
|
{
|
||||||
double d0 = 0.03125D;
|
double d0 = 0.03125D;
|
||||||
this.stoneNoiseGen.generate(this.stoneNoise, (double)(x * 16), (double)(z * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
|
this.stoneNoiseGen.generate(this.stoneNoise, (double)(x * 16), (double)(z * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
|
||||||
|
@ -25,7 +25,7 @@ public class ReplacerBiome implements BlockReplacer
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 16; ++j)
|
for (int j = 0; j < 16; ++j)
|
||||||
{
|
{
|
||||||
Biome biome = Biome.BIOMES[biomes[j + i * 16].id];
|
GenBiome biome = GenBiome.BIOMES[biomes[j + i * 16].id];
|
||||||
biome.genTerrainBlocks(world, rand, primer, x * 16 + i, z * 16 + j, this.stoneNoise[j + i * 16]);
|
biome.genTerrainBlocks(world, rand, primer, x * 16 + i, z * 16 + j, this.stoneNoise[j + i * 16]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.worldgen;
|
package server.worldgen;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.material.Material;
|
import common.material.Material;
|
||||||
|
@ -22,7 +22,7 @@ public class ReplacerTopLayer implements BlockReplacer
|
||||||
this.replace = replace;
|
this.replace = replace;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, BaseBiome[] biomes)
|
public void replaceBlocks(WorldServer world, int x, int z, ChunkPrimer primer, Random rand, Biome[] biomes)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 16; ++i)
|
for (int i = 0; i < 16; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@ import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
import server.worldgen.ChunkPrimer;
|
import server.worldgen.ChunkPrimer;
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ public class MapGenCaves extends MapGenBase
|
||||||
if (flag1 && p_180702_5_.get(j3, j2 - 1, i2).getBlock() == this.top)
|
if (flag1 && p_180702_5_.get(j3, j2 - 1, i2).getBlock() == this.top)
|
||||||
{
|
{
|
||||||
blockpos$mutableblockpos.set(j3 + p_180702_3_ * 16, 0, i2 + p_180702_4_ * 16);
|
blockpos$mutableblockpos.set(j3 + p_180702_3_ * 16, 0, i2 + p_180702_4_ * 16);
|
||||||
p_180702_5_.set(j3, j2 - 1, i2, Biome.BIOMES[this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).id].topBlock.getBlock().getState());
|
p_180702_5_.set(j3, j2 - 1, i2, GenBiome.BIOMES[this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).id].topBlock.getBlock().getState());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
import server.worldgen.ChunkPrimer;
|
import server.worldgen.ChunkPrimer;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public class MapGenRavine extends MapGenBase
|
||||||
if (flag && p_180707_5_.get(j3, j2 - 1, i2).getBlock() == this.top)
|
if (flag && p_180707_5_.get(j3, j2 - 1, i2).getBlock() == this.top)
|
||||||
{
|
{
|
||||||
blockpos$mutableblockpos.set(j3 + p_180707_3_ * 16, 0, i2 + p_180707_4_ * 16);
|
blockpos$mutableblockpos.set(j3 + p_180707_3_ * 16, 0, i2 + p_180707_4_ * 16);
|
||||||
p_180707_5_.set(j3, j2 - 1, i2, Biome.BIOMES[this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).id].topBlock);
|
p_180707_5_.set(j3, j2 - 1, i2, GenBiome.BIOMES[this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).id].topBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
|
|
||||||
public abstract class GenLayer {
|
public abstract class GenLayer {
|
||||||
private long worldGenSeed;
|
private long worldGenSeed;
|
||||||
|
@ -14,8 +14,8 @@ public abstract class GenLayer {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else { // if(id1 != Biome.mesaPlateau_F.id && id1 != Biome.mesaPlateau.id) {
|
else { // if(id1 != Biome.mesaPlateau_F.id && id1 != Biome.mesaPlateau.id) {
|
||||||
final Biome biome1 = Biome.getBiome(id1);
|
final GenBiome biome1 = GenBiome.getBiome(id1);
|
||||||
final Biome biome2 = Biome.getBiome(id2);
|
final GenBiome biome2 = GenBiome.getBiome(id2);
|
||||||
return biome1 != null && biome2 != null ? biome1.isEqualTo(biome2) : false;
|
return biome1 != null && biome2 != null ? biome1.isEqualTo(biome2) : false;
|
||||||
}
|
}
|
||||||
// else {
|
// else {
|
||||||
|
@ -24,7 +24,7 @@ public abstract class GenLayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean isSea(int id) {
|
protected static boolean isSea(int id) {
|
||||||
return id == BaseBiome.SEA.id || id == BaseBiome.FROZENSEA.id;
|
return id == Biome.SEA.id || id == Biome.FROZENSEA.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenLayer(long base) {
|
public GenLayer(long base) {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
|
|
||||||
public class GenLayerAddExtra extends GenLayer
|
public class GenLayerAddExtra extends GenLayer
|
||||||
{
|
{
|
||||||
private final int[] biomes;
|
private final int[] biomes;
|
||||||
private final int rarity;
|
private final int rarity;
|
||||||
|
|
||||||
public GenLayerAddExtra(long base, GenLayer parent, BaseBiome[] biomes, int rarity)
|
public GenLayerAddExtra(long base, GenLayer parent, Biome[] biomes, int rarity)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
|
|
||||||
public class GenLayerAddSea extends GenLayer
|
public class GenLayerAddSea extends GenLayer
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ public class GenLayerAddSea extends GenLayer
|
||||||
this.initChunkSeed((long)(areaX + j1), (long)(areaY + i1));
|
this.initChunkSeed((long)(areaX + j1), (long)(areaY + i1));
|
||||||
if (k2 == 0 && this.nextInt(this.rarity) == 0)
|
if (k2 == 0 && this.nextInt(this.rarity) == 0)
|
||||||
{
|
{
|
||||||
aint1[j1 + i1 * areaWidth] = l2 > 1 ? BaseBiome.FROZENSEA.id : BaseBiome.SEA.id;
|
aint1[j1 + i1 * areaWidth] = l2 > 1 ? Biome.FROZENSEA.id : Biome.SEA.id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
|
|
||||||
public class GenLayerBiome extends GenLayer
|
public class GenLayerBiome extends GenLayer
|
||||||
{
|
{
|
||||||
private final BaseBiome[] hot;
|
private final Biome[] hot;
|
||||||
private final BaseBiome[] medium;
|
private final Biome[] medium;
|
||||||
private final BaseBiome[] cold;
|
private final Biome[] cold;
|
||||||
private final BaseBiome[] frost;
|
private final Biome[] frost;
|
||||||
private final int def;
|
private final int def;
|
||||||
private final int fixed;
|
private final int fixed;
|
||||||
|
|
||||||
public GenLayerBiome(long base, GenLayer parent, BaseBiome[] hot, BaseBiome[] medium, BaseBiome[] cold, BaseBiome[] frost, BaseBiome def, boolean fixed)
|
public GenLayerBiome(long base, GenLayer parent, Biome[] hot, Biome[] medium, Biome[] cold, Biome[] frost, Biome def, boolean fixed)
|
||||||
{
|
{
|
||||||
super(base);
|
super(base);
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.biome.Temperature;
|
import server.biome.Temperature;
|
||||||
|
|
||||||
public class GenLayerBiomeEdge extends GenLayer
|
public class GenLayerBiomeEdge extends GenLayer
|
||||||
|
@ -28,45 +28,45 @@ public class GenLayerBiomeEdge extends GenLayer
|
||||||
this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
|
this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
|
||||||
int k = aint[j + 1 + (i + 1) * (areaWidth + 2)];
|
int k = aint[j + 1 + (i + 1) * (areaWidth + 2)];
|
||||||
|
|
||||||
if (!this.replaceBiomeEdgeIfNecessary(aint, aint1, j, i, areaWidth, k, BaseBiome.EXTREMEHILLS.id, BaseBiome.EXTREMEHILLSEDGE.id) && /* !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau_F.id, Biome.mesa.id) && !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau.id, Biome.mesa.id) && */ !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, BaseBiome.MEGATAIGA.id, BaseBiome.TAIGA.id))
|
if (!this.replaceBiomeEdgeIfNecessary(aint, aint1, j, i, areaWidth, k, Biome.EXTREMEHILLS.id, Biome.EXTREMEHILLSEDGE.id) && /* !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau_F.id, Biome.mesa.id) && !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau.id, Biome.mesa.id) && */ !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.MEGATAIGA.id, Biome.TAIGA.id))
|
||||||
{
|
{
|
||||||
if (k == BaseBiome.DESERT.id)
|
if (k == Biome.DESERT.id)
|
||||||
{
|
{
|
||||||
int l1 = aint[j + 1 + (i + 1 - 1) * (areaWidth + 2)];
|
int l1 = aint[j + 1 + (i + 1 - 1) * (areaWidth + 2)];
|
||||||
int i2 = aint[j + 1 + 1 + (i + 1) * (areaWidth + 2)];
|
int i2 = aint[j + 1 + 1 + (i + 1) * (areaWidth + 2)];
|
||||||
int j2 = aint[j + 1 - 1 + (i + 1) * (areaWidth + 2)];
|
int j2 = aint[j + 1 - 1 + (i + 1) * (areaWidth + 2)];
|
||||||
int k2 = aint[j + 1 + (i + 1 + 1) * (areaWidth + 2)];
|
int k2 = aint[j + 1 + (i + 1 + 1) * (areaWidth + 2)];
|
||||||
|
|
||||||
if (l1 != BaseBiome.ICEPLAINS.id && i2 != BaseBiome.ICEPLAINS.id && j2 != BaseBiome.ICEPLAINS.id && k2 != BaseBiome.ICEPLAINS.id)
|
if (l1 != Biome.ICEPLAINS.id && i2 != Biome.ICEPLAINS.id && j2 != Biome.ICEPLAINS.id && k2 != Biome.ICEPLAINS.id)
|
||||||
{
|
{
|
||||||
aint1[j + i * areaWidth] = k;
|
aint1[j + i * areaWidth] = k;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aint1[j + i * areaWidth] = BaseBiome.EXTREMEHILLSPLUS.id;
|
aint1[j + i * areaWidth] = Biome.EXTREMEHILLSPLUS.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.SWAMPLAND.id)
|
else if (k == Biome.SWAMPLAND.id)
|
||||||
{
|
{
|
||||||
int l = aint[j + 1 + (i + 1 - 1) * (areaWidth + 2)];
|
int l = aint[j + 1 + (i + 1 - 1) * (areaWidth + 2)];
|
||||||
int i1 = aint[j + 1 + 1 + (i + 1) * (areaWidth + 2)];
|
int i1 = aint[j + 1 + 1 + (i + 1) * (areaWidth + 2)];
|
||||||
int j1 = aint[j + 1 - 1 + (i + 1) * (areaWidth + 2)];
|
int j1 = aint[j + 1 - 1 + (i + 1) * (areaWidth + 2)];
|
||||||
int k1 = aint[j + 1 + (i + 1 + 1) * (areaWidth + 2)];
|
int k1 = aint[j + 1 + (i + 1 + 1) * (areaWidth + 2)];
|
||||||
|
|
||||||
if (l != BaseBiome.DESERT.id && i1 != BaseBiome.DESERT.id && j1 != BaseBiome.DESERT.id && k1 != BaseBiome.DESERT.id && l != BaseBiome.COLDTAIGA.id && i1 != BaseBiome.COLDTAIGA.id && j1 != BaseBiome.COLDTAIGA.id && k1 != BaseBiome.COLDTAIGA.id && l != BaseBiome.ICEPLAINS.id && i1 != BaseBiome.ICEPLAINS.id && j1 != BaseBiome.ICEPLAINS.id && k1 != BaseBiome.ICEPLAINS.id)
|
if (l != Biome.DESERT.id && i1 != Biome.DESERT.id && j1 != Biome.DESERT.id && k1 != Biome.DESERT.id && l != Biome.COLDTAIGA.id && i1 != Biome.COLDTAIGA.id && j1 != Biome.COLDTAIGA.id && k1 != Biome.COLDTAIGA.id && l != Biome.ICEPLAINS.id && i1 != Biome.ICEPLAINS.id && j1 != Biome.ICEPLAINS.id && k1 != Biome.ICEPLAINS.id)
|
||||||
{
|
{
|
||||||
if (l != BaseBiome.JUNGLE.id && k1 != BaseBiome.JUNGLE.id && i1 != BaseBiome.JUNGLE.id && j1 != BaseBiome.JUNGLE.id)
|
if (l != Biome.JUNGLE.id && k1 != Biome.JUNGLE.id && i1 != Biome.JUNGLE.id && j1 != Biome.JUNGLE.id)
|
||||||
{
|
{
|
||||||
aint1[j + i * areaWidth] = k;
|
aint1[j + i * areaWidth] = k;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aint1[j + i * areaWidth] = BaseBiome.JUNGLEEDGE.id;
|
aint1[j + i * areaWidth] = Biome.JUNGLEEDGE.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aint1[j + i * areaWidth] = BaseBiome.PLAINS.id;
|
aint1[j + i * areaWidth] = Biome.PLAINS.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -150,8 +150,8 @@ public class GenLayerBiomeEdge extends GenLayer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Biome biomegenbase = Biome.getBiome(p_151634_1_);
|
GenBiome biomegenbase = GenBiome.getBiome(p_151634_1_);
|
||||||
Biome biomegenbase1 = Biome.getBiome(p_151634_2_);
|
GenBiome biomegenbase1 = GenBiome.getBiome(p_151634_2_);
|
||||||
|
|
||||||
if (biomegenbase != null && biomegenbase1 != null)
|
if (biomegenbase != null && biomegenbase1 != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.log.Log;
|
import common.log.Log;
|
||||||
|
|
||||||
public class GenLayerHills extends GenLayer
|
public class GenLayerHills extends GenLayer
|
||||||
|
@ -8,7 +8,7 @@ public class GenLayerHills extends GenLayer
|
||||||
private GenLayer field_151628_d;
|
private GenLayer field_151628_d;
|
||||||
private final int def;
|
private final int def;
|
||||||
|
|
||||||
public GenLayerHills(long p_i45479_1_, GenLayer p_i45479_3_, GenLayer p_i45479_4_, BaseBiome def)
|
public GenLayerHills(long p_i45479_1_, GenLayer p_i45479_3_, GenLayer p_i45479_4_, Biome def)
|
||||||
{
|
{
|
||||||
super(p_i45479_1_);
|
super(p_i45479_1_);
|
||||||
this.parent = p_i45479_3_;
|
this.parent = p_i45479_3_;
|
||||||
|
@ -42,7 +42,7 @@ public class GenLayerHills extends GenLayer
|
||||||
|
|
||||||
if (k != 0 && l >= 2 && (l - 2) % 29 == 1 && k < 128)
|
if (k != 0 && l >= 2 && (l - 2) % 29 == 1 && k < 128)
|
||||||
{
|
{
|
||||||
if (BaseBiome.getBiome(k + 128) != null)
|
if (Biome.getBiome(k + 128) != null)
|
||||||
{
|
{
|
||||||
aint2[j + i * areaWidth] = k + 128;
|
aint2[j + i * areaWidth] = k + 128;
|
||||||
}
|
}
|
||||||
|
@ -59,86 +59,86 @@ public class GenLayerHills extends GenLayer
|
||||||
{
|
{
|
||||||
int i1 = k;
|
int i1 = k;
|
||||||
|
|
||||||
if (k == BaseBiome.DESERT.id)
|
if (k == Biome.DESERT.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.DESERTHILLS.id;
|
i1 = Biome.DESERTHILLS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.FOREST.id)
|
else if (k == Biome.FOREST.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.FORESTHILLS.id;
|
i1 = Biome.FORESTHILLS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.BIRCHFOREST.id)
|
else if (k == Biome.BIRCHFOREST.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.BIRCHFORESTHILLS.id;
|
i1 = Biome.BIRCHFORESTHILLS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.ROOFEDFOREST.id)
|
else if (k == Biome.ROOFEDFOREST.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.PLAINS.id;
|
i1 = Biome.PLAINS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.TAIGA.id)
|
else if (k == Biome.TAIGA.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.TAIGAHILLS.id;
|
i1 = Biome.TAIGAHILLS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.MEGATAIGA.id)
|
else if (k == Biome.MEGATAIGA.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.MEGATAIGAHILLS.id;
|
i1 = Biome.MEGATAIGAHILLS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.COLDTAIGA.id)
|
else if (k == Biome.COLDTAIGA.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.COLDTAIGAHILLS.id;
|
i1 = Biome.COLDTAIGAHILLS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.PLAINS.id)
|
else if (k == Biome.PLAINS.id)
|
||||||
{
|
{
|
||||||
if (this.nextInt(3) == 0)
|
if (this.nextInt(3) == 0)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.FORESTHILLS.id;
|
i1 = Biome.FORESTHILLS.id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.FOREST.id;
|
i1 = Biome.FOREST.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.ICEPLAINS.id)
|
else if (k == Biome.ICEPLAINS.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.ICEMOUNTAINS.id;
|
i1 = Biome.ICEMOUNTAINS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.JUNGLE.id)
|
else if (k == Biome.JUNGLE.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.JUNGLEHILLS.id;
|
i1 = Biome.JUNGLEHILLS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.NONE.id)
|
else if (k == Biome.NONE.id)
|
||||||
{
|
{
|
||||||
i1 = this.def;
|
i1 = this.def;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.EXTREMEHILLS.id)
|
else if (k == Biome.EXTREMEHILLS.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.EXTREMEHILLSPLUS.id;
|
i1 = Biome.EXTREMEHILLSPLUS.id;
|
||||||
}
|
}
|
||||||
else if (k == BaseBiome.SAVANNA.id)
|
else if (k == Biome.SAVANNA.id)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.SAVANNAPLATEAU.id;
|
i1 = Biome.SAVANNAPLATEAU.id;
|
||||||
}
|
}
|
||||||
// else if (canBeNearby(k, Biome.mesaPlateau_F.id))
|
// else if (canBeNearby(k, Biome.mesaPlateau_F.id))
|
||||||
// {
|
// {
|
||||||
// i1 = Biome.mesa.id;
|
// i1 = Biome.mesa.id;
|
||||||
// }
|
// }
|
||||||
else if (k == BaseBiome.SEA.id && this.nextInt(3) == 0)
|
else if (k == Biome.SEA.id && this.nextInt(3) == 0)
|
||||||
{
|
{
|
||||||
int j1 = this.nextInt(2);
|
int j1 = this.nextInt(2);
|
||||||
|
|
||||||
if (j1 == 0)
|
if (j1 == 0)
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.PLAINS.id;
|
i1 = Biome.PLAINS.id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i1 = BaseBiome.FOREST.id;
|
i1 = Biome.FOREST.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag && i1 != k)
|
if (flag && i1 != k)
|
||||||
{
|
{
|
||||||
if (BaseBiome.getBiome(i1 + 128) != null)
|
if (Biome.getBiome(i1 + 128) != null)
|
||||||
{
|
{
|
||||||
i1 += 128;
|
i1 += 128;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
|
|
||||||
public class GenLayerRiver extends GenLayer
|
public class GenLayerRiver extends GenLayer
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ public class GenLayerRiver extends GenLayer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aint1[j1 + i1 * areaWidth] = BaseBiome.RIVER.id;
|
aint1[j1 + i1 * areaWidth] = Biome.RIVER.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
|
|
||||||
public class GenLayerRiverMix extends GenLayer
|
public class GenLayerRiverMix extends GenLayer
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ public class GenLayerRiverMix extends GenLayer
|
||||||
private GenLayer riverPatternGeneratorChain;
|
private GenLayer riverPatternGeneratorChain;
|
||||||
private final int def;
|
private final int def;
|
||||||
|
|
||||||
public GenLayerRiverMix(long p_i2129_1_, GenLayer p_i2129_3_, GenLayer p_i2129_4_, BaseBiome def)
|
public GenLayerRiverMix(long p_i2129_1_, GenLayer p_i2129_3_, GenLayer p_i2129_4_, Biome def)
|
||||||
{
|
{
|
||||||
super(p_i2129_1_);
|
super(p_i2129_1_);
|
||||||
this.biomePatternGeneratorChain = p_i2129_3_;
|
this.biomePatternGeneratorChain = p_i2129_3_;
|
||||||
|
@ -39,23 +39,23 @@ public class GenLayerRiverMix extends GenLayer
|
||||||
|
|
||||||
for (int i = 0; i < areaWidth * areaHeight; ++i)
|
for (int i = 0; i < areaWidth * areaHeight; ++i)
|
||||||
{
|
{
|
||||||
if(biome[i] == BaseBiome.NONE.id)
|
if(biome[i] == Biome.NONE.id)
|
||||||
{
|
{
|
||||||
out[i] = this.def;
|
out[i] = this.def;
|
||||||
}
|
}
|
||||||
else if(biome[i] == BaseBiome.SEA.id || biome[i] == BaseBiome.FROZENSEA.id)
|
else if(biome[i] == Biome.SEA.id || biome[i] == Biome.FROZENSEA.id)
|
||||||
{
|
{
|
||||||
out[i] = biome[i];
|
out[i] = biome[i];
|
||||||
}
|
}
|
||||||
else if (river[i] == BaseBiome.RIVER.id)
|
else if (river[i] == Biome.RIVER.id)
|
||||||
{
|
{
|
||||||
if (biome[i] == BaseBiome.ICEPLAINS.id)
|
if (biome[i] == Biome.ICEPLAINS.id)
|
||||||
{
|
{
|
||||||
out[i] = BaseBiome.FROZENRIVER.id;
|
out[i] = Biome.FROZENRIVER.id;
|
||||||
}
|
}
|
||||||
else // if (biome[i] != Biome.mushroomPlains.id && biome[i] != Biome.mushroomPlainsEdge.id)
|
else // if (biome[i] != Biome.mushroomPlains.id && biome[i] != Biome.mushroomPlainsEdge.id)
|
||||||
{
|
{
|
||||||
out[i] = BaseBiome.RIVER.id;
|
out[i] = Biome.RIVER.id;
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package server.worldgen.layer;
|
package server.worldgen.layer;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import server.biome.Biome;
|
import server.biome.GenBiome;
|
||||||
import server.biome.BiomeJungle;
|
import server.biome.BiomeJungle;
|
||||||
|
|
||||||
public class GenLayerShore extends GenLayer
|
public class GenLayerShore extends GenLayer
|
||||||
|
@ -23,7 +23,7 @@ public class GenLayerShore extends GenLayer
|
||||||
{
|
{
|
||||||
this.initChunkSeed((long)(j + x), (long)(i + z));
|
this.initChunkSeed((long)(j + x), (long)(i + z));
|
||||||
int id = pre[j + 1 + (i + 1) * (width + 2)];
|
int id = pre[j + 1 + (i + 1) * (width + 2)];
|
||||||
Biome biome = Biome.getBiome(id);
|
GenBiome biome = GenBiome.getBiome(id);
|
||||||
|
|
||||||
// if (id == Biome.mushroomPlains.id)
|
// if (id == Biome.mushroomPlains.id)
|
||||||
// {
|
// {
|
||||||
|
@ -57,19 +57,19 @@ public class GenLayerShore extends GenLayer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data[j + i * width] = BaseBiome.BEACH.id;
|
data[j + i * width] = Biome.BEACH.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data[j + i * width] = BaseBiome.JUNGLEEDGE.id;
|
data[j + i * width] = Biome.JUNGLEEDGE.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (id != BaseBiome.EXTREMEHILLS.id && id != BaseBiome.EXTREMEHILLSPLUS.id && id != BaseBiome.EXTREMEHILLSEDGE.id)
|
else if (id != Biome.EXTREMEHILLS.id && id != Biome.EXTREMEHILLSPLUS.id && id != Biome.EXTREMEHILLSEDGE.id)
|
||||||
{
|
{
|
||||||
if (biome != null && biome.allowColdBeach)
|
if (biome != null && biome.allowColdBeach)
|
||||||
{
|
{
|
||||||
this.putBeach(pre, data, j, i, width, id, BaseBiome.COLDBEACH.id);
|
this.putBeach(pre, data, j, i, width, id, Biome.COLDBEACH.id);
|
||||||
}
|
}
|
||||||
else // if (id != Biome.mesa.id && id != Biome.mesaPlateau_F.id)
|
else // if (id != Biome.mesa.id && id != Biome.mesaPlateau_F.id)
|
||||||
// {
|
// {
|
||||||
|
@ -86,7 +86,7 @@ public class GenLayerShore extends GenLayer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data[j + i * width] = BaseBiome.BEACH.id;
|
data[j + i * width] = Biome.BEACH.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -120,7 +120,7 @@ public class GenLayerShore extends GenLayer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.putBeach(pre, data, j, i, width, id, BaseBiome.STONEBEACH.id);
|
this.putBeach(pre, data, j, i, width, id, Biome.STONEBEACH.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,8 +154,8 @@ public class GenLayerShore extends GenLayer
|
||||||
|
|
||||||
private boolean canNBJungle(int id)
|
private boolean canNBJungle(int id)
|
||||||
{
|
{
|
||||||
Biome biome = Biome.getBiome(id);
|
GenBiome biome = GenBiome.getBiome(id);
|
||||||
return biome != null && biome.getBiomeClass() == BiomeJungle.class ? true : id == BaseBiome.JUNGLEEDGE.id || id == BaseBiome.JUNGLE.id || id == BaseBiome.JUNGLEHILLS.id || id == BaseBiome.FOREST.id || id == BaseBiome.TAIGA.id || isSea(id);
|
return biome != null && biome.getBiomeClass() == BiomeJungle.class ? true : id == Biome.JUNGLEEDGE.id || id == Biome.JUNGLE.id || id == Biome.JUNGLEHILLS.id || id == Biome.FOREST.id || id == Biome.TAIGA.id || isSea(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private boolean canNBMesa(int id)
|
// private boolean canNBMesa(int id)
|
||||||
|
|
|
@ -3,14 +3,14 @@ package server.worldgen.structure;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import server.world.WorldServer;
|
import server.world.WorldServer;
|
||||||
|
|
||||||
public class MapGenScatteredFeature extends MapGenStructure
|
public class MapGenScatteredFeature extends MapGenStructure
|
||||||
{
|
{
|
||||||
private static final List<BaseBiome> biomelist = Arrays.<BaseBiome>asList(BaseBiome.DESERT, BaseBiome.DESERTHILLS, BaseBiome.JUNGLE, BaseBiome.JUNGLEHILLS, BaseBiome.SWAMPLAND);
|
private static final List<Biome> biomelist = Arrays.<Biome>asList(Biome.DESERT, Biome.DESERTHILLS, Biome.JUNGLE, Biome.JUNGLEHILLS, Biome.SWAMPLAND);
|
||||||
private static final int MAX_DISTANCE = 32;
|
private static final int MAX_DISTANCE = 32;
|
||||||
private static final int MIN_DISTANCE = 8;
|
private static final int MIN_DISTANCE = 8;
|
||||||
|
|
||||||
|
@ -44,14 +44,14 @@ public class MapGenScatteredFeature extends MapGenStructure
|
||||||
|
|
||||||
if (i == k && j == l)
|
if (i == k && j == l)
|
||||||
{
|
{
|
||||||
BaseBiome biomegenbase = this.worldObj.getBiomeGenerator().getBiomeGenerator(new BlockPos(i * 16 + 8, 0, j * 16 + 8), null);
|
Biome biomegenbase = this.worldObj.getBiomeGenerator().getBiomeGenerator(new BlockPos(i * 16 + 8, 0, j * 16 + 8), null);
|
||||||
|
|
||||||
if (biomegenbase == null)
|
if (biomegenbase == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (BaseBiome biomegenbase1 : biomelist)
|
for (Biome biomegenbase1 : biomelist)
|
||||||
{
|
{
|
||||||
if (biomegenbase == biomegenbase1)
|
if (biomegenbase == biomegenbase1)
|
||||||
{
|
{
|
||||||
|
@ -92,16 +92,16 @@ public class MapGenScatteredFeature extends MapGenStructure
|
||||||
public Start(WorldServer worldIn, Random p_i2060_2_, int p_i2060_3_, int p_i2060_4_)
|
public Start(WorldServer worldIn, Random p_i2060_2_, int p_i2060_3_, int p_i2060_4_)
|
||||||
{
|
{
|
||||||
super(p_i2060_3_, p_i2060_4_);
|
super(p_i2060_3_, p_i2060_4_);
|
||||||
BaseBiome biomegenbase = worldIn.getBiomeGenForCoords(new BlockPos(p_i2060_3_ * 16 + 8, 0, p_i2060_4_ * 16 + 8));
|
Biome biomegenbase = worldIn.getBiomeGenForCoords(new BlockPos(p_i2060_3_ * 16 + 8, 0, p_i2060_4_ * 16 + 8));
|
||||||
|
|
||||||
if (biomegenbase != BaseBiome.JUNGLE && biomegenbase != BaseBiome.JUNGLEHILLS)
|
if (biomegenbase != Biome.JUNGLE && biomegenbase != Biome.JUNGLEHILLS)
|
||||||
{
|
{
|
||||||
if (biomegenbase == BaseBiome.SWAMPLAND)
|
if (biomegenbase == Biome.SWAMPLAND)
|
||||||
{
|
{
|
||||||
StructureScattered.SwampHut componentscatteredfeaturepieces$swamphut = new StructureScattered.SwampHut(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
|
StructureScattered.SwampHut componentscatteredfeaturepieces$swamphut = new StructureScattered.SwampHut(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
|
||||||
this.components.add(componentscatteredfeaturepieces$swamphut);
|
this.components.add(componentscatteredfeaturepieces$swamphut);
|
||||||
}
|
}
|
||||||
else if (biomegenbase == BaseBiome.DESERT || biomegenbase == BaseBiome.DESERTHILLS)
|
else if (biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERTHILLS)
|
||||||
{
|
{
|
||||||
StructureScattered.DesertPyramid componentscatteredfeaturepieces$desertpyramid = new StructureScattered.DesertPyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
|
StructureScattered.DesertPyramid componentscatteredfeaturepieces$desertpyramid = new StructureScattered.DesertPyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
|
||||||
this.components.add(componentscatteredfeaturepieces$desertpyramid);
|
this.components.add(componentscatteredfeaturepieces$desertpyramid);
|
||||||
|
|
|
@ -3,7 +3,7 @@ package server.worldgen.structure;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.collect.Sets;
|
import common.collect.Sets;
|
||||||
import common.nbt.NBTTagCompound;
|
import common.nbt.NBTTagCompound;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
@ -11,7 +11,7 @@ import server.world.WorldServer;
|
||||||
|
|
||||||
public class MapGenVillage extends MapGenStructure
|
public class MapGenVillage extends MapGenStructure
|
||||||
{
|
{
|
||||||
public static final Set<BaseBiome> villageSpawnBiomes = Sets.<BaseBiome>newHashSet(BaseBiome.PLAINS, BaseBiome.DESERT, BaseBiome.SAVANNA);
|
public static final Set<Biome> villageSpawnBiomes = Sets.<Biome>newHashSet(Biome.PLAINS, Biome.DESERT, Biome.SAVANNA);
|
||||||
|
|
||||||
/** World terrain type, 0 for normal, 1 for flat map */
|
/** World terrain type, 0 for normal, 1 for flat map */
|
||||||
private int terrainType;
|
private int terrainType;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package server.worldgen.structure;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.biome.BaseBiome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockLog;
|
import common.block.BlockLog;
|
||||||
import common.block.BlockSandStone;
|
import common.block.BlockSandStone;
|
||||||
|
@ -1430,8 +1430,8 @@ public class StructureVillage
|
||||||
this.biomeGen = genIn;
|
this.biomeGen = genIn;
|
||||||
this.structureVillageWeightedPieceList = p_i2104_6_;
|
this.structureVillageWeightedPieceList = p_i2104_6_;
|
||||||
this.terrainType = p_i2104_7_;
|
this.terrainType = p_i2104_7_;
|
||||||
BaseBiome biomegenbase = genIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), BaseBiome.DEF_BIOME);
|
Biome biomegenbase = genIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), Biome.DEF_BIOME);
|
||||||
this.inDesert = biomegenbase == BaseBiome.DESERT || biomegenbase == BaseBiome.DESERTHILLS;
|
this.inDesert = biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERTHILLS;
|
||||||
this.func_175846_a(this.inDesert);
|
this.func_175846_a(this.inDesert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue