Class DividedBlockListManager
java.lang.Object
fr.rodofire.ewc.blockdata.blocklist.DividedBlockListManager
During world gen, you can not place all your structure if it is larger than 3x3 chunks.
With this call, the
BlockListManager are stored in a Map<ChunkPos, BlockListManager>.
This allows to place the manager only when allowed.
Use this class if you will place a structure during world gen.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DividedBlockListManager> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontains(net.minecraft.world.level.ChunkPos pos) Set<net.minecraft.world.level.ChunkPos> getManager(net.minecraft.world.level.ChunkPos pos) getOrdered(BlockSorter sorter) booleanplaceAll(net.minecraft.world.level.WorldGenLevel world) booleanplaceAllNDelete(net.minecraft.world.level.WorldGenLevel world) voidvoidplaceJson(net.minecraft.world.level.WorldGenLevel worldAccess, String name, net.minecraft.world.level.ChunkPos offset) put(BlockListManager comparator) put(DividedBlockListManager manager) put(net.minecraft.world.level.block.state.BlockState state, long pos) put(net.minecraft.world.level.block.state.BlockState state, long pos, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos) put(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> posList) put(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> posList, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap) put(net.minecraft.world.level.block.state.BlockState state, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList posList) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList posList, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> posList) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> posList, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap, StructurePlacementRuleManager ruler) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos) put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) voidputWithoutVerification(BlockListManager manager) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, long pos) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, long pos, StructurePlacementRuleManager ruler) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos, StructurePlacementRuleManager ruler) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> pos) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> pos, StructurePlacementRuleManager ruler) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos, StructurePlacementRuleManager ruler) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList pos) Method will perform verification on only one position, improving performance but might result in a crash, or behave incorrectly in the case where the BlockPos in not in the good chunk.putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList pos, StructurePlacementRuleManager ruler) Method will perform verification on only one position, improving performance but might result in a crash, or behave incorrectly in the case where the BlockPos in not in the good chunk.putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> pos) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> pos, StructurePlacementRuleManager ruler) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos) putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) putWithoutVerification(net.minecraft.world.level.ChunkPos pos, BlockList blockList) In a controlled environment, you can use this method which doesn't perform any verification, improving performance. !putWithoutVerification(net.minecraft.world.level.ChunkPos pos, BlockListManager manager) In a controlled environment, you can use this method which doesn't perform any verification, improving performance. !
-
Field Details
-
CODEC
-
-
Constructor Details
-
DividedBlockListManager
public DividedBlockListManager() -
DividedBlockListManager
-
-
Method Details
-
put
-
put
-
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.ChunkPos pos, BlockList blockList) In a controlled environment, you can use this method which doesn't perform any verification, improving performance. ! However, in the case where someBlockPosare not in the providedChunkPosbut in another place, it might result in a crash or create unwanted behavior.- Parameters:
pos- the chunkPos where the BlockPos are.blockList- the BlockList related to the chunkPos that will be put- Returns:
- the resulted comparator.
-
put
-
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.ChunkPos pos, BlockListManager manager) In a controlled environment, you can use this method which doesn't perform any verification, improving performance. ! However, in the case where someBlockPosare not in the providedChunkPosbut in another place, it might result in a crash or create unwanted behavior.- Parameters:
pos- the chunkPos where the BlockPos are.manager- the manager related to the chunkPos that will be put- Returns:
- the resulted manager.
-
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList posList) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, long pos) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> posList) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> posList) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList pos) Method will perform verification on only one position, improving performance but might result in a crash, or behave incorrectly in the case where the BlockPos in not in the good chunk. Only use this method in a controlled environment. -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, long pos) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> pos) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> pos) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList posList, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, long pos, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> posList, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> posList, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap, StructurePlacementRuleManager ruler) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap) -
put
public DividedBlockListManager put(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posMap, StructurePlacementRuleManager ruler) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, it.unimi.dsi.fastutil.longs.LongArrayList pos, StructurePlacementRuleManager ruler) Method will perform verification on only one position, improving performance but might result in a crash, or behave incorrectly in the case where the BlockPos in not in the good chunk. Only use this method in a controlled environment. -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, it.unimi.dsi.fastutil.longs.LongArrayList pos, StructurePlacementRuleManager ruler) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, long pos, StructurePlacementRuleManager ruler) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, long pos, StructurePlacementRuleManager ruler) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, List<net.minecraft.core.BlockPos> pos, StructurePlacementRuleManager ruler) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, List<net.minecraft.core.BlockPos> pos, StructurePlacementRuleManager ruler) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) -
putWithoutVerification
public DividedBlockListManager putWithoutVerification(net.minecraft.world.level.block.state.BlockState state, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler) -
getManager
-
getAllManager
-
clear
public void clear() -
contains
public boolean contains(net.minecraft.world.level.ChunkPos pos) -
getChunkPos
-
placeAll
public boolean placeAll(net.minecraft.world.level.WorldGenLevel world) -
placeAllNDelete
public boolean placeAllNDelete(net.minecraft.world.level.WorldGenLevel world) -
getOrdered
-
getOrdered
-
placeJson
-
placeJson
public void placeJson(net.minecraft.world.level.WorldGenLevel worldAccess, String name, net.minecraft.world.level.ChunkPos offset) -
putWithoutVerification
-