Class SaveNbt
java.lang.Object
net.rodofire.easierworldcreator.structure.SaveNbt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.structure.StructureTemplate.PalettedBlockInfoListcreatePalettedBlockInfoList(List<net.minecraft.structure.StructureTemplate.StructureBlockInfo> combinedList) avoid errors when using the mixinstatic voidgenerateNbtFiles(net.minecraft.world.StructureWorldAccess world, List<net.minecraft.util.Identifier> nbtlist, net.minecraft.util.math.ChunkPos chunk) static voidgenerateNbtFiles(net.minecraft.world.StructureWorldAccess world, List<net.minecraft.util.Identifier> nbtlist, net.minecraft.world.chunk.Chunk chunk) static List<net.minecraft.util.Identifier> loadNBTFiles(net.minecraft.util.math.ChunkPos chunk) static List<net.minecraft.util.Identifier> loadNBTFiles(net.minecraft.world.chunk.Chunk chunk) static voidremoveNbtFiles(List<net.minecraft.util.Identifier> nbtlist) when you want, you can remove the filestatic voidsaveNbtDuringWorldGen(net.minecraft.world.StructureWorldAccess world, List<BlockList> blockLists, String featureName) This method converts the List of BlockList to a nbt file.
-
Constructor Details
-
SaveNbt
public SaveNbt()
-
-
Method Details
-
saveNbtDuringWorldGen
public static void saveNbtDuringWorldGen(net.minecraft.world.StructureWorldAccess world, List<BlockList> blockLists, String featureName) This method converts the List of BlockList to a nbt file.That is a way to generate a really large structure. Since that the nbt is saved during world gen, no block entity should be present.
The methods receive a list of blockList. The list represents all the blocks of the generated structure. for every BlockPos and BlockStates, the method verify the chunk it belongs to and add it to the Map chunkBlockInfoMap. This divides the structure into chunks that will be saved just after converting the first list into a
StructureTemplate.PalettedBlockInfoListThe Structure will be located in the following path : [save_name]/generated/easierworldcreator/[chunk.x-chunk.z]/custom_feature_[Random long]- Parameters:
blockLists- a list of BlockList to save it into the nbt file
-
generateNbtFiles
public static void generateNbtFiles(net.minecraft.world.StructureWorldAccess world, List<net.minecraft.util.Identifier> nbtlist, net.minecraft.world.chunk.Chunk chunk) -
generateNbtFiles
public static void generateNbtFiles(net.minecraft.world.StructureWorldAccess world, List<net.minecraft.util.Identifier> nbtlist, net.minecraft.util.math.ChunkPos chunk) -
removeNbtFiles
when you want, you can remove the file- Parameters:
nbtlist-
-
loadNBTFiles
public static List<net.minecraft.util.Identifier> loadNBTFiles(net.minecraft.world.chunk.Chunk chunk) -
loadNBTFiles
public static List<net.minecraft.util.Identifier> loadNBTFiles(net.minecraft.util.math.ChunkPos chunk) -
createPalettedBlockInfoList
public static net.minecraft.structure.StructureTemplate.PalettedBlockInfoList createPalettedBlockInfoList(List<net.minecraft.structure.StructureTemplate.StructureBlockInfo> combinedList) avoid errors when using the mixin- Parameters:
combinedList- the list that will be converted toStructureTemplate.PalettedBlockInfoList- Returns:
- the
StructureTemplate.PalettedBlockInfoListrelated to the list
-