Search in sources :

Example 1 with CraftAttributeMap

use of org.bukkit.craftbukkit.v1_16_R1.attribute.CraftAttributeMap in project MyPet by MyPetORG.

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);
}
Also used : Field(java.lang.reflect.Field) CraftAttributeMap(org.bukkit.craftbukkit.v1_16_R3.attribute.CraftAttributeMap)

Example 2 with CraftAttributeMap

use of org.bukkit.craftbukkit.v1_16_R1.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);
}
Also used : Field(java.lang.reflect.Field) CraftAttributeMap(org.bukkit.craftbukkit.v1_16_R1.attribute.CraftAttributeMap)

Example 3 with CraftAttributeMap

use of org.bukkit.craftbukkit.v1_16_R1.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);
}
Also used : Field(java.lang.reflect.Field) CraftAttributeMap(org.bukkit.craftbukkit.v1_16_R3.attribute.CraftAttributeMap)

Example 4 with CraftAttributeMap

use of org.bukkit.craftbukkit.v1_16_R1.attribute.CraftAttributeMap in project MyPet by MyPetORG.

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);
}
Also used : Field(java.lang.reflect.Field) CraftAttributeMap(org.bukkit.craftbukkit.v1_16_R1.attribute.CraftAttributeMap)

Aggregations

Field (java.lang.reflect.Field)4 CraftAttributeMap (org.bukkit.craftbukkit.v1_16_R1.attribute.CraftAttributeMap)2 CraftAttributeMap (org.bukkit.craftbukkit.v1_16_R3.attribute.CraftAttributeMap)2