Class LoadChunkShapeInfo
java.lang.Object
net.rodofire.easierworldcreator.nbtutil.LoadChunkShapeInfo
class to load JSON files related to multi-chunk features
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractBlockName(String blockString) loadFromJson(net.minecraft.world.StructureWorldAccess world, Path chunkFilePath) method to load structure from a JSON filestatic voidplaceStructure(net.minecraft.world.StructureWorldAccess world, List<BlockList> blockLists) method to place the structurestatic voidremoveFile(Path path) verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.BlockPos pos) verifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.ChunkPos chunk) method to verify if there is json files in the chunk folderverifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.world.chunk.Chunk chunk)
-
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 inchunkFilePath- the path of the shape- Returns:
- a
Listused 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
- Parameters:
blockString-- Returns:
-
removeFile
-