Class LoadChunkShapeInfo

java.lang.Object
net.rodofire.easierworldcreator.fileutil.LoadChunkShapeInfo

public class LoadChunkShapeInfo extends Object
class to load JSON files related to multi-chunk features
  • Constructor Details

    • LoadChunkShapeInfo

      public LoadChunkShapeInfo()
  • Method Details

    • loadFromJson

      public static DefaultBlockListComparator loadFromJson(net.minecraft.world.StructureWorldAccess world, Path chunkFilePath)
      method to load structure from a JSON file
      Parameters:
      world - the world the shape will spawn in
      chunkFilePath - the path of the shape
      Returns:
      a List used later to place the BlockStates
    • placeStructure

      public static void placeStructure(net.minecraft.world.StructureWorldAccess world, DefaultBlockListComparator defaultBlockLists)
      method to place the structure
      Parameters:
      world - the world the structure will spawn in
      defaultBlockLists - the list of blockList that compose the structure
    • getWorldGenFiles

      public static List<Path> getWorldGenFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.world.chunk.Chunk chunk)
      method to verify if there's a JSON files in the chunk folder
      Parameters:
      world - the world of the structure
      chunk - the chunk that will be converted into a ChunkPos
      Returns:
      the list of the structure path to be placed later
    • getWorldGenFiles

      public static List<Path> getWorldGenFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.BlockPos pos)
      method to verify if there's a JSON files in the chunk folder
      Parameters:
      world - the world of the structure
      pos - the BlockPos that will be converted into a ChunkPos
      Returns:
      the list of the structure path to be placed later
    • getWorldGenFiles

      public static List<Path> getWorldGenFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.ChunkPos chunk)
      method to verify if there's a JSON files in the chunk folder
      Parameters:
      world - the world of the structure
      chunk - the chunk that needs to be verified
      Returns:
      the list of the structure path to be placed later
    • extractBlockName

      public static String extractBlockName(String blockString)
      method to remove the Block{} to only get the String related to the block Identifier
      Parameters:
      blockString - the String that needs to be separated
      Returns:
      the String related to the Block