MCAChunk encapsulate fileds

This commit is contained in:
Jesse Boyd 2017-04-10 22:57:54 +10:00
parent bd6eb2b7b8
commit e6edcd0739
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -25,9 +25,6 @@ import java.util.Map;
import java.util.Set;
import java.util.UUID;
import static com.google.common.base.Preconditions.checkNotNull;
public class MCAChunk extends FaweChunk<Void> {
// ids: byte[16][4096]
@ -113,6 +110,22 @@ public class MCAChunk extends FaweChunk<Void> {
return buffered.toByteArray();
}
public long getInhabitedTime() {
return inhabitedTime;
}
public long getLastUpdate() {
return lastUpdate;
}
public void setInhabitedTime(long inhabitedTime) {
this.inhabitedTime = inhabitedTime;
}
public void setLastUpdate(long lastUpdate) {
this.lastUpdate = lastUpdate;
}
public void copyFrom(MCAChunk other, int minX, int maxX, int minY, int maxY, int minZ, int maxZ, int offsetX, int offsetY, int offsetZ) {
minY = Math.max(-offsetY - minY, minY);
maxY = Math.min(255 - offsetY, maxY);