Package foundry.veil.mixin.tooltip
Class BlockEntityMixin
java.lang.Object
foundry.veil.mixin.tooltip.BlockEntityMixin
- All Implemented Interfaces:
Tooltippable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTooltip(String tooltip) Add a tooltip component to the block entityvoidaddTooltip(List<net.minecraft.network.chat.Component> tooltip) Add a list of tooltip components to the block entityvoidaddTooltip(net.minecraft.network.chat.Component tooltip) Add a tooltip component to the block entitygetItems()Get the items to render in the tooltip and data about themnet.minecraft.world.item.ItemStackgetStack()The stack for the tooltip to take components fromgetTheme()Get the theme object for the tooltip from the block entityObtain the timeline for the tooltipList<net.minecraft.network.chat.Component> Get the tooltip components from the block entityintIncrease the tooltip heightintIncrease the tooltip widthintGet the x offset for the tooltipintGet the y offset for the tooltipbooleanWhether the tooltip should be rendered in worldspace or notbooleanvoidloadAdditional(net.minecraft.nbt.CompoundTag pTag, net.minecraft.core.HolderLookup.Provider pRegistries, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) voidloadTooltipData(net.minecraft.nbt.CompoundTag tag) voidsaveAdditional(net.minecraft.nbt.CompoundTag pTag, net.minecraft.core.HolderLookup.Provider pRegistries, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) net.minecraft.nbt.CompoundTagvoidsetBackgroundColor(int color) Set the background color of the themevoidsetBottomBorderColor(int color) Set the bottom border color of the themevoidsetTheme(ColorTheme theme) Set the theme object for the tooltip from the block entityvoidsetTooltip(List<net.minecraft.network.chat.Component> tooltip) Set the tooltip components for the block entityvoidsetTopBorderColor(int color) Set the top border color of the theme
-
Constructor Details
-
BlockEntityMixin
public BlockEntityMixin()
-
-
Method Details
-
getTooltip
Description copied from interface:TooltippableGet the tooltip components from the block entity- Specified by:
getTooltipin interfaceTooltippable- Returns:
- the tooltip components
-
isTooltipEnabled
public boolean isTooltipEnabled()- Specified by:
isTooltipEnabledin interfaceTooltippable
-
saveTooltipData
public net.minecraft.nbt.CompoundTag saveTooltipData()- Specified by:
saveTooltipDatain interfaceTooltippable
-
loadTooltipData
public void loadTooltipData(net.minecraft.nbt.CompoundTag tag) - Specified by:
loadTooltipDatain interfaceTooltippable
-
setTooltip
Description copied from interface:TooltippableSet the tooltip components for the block entity- Specified by:
setTooltipin interfaceTooltippable- Parameters:
tooltip- the tooltip components to set
-
addTooltip
public void addTooltip(net.minecraft.network.chat.Component tooltip) Description copied from interface:TooltippableAdd a tooltip component to the block entity- Specified by:
addTooltipin interfaceTooltippable- Parameters:
tooltip-
-
addTooltip
Description copied from interface:TooltippableAdd a list of tooltip components to the block entity- Specified by:
addTooltipin interfaceTooltippable- Parameters:
tooltip-
-
addTooltip
Description copied from interface:TooltippableAdd a tooltip component to the block entity- Specified by:
addTooltipin interfaceTooltippable- Parameters:
tooltip-
-
getTheme
Description copied from interface:TooltippableGet the theme object for the tooltip from the block entity- Specified by:
getThemein interfaceTooltippable- Returns:
- the theme object
- See Also:
-
setTheme
Description copied from interface:TooltippableSet the theme object for the tooltip from the block entity- Specified by:
setThemein interfaceTooltippable- Parameters:
theme- the theme object to set
-
setBackgroundColor
public void setBackgroundColor(int color) Description copied from interface:TooltippableSet the background color of the theme- Specified by:
setBackgroundColorin interfaceTooltippable- Parameters:
color- the color to set
-
setTopBorderColor
public void setTopBorderColor(int color) Description copied from interface:TooltippableSet the top border color of the theme- Specified by:
setTopBorderColorin interfaceTooltippable- Parameters:
color-
-
setBottomBorderColor
public void setBottomBorderColor(int color) Description copied from interface:TooltippableSet the bottom border color of the theme- Specified by:
setBottomBorderColorin interfaceTooltippable- Parameters:
color-
-
getWorldspace
public boolean getWorldspace()Description copied from interface:TooltippableWhether the tooltip should be rendered in worldspace or not- Specified by:
getWorldspacein interfaceTooltippable- Returns:
- true if the tooltip should be rendered in worldspace, false if it should be rendered in screenspace
-
getTimeline
Description copied from interface:TooltippableObtain the timeline for the tooltip- Specified by:
getTimelinein interfaceTooltippable- Returns:
- the timeline
-
getStack
public net.minecraft.world.item.ItemStack getStack()Description copied from interface:TooltippableThe stack for the tooltip to take components from- Specified by:
getStackin interfaceTooltippable- Returns:
- the stack
-
getTooltipWidth
public int getTooltipWidth()Description copied from interface:TooltippableIncrease the tooltip width- Specified by:
getTooltipWidthin interfaceTooltippable- Returns:
- the bonus width
-
getTooltipHeight
public int getTooltipHeight()Description copied from interface:TooltippableIncrease the tooltip height- Specified by:
getTooltipHeightin interfaceTooltippable- Returns:
- the bonus height
-
getTooltipXOffset
public int getTooltipXOffset()Description copied from interface:TooltippableGet the x offset for the tooltip- Specified by:
getTooltipXOffsetin interfaceTooltippable- Returns:
-
getTooltipYOffset
public int getTooltipYOffset()Description copied from interface:TooltippableGet the y offset for the tooltip- Specified by:
getTooltipYOffsetin interfaceTooltippable- Returns:
-
getItems
Description copied from interface:TooltippableGet the items to render in the tooltip and data about them- Specified by:
getItemsin interfaceTooltippable- Returns:
- the items
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag pTag, net.minecraft.core.HolderLookup.Provider pRegistries, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) -
loadAdditional
public void loadAdditional(net.minecraft.nbt.CompoundTag pTag, net.minecraft.core.HolderLookup.Provider pRegistries, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
-