Class SimpleAlienWorld
java.lang.Object
io.github.addoncommunity.galactifun.api.universe.UniversalObject
io.github.addoncommunity.galactifun.api.universe.PlanetaryObject
io.github.addoncommunity.galactifun.api.worlds.PlanetaryWorld
io.github.addoncommunity.galactifun.api.worlds.AlienWorld
io.github.addoncommunity.galactifun.api.worlds.SimpleAlienWorld
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classSettings for crater generation -
Field Summary
Fields inherited from class AlienWorld
CHUNK_VER_KEYFields inherited from class UniversalObject
id, orbitLevel -
Constructor Summary
ConstructorsConstructorDescriptionSimpleAlienWorld(String name, PlanetaryType type, Orbit orbit, PlanetaryObject orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) SimpleAlienWorld(String name, PlanetaryType type, Orbit orbit, StarSystem orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidgenerateChunk(org.bukkit.generator.ChunkGenerator.ChunkData chunk, Random random, org.bukkit.generator.WorldInfo world, int chunkX, int chunkZ) Generate a chunkprotected abstract org.bukkit.MaterialgenerateMaterial(Random random, int x, int y, int z, int top) protected voidgenerateMore(org.bukkit.generator.ChunkGenerator.ChunkData chunk, org.bukkit.util.noise.SimplexOctaveGenerator generator, Random random, int realX, int realZ, int x, int z, int height) Generate additional things after the main materials and biomes have been generatedprotected final voidgenerateSurface(org.bukkit.generator.ChunkGenerator.ChunkData chunk, Random random, org.bukkit.generator.WorldInfo world, int chunkX, int chunkZ) Optionally, generate the surface step of the worldprotected doubleOctave generator amplitudeprotected intAverage block height of the world, similar to sea levelprotected abstract org.bukkit.block.BiomegetBiome()protected final org.bukkit.generator.BiomeProvidergetBiomeProvider(org.bukkit.generator.WorldInfo info) Get theBiomeProviderfor this worldprotected SimpleAlienWorld.CraterSettingsGets the settings used for crater generation, or null if there are no cratersprotected doubleOctave generator frequencyprotected intMaximum y deviationprotected intOctave generator octavesprotected doublegetScale()Octave generator scaleprotected it.unimi.dsi.fastutil.objects.ObjectIntPair<org.bukkit.Material> getTop()Returns anObjectIntPairof the top block material and the number of top blocks.protected booleanSquare the noise before calculating height.Methods inherited from class AlienWorld
addBlockMapping, addSpecies, applyEffects, canSpawnVanillaMobs, enabledByDefault, generateChunk, getBedrockLayer, getMappedItem, getPopulators, getSetting, loadWorld, replaceChunkGenerator, tickWorldMethods inherited from class PlanetaryWorld
addon, enabled, isRegistered, register, registerGEOResource, resources, world, worldStorageMethods inherited from class PlanetaryObject
atmosphere, dayCycle, gravityMethods inherited from class UniversalObject
distanceTo, hashCode, id, item, name, orbit, orbiters, orbiting
-
Constructor Details
-
SimpleAlienWorld
public SimpleAlienWorld(String name, PlanetaryType type, Orbit orbit, StarSystem orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) -
SimpleAlienWorld
public SimpleAlienWorld(String name, PlanetaryType type, Orbit orbit, PlanetaryObject orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity)
-
-
Method Details
-
generateChunk
protected final void generateChunk(@Nonnull org.bukkit.generator.ChunkGenerator.ChunkData chunk, @Nonnull Random random, @Nonnull org.bukkit.generator.WorldInfo world, int chunkX, int chunkZ) Description copied from class:AlienWorldGenerate a chunk- Specified by:
generateChunkin classAlienWorld
-
generateSurface
protected final void generateSurface(@Nonnull org.bukkit.generator.ChunkGenerator.ChunkData chunk, @Nonnull Random random, @Nonnull org.bukkit.generator.WorldInfo world, int chunkX, int chunkZ) Description copied from class:AlienWorldOptionally, generate the surface step of the world- Overrides:
generateSurfacein classAlienWorld
-
generateMaterial
@Nonnull protected abstract org.bukkit.Material generateMaterial(@Nonnull Random random, int x, int y, int z, int top) -
getTop
@Nullable protected it.unimi.dsi.fastutil.objects.ObjectIntPair<org.bukkit.Material> getTop()Returns anObjectIntPairof the top block material and the number of top blocks. Used for the} methodinvalid @link
{@link #AlienWorld#generateSurface(ChunkGenerator.ChunkData, Random, WorldInfo, int, int)- Returns:
- an
ObjectIntPairof the top block material and the number of top blocks, or null if there is none
-
getCraterSettings
Gets the settings used for crater generation, or null if there are no craters- Returns:
- the settings used for crater generation, or null if there are no craters
-
getBiome
@Nonnull protected abstract org.bukkit.block.Biome getBiome() -
getBiomeProvider
@Nonnull protected final org.bukkit.generator.BiomeProvider getBiomeProvider(@Nonnull org.bukkit.generator.WorldInfo info) Description copied from class:AlienWorldGet theBiomeProviderfor this world- Overrides:
getBiomeProviderin classAlienWorld- Returns:
- the
BiomeProviderfor this world, or null for vanilla biomes
-
generateMore
protected void generateMore(@Nonnull org.bukkit.generator.ChunkGenerator.ChunkData chunk, @Nonnull org.bukkit.util.noise.SimplexOctaveGenerator generator, @Nonnull Random random, int realX, int realZ, int x, int z, int height) Generate additional things after the main materials and biomes have been generated -
getAverageHeight
protected int getAverageHeight()Average block height of the world, similar to sea level -
getMaxDeviation
protected int getMaxDeviation()Maximum y deviation -
getOctaves
protected int getOctaves()Octave generator octaves -
getScale
protected double getScale()Octave generator scale -
getAmplitude
protected double getAmplitude()Octave generator amplitude -
getFrequency
protected double getFrequency()Octave generator frequency -
smoothenTerrain
protected boolean smoothenTerrain()Square the noise before calculating height. This makes for smoother terrain.
-