use of org.bukkit.craftbukkit.v1_14_R1.entity.CraftCreature in project Ublisk by Derkades.
the class V1_12_R1 method setTarget.
@Override
public void setTarget(Creature creature, LivingEntity target) {
CraftCreature craftCreature = (CraftCreature) creature;
EntityCreature nms = craftCreature.getHandle();
if (target == null) {
nms.setGoalTarget(null, null, false);
} else {
nms.setGoalTarget(((CraftLivingEntity) target).getHandle(), null, false);
}
}
use of org.bukkit.craftbukkit.v1_14_R1.entity.CraftCreature in project Ublisk by Derkades.
the class V1_14_R1 method setTargetToClosestPlayer.
@Override
public void setTargetToClosestPlayer(final Creature creature, final Player player) {
final CraftLivingEntity craftLiving = (CraftLivingEntity) player;
final EntityLiving entityLiving = craftLiving.getHandle();
((CraftCreature) creature).getHandle().setGoalTarget(entityLiving, TargetReason.CLOSEST_PLAYER, false);
}
use of org.bukkit.craftbukkit.v1_14_R1.entity.CraftCreature in project Ublisk by Derkades.
the class V1_14_R1 method setTarget.
@Override
public void setTarget(final Creature creature, final LivingEntity target) {
final CraftCreature craftCreature = (CraftCreature) creature;
final EntityCreature nms = craftCreature.getHandle();
if (target == null) {
nms.setGoalTarget(null, null, false);
} else {
nms.setGoalTarget(((CraftLivingEntity) target).getHandle(), null, false);
}
}
use of org.bukkit.craftbukkit.v1_14_R1.entity.CraftCreature in project UltraCosmetics by iSach.
the class EntityUtil method move.
@Override
public void move(Creature creature, Location loc) {
PathfinderMob ec = ((CraftCreature) creature).getHandle();
ec.maxUpStep = 1;
if (loc == null)
return;
ec.yHeadRot = loc.getYaw();
Path path = ec.getNavigation().createPath(loc.getX(), loc.getY(), loc.getZ(), 1);
ec.getNavigation().moveTo(path, 2);
}
use of org.bukkit.craftbukkit.v1_14_R1.entity.CraftCreature in project UltraCosmetics by iSach.
the class EntityUtil method move.
@Override
public void move(Creature creature, Location loc) {
PathfinderMob ec = ((CraftCreature) creature).getHandle();
ec.maxUpStep = 1;
if (loc == null)
return;
ec.yHeadRot = loc.getYaw();
Path path = ec.getNavigation().createPath(loc.getX(), loc.getY(), loc.getZ(), 1);
ec.getNavigation().moveTo(path, 2);
}
Aggregations