diff --git a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/data/IDhApiTerrainDataRepo.java b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/data/IDhApiTerrainDataRepo.java
index 04f89ad17..1c097cacf 100644
--- a/api/src/main/java/com/seibel/distanthorizons/api/interfaces/data/IDhApiTerrainDataRepo.java
+++ b/api/src/main/java/com/seibel/distanthorizons/api/interfaces/data/IDhApiTerrainDataRepo.java
@@ -11,7 +11,7 @@ import com.seibel.distanthorizons.api.objects.data.DhApiTerrainDataPoint;
* Used to interface with Distant Horizons' terrain data.
*
* @author James Seibel
- * @version 2023-6-16
+ * @version 2023-6-22
*/
public interface IDhApiTerrainDataRepo
{
@@ -75,7 +75,7 @@ public interface IDhApiTerrainDataRepo
* Sets the LOD data for the given chunk at the chunk's position.
*
* Notes:
- * - Only works if the given {@link IDhApiLevelWrapper} points to a loaded level.
+ * - Only works if the given {@link IDhApiLevelWrapper} points to a loaded level.
* - If the player travels to this chunk, or the chunk is updated is some other way; your data will be replaced
* by whatever the current chunk is.
* - This method may not update the LOD data immediately. Any other chunks have
diff --git a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/data/DhApiTerrainDataRepo.java b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/data/DhApiTerrainDataRepo.java
index 44ea2b102..8358f6834 100644
--- a/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/data/DhApiTerrainDataRepo.java
+++ b/core/src/main/java/com/seibel/distanthorizons/core/api/external/methods/data/DhApiTerrainDataRepo.java
@@ -63,8 +63,9 @@ public class DhApiTerrainDataRepo implements IDhApiTerrainDataRepo
-
-
+ //================//
+ // Getter Methods //
+ //================//
@Override
public DhApiResult getSingleDataPointAtBlockPos(IDhApiLevelWrapper levelWrapper, int blockPosX, int blockPosY, int blockPosZ)
@@ -96,21 +97,7 @@ public class DhApiTerrainDataRepo implements IDhApiTerrainDataRepo
}
- @Override
- public DhApiResult raycast(IDhApiLevelWrapper levelWrapper,
- double rayOriginX, double rayOriginY, double rayOriginZ,
- float rayDirectionX, float rayDirectionY, float rayDirectionZ,
- int maxRayBlockLength)
- {
- return this.raycastLodData(levelWrapper, new Vec3d(rayOriginX, rayOriginY, rayOriginZ), new Vec3f(rayDirectionX, rayDirectionY, rayDirectionZ), maxRayBlockLength);
- }
-
-
-
-
- //================//
- // Getter Methods //
- //================//
+ // private getters //
/** Returns a single API terrain datapoint that contains the given Y block position */
private static DhApiResult getTerrainDataAtBlockYPos(IDhApiLevelWrapper levelWrapper, DhLodPos requestedColumnPos, Integer blockYPos)
@@ -180,7 +167,7 @@ public class DhApiTerrainDataRepo implements IDhApiTerrainDataRepo
return DhApiResult.createFail("Unable to get terrain data before the world has loaded.");
}
- if (!ILevelWrapper.class.isInstance(levelWrapper))
+ if (!(levelWrapper instanceof ILevelWrapper))
{
// custom level wrappers aren't supported,
// the API user must get a level wrapper from our code somewhere
@@ -287,7 +274,7 @@ public class DhApiTerrainDataRepo implements IDhApiTerrainDataRepo
return new DhApiTerrainDataPoint(detailLevel,
FullDataPointUtil.getLight(dataPoint), topY, bottomY,
blockState, biomeWrapper);
- }
+ }
@@ -295,6 +282,14 @@ public class DhApiTerrainDataRepo implements IDhApiTerrainDataRepo
// raycasting methods //
//====================//
+ @Override
+ public DhApiResult raycast(IDhApiLevelWrapper levelWrapper,
+ double rayOriginX, double rayOriginY, double rayOriginZ,
+ float rayDirectionX, float rayDirectionY, float rayDirectionZ,
+ int maxRayBlockLength)
+ {
+ return this.raycastLodData(levelWrapper, new Vec3d(rayOriginX, rayOriginY, rayOriginZ), new Vec3f(rayDirectionX, rayDirectionY, rayDirectionZ), maxRayBlockLength);
+ }
/**
* private since it uses non-API objects
@@ -424,6 +419,7 @@ public class DhApiTerrainDataRepo implements IDhApiTerrainDataRepo
// setter methods //
//================//
+ @Override
public DhApiResult overwriteChunkDataAsync(IDhApiLevelWrapper levelWrapper, Object[] chunkObjectArray) throws ClassCastException
{
if (!(levelWrapper instanceof ILevelWrapper))