java.lang.Object
tech.anonymoushacker1279.immersiveweapons.event.game_effects.AccessoryManager

public class AccessoryManager extends Object
  • Constructor Details

    • AccessoryManager

      public AccessoryManager()
  • Method Details

    • collectEffects

      public static double collectEffects(AccessoryItem.EffectType type, net.minecraft.world.entity.player.Player player)
      Collect the value of the given effect from all AccessoryItems in the player's inventory.

      This will check to see if IWCB is loaded, and if so, defer to it for collecting effects as it will utilize Curios.

      Parameters:
      type - the EffectType to collect
      player - the Player to collect from
      Returns:
      the value of the effect
    • collectStandardAttributes

      public static Map<net.minecraft.world.entity.ai.attributes.AttributeModifier,net.minecraft.world.entity.ai.attributes.Attribute> collectStandardAttributes(net.minecraft.world.entity.player.Player player)
      Collect the attribute modifiers from all active AccessoryItems in the player's inventory.

      This will check to see if IWCB is loaded, and if so, defer to it for collecting attributes as it will utilize Curios.

      Parameters:
      player - the Player to collect from
      Returns:
      a Map of attribute modifiers
    • collectDynamicAttributes

      public static Map<Map<net.minecraft.world.entity.ai.attributes.AttributeModifier,net.minecraft.world.entity.ai.attributes.Attribute>,Double> collectDynamicAttributes(net.minecraft.world.entity.player.Player player)
      Collect the dynamic attribute modifiers from all active AccessoryItems in the player's inventory.

      This will check to see if IWCB is loaded, and if so, defer to it for collecting attributes as it will utilize Curios.

      Parameters:
      player - the Player to collect from
      Returns:
      a Map of dynamic attribute modifiers with their target values
    • collectMobEffects

      public static List<net.minecraft.world.effect.MobEffectInstance> collectMobEffects(net.minecraft.world.entity.player.Player player)
      Collect the mob effect instances from all active AccessoryItems in the player's inventory.

      This will check to see if IWCB is loaded, and if so, defer to it for collecting mob effects as it will utilize Curios.

      Parameters:
      player - the Player to collect from
      Returns:
      a List of mob effect instances
    • handleEffectScaling

      public static double handleEffectScaling(AccessoryItem accessoryItem, AccessoryItem.EffectType type, net.minecraft.world.entity.player.Player player)
      Handle the scaling of effects based on the accessory's scaling type.
      Parameters:
      accessoryItem - the AccessoryItem to handle for
      type - the EffectType to handle for
      player - the Player to handle for
      Returns:
      the scaled effect value
    • handleAccessoryMobEffects

      public static void handleAccessoryMobEffects(net.minecraft.world.entity.player.Player player)
      Handle accessories with mob effects during the player tick event.
      Parameters:
      player - the Player to handle for
    • handleAccessoryAttributes

      public static void handleAccessoryAttributes(net.minecraft.world.entity.player.Player player)
      Handle accessories with attribute modifiers during the player tick event.
      Parameters:
      player - the Player to handle for