Interface IObjectData

All Known Implementing Classes:
ForgeObjectData

public interface IObjectData
  • Method Summary

    Modifier and Type
    Method
    Description
    getArcaneLockData(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
    Gets the arcane lock data for the given block entity.
    getCastCommandData(net.minecraft.world.entity.player.Player player)
    Gives you the cast command data to manipulate and view the current status of the cast command.
    @Nullable ConjureData
    getConjureData(net.minecraft.world.item.ItemStack stack)
    Gives you the conjure data to manipulate and view the current status of the conjure item.
    getContainmentData(net.minecraft.world.entity.LivingEntity entity)
    Gets the containment data for the given living entity, this could be null in some cases like entity dying or not being affected by containment effect.
    getImbuementData(net.minecraft.world.item.ItemStack stack)
    Gives you the imbuement data to manipulate and view the current status of the imbuements on the item.
    getMinionData(net.minecraft.world.entity.Mob mob)
    Gets the minion data holder for the given mob.
    getSpellManagerData(net.minecraft.world.entity.player.Player player)
    Gives you the spell manager data to manipulate and view the current status of spells and spell variables.
    getWizardData(net.minecraft.world.entity.player.Player player)
    Gets the wizard data for the given player.
    boolean
    isMinion(net.minecraft.world.entity.Entity mob)
    Checks if the given entity is a minion.
    void
    Registers one or more stored spell variables to this SpellHandlerData.
  • Method Details

    • getConjureData

      @Nullable @Nullable ConjureData getConjureData(net.minecraft.world.item.ItemStack stack)
      Gives you the conjure data to manipulate and view the current status of the conjure item.
      Returns:
      the conjure data, could return null if the item isn't part of ConjureItem list
    • getImbuementData

      ImbuementEnchantData getImbuementData(net.minecraft.world.item.ItemStack stack)
      Gives you the imbuement data to manipulate and view the current status of the imbuements on the item.
      Returns:
      the imbuement data
    • getCastCommandData

      CastCommandData getCastCommandData(net.minecraft.world.entity.player.Player player)
      Gives you the cast command data to manipulate and view the current status of the cast command. Remember to check if the player is alive before using this! If the player is dead (on death screen or respawning), this could cause a crash, so if in doubt, check Player.isAlive().
      Parameters:
      player - player whose cast command data is to be retrieved.
      Returns:
      the cast command data
    • getSpellManagerData

      SpellManagerData getSpellManagerData(net.minecraft.world.entity.player.Player player)
      Gives you the spell manager data to manipulate and view the current status of spells and spell variables. Remember to check if the player is alive before using this! If the player is dead (on death screen or respawning), this could cause a crash, so if in doubt, check Player.isAlive().
      Parameters:
      player - player whose spell manager data is to be retrieved.
      Returns:
      the spell manager data
    • spellStoredVariables

      void spellStoredVariables(IStoredSpellVar<?>... variables)
      Registers one or more stored spell variables to this SpellHandlerData. Stored spell variables are those that implement the IStoredSpellVar interface.
      Parameters:
      variables - one or more stored spell variables to register
    • getWizardData

      WizardData getWizardData(net.minecraft.world.entity.player.Player player)
      Gets the wizard data for the given player. Don't forget to check if the player is alive before using this! If the player is dead (on death screen or respawning), this could cause a crash, so if in doubt, check Player.isAlive().
      Parameters:
      player - The player whose wizard data is to be retrieved.
      Returns:
      The PlayerWizardData associated with the player.
    • getMinionData

      MinionData getMinionData(net.minecraft.world.entity.Mob mob)
      Gets the minion data holder for the given mob.
      Parameters:
      mob - The mob whose minion data holder is to be retrieved.
      Returns:
      The MinionDataHolder associated with the mob.
    • getContainmentData

      ContainmentData getContainmentData(net.minecraft.world.entity.LivingEntity entity)
      Gets the containment data for the given living entity, this could be null in some cases like entity dying or not being affected by containment effect.
      Parameters:
      entity - The living entity whose containment data is to be retrieved.
      Returns:
      The ContainmentData associated with the living entity.
    • isMinion

      boolean isMinion(net.minecraft.world.entity.Entity mob)
      Checks if the given entity is a minion.
      Parameters:
      mob - The entity to check.
      Returns:
      true if the entity is a minion, false otherwise.
    • getArcaneLockData

      ArcaneLockData getArcaneLockData(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
      Gets the arcane lock data for the given block entity.
      Parameters:
      blockEntity - The block entity whose arcane lock data is to be retrieved.
      Returns:
      The ArcaneLockData associated with the block entity.