Interface IWorld

public interface IWorld
  • Method Details

    • getNearbyEntities

      IEntity[] getNearbyEntities​(int x, int y, int z, int range, int type)
    • getNearbyEntities

      IEntity[] getNearbyEntities​(IPos pos, int range, int type)
    • getClosestEntity

      IEntity getClosestEntity​(int x, int y, int z, int range, int type)
    • getClosestEntity

      IEntity getClosestEntity​(IPos pos, int range, int type)
    • getAllEntities

      IEntity[] getAllEntities​(int type)
      This gets all currently loaded entities in a world
      type - EntityType}
      An array of all entities
    • getTime

      long getTime()
      The world time
    • setTime

      void setTime​(long time)
    • getTotalTime

      long getTotalTime()
      The total world time (doesn't change with the /time set command
    • getBlock

      IBlock getBlock​(int x, int y, int z)
      The block at the given position. Returns null if there isn't a block
    • setBlock

      void setBlock​(int x, int y, int z, java.lang.String name, int meta)
    • removeBlock

      void removeBlock​(int x, int y, int z)
    • getLightValue

      float getLightValue​(int x, int y, int z)
      Returns a value between 0 and 1
    • getPlayer

      IPlayer getPlayer​(java.lang.String name)
      name - The name of the player to be returned
      The Player with name. Null is returned when the player isnt found
    • isDay

      boolean isDay()
    • isRaining

      boolean isRaining()
    • getDimension

      IDimension getDimension()
    • setRaining

      void setRaining​(boolean bo)
    • thunderStrike

      void thunderStrike​(double x, double y, double z)
    • playSoundAt

      void playSoundAt​(IPos pos, java.lang.String sound, float volume, float pitch)
      Sound will be played in a 16 block range
      pos - Pos at which to play
      sound - Sound resource name
      volume - default 1
      pitch - default 1
    • spawnParticle

      void spawnParticle​(java.lang.String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count)
      Sends a packet from the server to the client everytime its called. Probably should not use this too much.
      particle - Particle name. Particle name list:
      x - The x position
      y - The y position
      z - The z position
      dx - Usually used for the x motion
      dy - Usually used for the y motion
      dz - Usually used for the z motion
      speed - Speed of the particles, usually between 0 and 1
      count - Particle count
    • broadcast

      void broadcast​(java.lang.String message)
    • getScoreboard

      IScoreboard getScoreboard()
    • getTempdata

      IData getTempdata()
      Stores any type of data, but will be gone on restart Temp data is the same cross dimension
    • getStoreddata

      IData getStoreddata()
      Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved. Stored data is the same cross dimension
    • createItem

      IItemStack createItem​(java.lang.String name, int damage, int size)
    • createItemFromNbt

      IItemStack createItemFromNbt​(INbt nbt)
    • explode

      void explode​(double x, double y, double z, float range, boolean fire, boolean grief)
      x - Position x
      y - Position y
      z - Position z
      range - Range of the explosion
      fire - Whether or not the explosion does fire damage
      grief - Whether or not the explosion does damage to blocks
    • getAllPlayers

      IPlayer[] getAllPlayers()
    • getBiomeName

      java.lang.String getBiomeName​(int x, int z)
    • spawnEntity

      void spawnEntity​(IEntity entity)
    • spawnClone

      @Deprecated IEntity spawnClone​(double x, double y, double z, int tab, java.lang.String name)
      Depricated, use the API.clones.spawn instead
    • getClone

      @Deprecated IEntity getClone​(int tab, java.lang.String name)
      Depricated, use the API.clones.get instead
    • getRedstonePower

      int getRedstonePower​(int x, int y, int z)
      value between 0 and 16
    • getMCWorld getMCWorld()
      Expert users only
      Returns minecrafts world
    • getMCBlockPos

      net.minecraft.util.math.BlockPos getMCBlockPos​(int x, int y, int z)
      Expert users only
      Returns minecraft BlockPos object
    • getEntity

      IEntity getEntity​(java.lang.String uuid)
      uuid - entity uuid
      Returns entity based on uuid
    • createEntityFromNBT

      IEntity createEntityFromNBT​(INbt nbt)
    • createEntity

      IEntity createEntity​(java.lang.String id)
    • getSpawnPoint

      IBlock getSpawnPoint()
    • setSpawnPoint

      void setSpawnPoint​(IBlock block)
    • getName

      java.lang.String getName()