Class EntityAttribute
java.lang.Object
me.gamercoder215.mobchip.ai.attribute.EntityAttribute
Represents an Entity's Attribute
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Entity Attribute Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Attribute
Represents Attribute#BLOCK_BREAK_SPEEDstatic final Attribute
Represents Attribute#BLOCK_INTERACTION_RANGEstatic final Attribute
Represents Attribute#ENTITY_INTERACTION_RANGEstatic final Attribute
Represents Attribute#FALL_DAMAGE_MULTIPLIERstatic final Attribute
RepresentsAttribute.GENERIC_ARMOR
static final Attribute
RepresentsAttribute.GENERIC_ARMOR_TOUGHNESS
static final Attribute
RepresentsAttribute.GENERIC_ATTACK_DAMAGE
static final Attribute
Represents Attribute#GENERIC_ATTACK_KNOCKBACKstatic final Attribute
RepresentsAttribute.GENERIC_ATTACK_SPEED
static final Attribute
RepresentsAttribute.GENERIC_FLYING_SPEED
static final Attribute
RepresentsAttribute.GENERIC_FOLLOW_RANGE
static final Attribute
RepresentsAttribute.GENERIC_KNOCKBACK_RESISTANCE
static final Attribute
RepresentsAttribute.GENERIC_LUCK
static final Attribute
RepresentsAttribute.GENERIC_MAX_HEALTH
static final Attribute
RepresentsAttribute.GENERIC_MOVEMENT_SPEED
static final Attribute
Represents Attribute#GENERIC_GRAVITYstatic final Attribute
RepresentsAttribute.HORSE_JUMP_STRENGTH
static final Attribute
Represents Attribute#GENERIC_MAX_ABSORPTIONstatic final Attribute
Represents Attribute#SAFE_FALL_DISTANCEstatic final Attribute
Represents Attribute#GENERIC_SCALEstatic final Attribute
Represents Attribute#GENERIC_STEP_HEIGHTstatic final Attribute
RepresentsAttribute.ZOMBIE_SPAWN_REINFORCEMENTS
-
Method Summary
Modifier and TypeMethodDescriptionstatic EntityAttribute.Builder
builder()
Fetches the EntityAttribute Builder.static boolean
exists
(@Nullable NamespacedKey key) Whether an Attribute exists in the Minecraft registrar.fromBukkit
(Attribute attribute) Converts a Bukkit Attribute to a MobChip Attribute.static @Nullable EntityAttribute
Fetches an EntityAttribute from the Minecraft registrar.double
Fetches the Default value of this AttributegetKey()
double
Fetches the maximum value of this Attributedouble
Fetches the minimum value of this Attribute.boolean
Whether this Attribute will sync and appear on the client's side.
-
Field Details
-
GENERIC_MAX_HEALTH
RepresentsAttribute.GENERIC_MAX_HEALTH
-
GENERIC_FOLLOW_RANGE
RepresentsAttribute.GENERIC_FOLLOW_RANGE
-
GENERIC_KNOCKBACK_RESISTANCE
RepresentsAttribute.GENERIC_KNOCKBACK_RESISTANCE
-
GENERIC_MOVEMENT_SPEED
RepresentsAttribute.GENERIC_MOVEMENT_SPEED
-
GENERIC_FLYING_SPEED
RepresentsAttribute.GENERIC_FLYING_SPEED
-
GENERIC_ATTACK_DAMAGE
RepresentsAttribute.GENERIC_ATTACK_DAMAGE
-
GENERIC_ATTACK_SPEED
RepresentsAttribute.GENERIC_ATTACK_SPEED
-
GENERIC_ARMOR
RepresentsAttribute.GENERIC_ARMOR
-
GENERIC_ARMOR_TOUGHNESS
RepresentsAttribute.GENERIC_ARMOR_TOUGHNESS
-
GENERIC_ATTACK_KNOCKBACK
Represents Attribute#GENERIC_ATTACK_KNOCKBACK -
GENERIC_LUCK
RepresentsAttribute.GENERIC_LUCK
-
ZOMBIE_SPAWN_REINFORCEMENTS
RepresentsAttribute.ZOMBIE_SPAWN_REINFORCEMENTS
-
HORSE_JUMP_STRENGTH
RepresentsAttribute.HORSE_JUMP_STRENGTH
-
MAX_ABSORPTION
Represents Attribute#GENERIC_MAX_ABSORPTION -
GRAVITY
Represents Attribute#GENERIC_GRAVITY -
SCALE
Represents Attribute#GENERIC_SCALE -
STEP_HEIGHT
Represents Attribute#GENERIC_STEP_HEIGHT -
SAFE_FALL_DISTANCE
Represents Attribute#SAFE_FALL_DISTANCE -
FALL_DAMAGE_MULTIPLIER
Represents Attribute#FALL_DAMAGE_MULTIPLIER -
BLOCK_INTERACTION_RANGE
Represents Attribute#BLOCK_INTERACTION_RANGE -
ENTITY_INTERACTION_RANGE
Represents Attribute#ENTITY_INTERACTION_RANGE -
BLOCK_BREAK_SPEED
Represents Attribute#BLOCK_BREAK_SPEED
-
-
Method Details
-
fromBukkit
Converts a Bukkit Attribute to a MobChip Attribute.- Parameters:
attribute
- Bukkit Attribute- Returns:
- MobChip Attribute, or null if Attribute is null
-
builder
Fetches the EntityAttribute Builder.- Returns:
- Attribute Builder
-
getMinValue
public double getMinValue()Description copied from interface:Attribute
Fetches the minimum value of this Attribute.- Specified by:
getMinValue
in interfaceAttribute
- Returns:
- Minimum value
-
getMaxValue
public double getMaxValue()Description copied from interface:Attribute
Fetches the maximum value of this Attribute- Specified by:
getMaxValue
in interfaceAttribute
- Returns:
- Maximum value
-
getDefaultValue
public double getDefaultValue()Description copied from interface:Attribute
Fetches the Default value of this Attribute- Specified by:
getDefaultValue
in interfaceAttribute
- Returns:
- Default value
-
getKey
-
isClientSide
public boolean isClientSide()Description copied from interface:Attribute
Whether this Attribute will sync and appear on the client's side.- Specified by:
isClientSide
in interfaceAttribute
- Returns:
- true if also client side, else false
-
getAttribute
@Nullable public static @Nullable EntityAttribute getAttribute(@Nullable @Nullable NamespacedKey key) Fetches an EntityAttribute from the Minecraft registrar.- Parameters:
key
- Key of the Attribute- Returns:
- Attribute found, or null if not found
-
exists
Whether an Attribute exists in the Minecraft registrar.- Parameters:
key
- Key of the Attribute- Returns:
- true if attribute exists, else false
-