public interface IChunk extends IChunkOrWorld
Constants.CHUNK_SIZE, Constants.CHUNK_SIZE,
these parts are what are known as chunks.
| Modifier and Type | Method and Description |
|---|---|
byte |
getArtificialLightInner(int x,
int y)
Gets the artificial light at the specified coordinates inside of the chunk rather
than the tile coordinates in the world
|
Biome |
getBiomeInner(int x,
int y) |
byte |
getCombinedLightInner(int x,
int y)
Gets the combined light at the specified coordinates inside of the chunk rather
than the tile coordinates in the world
|
int |
getGridX()
Gets the chunk's grid x coordinate
This is different from getX() in that it
returns the grid coordinate of the chunk, meaning a chunk
at grid coordinates 1, 1 would start at tile coordinates
Constants.CHUNK_SIZE, Constants.CHUNK_SIZE |
int |
getGridY()
Gets the chunk's grid y coordinate
This is different from getX() in that it
returns the grid coordinate of the chunk, meaning a chunk
at grid coordinates 1, 1 would start at tile coordinates
Constants.CHUNK_SIZE, Constants.CHUNK_SIZE |
java.util.Map<AbstractEntityPlayer,MutableInt> |
getLeftPlayerTimers() |
java.util.List<AbstractEntityPlayer> |
getPlayersInRange() |
java.util.List<AbstractEntityPlayer> |
getPlayersLeftRange() |
int |
getScheduledUpdateAmount() |
byte |
getSkylightInner(int x,
int y)
Gets the skylight at the specified coordinates inside of the chunk rather
than the tile coordinates in the world
|
TileState |
getStateInner(int x,
int y) |
TileState |
getStateInner(TileLayer layer,
int x,
int y) |
IWorld |
getWorld()
Gets the
IWorld that this chunk is in |
int |
getX()
Gets the chunk's tile x coordinate
This is different from getGridX() in that it
returns the coordinate of the chunk based on its tile coordinates, meaning a chunk
that contains tile coordinates 1, 1 would be at grid coordinates
0, 0 |
int |
getY()
Gets the chunk's tile y coordinate
This is different from getGridX() in that it
returns the coordinate of the chunk based on its tile coordinates, meaning a chunk
that contains tile coordinates 1, 1 would be at grid coordinates
0, 0 |
boolean |
needsSave() |
void |
save(DataSet set)
Saves the chunk to the given
DataSet |
void |
setArtificialLightInner(int x,
int y,
byte light)
Sets the artificial light at the specified coordinates inside of the chunk rather
than the tile coordinates in the world
|
void |
setBiomeInner(int x,
int y,
Biome biome) |
void |
setGenerating(boolean generating)
Puts the chunk into generating mode which means that it will not call
Tile.onChangeAround(IWorld, int, int, TileLayer, int, int, TileLayer)
or be marked dirty if anything changes |
void |
setSkylightInner(int x,
int y,
byte light)
Sets the skylight at the specified coordinates inside of the chunk rather
than the tile coordinates in the world
|
void |
setStateInner(int x,
int y,
TileState tile) |
void |
setStateInner(TileLayer layer,
int x,
int y,
TileState tile)
Sets a tile at the specified coordinates inside of the chunk rather
than the tile coordinates in the world
|
boolean |
shouldUnload() |
void |
update(IGameInstance game)
Updates the chunk
This is not supposed to be used by mods |
addEntity, addTileEntity, getAllEntities, getAllTileEntities, getArtificialLight, getBiome, getCombinedLight, getEntities, getEntities, getEntities, getEntities, getEntity, getLowestAirUpwards, getSkyLight, getState, getState, getTileEntity, getTileEntity, isClient, isServer, removeEntity, removeTileEntity, scheduleUpdate, setArtificialLight, setBiome, setDirty, setSkyLight, setState, setStatejava.util.List<AbstractEntityPlayer> getPlayersInRange()
java.util.List<AbstractEntityPlayer> getPlayersLeftRange()
getLeftPlayerTimers()java.util.Map<AbstractEntityPlayer,MutableInt> getLeftPlayerTimers()
getPlayersLeftRange()int getGridX()
getX() in that it
returns the grid coordinate of the chunk, meaning a chunk
at grid coordinates 1, 1 would start at tile coordinates
Constants.CHUNK_SIZE, Constants.CHUNK_SIZEint getGridY()
getX() in that it
returns the grid coordinate of the chunk, meaning a chunk
at grid coordinates 1, 1 would start at tile coordinates
Constants.CHUNK_SIZE, Constants.CHUNK_SIZEint getX()
getGridX() in that it
returns the coordinate of the chunk based on its tile coordinates, meaning a chunk
that contains tile coordinates 1, 1 would be at grid coordinates
0, 0int getY()
getGridX() in that it
returns the coordinate of the chunk based on its tile coordinates, meaning a chunk
that contains tile coordinates 1, 1 would be at grid coordinates
0, 0TileState getStateInner(int x, int y)
void setStateInner(int x,
int y,
TileState tile)
void setStateInner(TileLayer layer, int x, int y, TileState tile)
layer - The layerx - The x coordinatey - The y coordinatebyte getSkylightInner(int x,
int y)
x - The x coordinatey - The y coordinatevoid setSkylightInner(int x,
int y,
byte light)
x - The x coordinatey - The y coordinatelight - The skylightbyte getArtificialLightInner(int x,
int y)
x - The x coordinatey - The y coordinatevoid setArtificialLightInner(int x,
int y,
byte light)
x - The x coordinatey - The y coordinatelight - The artificial lightvoid setGenerating(boolean generating)
Tile.onChangeAround(IWorld, int, int, TileLayer, int, int, TileLayer)
or be marked dirty if anything changesgenerating - If it is generatingboolean needsSave()
boolean shouldUnload()
void update(IGameInstance game)
game - The chunkbyte getCombinedLightInner(int x,
int y)
x - The x coordinatey - The y coordinateint getScheduledUpdateAmount()
IChunkOrWorld.scheduleUpdate(int, int, TileLayer, int)Biome getBiomeInner(int x, int y)
void setBiomeInner(int x,
int y,
Biome biome)