Class AccessoryItem.EffectBuilder

java.lang.Object
tech.anonymoushacker1279.immersiveweapons.item.AccessoryItem.EffectBuilder
Enclosing class:
AccessoryItem

public static class AccessoryItem.EffectBuilder extends Object
Builder for creating effects.
  • Constructor Details

    • EffectBuilder

      public EffectBuilder()
  • Method Details

    • addEffect

      public AccessoryItem.EffectBuilder addEffect(AccessoryItem.EffectType type, double value)
      Add an effect to the accessory. See AccessoryItem.EffectType for a list of available effects.
      Parameters:
      type - the EffectType
      value - the value of the effect
      Returns:
      the EffectBuilder for chaining
    • addEffect

      Add an effect to the accessory. See AccessoryItem.EffectType for a list of available effects. Accepts a scaling type, which will be used to scale the effect value based player conditions.
      Parameters:
      type - the EffectType
      value - the value of the effect
      scalingType - the EffectScalingType
      Returns:
      the EffectBuilder for chaining
    • addAttributeModifier

      public AccessoryItem.EffectBuilder addAttributeModifier(net.minecraft.world.entity.ai.attributes.AttributeModifier modifier, net.minecraft.world.entity.ai.attributes.Attribute attribute)
      Add an attribute modifier to the accessory. These are static and unchanging in value.
      Parameters:
      modifier - the AttributeModifier
      attribute - the Attribute
      Returns:
      the EffectBuilder for chaining
    • addDynamicAttributeModifier

      public AccessoryItem.EffectBuilder addDynamicAttributeModifier(net.minecraft.world.entity.ai.attributes.AttributeModifier modifier, net.minecraft.world.entity.ai.attributes.Attribute attribute, double targetValue)
      Add a dynamic attribute modifier to the accessory. These are reconstructed as necessary to achieve the target value.
      Parameters:
      modifier - the AttributeModifier
      attribute - the Attribute
      targetValue - the target value of the attribute
      Returns:
      the EffectBuilder for chaining
    • addMobEffect

      public AccessoryItem.EffectBuilder addMobEffect(net.minecraft.world.effect.MobEffectInstance effect)
      Add a mob effect to the accessory.
      Parameters:
      effect - the MobEffectInstance
      Returns:
      the EffectBuilder for chaining
    • addObjectsFromBuilder

      public AccessoryItem.EffectBuilder addObjectsFromBuilder(AccessoryItem.EffectBuilder builder)
      Add all effects from another builder to this builder.
      Parameters:
      builder - the EffectBuilder to add from
      Returns:
      the EffectBuilder for chaining
    • getEffects

      public Map<AccessoryItem.EffectType,Double> getEffects()
    • getEffectScalingTypes

    • getAttributeModifiers

      public Map<net.minecraft.world.entity.ai.attributes.AttributeModifier,net.minecraft.world.entity.ai.attributes.Attribute> getAttributeModifiers()
    • getDynamicAttributeModifiers

      public Map<Map<net.minecraft.world.entity.ai.attributes.AttributeModifier,net.minecraft.world.entity.ai.attributes.Attribute>,Double> getDynamicAttributeModifiers()
    • getMobEffects

      public List<net.minecraft.world.effect.MobEffectInstance> getMobEffects()