Class PointOfInterestHelper

java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.world.poi.PointOfInterestHelper

public final class PointOfInterestHelper extends Object
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 Type
    Method
    Description
    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 a PointOfInterestType.
    static net.minecraft.world.poi.PointOfInterestType
    register(net.minecraft.util.Identifier id, int ticketCount, int searchDistance, net.minecraft.block.Block... blocks)
    Creates and registers a PointOfInterestType.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a PointOfInterestType.
      Parameters:
      id - The id of this PointOfInterestType.
      ticketCount - the amount of tickets.
      searchDistance - the search distance.
      blocks - all the blocks where a PointOfInterest 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 a PointOfInterestType.
      Parameters:
      id - the id of this PointOfInterestType.
      ticketCount - the amount of tickets.
      searchDistance - the search distance.
      blocks - all block states where a PointOfInterest of this type will be present
      Returns:
      a new PointOfInterestType.