Archiviert
13
0

Revert changes to EntityUtilities

Citizens fixed the problem on their end
Dieser Commit ist enthalten in:
Dan Mulloy 2016-03-06 18:32:39 -05:00
Ursprung b8497a91a6
Commit ec38ac7292

Datei anzeigen

@ -216,9 +216,7 @@ class EntityUtilities {
throw new FieldAccessException("Cannot access 'trackedEntities' field due to security limitations.", e);
}
Object trackerEntry = WrappedIntHashMap.fromHandle(trackedEntities).get(entityID);
Class<?> entryClass = MinecraftReflection.getMinecraftClass("EntityTrackerEntry");
return entryClass.cast(trackerEntry);
return WrappedIntHashMap.fromHandle(trackedEntities).get(entityID);
}
/**
@ -235,7 +233,8 @@ class EntityUtilities {
if (trackerEntry != null) {
if (trackerField == null) {
try {
trackerField = trackerEntry.getClass().getDeclaredField("tracker");
Class<?> entryClass = MinecraftReflection.getMinecraftClass("EntityTrackerEntry");
trackerField = entryClass.getDeclaredField("tracker");
} catch (NoSuchFieldException e) {
// Assume it's the first entity field then
trackerField = FuzzyReflection.fromObject(trackerEntry, true)
@ -251,7 +250,6 @@ class EntityUtilities {
return (Entity) MinecraftReflection.getBukkitEntity(tracker);
else
return null;
} catch (Exception e) {
throw new FieldAccessException("Cannot find entity from ID " + entityID + ".", e);
}