Fix API chunk world gen

This commit is contained in:
James Seibel
2024-07-20 17:57:58 -05:00
parent 17b5ba0ae1
commit 568ff40df6
3 changed files with 28 additions and 20 deletions
@@ -29,7 +29,7 @@ import java.util.List;
* Contains a list of {@link DhApiTerrainDataPoint} representing the blocks in a Minecraft chunk.
*
* @author Builderb0y, James Seibel
* @version 2023-12-21
* @version 2024-7-21
* @since API 2.0.0
*
* @see IDhApiWrapperFactory
@@ -41,8 +41,8 @@ public class DhApiChunk
public final int chunkPosX;
public final int chunkPosZ;
public final int topYBlockPos;
public final int bottomYBlockPos;
public final int topYBlockPos;
private final List<List<DhApiTerrainDataPoint>> dataPoints;
@@ -52,12 +52,12 @@ public class DhApiChunk
// constructors //
//==============//
public DhApiChunk(int chunkPosX, int chunkPosZ, int topYBlockPos, int bottomYBlockPos)
public DhApiChunk(int chunkPosX, int chunkPosZ, int bottomYBlockPos, int topYBlockPos)
{
this.chunkPosX = chunkPosX;
this.chunkPosZ = chunkPosZ;
this.topYBlockPos = topYBlockPos;
this.bottomYBlockPos = bottomYBlockPos;
this.topYBlockPos = topYBlockPos;
// populate the array to prevent null pointers
this.dataPoints = new ArrayList<>(16 * 16); // 256
@@ -26,7 +26,7 @@ import com.seibel.distanthorizons.api.interfaces.block.IDhApiBlockStateWrapper;
* Holds a single datapoint of terrain data.
*
* @author James Seibel
* @version 2022-11-13
* @version 2024-7-20
* @since API 1.0.0
*/
public class DhApiTerrainDataPoint
@@ -42,22 +42,22 @@ public class DhApiTerrainDataPoint
public final int blockLightLevel;
public final int skyLightLevel;
public final int topYBlockPos;
public final int bottomYBlockPos;
public final int topYBlockPos;
public final IDhApiBlockStateWrapper blockStateWrapper;
public final IDhApiBiomeWrapper biomeWrapper;
public DhApiTerrainDataPoint(byte detailLevel, int blockLightLevel, int skyLightLevel, int topYBlockPos, int bottomYBlockPos, IDhApiBlockStateWrapper blockStateWrapper, IDhApiBiomeWrapper biomeWrapper)
public DhApiTerrainDataPoint(byte detailLevel, int blockLightLevel, int skyLightLevel, int bottomYBlockPos, int topYBlockPos, IDhApiBlockStateWrapper blockStateWrapper, IDhApiBiomeWrapper biomeWrapper)
{
this.detailLevel = detailLevel;
this.blockLightLevel = blockLightLevel;
this.skyLightLevel = skyLightLevel;
this.topYBlockPos = topYBlockPos;
this.bottomYBlockPos = bottomYBlockPos;
this.topYBlockPos = topYBlockPos;
this.blockStateWrapper = blockStateWrapper;
this.biomeWrapper = biomeWrapper;