Package net.minecraft.world.poi
Class PointOfInterestStorage
java.lang.Object
net.minecraft.world.storage.SerializingRegionBasedStorage<PointOfInterestSet>
net.minecraft.world.poi.PointOfInterestStorage
- All Implemented Interfaces:
AutoCloseable
public class PointOfInterestStorage extends SerializingRegionBasedStorage<PointOfInterestSet>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PointOfInterestStorage.OccupationStatus
(package private) class
PointOfInterestStorage.PointOfInterestDistanceTracker
-
Field Summary
Fields Modifier and Type Field Description private PointOfInterestStorage.PointOfInterestDistanceTracker
pointOfInterestDistanceTracker
private LongSet
preloadedChunks
Fields inherited from class net.minecraft.world.storage.SerializingRegionBasedStorage
field_27240
-
Constructor Summary
Constructors Constructor Description PointOfInterestStorage(File file, com.mojang.datafixers.DataFixer dataFixer, boolean bool, HeightLimitView heightLimitView)
-
Method Summary
Methods inherited from class net.minecraft.world.storage.SerializingRegionBasedStorage
close, get, getIfLoaded, getOrCreate, isPosInvalid, method_20436
-
Field Details
-
pointOfInterestDistanceTracker
-
preloadedChunks
-
-
Constructor Details
-
PointOfInterestStorage
public PointOfInterestStorage(File file, com.mojang.datafixers.DataFixer dataFixer, boolean bool, HeightLimitView heightLimitView)
-
-
Method Details
-
add
-
remove
-
count
public long count(Predicate<PointOfInterestType> typePredicate, BlockPos pos, int radius, PointOfInterestStorage.OccupationStatus occupationStatus) -
hasTypeAt
-
getInSquare
public Stream<PointOfInterest> getInSquare(Predicate<PointOfInterestType> typePredicate, BlockPos pos, int radius, PointOfInterestStorage.OccupationStatus occupationStatus) -
getInCircle
public Stream<PointOfInterest> getInCircle(Predicate<PointOfInterestType> typePredicate, BlockPos pos, int radius, PointOfInterestStorage.OccupationStatus occupationStatus) -
getInChunk
public Stream<PointOfInterest> getInChunk(Predicate<PointOfInterestType> predicate, ChunkPos chunkPos, PointOfInterestStorage.OccupationStatus occupationStatus) -
getPositions
public Stream<BlockPos> getPositions(Predicate<PointOfInterestType> typePredicate, Predicate<BlockPos> posPredicate, BlockPos pos, int radius, PointOfInterestStorage.OccupationStatus occupationStatus) -
method_30957
public Stream<BlockPos> method_30957(Predicate<PointOfInterestType> predicate, Predicate<BlockPos> predicate2, BlockPos blockPos, int int2, PointOfInterestStorage.OccupationStatus occupationStatus) -
getPosition
public Optional<BlockPos> getPosition(Predicate<PointOfInterestType> typePredicate, Predicate<BlockPos> posPredicate, BlockPos pos, int radius, PointOfInterestStorage.OccupationStatus occupationStatus) -
getNearestPosition
public Optional<BlockPos> getNearestPosition(Predicate<PointOfInterestType> typePredicate, BlockPos blockPos, int int2, PointOfInterestStorage.OccupationStatus occupationStatus) -
getPosition
-
getPosition
public Optional<BlockPos> getPosition(Predicate<PointOfInterestType> typePredicate, Predicate<BlockPos> positionPredicate, PointOfInterestStorage.OccupationStatus occupationStatus, BlockPos pos, int radius, Random random) -
releaseTicket
-
test
-
getType
-
getDistanceFromNearestOccupied
-
isOccupied
private boolean isOccupied(long pos) -
tick
- Overrides:
tick
in classSerializingRegionBasedStorage<PointOfInterestSet>
-
onUpdate
protected void onUpdate(long pos)- Overrides:
onUpdate
in classSerializingRegionBasedStorage<PointOfInterestSet>
-
onLoad
protected void onLoad(long pos)- Overrides:
onLoad
in classSerializingRegionBasedStorage<PointOfInterestSet>
-
initForPalette
-
shouldScan
-
scanAndPopulate
private void scanAndPopulate(ChunkSection chunkSection, ChunkSectionPos chunkSectionPos, BiConsumer<BlockPos,PointOfInterestType> biConsumer) -
preloadChunks
Preloads chunks in a square area with the given radius. Loads the chunks withChunkStatus.EMPTY
.- Parameters:
radius
- The radius in blocks
-