Class EnvironmentAttribute<Value>

java.lang.Object
net.minecraft.world.attribute.EnvironmentAttribute<Value>

public class EnvironmentAttribute<Value> extends Object
  • Field Details

    • type

      private final AttributeType<Value> type
    • defaultValue

      private final Value defaultValue
    • valueRange

      private final AttributeRange<Value> valueRange
    • isSyncable

      private final boolean isSyncable
    • isPositional

      private final boolean isPositional
    • isSpatiallyInterpolated

      private final boolean isSpatiallyInterpolated
  • Constructor Details

    • EnvironmentAttribute

      EnvironmentAttribute(AttributeType<Value> pType, Value pDefaultValue, AttributeRange<Value> pValueRange, boolean pIsSyncable, boolean pIsPositional, boolean pIsSpatiallyInterpolated)
  • Method Details

    • builder

      public static <Value> EnvironmentAttribute.Builder<Value> builder(AttributeType<Value> pType)
    • type

      public AttributeType<Value> type()
    • defaultValue

      public Value defaultValue()
    • valueCodec

      public com.mojang.serialization.Codec<Value> valueCodec()
    • sanitizeValue

      public Value sanitizeValue(Value pValue)
    • isSyncable

      public boolean isSyncable()
    • isPositional

      public boolean isPositional()
    • isSpatiallyInterpolated

      public boolean isSpatiallyInterpolated()
    • toString

      public String toString()
      Overrides:
      toString in class Object