Class FabricObjectData

java.lang.Object
com.binaris.wizardry.platform.FabricObjectData
All Implemented Interfaces:
IObjectData

public class FabricObjectData extends Object implements IObjectData
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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.
    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 entity)
    Checks if the given entity is a minion.
    void
    Registers one or more stored spell variables to this SpellHandlerData.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FabricObjectData

      public FabricObjectData()
  • Method Details

    • getWizardData

      public WizardData getWizardData(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IObjectData
      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().
      Specified by:
      getWizardData in interface IObjectData
      Parameters:
      player - The player whose wizard data is to be retrieved.
      Returns:
      The PlayerWizardData associated with the player.
    • getMinionData

      public MinionData getMinionData(net.minecraft.world.entity.Mob mob)
      Description copied from interface: IObjectData
      Gets the minion data holder for the given mob.
      Specified by:
      getMinionData in interface IObjectData
      Parameters:
      mob - The mob whose minion data holder is to be retrieved.
      Returns:
      The MinionDataHolder associated with the mob.
    • getContainmentData

      public ContainmentData getContainmentData(net.minecraft.world.entity.LivingEntity entity)
      Description copied from interface: IObjectData
      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.
      Specified by:
      getContainmentData in interface IObjectData
      Parameters:
      entity - The living entity whose containment data is to be retrieved.
      Returns:
      The ContainmentData associated with the living entity.
    • isMinion

      public boolean isMinion(net.minecraft.world.entity.Entity entity)
      Description copied from interface: IObjectData
      Checks if the given entity is a minion.
      Specified by:
      isMinion in interface IObjectData
      Parameters:
      entity - The entity to check.
      Returns:
      true if the entity is a minion, false otherwise.
    • getConjureData

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

      public ImbuementEnchantData getImbuementData(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IObjectData
      Gives you the imbuement data to manipulate and view the current status of the imbuements on the item.
      Specified by:
      getImbuementData in interface IObjectData
      Returns:
      the imbuement data
    • getCastCommandData

      public CastCommandData getCastCommandData(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IObjectData
      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().
      Specified by:
      getCastCommandData in interface IObjectData
      Parameters:
      player - player whose cast command data is to be retrieved.
      Returns:
      the cast command data
    • getSpellManagerData

      public SpellManagerData getSpellManagerData(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IObjectData
      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().
      Specified by:
      getSpellManagerData in interface IObjectData
      Parameters:
      player - player whose spell manager data is to be retrieved.
      Returns:
      the spell manager data
    • spellStoredVariables

      public void spellStoredVariables(IStoredSpellVar<?>... variables)
      Description copied from interface: IObjectData
      Registers one or more stored spell variables to this SpellHandlerData. Stored spell variables are those that implement the IStoredSpellVar interface.
      Specified by:
      spellStoredVariables in interface IObjectData
      Parameters:
      variables - one or more stored spell variables to register
    • getArcaneLockData

      public ArcaneLockData getArcaneLockData(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
      Description copied from interface: IObjectData
      Gets the arcane lock data for the given block entity.
      Specified by:
      getArcaneLockData in interface IObjectData
      Parameters:
      blockEntity - The block entity whose arcane lock data is to be retrieved.
      Returns:
      The ArcaneLockData associated with the block entity.