Interface WorldType

All Superinterfaces:
ContextSource, DataHolder, DefaultedRegistryValue, ValueContainer

  • Method Details

    • effect

      default WorldTypeEffect effect()
      Gets the effect that will play for a player traveling in a world of this type.
      Returns:
      The effect
    • scorching

      default boolean scorching()
      Gets if BlockTypes.WATER will evaporate or BlockTypes.WET_SPONGE will become a BlockTypes.SPONGE. Additionally FluidTypes.FLOWING_LAVA will spread faster and thinner.
      Returns:
      True if scorching, false if not
    • natural

      default boolean natural()
      Gets if the world type is considered natural.

      Natural worlds allow sleeping in beds and setting the respawn point, PortalTypes.NETHER portals to spawn ZombifiedPiglin and ItemTypes.COMPASS to work

      Returns:
      True if natural, false if not
    • coordinateMultiplier

      default double coordinateMultiplier()
      Gets the coordinate scale applied to the coordinates of a player traveling in a world of 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

      default boolean hasSkylight()
      Gets if a world of this type will have global lighting, used in game mechanics such as Entity spawning.

      In Vanilla, used in weather, lighting engine, and respawning mechanics

      Returns:
      True if skylight, false if not
    • hasCeiling

      default boolean hasCeiling()
      Gets if a world of this type is generated with a ceiling at some pre-determined y value composed of BlockTypes.BEDROCK. Most notable usage of this is for the type.

      In Vanilla, used in weather, map items, and respawning mechanics

      Returns:
      True if a ceiling is present, false if not
    • ambientLighting

      default float ambientLighting()
      Gets the amount of lighting a client will play as an effect while traversing a world of this type.

      In Vanilla, the value will be between 0.0 and 1.0

      Returns:
      The lighting value
    • fixedTime

      default Optional<MinecraftDayTime> fixedTime()
      Gets if a world of this type will be fixed at a particular time or flow naturally
      Returns:
      If present, a fixed day time. Otherwise, free flowing time
    • piglinSafe

      default boolean piglinSafe()
      Gets if, when False, a Piglin will transform into a ZombifiedPiglin, over time, while existing in a world of this type.
      Returns:
      True if piglin are safe, false if they will zombify
    • bedsUsable

      default boolean bedsUsable()
      Gets if players can sleep in a bed while existing in a world of this type.

      When bed usage is not allowed beds will instead explode.

      Returns:
      True if beds are usable, false if not
    • respawnAnchorsUsable

      default boolean respawnAnchorsUsable()
      Gets if players can charge and use BlockTypes.RESPAWN_ANCHOR while existing in a world of this type.
      Returns:
      True if respawn anchors are usable, false if not
    • hasRaids

      default boolean hasRaids()
      Gets if players who have the PotionEffectTypes.BAD_OMEN effect could cause a Raid while existing in a world of this type.
      Returns:
      True if bad omens could case a raid, false if not
    • floor

      default int floor()
      Gets the minimum Y value that blocks can exist within a world of this type.

      In vanilla this is a multiple of 16 between -2032 and 2016

      Returns:
      The minimum height
    • height

      default int height()
      Gets the total height in which blocks can exist within a world of this type.

      In vanilla this is a multiple of 16 between 16 and 4064. floor() + height() may not be more than 2032

      Returns:
      The maximum height
    • logicalHeight

      default int logicalHeight()
      Gets the maximum height that teleportation logic performed via ItemTypes.CHORUS_FRUIT or portal types may use to determine the exit location of the teleport or the generation of a portal itself.
      Returns:
      The logical height
    • infiniburn

      default Tag<BlockType> infiniburn()
      Gets the tag for blocks that burn indefinitely in a world of this type.
      Returns:
      The infiniburn tag
    • createDragonFight

      default boolean createDragonFight()
      Gets if worlds of this type will spawn the dragon fight mechanics.
      Returns:
      True if dragon fight spawns, false if not
    • spawnLightLimit

      default int spawnLightLimit()
      Returns the light level needed to block monster spawning.
      Returns:
      spawn light limit
    • spawnLightRange

      default Range<Integer> spawnLightRange()
      Returns the light level range needed to block monster spawning.
      Returns:
      the spawn light range