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
Modifier and TypeClassDescription(package private) final class
static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PoiManager.DistanceTracker
private final it.unimi.dsi.fastutil.longs.LongSet
static final int
static final int
Fields inherited from class net.minecraft.world.level.chunk.storage.SectionStorage
levelHeightAccessor
-
Constructor Summary
ConstructorDescriptionPoiManager
(Path p_196651_, com.mojang.datafixers.DataFixer p_196652_, boolean p_196653_, LevelHeightAccessor p_196654_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkConsistencyWithBlocks
(ChunkPos p_27048_, LevelChunkSection p_27049_) void
ensureLoadedAndValid
(LevelReader p_27057_, BlockPos p_27058_, int p_27059_) boolean
boolean
existsAtPosition
(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_) long
getCountInRange
(Predicate<PoiType> p_27122_, BlockPos p_27123_, int p_27124_, PoiManager.Occupancy p_27125_) int
getFreeTickets
(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) boolean
isVillageCenter
(long p_27198_) private static boolean
mayHavePoi
(LevelChunkSection p_27061_) protected void
onSectionLoad
(long p_27145_) boolean
void
int
sectionsToVillage
(SectionPos p_27099_) protected void
setDirty
(long p_27036_) void
tick
(BooleanSupplier p_27105_) private void
updateFromSection
(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, hasWork, outsideStoredRange
-
Field Details
-
MAX_VILLAGE_DISTANCE
public static final int MAX_VILLAGE_DISTANCE- See Also:
-
VILLAGE_SECTION_SIZE
public static final int VILLAGE_SECTION_SIZE- See Also:
-
distanceTracker
-
loadedChunks
private final it.unimi.dsi.fastutil.longs.LongSet loadedChunks
-
-
Constructor Details
-
PoiManager
public PoiManager(Path p_196651_, com.mojang.datafixers.DataFixer p_196652_, boolean p_196653_, LevelHeightAccessor p_196654_)
-
-
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:
tick
in classSectionStorage<PoiSection>
-
setDirty
protected void setDirty(long p_27036_) - Overrides:
setDirty
in classSectionStorage<PoiSection>
-
onSectionLoad
protected void onSectionLoad(long p_27145_) - Overrides:
onSectionLoad
in classSectionStorage<PoiSection>
-
checkConsistencyWithBlocks
-
mayHavePoi
-
updateFromSection
private void updateFromSection(LevelChunkSection p_27070_, SectionPos p_27071_, BiConsumer<BlockPos, PoiType> p_27072_) -
ensureLoadedAndValid
-