Package net.minecraft.village
Class PointOfInterestManager
java.lang.Object
net.minecraft.world.chunk.storage.RegionSectionCache<PointOfInterestData>
net.minecraft.village.PointOfInterestManager
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PointOfInterestManager.DistanceGraphprivate final it.unimi.dsi.fastutil.longs.LongSet -
Constructor Summary
ConstructorsConstructorDescriptionPointOfInterestManager(File p_i231554_1_, com.mojang.datafixers.DataFixer p_i231554_2_, boolean p_i231554_3_) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BlockPos p_219135_1_, PointOfInterestType p_219135_2_) voidcheckConsistencyWithBlocks(ChunkPos p_219139_1_, ChunkSection p_219139_2_) voidensureLoadedAndValid(IWorldReader p_226347_1_, BlockPos p_226347_2_, int p_226347_3_) booleanexists(BlockPos p_219138_1_, Predicate<PointOfInterestType> p_219138_2_) booleanexistsAtPosition(PointOfInterestType p_234135_1_, BlockPos p_234135_2_) find(Predicate<PointOfInterestType> p_219127_1_, Predicate<BlockPos> p_219127_2_, BlockPos p_219127_3_, int p_219127_4_, PointOfInterestManager.Status p_219127_5_) findAll(Predicate<PointOfInterestType> p_225399_1_, Predicate<BlockPos> p_225399_2_, BlockPos p_225399_3_, int p_225399_4_, PointOfInterestManager.Status p_225399_5_) findAllClosestFirst(Predicate<PointOfInterestType> p_242324_1_, Predicate<BlockPos> p_242324_2_, BlockPos p_242324_3_, int p_242324_4_, PointOfInterestManager.Status p_242324_5_) findClosest(Predicate<PointOfInterestType> p_234148_1_, BlockPos p_234148_2_, int p_234148_3_, PointOfInterestManager.Status p_234148_4_) longgetCountInRange(Predicate<PointOfInterestType> p_219145_1_, BlockPos p_219145_2_, int p_219145_3_, PointOfInterestManager.Status p_219145_4_) getInChunk(Predicate<PointOfInterestType> p_219137_1_, ChunkPos p_219137_2_, PointOfInterestManager.Status p_219137_3_) getInRange(Predicate<PointOfInterestType> p_219146_1_, BlockPos p_219146_2_, int p_219146_3_, PointOfInterestManager.Status p_219146_4_) getInSquare(Predicate<PointOfInterestType> p_226353_1_, BlockPos p_226353_2_, int p_226353_3_, PointOfInterestManager.Status p_226353_4_) getRandom(Predicate<PointOfInterestType> p_219163_1_, Predicate<BlockPos> p_219163_2_, PointOfInterestManager.Status p_219163_3_, BlockPos p_219163_4_, int p_219163_5_, Random p_219163_6_) private booleanisVillageCenter(long p_219154_1_) private static booleanmayHavePoi(ChunkSection p_219151_0_) protected voidonSectionLoad(long p_219111_1_) booleanvoidintsectionsToVillage(SectionPos p_219150_1_) protected voidsetDirty(long p_219116_1_) take(Predicate<PointOfInterestType> p_219157_1_, Predicate<BlockPos> p_219157_2_, BlockPos p_219157_3_, int p_219157_4_) voidtick(BooleanSupplier p_219115_1_) private voidupdateFromSection(ChunkSection p_219132_1_, SectionPos p_219132_2_, BiConsumer<BlockPos, PointOfInterestType> p_219132_3_) Methods inherited from class net.minecraft.world.chunk.storage.RegionSectionCache
close, flush, get, getOrCreate, getOrLoad, outsideStoredRange
-
Field Details
-
distanceTracker
-
loadedChunks
private final it.unimi.dsi.fastutil.longs.LongSet loadedChunks
-
-
Constructor Details
-
PointOfInterestManager
public PointOfInterestManager(File p_i231554_1_, com.mojang.datafixers.DataFixer p_i231554_2_, boolean p_i231554_3_)
-
-
Method Details
-
add
-
remove
-
getCountInRange
public long getCountInRange(Predicate<PointOfInterestType> p_219145_1_, BlockPos p_219145_2_, int p_219145_3_, PointOfInterestManager.Status p_219145_4_) -
existsAtPosition
-
getInSquare
public Stream<PointOfInterest> getInSquare(Predicate<PointOfInterestType> p_226353_1_, BlockPos p_226353_2_, int p_226353_3_, PointOfInterestManager.Status p_226353_4_) -
getInRange
public Stream<PointOfInterest> getInRange(Predicate<PointOfInterestType> p_219146_1_, BlockPos p_219146_2_, int p_219146_3_, PointOfInterestManager.Status p_219146_4_) -
getInChunk
public Stream<PointOfInterest> getInChunk(Predicate<PointOfInterestType> p_219137_1_, ChunkPos p_219137_2_, PointOfInterestManager.Status p_219137_3_) -
findAll
public Stream<BlockPos> findAll(Predicate<PointOfInterestType> p_225399_1_, Predicate<BlockPos> p_225399_2_, BlockPos p_225399_3_, int p_225399_4_, PointOfInterestManager.Status p_225399_5_) -
findAllClosestFirst
public Stream<BlockPos> findAllClosestFirst(Predicate<PointOfInterestType> p_242324_1_, Predicate<BlockPos> p_242324_2_, BlockPos p_242324_3_, int p_242324_4_, PointOfInterestManager.Status p_242324_5_) -
find
public Optional<BlockPos> find(Predicate<PointOfInterestType> p_219127_1_, Predicate<BlockPos> p_219127_2_, BlockPos p_219127_3_, int p_219127_4_, PointOfInterestManager.Status p_219127_5_) -
findClosest
public Optional<BlockPos> findClosest(Predicate<PointOfInterestType> p_234148_1_, BlockPos p_234148_2_, int p_234148_3_, PointOfInterestManager.Status p_234148_4_) -
take
-
getRandom
public Optional<BlockPos> getRandom(Predicate<PointOfInterestType> p_219163_1_, Predicate<BlockPos> p_219163_2_, PointOfInterestManager.Status p_219163_3_, BlockPos p_219163_4_, int p_219163_5_, Random p_219163_6_) -
release
-
exists
-
getType
-
sectionsToVillage
-
isVillageCenter
private boolean isVillageCenter(long p_219154_1_) -
tick
- Overrides:
tickin classRegionSectionCache<PointOfInterestData>
-
setDirty
protected void setDirty(long p_219116_1_) - Overrides:
setDirtyin classRegionSectionCache<PointOfInterestData>
-
onSectionLoad
protected void onSectionLoad(long p_219111_1_) - Overrides:
onSectionLoadin classRegionSectionCache<PointOfInterestData>
-
checkConsistencyWithBlocks
-
mayHavePoi
-
updateFromSection
private void updateFromSection(ChunkSection p_219132_1_, SectionPos p_219132_2_, BiConsumer<BlockPos, PointOfInterestType> p_219132_3_) -
ensureLoadedAndValid
-