public class PointOfInterestSet extends Object
Modifier and Type | Field and Description |
---|---|
private static Logger |
LOGGER |
private it.unimi.dsi.fastutil.shorts.Short2ObjectMap<PointOfInterest> |
pointsOfInterestByPos |
private Map<PointOfInterestType,Set<PointOfInterest>> |
pointsOfInterestByType |
private Runnable |
updateListener |
private boolean |
valid |
Modifier | Constructor and Description |
---|---|
|
PointOfInterestSet(Runnable updateListener) |
private |
PointOfInterestSet(Runnable updateListener,
boolean bool,
List<PointOfInterest> list) |
Modifier and Type | Method and Description |
---|---|
void |
add(BlockPos pos,
PointOfInterestType type) |
private boolean |
add(PointOfInterest poi) |
private void |
clear() |
static com.mojang.serialization.Codec<PointOfInterestSet> |
createCodec(Runnable updateListener) |
Stream<PointOfInterest> |
get(Predicate<PointOfInterestType> predicate,
PointOfInterestStorage.OccupationStatus occupationStatus) |
Optional<PointOfInterestType> |
getType(BlockPos pos) |
(package private) boolean |
isValid() |
boolean |
releaseTicket(BlockPos pos) |
void |
remove(BlockPos pos) |
boolean |
test(BlockPos pos,
Predicate<PointOfInterestType> predicate) |
void |
updatePointsOfInterest(Consumer<BiConsumer<BlockPos,PointOfInterestType>> consumer) |
private static final Logger LOGGER
private final it.unimi.dsi.fastutil.shorts.Short2ObjectMap<PointOfInterest> pointsOfInterestByPos
private final Map<PointOfInterestType,Set<PointOfInterest>> pointsOfInterestByType
private final Runnable updateListener
private boolean valid
public PointOfInterestSet(Runnable updateListener)
private PointOfInterestSet(Runnable updateListener, boolean bool, List<PointOfInterest> list)
public static com.mojang.serialization.Codec<PointOfInterestSet> createCodec(Runnable updateListener)
public Stream<PointOfInterest> get(Predicate<PointOfInterestType> predicate, PointOfInterestStorage.OccupationStatus occupationStatus)
public void add(BlockPos pos, PointOfInterestType type)
private boolean add(PointOfInterest poi)
public void remove(BlockPos pos)
public boolean releaseTicket(BlockPos pos)
public boolean test(BlockPos pos, Predicate<PointOfInterestType> predicate)
public Optional<PointOfInterestType> getType(BlockPos pos)
public void updatePointsOfInterest(Consumer<BiConsumer<BlockPos,PointOfInterestType>> consumer)
private void clear()
boolean isValid()