use of org.bukkit.craftbukkit.v1_18_R2.attribute.CraftAttributeMap in project MyPet by xXKeyleXx.
the class EntityMyPet method replaceCraftAttributes.
protected void replaceCraftAttributes() {
Field craftAttributesField = ReflectionUtil.getField(EntityLiving.class, "craftAttributes");
CraftAttributeMap craftAttributes = new CraftAttributeMap(this.getAttributeMap());
ReflectionUtil.setFinalFieldValue(craftAttributesField, this, craftAttributes);
}
use of org.bukkit.craftbukkit.v1_18_R2.attribute.CraftAttributeMap in project PaperDev by Kamillaova.
the class EntityLiving method getAttributeMap.
public AttributeMapBase getAttributeMap() {
if (this.attributeMap == null) {
this.attributeMap = new AttributeMapServer();
// CraftBukkit
this.craftAttributes = new CraftAttributeMap(attributeMap);
}
return this.attributeMap;
}
use of org.bukkit.craftbukkit.v1_18_R2.attribute.CraftAttributeMap in project MyPet by xXKeyleXx.
the class EntityMyPet method replaceCraftAttributes.
protected void replaceCraftAttributes() {
Field craftAttributesField = ReflectionUtil.getField(EntityLiving.class, "craftAttributes");
CraftAttributeMap craftAttributes = new CraftAttributeMap(this.getAttributeMap());
ReflectionUtil.setFinalFieldValue(craftAttributesField, this, craftAttributes);
}
Aggregations