New WG Flag expressions (SkRambled expressions are somewhat broken)...
Register event-entity on Elytra Glide event Change Elytra glide state to accept entities Fixed "add x nbt of %slot%" Fix an NPE in the NBTOf expression
This commit is contained in:
@@ -175,7 +175,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
@@ -189,7 +189,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
@@ -240,7 +240,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
@@ -269,7 +269,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
@@ -285,7 +285,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
@@ -298,18 +298,7 @@ public class EffSetPathGoal extends Effect {
|
||||
double spd = (meleeSpeed == null ? 1.0D : meleeSpeed.getSingle(e).doubleValue());
|
||||
boolean memorize = (meleeMemorize == null ? false : meleeMemorize.getSingle(e));
|
||||
Class<?> goalMeleeAttack = ReflectionUtils.getNMSClass("PathfinderGoalMeleeAttack");
|
||||
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));
|
||||
}
|
||||
newGoals.add(goalMeleeAttack.getConstructor(entCreature, double.class, boolean.class).newInstance(nmsEnt, spd, memorize));
|
||||
}
|
||||
} else if (mark == 13) {
|
||||
double spd = (moveTargetSpeed == null ? 1.0D : moveTargetSpeed.getSingle(e).doubleValue());
|
||||
@@ -324,7 +313,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
@@ -339,7 +328,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
@@ -450,7 +439,7 @@ public class EffSetPathGoal extends Effect {
|
||||
for (EntityData<?> entData : types) {
|
||||
if (!LivingEntity.class.isAssignableFrom(entData.getType()))
|
||||
return;
|
||||
String className = entData.getType().getClass().getSimpleName();
|
||||
String className = entData.getType().getSimpleName();
|
||||
if (className.equals("HumanEntity")) {
|
||||
className = "Human";
|
||||
} else if (className.equals("EntityLiving")) {
|
||||
|
||||
Reference in New Issue
Block a user