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
|
java.util.List<AbstractEntityPlayer> |
getAllPlayers() |
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 |
int |
getIdForBiome(Biome biome) |
int |
getIdForState(TileState state) |
AbstractEntityPlayer |
getPlayer(java.lang.String name) |
AbstractEntityPlayer |
getPlayer(java.util.UUID id)
Gets a player with the specified
UUID from the world |
DynamicRegistryInfo |
getRegInfo() |
java.util.List<IWorldGenerator> |
getSortedGenerators() |
int |
getSpawnX() |
TileState |
getStateForId(int id) |
NameToIndexInfo |
getTileRegInfo() |
WorldInfo |
getWorldInfo() |
boolean |
isChunkLoaded(int x,
int y) |
boolean |
isDaytime() |
boolean |
isNighttime() |
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 |
removeEntity(Entity entity,
IChunk chunk) |
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, getLowestAirUpwards, getSkyLight, getState, getState, getTileEntity, getTileEntity, getTileEntity, getTileEntity, isClient, isServer, removeEntity, removeTileEntity, scheduleUpdate, setArtificialLight, setBiome, setDirty, setSkyLight, setState, setStateIChunk 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 otherwiseint getIdForState(TileState state)
TileState getStateForId(int id)
NameToIndexInfo getTileRegInfo()
int getIdForBiome(Biome biome)
Biome getBiomeForId(int id)
NameToIndexInfo getBiomeRegInfo()
DynamicRegistryInfo getRegInfo()
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()
java.util.List<AbstractEntityPlayer> getAllPlayers()
boolean isDaytime()
boolean isNighttime()