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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    extractBlockName(String blockString)
    method to remove the Block{} to only get the String related to the block Identifier
    loadFromJson(net.minecraft.world.StructureWorldAccess world, Path chunkFilePath)
    method to load structure from a JSON file
    static void
    placeStructure(net.minecraft.world.StructureWorldAccess world, List<DefaultBlockList> defaultBlockLists)
    method to place the structure
    static List<Path>
    verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.BlockPos pos)
    method to verify if there's a JSON files in the chunk folder
    static List<Path>
    verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.ChunkPos chunk)
    method to verify if there's a JSON files in the chunk folder
    static List<Path>
    verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.world.chunk.Chunk chunk)
    method to verify if there's a JSON files in the chunk folder

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LoadChunkShapeInfo

      public LoadChunkShapeInfo()
  • Method Details

    • loadFromJson

      public static List<DefaultBlockList> 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, List<DefaultBlockList> defaultBlockLists)
      method to place the structure
      Parameters:
      world - the world the structure will spawn in
      defaultBlockLists - the list of blockList that compose the structure
    • verifyFiles

      public static List<Path> verifyFiles(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
    • verifyFiles

      public static List<Path> verifyFiles(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
    • verifyFiles

      public static List<Path> verifyFiles(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