Class LoadChunkShapeInfo
java.lang.Object
net.rodofire.easierworldcreator.fileutil.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 structureverifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.BlockPos pos) method to verify if there's a JSON files in the chunk folderverifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.ChunkPos chunk) method to verify if there's a JSON files in the chunk folderverifyFiles(net.minecraft.world.StructureWorldAccess world, net.minecraft.world.chunk.Chunk chunk) method to verify if there's a JSON files in the chunk folder
-
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- Parameters:
world- the world the structure will spawn inblockLists- 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 structurechunk- the chunk that will be converted into aChunkPos- 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 structurepos- theBlockPosthat will be converted into aChunkPos- 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 structurechunk- the chunk that needs to be verified- Returns:
- the list of the structure path to be placed later
-
extractBlockName
- Parameters:
blockString- theStringthat needs to be separated- Returns:
- the String related to the
Block
-