use of net.minecraft.server.v1_16_R3.PathfinderGoalSelector in project Citizens2 by CitizensDev.
the class NMSImpl method clearGoals.
public static void clearGoals(PathfinderGoalSelector... goalSelectors) {
if (GOAL_FIELD == null || goalSelectors == null)
return;
for (PathfinderGoalSelector selector : goalSelectors) {
try {
Collection<?> list = (Collection<?>) GOAL_FIELD.invoke(selector);
list.clear();
} catch (Exception e) {
Messaging.logTr(Messages.ERROR_CLEARING_GOALS, e.getLocalizedMessage());
} catch (Throwable e) {
Messaging.logTr(Messages.ERROR_CLEARING_GOALS, e.getLocalizedMessage());
}
}
}
use of net.minecraft.server.v1_16_R3.PathfinderGoalSelector in project Citizens2 by CitizensDev.
the class NMSImpl method clearGoals.
public static void clearGoals(PathfinderGoalSelector... goalSelectors) {
if (GOAL_FIELD == null || goalSelectors == null)
return;
for (PathfinderGoalSelector selector : goalSelectors) {
try {
Collection<?> list = (Collection<?>) GOAL_FIELD.get(selector);
list.clear();
} catch (Exception e) {
Messaging.logTr(Messages.ERROR_CLEARING_GOALS, e.getLocalizedMessage());
}
}
}
use of net.minecraft.server.v1_16_R3.PathfinderGoalSelector in project Citizens2 by CitizensDev.
the class NMSImpl method clearGoals.
public static void clearGoals(PathfinderGoalSelector... goalSelectors) {
if (GOAL_FIELD == null || goalSelectors == null)
return;
for (PathfinderGoalSelector selector : goalSelectors) {
try {
Collection<?> list = (Collection<?>) GOAL_FIELD.get(selector);
list.clear();
} catch (Exception e) {
Messaging.logTr(Messages.ERROR_CLEARING_GOALS, e.getLocalizedMessage());
}
}
}
Aggregations