Class PoiManager
java.lang.Object
net.minecraft.world.level.chunk.storage.SectionStorage<PoiSection>
net.minecraft.world.entity.ai.village.poi.PoiManager
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PoiManager.DistanceTrackerprivate it.unimi.dsi.fastutil.longs.LongSetstatic intstatic intFields inherited from class net.minecraft.world.level.chunk.storage.SectionStorage
levelHeightAccessor -
Constructor Summary
ConstructorsConstructorDescriptionPoiManager(File p_148568_, com.mojang.datafixers.DataFixer p_148569_, boolean p_148570_, LevelHeightAccessor p_148571_) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcheckConsistencyWithBlocks(ChunkPos p_27048_, LevelChunkSection p_27049_)voidensureLoadedAndValid(LevelReader p_27057_, BlockPos p_27058_, int p_27059_)booleanbooleanexistsAtPosition(PoiType p_27045_, BlockPos p_27046_)find(Predicate<PoiType> p_27187_, Predicate<BlockPos> p_27188_, BlockPos p_27189_, int p_27190_, PoiManager.Occupancy p_27191_)findAll(Predicate<PoiType> p_27139_, Predicate<BlockPos> p_27140_, BlockPos p_27141_, int p_27142_, PoiManager.Occupancy p_27143_)findAllClosestFirst(Predicate<PoiType> p_27172_, Predicate<BlockPos> p_27173_, BlockPos p_27174_, int p_27175_, PoiManager.Occupancy p_27176_)findClosest(Predicate<PoiType> p_148659_, Predicate<BlockPos> p_148660_, BlockPos p_148661_, int p_148662_, PoiManager.Occupancy p_148663_)findClosest(Predicate<PoiType> p_27193_, BlockPos p_27194_, int p_27195_, PoiManager.Occupancy p_27196_)longgetCountInRange(Predicate<PoiType> p_27122_, BlockPos p_27123_, int p_27124_, PoiManager.Occupancy p_27125_)intgetFreeTickets(BlockPos p_148654_)Deprecated.getInChunk(Predicate<PoiType> p_27118_, ChunkPos p_27119_, PoiManager.Occupancy p_27120_)getInRange(Predicate<PoiType> p_27182_, BlockPos p_27183_, int p_27184_, PoiManager.Occupancy p_27185_)getInSquare(Predicate<PoiType> p_27167_, BlockPos p_27168_, int p_27169_, PoiManager.Occupancy p_27170_)getRandom(Predicate<PoiType> p_27127_, Predicate<BlockPos> p_27128_, PoiManager.Occupancy p_27129_, BlockPos p_27130_, int p_27131_, Random p_27132_)(package private) booleanisVillageCenter(long p_27198_)private static booleanmayHavePoi(LevelChunkSection p_27061_)protected voidonSectionLoad(long p_27145_)booleanvoidintsectionsToVillage(SectionPos p_27099_)protected voidsetDirty(long p_27036_)voidtick(BooleanSupplier p_27105_)private voidupdateFromSection(LevelChunkSection p_27070_, SectionPos p_27071_, BiConsumer<BlockPos,PoiType> p_27072_)Methods inherited from class net.minecraft.world.level.chunk.storage.SectionStorage
close, flush, get, getOrCreate, getOrLoad, outsideStoredRange
-
Field Details
-
MAX_VILLAGE_DISTANCE
public static final int MAX_VILLAGE_DISTANCE- See Also:
- Constant Field Values
-
VILLAGE_SECTION_SIZE
public static final int VILLAGE_SECTION_SIZE- See Also:
- Constant Field Values
-
distanceTracker
-
loadedChunks
private final it.unimi.dsi.fastutil.longs.LongSet loadedChunks
-
-
Constructor Details
-
PoiManager
public PoiManager(File p_148568_, com.mojang.datafixers.DataFixer p_148569_, boolean p_148570_, LevelHeightAccessor p_148571_)
-
-
Method Details
-
add
-
remove
-
getCountInRange
public long getCountInRange(Predicate<PoiType> p_27122_, BlockPos p_27123_, int p_27124_, PoiManager.Occupancy p_27125_) -
existsAtPosition
-
getInSquare
-
getInRange
-
getInChunk
-
findAll
-
findAllClosestFirst
-
find
-
findClosest
-
findClosest
-
take
-
getRandom
-
release
-
exists
-
getType
-
getFreeTickets
Deprecated. -
sectionsToVillage
-
isVillageCenter
boolean isVillageCenter(long p_27198_) -
tick
- Overrides:
tickin classSectionStorage<PoiSection>
-
setDirty
protected void setDirty(long p_27036_)- Overrides:
setDirtyin classSectionStorage<PoiSection>
-
onSectionLoad
protected void onSectionLoad(long p_27145_)- Overrides:
onSectionLoadin classSectionStorage<PoiSection>
-
checkConsistencyWithBlocks
-
mayHavePoi
-
updateFromSection
private void updateFromSection(LevelChunkSection p_27070_, SectionPos p_27071_, BiConsumer<BlockPos,PoiType> p_27072_) -
ensureLoadedAndValid
-