PocketMine-MP 5.16.1 git-585aee9386a787c95e73dd0a05ffca8329606b68
pocketmine\entity\Attribute Class Reference
+ Collaboration diagram for pocketmine\entity\Attribute:

Public Member Functions

 __construct (protected string $id, protected float $minValue, protected float $maxValue, protected float $defaultValue, protected bool $shouldSend=true)
 
 getDefaultValue ()
 
 getId ()
 
 getMaxValue ()
 
 getMinValue ()
 
 getValue ()
 
 isDesynchronized ()
 
 isSyncable ()
 
 markSynchronized (bool $synced=true)
 
 resetToDefault ()
 
 setDefaultValue (float $defaultValue)
 
 setMaxValue (float $maxValue)
 
 setMinValue (float $minValue)
 
 setValue (float $value, bool $fit=false, bool $forceSend=false)
 

Public Attributes

const ABSORPTION = self::MC_PREFIX . "absorption"
 
const ATTACK_DAMAGE = self::MC_PREFIX . "attack_damage"
 
const EXHAUSTION = self::MC_PREFIX . "player.exhaustion"
 
const EXPERIENCE = self::MC_PREFIX . "player.experience"
 
const EXPERIENCE_LEVEL = self::MC_PREFIX . "player.level"
 
const FALL_DAMAGE = self::MC_PREFIX . "fall_damage"
 
const FOLLOW_RANGE = self::MC_PREFIX . "follow_range"
 
const FOOD = self::HUNGER
 
const HEALTH = self::MC_PREFIX . "health"
 
const HORSE_JUMP_STRENGTH = self::MC_PREFIX . "horse.jump_strength"
 
const HUNGER = self::MC_PREFIX . "player.hunger"
 
const KNOCKBACK_RESISTANCE = self::MC_PREFIX . "knockback_resistance"
 
const LAVA_MOVEMENT = self::MC_PREFIX . "lava_movement"
 
const LUCK = self::MC_PREFIX . "luck"
 
const MC_PREFIX = "minecraft:"
 
const MOVEMENT_SPEED = self::MC_PREFIX . "movement"
 
const SATURATION = self::MC_PREFIX . "player.saturation"
 
const UNDERWATER_MOVEMENT = self::MC_PREFIX . "underwater_movement"
 
const ZOMBIE_SPAWN_REINFORCEMENTS = self::MC_PREFIX . "zombie.spawn_reinforcements"
 

Protected Attributes

float $currentValue
 
bool $desynchronized = true
 

Detailed Description

Definition at line 29 of file src/entity/Attribute.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\entity\Attribute::__construct ( protected string  $id,
protected float  $minValue,
protected float  $maxValue,
protected float  $defaultValue,
protected bool  $shouldSend = true 
)

Definition at line 54 of file src/entity/Attribute.php.

Member Function Documentation

◆ getDefaultValue()

pocketmine\entity\Attribute::getDefaultValue ( )

Definition at line 105 of file src/entity/Attribute.php.

◆ getId()

pocketmine\entity\Attribute::getId ( )

Definition at line 153 of file src/entity/Attribute.php.

◆ getMaxValue()

pocketmine\entity\Attribute::getMaxValue ( )

Definition at line 86 of file src/entity/Attribute.php.

◆ getMinValue()

pocketmine\entity\Attribute::getMinValue ( )

Definition at line 67 of file src/entity/Attribute.php.

◆ getValue()

pocketmine\entity\Attribute::getValue ( )

Definition at line 128 of file src/entity/Attribute.php.

◆ isDesynchronized()

pocketmine\entity\Attribute::isDesynchronized ( )

Definition at line 161 of file src/entity/Attribute.php.

◆ isSyncable()

pocketmine\entity\Attribute::isSyncable ( )

Definition at line 157 of file src/entity/Attribute.php.

◆ markSynchronized()

pocketmine\entity\Attribute::markSynchronized ( bool  $synced = true)

Definition at line 165 of file src/entity/Attribute.php.

◆ resetToDefault()

pocketmine\entity\Attribute::resetToDefault ( )

Definition at line 124 of file src/entity/Attribute.php.

◆ setDefaultValue()

pocketmine\entity\Attribute::setDefaultValue ( float  $defaultValue)
Returns
$this

Definition at line 112 of file src/entity/Attribute.php.

◆ setMaxValue()

pocketmine\entity\Attribute::setMaxValue ( float  $maxValue)
Returns
$this

Definition at line 93 of file src/entity/Attribute.php.

◆ setMinValue()

pocketmine\entity\Attribute::setMinValue ( float  $minValue)
Returns
$this

