Fixed paper breaking in one of their latest updates

This commit is contained in:
libraryaddict 2020-04-28 00:59:49 +12:00
parent 183ac73579
commit 759444090b
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

@ -69,7 +69,7 @@ public class ReflectionManager {
try {
Object entity = createEntityInstance(DisguiseType.COW, "Cow");
for (Method method : getNmsClass("EntityLiving").getDeclaredMethods()) {
for (Method method : getNmsClass("EntityCow").getDeclaredMethods()) {
if (method.getReturnType() != float.class)
continue;
@ -86,7 +86,8 @@ public class ReflectionManager {
if ((float) method.invoke(entity) != 0.4f)
continue;
damageAndIdleSoundMethod = method;
damageAndIdleSoundMethod = getNmsClass("EntityLiving").getDeclaredMethod(method.getName());
damageAndIdleSoundMethod.setAccessible(true);
break;
}
}