public interface IWorld extends IChunkOrWorld
| Modifier and Type | Method and Description |
|---|---|
void |
causeLightUpdate(int x,
int y)
Causes a light update at the given position
Will recursively calculate light in the surrounding area |
AbstractEntityPlayer |
createPlayer(java.util.UUID id,
IPlayerDesign design,
io.netty.channel.Channel channel)
Creates a player from the given
UUID and adds it to the world
Not supposed to be used by mods |
void |
destroyTile(int x,
int y,
TileLayer layer,
Entity destroyer,
boolean shouldDrop)
Helper method to remove a tile, spawn its particles and spawn its drops
|
Biome |
getBiomeForId(int id) |
NameToIndexInfo |
getBiomeRegInfo() |
IChunk |
getChunk(double x,
double y)
Gets an
IChunk from the specified tile coordinates
This is different from getChunkFromGridCoords(int, int) in that it
getst a chunk based on the tile coordinates of the chunk, meaning a chunk
that contains tile coordinates 1, 1 would be at grid coordinates
0, 0 |
IChunk |
getChunkFromGridCoords(int gridX,
int gridY)
Gets an
IChunk from the specified grid coordinates
This is different from getChunk(double, double) in that it
gets a chunk based on the grid coordinates of the chunk, meaning a chunk
at grid coordinates 1, 1 would start at tile coordinates
Constants.CHUNK_SIZE, Constants.CHUNK_SIZE |
java.util.List<BoundBox> |
getCollisions(BoundBox area)
|
int |
getIdForBiome(Biome biome) |
int |
getIdForTile(Tile tile) |
AbstractEntityPlayer |
getPlayer(java.lang.String name) |
AbstractEntityPlayer |
getPlayer(java.util.UUID id)
Gets a player with the specified
UUID from the world |
java.util.List<IWorldGenerator> |
getSortedGenerators() |
int |
getSpawnX() |
Tile |
getTileForId(int id) |
NameToIndexInfo |
getTileRegInfo() |
WorldInfo |
getWorldInfo() |
boolean |
isChunkLoaded(int x,
int y) |
boolean |
isPosLoaded(int x,
int y) |
void |
notifyNeighborsOfChange(int x,
int y,
TileLayer layer)
Notifies neighboring tiles that a change or an update has occured, calling their
Tile.onChangeAround(IWorld, int, int, TileLayer, int, int, TileLayer) methods |
void |
save() |
void |
savePlayer(AbstractEntityPlayer player)
Saves the specified player to disk
Not supposed to be used by mods |
void |
unloadChunk(IChunk chunk)
Forces a chunk to unload
Not supposed to be used by mods |
addEntity, addTileEntity, getAllEntities, getAllTileEntities, getArtificialLight, getBiome, getCombinedLight, getEntities, getEntities, getEntities, getEntities, getEntity, getLowestAirUpwards, getMeta, getMeta, getSkyLight, getTile, getTile, getTileEntity, getTileEntity, removeEntity, removeTileEntity, scheduleUpdate, setArtificialLight, setBiome, setDirty, setMeta, setMeta, setSkyLight, setTile, setTile, setTile, setTileIChunk getChunkFromGridCoords(int gridX, int gridY)
IChunk from the specified grid coordinates
getChunk(double, double) in that it
gets a chunk based on the grid coordinates of the chunk, meaning a chunk
at grid coordinates 1, 1 would start at tile coordinates
Constants.CHUNK_SIZE, Constants.CHUNK_SIZEgridX - The grid x coordinategridY - The grid y coordinateIChunk getChunk(double x, double y)
IChunk from the specified tile coordinates
getChunkFromGridCoords(int, int) in that it
getst a chunk based on the tile coordinates of the chunk, meaning a chunk
that contains tile coordinates 1, 1 would be at grid coordinates
0, 0x - The tile x coordinatey - The tile y coordinateboolean isPosLoaded(int x,
int y)
x - The tile x coordinatey - The tile y coordinatetrue if the chunk that contains the specified tile coordinates is loaded, false otherwiseboolean isChunkLoaded(int x,
int y)
x - The grid x coordinatey - The grid y coordinatetrue if the chunk at the specified grid coordinates is loaded, false otherwisejava.util.List<BoundBox> getCollisions(BoundBox area)
area - The bound box to check for tiles inint getIdForTile(Tile tile)
tile - The tileTile getTileForId(int id)
id - The idNameToIndexInfo getTileRegInfo()
getIdForTile(Tile),
getTileForId(int)int getIdForBiome(Biome biome)
Biome getBiomeForId(int id)
NameToIndexInfo getBiomeRegInfo()
WorldInfo getWorldInfo()
void notifyNeighborsOfChange(int x,
int y,
TileLayer layer)
Tile.onChangeAround(IWorld, int, int, TileLayer, int, int, TileLayer) methodsx - The x coordinatey - The y coordinatelayer - The layerAbstractEntityPlayer createPlayer(java.util.UUID id, IPlayerDesign design, io.netty.channel.Channel channel)
UUID and adds it to the world
id - The id of the playerchannel - A channel if it is a connected playerAbstractEntityPlayer getPlayer(java.util.UUID id)
UUID from the worldid - The id of the playernull if there is no player with the idAbstractEntityPlayer getPlayer(java.lang.String name)
void destroyTile(int x,
int y,
TileLayer layer,
Entity destroyer,
boolean shouldDrop)
x - The x coordinatey - The y coordinatelayer - The layerdestroyer - The entity destroying it, or null if there is noneshouldDrop - If its items should dropint getSpawnX()
void causeLightUpdate(int x,
int y)
x - The x coordinatey - The y coordinatevoid unloadChunk(IChunk chunk)
chunk - The chunkvoid savePlayer(AbstractEntityPlayer player)
player - The playerjava.util.List<IWorldGenerator> getSortedGenerators()
void save()