| Modifier and Type | Method and Description |
|---|---|
void |
addEntity(Entity entity)
Adds the specified
Entity to the world |
void |
addTileEntity(TileEntity tile)
Adds the specified
TileEntity to the world |
java.util.List<Entity> |
getAllEntities() |
java.util.List<TileEntity> |
getAllTileEntities() |
byte |
getArtificialLight(int x,
int y)
Gets the artifical light at the given coordinates
This can be things like torches and furnaces that emit light |
Biome |
getBiome(int x,
int y) |
byte |
getCombinedLight(int x,
int y)
Gets a combination of
getSkyLight(int, int), getArtificialLight(int, int)
and the time of day of the world for the given coordinate to determine the light at which things
are displayed |
java.util.List<Entity> |
getEntities(BoundBox area)
|
<T extends Entity> |
getEntities(BoundBox area,
java.lang.Class<T> type)
|
<T extends Entity> |
getEntities(BoundBox area,
java.lang.Class<T> type,
java.util.function.Predicate<T> test)
|
java.util.List<Entity> |
getEntities(BoundBox area,
java.util.function.Predicate<Entity> test)
|
Entity |
getEntity(java.util.UUID id)
Gets an
Entity with the specified UUID |
int |
getLowestAirUpwards(TileLayer layer,
int x,
int y)
Gets the lowest position from the specified y coordiante upwards at the specified
x coordiante that contains air
Is used to determine the x coordiante of the world's spawn point |
byte |
getSkyLight(int x,
int y)
Gets the sky light at the given coordinates
This is light caused by there being no blocks obstructing the background |
TileState |
getState(int x,
int y) |
TileState |
getState(TileLayer layer,
int x,
int y) |
TileEntity |
getTileEntity(int x,
int y) |
<T extends TileEntity> |
getTileEntity(int x,
int y,
java.lang.Class<T> tileClass)
Gets a
TileEntity of a certain type at the specified coordinates |
boolean |
isClient() |
void |
removeEntity(Entity entity)
Removes the specified
Entity from the world |
void |
removeTileEntity(int x,
int y)
Removes the
TileEntity at the specified coordinates from the world |
void |
scheduleUpdate(int x,
int y,
TileLayer layer,
int time)
Schedules an update in the world that will cause
Tile.onScheduledUpdate(IWorld, int, int, TileLayer)
to be called for the tile at the specified coordinates after the specified time has run out |
void |
setArtificialLight(int x,
int y,
byte light)
Sets the artifical light at the given coordinates to the given amount
This can be things like torches and furnaces that emit light This is not supposed to be used by mods |
void |
setBiome(int x,
int y,
Biome biome) |
void |
setDirty(int x,
int y)
Tells the world or chunk that it needs to be saved
|
void |
setSkyLight(int x,
int y,
byte light)
Sets the sky light at the given coordinates to the given amount
This is light caused by there being no blocks obstructing the background This is not supposed to be used by mods |
void |
setState(int x,
int y,
TileState tile) |
void |
setState(TileLayer layer,
int x,
int y,
TileState tile) |
TileState getState(int x, int y)
void setState(int x,
int y,
TileState tile)
void addEntity(Entity entity)
Entity to the worldentity - The entityvoid addTileEntity(TileEntity tile)
TileEntity to the worldtile - The tileentityvoid removeEntity(Entity entity)
Entity from the worldentity - The entityvoid removeTileEntity(int x,
int y)
TileEntity at the specified coordinates from the worldx - The x coordinatey - The y coordinateTileEntity getTileEntity(int x, int y)
x - The x coordinatey - The y coordinateTileEntity at the specified coordinates<T extends TileEntity> T getTileEntity(int x, int y, java.lang.Class<T> tileClass)
TileEntity of a certain type at the specified coordinatesT - The typex - The x coordinatey - The y coordinatetileClass - The tileentity classnull if there is none or it is not the right typejava.util.List<TileEntity> getAllTileEntities()
TileEntity in the worldEntity getEntity(java.util.UUID id)
Entity with the specified UUIDid - The idjava.util.List<Entity> getEntities(BoundBox area)
area - The bounding boxjava.util.List<Entity> getEntities(BoundBox area, java.util.function.Predicate<Entity> test)
area - The bounding boxtest - The test to pass<T extends Entity> java.util.List<T> getEntities(BoundBox area, java.lang.Class<T> type)
Entity in the specified BoundBox that are instances of
or extend the specified Classarea - The bounding boxtype - The type class<T extends Entity> java.util.List<T> getEntities(BoundBox area, java.lang.Class<T> type, java.util.function.Predicate<T> test)
Entity in the specified BoundBox that are instances of
or extend the specified Class and pass the specified Predicatearea - The bounding boxtype - The type classtest - The test to passbyte getCombinedLight(int x,
int y)
getSkyLight(int, int), getArtificialLight(int, int)
and the time of day of the world for the given coordinate to determine the light at which things
are displayedx - The x coordinatey - The y coordinatebyte getSkyLight(int x,
int y)
x - The x coordinatey - The y coordinatebyte getArtificialLight(int x,
int y)
x - The x coordinatey - The y coordinatevoid setSkyLight(int x,
int y,
byte light)
x - The x coordinatey - The y coordinatelight - The lightvoid setArtificialLight(int x,
int y,
byte light)
x - The x coordinatey - The y coordinatelight - The lightvoid scheduleUpdate(int x,
int y,
TileLayer layer,
int time)
Tile.onScheduledUpdate(IWorld, int, int, TileLayer)
to be called for the tile at the specified coordinates after the specified time has run outx - The x coordinatey - The y coordinatelayer - The layertime - The time in ticksvoid setDirty(int x,
int y)
x - The x coordinatey - The y coordinateint getLowestAirUpwards(TileLayer layer, int x, int y)
layer - The layerx - The x coordinatey - The y coordinateBiome getBiome(int x, int y)
void setBiome(int x,
int y,
Biome biome)
boolean isClient()