public class TridentChunk extends Object implements Chunk
Modifier and Type | Field and Description |
---|---|
ConcurrentSectionTable |
sections |
Modifier | Constructor and Description |
---|---|
protected |
TridentChunk(TridentWorld world,
ChunkLocation coord) |
protected |
TridentChunk(TridentWorld world,
int x,
int z) |
Modifier and Type | Method and Description |
---|---|
CompoundTag |
asNbt() |
PacketPlayOutChunkData |
asPacket() |
Block |
blockAt(int relX,
int y,
int relZ)
Obtains a block relative to the chunk
|
Set<Entity> |
entities()
The entities in the chunk
|
Set<Entity> |
entitiesInternal() |
void |
gen(boolean withPaint) |
void |
generate()
Generates the chunk
|
ArrayList<Entity> |
getEntities(Entity exclude,
BoundingBox boundingBox,
java.util.function.Predicate<? super Entity> predicate)
Find all entities that are colliding with the bounding box
|
boolean |
isLoaded()
Checks the chunk to ensure it is loaded
|
protected int |
lastFileAccess() |
boolean |
load()
Loads the chunk
|
void |
load(CompoundTag root) |
ChunkLocation |
location()
The location of the chunk
|
int |
maxHeightAt(int x,
int z) |
void |
paint(boolean withLock) |
void |
setAt(int x,
int y,
int z,
Substance type,
byte metaData,
byte skyLight,
byte blockLight) |
void |
setAt(Position p,
Substance type,
byte metaData,
byte skyLight,
byte blockLight) |
protected void |
setLastFileAccess(int last) |
ChunkSnapshot |
snapshot()
Obtains a snapshot of the state of the chunk
|
Collection<Tile> |
tiles()
Obtains the tile entities in this chunk
|
Map<Vector,List<BlockMeta>> |
tilesInternal() |
void |
unload()
Unloads the chunk
|
TridentWorld |
world()
The world which contains this chunk
|
int |
x()
Shortcut for:
location().x() |
int |
z()
Shortcut for:
location().z() |
public final ConcurrentSectionTable sections
protected TridentChunk(TridentWorld world, int x, int z)
protected TridentChunk(TridentWorld world, ChunkLocation coord)
protected int lastFileAccess()
protected void setLastFileAccess(int last)
public boolean isLoaded()
Chunk
public Set<Entity> entities()
Chunk
public Collection<Tile> tiles()
Chunk
public Set<Entity> entitiesInternal()
public Map<Vector,List<BlockMeta>> tilesInternal()
public void gen(boolean withPaint)
public void paint(boolean withLock)
public int maxHeightAt(int x, int z)
public ChunkLocation location()
Chunk
public TridentWorld world()
Chunk
public Block blockAt(int relX, int y, int relZ)
Chunk
public ChunkSnapshot snapshot()
Chunk
public PacketPlayOutChunkData asPacket()
public void load(CompoundTag root)
public CompoundTag asNbt()
public void setAt(int x, int y, int z, Substance type, byte metaData, byte skyLight, byte blockLight)
public ArrayList<Entity> getEntities(Entity exclude, BoundingBox boundingBox, java.util.function.Predicate<? super Entity> predicate)
Chunk
getEntities
in interface Chunk
exclude
- the entity to exclude from the searchboundingBox
- The bounding box to search inpredicate
- Predicate to filter resultsCopyright © 2016. All rights reserved.