mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
Add API to get/set inhabited time of a Chunk
By: md_5 <git@md-5.net>
This commit is contained in:
parent
136363e657
commit
6a3743030e
1 changed files with 12 additions and 0 deletions
|
@ -199,6 +199,18 @@ public class CraftChunk implements Chunk {
|
|||
return getWorld().getPluginChunkTickets(getX(), getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getInhabitedTime() {
|
||||
return getHandle().q();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInhabitedTime(long ticks) {
|
||||
Preconditions.checkArgument(ticks >= 0, "ticks cannot be negative");
|
||||
|
||||
getHandle().b(ticks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkSnapshot getChunkSnapshot() {
|
||||
return getChunkSnapshot(true, false, false);
|
||||
|
|
Loading…
Reference in a new issue