Enum Class FuzzyMode

java.lang.Object
java.lang.Enum<FuzzyMode>
appeng.api.config.FuzzyMode
All Implemented Interfaces:
Serializable, Comparable<FuzzyMode>, Constable, net.minecraft.util.StringRepresentable

public enum FuzzyMode extends Enum<FuzzyMode> implements net.minecraft.util.StringRepresentable
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>

    Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable

    net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S extends net.minecraft.util.StringRepresentable>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Matches any item from undamaged to including 0% durability, but not negative durability (where item damage exceeds maxdamage).
    If an item with less than 25% durability is used as the filter, items with less than 50% durability are matched.
    If an item with less than 50% durability is used as the filter, items with less than 50% durability are matched.
    If an item with less than 75% durability is used as the filter, items with less than 75% durability are matched.
    Matches items that have less than 100% durability (that is, at least 1 damage point) if a damaged item is used as the filter, or undamaged items otherwise.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final float
     
    static final com.mojang.serialization.Codec<FuzzyMode>
     
    final float
    Note this is percentage "damaged".
    static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,FuzzyMode>
     

    Fields inherited from interface net.minecraft.util.StringRepresentable

    PRE_BUILT_MAP_THRESHOLD
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    calculateBreakPoint(int maxDamage)
     
     
    static FuzzyMode
    Returns the enum constant of this class with the specified name.
    static FuzzyMode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • IGNORE_ALL

      public static final FuzzyMode IGNORE_ALL
      Matches any item from undamaged to including 0% durability, but not negative durability (where item damage exceeds maxdamage).
    • PERCENT_99

      public static final FuzzyMode PERCENT_99
      Matches items that have less than 100% durability (that is, at least 1 damage point) if a damaged item is used as the filter, or undamaged items otherwise.
    • PERCENT_75

      public static final FuzzyMode PERCENT_75
      If an item with less than 75% durability is used as the filter, items with less than 75% durability are matched. Otherwise items with 75% durability or more are matched.
    • PERCENT_50

      public static final FuzzyMode PERCENT_50
      If an item with less than 50% durability is used as the filter, items with less than 50% durability are matched. Otherwise items with 50% durability or more are matched.
    • PERCENT_25

      public static final FuzzyMode PERCENT_25
      If an item with less than 25% durability is used as the filter, items with less than 50% durability are matched. Otherwise items with 25% durability or more are matched.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<FuzzyMode> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,FuzzyMode> STREAM_CODEC
    • breakPoint

      public final float breakPoint
    • percentage

      public final float percentage
      Note this is percentage "damaged". It's the inverse of percentage durability.
  • Method Details

    • values

      public static FuzzyMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FuzzyMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • calculateBreakPoint

      public int calculateBreakPoint(int maxDamage)
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable