public class PointOfInterestManager extends RegionSectionCache<PointOfInterestData>
Modifier and Type | Class and Description |
---|---|
(package private) class |
PointOfInterestManager.DistanceGraph |
static class |
PointOfInterestManager.Status |
Modifier and Type | Field and Description |
---|---|
private PointOfInterestManager.DistanceGraph |
distanceTracker |
private it.unimi.dsi.fastutil.longs.LongSet |
loadedChunks |
Constructor and Description |
---|
PointOfInterestManager(java.io.File p_i50298_1_,
com.mojang.datafixers.DataFixer p_i50298_2_) |
Modifier and Type | Method and Description |
---|---|
void |
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_,
java.util.function.Predicate<PointOfInterestType> p_219138_2_) |
java.util.Optional<BlockPos> |
find(java.util.function.Predicate<PointOfInterestType> p_219127_1_,
java.util.function.Predicate<BlockPos> p_219127_2_,
BlockPos p_219127_3_,
int p_219127_4_,
PointOfInterestManager.Status p_219127_5_) |
java.util.stream.Stream<BlockPos> |
findAll(java.util.function.Predicate<PointOfInterestType> p_225399_1_,
java.util.function.Predicate<BlockPos> p_225399_2_,
BlockPos p_225399_3_,
int p_225399_4_,
PointOfInterestManager.Status p_225399_5_) |
java.util.Optional<BlockPos> |
findClosest(java.util.function.Predicate<PointOfInterestType> p_219147_1_,
java.util.function.Predicate<BlockPos> p_219147_2_,
BlockPos p_219147_3_,
int p_219147_4_,
PointOfInterestManager.Status p_219147_5_) |
java.util.stream.Stream<PointOfInterest> |
func_219146_b(java.util.function.Predicate<PointOfInterestType> p_219146_1_,
BlockPos p_219146_2_,
int distance,
PointOfInterestManager.Status p_219146_4_) |
long |
getCountInRange(java.util.function.Predicate<PointOfInterestType> p_219145_1_,
BlockPos p_219145_2_,
int p_219145_3_,
PointOfInterestManager.Status p_219145_4_) |
java.util.stream.Stream<PointOfInterest> |
getInChunk(java.util.function.Predicate<PointOfInterestType> p_219137_1_,
ChunkPos p_219137_2_,
PointOfInterestManager.Status p_219137_3_) |
private java.util.stream.Stream<PointOfInterest> |
getInSelection(java.util.function.Predicate<PointOfInterestType> p_219136_1_,
long p_219136_2_,
PointOfInterestManager.Status p_219136_4_) |
java.util.stream.Stream<PointOfInterest> |
getInSquare(java.util.function.Predicate<PointOfInterestType> p_226353_1_,
BlockPos p_226353_2_,
int p_226353_3_,
PointOfInterestManager.Status p_226353_4_) |
java.util.Optional<BlockPos> |
getRandom(java.util.function.Predicate<PointOfInterestType> p_219163_1_,
java.util.function.Predicate<BlockPos> p_219163_2_,
PointOfInterestManager.Status p_219163_3_,
BlockPos p_219163_4_,
int p_219163_5_,
java.util.Random p_219163_6_) |
java.util.Optional<PointOfInterestType> |
getType(BlockPos p_219148_1_) |
private static boolean |
hasAnyPOI(ChunkSection p_219151_0_) |
private boolean |
isVillageCenter(long p_219154_1_) |
protected void |
markDirty(long sectionPosIn) |
protected void |
onSectionLoad(long p_219111_1_) |
boolean |
release(BlockPos p_219142_1_) |
void |
remove(BlockPos p_219140_1_) |
int |
sectionsToVillage(SectionPos p_219150_1_) |
java.util.Optional<BlockPos> |
take(java.util.function.Predicate<PointOfInterestType> p_219157_1_,
java.util.function.Predicate<BlockPos> p_219157_2_,
BlockPos p_219157_3_,
int p_219157_4_) |
void |
tick(java.util.function.BooleanSupplier p_219115_1_) |
private void |
updateFromSelection(ChunkSection p_219132_1_,
SectionPos p_219132_2_,
java.util.function.BiConsumer<BlockPos,PointOfInterestType> p_219132_3_) |
close, func_219106_c, func_219110_e, func_219113_d, func_219114_b, saveIfDirty
private final PointOfInterestManager.DistanceGraph distanceTracker
private final it.unimi.dsi.fastutil.longs.LongSet loadedChunks
public PointOfInterestManager(java.io.File p_i50298_1_, com.mojang.datafixers.DataFixer p_i50298_2_)
public void add(BlockPos p_219135_1_, PointOfInterestType p_219135_2_)
public void remove(BlockPos p_219140_1_)
public long getCountInRange(java.util.function.Predicate<PointOfInterestType> p_219145_1_, BlockPos p_219145_2_, int p_219145_3_, PointOfInterestManager.Status p_219145_4_)
public java.util.stream.Stream<PointOfInterest> getInSquare(java.util.function.Predicate<PointOfInterestType> p_226353_1_, BlockPos p_226353_2_, int p_226353_3_, PointOfInterestManager.Status p_226353_4_)
public java.util.stream.Stream<PointOfInterest> func_219146_b(java.util.function.Predicate<PointOfInterestType> p_219146_1_, BlockPos p_219146_2_, int distance, PointOfInterestManager.Status p_219146_4_)
public java.util.stream.Stream<PointOfInterest> getInChunk(java.util.function.Predicate<PointOfInterestType> p_219137_1_, ChunkPos p_219137_2_, PointOfInterestManager.Status p_219137_3_)
private java.util.stream.Stream<PointOfInterest> getInSelection(java.util.function.Predicate<PointOfInterestType> p_219136_1_, long p_219136_2_, PointOfInterestManager.Status p_219136_4_)
public java.util.stream.Stream<BlockPos> findAll(java.util.function.Predicate<PointOfInterestType> p_225399_1_, java.util.function.Predicate<BlockPos> p_225399_2_, BlockPos p_225399_3_, int p_225399_4_, PointOfInterestManager.Status p_225399_5_)
public java.util.Optional<BlockPos> find(java.util.function.Predicate<PointOfInterestType> p_219127_1_, java.util.function.Predicate<BlockPos> p_219127_2_, BlockPos p_219127_3_, int p_219127_4_, PointOfInterestManager.Status p_219127_5_)
public java.util.Optional<BlockPos> findClosest(java.util.function.Predicate<PointOfInterestType> p_219147_1_, java.util.function.Predicate<BlockPos> p_219147_2_, BlockPos p_219147_3_, int p_219147_4_, PointOfInterestManager.Status p_219147_5_)
public java.util.Optional<BlockPos> take(java.util.function.Predicate<PointOfInterestType> p_219157_1_, java.util.function.Predicate<BlockPos> p_219157_2_, BlockPos p_219157_3_, int p_219157_4_)
public java.util.Optional<BlockPos> getRandom(java.util.function.Predicate<PointOfInterestType> p_219163_1_, java.util.function.Predicate<BlockPos> p_219163_2_, PointOfInterestManager.Status p_219163_3_, BlockPos p_219163_4_, int p_219163_5_, java.util.Random p_219163_6_)
public boolean release(BlockPos p_219142_1_)
public boolean exists(BlockPos p_219138_1_, java.util.function.Predicate<PointOfInterestType> p_219138_2_)
public java.util.Optional<PointOfInterestType> getType(BlockPos p_219148_1_)
public int sectionsToVillage(SectionPos p_219150_1_)
private boolean isVillageCenter(long p_219154_1_)
public void tick(java.util.function.BooleanSupplier p_219115_1_)
tick
in class RegionSectionCache<PointOfInterestData>
protected void markDirty(long sectionPosIn)
markDirty
in class RegionSectionCache<PointOfInterestData>
protected void onSectionLoad(long p_219111_1_)
onSectionLoad
in class RegionSectionCache<PointOfInterestData>
public void checkConsistencyWithBlocks(ChunkPos p_219139_1_, ChunkSection p_219139_2_)
private static boolean hasAnyPOI(ChunkSection p_219151_0_)
private void updateFromSelection(ChunkSection p_219132_1_, SectionPos p_219132_2_, java.util.function.BiConsumer<BlockPos,PointOfInterestType> p_219132_3_)
public void ensureLoadedAndValid(IWorldReader p_226347_1_, BlockPos p_226347_2_, int p_226347_3_)