Package org.spongepowered.api.world
Interface WorldType
-
- All Superinterfaces:
ContextSource,DefaultedRegistryValue
@CatalogedBy(WorldTypes.class) public interface WorldType extends DefaultedRegistryValue, ContextSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatambientLighting()Gets the amount of lighting a client will play as an effect while traversing aworldof this type.WorldTypeTemplateasTemplate()booleanbedsUsable()BiomeSamplerbiomeSampler()Gets theBiomeSampler.doublecoordinateMultiplier()booleancreateDragonFight()WorldTypeEffecteffect()java.util.Optional<MinecraftDayTime>fixedTime()booleanhasCeiling()Gets if aworldof this type is generated with a ceiling at some pre-determined y value composed ofBlockTypes.BEDROCK.booleanhasRaids()Gets ifplayerswho have thePotionEffectTypes.BAD_OMENeffect could cause aRaidwhile existing in aworldof this type.booleanhasSkylight()intlogicalHeight()Gets the maximumYvalue that teleportation logic performed viaItemTypes.CHORUS_FRUITorportal typesmay use to determine the exitlocationof the teleport or the generation of a portal itself.booleannatural()Gets if portals created via the standardPortalTypes.NETHER, both via the API or game mechanics, will spawnZombifiedPiglinrandomly.booleanpiglinSafe()Gets if, whenFalse, aPiglinwill transform into aZombifiedPiglin, over time, while existing in aworldof this type.booleanrespawnAnchorsUsable()Gets ifplayerscan charge and useBlockTypes.RESPAWN_ANCHORwhile existing in aworldof this type.booleanscorching()-
Methods inherited from interface org.spongepowered.api.service.context.ContextSource
context
-
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
-
-
-
Method Detail
-
effect
WorldTypeEffect effect()
- Returns:
- The effect
-
biomeSampler
BiomeSampler biomeSampler()
Gets theBiomeSampler.- Returns:
- The biome sampler
-
scorching
boolean scorching()
Gets ifBlockTypes.WATERwill evaporate orBlockTypes.WET_SPONGEwill become aBlockTypes.SPONGE. AdditionallyFluidTypes.FLOWING_LAVAwill spread faster and thinner.- Returns:
- True if scorching, false if not
-
natural
boolean natural()
Gets if portals created via the standardPortalTypes.NETHER, both via the API or game mechanics, will spawnZombifiedPiglinrandomly. Otherwise, theItemTypes.COMPASSwill not function and spin randomly.- Returns:
- True if natural, false if not
-
coordinateMultiplier
double coordinateMultiplier()
Gets the coordinate scale applied to the coordinates of aplayertraveling in aworldof this type. Best seen when transferring that player from one world to another (as the player's coordinates will adjust to the scale of the destination world's).- Returns:
- The scale
-
hasSkylight
boolean hasSkylight()
Gets if aworldof this type will have lighting global lighting, used in game mechanics such asEntityspawning.In Vanilla, used in weather, lighting engine, and respawning mechanics
- Returns:
- True if skylight, false if not
-
hasCeiling
boolean hasCeiling()
Gets if aworldof this type is generated with a ceiling at some pre-determined y value composed ofBlockTypes.BEDROCK. Most notable usage of this is for thetype.In Vanilla, used in weather, map items, and respawning mechanics
- Returns:
- True if a ceiling is present, false if not
-
ambientLighting
float ambientLighting()
Gets the amount of lighting a client will play as an effect while traversing aworldof this type.In Vanilla, the value will be between
0.0and1.0- Returns:
- The lighting value
-
fixedTime
java.util.Optional<MinecraftDayTime> fixedTime()
- Returns:
- If present, a fixed day time. Otherwise, free flowing time
-
piglinSafe
boolean piglinSafe()
Gets if, whenFalse, aPiglinwill transform into aZombifiedPiglin, over time, while existing in aworldof this type.- Returns:
- True if piglin are safe, false if they will zombify
-
bedsUsable
boolean bedsUsable()
- Returns:
- True if beds are usable, false if not
-
respawnAnchorsUsable
boolean respawnAnchorsUsable()
Gets ifplayerscan charge and useBlockTypes.RESPAWN_ANCHORwhile existing in aworldof this type.- Returns:
- True if respawn anchors are usable, false if not
-
hasRaids
boolean hasRaids()
Gets ifplayerswho have thePotionEffectTypes.BAD_OMENeffect could cause aRaidwhile existing in aworldof this type.- Returns:
- True if bad omens could case a raid, false if not
-
logicalHeight
int logicalHeight()
Gets the maximumYvalue that teleportation logic performed viaItemTypes.CHORUS_FRUITorportal typesmay use to determine the exitlocationof the teleport or the generation of a portal itself.- Returns:
- The logical height
-
createDragonFight
boolean createDragonFight()
- Returns:
- True if dragon fight spawns, false if not
-
asTemplate
WorldTypeTemplate asTemplate()
-
-