Class AlienWorld
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
- Direct Known Subclasses:
EarthOrbit, FlatWorld, SimpleAlienWorld, Titan
-
Field Summary
FieldsFields inherited from class UniversalObject
id, orbitLevel -
Constructor Summary
ConstructorsConstructorDescriptionAlienWorld(String name, PlanetaryType type, Orbit orbit, PlanetaryObject orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) AlienWorld(String name, PlanetaryType type, Orbit orbit, StarSystem orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddBlockMapping(org.bukkit.Material vanillaItem, io.github.thebusybiscuit.slimefun5.api.items.SlimefunItemStack slimefunItem) To allow worlds to be made ofSlimefunItems without using huge amounts ofBlockStorage, I invented block mappings.final voidaddSpecies(Alien<?>... aliens) final voidapplyEffects(org.bukkit.entity.Player p) booleanprotected booleanOverride and set to false if your world is unimportantprotected abstract voidgenerateChunk(org.bukkit.generator.ChunkGenerator.ChunkData chunk, Random random, org.bukkit.generator.WorldInfo world, int chunkX, int chunkZ) Generate a chunkprotected voidgenerateChunk(org.bukkit.generator.ChunkGenerator.ChunkData chunk, org.bukkit.generator.ChunkGenerator.BiomeGrid grid, Random random, org.bukkit.World world, int chunkX, int chunkZ) Deprecated.generation has been changed.protected 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 intReturns the y layer at which bedrock is generatedprotected org.bukkit.generator.BiomeProvidergetBiomeProvider(org.bukkit.generator.WorldInfo info) Get theBiomeProviderfor this worldio.github.thebusybiscuit.slimefun5.api.items.SlimefunItemStackgetMappedItem(org.bukkit.block.Block b) protected abstract voidgetPopulators(List<org.bukkit.generator.BlockPopulator> populators) Add all chunk populators to this listfinal <T> TgetSetting(String path, Class<T> clazz, T defaultValue) protected org.bukkit.Worldprotected org.bukkit.generator.ChunkGeneratorreplaceChunkGenerator(org.bukkit.generator.ChunkGenerator defaultGenerator) Optionally replace the defaultChunkGeneratorfor this worldfinal voidMethods 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
-
Field Details
-
CHUNK_VER_KEY
public static final org.bukkit.NamespacedKey CHUNK_VER_KEY
-
-
Constructor Details
-
AlienWorld
public AlienWorld(String name, PlanetaryType type, Orbit orbit, StarSystem orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity) -
AlienWorld
public AlienWorld(String name, PlanetaryType type, Orbit orbit, PlanetaryObject orbiting, org.bukkit.inventory.ItemStack baseItem, DayCycle dayCycle, Atmosphere atmosphere, Gravity gravity)
-
-
Method Details
-
loadWorld
@Nullable protected org.bukkit.World loadWorld()- Specified by:
loadWorldin classPlanetaryWorld
-
addSpecies
-
getSetting
-
addBlockMapping
public final void addBlockMapping(@Nonnull org.bukkit.Material vanillaItem, @Nonnull io.github.thebusybiscuit.slimefun5.api.items.SlimefunItemStack slimefunItem) To allow worlds to be made ofSlimefunItems without using huge amounts ofBlockStorage, I invented block mappings. Simply pass aMaterialand aSlimefunItemStack, and any generatedvanillaItems will dropslimefunItems -
getMappedItem
@Nullable public io.github.thebusybiscuit.slimefun5.api.items.SlimefunItemStack getMappedItem(org.bukkit.block.Block b) -
canSpawnVanillaMobs
public boolean canSpawnVanillaMobs() -
enabledByDefault
protected boolean enabledByDefault()Override and set to false if your world is unimportant -
generateChunk
@Deprecated protected void generateChunk(@Nonnull org.bukkit.generator.ChunkGenerator.ChunkData chunk, @Nonnull org.bukkit.generator.ChunkGenerator.BiomeGrid grid, @Nonnull Random random, @Nonnull org.bukkit.World world, int chunkX, int chunkZ) Deprecated.generation has been changed. usegenerateChunk(ChunkGenerator.ChunkData, Random, WorldInfo, int, int)insteadGenerate a chunk -
generateChunk
protected abstract void generateChunk(@Nonnull org.bukkit.generator.ChunkGenerator.ChunkData chunk, @Nonnull Random random, @Nonnull org.bukkit.generator.WorldInfo world, int chunkX, int chunkZ) Generate a chunk -
generateSurface
protected void generateSurface(@Nonnull org.bukkit.generator.ChunkGenerator.ChunkData chunk, @Nonnull Random random, @Nonnull org.bukkit.generator.WorldInfo world, int chunkX, int chunkZ) Optionally, generate the surface step of the world -
getPopulators
protected abstract void getPopulators(@Nonnull List<org.bukkit.generator.BlockPopulator> populators) Add all chunk populators to this list -
getBiomeProvider
@Nullable protected org.bukkit.generator.BiomeProvider getBiomeProvider(@Nonnull org.bukkit.generator.WorldInfo info) Get theBiomeProviderfor this world- Returns:
- the
BiomeProviderfor this world, or null for vanilla biomes
-
replaceChunkGenerator
@Nonnull protected org.bukkit.generator.ChunkGenerator replaceChunkGenerator(@Nonnull org.bukkit.generator.ChunkGenerator defaultGenerator) Optionally replace the defaultChunkGeneratorfor this world -
getBedrockLayer
protected int getBedrockLayer()Returns the y layer at which bedrock is generated- Returns:
- the y layer of bedrock in this world
-
applyEffects
public final void applyEffects(@Nonnull org.bukkit.entity.Player p) -
tickWorld
public final void tickWorld()
-