Interface WorldType

All Superinterfaces:
ContextSource, DefaultedRegistryValue

  • Method Details

    • effect

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

      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

      boolean natural()
      Gets if portals created via the standard PortalTypes.NETHER, both via the API or game mechanics, will spawn ZombifiedPiglin randomly. Otherwise, the ItemTypes.COMPASS will not function and spin randomly.
      Returns:
      True if natural, false if not
    • coordinateMultiplier

      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

      boolean hasSkylight()
      Gets if a world of this type will have lighting 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

      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

      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

      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

      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

      boolean bedsUsable()
      Gets if players can sleep in a bed while existing in a world of this type.
      Returns:
      True if beds are usable, false if not
    • respawnAnchorsUsable

      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

      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
    • logicalHeight

      int logicalHeight()
      Gets the maximum Y value 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
    • createDragonFight

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

      WorldTypeTemplate asTemplate()