Class AccessoryManager
java.lang.Object
tech.anonymoushacker1279.immersiveweapons.event.game_effects.AccessoryManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 activeAccessoryItems in the player's inventory.static doublecollectEffects(AccessoryItem.EffectType type, net.minecraft.world.entity.player.Player player) Collect the value of the given effect from allAccessoryItems in the player's inventory.static List<net.minecraft.world.effect.MobEffectInstance> collectMobEffects(net.minecraft.world.entity.player.Player player) Collect the mob effect instances from all activeAccessoryItems in the player's inventory.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 activeAccessoryItems in the player's inventory.static voidhandleAccessoryAttributes(net.minecraft.world.entity.player.Player player) Handle accessories with attribute modifiers during the player tick event.static voidhandleAccessoryMobEffects(net.minecraft.world.entity.player.Player player) Handle accessories with mob effects during the player tick event.static doublehandleEffectScaling(AccessoryItem accessoryItem, AccessoryItem.EffectType type, net.minecraft.world.entity.player.Player player) Handle the scaling of effects based on the accessory's scaling type.
-
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 allAccessoryItems 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- theEffectTypeto collectplayer- thePlayerto 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 activeAccessoryItems 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- thePlayerto collect from- Returns:
- a
Mapof attribute modifiers
-
collectDynamicAttributes
public static Map<Map<net.minecraft.world.entity.ai.attributes.AttributeModifier,net.minecraft.world.entity.ai.attributes.Attribute>, collectDynamicAttributesDouble> (net.minecraft.world.entity.player.Player player) Collect the dynamic attribute modifiers from all activeAccessoryItems 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- thePlayerto collect from- Returns:
- a
Mapof 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 activeAccessoryItems 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- thePlayerto collect from- Returns:
- a
Listof 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- theAccessoryItemto handle fortype- theEffectTypeto handle forplayer- thePlayerto 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- thePlayerto 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- thePlayerto handle for
-