misc refactoring
This commit is contained in:
parent
eba8f6ea98
commit
10ba39c70b
85 changed files with 512 additions and 526 deletions
|
@ -87,7 +87,7 @@ import io.netty.channel.socket.nio.NioServerSocketChannel;
|
|||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||
import io.netty.util.concurrent.Future;
|
||||
import io.netty.util.concurrent.GenericFutureListener;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.clipboard.ReorderRegistry;
|
||||
import server.clipboard.RotationRegistry;
|
||||
import server.command.CommandEnvironment;
|
||||
|
@ -148,7 +148,7 @@ public final class Server implements IThreadListener {
|
|||
public static void main(String[] args) {
|
||||
Util.checkOs();
|
||||
Registry.setup("Server thread");
|
||||
Biome.setAsProvider();
|
||||
GenBiome.setAsProvider();
|
||||
UniverseRegistry.register();
|
||||
RotationRegistry.register();
|
||||
ReorderRegistry.register();
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.WeightedList;
|
||||
|
||||
public class BiomeBeach extends Biome
|
||||
public class BiomeBeach extends GenBiome
|
||||
{
|
||||
public BiomeBeach(boolean cold)
|
||||
{
|
||||
super(cold ? BaseBiome.COLDBEACH : BaseBiome.BEACH);
|
||||
super(cold ? Biome.COLDBEACH : Biome.BEACH);
|
||||
this.topBlock = Blocks.sand.getState();
|
||||
this.fillerBlock = Blocks.sand.getState();
|
||||
this.treesPerChunk = -999;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockFlower;
|
||||
import common.entity.npc.EntityMetalhead;
|
||||
import common.init.Blocks;
|
||||
|
@ -10,11 +10,11 @@ import common.util.BlockPos;
|
|||
import server.worldgen.tree.WorldGenBaseTree;
|
||||
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());
|
||||
|
||||
public BiomeBlackened() {
|
||||
super(BaseBiome.BLACKENED);
|
||||
super(Biome.BLACKENED);
|
||||
this.topBlock = Blocks.blackened_soil.getState();
|
||||
this.fillerBlock = Blocks.blackened_dirt.getState();
|
||||
this.treesPerChunk = 3;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.entity.Entity;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.init.Blocks;
|
||||
|
@ -12,13 +12,13 @@ import server.world.WorldServer;
|
|||
import server.worldgen.FeatureGenerator;
|
||||
import server.worldgen.foliage.WorldGenMushroom;
|
||||
|
||||
public class BiomeChaos extends Biome
|
||||
public class BiomeChaos extends GenBiome
|
||||
{
|
||||
protected FeatureGenerator mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
||||
|
||||
public BiomeChaos()
|
||||
{
|
||||
super(BaseBiome.CHAOS);
|
||||
super(Biome.CHAOS);
|
||||
this.topBlock = Blocks.obsidian.getState();
|
||||
this.fillerBlock = Blocks.obsidian.getState();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.Random;
|
||||
import common.rng.WeightedList;
|
||||
|
@ -8,11 +8,11 @@ import common.util.BlockPos;
|
|||
import server.world.WorldServer;
|
||||
import server.worldgen.feature.WorldGenDesertWells;
|
||||
|
||||
public class BiomeDesert extends Biome
|
||||
public class BiomeDesert extends GenBiome
|
||||
{
|
||||
public BiomeDesert(boolean hills)
|
||||
{
|
||||
super(hills ? BaseBiome.DESERTHILLS : BaseBiome.DESERT);
|
||||
super(hills ? Biome.DESERTHILLS : Biome.DESERT);
|
||||
this.topBlock = Blocks.sand.getState();
|
||||
this.fillerBlock = Blocks.sand.getState();
|
||||
this.treesPerChunk = -999;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.Random;
|
||||
import common.rng.WeightedList;
|
||||
import common.util.BlockPos;
|
||||
import server.world.WorldServer;
|
||||
|
||||
public class BiomeExterminated extends Biome {
|
||||
public class BiomeExterminated extends GenBiome {
|
||||
public BiomeExterminated() {
|
||||
super(BaseBiome.EXTERMINATED);
|
||||
super(Biome.EXTERMINATED);
|
||||
this.topBlock = Blocks.air.getState();
|
||||
this.fillerBlock = Blocks.air.getState();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockDoublePlant;
|
||||
import common.block.BlockFlower;
|
||||
import common.entity.animal.EntityWolf;
|
||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenBirch;
|
|||
import server.worldgen.tree.WorldGenDarkOak;
|
||||
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[] {
|
||||
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),
|
||||
Blocks.maple_leaves.getState()); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
||||
|
||||
public BiomeForest(BaseBiome base, int type)
|
||||
public BiomeForest(Biome base, int type)
|
||||
{
|
||||
super(base);
|
||||
this.subType = type;
|
||||
|
@ -195,9 +195,9 @@ public class BiomeForest extends Biome
|
|||
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);
|
||||
biomegenforest.setScaling(this.depth, this.scale + 0.2F);
|
||||
|
@ -205,7 +205,7 @@ public class BiomeForest extends Biome
|
|||
}
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.entity.npc.EntityBloodElf;
|
||||
import common.entity.npc.EntityCultivator;
|
||||
import common.entity.npc.EntityFireDemon;
|
||||
|
@ -18,7 +18,7 @@ import server.worldgen.feature.WorldGenGlowStone;
|
|||
import server.worldgen.feature.WorldGenHellLava;
|
||||
import server.worldgen.foliage.WorldGenMushroom;
|
||||
|
||||
public class BiomeHell extends Biome
|
||||
public class BiomeHell extends GenBiome
|
||||
{
|
||||
private final int subtype;
|
||||
private final WorldGenFire fireGen;
|
||||
|
@ -30,7 +30,7 @@ public class BiomeHell extends Biome
|
|||
private final WorldGenMushroom brownMushroomGen;
|
||||
private final WorldGenMushroom redMushroomGen;
|
||||
|
||||
public BiomeHell(BaseBiome base, int subtype)
|
||||
public BiomeHell(Biome base, int subtype)
|
||||
{
|
||||
super(base);
|
||||
this.subtype = subtype;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
|
@ -10,7 +10,7 @@ import server.worldgen.FeatureOres;
|
|||
import server.worldgen.tree.WorldGenTaiga2;
|
||||
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 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_150638_aH;
|
||||
|
||||
protected BiomeHills(BaseBiome base, boolean large)
|
||||
protected BiomeHills(Biome base, boolean large)
|
||||
{
|
||||
super(base);
|
||||
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
|
||||
*/
|
||||
private BiomeHills mutateHills(Biome p_150633_1_)
|
||||
private BiomeHills mutateHills(GenBiome p_150633_1_)
|
||||
{
|
||||
this.field_150638_aH = this.field_150637_aG;
|
||||
this.setScaling(p_150633_1_.depth, p_150633_1_.scale);
|
||||
return this;
|
||||
}
|
||||
|
||||
protected Biome createMutatedBiome(BaseBiome base)
|
||||
protected GenBiome createMutatedBiome(Biome base)
|
||||
{
|
||||
return (new BiomeHills(base, false)).mutateHills(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockTallGrass;
|
||||
import common.entity.animal.EntityChicken;
|
||||
import common.entity.animal.EntityOcelot;
|
||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenBaseTree;
|
|||
import server.worldgen.tree.WorldGenJungle;
|
||||
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 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;
|
||||
|
||||
public BiomeJungle(BaseBiome base, boolean edge)
|
||||
public BiomeJungle(Biome base, boolean edge)
|
||||
{
|
||||
super(base);
|
||||
this.edge = edge;
|
||||
|
|
|
@ -2,7 +2,7 @@ package server.biome;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.BlockColored;
|
||||
import common.block.BlockDirt;
|
||||
|
@ -19,7 +19,7 @@ import server.world.WorldServer;
|
|||
import server.worldgen.ChunkPrimer;
|
||||
import server.worldgen.tree.WorldGenTree;
|
||||
|
||||
public class BiomeMesa extends Biome
|
||||
public class BiomeMesa extends GenBiome
|
||||
{
|
||||
private final boolean bryce;
|
||||
private final boolean soil;
|
||||
|
@ -30,7 +30,7 @@ public class BiomeMesa extends Biome
|
|||
private PerlinGen highBryceGen;
|
||||
private PerlinGen clayColorGen;
|
||||
|
||||
public BiomeMesa(BaseBiome base, boolean bryce, boolean soil)
|
||||
public BiomeMesa(Biome base, boolean bryce, boolean soil)
|
||||
{
|
||||
super(base);
|
||||
this.bryce = bryce;
|
||||
|
@ -317,9 +317,9 @@ public class BiomeMesa extends Biome
|
|||
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);
|
||||
|
||||
if (!bryce)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.Random;
|
||||
import common.rng.WeightedList;
|
||||
|
@ -8,11 +8,11 @@ import common.util.BlockPos;
|
|||
import server.world.WorldServer;
|
||||
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);
|
||||
|
||||
public BiomeMoon() {
|
||||
super(BaseBiome.MOON);
|
||||
super(Biome.MOON);
|
||||
this.topBlock = Blocks.moon_rock.getState();
|
||||
this.fillerBlock = Blocks.moon_rock.getState();
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.entity.animal.EntityMooshroom;
|
||||
import common.init.Blocks;
|
||||
import common.rng.WeightedList;
|
||||
|
||||
public class BiomeMushroom extends Biome
|
||||
public class BiomeMushroom extends GenBiome
|
||||
{
|
||||
public BiomeMushroom()
|
||||
{
|
||||
super(BaseBiome.MUSHROOMPLAINS);
|
||||
super(Biome.MUSHROOMPLAINS);
|
||||
this.treesPerChunk = -100;
|
||||
this.flowersPerChunk = -100;
|
||||
this.grassPerChunk = -100;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.rng.Random;
|
||||
import common.rng.WeightedList;
|
||||
import common.util.BlockPos;
|
||||
|
@ -8,11 +8,11 @@ import server.world.WorldServer;
|
|||
import server.worldgen.ChunkPrimer;
|
||||
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);
|
||||
this.baseBiome = biome;
|
||||
|
@ -63,7 +63,7 @@ public class BiomeMutated extends Biome
|
|||
return this.baseBiome.genBigTreeChance(rand);
|
||||
}
|
||||
|
||||
public Class <? extends Biome > getBiomeClass()
|
||||
public Class <? extends GenBiome > 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
|
||||
*/
|
||||
public boolean isEqualTo(Biome biome)
|
||||
public boolean isEqualTo(GenBiome biome)
|
||||
{
|
||||
return this.baseBiome.isEqualTo(biome);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.Random;
|
||||
import common.rng.WeightedList;
|
||||
|
@ -8,9 +8,9 @@ import common.util.BlockPos;
|
|||
import server.world.WorldServer;
|
||||
import server.worldgen.ChunkPrimer;
|
||||
|
||||
public class BiomeNone extends Biome {
|
||||
public class BiomeNone extends GenBiome {
|
||||
public BiomeNone() {
|
||||
super(BaseBiome.NONE);
|
||||
super(Biome.NONE);
|
||||
this.topBlock = Blocks.air.getState();
|
||||
this.fillerBlock = Blocks.air.getState();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockDoublePlant;
|
||||
import common.block.BlockFlower;
|
||||
import common.entity.animal.EntityHorse;
|
||||
|
@ -8,7 +8,7 @@ import common.rng.Random;
|
|||
import common.util.BlockPos;
|
||||
import server.world.WorldServer;
|
||||
|
||||
public class BiomePlains extends Biome
|
||||
public class BiomePlains extends GenBiome
|
||||
{
|
||||
private static final BlockFlower.EnumFlowerType[] TULIP_TYPES = new BlockFlower.EnumFlowerType[] {
|
||||
BlockFlower.EnumFlowerType.ORANGE_TULIP, BlockFlower.EnumFlowerType.RED_TULIP,
|
||||
|
@ -23,7 +23,7 @@ public class BiomePlains extends Biome
|
|||
|
||||
protected BiomePlains()
|
||||
{
|
||||
super(BaseBiome.PLAINS);
|
||||
super(Biome.PLAINS);
|
||||
this.setScaling(Scaling.PLAINS_LOW);
|
||||
this.mobs.add(new RngSpawn(EntityHorse.class, 5, 2, 6));
|
||||
this.treesPerChunk = -999;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockDirt;
|
||||
import common.block.BlockDoublePlant;
|
||||
import common.entity.animal.EntityHorse;
|
||||
|
@ -12,13 +12,13 @@ import server.worldgen.ChunkPrimer;
|
|||
import server.worldgen.tree.WorldGenSavanna;
|
||||
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);
|
||||
|
||||
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.treesPerChunk = 1;
|
||||
this.flowersPerChunk = 4;
|
||||
|
@ -30,9 +30,9 @@ public class BiomeSavanna extends Biome
|
|||
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.scale = this.scale * 0.5F + 1.2F;
|
||||
return biomegenbase;
|
||||
|
@ -55,7 +55,7 @@ public class BiomeSavanna extends Biome
|
|||
|
||||
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_);
|
||||
this.treesPerChunk = 2;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.Random;
|
||||
import common.rng.WeightedList;
|
||||
|
@ -11,13 +11,13 @@ import server.worldgen.feature.WorldGenIceSpike;
|
|||
import server.worldgen.tree.WorldGenTaiga2;
|
||||
import server.worldgen.tree.WorldGenTree;
|
||||
|
||||
public class BiomeSnow extends Biome
|
||||
public class BiomeSnow extends GenBiome
|
||||
{
|
||||
private final WorldGenIceSpike spikeGen = new WorldGenIceSpike();
|
||||
private final WorldGenIcePath pathGen = new WorldGenIcePath(4);
|
||||
private final boolean spiky;
|
||||
|
||||
public BiomeSnow(BaseBiome base, boolean spiky)
|
||||
public BiomeSnow(Biome base, boolean spiky)
|
||||
{
|
||||
super(base);
|
||||
this.spiky = spiky;
|
||||
|
@ -55,9 +55,9 @@ public class BiomeSnow extends Biome
|
|||
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.scale = this.scale + 0.4F;
|
||||
return biomegenbase;
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.entity.animal.EntitySheep;
|
||||
import common.entity.npc.EntitySpirit;
|
||||
import common.init.Blocks;
|
||||
import common.rng.WeightedList;
|
||||
|
||||
public class BiomeSnowLand extends Biome
|
||||
public class BiomeSnowLand extends GenBiome
|
||||
{
|
||||
public BiomeSnowLand()
|
||||
{
|
||||
super(BaseBiome.SNOWLAND);
|
||||
super(Biome.SNOWLAND);
|
||||
this.topBlock = Blocks.snow.getState();
|
||||
this.fillerBlock = Blocks.snow.getState();
|
||||
this.mushroomsPerChunk = -1;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockDirt;
|
||||
import common.init.Blocks;
|
||||
import common.rng.Random;
|
||||
|
@ -10,7 +10,7 @@ import server.world.WorldServer;
|
|||
import server.worldgen.FeatureGenerator;
|
||||
import server.worldgen.feature.WorldGenAsteroid;
|
||||
|
||||
public class BiomeSpace extends Biome
|
||||
public class BiomeSpace extends GenBiome
|
||||
{
|
||||
protected FeatureGenerator asteroidGen1 = new WorldGenAsteroid(Blocks.stone.getState(),
|
||||
Blocks.rock.getState());
|
||||
|
@ -19,7 +19,7 @@ public class BiomeSpace extends Biome
|
|||
|
||||
public BiomeSpace()
|
||||
{
|
||||
super(BaseBiome.SPACE);
|
||||
super(Biome.SPACE);
|
||||
this.topBlock = Blocks.air.getState();
|
||||
this.fillerBlock = Blocks.air.getState();
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.init.Blocks;
|
||||
import common.rng.WeightedList;
|
||||
|
||||
public class BiomeStoneBeach extends Biome
|
||||
public class BiomeStoneBeach extends GenBiome
|
||||
{
|
||||
public BiomeStoneBeach()
|
||||
{
|
||||
super(BaseBiome.STONEBEACH);
|
||||
super(Biome.STONEBEACH);
|
||||
// this.mobs.clear();
|
||||
this.topBlock = Blocks.stone.getState();
|
||||
this.fillerBlock = Blocks.stone.getState();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockDirectional;
|
||||
import common.block.BlockFlower;
|
||||
import common.entity.npc.EntitySlime;
|
||||
|
@ -13,11 +13,11 @@ import server.world.WorldServer;
|
|||
import server.worldgen.ChunkPrimer;
|
||||
import server.worldgen.tree.WorldGenTree;
|
||||
|
||||
public class BiomeSwamp extends Biome
|
||||
public class BiomeSwamp extends GenBiome
|
||||
{
|
||||
protected BiomeSwamp()
|
||||
{
|
||||
super(BaseBiome.SWAMPLAND);
|
||||
super(Biome.SWAMPLAND);
|
||||
this.treesPerChunk = 2;
|
||||
this.flowersPerChunk = 1;
|
||||
this.deadBushPerChunk = 1;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockDirt;
|
||||
import common.block.BlockDoublePlant;
|
||||
import common.block.BlockTallGrass;
|
||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenTaiga1;
|
|||
import server.worldgen.tree.WorldGenTaiga2;
|
||||
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 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 int field_150644_aH;
|
||||
|
||||
public BiomeTaiga(BaseBiome base, int p_i45385_2_)
|
||||
public BiomeTaiga(Biome base, int p_i45385_2_)
|
||||
{
|
||||
super(base);
|
||||
this.field_150644_aH = p_i45385_2_;
|
||||
|
@ -108,8 +108,8 @@ public class BiomeTaiga extends Biome
|
|||
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;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.BlockFlower;
|
||||
import common.entity.animal.EntityBat;
|
||||
import common.entity.animal.EntityMouse;
|
||||
|
@ -18,7 +18,7 @@ import server.worldgen.tree.WorldGenBaseTree;
|
|||
import server.worldgen.tree.WorldGenBigTree;
|
||||
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 mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
||||
|
@ -32,7 +32,7 @@ public class BiomeTian extends Biome
|
|||
|
||||
public BiomeTian()
|
||||
{
|
||||
super(BaseBiome.TIAN);
|
||||
super(Biome.TIAN);
|
||||
this.topBlock = Blocks.tian_soil.getState();
|
||||
this.fillerBlock = Blocks.tian.getState();
|
||||
this.mushroomsPerChunk = -1;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.entity.animal.EntitySquid;
|
||||
import common.rng.WeightedList;
|
||||
|
||||
public class BiomeWater extends Biome {
|
||||
public class BiomeWater extends GenBiome {
|
||||
private final boolean river;
|
||||
|
||||
public BiomeWater(BaseBiome base, boolean river) {
|
||||
public BiomeWater(Biome base, boolean river) {
|
||||
super(base);
|
||||
this.river = river;
|
||||
this.disableBeach();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.biome;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.biome.IBiome;
|
||||
import common.block.Block;
|
||||
import common.block.BlockColored;
|
||||
|
@ -61,70 +61,70 @@ import server.worldgen.tree.WorldGenSwamp;
|
|||
import server.worldgen.tree.WorldGenTaiga2;
|
||||
import server.worldgen.tree.WorldGenTree;
|
||||
|
||||
public abstract class Biome implements IBiome {
|
||||
public static final Biome[] BIOMES = new Biome[256];
|
||||
public abstract class GenBiome implements IBiome {
|
||||
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 Biome 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 Biome forest = (new BiomeForest(BaseBiome.FOREST, 0));
|
||||
public static final Biome taiga = (new BiomeTaiga(BaseBiome.TAIGA, 0)).setScaling(Scaling.PLAINS_MEDIUM);
|
||||
public static final Biome 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 plains = (new BiomePlains());
|
||||
public static final GenBiome desert = (new BiomeDesert(false)).setScaling(Scaling.PLAINS_LOW);
|
||||
public static final GenBiome extremeHills = (new BiomeHills(Biome.EXTREMEHILLS, false)).setScaling(Scaling.HILLS_LARGE);
|
||||
public static final GenBiome forest = (new BiomeForest(Biome.FOREST, 0));
|
||||
public static final GenBiome taiga = (new BiomeTaiga(Biome.TAIGA, 0)).setScaling(Scaling.PLAINS_MEDIUM);
|
||||
public static final GenBiome swampland = (new BiomeSwamp()).setScaling(Scaling.SEA_POND);
|
||||
public static final GenBiome river = (new BiomeWater(Biome.RIVER, true)).setScaling(Scaling.SEA_SHALLOW);
|
||||
|
||||
public static final Biome exterminated = (new BiomeExterminated());
|
||||
public static final Biome space = (new BiomeSpace());
|
||||
public static final GenBiome exterminated = (new BiomeExterminated());
|
||||
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 Biome frozenRiver = (new BiomeWater(BaseBiome.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 Biome iceMountains = (new BiomeSnow(BaseBiome.ICEMOUNTAINS, false)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
|
||||
public static final Biome mushroomPlains = (new BiomeMushroom()).setScaling(Scaling.PLAINS_VARYING);
|
||||
public static final Biome blackened = (new BiomeBlackened());
|
||||
public static final Biome beach = (new BiomeBeach(false)).setScaling(Scaling.SEA_SHORE);
|
||||
public static final Biome 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 Biome taigaHills = (new BiomeTaiga(BaseBiome.TAIGAHILLS, 0)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final Biome extremeHillsEdge = (new BiomeHills(BaseBiome.EXTREMEHILLSEDGE, true)).setScaling(Scaling.HILLS_MEDIUM);
|
||||
public static final Biome jungle = (new BiomeJungle(BaseBiome.JUNGLE, false));
|
||||
public static final Biome jungleHills = (new BiomeJungle(BaseBiome.JUNGLEHILLS, false)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final Biome jungleEdge = (new BiomeJungle(BaseBiome.JUNGLEEDGE, true));
|
||||
public static final Biome sea = (new BiomeWater(BaseBiome.SEA, false)).setScaling(Scaling.SEA_MEDIUM);
|
||||
public static final Biome stoneBeach = (new BiomeStoneBeach()).setScaling(Scaling.SEA_VARYING);
|
||||
public static final Biome coldBeach = (new BiomeBeach(true)).setScaling(Scaling.SEA_SHORE).enableColdBeach();
|
||||
public static final Biome birchForest = (new BiomeForest(BaseBiome.BIRCHFOREST, 2));
|
||||
public static final Biome birchForestHills = (new BiomeForest(BaseBiome.BIRCHFORESTHILLS, 2)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final Biome roofedForest = (new BiomeForest(BaseBiome.ROOFEDFOREST, 3));
|
||||
public static final Biome coldTaiga = (new BiomeTaiga(BaseBiome.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 Biome megaTaiga = (new BiomeTaiga(BaseBiome.MEGATAIGA, 1)).setScaling(Scaling.PLAINS_MEDIUM);
|
||||
public static final Biome megaTaigaHills = (new BiomeTaiga(BaseBiome.MEGATAIGAHILLS, 1)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final Biome extremeHillsPlus = (new BiomeHills(BaseBiome.EXTREMEHILLSPLUS, true)).setScaling(Scaling.HILLS_LARGE);
|
||||
public static final Biome savanna = (new BiomeSavanna(false)).setScaling(Scaling.PLAINS_LOW);
|
||||
public static final Biome savannaPlateau = (new BiomeSavanna(true)).setScaling(Scaling.HILLS_PLATEAU);
|
||||
public static final GenBiome frozenSea = (new BiomeWater(Biome.FROZENSEA, false)).enableColdBeach().setScaling(Scaling.SEA_MEDIUM);
|
||||
public static final GenBiome frozenRiver = (new BiomeWater(Biome.FROZENRIVER, true)).enableColdBeach().setScaling(Scaling.SEA_SHALLOW);
|
||||
public static final GenBiome icePlains = (new BiomeSnow(Biome.ICEPLAINS, false)).enableColdBeach().setScaling(Scaling.PLAINS_LOW);
|
||||
public static final GenBiome iceMountains = (new BiomeSnow(Biome.ICEMOUNTAINS, false)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome mushroomPlains = (new BiomeMushroom()).setScaling(Scaling.PLAINS_VARYING);
|
||||
public static final GenBiome blackened = (new BiomeBlackened());
|
||||
public static final GenBiome beach = (new BiomeBeach(false)).setScaling(Scaling.SEA_SHORE);
|
||||
public static final GenBiome desertHills = (new BiomeDesert(true)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome forestHills = (new BiomeForest(Biome.FORESTHILLS, 0)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome taigaHills = (new BiomeTaiga(Biome.TAIGAHILLS, 0)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome extremeHillsEdge = (new BiomeHills(Biome.EXTREMEHILLSEDGE, true)).setScaling(Scaling.HILLS_MEDIUM);
|
||||
public static final GenBiome jungle = (new BiomeJungle(Biome.JUNGLE, false));
|
||||
public static final GenBiome jungleHills = (new BiomeJungle(Biome.JUNGLEHILLS, false)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome jungleEdge = (new BiomeJungle(Biome.JUNGLEEDGE, true));
|
||||
public static final GenBiome sea = (new BiomeWater(Biome.SEA, false)).setScaling(Scaling.SEA_MEDIUM);
|
||||
public static final GenBiome stoneBeach = (new BiomeStoneBeach()).setScaling(Scaling.SEA_VARYING);
|
||||
public static final GenBiome coldBeach = (new BiomeBeach(true)).setScaling(Scaling.SEA_SHORE).enableColdBeach();
|
||||
public static final GenBiome birchForest = (new BiomeForest(Biome.BIRCHFOREST, 2));
|
||||
public static final GenBiome birchForestHills = (new BiomeForest(Biome.BIRCHFORESTHILLS, 2)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome roofedForest = (new BiomeForest(Biome.ROOFEDFOREST, 3));
|
||||
public static final GenBiome coldTaiga = (new BiomeTaiga(Biome.COLDTAIGA, 0)).enableColdBeach().setScaling(Scaling.PLAINS_MEDIUM);
|
||||
public static final GenBiome coldTaigaHills = (new BiomeTaiga(Biome.COLDTAIGAHILLS, 0)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome megaTaiga = (new BiomeTaiga(Biome.MEGATAIGA, 1)).setScaling(Scaling.PLAINS_MEDIUM);
|
||||
public static final GenBiome megaTaigaHills = (new BiomeTaiga(Biome.MEGATAIGAHILLS, 1)).setScaling(Scaling.HILLS_LOW);
|
||||
public static final GenBiome extremeHillsPlus = (new BiomeHills(Biome.EXTREMEHILLSPLUS, true)).setScaling(Scaling.HILLS_LARGE);
|
||||
public static final GenBiome savanna = (new BiomeSavanna(false)).setScaling(Scaling.PLAINS_LOW);
|
||||
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 Biome mesaPlateau_F = (new BiomeMesa(BaseBiome.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 mesa = (new BiomeMesa(Biome.MESA, false, false));
|
||||
public static final GenBiome mesaPlateau_F = (new BiomeMesa(Biome.MESAPLATEAUF, false, true)).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 Biome tian = (new BiomeTian()).setScaling(Scaling.VARYING_MEDIUM);
|
||||
public static final Biome elvenForest = (new BiomeForest(BaseBiome.ELVENFOREST, 4));
|
||||
public static final Biome upperHell = (new BiomeHell(BaseBiome.UPPERHELL, 0));
|
||||
public static final Biome lowerHell = (new BiomeHell(BaseBiome.LOWERHELL, 1));
|
||||
public static final Biome hellHills = (new BiomeHell(BaseBiome.HELLHILLS, 1)).setScaling(Scaling.HILLS_LARGE);
|
||||
public static final Biome soulPlains = (new BiomeHell(BaseBiome.SOULPLAINS, 1)).setScaling(Scaling.SEA_POND);
|
||||
public static final Biome ashLand = (new BiomeHell(BaseBiome.ASHLAND, 2)).setScaling(Scaling.PLAINS_LOW);
|
||||
public static final Biome moon = (new BiomeMoon()).setScaling(Scaling.PLAINS_LOW);
|
||||
public static final Biome chaos = (new BiomeChaos()).setScaling(Scaling.VARYING_CHAOTIC);
|
||||
public static final GenBiome snowLand = (new BiomeSnowLand()).enableColdBeach();
|
||||
public static final GenBiome tian = (new BiomeTian()).setScaling(Scaling.VARYING_MEDIUM);
|
||||
public static final GenBiome elvenForest = (new BiomeForest(Biome.ELVENFOREST, 4));
|
||||
public static final GenBiome upperHell = (new BiomeHell(Biome.UPPERHELL, 0));
|
||||
public static final GenBiome lowerHell = (new BiomeHell(Biome.LOWERHELL, 1));
|
||||
public static final GenBiome hellHills = (new BiomeHell(Biome.HELLHILLS, 1)).setScaling(Scaling.HILLS_LARGE);
|
||||
public static final GenBiome soulPlains = (new BiomeHell(Biome.SOULPLAINS, 1)).setScaling(Scaling.SEA_POND);
|
||||
public static final GenBiome ashLand = (new BiomeHell(Biome.ASHLAND, 2)).setScaling(Scaling.PLAINS_LOW);
|
||||
public static final GenBiome moon = (new BiomeMoon()).setScaling(Scaling.PLAINS_LOW);
|
||||
public static final GenBiome chaos = (new BiomeChaos()).setScaling(Scaling.VARYING_CHAOTIC);
|
||||
|
||||
protected static final PerlinGen TREE_NOISE;
|
||||
protected static final PerlinGen GRASS_NOISE;
|
||||
protected static final FeatureDoublePlant DOUBLE_PLANT_GEN;
|
||||
protected static final PerlinGen TREE_NOISE = new PerlinGen(new Random(726528729282625L), 8);
|
||||
protected static final PerlinGen GRASS_NOISE = new PerlinGen(new Random(297363826225L), 1);
|
||||
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 WorldGenBaseTree worldGeneratorTrees = new WorldGenBaseTree(false);
|
||||
|
@ -165,7 +165,7 @@ public abstract class Biome implements IBiome {
|
|||
protected int clayExtPerChunk = 0; // 10
|
||||
protected int bigMushroomsPerChunk = 0;
|
||||
|
||||
public static Biome getBiome(int id)
|
||||
public static GenBiome getBiome(int id)
|
||||
{
|
||||
if (id >= 0 && id < BIOMES.length)
|
||||
{
|
||||
|
@ -173,20 +173,43 @@ public abstract class Biome implements IBiome {
|
|||
}
|
||||
else
|
||||
{
|
||||
Log.JNI.warn("Biom-ID ist nicht im Bereich: " + id + ", verwende " + BaseBiome.DEF_BIOME.id + " (" + BaseBiome.DEF_BIOME.name + ")");
|
||||
return BIOMES[BaseBiome.DEF_BIOME.id];
|
||||
Log.JNI.warn("Biom-ID ist nicht im Bereich: " + id + ", verwende " + Biome.DEF_BIOME.id + " (" + Biome.DEF_BIOME.name + ")");
|
||||
return BIOMES[Biome.DEF_BIOME.id];
|
||||
}
|
||||
}
|
||||
|
||||
public static void setAsProvider() {
|
||||
IBiome.setProvider(new IBiome.BiomeProvider() {
|
||||
public final IBiome getBiome(BaseBiome base) {
|
||||
public final IBiome getBiome(Biome base) {
|
||||
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;
|
||||
this.base = base;
|
||||
this.addMobs(this.mobs);
|
||||
|
@ -210,12 +233,12 @@ public abstract class Biome implements IBiome {
|
|||
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);
|
||||
}
|
||||
|
||||
protected final Biome setScaling(float depth, float scale)
|
||||
protected final GenBiome setScaling(float depth, float scale)
|
||||
{
|
||||
this.depth = depth;
|
||||
this.scale = scale;
|
||||
|
@ -252,13 +275,13 @@ public abstract class Biome implements IBiome {
|
|||
return this.topBlock;
|
||||
}
|
||||
|
||||
protected Biome enableColdBeach()
|
||||
protected GenBiome enableColdBeach()
|
||||
{
|
||||
this.allowColdBeach = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
protected Biome disableBeach()
|
||||
protected GenBiome disableBeach()
|
||||
{
|
||||
this.disallowBeach = true;
|
||||
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);
|
||||
}
|
||||
|
||||
public Class <? extends Biome > getBiomeClass()
|
||||
public Class <? extends GenBiome > getBiomeClass()
|
||||
{
|
||||
return this.getClass();
|
||||
}
|
||||
|
||||
public boolean isEqualTo(Biome biome)
|
||||
public boolean isEqualTo(GenBiome biome)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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.InflaterInputStream;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.BlockCactus;
|
||||
import common.block.BlockCarpet;
|
||||
|
@ -916,7 +916,7 @@ public abstract class Converter {
|
|||
}
|
||||
tag.setTag("Sections", sections);
|
||||
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);
|
||||
}
|
||||
NBTTagList ents = tag.getTagList("Entities", 10);
|
||||
|
|
|
@ -16,7 +16,7 @@ import common.util.ChunkPos;
|
|||
import common.util.ExtMath;
|
||||
import common.world.Chunk;
|
||||
import common.world.World;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.biome.RngSpawn;
|
||||
|
||||
public abstract class Spawner {
|
||||
|
@ -162,7 +162,7 @@ public abstract class Spawner {
|
|||
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;
|
||||
while(rand.floatv() < biome.getMobGenChance()) {
|
||||
if(iters++ == 10)
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.TreeSet;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.BlockDoor;
|
||||
import common.block.BlockEventData;
|
||||
|
@ -85,7 +85,7 @@ import common.worldgen.FeatureLake;
|
|||
import common.worldgen.FeatureLiquid;
|
||||
import common.worldgen.FeatureOre;
|
||||
import server.Server;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.biome.RngSpawn;
|
||||
import server.clipboard.ClipboardBlock;
|
||||
import server.network.Player;
|
||||
|
@ -146,7 +146,7 @@ public final class WorldServer extends AWorldServer {
|
|||
private final IntHashMap<EntityTrackerEntry> trackMap = new IntHashMap();
|
||||
private final Map<String, WorldSavedData> dataMap = Maps.<String, WorldSavedData>newHashMap();
|
||||
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 MapGenBigCaves bigCaveGen;
|
||||
|
@ -193,11 +193,11 @@ public final class WorldServer extends AWorldServer {
|
|||
|
||||
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(),
|
||||
this.dimension.getSnowRarity(), this.dimension.getSeaRarity(), this.dimension.getAddBiomes() == null ? new BaseBiome[0] : this.dimension.getAddBiomes(), this.dimension.getAddRarity(),
|
||||
this.dimension.getHotBiomes() == null ? new BaseBiome[] {this.dimension.getDefaultBiome()} : this.dimension.getHotBiomes(),
|
||||
this.dimension.getMediumBiomes() == null ? new BaseBiome[] {this.dimension.getDefaultBiome()} : this.dimension.getMediumBiomes(),
|
||||
this.dimension.getColdBiomes() == null ? new BaseBiome[] {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.getSnowRarity(), this.dimension.getSeaRarity(), this.dimension.getAddBiomes() == null ? new Biome[0] : this.dimension.getAddBiomes(), this.dimension.getAddRarity(),
|
||||
this.dimension.getHotBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getHotBiomes(),
|
||||
this.dimension.getMediumBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getMediumBiomes(),
|
||||
this.dimension.getColdBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getColdBiomes(),
|
||||
this.dimension.getFrostBiomes() == null ? new Biome[] {this.dimension.getDefaultBiome()} : this.dimension.getFrostBiomes()) : new BiomeGenSingle(this.dimension.getDefaultBiome());
|
||||
}
|
||||
|
||||
private ChunkGenerator createChunkGenerator(Random rand) {
|
||||
|
@ -334,7 +334,7 @@ public final class WorldServer extends AWorldServer {
|
|||
// GeneratorSettings settings = !debug && !this.exterminated ? dim.getSettings() : null;
|
||||
if(debug) {
|
||||
this.liquid = Blocks.air.getState();
|
||||
this.biomeGen = new BiomeGenSingle(BaseBiome.NONE);
|
||||
this.biomeGen = new BiomeGenSingle(Biome.NONE);
|
||||
this.generator = new GeneratorDebug();
|
||||
this.replacer = null;
|
||||
this.populate = false;
|
||||
|
@ -596,13 +596,13 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
|
||||
private WeightedList<RngSpawn> getSpawnTypes(BlockPos pos) {
|
||||
BaseBiome biome = this.getBiomeGenForCoords(pos);
|
||||
Biome biome = this.getBiomeGenForCoords(pos);
|
||||
if(this.bridgeGen != null && (this.bridgeGen.isPresent(pos)
|
||||
|| (this.bridgeGen.isPositionInStructure(this, pos) && this.getState(pos.down()).getBlock() == Blocks.blood_brick)))
|
||||
return MobConstants.FORTRESS_MOBS;
|
||||
else if(this.scatteredGen != null && this.scatteredGen.hasMageHut(pos))
|
||||
return MobConstants.MAGEHUT_MOBS;
|
||||
return Biome.BIOMES[biome.id].getMobs();
|
||||
return GenBiome.BIOMES[biome.id].getMobs();
|
||||
}
|
||||
|
||||
public RngSpawn getSpawnListEntryForTypeAt(BlockPos pos) {
|
||||
|
@ -623,11 +623,11 @@ public final class WorldServer extends AWorldServer {
|
|||
return this.biomeGen;
|
||||
}
|
||||
|
||||
public BaseBiome getBiomeGenForCoords(final BlockPos pos) {
|
||||
public Biome getBiomeGenForCoords(final BlockPos pos) {
|
||||
if(this.isBlockLoaded(pos))
|
||||
return this.getChunk(pos).getBiome(pos, this.biomeGen);
|
||||
else
|
||||
return this.biomeGen.getBiomeGenerator(pos, BaseBiome.DEF_BIOME);
|
||||
return this.biomeGen.getBiomeGenerator(pos, Biome.DEF_BIOME);
|
||||
}
|
||||
|
||||
public void setItemData(String dataID, WorldSavedData worldSavedDataIn) {
|
||||
|
@ -1537,7 +1537,7 @@ public final class WorldServer extends AWorldServer {
|
|||
int bx = x * 16;
|
||||
int bz = z * 16;
|
||||
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);
|
||||
long sx = 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.bridgeGen = null;
|
||||
this.generator = new GeneratorDestroyed(this.dimension.getSeaLevel());
|
||||
this.biomeGen = new BiomeGenSingle(BaseBiome.EXTERMINATED);
|
||||
this.biomeGen = new BiomeGenSingle(Biome.EXTERMINATED);
|
||||
this.replacer = null;
|
||||
this.populate = false;
|
||||
this.liquid = Blocks.air.getState();
|
||||
|
@ -2245,7 +2245,7 @@ public final class WorldServer extends AWorldServer {
|
|||
// 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);
|
||||
if((chunk != null) && (chunk.isLoaded())) {
|
||||
chunk.getBiomes()[((position.getZ() & 0xF) << 4 | position.getX() & 0xF)] = (byte)biome.id;
|
||||
|
@ -2254,7 +2254,7 @@ public final class WorldServer extends AWorldServer {
|
|||
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();
|
||||
for(int x = start.getX(); x <= end.getX(); x++) {
|
||||
for(int z = start.getZ(); z <= end.getZ(); z++) {
|
||||
|
@ -2299,7 +2299,7 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
|
||||
public boolean isBlockinHighHumidity(BlockPos pos) {
|
||||
BaseBiome biomegenbase = this.getBiomeGenForCoords(pos);
|
||||
Biome biomegenbase = this.getBiomeGenForCoords(pos);
|
||||
return biomegenbase.isHighHumidity();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package server.worldgen;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.collect.Lists;
|
||||
import common.util.BlockPos;
|
||||
import common.util.LongHashMap;
|
||||
|
@ -33,7 +33,7 @@ public class BiomeGenLayered implements BiomeGenerator {
|
|||
private class CacheBlock
|
||||
{
|
||||
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 zPosition;
|
||||
public long lastAccessTime;
|
||||
|
@ -46,7 +46,7 @@ public class BiomeGenLayered implements BiomeGenerator {
|
|||
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];
|
||||
}
|
||||
|
@ -67,8 +67,8 @@ public class BiomeGenLayered implements BiomeGenerator {
|
|||
// this();
|
||||
// }
|
||||
|
||||
public BiomeGenLayered(long seed, BaseBiome def, boolean fixed, int biomeSize, int riverSize, int snowRarity, int seaRarity,
|
||||
BaseBiome[] add, int addRarity, BaseBiome[] hot, BaseBiome[] medium, BaseBiome[] cold, BaseBiome[] frost) {
|
||||
public BiomeGenLayered(long seed, Biome def, boolean fixed, int biomeSize, int riverSize, int snowRarity, int seaRarity,
|
||||
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 layer0t1 = new GenLayerBase(1L);
|
||||
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 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;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ public class BiomeGenLayered implements BiomeGenerator {
|
|||
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -192,43 +192,43 @@ public class BiomeGenLayered implements BiomeGenerator {
|
|||
int[] aint = this.biomeIndexLayer.getInts(xPos, zPos, sizeX, sizeZ);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
int[] aint = this.genBiomes.getInts(x, z, width, height);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
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);
|
||||
}
|
||||
else {
|
||||
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
|
||||
|
||||
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();
|
||||
int i = x - 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);
|
||||
|
||||
for(int k1 = 0; k1 < i1 * j1; ++k1) {
|
||||
BaseBiome biome = BaseBiome.getBiome(aint[k1]);
|
||||
Biome biome = Biome.getBiome(aint[k1]);
|
||||
|
||||
if(!allowed.contains(biome)) {
|
||||
return false;
|
||||
|
|
|
@ -3,30 +3,30 @@ package server.worldgen;
|
|||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.util.BlockPos;
|
||||
import common.worldgen.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;
|
||||
}
|
||||
|
||||
public BaseBiome getBiomeGenerator(BlockPos pos, BaseBiome def) {
|
||||
public Biome getBiomeGenerator(BlockPos pos, Biome def) {
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class BiomeGenSingle implements BiomeGenerator {
|
|||
// : 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package server.worldgen;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.rng.Random;
|
||||
import server.world.WorldServer;
|
||||
|
||||
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.world.LightType;
|
||||
import common.world.State;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.world.WorldServer;
|
||||
|
||||
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)
|
||||
{
|
||||
Biome biomegenbase = Biome.BIOMES[worldIn.getBiomeGenForCoords(blockpos).id];
|
||||
GenBiome biomegenbase = GenBiome.BIOMES[worldIn.getBiomeGenForCoords(blockpos).id];
|
||||
|
||||
if (biomegenbase.topBlock.getBlock() == Blocks.mycelium)
|
||||
{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package server.worldgen;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.dimension.Dimension;
|
||||
import common.rng.NoiseGen;
|
||||
import common.rng.OctaveGen;
|
||||
import common.rng.Random;
|
||||
import common.util.ExtMath;
|
||||
import common.world.State;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.world.WorldServer;
|
||||
|
||||
public class GeneratorPerlin implements ChunkGenerator
|
||||
|
@ -52,7 +52,7 @@ public class GeneratorPerlin implements ChunkGenerator
|
|||
private final double[] lowerNoise = new double[825];
|
||||
private final double[] upperNoise = new double[825];
|
||||
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)
|
||||
// {
|
||||
|
@ -197,13 +197,13 @@ public class GeneratorPerlin implements ChunkGenerator
|
|||
float min = 0.0F;
|
||||
float sum = 0.0F;
|
||||
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 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 bmax = this.biomeScaleOffset + biome2.scale * this.biomeScaleWeight;
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package server.worldgen;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.init.Blocks;
|
||||
import common.rng.NoiseGen;
|
||||
import common.rng.OctaveGen;
|
||||
import common.rng.Random;
|
||||
import common.world.State;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.world.WorldServer;
|
||||
|
||||
public class ReplacerAltBiome implements BlockReplacer
|
||||
|
@ -47,7 +47,7 @@ public class ReplacerAltBiome implements BlockReplacer
|
|||
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();
|
||||
double scale = 0.03125D;
|
||||
|
@ -58,7 +58,7 @@ public class ReplacerAltBiome implements BlockReplacer
|
|||
{
|
||||
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 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);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.worldgen;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.material.Material;
|
||||
import common.rng.OctaveGen;
|
||||
|
@ -38,7 +38,7 @@ public class ReplacerAltSurface implements BlockReplacer
|
|||
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;
|
||||
double d0 = 0.03125D;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package server.worldgen;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.rng.PerlinGen;
|
||||
import common.rng.Random;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.world.WorldServer;
|
||||
|
||||
public class ReplacerBiome implements BlockReplacer
|
||||
|
@ -16,7 +16,7 @@ public class ReplacerBiome implements BlockReplacer
|
|||
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;
|
||||
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)
|
||||
{
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.worldgen;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.init.Blocks;
|
||||
import common.material.Material;
|
||||
|
@ -22,7 +22,7 @@ public class ReplacerTopLayer implements BlockReplacer
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ import common.rng.Random;
|
|||
import common.util.BlockPos;
|
||||
import common.util.ExtMath;
|
||||
import common.world.State;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.world.WorldServer;
|
||||
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)
|
||||
{
|
||||
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.ExtMath;
|
||||
import common.world.State;
|
||||
import server.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.world.WorldServer;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import server.biome.Biome;
|
||||
import common.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
|
||||
public abstract class GenLayer {
|
||||
private long worldGenSeed;
|
||||
|
@ -14,8 +14,8 @@ public abstract class GenLayer {
|
|||
return true;
|
||||
}
|
||||
else { // if(id1 != Biome.mesaPlateau_F.id && id1 != Biome.mesaPlateau.id) {
|
||||
final Biome biome1 = Biome.getBiome(id1);
|
||||
final Biome biome2 = Biome.getBiome(id2);
|
||||
final GenBiome biome1 = GenBiome.getBiome(id1);
|
||||
final GenBiome biome2 = GenBiome.getBiome(id2);
|
||||
return biome1 != null && biome2 != null ? biome1.isEqualTo(biome2) : false;
|
||||
}
|
||||
// else {
|
||||
|
@ -24,7 +24,7 @@ public abstract class GenLayer {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
|
||||
public class GenLayerAddExtra extends GenLayer
|
||||
{
|
||||
private final int[] biomes;
|
||||
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);
|
||||
this.parent = parent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
|
||||
public class GenLayerAddSea extends GenLayer
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ public class GenLayerAddSea extends GenLayer
|
|||
this.initChunkSeed((long)(areaX + j1), (long)(areaY + i1));
|
||||
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
|
||||
{
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
|
||||
public class GenLayerBiome extends GenLayer
|
||||
{
|
||||
private final BaseBiome[] hot;
|
||||
private final BaseBiome[] medium;
|
||||
private final BaseBiome[] cold;
|
||||
private final BaseBiome[] frost;
|
||||
private final Biome[] hot;
|
||||
private final Biome[] medium;
|
||||
private final Biome[] cold;
|
||||
private final Biome[] frost;
|
||||
private final int def;
|
||||
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);
|
||||
this.parent = parent;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import server.biome.Biome;
|
||||
import common.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.biome.Temperature;
|
||||
|
||||
public class GenLayerBiomeEdge extends GenLayer
|
||||
|
@ -28,45 +28,45 @@ public class GenLayerBiomeEdge extends GenLayer
|
|||
this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
|
||||
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 i2 = 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)];
|
||||
|
||||
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;
|
||||
}
|
||||
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 i1 = 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)];
|
||||
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
aint1[j + i * areaWidth] = BaseBiome.JUNGLEEDGE.id;
|
||||
aint1[j + i * areaWidth] = Biome.JUNGLEEDGE.id;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aint1[j + i * areaWidth] = BaseBiome.PLAINS.id;
|
||||
aint1[j + i * areaWidth] = Biome.PLAINS.id;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -150,8 +150,8 @@ public class GenLayerBiomeEdge extends GenLayer
|
|||
}
|
||||
else
|
||||
{
|
||||
Biome biomegenbase = Biome.getBiome(p_151634_1_);
|
||||
Biome biomegenbase1 = Biome.getBiome(p_151634_2_);
|
||||
GenBiome biomegenbase = GenBiome.getBiome(p_151634_1_);
|
||||
GenBiome biomegenbase1 = GenBiome.getBiome(p_151634_2_);
|
||||
|
||||
if (biomegenbase != null && biomegenbase1 != null)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.log.Log;
|
||||
|
||||
public class GenLayerHills extends GenLayer
|
||||
|
@ -8,7 +8,7 @@ public class GenLayerHills extends GenLayer
|
|||
private GenLayer field_151628_d;
|
||||
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_);
|
||||
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 (BaseBiome.getBiome(k + 128) != null)
|
||||
if (Biome.getBiome(k + 128) != null)
|
||||
{
|
||||
aint2[j + i * areaWidth] = k + 128;
|
||||
}
|
||||
|
@ -59,86 +59,86 @@ public class GenLayerHills extends GenLayer
|
|||
{
|
||||
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)
|
||||
{
|
||||
i1 = BaseBiome.FORESTHILLS.id;
|
||||
i1 = Biome.FORESTHILLS.id;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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))
|
||||
// {
|
||||
// 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);
|
||||
|
||||
if (j1 == 0)
|
||||
{
|
||||
i1 = BaseBiome.PLAINS.id;
|
||||
i1 = Biome.PLAINS.id;
|
||||
}
|
||||
else
|
||||
{
|
||||
i1 = BaseBiome.FOREST.id;
|
||||
i1 = Biome.FOREST.id;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag && i1 != k)
|
||||
{
|
||||
if (BaseBiome.getBiome(i1 + 128) != null)
|
||||
if (Biome.getBiome(i1 + 128) != null)
|
||||
{
|
||||
i1 += 128;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
|
||||
public class GenLayerRiver extends GenLayer
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ public class GenLayerRiver extends GenLayer
|
|||
}
|
||||
else
|
||||
{
|
||||
aint1[j1 + i1 * areaWidth] = BaseBiome.RIVER.id;
|
||||
aint1[j1 + i1 * areaWidth] = Biome.RIVER.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
|
||||
public class GenLayerRiverMix extends GenLayer
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ public class GenLayerRiverMix extends GenLayer
|
|||
private GenLayer riverPatternGeneratorChain;
|
||||
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_);
|
||||
this.biomePatternGeneratorChain = p_i2129_3_;
|
||||
|
@ -39,23 +39,23 @@ public class GenLayerRiverMix extends GenLayer
|
|||
|
||||
for (int i = 0; i < areaWidth * areaHeight; ++i)
|
||||
{
|
||||
if(biome[i] == BaseBiome.NONE.id)
|
||||
if(biome[i] == Biome.NONE.id)
|
||||
{
|
||||
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];
|
||||
}
|
||||
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)
|
||||
{
|
||||
out[i] = BaseBiome.RIVER.id;
|
||||
out[i] = Biome.RIVER.id;
|
||||
}
|
||||
// else
|
||||
// {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package server.worldgen.layer;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import server.biome.Biome;
|
||||
import common.biome.Biome;
|
||||
import server.biome.GenBiome;
|
||||
import server.biome.BiomeJungle;
|
||||
|
||||
public class GenLayerShore extends GenLayer
|
||||
|
@ -23,7 +23,7 @@ public class GenLayerShore extends GenLayer
|
|||
{
|
||||
this.initChunkSeed((long)(j + x), (long)(i + z));
|
||||
int id = pre[j + 1 + (i + 1) * (width + 2)];
|
||||
Biome biome = Biome.getBiome(id);
|
||||
GenBiome biome = GenBiome.getBiome(id);
|
||||
|
||||
// if (id == Biome.mushroomPlains.id)
|
||||
// {
|
||||
|
@ -57,19 +57,19 @@ public class GenLayerShore extends GenLayer
|
|||
}
|
||||
else
|
||||
{
|
||||
data[j + i * width] = BaseBiome.BEACH.id;
|
||||
data[j + i * width] = Biome.BEACH.id;
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
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)
|
||||
// {
|
||||
|
@ -86,7 +86,7 @@ public class GenLayerShore extends GenLayer
|
|||
}
|
||||
else
|
||||
{
|
||||
data[j + i * width] = BaseBiome.BEACH.id;
|
||||
data[j + i * width] = Biome.BEACH.id;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -120,7 +120,7 @@ public class GenLayerShore extends GenLayer
|
|||
}
|
||||
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)
|
||||
{
|
||||
Biome biome = Biome.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);
|
||||
GenBiome biome = GenBiome.getBiome(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)
|
||||
|
|
|
@ -3,14 +3,14 @@ package server.worldgen.structure;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import server.world.WorldServer;
|
||||
|
||||
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 MIN_DISTANCE = 8;
|
||||
|
||||
|
@ -44,14 +44,14 @@ public class MapGenScatteredFeature extends MapGenStructure
|
|||
|
||||
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)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (BaseBiome biomegenbase1 : biomelist)
|
||||
for (Biome biomegenbase1 : biomelist)
|
||||
{
|
||||
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_)
|
||||
{
|
||||
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);
|
||||
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);
|
||||
this.components.add(componentscatteredfeaturepieces$desertpyramid);
|
||||
|
|
|
@ -3,7 +3,7 @@ package server.worldgen.structure;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.collect.Sets;
|
||||
import common.nbt.NBTTagCompound;
|
||||
import common.rng.Random;
|
||||
|
@ -11,7 +11,7 @@ import server.world.WorldServer;
|
|||
|
||||
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 */
|
||||
private int terrainType;
|
||||
|
|
|
@ -3,7 +3,7 @@ package server.worldgen.structure;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import common.biome.BaseBiome;
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.BlockLog;
|
||||
import common.block.BlockSandStone;
|
||||
|
@ -1430,8 +1430,8 @@ public class StructureVillage
|
|||
this.biomeGen = genIn;
|
||||
this.structureVillageWeightedPieceList = p_i2104_6_;
|
||||
this.terrainType = p_i2104_7_;
|
||||
BaseBiome biomegenbase = genIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), BaseBiome.DEF_BIOME);
|
||||
this.inDesert = biomegenbase == BaseBiome.DESERT || biomegenbase == BaseBiome.DESERTHILLS;
|
||||
Biome biomegenbase = genIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), Biome.DEF_BIOME);
|
||||
this.inDesert = biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERTHILLS;
|
||||
this.func_175846_a(this.inDesert);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue