类 PoiManager
java.lang.Object
net.minecraft.world.level.chunk.storage.SectionStorage<PoiSection>
net.minecraft.world.entity.ai.village.poi.PoiManager
- 所有已实现的接口:
AutoCloseable
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final PoiManager.DistanceTracker
private final it.unimi.dsi.fastutil.longs.LongSet
static final int
static final int
从类继承的字段 net.minecraft.world.level.chunk.storage.SectionStorage
levelHeightAccessor
-
构造器概要
构造器构造器说明PoiManager
(Path pFolder, com.mojang.datafixers.DataFixer pFixerUpper, boolean pSync, RegistryAccess pRegistryAccess, LevelHeightAccessor pLevelHeightAccessor) -
方法概要
修饰符和类型方法说明void
void
checkConsistencyWithBlocks
(SectionPos pSectionPos, LevelChunkSection pLevelChunkSection) void
ensureLoadedAndValid
(LevelReader pLevelReader, BlockPos pPos, int pCoordinateOffset) boolean
boolean
existsAtPosition
(ResourceKey<PoiType> pType, BlockPos pPos) find
(Predicate<Holder<PoiType>> pTypePredicate, Predicate<BlockPos> pPosPredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) findAll
(Predicate<Holder<PoiType>> pTypePredicate, Predicate<BlockPos> pPosPredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) findAllClosestFirstWithType
(Predicate<Holder<PoiType>> pTypePredicate, Predicate<BlockPos> pPosPredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) findAllWithType
(Predicate<Holder<PoiType>> pTypePredicate, Predicate<BlockPos> pPosPredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) findClosest
(Predicate<Holder<PoiType>> pTypePredicate, Predicate<BlockPos> pPosPredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) findClosest
(Predicate<Holder<PoiType>> pTypePredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) findClosestWithType
(Predicate<Holder<PoiType>> pTypePredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) long
getCountInRange
(Predicate<Holder<PoiType>> pTypePredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) int
getFreeTickets
(BlockPos pPos) 已过时。getInChunk
(Predicate<Holder<PoiType>> pTypePredicate, ChunkPos pPosChunk, PoiManager.Occupancy pStatus) getInRange
(Predicate<Holder<PoiType>> pTypePredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) getInSquare
(Predicate<Holder<PoiType>> pTypePredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) getRandom
(Predicate<Holder<PoiType>> pTypePredicate, Predicate<BlockPos> pPosPredicate, PoiManager.Occupancy pStatus, BlockPos pPos, int pDistance, RandomSource pRandom) (专用程序包) boolean
isVillageCenter
(long pChunkPos) private static boolean
mayHavePoi
(LevelChunkSection pSection) protected void
onSectionLoad
(long pSectionKey) boolean
void
int
sectionsToVillage
(SectionPos pSectionPos) protected void
setDirty
(long pSectionPos) take
(Predicate<Holder<PoiType>> pTypePredicate, BiPredicate<Holder<PoiType>, BlockPos> pCombinedTypePosPredicate, BlockPos pPos, int pDistance) void
tick
(BooleanSupplier pAheadOfTime) private void
updateFromSection
(LevelChunkSection pSection, SectionPos pSectionPos, BiConsumer<BlockPos, Holder<PoiType>> pPosToTypeConsumer) 从类继承的方法 net.minecraft.world.level.chunk.storage.SectionStorage
close, flush, get, getOrCreate, getOrLoad, hasWork, outsideStoredRange
-
字段详细资料
-
构造器详细资料
-
PoiManager
public PoiManager(Path pFolder, com.mojang.datafixers.DataFixer pFixerUpper, boolean pSync, RegistryAccess pRegistryAccess, LevelHeightAccessor pLevelHeightAccessor)
-
-
方法详细资料
-
add
-
remove
-
getCountInRange
public long getCountInRange(Predicate<Holder<PoiType>> pTypePredicate, BlockPos pPos, int pDistance, PoiManager.Occupancy pStatus) -
existsAtPosition
-
getInSquare
-
getInRange
-
getInChunk
-
findAll
-
findAllWithType
-
findAllClosestFirstWithType
-
find
-
findClosest
-
findClosestWithType
-
findClosest
-
take
-
getRandom
public Optional<BlockPos> getRandom(Predicate<Holder<PoiType>> pTypePredicate, Predicate<BlockPos> pPosPredicate, PoiManager.Occupancy pStatus, BlockPos pPos, int pDistance, RandomSource pRandom) -
release
-
exists
-
getType
-
getFreeTickets
已过时。 -
sectionsToVillage
-
isVillageCenter
boolean isVillageCenter(long pChunkPos) -
tick
- 覆盖:
tick
在类中SectionStorage<PoiSection>
-
setDirty
protected void setDirty(long pSectionPos) - 覆盖:
setDirty
在类中SectionStorage<PoiSection>
-
onSectionLoad
protected void onSectionLoad(long pSectionKey) - 覆盖:
onSectionLoad
在类中SectionStorage<PoiSection>
-
checkConsistencyWithBlocks
public void checkConsistencyWithBlocks(SectionPos pSectionPos, LevelChunkSection pLevelChunkSection) -
mayHavePoi
-
updateFromSection
private void updateFromSection(LevelChunkSection pSection, SectionPos pSectionPos, BiConsumer<BlockPos, Holder<PoiType>> pPosToTypeConsumer) -
ensureLoadedAndValid
-