Package fr.rodofire.ewc.world.chunk
Class ChunkPosManager
java.lang.Object
fr.rodofire.ewc.world.chunk.ChunkPosManager
-
Constructor Summary
ConstructorsConstructorDescriptionChunkPosManager(@NotNull net.minecraft.world.level.WorldGenLevel world) ChunkPosManager(@NotNull net.minecraft.world.level.WorldGenLevel world, Set<net.minecraft.world.level.ChunkPos> toTest) ChunkPosManager(@NotNull net.minecraft.world.level.WorldGenLevel world, net.minecraft.world.level.ChunkPos toTest) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanGenerate(Set<net.minecraft.world.level.ChunkPos> chunkPosSet, int x, int z) booleancanPlaceMultiChunk(Set<net.minecraft.world.level.ChunkPos> chunkPosSet, int maxDistance) booleancontainsChunk(net.minecraft.world.level.ChunkPos chunkPos) net.minecraft.world.level.ChunkPosbooleanisMultiChunk(Set<net.minecraft.world.level.ChunkPos> posSetMap, net.minecraft.core.BlockPos centerPos) method to know if the shape should use multi-chunk featurebooleanput(net.minecraft.world.level.ChunkPos chunkPos) Method to avoid chain call.void
-
Constructor Details
-
ChunkPosManager
public ChunkPosManager(@NotNull @NotNull net.minecraft.world.level.WorldGenLevel world) -
ChunkPosManager
public ChunkPosManager(@NotNull @NotNull net.minecraft.world.level.WorldGenLevel world, Set<net.minecraft.world.level.ChunkPos> toTest) -
ChunkPosManager
public ChunkPosManager(@NotNull @NotNull net.minecraft.world.level.WorldGenLevel world, net.minecraft.world.level.ChunkPos toTest)
-
-
Method Details
-
put
public boolean put(net.minecraft.world.level.ChunkPos chunkPos) Method to avoid chain call. If a chunk is not generated, it is added to the non-generated chunks. If the chunk is generated and can be placed, it will be added- Parameters:
chunkPos- the pos to put- Returns:
- true, it can accept world-gen blocks, false if not
-
putAll
-
containsChunk
public boolean containsChunk(net.minecraft.world.level.ChunkPos chunkPos) -
isMultiChunk
public boolean isMultiChunk(Set<net.minecraft.world.level.ChunkPos> posSetMap, net.minecraft.core.BlockPos centerPos) method to know if the shape should use multi-chunk feature- Parameters:
posSetMap- the map that will determine if the shape is multi-chunk- Returns:
- true if it is, false if not
-
canPlaceMultiChunk
public boolean canPlaceMultiChunk(Set<net.minecraft.world.level.ChunkPos> chunkPosSet, int maxDistance) -
canGenerate
-
getOffset
public net.minecraft.world.level.ChunkPos getOffset()
-