Package appeng.api.config
Enum Class FuzzyMode
- All Implemented Interfaces:
Serializable
,Comparable<FuzzyMode>
,Constable
,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 ConstantsEnum ConstantDescriptionMatches 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
FieldsModifier and TypeFieldDescriptionfinal 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 TypeMethodDescriptionint
calculateBreakPoint
(int maxDamage) static FuzzyMode
Returns the enum constant of this class with the specified name.static FuzzyMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IGNORE_ALL
Matches any item from undamaged to including 0% durability, but not negative durability (where item damage exceeds maxdamage). -
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
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
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
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
-
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 percentageNote this is percentage "damaged". It's the inverse of percentage durability.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
calculateBreakPoint
public int calculateBreakPoint(int maxDamage) -
getSerializedName
- Specified by:
getSerializedName
in interfacenet.minecraft.util.StringRepresentable
-