Package com.hbm_m.api.item
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 TypeMethodDescriptionnet.minecraft.world.phys.Vec3getCoords(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.booleanisReady(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 neededstack- to read NBTx- launch pad Xy- launch pad Yz- 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- worldstack- designator stackx- launch pad Xy- launch pad Yz- launch pad Z- Returns:
- target coordinates (Y is typically 0 for ground target)
-