Why did that happen?
This commit is contained in:
parent
48685db4be
commit
d83015f11a
@ -175,7 +175,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
@ -189,7 +189,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
@ -240,7 +240,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
@ -269,7 +269,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
@ -285,7 +285,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
@ -298,7 +298,18 @@ public class EffSetPathGoal extends Effect {
|
|||||||
double spd = (meleeSpeed == null ? 1.0D : meleeSpeed.getSingle(e).doubleValue());
|
double spd = (meleeSpeed == null ? 1.0D : meleeSpeed.getSingle(e).doubleValue());
|
||||||
boolean memorize = (meleeMemorize == null ? false : meleeMemorize.getSingle(e));
|
boolean memorize = (meleeMemorize == null ? false : meleeMemorize.getSingle(e));
|
||||||
Class<?> goalMeleeAttack = ReflectionUtils.getNMSClass("PathfinderGoalMeleeAttack");
|
Class<?> goalMeleeAttack = ReflectionUtils.getNMSClass("PathfinderGoalMeleeAttack");
|
||||||
newGoals.add(goalMeleeAttack.getConstructor(entCreature, double.class, boolean.class).newInstance(nmsEnt, spd, memorize));
|
for (EntityData<?> entData : types) {
|
||||||
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
|
return;
|
||||||
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
|
if (className.equals("HumanEntity")) {
|
||||||
|
className = "Human";
|
||||||
|
} else if (className.equals("EntityLiving")) {
|
||||||
|
className = "Living";
|
||||||
|
}
|
||||||
|
Class<?> nmsClass = ReflectionUtils.getNMSClass("Entity" + className);
|
||||||
|
newGoals.add(goalMeleeAttack.getConstructor(entCreature, Class.class, double.class, boolean.class).newInstance(nmsEnt, nmsClass, spd, memorize));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (mark == 13) {
|
} else if (mark == 13) {
|
||||||
double spd = (moveTargetSpeed == null ? 1.0D : moveTargetSpeed.getSingle(e).doubleValue());
|
double spd = (moveTargetSpeed == null ? 1.0D : moveTargetSpeed.getSingle(e).doubleValue());
|
||||||
@ -313,7 +324,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
@ -328,7 +339,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
@ -439,7 +450,7 @@ public class EffSetPathGoal extends Effect {
|
|||||||
for (EntityData<?> entData : types) {
|
for (EntityData<?> entData : types) {
|
||||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||||
return;
|
return;
|
||||||
String className = entData.getType().getSimpleName();
|
String className = entData.getType().getClass().getSimpleName();
|
||||||
if (className.equals("HumanEntity")) {
|
if (className.equals("HumanEntity")) {
|
||||||
className = "Human";
|
className = "Human";
|
||||||
} else if (className.equals("EntityLiving")) {
|
} else if (className.equals("EntityLiving")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user