mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-12 12:00:59 +00:00
Fixed paper breaking in one of their latest updates
This commit is contained in:
parent
183ac73579
commit
759444090b
1 changed files with 3 additions and 2 deletions
|
@ -69,7 +69,7 @@ public class ReflectionManager {
|
||||||
try {
|
try {
|
||||||
Object entity = createEntityInstance(DisguiseType.COW, "Cow");
|
Object entity = createEntityInstance(DisguiseType.COW, "Cow");
|
||||||
|
|
||||||
for (Method method : getNmsClass("EntityLiving").getDeclaredMethods()) {
|
for (Method method : getNmsClass("EntityCow").getDeclaredMethods()) {
|
||||||
if (method.getReturnType() != float.class)
|
if (method.getReturnType() != float.class)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -86,7 +86,8 @@ public class ReflectionManager {
|
||||||
if ((float) method.invoke(entity) != 0.4f)
|
if ((float) method.invoke(entity) != 0.4f)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
damageAndIdleSoundMethod = method;
|
damageAndIdleSoundMethod = getNmsClass("EntityLiving").getDeclaredMethod(method.getName());
|
||||||
|
damageAndIdleSoundMethod.setAccessible(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue