Interface IDesignatorItem

All Known Implementing Classes:
ItemDesignator, ItemDesignatorManual, ItemDesignatorRange

public interface IDesignatorItem
Interface for items that can designate a target position (e.g. for launch pads). Port from 1.7.10 api.hbm.item.IDesignatorItem.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.Vec3
    getCoords(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, int x, int y, int z)
    Target position when the designator is ready.
    boolean
    isReady(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, int x, int y, int z)
    Whether the designator has a valid target.
  • Method Details

    • isReady

      boolean isReady(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, int x, int y, int z)
      Whether the designator has a valid target.
      Parameters:
      level - for dimension/entity checks if needed
      stack - to read NBT
      x - launch pad X
      y - launch pad Y
      z - launch pad Z
      Returns:
      true if target is set and valid
    • getCoords

      net.minecraft.world.phys.Vec3 getCoords(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, int x, int y, int z)
      Target position when the designator is ready.
      Parameters:
      level - world
      stack - designator stack
      x - launch pad X
      y - launch pad Y
      z - launch pad Z
      Returns:
      target coordinates (Y is typically 0 for ground target)