Class ConjureDataHolder

java.lang.Object
com.binaris.wizardry.capabilities.ConjureDataHolder
All Implemented Interfaces:
ConjureData, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class ConjureDataHolder extends Object implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, ConjureData
Loading the conjure data with Forge, nothing too crazy over here, just using the capabilities to load-change the data
  • Field Details

    • LOCATION

      public static final net.minecraft.resources.ResourceLocation LOCATION
    • INSTANCE

      public static final net.minecraftforge.common.capabilities.Capability<ConjureDataHolder> INSTANCE
  • Constructor Details

    • ConjureDataHolder

      public ConjureDataHolder()
  • Method Details

    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT()
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.nbt.CompoundTag tag)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • getExpireTime

      public long getExpireTime()
      Description copied from interface: ConjureData
      Gets the absolute game time when this conjured item should expire.
      Specified by:
      getExpireTime in interface ConjureData
      Returns:
      the expire time in game ticks, or -1 if not set
    • setExpireTime

      public void setExpireTime(long expireTime)
      Description copied from interface: ConjureData
      Sets the absolute game time when this conjured item should expire.
      Specified by:
      setExpireTime in interface ConjureData
      Parameters:
      expireTime - the expire time in game ticks
    • getDuration

      public int getDuration()
      Description copied from interface: ConjureData
      Gets the duration this item was conjured for (for display purposes).
      Specified by:
      getDuration in interface ConjureData
      Returns:
      the duration in ticks
    • setDuration

      public void setDuration(int duration)
      Description copied from interface: ConjureData
      Sets the duration this item was conjured for (for display purposes).
      Specified by:
      setDuration in interface ConjureData
      Parameters:
      duration - the duration in ticks
    • isSummoned

      public boolean isSummoned()
      Description copied from interface: ConjureData
      Checks whether this item was conjured.
      Specified by:
      isSummoned in interface ConjureData
      Returns:
      true if the item was conjured
    • setSummoned

      public void setSummoned(boolean summoned)
      Description copied from interface: ConjureData
      Sets whether this item was conjured.
      Specified by:
      setSummoned in interface ConjureData
      Parameters:
      summoned - true if the item was conjured