Class FlatWorld
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.FlatWorld
An
AlienWorld that is... flat. Earth is definitely not a subclass of this- See Also:
-
Field Summary
Fields inherited from class AlienWorld
CHUNK_VER_KEYFields inherited from class UniversalObject
id, orbitLevel -
Constructor Summary
ConstructorsConstructorDescriptionFlatWorld(String name, PlanetaryType type, Orbit orbit, PlanetaryObject orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) FlatWorld(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 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 abstract org.bukkit.block.BiomegetBiome()Gets the biome of this flat worldprotected final org.bukkit.generator.BiomeProvidergetBiomeProvider(org.bukkit.generator.WorldInfo info) Get theBiomeProviderfor this worldprotected abstract it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap<org.bukkit.Material> Gets the layers of this world.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
-
FlatWorld
public FlatWorld(String name, PlanetaryType type, Orbit orbit, StarSystem orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) -
FlatWorld
public FlatWorld(String name, PlanetaryType type, Orbit orbit, PlanetaryObject orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity)
-
-
Method Details
-
getLayers
@Nonnull protected abstract it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap<org.bukkit.Material> getLayers()Gets the layers of this world. The returned value is a sorted map of ints andMaterial, with each int being the top bound (inclusive) of the material's generation. See theEuropaimplementation for an example. Or, if you need one in Javadoc,protected Int2ObjectSortedMapgetLayers() { return new Int2ObjectLinkedOpenHashMapinvalid input: '<'>() {{ put(30, MaterialCompat.safe(XMaterial.PACKED_ICE)); put(60, MaterialCompat.safe(XMaterial.ICE)); }}; } - Returns:
- the layers of this world
-
getBiome
@Nonnull protected abstract org.bukkit.block.Biome getBiome()Gets the biome of this flat world- Returns:
- the biome of this world
-
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
-
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
-