net.minecraft.world.gen.layer.GenLayer Java Examples

The following examples show how to use net.minecraft.world.gen.layer.GenLayer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BiomeProviderTofu.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public BiomeProviderTofu(long seed, WorldType worldType)
{
    this();
    GenLayer agenlayer[] = GenLayerTofu.initializeAllBiomeGeneratorsTofu(seed, worldType);
    this.genBiomes = agenlayer[0];
    this.biomeIndexLayer = agenlayer[1];
}
 
Example #2
Source File: BiomeGeneratorImplementation.java    From malmo with MIT License 5 votes vote down vote up
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onBiomeGenInit(WorldTypeEvent.InitBiomeGens event) {
	// Negative one is flag value for normal world gen
	if (bparams.getBiome() == -1)
		return;
	GenLayer[] replacement = new GenLayer[2];
	replacement[0] = new GenLayerConstant(bparams.getBiome());
	replacement[1] = replacement[0];
	event.setNewBiomeGens(replacement);
}
 
Example #3
Source File: WorldTypePlanetGen.java    From AdvancedRocketry with MIT License 5 votes vote down vote up
/**
 * Creates the GenLayerBiome used for generating the world
 *
 * @param worldSeed The world seed
 * @param parentLayer The parent layer to feed into any layer you return
 * @return A GenLayer that will return ints representing the Biomes to be generated, see GenLayerBiome
 */
@Override
public GenLayer getBiomeLayer(long worldSeed, GenLayer parentLayer, ChunkGeneratorSettings chunkProviderSettings)
{
	//return super.getBiomeLayer(worldSeed, parentLayer);
	GenLayer ret = new GenLayerBiomePlanet(200L, parentLayer, this);

	ret = GenLayerZoom.magnify(1000L, ret, 2);
	//REKT with random ocean
	//ret = new GenLayerEdge(1000L, ret, Mode.SPECIAL);
	return ret;
}
 
Example #4
Source File: GenLayerTofu.java    From TofuCraftReload with MIT License 4 votes vote down vote up
/**
 * the first array item is a linked list of the bioms, the second is the zoom function, the third is the same as the
 * first.
 */
public static GenLayer[] initializeAllBiomeGeneratorsTofu(long seed, WorldType worldType)
{
    byte biomeSize = getModdedBiomeSize(worldType, (byte) (worldType == WorldType.LARGE_BIOMES ? 7 : 5));


    GenLayerIsland genlayerisland = new GenLayerIsland(1L);
    GenLayerFuzzyZoom genlayerfuzzyzoom = new GenLayerFuzzyZoom(2000L, genlayerisland);
    GenLayerAddIsland genlayeraddisland = new GenLayerAddIsland(1L, genlayerfuzzyzoom);
    GenLayerZoom genlayerzoom = new GenLayerZoom(2001L, genlayeraddisland);
    genlayeraddisland = new GenLayerAddIsland(2L, genlayerzoom);
    genlayeraddisland = new GenLayerAddIsland(50L, genlayeraddisland);
    genlayeraddisland = new GenLayerAddIsland(70L, genlayeraddisland);
    genlayeraddisland = new GenLayerAddIsland(3L, genlayeraddisland);
    genlayeraddisland = new GenLayerAddIsland(2L, genlayeraddisland);
    GenLayerEdge genlayeredge = new GenLayerEdge(2L, genlayeraddisland, GenLayerEdge.Mode.COOL_WARM);
    genlayeredge = new GenLayerEdge(2L, genlayeredge, GenLayerEdge.Mode.HEAT_ICE);
    genlayeredge = new GenLayerEdge(3L, genlayeredge, GenLayerEdge.Mode.SPECIAL);
    genlayerzoom = new GenLayerZoom(2002L, genlayeredge);
    genlayerzoom = new GenLayerZoom(2003L, genlayerzoom);
    genlayeraddisland = new GenLayerAddIsland(4L, genlayerzoom);

    GenLayerTofu genlayer3 = GenLayerZoom.magnify(1000L, genlayeraddisland, 0);
    GenLayerTofu genlayer = GenLayerZoom.magnify(1000L, genlayer3, 0);
    GenLayerRiverInit genlayerriverinit = new GenLayerRiverInit(100L, genlayer);
    Object object = GenLayerTofu.getBiomeLayer(seed, genlayer3, worldType);

    GenLayerTofu genlayer1 = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
    GenLayerHills genlayerhills = new GenLayerHills(1000L, (GenLayerTofu)object, genlayer1);
    genlayer = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
    genlayer = GenLayerZoom.magnify(1000L, genlayer, biomeSize);
    GenLayerRiver genlayerriver = new GenLayerRiver(1L, genlayer);
    GenLayerSmooth genlayersmooth = new GenLayerSmooth(1000L, genlayerriver);
    object = GenLayerZoom.magnify(1000L, genlayerhills, 2);

    for (int j = 0; j < biomeSize; ++j)
    {
        object = new GenLayerZoom((long)(1000 + j), (GenLayerTofu)object);

        if (j == 0)
        {
            object = new GenLayerAddIsland(3L, (GenLayerTofu)object);
        }
        if (j == 1)
        {
            object = new GenLayerShore(1000L, (GenLayerTofu)object);
        }
    }

    GenLayerSmooth genlayersmooth1 = new GenLayerSmooth(1000L, (GenLayerTofu)object);
    GenLayerRiverMix genlayerrivermix = new GenLayerRiverMix(100L, genlayersmooth1, genlayersmooth);


    GenLayerTofu layerVoronoi = new GenLayerTofuVoronoiZoom(10L, genlayerrivermix);

    genlayerrivermix.initWorldGenSeed(seed);

    layerVoronoi.initWorldGenSeed(seed);

    return new GenLayer[] {genlayerrivermix, layerVoronoi};
}
 
