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
Modifier and TypeClassDescription(package private) final class
static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PointOfInterestManager.DistanceGraph
private final it.unimi.dsi.fastutil.longs.LongSet
-
Constructor Summary
ConstructorDescriptionPointOfInterestManager
(File p_i231554_1_, com.mojang.datafixers.DataFixer p_i231554_2_, boolean p_i231554_3_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(BlockPos p_219135_1_, PointOfInterestType p_219135_2_) void
checkConsistencyWithBlocks
(ChunkPos p_219139_1_, ChunkSection p_219139_2_) void
ensureLoadedAndValid
(IWorldReader p_226347_1_, BlockPos p_226347_2_, int p_226347_3_) boolean
exists
(BlockPos p_219138_1_, Predicate<PointOfInterestType> p_219138_2_) boolean
existsAtPosition
(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_) long
getCountInRange
(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 boolean
isVillageCenter
(long p_219154_1_) private static boolean
mayHavePoi
(ChunkSection p_219151_0_) protected void
onSectionLoad
(long p_219111_1_) boolean
void
int
sectionsToVillage
(SectionPos p_219150_1_) protected void
setDirty
(long p_219116_1_) take
(Predicate<PointOfInterestType> p_219157_1_, Predicate<BlockPos> p_219157_2_, BlockPos p_219157_3_, int p_219157_4_) void
tick
(BooleanSupplier p_219115_1_) private void
updateFromSection
(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:
tick
in classRegionSectionCache<PointOfInterestData>
-
setDirty
protected void setDirty(long p_219116_1_) - Overrides:
setDirty
in classRegionSectionCache<PointOfInterestData>
-
onSectionLoad
protected void onSectionLoad(long p_219111_1_) - Overrides:
onSectionLoad
in classRegionSectionCache<PointOfInterestData>
-
checkConsistencyWithBlocks
-
mayHavePoi
-
updateFromSection
private void updateFromSection(ChunkSection p_219132_1_, SectionPos p_219132_2_, BiConsumer<BlockPos, PointOfInterestType> p_219132_3_) -
ensureLoadedAndValid
-