Skip to content

Commit 4b9cf03

Browse files
committed
Refine accessor visibillity
1 parent d33b1b3 commit 4b9cf03

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack;
3030
import de.bluecolored.bluemap.core.world.*;
3131
import de.bluecolored.bluemap.core.world.biome.Biome;
32+
import lombok.AccessLevel;
3233
import lombok.Getter;
3334
import org.jetbrains.annotations.Nullable;
3435

@@ -46,7 +47,7 @@ public class ExtendedBlock implements BlockAccess {
4647
private @Nullable BlockProperties properties;
4748

4849
private @Nullable Mask renderMask;
49-
private final MaskArea maskArea = new MaskArea();
50+
@Getter(AccessLevel.PROTECTED) private final MaskArea maskArea = new MaskArea();
5051

5152
private boolean insideRenderBoundsCalculated, insideRenderBounds;
5253
private boolean isCaveCalculated, isCave;
@@ -134,7 +135,10 @@ public BlockProperties getProperties() {
134135
return properties;
135136
}
136137

137-
private Mask getRenderMask() {
138+
/**
139+
* The returned {@link Mask} is only valid for the area currently defined in {@link #getMaskArea()}
140+
*/
141+
protected Mask getRenderMask() {
138142
if (renderMask == null) {
139143
maskArea.setAround(x, z);
140144
renderMask = maskArea.apply(renderSettings.getRenderMask());
@@ -166,7 +170,7 @@ public boolean isRemoveIfCave() {
166170
return isCave;
167171
}
168172

169-
private static class MaskArea {
173+
protected static class MaskArea {
170174
private int minX, minZ, maxX, maxZ;
171175

172176
public MaskArea() {
@@ -179,14 +183,14 @@ public boolean isInside(int x, int z) {
179183
z >= minZ && z <= maxZ;
180184
}
181185

182-
public void setAround(int x, int z) {
186+
private void setAround(int x, int z) {
183187
this.minX = (x >> 4) << 4;
184188
this.minZ = (z >> 4) << 4;
185189
this.maxX = minX + 15;
186190
this.maxZ = minZ + 15;
187191
}
188192

189-
public void copyFrom(MaskArea maskArea) {
193+
private void copyFrom(MaskArea maskArea) {
190194
this.minX = maskArea.minX;
191195
this.minZ = maskArea.minZ;
192196
this.maxX = maskArea.maxX;

0 commit comments

Comments
 (0)