Fix API chunk world gen
This commit is contained in:
@@ -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
|
||||
|
||||
+4
-4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user