接口 IClientMobEffectExtensions
public interface IClientMobEffectExtensions
Client-only extensions to
MobEffect
.- 另请参阅:
-
字段概要
字段 -
方法概要
修饰符和类型方法说明default boolean
isVisibleInGui
(MobEffectInstance instance) Queries whether the given effect should be shown in the HUD.default boolean
isVisibleInInventory
(MobEffectInstance instance) Queries whether the given effect should be shown in the player's inventory.static IClientMobEffectExtensions
static IClientMobEffectExtensions
of
(MobEffectInstance instance) default boolean
renderGuiIcon
(MobEffectInstance instance, Gui gui, GuiGraphics guiGraphics, int x, int y, float z, float alpha) Renders the icon of the specified effect on the player's HUD.default boolean
renderInventoryIcon
(MobEffectInstance instance, EffectsInInventory effects, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the icon of the specified effect in the player's inventory.default boolean
renderInventoryText
(MobEffectInstance instance, EffectsInInventory effects, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the text of the specified effect in the player's inventory.
-
字段详细资料
-
DEFAULT
-
-
方法详细资料
-
of
-
of
-
isVisibleInInventory
Queries whether the given effect should be shown in the player's inventory.By default, this returns
true
. -
isVisibleInGui
Queries whether the given effect should be shown in the HUD.By default, this returns
true
. -
renderInventoryIcon
default boolean renderInventoryIcon(MobEffectInstance instance, EffectsInInventory effects, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the icon of the specified effect in the player's inventory. This can be used to render icons from your own texture sheet.- 参数:
instance
- The effect instanceeffects
- The effect-rendering screenguiGraphics
- The gui graphicsx
- The x coordinatey
- The y coordinateblitOffset
- The blit offset- 返回:
- true to prevent default rendering, false otherwise
-
renderInventoryText
default boolean renderInventoryText(MobEffectInstance instance, EffectsInInventory effects, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the text of the specified effect in the player's inventory.- 参数:
instance
- The effect instanceeffects
- The effect-rendering screenguiGraphics
- The gui graphicsx
- The x coordinatey
- The y coordinateblitOffset
- The blit offset- 返回:
- true to prevent default rendering, false otherwise
-
renderGuiIcon
default boolean renderGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphics guiGraphics, int x, int y, float z, float alpha) Renders the icon of the specified effect on the player's HUD. This can be used to render icons from your own texture sheet.- 参数:
instance
- The effect instancegui
- The guiguiGraphics
- The gui graphicsx
- The x coordinatey
- The y coordinatez
- The z depthalpha
- The alpha value. Blinks when the effect is about to run out- 返回:
- true to prevent default rendering, false otherwise
-