Example #5
Source File: GenLayerBiomesTofu.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public GenLayerBiomesTofu(long seed, GenLayer genlayer) {
    super(seed);
    this.parent = genlayer;
}
 
Example #6
Source File: GenLayerBiomeEdge.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public GenLayerBiomeEdge(long p_i45475_1_, GenLayer p_i45475_3_)
{
    super(p_i45475_1_);
    this.parent = p_i45475_3_;
}
 
Example #7
Source File: GenLayerTofuVoronoiZoom.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public GenLayerTofuVoronoiZoom(long p_i2133_1_, GenLayer p_i2133_3_)
{
    super(p_i2133_1_);
    super.parent = p_i2133_3_;
}
 
Example #8
Source File: GenLayerRiverMix.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public GenLayerRiverMix(long par1, GenLayer par3GenLayer, GenLayer par4GenLayer)
{
    super(par1);
    this.biomePatternGeneratorChain = par3GenLayer;
    this.riverPatternGeneratorChain = par4GenLayer;
}
 
Example #9
Source File: GenLayerZoom.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public GenLayerZoom(long par1, GenLayer par3GenLayer)
{
    super(par1);
    super.parent = par3GenLayer;
}
 
Example #10
Source File: GenLayerRiver.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public GenLayerRiver(long par1, GenLayer par3GenLayer)
{
    super(par1);
    super.parent = par3GenLayer;
}
 
Example #11
Source File: BiomeProviderTofu.java    From TofuCraftReload with MIT License 4 votes vote down vote up
@Override
public GenLayer[] getModdedBiomeGenerators(WorldType worldType, long seed, GenLayer[] original)
{
    return original;
}
 
Example #12
Source File: GenLayerVoronoiExtended.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
public GenLayerVoronoiExtended(long p_i2133_1_, GenLayer p_i2133_3_)
{
    super(p_i2133_1_);
    super.parent = p_i2133_3_;
}
 
Example #13
Source File: GenLayerBiomePlanet.java    From AdvancedRocketry with MIT License 3 votes vote down vote up
public GenLayerBiomePlanet(long p_i2122_1_, GenLayer p_i2122_3_, WorldType worldType)
{
	super(p_i2122_1_);

	this.parent = p_i2122_3_;

	biomeEntries = new ArrayList<BiomeManager.BiomeEntry>();

}