Class LoadChunkShapeInfo

java.lang.Object
net.rodofire.easierworldcreator.nbtutil.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 List<BlockList> loadFromJson(net.minecraft.world.StructureWorldAccess world, Path chunkFilePath) throws IOException
      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
      Throws:
      IOException
    • placeStructure

      public static void placeStructure(net.minecraft.world.StructureWorldAccess world, List<BlockList> blockLists)
      method to place the structure
    • verifyFiles

      public static List<Path> verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.world.chunk.Chunk chunk) throws IOException
      Throws:
      IOException
    • verifyFiles

      public static List<Path> verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.BlockPos pos) throws IOException
      Throws:
      IOException
    • verifyFiles

      public static List<Path> verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.ChunkPos chunk) throws IOException
      method to verify if there is json files in the chunk folder
      Returns:
      the list of the structure path to be placed later
      Throws:
      IOException
    • extractBlockName

      public static String extractBlockName(String blockString)
      method to remove the Block{} to only get the String related to the block Identifier
      Parameters:
      blockString -
      Returns:
    • removeFile

      public static void removeFile(Path path)