mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-05 02:10:24 +01:00
get light section count from dimension type, add some missing getters to DimensionType
This commit is contained in:
parent
9de6c5aa8f
commit
1065ad346e
@ -391,7 +391,7 @@ public abstract class Chunk implements Viewable, Tickable, DataContainer {
|
||||
updateLightPacket.chunkX = getChunkX();
|
||||
updateLightPacket.chunkZ = getChunkZ();
|
||||
|
||||
final int sectionCount = 16 + 2; //todo
|
||||
final int sectionCount = (getInstance().getDimensionType().getTotalHeight() / 16) + 2;
|
||||
final int maskLength = (int) Math.ceil((double) sectionCount / 64);
|
||||
|
||||
updateLightPacket.skyLightMask = new long[maskLength];
|
||||
|
@ -199,6 +199,14 @@ public class DimensionType {
|
||||
return this.piglinSafe;
|
||||
}
|
||||
|
||||
public int getMinY() {
|
||||
return minY;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public int getLogicalHeight() {
|
||||
return this.logicalHeight;
|
||||
}
|
||||
@ -211,6 +219,10 @@ public class DimensionType {
|
||||
return this.infiniburn;
|
||||
}
|
||||
|
||||
public int getTotalHeight() {
|
||||
return minY + height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
Loading…
Reference in New Issue
Block a user