Class PointOfInterestHelper
java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.world.poi.PointOfInterestHelper
This class provides utilities to create a
PointOfInterestType
.
A point of interest is typically used by villagers to specify their workstation blocks, meeting zones and homes. Points of interest are also used by bees to specify where their bee hive is and nether portals to find existing portals.
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.poi.PointOfInterestType
register
(net.minecraft.util.Identifier id, int ticketCount, int searchDistance, Iterable<net.minecraft.block.BlockState> blocks) Creates and registers aPointOfInterestType
.static net.minecraft.world.poi.PointOfInterestType
register
(net.minecraft.util.Identifier id, int ticketCount, int searchDistance, net.minecraft.block.Block... blocks) Creates and registers aPointOfInterestType
.static net.minecraft.world.poi.PointOfInterestType
register
(net.minecraft.util.Identifier id, int ticketCount, Predicate<net.minecraft.world.poi.PointOfInterestType> typePredicate, int searchDistance, Iterable<net.minecraft.block.BlockState> states) Creates and registers aPointOfInterestType
.static net.minecraft.world.poi.PointOfInterestType
register
(net.minecraft.util.Identifier id, int ticketCount, Predicate<net.minecraft.world.poi.PointOfInterestType> completionCondition, int searchDistance, net.minecraft.block.Block... blocks) Creates and registers aPointOfInterestType
.
-
Method Details
-
register
public static net.minecraft.world.poi.PointOfInterestType register(net.minecraft.util.Identifier id, int ticketCount, int searchDistance, net.minecraft.block.Block... blocks) Creates and registers aPointOfInterestType
.- Parameters:
id
- The id of thisPointOfInterestType
.ticketCount
- the amount of tickets.searchDistance
- the search distance.blocks
- all the blocks where aPointOfInterest
of this type will be present.- Returns:
- a new
PointOfInterestType
.
-
register
public static net.minecraft.world.poi.PointOfInterestType register(net.minecraft.util.Identifier id, int ticketCount, Predicate<net.minecraft.world.poi.PointOfInterestType> completionCondition, int searchDistance, net.minecraft.block.Block... blocks) Creates and registers aPointOfInterestType
.- Parameters:
id
- The id of thisPointOfInterestType
.ticketCount
- the amount of tickets.completionCondition
- aPredicate
which determines if twoPointOfInterestType
s are the same.searchDistance
- the search distance.blocks
- all blocks where aPointOfInterest
of this type will be present- Returns:
- a new
PointOfInterestType
.
-
register
public static net.minecraft.world.poi.PointOfInterestType register(net.minecraft.util.Identifier id, int ticketCount, int searchDistance, Iterable<net.minecraft.block.BlockState> blocks) Creates and registers aPointOfInterestType
.- Parameters:
id
- the id of thisPointOfInterestType
.ticketCount
- the amount of tickets.searchDistance
- the search distance.blocks
- allblock states
where aPointOfInterest
of this type will be present- Returns:
- a new
PointOfInterestType
.
-
register
public static net.minecraft.world.poi.PointOfInterestType register(net.minecraft.util.Identifier id, int ticketCount, Predicate<net.minecraft.world.poi.PointOfInterestType> typePredicate, int searchDistance, Iterable<net.minecraft.block.BlockState> states) Creates and registers aPointOfInterestType
.- Parameters:
id
- the id of thisPointOfInterestType
.ticketCount
- the amount of tickets.typePredicate
- aPredicate
which determines if twoPointOfInterestType
s are the same.searchDistance
- the search distance.states
- allblock states
where aPointOfInterest
of this type will be present- Returns:
- a new
PointOfInterestType
.
-