From 4b07f6c8e40b7d8347b9e76c475f82bc03b24faa Mon Sep 17 00:00:00 2001 From: James Seibel Date: Tue, 8 Oct 2024 07:08:51 -0500 Subject: [PATCH] minor ColumnRenderSource refactor --- .../core/dataObjects/render/ColumnRenderSource.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/ColumnRenderSource.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/ColumnRenderSource.java index 3a57220c2..8c12157b5 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/ColumnRenderSource.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/render/ColumnRenderSource.java @@ -51,7 +51,8 @@ public class ColumnRenderSource implements IDataSource public static final boolean DO_SAFETY_CHECKS = ModInfo.IS_DEV_BUILD; public static final byte SECTION_SIZE_OFFSET = DhSectionPos.SECTION_MINIMUM_DETAIL_LEVEL; - public static final int SECTION_SIZE = BitShiftUtil.powerOfTwo(SECTION_SIZE_OFFSET); + /** width of this data in columns */ + public static final int SECTION_SIZE = BitShiftUtil.powerOfTwo(SECTION_SIZE_OFFSET); // 64 public static final DataSourcePool DATA_SOURCE_POOL = new DataSourcePool<>(ColumnRenderSource::createEmptyRenderSource, null /* data source prep/cleanup needs to be done outside the pool since it requires additional inputs */); @@ -142,8 +143,8 @@ public class ColumnRenderSource implements IDataSource { return null; } - else if (posX < 0 || posX >= 64 - || posZ < 0 || posZ >= 64) + else if (posX < 0 || posX >= SECTION_SIZE + || posZ < 0 || posZ >= SECTION_SIZE) { return null; }