Package foundry.veil.api.client.tooltip
Class VeilUIItemTooltipDataHolder
java.lang.Object
foundry.veil.api.client.tooltip.VeilUIItemTooltipDataHolder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackGet the itemstack to rendergetX()Get the x position of the item.getY()Get the y position of the item.voidsetItemStack(net.minecraft.world.item.ItemStack itemStack) Set the itemstack to rendervoidSet the x position of the item.voidSet the y position of the item.
-
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 renderx- 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
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
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
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
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
-