Class VeilUIItemTooltipDataHolder

java.lang.Object
foundry.veil.api.client.tooltip.VeilUIItemTooltipDataHolder

public class VeilUIItemTooltipDataHolder extends Object
  • Constructor Details

    • VeilUIItemTooltipDataHolder

      public VeilUIItemTooltipDataHolder(net.minecraft.world.item.ItemStack itemStack, Function<Float,Float> x, Function<Float,Float> y)
      Create a new VeilUIItemTooltipDataHolder. This is used to store data for items that are rendered on tooltips.
      Parameters:
      itemStack - the item to render
      x - the x position of the item. Use the callback to modify this, you are given the current Partial Tick value.
      y - the y position of the item. Use the callback to modify this, you are given the current Partial Tick value.
  • Method Details

    • getItemStack

      public net.minecraft.world.item.ItemStack getItemStack()
      Get the itemstack to render
      Returns:
      the itemstack
    • getX

      public Function<Float,Float> getX()
      Get the x position of the item. Use the callback to modify this, you are given the current Partial Tick value.
      Returns:
      the x position
    • getY

      public Function<Float,Float> getY()
      Get the y position of the item. Use the callback to modify this, you are given the current Partial Tick value.
      Returns:
      the y position
    • setItemStack

      public void setItemStack(net.minecraft.world.item.ItemStack itemStack)
      Set the itemstack to render
      Parameters:
      itemStack - the itemstack to set
    • setX

      public void setX(Function<Float,Float> x)
      Set the x position of the item. Use the callback to modify this, you are given the current Partial Tick value.
      Parameters:
      x - the x position to set
    • setY

      public void setY(Function<Float,Float> y)
      Set the y position of the item. Use the callback to modify this, you are given the current Partial Tick value.
      Parameters:
      y - the y position to set