Definition at line 74 of file src/entity/Attribute.php.

◆ setValue()

pocketmine\entity\Attribute::setValue ( float  $value,
bool  $fit = false,
bool  $forceSend = false 
)
Returns
$this

Definition at line 135 of file src/entity/Attribute.php.

Member Data Documentation

◆ $currentValue

float pocketmine\entity\Attribute::$currentValue
protected

Definition at line 51 of file src/entity/Attribute.php.

◆ $desynchronized

bool pocketmine\entity\Attribute::$desynchronized = true
protected

Definition at line 52 of file src/entity/Attribute.php.

◆ ABSORPTION

const pocketmine\entity\Attribute::ABSORPTION = self::MC_PREFIX . "absorption"

Definition at line 32 of file src/entity/Attribute.php.

◆ ATTACK_DAMAGE

const pocketmine\entity\Attribute::ATTACK_DAMAGE = self::MC_PREFIX . "attack_damage"

Definition at line 41 of file src/entity/Attribute.php.

◆ EXHAUSTION

const pocketmine\entity\Attribute::EXHAUSTION = self::MC_PREFIX . "player.exhaustion"

Definition at line 34 of file src/entity/Attribute.php.

◆ EXPERIENCE

const pocketmine\entity\Attribute::EXPERIENCE = self::MC_PREFIX . "player.experience"

Definition at line 43 of file src/entity/Attribute.php.

◆ EXPERIENCE_LEVEL

const pocketmine\entity\Attribute::EXPERIENCE_LEVEL = self::MC_PREFIX . "player.level"

Definition at line 42 of file src/entity/Attribute.php.

◆ FALL_DAMAGE

const pocketmine\entity\Attribute::FALL_DAMAGE = self::MC_PREFIX . "fall_damage"

Definition at line 46 of file src/entity/Attribute.php.

◆ FOLLOW_RANGE

const pocketmine\entity\Attribute::FOLLOW_RANGE = self::MC_PREFIX . "follow_range"

Definition at line 38 of file src/entity/Attribute.php.

◆ FOOD

const pocketmine\entity\Attribute::FOOD = self::HUNGER

Definition at line 40 of file src/entity/Attribute.php.

◆ HEALTH

const pocketmine\entity\Attribute::HEALTH = self::MC_PREFIX . "health"

Definition at line 36 of file src/entity/Attribute.php.

◆ HORSE_JUMP_STRENGTH

const pocketmine\entity\Attribute::HORSE_JUMP_STRENGTH = self::MC_PREFIX . "horse.jump_strength"

Definition at line 47 of file src/entity/Attribute.php.

◆ HUNGER

const pocketmine\entity\Attribute::HUNGER = self::MC_PREFIX . "player.hunger"

Definition at line 39 of file src/entity/Attribute.php.

◆ KNOCKBACK_RESISTANCE

const pocketmine\entity\Attribute::KNOCKBACK_RESISTANCE = self::MC_PREFIX . "knockback_resistance"

Definition at line 35 of file src/entity/Attribute.php.

◆ LAVA_MOVEMENT

const pocketmine\entity\Attribute::LAVA_MOVEMENT = self::MC_PREFIX . "lava_movement"

Definition at line 49 of file src/entity/Attribute.php.

◆ LUCK

const pocketmine\entity\Attribute::LUCK = self::MC_PREFIX . "luck"

Definition at line 45 of file src/entity/Attribute.php.

◆ MC_PREFIX

const pocketmine\entity\Attribute::MC_PREFIX = "minecraft:"

Definition at line 30 of file src/entity/Attribute.php.

◆ MOVEMENT_SPEED

const pocketmine\entity\Attribute::MOVEMENT_SPEED = self::MC_PREFIX . "movement"

Definition at line 37 of file src/entity/Attribute.php.

◆ SATURATION

const pocketmine\entity\Attribute::SATURATION = self::MC_PREFIX . "player.saturation"

Definition at line 33 of file src/entity/Attribute.php.

◆ UNDERWATER_MOVEMENT

const pocketmine\entity\Attribute::UNDERWATER_MOVEMENT = self::MC_PREFIX . "underwater_movement"

Definition at line 44 of file src/entity/Attribute.php.

◆ ZOMBIE_SPAWN_REINFORCEMENTS

const pocketmine\entity\Attribute::ZOMBIE_SPAWN_REINFORCEMENTS = self::MC_PREFIX . "zombie.spawn_reinforcements"

Definition at line 48 of file src/entity/Attribute.php.


The documentation for this class was generated from the following file: