Interface ConjureData

All Known Implementing Classes:
ConjureDataHolder

public interface ConjureData
This is the interface that we will use later to interact with the conjure item data!! Loading this as an interface and later implemented by the loaders from "scratch" is basically because we need a similar way to load-change data for Fabric and forge, with this we're trying to create a mask that we will trust that the loaders won't have any problem saving and handling the data.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the duration this item was conjured for (for display purposes).
    long
    Gets the absolute game time when this conjured item should expire.
    default int
    getRemainingLifetime(long currentGameTime)
    Gets the remaining lifetime in ticks.
    default boolean
    hasExpired(long currentGameTime)
    Checks if this conjured item has expired based on current game time.
    boolean
    Checks whether this item was conjured.
    void
    setDuration(int duration)
    Sets the duration this item was conjured for (for display purposes).
    void
    setExpireTime(long expireTime)
    Sets the absolute game time when this conjured item should expire.
    void
    setSummoned(boolean summoned)
    Sets whether this item was conjured.
  • Method Details

    • getExpireTime

      long getExpireTime()
      Gets the absolute game time when this conjured item should expire.
      Returns:
      the expire time in game ticks, or -1 if not set
    • setExpireTime

      void setExpireTime(long expireTime)
      Sets the absolute game time when this conjured item should expire.
      Parameters:
      expireTime - the expire time in game ticks
    • getDuration

      int getDuration()
      Gets the duration this item was conjured for (for display purposes).
      Returns:
      the duration in ticks
    • setDuration

      void setDuration(int duration)
      Sets the duration this item was conjured for (for display purposes).
      Parameters:
      duration - the duration in ticks
    • isSummoned

      boolean isSummoned()
      Checks whether this item was conjured.
      Returns:
      true if the item was conjured
    • setSummoned

      void setSummoned(boolean summoned)
      Sets whether this item was conjured.
      Parameters:
      summoned - true if the item was conjured
    • hasExpired

      default boolean hasExpired(long currentGameTime)
      Checks if this conjured item has expired based on current game time. -1 expire time means it never expires.
      Parameters:
      currentGameTime - the current game time in ticks
      Returns:
      true if the item should expire
    • getRemainingLifetime

      default int getRemainingLifetime(long currentGameTime)
      Gets the remaining lifetime in ticks.
      Parameters:
      currentGameTime - the current game time in ticks
      Returns:
      remaining ticks, or 0 if expired