Package com.binaris.wizardry.platform
Class ForgeObjectData
java.lang.Object
com.binaris.wizardry.platform.ForgeObjectData
- All Implemented Interfaces:
IObjectData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetArcaneLockData(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.booleanisMinion(net.minecraft.world.entity.Entity mob) Checks if the given entity is a minion.voidspellStoredVariables(IStoredSpellVar<?>... variables) Registers one or more stored spell variables to this SpellHandlerData.
-
Constructor Details
-
ForgeObjectData
public ForgeObjectData()
-
-
Method Details
-
getConjureData
Description copied from interface:IObjectDataGives you the conjure data to manipulate and view the current status of the conjure item.- Specified by:
getConjureDatain interfaceIObjectData- Returns:
- the conjure data, could return null if the item isn't part of ConjureItem list
-
getImbuementData
Description copied from interface:IObjectDataGives you the imbuement data to manipulate and view the current status of the imbuements on the item.- Specified by:
getImbuementDatain interfaceIObjectData- Returns:
- the imbuement data
-
getCastCommandData
Description copied from interface:IObjectDataGives 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:
getCastCommandDatain interfaceIObjectData- Parameters:
player- player whose cast command data is to be retrieved.- Returns:
- the cast command data
-
getSpellManagerData
Description copied from interface:IObjectDataGives 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:
getSpellManagerDatain interfaceIObjectData- Parameters:
player- player whose spell manager data is to be retrieved.- Returns:
- the spell manager data
-
getWizardData
Description copied from interface:IObjectDataGets 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:
getWizardDatain interfaceIObjectData- Parameters:
player- The player whose wizard data is to be retrieved.- Returns:
- The PlayerWizardData associated with the player.
-
getMinionData
Description copied from interface:IObjectDataGets the minion data holder for the given mob.- Specified by:
getMinionDatain interfaceIObjectData- Parameters:
mob- The mob whose minion data holder is to be retrieved.- Returns:
- The MinionDataHolder associated with the mob.
-
getContainmentData
Description copied from interface:IObjectDataGets 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:
getContainmentDatain interfaceIObjectData- Parameters:
entity- The living entity whose containment data is to be retrieved.- Returns:
- The ContainmentData associated with the living entity.
-
getArcaneLockData
public ArcaneLockData getArcaneLockData(net.minecraft.world.level.block.entity.BlockEntity blockEntity) Description copied from interface:IObjectDataGets the arcane lock data for the given block entity.- Specified by:
getArcaneLockDatain interfaceIObjectData- Parameters:
blockEntity- The block entity whose arcane lock data is to be retrieved.- Returns:
- The ArcaneLockData associated with the block entity.
-
spellStoredVariables
Description copied from interface:IObjectDataRegisters one or more stored spell variables to this SpellHandlerData. Stored spell variables are those that implement the IStoredSpellVar interface.- Specified by:
spellStoredVariablesin interfaceIObjectData- Parameters:
variables- one or more stored spell variables to register
-
isMinion
public boolean isMinion(net.minecraft.world.entity.Entity mob) Description copied from interface:IObjectDataChecks if the given entity is a minion.- Specified by:
isMinionin interfaceIObjectData- Parameters:
mob- The entity to check.- Returns:
- true if the entity is a minion, false otherwise.
-