Package foundry.veil.mixin.tooltip
Class BlockEntityMixin
java.lang.Object
foundry.veil.mixin.tooltip.BlockEntityMixin
- All Implemented Interfaces:
Tooltippable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTooltip
(String tooltip) Add a tooltip component to the block entityvoid
addTooltip
(List<net.minecraft.network.chat.Component> tooltip) Add a list of tooltip components to the block entityvoid
addTooltip
(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.ItemStack
getStack()
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 entityint
Increase the tooltip heightint
Increase the tooltip widthint
Get the x offset for the tooltipint
Get the y offset for the tooltipboolean
Whether the tooltip should be rendered in worldspace or notboolean
void
loadAdditional
(net.minecraft.nbt.CompoundTag pTag, net.minecraft.core.HolderLookup.Provider pRegistries, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) void
loadTooltipData
(net.minecraft.nbt.CompoundTag tag) void
saveAdditional
(net.minecraft.nbt.CompoundTag pTag, net.minecraft.core.HolderLookup.Provider pRegistries, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) net.minecraft.nbt.CompoundTag
void
setBackgroundColor
(int color) Set the background color of the themevoid
setBottomBorderColor
(int color) Set the bottom border color of the themevoid
setTheme
(ColorTheme theme) Set the theme object for the tooltip from the block entityvoid
setTooltip
(List<net.minecraft.network.chat.Component> tooltip) Set the tooltip components for the block entityvoid
setTopBorderColor
(int color) Set the top border color of the theme
-
Constructor Details
-
BlockEntityMixin
public BlockEntityMixin()
-
-
Method Details
-
getTooltip
Description copied from interface:Tooltippable
Get the tooltip components from the block entity- Specified by:
getTooltip
in interfaceTooltippable
- Returns:
- the tooltip components
-
isTooltipEnabled
public boolean isTooltipEnabled()- Specified by:
isTooltipEnabled
in interfaceTooltippable
-
saveTooltipData
public net.minecraft.nbt.CompoundTag saveTooltipData()- Specified by:
saveTooltipData
in interfaceTooltippable
-
loadTooltipData
public void loadTooltipData(net.minecraft.nbt.CompoundTag tag) - Specified by:
loadTooltipData
in interfaceTooltippable
-
setTooltip
Description copied from interface:Tooltippable
Set the tooltip components for the block entity- Specified by:
setTooltip
in interfaceTooltippable
- Parameters:
tooltip
- the tooltip components to set
-
addTooltip
public void addTooltip(net.minecraft.network.chat.Component tooltip) Description copied from interface:Tooltippable
Add a tooltip component to the block entity- Specified by:
addTooltip
in interfaceTooltippable
- Parameters:
tooltip
-
-
addTooltip
Description copied from interface:Tooltippable
Add a list of tooltip components to the block entity- Specified by:
addTooltip
in interfaceTooltippable
- Parameters:
tooltip
-
-
addTooltip
Description copied from interface:Tooltippable
Add a tooltip component to the block entity- Specified by:
addTooltip
in interfaceTooltippable
- Parameters:
tooltip
-
-
getTheme
Description copied from interface:Tooltippable
Get the theme object for the tooltip from the block entity- Specified by:
getTheme
in interfaceTooltippable
- Returns:
- the theme object
- See Also:
-
setTheme
Description copied from interface:Tooltippable
Set the theme object for the tooltip from the block entity- Specified by:
setTheme
in interfaceTooltippable
- Parameters:
theme
- the theme object to set
-
setBackgroundColor
public void setBackgroundColor(int color) Description copied from interface:Tooltippable
Set the background color of the theme- Specified by:
setBackgroundColor
in interfaceTooltippable
- Parameters:
color
- the color to set
-
setTopBorderColor
public void setTopBorderColor(int color) Description copied from interface:Tooltippable
Set the top border color of the theme- Specified by:
setTopBorderColor
in interfaceTooltippable
- Parameters:
color
-
-
setBottomBorderColor
public void setBottomBorderColor(int color) Description copied from interface:Tooltippable
Set the bottom border color of the theme- Specified by:
setBottomBorderColor
in interfaceTooltippable
- Parameters:
color
-
-
getWorldspace
public boolean getWorldspace()Description copied from interface:Tooltippable
Whether the tooltip should be rendered in worldspace or not- Specified by:
getWorldspace
in interfaceTooltippable
- Returns:
- true if the tooltip should be rendered in worldspace, false if it should be rendered in screenspace
-
getTimeline
Description copied from interface:Tooltippable
Obtain the timeline for the tooltip- Specified by:
getTimeline
in interfaceTooltippable
- Returns:
- the timeline
-
getStack
public net.minecraft.world.item.ItemStack getStack()Description copied from interface:Tooltippable
The stack for the tooltip to take components from- Specified by:
getStack
in interfaceTooltippable
- Returns:
- the stack
-
getTooltipWidth
public int getTooltipWidth()Description copied from interface:Tooltippable
Increase the tooltip width- Specified by:
getTooltipWidth
in interfaceTooltippable
- Returns:
- the bonus width
-
getTooltipHeight
public int getTooltipHeight()Description copied from interface:Tooltippable
Increase the tooltip height- Specified by:
getTooltipHeight
in interfaceTooltippable
- Returns:
- the bonus height
-
getTooltipXOffset
public int getTooltipXOffset()Description copied from interface:Tooltippable
Get the x offset for the tooltip- Specified by:
getTooltipXOffset
in interfaceTooltippable
- Returns:
-
getTooltipYOffset
public int getTooltipYOffset()Description copied from interface:Tooltippable
Get the y offset for the tooltip- Specified by:
getTooltipYOffset
in interfaceTooltippable
- Returns:
-
getItems
Description copied from interface:Tooltippable
Get the items to render in the tooltip and data about them- Specified by:
getItems
in 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)
-