public interface IForgeEffectInstance
Modifier and Type | Method and Description |
---|---|
default void |
addCurativeItem(ItemStack stack)
Adds the given stack to the list of curative items for this PotionEffect
|
java.util.List<ItemStack> |
getCurativeItems()
Returns a list of curative items for the potion effect
By default, this list is initialized using
Potion#getCurativeItems |
default EffectInstance |
getEffectInstance() |
default boolean |
isCurativeItem(ItemStack stack)
Checks the given ItemStack to see if it is in the list of curative items for the potion effect
|
default void |
renderHUDEffect(AbstractGui gui,
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(DisplayEffectsScreen<?> gui,
int x,
int y,
float z)
Called to draw the this Potion onto the player's inventory when it's active.
|
void |
setCurativeItems(java.util.List<ItemStack> curativeItems)
Sets the list of curative items for this potion effect, overwriting any already present
|
default boolean |
shouldRender()
If the Potion effect should be displayed in the players inventory
|
default boolean |
shouldRenderHUD()
If the Potion effect should be displayed in the player's ingame HUD
|
default boolean |
shouldRenderInvText()
If the standard PotionEffect text (name and duration) should be drawn when this potion is active.
|
default void |
writeCurativeItems(CompoundNBT nbt) |
default EffectInstance getEffectInstance()
default boolean shouldRender()
default boolean shouldRenderInvText()
default boolean shouldRenderHUD()
default void renderInventoryEffect(DisplayEffectsScreen<?> gui, int x, int y, float z)
gui
- the gui instancex
- the x coordinatey
- the y coordinatez
- the z leveldefault void renderHUDEffect(AbstractGui gui, int x, int y, float z, float alpha)
gui
- the gui instancex
- the x coordinatey
- the y coordinatez
- the z levelalpha
- the alpha value, blinks when the potion is about to run outjava.util.List<ItemStack> getCurativeItems()
Potion#getCurativeItems
default boolean isCurativeItem(ItemStack stack)
stack
- The ItemStack being checked against the list of curative items for this PotionEffectvoid setCurativeItems(java.util.List<ItemStack> curativeItems)
curativeItems
- The list of ItemStacks being set to the potion effectdefault void addCurativeItem(ItemStack stack)
stack
- The ItemStack being added to the curative item listdefault void writeCurativeItems(CompoundNBT nbt)