remove block tinting

This commit is contained in:
Sen 2025-07-21 19:54:21 +02:00
parent 189d6883b9
commit 0525ba5d56
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
241 changed files with 1162 additions and 1650 deletions

View file

@ -96,7 +96,6 @@ import common.util.Var;
import common.util.WorldPos;
import common.vars.Vars;
import common.world.World;
import server.biome.GenBiome;
import server.clipboard.ReorderRegistry;
import server.clipboard.RotationRegistry;
import server.command.CommandEnvironment;
@ -109,6 +108,7 @@ import server.vars.SVar;
import server.vars.SVars;
import server.world.Region;
import server.world.WorldServer;
import server.worldgen.biome.GenBiome;
public final class Server implements IThreadListener, Executor {
private final Thread thread = Thread.currentThread();

View file

@ -8,6 +8,7 @@ import common.block.artificial.BlockBed;
import common.block.artificial.BlockCarpet;
import common.block.artificial.BlockDoor;
import common.block.artificial.BlockFlowerPot;
import common.block.artificial.BlockPortal;
import common.block.foliage.BlockDoublePlant;
import common.block.foliage.BlockFlower;
import common.block.tech.BlockAnvil;
@ -74,9 +75,12 @@ public abstract class ReorderRegistry {
// PLACE_LAST.add(Blocks.lit_t);
PLACE_LAST.add(Blocks.stone_button);
PLACE_LAST.add(Blocks.snow_layer);
PLACE_LAST.add(Blocks.portal);
for(BlockPortal portal : BlockPortal.PORTALS) {
PLACE_LAST.add(portal);
}
PLACE_LAST.add(Blocks.trapdoor);
PLACE_LAST.add(Blocks.vine);
PLACE_LAST.add(Blocks.swamp_vine);
PLACE_LAST.add(Blocks.waterlily);
PLACE_LAST.add(Blocks.soul_warts);
PLACE_LAST.add(Blocks.piston);

View file

@ -14,9 +14,9 @@ import common.util.BlockPos;
import common.util.ChunkPos;
import common.util.ExtMath;
import common.world.World;
import server.biome.GenBiome;
import server.biome.RngSpawn;
import server.vars.SVars;
import server.worldgen.biome.GenBiome;
import server.worldgen.biome.RngSpawn;
public abstract class Spawner {
private static final int MOB_COUNT_DIV = (int)Math.pow(17.0D, 2.0D);

View file

@ -76,8 +76,6 @@ import common.world.State;
import common.world.Weather;
import common.world.World;
import server.Server;
import server.biome.GenBiome;
import server.biome.RngSpawn;
import server.clipboard.ClipboardBlock;
import server.init.TeleportRegistry;
import server.network.Player;
@ -105,6 +103,8 @@ import server.worldgen.ReplacerAltBiome;
import server.worldgen.ReplacerAltSurface;
import server.worldgen.ReplacerBiome;
import server.worldgen.ReplacerTopLayer;
import server.worldgen.biome.GenBiome;
import server.worldgen.biome.RngSpawn;
import server.worldgen.caves.MapGenBigCaves;
import server.worldgen.caves.MapGenCaves;
import server.worldgen.caves.MapGenRavine;
@ -2111,11 +2111,6 @@ public final class WorldServer extends AWorldServer {
this.subtract = newSkylightSubtracted;
}
public boolean isBlockinHighHumidity(BlockPos pos) {
Biome biomegenbase = this.getBiomeGenForCoords(pos);
return biomegenbase.isHighHumidity();
}
public boolean canStrikeAt(BlockPos strikePosition) {
if(!this.canSeeSky(strikePosition)) {
return false;

View file

@ -7,8 +7,8 @@ import common.rng.Random;
import common.util.BlockPos;
import common.world.LightType;
import common.world.State;
import server.biome.GenBiome;
import server.world.WorldServer;
import server.worldgen.biome.GenBiome;
public class FeatureLakes
{

View file

@ -7,8 +7,8 @@ import common.rng.OctaveGen;
import common.rng.Random;
import common.util.ExtMath;
import common.world.State;
import server.biome.GenBiome;
import server.world.WorldServer;
import server.worldgen.biome.GenBiome;
public class GeneratorPerlin implements ChunkGenerator
{

View file

@ -5,7 +5,7 @@ import common.entity.npc.EntityMage;
import common.entity.npc.EntityTiefling;
import common.entity.npc.EntityUndead;
import common.rng.WeightedList;
import server.biome.RngSpawn;
import server.worldgen.biome.RngSpawn;
public abstract class MobConstants {
public static final WeightedList<RngSpawn> MAGEHUT_MOBS = new WeightedList<RngSpawn>(new RngSpawn(EntityMage.class, 1, 1, 1));

View file

@ -7,8 +7,8 @@ import common.rng.NoiseGen;
import common.rng.OctaveGen;
import common.rng.Random;
import common.world.State;
import server.biome.GenBiome;
import server.world.WorldServer;
import server.worldgen.biome.GenBiome;
public class ReplacerAltBiome implements BlockReplacer
{

View file

@ -3,8 +3,8 @@ package server.worldgen;
import common.biome.Biome;
import common.rng.PerlinGen;
import common.rng.Random;
import server.biome.GenBiome;
import server.world.WorldServer;
import server.worldgen.biome.GenBiome;
public class ReplacerBiome implements BlockReplacer
{

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;
@ -8,7 +8,7 @@ public class BiomeBeach extends GenBiome
{
public BiomeBeach(boolean cold)
{
super(cold ? Biome.COLDBEACH : Biome.BEACH);
super(cold ? Biome.ICE_BEACH : Biome.BEACH);
this.topBlock = Blocks.sand.getState();
this.fillerBlock = Blocks.sand.getState();
this.treesPerChunk = -999;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.block.foliage.BlockFlower;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.Entity;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;
@ -12,7 +12,7 @@ public class BiomeDesert extends GenBiome
{
public BiomeDesert(boolean hills)
{
super(hills ? Biome.DESERTHILLS : Biome.DESERT);
super(hills ? Biome.DESERT_HILLS : Biome.DESERT);
this.topBlock = Blocks.sand.getState();
this.fillerBlock = Blocks.sand.getState();
this.treesPerChunk = -999;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.block.foliage.BlockDoublePlant;
@ -210,7 +210,7 @@ public class BiomeForest extends GenBiome
}
else
{
return this.base != Biome.BIRCHFOREST && this.base != Biome.BIRCHFORESTHILLS ? new BiomeMutated(base, this)
return this.base != Biome.BIRCH_FOREST && this.base != Biome.BIRCH_HILLS ? new BiomeMutated(base, this)
{
public void decorate(WorldServer worldIn, Random rand, BlockPos pos)
{

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.npc.EntityBloodElf;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.animal.EntityChicken;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import java.util.Arrays;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.npc.EntityDwarf;
@ -7,7 +7,7 @@ import common.rng.WeightedList;
public class BiomeMushroom extends GenBiome {
public BiomeMushroom() {
super(Biome.MUSHROOMPLAINS);
super(Biome.MUSHROOM);
this.treesPerChunk = -100;
this.flowersPerChunk = -100;
this.grassPerChunk = -100;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.rng.Random;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.block.foliage.BlockFlower;
@ -23,7 +23,7 @@ public class BiomePlains extends GenBiome
protected BiomePlains()
{
super(Biome.PLAINS);
super(Biome.PLAIN);
this.setScaling(Scaling.PLAINS_LOW);
this.mobs.add(new RngSpawn(EntityHorse.class, 5, 2, 6));
this.treesPerChunk = -999;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.animal.EntityHorse;
@ -16,7 +16,7 @@ public class BiomeSavanna extends GenBiome
protected BiomeSavanna(boolean plateau)
{
super(plateau ? Biome.SAVANNAPLATEAU : Biome.SAVANNA);
super(plateau ? Biome.SAVANNA_PLATEAU : Biome.SAVANNA);
this.mobs.add(new RngSpawn(EntityHorse.class, 1, 2, 6));
this.treesPerChunk = 1;
this.flowersPerChunk = 4;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.animal.EntitySheep;
@ -10,7 +10,7 @@ public class BiomeSnowLand extends GenBiome
{
public BiomeSnowLand()
{
super(Biome.SNOWLAND);
super(Biome.SNOW);
this.topBlock = Blocks.snow.getState();
this.fillerBlock = Blocks.snow.getState();
this.mushroomsPerChunk = -1;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.init.Blocks;
@ -8,7 +8,7 @@ public class BiomeStoneBeach extends GenBiome
{
public BiomeStoneBeach()
{
super(Biome.STONEBEACH);
super(Biome.STONE_BEACH);
// this.mobs.clear();
this.topBlock = Blocks.stone.getState();
this.fillerBlock = Blocks.stone.getState();

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.block.foliage.BlockFlower;
@ -10,13 +10,19 @@ import common.util.BlockPos;
import common.util.Facing;
import server.world.WorldServer;
import server.worldgen.ChunkPrimer;
import server.worldgen.FeatureGenerator;
import server.worldgen.foliage.WorldGenTallGrass;
import server.worldgen.tree.WorldGenSwamp;
import server.worldgen.tree.WorldGenTree;
public class BiomeSwamp extends GenBiome
{
protected final WorldGenSwamp worldGeneratorSwamp = new WorldGenSwamp();
protected BiomeSwamp()
{
super(Biome.SWAMPLAND);
super(Biome.SWAMP);
this.topBlock = Blocks.swamp.getState();
this.treesPerChunk = 2;
this.flowersPerChunk = 1;
this.deadBushPerChunk = 1;
@ -40,9 +46,15 @@ public class BiomeSwamp extends GenBiome
{
return BlockFlower.EnumFlowerType.BLUE_ORCHID;
}
public FeatureGenerator getRandomWorldGenForGrass(Random rand)
{
return new WorldGenTallGrass(Blocks.swamp_grass);
}
public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
int sea = worldIn.getSeaLevel() - 1;
double d0 = GRASS_NOISE.generate((double)x * 0.25D, (double)z * 0.25D);
if (d0 > 0.0D)
@ -54,9 +66,10 @@ public class BiomeSwamp extends GenBiome
{
if (chunkPrimerIn.get(j, k, i).getBlock() != Blocks.air)
{
if (k == 62 && chunkPrimerIn.get(j, k, i).getBlock() != Blocks.water)
if (k == sea)
{
chunkPrimerIn.set(j, k, i, Blocks.water.getState());
if(!chunkPrimerIn.get(j, k, i).getBlock().getMaterial().isLiquid() || k <= 0 || !chunkPrimerIn.get(j, k - 1, i).getBlock().getMaterial().isLiquid())
chunkPrimerIn.set(j, k, i, Blocks.swamp_water.getState());
if (d0 < 0.12D)
{

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.animal.EntityWolf;
@ -107,6 +107,6 @@ public class BiomeTaiga extends GenBiome
protected GenBiome createMutatedBiome(Biome base)
{
return this.base == Biome.MEGATAIGA ? (new BiomeTaiga(base, 2)).setScaling(this.depth, this.scale) : super.createMutatedBiome(base);
return this.base == Biome.LARGE_TAIGA ? (new BiomeTaiga(base, 2)).setScaling(this.depth, this.scale) : super.createMutatedBiome(base);
}
}

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.block.foliage.BlockFlower;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.entity.npc.EntityMerfolk;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.biome.Biome;
import common.biome.IBiome;
@ -63,7 +63,7 @@ public abstract class GenBiome implements IBiome {
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 extremeHills = (new BiomeHills(Biome.HILLS, 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);
@ -72,46 +72,46 @@ public abstract class GenBiome implements IBiome {
public static final GenBiome exterminated = (new BiomeExterminated());
public static final GenBiome space = (new BiomeSpace());
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 frozenSea = (new BiomeWater(Biome.ICE_SEA, false)).enableColdBeach().setScaling(Scaling.SEA_MEDIUM);
public static final GenBiome frozenRiver = (new BiomeWater(Biome.ICE_RIVER, true)).enableColdBeach().setScaling(Scaling.SEA_SHALLOW);
public static final GenBiome icePlains = (new BiomeSnow(Biome.ICE, false)).enableColdBeach().setScaling(Scaling.PLAINS_LOW);
public static final GenBiome iceMountains = (new BiomeSnow(Biome.ICE_HILLS, 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 forestHills = (new BiomeForest(Biome.FOREST_HILLS, 0)).setScaling(Scaling.HILLS_LOW);
public static final GenBiome taigaHills = (new BiomeTaiga(Biome.TAIGA_HILLS, 0)).setScaling(Scaling.HILLS_LOW);
public static final GenBiome extremeHillsEdge = (new BiomeHills(Biome.HILLS_EDGE, true)).setScaling(Scaling.HILLS_MEDIUM);
public static final GenBiome jungle = (new BiomeJungle(Biome.TROPIC, false));
public static final GenBiome jungleHills = (new BiomeJungle(Biome.TROPIC_HILLS, false)).setScaling(Scaling.HILLS_LOW);
public static final GenBiome jungleEdge = (new BiomeJungle(Biome.TROPIC_EDGE, 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 birchForest = (new BiomeForest(Biome.BIRCH_FOREST, 2));
public static final GenBiome birchForestHills = (new BiomeForest(Biome.BIRCH_HILLS, 2)).setScaling(Scaling.HILLS_LOW);
public static final GenBiome roofedForest = (new BiomeForest(Biome.DARK_FOREST, 3));
public static final GenBiome coldTaiga = (new BiomeTaiga(Biome.ICE_TAIGA, 0)).enableColdBeach().setScaling(Scaling.PLAINS_MEDIUM);
public static final GenBiome coldTaigaHills = (new BiomeTaiga(Biome.ICE_TAIGA_HILLS, 0)).enableColdBeach().setScaling(Scaling.HILLS_LOW);
public static final GenBiome megaTaiga = (new BiomeTaiga(Biome.LARGE_TAIGA, 1)).setScaling(Scaling.PLAINS_MEDIUM);
public static final GenBiome megaTaigaHills = (new BiomeTaiga(Biome.LARGE_TAIGA_HILLS, 1)).setScaling(Scaling.HILLS_LOW);
public static final GenBiome extremeHillsPlus = (new BiomeHills(Biome.LARGE_HILLS, 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 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 GenBiome mesaPlateau_F = (new BiomeMesa(Biome.MESA_FOREST, false, true)).setScaling(Scaling.HILLS_PLATEAU);
public static final GenBiome mesaPlateau = (new BiomeMesa(Biome.MESA_PLATEAU, false, false)).setScaling(Scaling.HILLS_PLATEAU);
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 elvenForest = (new BiomeForest(Biome.ELVEN_FOREST, 4));
public static final GenBiome upperHell = (new BiomeHell(Biome.UPPER_HELL, 0));
public static final GenBiome lowerHell = (new BiomeHell(Biome.LOWER_HELL, 1));
public static final GenBiome hellHills = (new BiomeHell(Biome.HELL_HILLS, 1)).setScaling(Scaling.HILLS_LARGE);
public static final GenBiome soulPlains = (new BiomeHell(Biome.SOUL_PLAINS, 1)).setScaling(Scaling.SEA_POND);
public static final GenBiome ashLand = (new BiomeHell(Biome.ASH, 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);
@ -124,7 +124,6 @@ public abstract class GenBiome implements IBiome {
protected final WeightedList<RngSpawn> mobs = new WeightedList<RngSpawn>();
protected final WorldGenBaseTree worldGeneratorTrees = new WorldGenBaseTree(false);
protected final WorldGenBigTree worldGeneratorBigTree = new WorldGenBigTree(false);
protected final WorldGenSwamp worldGeneratorSwamp = new WorldGenSwamp();
private final FeatureGenerator clayGen = new WorldGenClay(4);
private final FeatureGenerator sandGen = new WorldGenSand(Blocks.sand, 7);
private final FeatureGenerator gravelAsSandGen = new WorldGenSand(Blocks.gravel, 6);
@ -137,6 +136,7 @@ public abstract class GenBiome implements IBiome {
private final FeatureGenerator waterlilyGen = new WorldGenWaterlily();
private final FeatureGenerator clayGenExt = new WorldGenClayExt(32);
public Biome mutated = null;
public State topBlock = Blocks.grass.getState();
public State fillerBlock = Blocks.dirt.getState();
public float depth = Scaling.VARYING_LOW.depth;
@ -182,26 +182,26 @@ public abstract class GenBiome implements IBiome {
}
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);
desert.mutate(Biome.DESERT_MOD);
forest.mutate(Biome.FLOWER_FOREST);
taiga.mutate(Biome.TAIGA_MOD);
swampland.mutate(Biome.SWAMP_MOD);
icePlains.mutate(Biome.ICE_SPIKES);
jungle.mutate(Biome.TROPIC_MOD);
jungleEdge.mutate(Biome.TROPIC_EDGE_MOD);
coldTaiga.mutate(Biome.ICE_TAIGA_MOD);
savanna.mutate(Biome.SAVANNA_MOD);
savannaPlateau.mutate(Biome.SAVANNA_PLATEAU_MOD);
mesa.mutate(Biome.MESA_PEAK);
mesaPlateau_F.mutate(Biome.MESA_FOREST_MOD);
mesaPlateau.mutate(Biome.MESA_PLATEAU_MOD);
birchForest.mutate(Biome.BIRCH_FOREST_MOD);
birchForestHills.mutate(Biome.BIRCH_HILLS_MOD);
roofedForest.mutate(Biome.DARK_FOREST_MOD);
megaTaiga.mutate(Biome.SPRUCE_TAIGA);
extremeHills.mutate(Biome.HILLS_MOD);
extremeHillsPlus.mutate(Biome.LARGE_HILLS_MOD);
megaTaiga.mutate(Biome.REDWOOD_TAIGA);
}
protected GenBiome(Biome base) {
@ -244,10 +244,10 @@ public abstract class GenBiome implements IBiome {
return rand.chance(10) ? this.worldGeneratorBigTree : this.worldGeneratorTrees;
}
public WorldGenTree genBigTreeLegacy(Random rand, BlockPos pos)
public WorldGenTree genBigTreeLegacy(Random rand, BlockPos pos, boolean humid)
{
int noise = (int)((TREE_NOISE.generate((double)pos.getX() * 0.5D, (double)pos.getZ() * 0.5D) / 8D + rand.doublev() * 4D + 4D) / 3D);
return (noise > 0 && rand.chance(noise)) || (this.base.isHighHumidity() && rand.chance(3)) ? this.worldGeneratorBigTree :
return (noise > 0 && rand.chance(noise)) || (humid && rand.chance(3)) ? this.worldGeneratorBigTree :
this.worldGeneratorTrees;
}
@ -850,6 +850,11 @@ public abstract class GenBiome implements IBiome {
{
return new BiomeMutated(base, this);
}
private void mutate(Biome base)
{
this.createMutatedBiome(this.mutated = base);
}
public Class <? extends GenBiome > getBiomeClass()
{

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
import common.entity.types.EntityLiving;
import common.rng.RngItem;

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
public enum Scaling {
VARYING_LOW(0.1F, 0.2F),

View file

@ -1,4 +1,4 @@
package server.biome;
package server.worldgen.biome;
public enum Temperature {
SEA, COLD, MEDIUM, WARM;

View file

@ -7,9 +7,9 @@ import common.rng.Random;
import common.util.BlockPos;
import common.util.ExtMath;
import common.world.State;
import server.biome.GenBiome;
import server.world.WorldServer;
import server.worldgen.ChunkPrimer;
import server.worldgen.biome.GenBiome;
public class MapGenCaves extends MapGenBase
{

View file

@ -6,9 +6,9 @@ import common.rng.Random;
import common.util.BlockPos;
import common.util.ExtMath;
import common.world.State;
import server.biome.GenBiome;
import server.world.WorldServer;
import server.worldgen.ChunkPrimer;
import server.worldgen.biome.GenBiome;
public class MapGenRavine extends MapGenBase
{

View file

@ -1,7 +1,7 @@
package server.worldgen.layer;
import common.biome.Biome;
import server.biome.GenBiome;
import server.worldgen.biome.GenBiome;
public abstract class GenLayer {
private long worldGenSeed;
@ -24,7 +24,7 @@ public abstract class GenLayer {
}
protected static boolean isSea(int id) {
return id == Biome.SEA.id || id == Biome.FROZENSEA.id;
return id == Biome.SEA.id || id == Biome.ICE_SEA.id;
}
public GenLayer(long base) {

View file

@ -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 ? Biome.FROZENSEA.id : Biome.SEA.id;
aint1[j1 + i1 * areaWidth] = l2 > 1 ? Biome.ICE_SEA.id : Biome.SEA.id;
}
else
{

View file

@ -1,8 +1,8 @@
package server.worldgen.layer;
import common.biome.Biome;
import server.biome.GenBiome;
import server.biome.Temperature;
import server.worldgen.biome.GenBiome;
import server.worldgen.biome.Temperature;
public class GenLayerBiomeEdge extends GenLayer
{
@ -28,7 +28,7 @@ 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, 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 (!this.replaceBiomeEdgeIfNecessary(aint, aint1, j, i, areaWidth, k, Biome.HILLS.id, Biome.HILLS_EDGE.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.LARGE_TAIGA.id, Biome.TAIGA.id))
{
if (k == Biome.DESERT.id)
{
@ -37,36 +37,36 @@ public class GenLayerBiomeEdge extends GenLayer
int j2 = aint[j + 1 - 1 + (i + 1) * (areaWidth + 2)];
int k2 = aint[j + 1 + (i + 1 + 1) * (areaWidth + 2)];
if (l1 != Biome.ICEPLAINS.id && i2 != Biome.ICEPLAINS.id && j2 != Biome.ICEPLAINS.id && k2 != Biome.ICEPLAINS.id)
if (l1 != Biome.ICE.id && i2 != Biome.ICE.id && j2 != Biome.ICE.id && k2 != Biome.ICE.id)
{
aint1[j + i * areaWidth] = k;
}
else
{
aint1[j + i * areaWidth] = Biome.EXTREMEHILLSPLUS.id;
aint1[j + i * areaWidth] = Biome.LARGE_HILLS.id;
}
}
else if (k == Biome.SWAMPLAND.id)
else if (k == Biome.SWAMP.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 != 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 != Biome.DESERT.id && i1 != Biome.DESERT.id && j1 != Biome.DESERT.id && k1 != Biome.DESERT.id && l != Biome.ICE_TAIGA.id && i1 != Biome.ICE_TAIGA.id && j1 != Biome.ICE_TAIGA.id && k1 != Biome.ICE_TAIGA.id && l != Biome.ICE.id && i1 != Biome.ICE.id && j1 != Biome.ICE.id && k1 != Biome.ICE.id)
{
if (l != Biome.JUNGLE.id && k1 != Biome.JUNGLE.id && i1 != Biome.JUNGLE.id && j1 != Biome.JUNGLE.id)
if (l != Biome.TROPIC.id && k1 != Biome.TROPIC.id && i1 != Biome.TROPIC.id && j1 != Biome.TROPIC.id)
{
aint1[j + i * areaWidth] = k;
}
else
{
aint1[j + i * areaWidth] = Biome.JUNGLEEDGE.id;
aint1[j + i * areaWidth] = Biome.TROPIC_EDGE.id;
}
}
else
{
aint1[j + i * areaWidth] = Biome.PLAINS.id;
aint1[j + i * areaWidth] = Biome.PLAIN.id;
}
}
else

View file

@ -2,6 +2,7 @@ package server.worldgen.layer;
import common.biome.Biome;
import common.log.Log;
import server.worldgen.biome.GenBiome;
public class GenLayerHills extends GenLayer
{
@ -61,62 +62,62 @@ public class GenLayerHills extends GenLayer
if (k == Biome.DESERT.id)
{
i1 = Biome.DESERTHILLS.id;
i1 = Biome.DESERT_HILLS.id;
}
else if (k == Biome.FOREST.id)
{
i1 = Biome.FORESTHILLS.id;
i1 = Biome.FOREST_HILLS.id;
}
else if (k == Biome.BIRCHFOREST.id)
else if (k == Biome.BIRCH_FOREST.id)
{
i1 = Biome.BIRCHFORESTHILLS.id;
i1 = Biome.BIRCH_HILLS.id;
}
else if (k == Biome.ROOFEDFOREST.id)
else if (k == Biome.DARK_FOREST.id)
{
i1 = Biome.PLAINS.id;
i1 = Biome.PLAIN.id;
}
else if (k == Biome.TAIGA.id)
{
i1 = Biome.TAIGAHILLS.id;
i1 = Biome.TAIGA_HILLS.id;
}
else if (k == Biome.MEGATAIGA.id)
else if (k == Biome.LARGE_TAIGA.id)
{
i1 = Biome.MEGATAIGAHILLS.id;
i1 = Biome.LARGE_TAIGA_HILLS.id;
}
else if (k == Biome.COLDTAIGA.id)
else if (k == Biome.ICE_TAIGA.id)
{
i1 = Biome.COLDTAIGAHILLS.id;
i1 = Biome.ICE_TAIGA_HILLS.id;
}
else if (k == Biome.PLAINS.id)
else if (k == Biome.PLAIN.id)
{
if (this.nextInt(3) == 0)
{
i1 = Biome.FORESTHILLS.id;
i1 = Biome.FOREST_HILLS.id;
}
else
{
i1 = Biome.FOREST.id;
}
}
else if (k == Biome.ICEPLAINS.id)
else if (k == Biome.ICE.id)
{
i1 = Biome.ICEMOUNTAINS.id;
i1 = Biome.ICE_HILLS.id;
}
else if (k == Biome.JUNGLE.id)
else if (k == Biome.TROPIC.id)
{
i1 = Biome.JUNGLEHILLS.id;
i1 = Biome.TROPIC_HILLS.id;
}
else if (k == Biome.NONE.id)
{
i1 = this.def;
}
else if (k == Biome.EXTREMEHILLS.id)
else if (k == Biome.HILLS.id)
{
i1 = Biome.EXTREMEHILLSPLUS.id;
i1 = Biome.LARGE_HILLS.id;
}
else if (k == Biome.SAVANNA.id)
{
i1 = Biome.SAVANNAPLATEAU.id;
i1 = Biome.SAVANNA_PLATEAU.id;
}
// else if (canBeNearby(k, Biome.mesaPlateau_F.id))
// {
@ -128,7 +129,7 @@ public class GenLayerHills extends GenLayer
if (j1 == 0)
{
i1 = Biome.PLAINS.id;
i1 = Biome.PLAIN.id;
}
else
{
@ -138,9 +139,10 @@ public class GenLayerHills extends GenLayer
if (flag && i1 != k)
{
if (Biome.getBiome(i1 + 128) != null)
GenBiome gb = GenBiome.getBiome(i1);
if (gb != null && gb.mutated != null)
{
i1 += 128;
i1 = gb.mutated.id;
}
else
{

View file

@ -43,15 +43,15 @@ public class GenLayerRiverMix extends GenLayer
{
out[i] = this.def;
}
else if(biome[i] == Biome.SEA.id || biome[i] == Biome.FROZENSEA.id)
else if(biome[i] == Biome.SEA.id || biome[i] == Biome.ICE_SEA.id)
{
out[i] = biome[i];
}
else if (river[i] == Biome.RIVER.id)
{
if (biome[i] == Biome.ICEPLAINS.id)
if (biome[i] == Biome.ICE.id)
{
out[i] = Biome.FROZENRIVER.id;
out[i] = Biome.ICE_RIVER.id;
}
else // if (biome[i] != Biome.mushroomPlains.id && biome[i] != Biome.mushroomPlainsEdge.id)
{

View file

@ -1,8 +1,8 @@
package server.worldgen.layer;
import common.biome.Biome;
import server.biome.GenBiome;
import server.biome.BiomeJungle;
import server.worldgen.biome.BiomeJungle;
import server.worldgen.biome.GenBiome;
public class GenLayerShore extends GenLayer
{
@ -62,14 +62,14 @@ public class GenLayerShore extends GenLayer
}
else
{
data[j + i * width] = Biome.JUNGLEEDGE.id;
data[j + i * width] = Biome.TROPIC_EDGE.id;
}
}
else if (id != Biome.EXTREMEHILLS.id && id != Biome.EXTREMEHILLSPLUS.id && id != Biome.EXTREMEHILLSEDGE.id)
else if (id != Biome.HILLS.id && id != Biome.LARGE_HILLS.id && id != Biome.HILLS_EDGE.id)
{
if (biome != null && biome.allowColdBeach)
{
this.putBeach(pre, data, j, i, width, id, Biome.COLDBEACH.id);
this.putBeach(pre, data, j, i, width, id, Biome.ICE_BEACH.id);
}
else // if (id != Biome.mesa.id && id != Biome.mesaPlateau_F.id)
// {
@ -120,7 +120,7 @@ public class GenLayerShore extends GenLayer
}
else
{
this.putBeach(pre, data, j, i, width, id, Biome.STONEBEACH.id);
this.putBeach(pre, data, j, i, width, id, Biome.STONE_BEACH.id);
}
}
}
@ -155,7 +155,7 @@ public class GenLayerShore extends GenLayer
private boolean canNBJungle(int 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);
return biome != null && biome.getBiomeClass() == BiomeJungle.class ? true : id == Biome.TROPIC_EDGE.id || id == Biome.TROPIC.id || id == Biome.TROPIC_HILLS.id || id == Biome.FOREST.id || id == Biome.TAIGA.id || isSea(id);
}
// private boolean canNBMesa(int id)

View file

@ -10,7 +10,7 @@ import server.world.WorldServer;
public class MapGenScatteredFeature extends MapGenStructure
{
private static final List<Biome> biomelist = Arrays.<Biome>asList(Biome.DESERT, Biome.DESERTHILLS, Biome.JUNGLE, Biome.JUNGLEHILLS, Biome.SWAMPLAND);
private static final List<Biome> biomelist = Arrays.<Biome>asList(Biome.DESERT, Biome.DESERT_HILLS, Biome.TROPIC, Biome.TROPIC_HILLS, Biome.SWAMP);
private static final int MAX_DISTANCE = 32;
private static final int MIN_DISTANCE = 8;
@ -94,14 +94,14 @@ public class MapGenScatteredFeature extends MapGenStructure
super(p_i2060_3_, p_i2060_4_);
Biome biomegenbase = worldIn.getBiomeGenForCoords(new BlockPos(p_i2060_3_ * 16 + 8, 0, p_i2060_4_ * 16 + 8));
if (biomegenbase != Biome.JUNGLE && biomegenbase != Biome.JUNGLEHILLS)
if (biomegenbase != Biome.TROPIC && biomegenbase != Biome.TROPIC_HILLS)
{
if (biomegenbase == Biome.SWAMPLAND)
if (biomegenbase == Biome.SWAMP)
{
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 == Biome.DESERT || biomegenbase == Biome.DESERTHILLS)
else if (biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERT_HILLS)
{
StructureScattered.DesertPyramid componentscatteredfeaturepieces$desertpyramid = new StructureScattered.DesertPyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
this.components.add(componentscatteredfeaturepieces$desertpyramid);

View file

@ -11,7 +11,7 @@ import server.world.WorldServer;
public class MapGenVillage extends MapGenStructure
{
public static final Set<Biome> villageSpawnBiomes = Sets.<Biome>newHashSet(Biome.PLAINS, Biome.DESERT, Biome.SAVANNA);
public static final Set<Biome> villageSpawnBiomes = Sets.<Biome>newHashSet(Biome.PLAIN, Biome.DESERT, Biome.SAVANNA);
/** World terrain type, 0 for normal, 1 for flat map */
private int terrainType;

View file

@ -1430,7 +1430,7 @@ public class StructureVillage
this.structureVillageWeightedPieceList = p_i2104_6_;
this.terrainType = p_i2104_7_;
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.inDesert = biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERT_HILLS;
this.func_175846_a(this.inDesert);
}

View file

@ -14,9 +14,9 @@ import server.world.WorldServer;
public class WorldGenSwamp extends WorldGenTree
{
private static final State field_181648_a = Blocks.oak_log.getState();
private static final State field_181648_a = Blocks.swamp_oak_log.getState();
// .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.OAK);
private static final WoodType field_181649_b = WoodType.OAK;
private static final WoodType field_181649_b = WoodType.SWAMP_OAK;
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK);
public WorldGenSwamp()
@ -89,7 +89,7 @@ public class WorldGenSwamp extends WorldGenTree
{
Block block1 = worldIn.getState(position.down()).getBlock();
if ((block1 == Blocks.grass || block1 == Blocks.dirt) && position.getY() < 512 - i - 1)
if ((block1 == Blocks.grass || block1 == Blocks.dirt || block1 == Blocks.swamp) && position.getY() < 512 - i - 1)
{
this.setBaseBlock(worldIn, position.down());
@ -188,7 +188,7 @@ public class WorldGenSwamp extends WorldGenTree
private void func_181647_a(WorldServer p_181647_1_, BlockPos p_181647_2_, PropertyBool p_181647_3_)
{
State iblockstate = Blocks.vine.getState().withProperty(p_181647_3_, Boolean.valueOf(true));
State iblockstate = Blocks.swamp_vine.getState().withProperty(p_181647_3_, Boolean.valueOf(true));
this.setBlockAndNotifyAdequately(p_181647_1_, p_181647_2_, iblockstate);
int i = 4;

View file

@ -4,6 +4,7 @@ import common.block.Block;
import common.block.Material;
import common.block.foliage.BlockLog;
import common.block.foliage.BlockSapling;
import common.block.foliage.BlockVine;
import common.init.Blocks;
import common.rng.Random;
import common.util.BlockPos;
@ -19,7 +20,7 @@ public abstract class WorldGenTree extends FeatureGenerator
protected boolean canBeReplaced(Block block)
{
return block == Blocks.air || block.getMaterial() == Material.LEAVES || block == Blocks.grass || block == Blocks.dirt || block instanceof BlockLog || block instanceof BlockSapling || block == Blocks.vine;
return block == Blocks.air || block.getMaterial() == Material.LEAVES || block == Blocks.grass || block == Blocks.swamp || block == Blocks.dirt || block instanceof BlockLog || block instanceof BlockSapling || block instanceof BlockVine;
}
public void prepare()