#978: Add Material#getDefaultAttributeModifiers
By: coll1234567 <joshl5324@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import java.util.List;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeInstance;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
|
||||
public class CraftAttributeInstance implements AttributeInstance {
|
||||
|
||||
@@ -72,4 +73,8 @@ public class CraftAttributeInstance implements AttributeInstance {
|
||||
public static AttributeModifier convert(net.minecraft.world.entity.ai.attributes.AttributeModifier nms) {
|
||||
return new AttributeModifier(nms.getId(), nms.getName(), nms.getAmount(), AttributeModifier.Operation.values()[nms.getOperation().ordinal()]);
|
||||
}
|
||||
|
||||
public static AttributeModifier convert(net.minecraft.world.entity.ai.attributes.AttributeModifier nms, EquipmentSlot slot) {
|
||||
return new AttributeModifier(nms.getId(), nms.getName(), nms.getAmount(), AttributeModifier.Operation.values()[nms.getOperation().ordinal()], slot);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user