From dcc3fcea50640a68df8d79559cb58ef5ec1a4295 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 13 Jul 2013 08:19:24 +1200 Subject: [PATCH] Change the method to accept a string and feed it a string instead --- src/me/libraryaddict/disguise/DisguiseTypes/Values.java | 7 +++---- src/me/libraryaddict/disguise/LibsDisguises.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Values.java b/src/me/libraryaddict/disguise/DisguiseTypes/Values.java index 6b2e9258..60d0e14a 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Values.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Values.java @@ -2,12 +2,11 @@ package me.libraryaddict.disguise.DisguiseTypes; import java.util.HashMap; -import net.minecraft.server.v1_6_R2.IAttribute; - public class Values { private static HashMap> attributesValues = new HashMap>(); private static HashMap> metaValues = new HashMap>(); + public static HashMap getAttributesValues(DisguiseType type) { if (type == DisguiseType.DONKEY || type == DisguiseType.MULE || type == DisguiseType.ZOMBIE_HORSE || type == DisguiseType.SKELETON_HORSE) @@ -40,8 +39,8 @@ public class Values { attributesValues.put(this.type, new HashMap()); } - public void setAttributesValue(IAttribute no, Double value) { - attributesValues.get(type).put(no.a(), value); + public void setAttributesValue(String attribute, Double value) { + attributesValues.get(type).put(attribute, value); } public void setMetaValue(int no, Object value) { diff --git a/src/me/libraryaddict/disguise/LibsDisguises.java b/src/me/libraryaddict/disguise/LibsDisguises.java index 9febda57..c6abc312 100644 --- a/src/me/libraryaddict/disguise/LibsDisguises.java +++ b/src/me/libraryaddict/disguise/LibsDisguises.java @@ -267,7 +267,7 @@ public class LibsDisguises extends JavaPlugin implements Listener { value.setMetaValue(watch.a(), watch.b()); if (entity instanceof EntityLiving) { EntityLiving livingEntity = (EntityLiving) entity; - value.setAttributesValue(GenericAttributes.d, livingEntity.getAttributeInstance(GenericAttributes.d) + value.setAttributesValue(GenericAttributes.d.a(), livingEntity.getAttributeInstance(GenericAttributes.d) .getValue()); } } catch (Exception e1) {