@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class VanillaCompatibilityGenerator extends java.lang.Object implements ICubeGenerator
ICubeGenerator.GeneratorReadyStateNO_REQUIREMENT, RECOMMENDED_FULL_POPULATOR_REQUIREMENT, RECOMMENDED_GENERATE_POPULATOR_REQUIREMENT| Constructor and Description |
|---|
VanillaCompatibilityGenerator(net.minecraft.world.gen.IChunkGenerator vanilla,
net.minecraft.world.World world)
Create a new VanillaCompatibilityGenerator
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateColumn(net.minecraft.world.chunk.Chunk column)
Generate column-global information such as biome data
|
CubePrimer |
generateCube(int cubeX,
int cubeY,
int cubeZ)
Generate a new cube
|
CubePrimer |
generateCube(int cubeX,
int cubeY,
int cubeZ,
CubePrimer primer)
Generate a new cube
|
net.minecraft.util.math.BlockPos |
getClosestStructure(java.lang.String name,
net.minecraft.util.math.BlockPos pos,
boolean findUnexplored)
Gets the closest structure with name
name. |
Box |
getFullPopulationRequirements(ICube cube)
Get the bounding box defining a range of cubes whose population contributes to
cube being fully
populated. |
Box |
getPopulationPregenerationRequirements(ICube cube)
Get the Box will all the cubes that populating this cube will affect this cube.
|
java.util.List<net.minecraft.world.biome.Biome.SpawnListEntry> |
getPossibleCreatures(net.minecraft.entity.EnumCreatureType creatureType,
net.minecraft.util.math.BlockPos pos)
Retrieve a list of creature classes eligible for spawning at the specified location.
|
void |
populate(ICube cube)
Populate a cube with multi-block structures that can cross cube boundaries such as trees and ore veins.
|
void |
recreateStructures(net.minecraft.world.chunk.Chunk column)
Called to reload structures that apply to
column. |
void |
recreateStructures(ICube cube)
Called to reload structures that apply to
cube. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpollAsyncColumnGenerator, pollAsyncCubeGenerator, pollAsyncCubePopulator, supportsConcurrentColumnGeneration, supportsConcurrentCubeGeneration, tryGenerateColumn, tryGenerateCubepublic VanillaCompatibilityGenerator(net.minecraft.world.gen.IChunkGenerator vanilla,
net.minecraft.world.World world)
vanilla - The vanilla generator to mirrorworld - The world in which cubes are being generatedpublic void generateColumn(net.minecraft.world.chunk.Chunk column)
ICubeGeneratorgenerateColumn in interface ICubeGeneratorcolumn - the target columnpublic void recreateStructures(net.minecraft.world.chunk.Chunk column)
ICubeGeneratorcolumn. Mostly used to prepare calls to
ICubeGenerator.getPossibleCreatures(EnumCreatureType, BlockPos) recreateStructures in interface ICubeGeneratorcolumn - The column being loadedfor the 3D-equivalent of this methodpublic CubePrimer generateCube(int cubeX, int cubeY, int cubeZ)
ICubeGeneratorgenerateCube in interface ICubeGeneratorcubeX - the cube's X coordinatecubeY - the cube's Y coordinatecubeZ - the cube's Z coordinatepublic CubePrimer generateCube(int cubeX, int cubeY, int cubeZ, CubePrimer primer)
ICubeGeneratorgenerateCube in interface ICubeGeneratorcubeX - the cube's X coordinatecubeY - the cube's Y coordinatecubeZ - the cube's Z coordinateprimer - a CubePrimer which may be used for generating the new cube. Note that generators are allowed to return an
arbitrary CubePrimer, this parameter is simply a hint to help reduce allocations. However, if a different
primer is to be returned, the given primer's state must remain unmodified.public void populate(ICube cube)
ICubeGeneratorICubeGenerator.getFullPopulationRequirements(ICube) would does include cube.
Note: Unlike vanilla this method will NEVER cause recursive generation, thus the area that it populates is not as strict.
Generation should still be restricted as the player might see something generate in a chunk they have already been sentpopulate in interface ICubeGeneratorcube - the cube to populatepublic Box getFullPopulationRequirements(ICube cube)
ICubeGeneratorcube being fully
populated. The requested cubes will all be generated and populated when the cube that they affect needs to be fully populated.
Consider the following example: A call to some implementation of
ICubeGenerator.populate(ICube) populates a 16x16x16 block area in a 2x2x2 area of cubes around the center.
Shown: Which cubes affect the current cube (marked with dots), and their corresponding areas of population. +----------+----------+ . . The chunk provided as a parameter | | . . . . .| . . to this method (getFullPopulationRequirements). | | . . . . .| | #####|#####. . .| x x The chunk provided as a parameter | #####|#####. . .| x x to populate() +----------+----------+ | x x #####|##### | ### The area being populated by 'x' | x x #####|##### | ### | x x x x x| | | x x x x x| | +----------+----------+ +----------+----------+ . . The chunk provided as a parameter | | . . . . .| . . to this method (getFullPopulationRequirements). | | . . . . .| | | . . #####| x x The chunk provided as a parameter | | . . #####| x x to populate() +----------+----------+ | | x x #####| ### The area being populated by 'x' | | x x #####| ### | | x x x x x| | | x x x x x| +----------+----------+ +----------+----------+ . . The chunk provided as a parameter | x x #####|#####. . .| . . to this method (getFullPopulationRequirements). | x x #####|#####. . .| | x x x x x| . . . . .| x x The chunk provided as a parameter | x x x x x| . . . . .| x x to populate() +----------+----------+ | | | ### The area being populated by 'x' | | | ### | | | | | | +----------+----------+This method would return
{(-1,-1,-1), (0, 0, 0)}, indicating that populate calls to all cubes in
that area write to this cube.getFullPopulationRequirements in interface ICubeGeneratorcube - The target cubecubepublic Box getPopulationPregenerationRequirements(ICube cube)
ICubeGeneratorgetPopulationPregenerationRequirements in interface ICubeGeneratorcube - The target cubepublic void recreateStructures(ICube cube)
ICubeGeneratorcube. Mostly used to prepare calls to
ICubeGenerator.getPossibleCreatures(EnumCreatureType, BlockPos) recreateStructures in interface ICubeGeneratorcube - The cube being loadedfor the 2D-equivalent of this methodpublic java.util.List<net.minecraft.world.biome.Biome.SpawnListEntry> getPossibleCreatures(net.minecraft.entity.EnumCreatureType creatureType,
net.minecraft.util.math.BlockPos pos)
ICubeGeneratorgetPossibleCreatures in interface ICubeGeneratorcreatureType - the creature type that we are interested in spawningpos - the position we want to spawn creatures atpublic net.minecraft.util.math.BlockPos getClosestStructure(java.lang.String name,
net.minecraft.util.math.BlockPos pos,
boolean findUnexplored)
ICubeGeneratorname. This is primarily used when an eye of ender is trying to find
a stronghold.getClosestStructure in interface ICubeGeneratorname - the name of the structurepos - find the structure closest to this positionfindUnexplored - true if should also find not yet generated structuresnull if none could be found