Some entity attribute docs (#1609)

* Some attribute docs

* Update mappings/net/minecraft/entity/attribute/EntityAttribute.mapping

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/ClampedEntityAttribute.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttribute.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttributeInstance.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttributeInstance.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttributeInstance.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* has and clarify

* Update mappings/net/minecraft/entity/attribute/ClampedEntityAttribute.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttribute.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttribute.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttribute.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttribute.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/entity/attribute/EntityAttributeModifier.mapping

Co-authored-by: Yanis48 <doublecraft.official@gmail.com>

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Yanis48 <doublecraft.official@gmail.com>
This commit is contained in:
i509VCB 2020-07-27 13:45:14 -05:00 committed by GitHub
parent a83a057fe4
commit 4923086c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 51 additions and 1 deletions

View File

@ -24,6 +24,10 @@ CLASS net/minecraft/class_5131 net/minecraft/entity/attribute/AttributeContainer
METHOD method_26855 toTag ()Lnet/minecraft/class_2499;
METHOD method_26856 getBaseValue (Lnet/minecraft/class_1320;)D
ARG 1 attribute
METHOD method_26857 (Lnet/minecraft/class_1324;)Z
ARG 0 attribute
METHOD method_26858 (Lnet/minecraft/class_1320;)Lnet/minecraft/class_1324;
ARG 1 attribute
METHOD method_27305 hasModifierForAttribute (Lnet/minecraft/class_1320;Ljava/util/UUID;)Z
ARG 1 attribute
ARG 2 uuid

View File

@ -1,4 +1,5 @@
CLASS net/minecraft/class_1329 net/minecraft/entity/attribute/ClampedEntityAttribute
COMMENT Represents a type of attribute with minimum and maximum value limits.
FIELD field_6351 maxValue D
FIELD field_6353 minValue D
METHOD <init> (Ljava/lang/String;DDD)V

View File

@ -15,6 +15,11 @@ CLASS net/minecraft/class_5132 net/minecraft/entity/attribute/DefaultAttributeCo
METHOD method_27308 getModifierValue (Lnet/minecraft/class_1320;Ljava/util/UUID;)D
ARG 1 attribute
ARG 2 uuid
METHOD method_27309 hasModifier (Lnet/minecraft/class_1320;Ljava/util/UUID;)Z
ARG 1 type
ARG 2 uuid
METHOD method_27310 has (Lnet/minecraft/class_1320;)Z
ARG 1 type
CLASS class_5133 Builder
FIELD field_23714 instances Ljava/util/Map;
FIELD field_23715 unmodifiable Z
@ -24,5 +29,7 @@ CLASS net/minecraft/class_5132 net/minecraft/entity/attribute/DefaultAttributeCo
METHOD method_26868 add (Lnet/minecraft/class_1320;D)Lnet/minecraft/class_5132$class_5133;
ARG 1 attribute
ARG 2 baseValue
METHOD method_26869 (Lnet/minecraft/class_1320;Lnet/minecraft/class_1324;)V
ARG 2 attribute
METHOD method_26870 checkedAdd (Lnet/minecraft/class_1320;)Lnet/minecraft/class_1324;
ARG 1 attribute

View File

@ -1,4 +1,8 @@
CLASS net/minecraft/class_1320 net/minecraft/entity/attribute/EntityAttribute
COMMENT Represents a type of double-valued attribute that a living entity may have.
COMMENT
COMMENT <p>An attribute is a tracked double value stored on an entity.
COMMENT An attribute has a default value on which attribute modifiers operate.
FIELD field_23697 fallback D
FIELD field_23698 tracked Z
FIELD field_23699 translationKey Ljava/lang/String;
@ -6,9 +10,11 @@ CLASS net/minecraft/class_1320 net/minecraft/entity/attribute/EntityAttribute
ARG 1 translationKey
ARG 2 fallback
METHOD method_26829 setTracked (Z)Lnet/minecraft/class_1320;
COMMENT Sets all instances of this attribute to synchronize their values to clients.
ARG 1 tracked
METHOD method_26830 getTranslationKey ()Ljava/lang/String;
METHOD method_6165 clamp (D)D
ARG 1 value
METHOD method_6168 isTracked ()Z
COMMENT Checks if instances of this attribute should synchronize values to clients.
METHOD method_6169 getDefaultValue ()D

View File

@ -1,7 +1,8 @@
CLASS net/minecraft/class_1324 net/minecraft/entity/attribute/EntityAttributeInstance
COMMENT A double-valued attribute.
FIELD field_23700 type Lnet/minecraft/class_1320;
FIELD field_23701 operationToModifiers Ljava/util/Map;
FIELD field_23702 byId Ljava/util/Map;
FIELD field_23702 idToModifiers Ljava/util/Map;
FIELD field_23703 persistentModifiers Ljava/util/Set;
FIELD field_23704 baseValue D
FIELD field_23705 dirty Z
@ -11,17 +12,35 @@ CLASS net/minecraft/class_1324 net/minecraft/entity/attribute/EntityAttributeIns
ARG 1 type
ARG 2 updateCallback
METHOD method_26831 setFrom (Lnet/minecraft/class_1324;)V
COMMENT Copies the values of an attribute to this attribute.
COMMENT
COMMENT <p>Temporary modifiers are copied when using the operation.
ARG 1 other
METHOD method_26832 (Lnet/minecraft/class_1322$class_1323;Ljava/util/Set;)V
ARG 1 operation
ARG 2 modifiers
METHOD method_26833 fromTag (Lnet/minecraft/class_2487;)V
ARG 1 tag
METHOD method_26834 getModifiersByOperation (Lnet/minecraft/class_1322$class_1323;)Ljava/util/Collection;
ARG 1 operation
METHOD method_26835 addTemporaryModifier (Lnet/minecraft/class_1322;)V
COMMENT Adds a temporary attribute modifier.
COMMENT The modifier will not be serialized.
ARG 1 modifier
METHOD method_26836 (Lnet/minecraft/class_1322$class_1323;)Ljava/util/Set;
ARG 0 operation
METHOD method_26837 addPersistentModifier (Lnet/minecraft/class_1322;)V
ARG 1 modifier
METHOD method_26838 onUpdate ()V
METHOD method_26839 toTag ()Lnet/minecraft/class_2487;
METHOD method_26840 computeValue ()D
COMMENT Computes this attribute's value, taking modifiers into account.
COMMENT
COMMENT <p>Attribute modifiers are applied in order by operation:
COMMENT <ul><li>{@link net.minecraft.entity.attribute.EntityAttributeModifier.Operation#ADDITION ADDITION} // Adds the value of the modifier to the attribute's base value.</li>
COMMENT <li>{@link net.minecraft.entity.attribute.EntityAttributeModifier.Operation#MULTIPLY_BASE MULTIPLY_BASE} // Multiplies the value of the modifier to the attributes base value, and then adds it to the total value.</li>
COMMENT <li>{@link net.minecraft.entity.attribute.EntityAttributeModifier.Operation#MULTIPLY_TOTAL MULTIPLY_TOTAL} // Adds 1 to the value of the attribute modifier. Then multiplies the attribute's value by the total value of the attribute after addition and multiplication of the base value occur.</li>
COMMENT </ul>
METHOD method_27304 tryRemoveModifier (Ljava/util/UUID;)Z
ARG 1 uuid
METHOD method_6192 setBaseValue (D)V
@ -40,6 +59,8 @@ CLASS net/minecraft/class_1324 net/minecraft/entity/attribute/EntityAttributeIns
METHOD method_6200 removeModifier (Ljava/util/UUID;)V
ARG 1 uuid
METHOD method_6201 getBaseValue ()D
COMMENT Gets the base value of this attribute instance.
COMMENT This is the value before any attribute modifiers are applied.
METHOD method_6202 removeModifier (Lnet/minecraft/class_1322;)V
ARG 1 modifier
METHOD method_6203 clearModifiers ()V

View File

@ -28,7 +28,18 @@ CLASS net/minecraft/class_1322 net/minecraft/entity/attribute/EntityAttributeMod
METHOD method_6186 getValue ()D
METHOD method_6189 getId ()Ljava/util/UUID;
CLASS class_1323 Operation
COMMENT Represents an operation which can be applied to an attribute modifier.
FIELD field_6328 ADDITION Lnet/minecraft/class_1322$class_1323;
COMMENT Adds to the base value of an attribute.
FIELD field_6329 id I
FIELD field_6330 MULTIPLY_BASE Lnet/minecraft/class_1322$class_1323;
COMMENT Multiplies the base value of the attribute.
COMMENT
COMMENT <p>Is applied after addition.
FIELD field_6331 MULTIPLY_TOTAL Lnet/minecraft/class_1322$class_1323;
COMMENT Multiplies the total value of the attribute.
COMMENT
COMMENT <p>The total value is equal to the sum of all additions and base multiplications applied by an attribute modifier.
FIELD field_6332 VALUES [Lnet/minecraft/class_1322$class_1323;
METHOD <init> (Ljava/lang/String;II)V
ARG 3 id