use of net.minecraft.world.entity.ai.attributes.AttributeMap in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayerImpl method getAttributes.
private AttributeMap getAttributes() {
AttributeMap amb = new AttributeMap(DefaultAttributes.getSupplier(net.minecraft.world.entity.EntityType.PLAYER));
amb.load(((CompoundTagImpl) this.compound).toNMSTag().getList("Attributes", 10));
return amb;
}
use of net.minecraft.world.entity.ai.attributes.AttributeMap in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayerImpl method setMaxHealth.
@Override
public void setMaxHealth(double input) {
AttributeMap attributes = getAttributes();
AttributeInstance maxHealth = attributes.getInstance(Attributes.MAX_HEALTH);
maxHealth.setBaseValue(input);
setAttributes(attributes);
}
use of net.minecraft.world.entity.ai.attributes.AttributeMap in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayerImpl method getAttributes.
private AttributeMap getAttributes() {
AttributeMap amb = new AttributeMap(DefaultAttributes.getSupplier(net.minecraft.world.entity.EntityType.PLAYER));
amb.load(((CompoundTagImpl) this.compound).toNMSTag().getList("Attributes", 10));
return amb;
}
use of net.minecraft.world.entity.ai.attributes.AttributeMap in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayerImpl method setMaxHealth.
@Override
public void setMaxHealth(double input) {
AttributeMap attributes = getAttributes();
AttributeInstance maxHealth = attributes.getInstance(Attributes.MAX_HEALTH);
maxHealth.setBaseValue(input);
setAttributes(attributes);
}
Aggregations