Interface IForgeEffect
-
- All Known Implementing Classes:
AbsorptionEffect
,AttackDamageEffect
,Effect
,HealthBoostEffect
,InstantEffect
public interface IForgeEffect
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.List<ItemStack>
getCurativeItems()
Get a fresh list of items that can cure this Potion.default Effect
getEffect()
default int
getGuiSortColor(EffectInstance potionEffect)
Used for determiningPotionEffect
sort order in GUIs.default void
renderHUDEffect(EffectInstance effect, AbstractGui gui, MatrixStack mStack, int x, int y, float z, float alpha)
Called to draw the this Potion onto the player's ingame HUD when it's active.default void
renderInventoryEffect(EffectInstance effect, DisplayEffectsScreen<?> gui, MatrixStack mStack, int x, int y, float z)
Called to draw the this Potion onto the player's inventory when it's active.default boolean
shouldRender(EffectInstance effect)
If the Potion effect should be displayed in the players inventorydefault boolean
shouldRenderHUD(EffectInstance effect)
If the Potion effect should be displayed in the player's ingame HUDdefault boolean
shouldRenderInvText(EffectInstance effect)
If the standard PotionEffect text (name and duration) should be drawn when this potion is active.
-
-
-
Method Detail
-
getEffect
default Effect getEffect()
-
shouldRender
default boolean shouldRender(EffectInstance effect)
If the Potion effect should be displayed in the players inventory- Parameters:
effect
- the active PotionEffect- Returns:
- true to display it (default), false to hide it.
-
shouldRenderInvText
default boolean shouldRenderInvText(EffectInstance effect)
If the standard PotionEffect text (name and duration) should be drawn when this potion is active.- Parameters:
effect
- the active PotionEffect- Returns:
- true to draw the standard text
-
shouldRenderHUD
default boolean shouldRenderHUD(EffectInstance effect)
If the Potion effect should be displayed in the player's ingame HUD- Parameters:
effect
- the active PotionEffect- Returns:
- true to display it (default), false to hide it.
-
renderInventoryEffect
default void renderInventoryEffect(EffectInstance effect, DisplayEffectsScreen<?> gui, MatrixStack mStack, int x, int y, float z)
Called to draw the this Potion onto the player's inventory when it's active. This can be used to e.g. render Potion icons from your own texture.- Parameters:
effect
- the active PotionEffectgui
- the gui instancemStack
- The MatrixStackx
- the x coordinatey
- the y coordinatez
- the z level
-
renderHUDEffect
default void renderHUDEffect(EffectInstance effect, AbstractGui gui, MatrixStack mStack, int x, int y, float z, float alpha)
Called to draw the this Potion onto the player's ingame HUD when it's active. This can be used to e.g. render Potion icons from your own texture.- Parameters:
effect
- the active PotionEffectgui
- the gui instancemStack
- The MatrixStackx
- the x coordinatey
- the y coordinatez
- the z levelalpha
- the alpha value, blinks when the potion is about to run out
-
getCurativeItems
default java.util.List<ItemStack> getCurativeItems()
Get a fresh list of items that can cure this Potion. All new PotionEffects created from this Potion will call this to initialize the default curative items- Returns:
- A list of items that can cure this Potion
- See Also:
PotionEffect#getCurativeItems
-
getGuiSortColor
default int getGuiSortColor(EffectInstance potionEffect)
Used for determiningPotionEffect
sort order in GUIs. Defaults to thePotionEffect
's liquid color.- Parameters:
potionEffect
- thePotionEffect
instance containing the potion- Returns:
- a value used to sort
PotionEffect
s in GUIs
-
-