Class ChunkPosManager

java.lang.Object
fr.rodofire.ewc.world.chunk.ChunkPosManager

public class ChunkPosManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChunkPosManager(@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 Type
    Method
    Description
    boolean
    canGenerate(Set<net.minecraft.world.level.ChunkPos> chunkPosSet, int x, int z)
     
    boolean
    canPlaceMultiChunk(Set<net.minecraft.world.level.ChunkPos> chunkPosSet, int maxDistance)
     
    boolean
    containsChunk(net.minecraft.world.level.ChunkPos chunkPos)
     
    net.minecraft.world.level.ChunkPos
     
    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
    boolean
    put(net.minecraft.world.level.ChunkPos chunkPos)
    Method to avoid chain call.
    void
    putAll(Set<net.minecraft.world.level.ChunkPos> chunks)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void putAll(Set<net.minecraft.world.level.ChunkPos> chunks)
    • 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

      public boolean canGenerate(Set<net.minecraft.world.level.ChunkPos> chunkPosSet, int x, int z)
    • getOffset

      public net.minecraft.world.level.ChunkPos getOffset()