Class SpongeWorld

java.lang.Object
com.sk89q.worldedit.world.AbstractWorld
com.sk89q.worldedit.sponge.SpongeWorld
All Implemented Interfaces:
com.sk89q.worldedit.extent.Extent, com.sk89q.worldedit.extent.InputExtent, com.sk89q.worldedit.extent.OutputExtent, com.sk89q.worldedit.registry.Keyed, com.sk89q.worldedit.world.World

public final class SpongeWorld extends com.sk89q.worldedit.world.AbstractWorld
An adapter to Minecraft worlds for WorldEdit.
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<com.sk89q.worldedit.util.SideEffect>
    applySideEffects(com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.block.BlockState previousType, com.sk89q.worldedit.util.SideEffectSet sideEffectSet)
     
    boolean
    canPlaceAt(com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.block.BlockState blockState)
     
    boolean
    clearContainerBlockContents(com.sk89q.worldedit.math.BlockVector3 position)
     
    com.sk89q.worldedit.entity.Entity
    createEntity(com.sk89q.worldedit.util.Location location, com.sk89q.worldedit.entity.BaseEntity entity)
     
    void
    dropItem(com.sk89q.worldedit.math.Vector3 position, com.sk89q.worldedit.blocks.BaseItemStack item)
     
    boolean
     
    boolean
    generateTree(com.sk89q.worldedit.util.TreeGenerator.TreeType type, com.sk89q.worldedit.EditSession editSession, com.sk89q.worldedit.math.BlockVector3 position)
     
    com.sk89q.worldedit.world.biome.BiomeType
    getBiome(com.sk89q.worldedit.math.BlockVector3 position)
     
    com.sk89q.worldedit.world.block.BlockState
    getBlock(com.sk89q.worldedit.math.BlockVector3 position)
     
    int
    getBlockLightLevel(com.sk89q.worldedit.math.BlockVector3 position)
     
    List<? extends com.sk89q.worldedit.entity.Entity>
     
    List<? extends com.sk89q.worldedit.entity.Entity>
    getEntities(com.sk89q.worldedit.regions.Region region)
     
    com.sk89q.worldedit.world.block.BaseBlock
    getFullBlock(com.sk89q.worldedit.math.BlockVector3 position)
     
    int
     
    int
     
     
    long
     
    com.sk89q.worldedit.math.BlockVector3
     
     
    com.sk89q.worldedit.world.weather.WeatherType
     
    int
     
    id()
     
    boolean
    regenerate(com.sk89q.worldedit.regions.Region region, com.sk89q.worldedit.extent.Extent extent, com.sk89q.worldedit.world.RegenOptions options)
     
    void
    sendBiomeUpdates(Iterable<com.sk89q.worldedit.math.BlockVector2> chunks)
     
    boolean
    setBiome(com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.biome.BiomeType biome)
     
    <B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>>
    boolean
    setBlock(com.sk89q.worldedit.math.BlockVector3 position, B block, com.sk89q.worldedit.util.SideEffectSet sideEffects)
     
    void
    setWeather(com.sk89q.worldedit.world.weather.WeatherType weatherType)
     
    void
    setWeather(com.sk89q.worldedit.world.weather.WeatherType weatherType, long duration)
     
    void
    simulateBlockMine(com.sk89q.worldedit.math.BlockVector3 position)
     

    Methods inherited from class com.sk89q.worldedit.world.AbstractWorld

    checkLoadedChunk, commit, createLiquidMask, dropItem, fixAfterFastMode, fixLighting, getMaximumPoint, getMinimumPoint, playEffect, queueBlockBreakEffect, setBlock, useItem

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.sk89q.worldedit.extent.InputExtent

    getBiome

    Methods inherited from interface com.sk89q.worldedit.registry.Keyed

    getId

    Methods inherited from interface com.sk89q.worldedit.extent.OutputExtent

    fullySupports3DBiomes, setBiome

    Methods inherited from interface com.sk89q.worldedit.world.World

    generateFeature, generateStructure, notifyAndLightBlock, regenerate, regenerate, setBlock
  • Method Details

    • getName

      public String getName()
    • id

      public String id()
    • getStoragePath

      public Path getStoragePath()
      Specified by:
      getStoragePath in interface com.sk89q.worldedit.world.World
      Overrides:
      getStoragePath in class com.sk89q.worldedit.world.AbstractWorld
    • getBlock

      public com.sk89q.worldedit.world.block.BlockState getBlock(com.sk89q.worldedit.math.BlockVector3 position)
    • getFullBlock

      public com.sk89q.worldedit.world.block.BaseBlock getFullBlock(com.sk89q.worldedit.math.BlockVector3 position)
    • setBlock

      public <B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>> boolean setBlock(com.sk89q.worldedit.math.BlockVector3 position, B block, com.sk89q.worldedit.util.SideEffectSet sideEffects) throws com.sk89q.worldedit.WorldEditException
      Throws:
      com.sk89q.worldedit.WorldEditException
    • applySideEffects

      public Set<com.sk89q.worldedit.util.SideEffect> applySideEffects(com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.block.BlockState previousType, com.sk89q.worldedit.util.SideEffectSet sideEffectSet) throws com.sk89q.worldedit.WorldEditException
      Throws:
      com.sk89q.worldedit.WorldEditException
    • clearContainerBlockContents

      public boolean clearContainerBlockContents(com.sk89q.worldedit.math.BlockVector3 position)
    • regenerate

      public boolean regenerate(com.sk89q.worldedit.regions.Region region, com.sk89q.worldedit.extent.Extent extent, com.sk89q.worldedit.world.RegenOptions options)
    • generateTree

      public boolean generateTree(com.sk89q.worldedit.util.TreeGenerator.TreeType type, com.sk89q.worldedit.EditSession editSession, com.sk89q.worldedit.math.BlockVector3 position)
    • getBlockLightLevel

      public int getBlockLightLevel(com.sk89q.worldedit.math.BlockVector3 position)
    • getBiome

      public com.sk89q.worldedit.world.biome.BiomeType getBiome(com.sk89q.worldedit.math.BlockVector3 position)
    • setBiome

      public boolean setBiome(com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.biome.BiomeType biome)
    • dropItem

      public void dropItem(com.sk89q.worldedit.math.Vector3 position, com.sk89q.worldedit.blocks.BaseItemStack item)
    • simulateBlockMine

      public void simulateBlockMine(com.sk89q.worldedit.math.BlockVector3 position)
    • canPlaceAt

      public boolean canPlaceAt(com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.block.BlockState blockState)
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.sk89q.worldedit.world.World
      Overrides:
      hashCode in class Object
    • getMaxY

      public int getMaxY()
      Specified by:
      getMaxY in interface com.sk89q.worldedit.world.World
      Overrides:
      getMaxY in class com.sk89q.worldedit.world.AbstractWorld
    • getMinY

      public int getMinY()
      Specified by:
      getMinY in interface com.sk89q.worldedit.world.World
      Overrides:
      getMinY in class com.sk89q.worldedit.world.AbstractWorld
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface com.sk89q.worldedit.world.World
      Overrides:
      equals in class Object
    • getEntities

      public List<? extends com.sk89q.worldedit.entity.Entity> getEntities(com.sk89q.worldedit.regions.Region region)
    • getEntities

      public List<? extends com.sk89q.worldedit.entity.Entity> getEntities()
    • createEntity

      @Nullable public com.sk89q.worldedit.entity.Entity createEntity(com.sk89q.worldedit.util.Location location, com.sk89q.worldedit.entity.BaseEntity entity)
    • sendBiomeUpdates

      public void sendBiomeUpdates(Iterable<com.sk89q.worldedit.math.BlockVector2> chunks)
      Specified by:
      sendBiomeUpdates in interface com.sk89q.worldedit.world.World
      Overrides:
      sendBiomeUpdates in class com.sk89q.worldedit.world.AbstractWorld
    • getWeather

      public com.sk89q.worldedit.world.weather.WeatherType getWeather()
      Specified by:
      getWeather in interface com.sk89q.worldedit.world.World
      Overrides:
      getWeather in class com.sk89q.worldedit.world.AbstractWorld
    • getRemainingWeatherDuration

      public long getRemainingWeatherDuration()
      Specified by:
      getRemainingWeatherDuration in interface com.sk89q.worldedit.world.World
      Overrides:
      getRemainingWeatherDuration in class com.sk89q.worldedit.world.AbstractWorld
    • setWeather

      public void setWeather(com.sk89q.worldedit.world.weather.WeatherType weatherType)
      Specified by:
      setWeather in interface com.sk89q.worldedit.world.World
      Overrides:
      setWeather in class com.sk89q.worldedit.world.AbstractWorld
    • setWeather

      public void setWeather(com.sk89q.worldedit.world.weather.WeatherType weatherType, long duration)
      Specified by:
      setWeather in interface com.sk89q.worldedit.world.World
      Overrides:
      setWeather in class com.sk89q.worldedit.world.AbstractWorld
    • getSpawnPosition

      public com.sk89q.worldedit.math.BlockVector3 getSpawnPosition()