java.lang.Object
com.github.imdabigboss.easydatapack.api.dimentions.CustomDimension

public abstract class CustomDimension extends Object
This class represents a custom dimension.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.bukkit.World
    createWorld​(long seed)
    Creates the world for this dimension.
    abstract @NonNull org.bukkit.Location
    dimensionToNormal​(org.bukkit.Location location)
    Converts a location from the custom dimension to the overworld.
    abstract @NonNull String
    getBiomeName​(org.bukkit.block.Biome biome)
    Gets the name of the given biome in this custom dimension.
    protected abstract @NonNull org.bukkit.generator.BiomeProvider
    Gets the biome provider of the dimension.
    protected abstract @NonNull CustomChunkGenerator
    Gets the chunk generator of the dimension.
    abstract @NonNull org.bukkit.World.Environment
    Gets the world environment of the dimension: NETHER, THE_END, NORMAL, or CUSTOM.
    abstract @NonNull String
    Gets the name of the dimension.
    abstract @NonNull org.bukkit.Material
    Gets the material used as a portal frame block.
    abstract @NonNull org.bukkit.Location
    normalToDimension​(org.bukkit.Location location)
    Converts a location from the overworld to the custom dimension.
    abstract boolean
    spawnEntity​(@NonNull org.bukkit.Location location, @NonNull org.bukkit.entity.EntityType original, @NonNull org.bukkit.entity.Entity spawned)
    This function is called by the spawn entity event, when an entity is spawned naturally in the dimension.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomDimension

      public CustomDimension()
  • Method Details

    • getPortalFrameMaterial

      public abstract @NonNull org.bukkit.Material getPortalFrameMaterial()
      Gets the material used as a portal frame block.
      Returns:
      the material used as a portal frame block
    • getName

      public abstract @NonNull String getName()
      Gets the name of the dimension.
      Returns:
      the name of the dimension
    • getEnvironment

      public abstract @NonNull org.bukkit.World.Environment getEnvironment()
      Gets the world environment of the dimension: NETHER, THE_END, NORMAL, or CUSTOM.
      Returns:
      the world environment of the dimension
    • dimensionToNormal

      public abstract @NonNull org.bukkit.Location dimensionToNormal(org.bukkit.Location location)
      Converts a location from the custom dimension to the overworld.
      Parameters:
      location - the location in the custom dimension
      Returns:
      the location in the overworld
    • normalToDimension

      public abstract @NonNull org.bukkit.Location normalToDimension(org.bukkit.Location location)
      Converts a location from the overworld to the custom dimension.
      Parameters:
      location - the location in the overworld
      Returns:
      the location in the custom dimension
    • getBiomeProvider

      protected abstract @NonNull org.bukkit.generator.BiomeProvider getBiomeProvider()
      Gets the biome provider of the dimension.
      Returns:
      the biome provider of the dimension
    • getChunkGenerator

      protected abstract @NonNull CustomChunkGenerator getChunkGenerator()
      Gets the chunk generator of the dimension.
      Returns:
      the chunk generator of the dimension
    • getBiomeName

      public abstract @NonNull String getBiomeName(org.bukkit.block.Biome biome)
      Gets the name of the given biome in this custom dimension.
      Parameters:
      biome - the biome
      Returns:
      the name of the biome
    • spawnEntity

      public abstract boolean spawnEntity(@NonNull org.bukkit.Location location, @NonNull org.bukkit.entity.EntityType original, @NonNull org.bukkit.entity.Entity spawned)
      This function is called by the spawn entity event, when an entity is spawned naturally in the dimension.
      Parameters:
      location - the location where the entity is spawned
      original - the original entity type
      spawned - the entity type that will be spawned
      Returns:
      if the entity should be allowed to spawn
    • createWorld

      public @Nullable org.bukkit.World createWorld(long seed)
      Creates the world for this dimension.
      Parameters:
      seed - the seed of the world
      Returns:
      the world