diff --git a/bin/siegeCore/CrunchSiegeCore.class b/bin/siegeCore/CrunchSiegeCore.class index 7943539..0fb9c39 100644 Binary files a/bin/siegeCore/CrunchSiegeCore.class and b/bin/siegeCore/CrunchSiegeCore.class differ diff --git a/bin/siegeCore/RotationHandler.class b/bin/siegeCore/RotationHandler.class index fc246d0..6b6d734 100644 Binary files a/bin/siegeCore/RotationHandler.class and b/bin/siegeCore/RotationHandler.class differ diff --git a/bin/siegeCore/SiegeEquipment.class b/bin/siegeCore/SiegeEquipment.class index cdc90ab..3da4701 100644 Binary files a/bin/siegeCore/SiegeEquipment.class and b/bin/siegeCore/SiegeEquipment.class differ diff --git a/src/siegeCore/CrunchSiegeCore.java b/src/siegeCore/CrunchSiegeCore.java index 7d89977..cd5bea5 100644 --- a/src/siegeCore/CrunchSiegeCore.java +++ b/src/siegeCore/CrunchSiegeCore.java @@ -129,7 +129,7 @@ public class CrunchSiegeCore extends JavaPlugin { stand.addEquipmentLock(EquipmentSlot.FEET, LockType.ADDING_OR_CHANGING); ent.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 2000000, 1)); // stand.setSmall(true); - stand.setVisible(false); + // stand.setVisible(true); //stand.setSmall(true); ent.getEquipment().setHelmet(item); if (TrackedStands.containsKey(player.getUniqueId())) { diff --git a/src/siegeCore/RotationHandler.java b/src/siegeCore/RotationHandler.java index dc1b317..c17a2c8 100644 --- a/src/siegeCore/RotationHandler.java +++ b/src/siegeCore/RotationHandler.java @@ -28,23 +28,33 @@ public class RotationHandler implements Listener { } for (Entity ent : CrunchSiegeCore.TrackedStands.get(player.getUniqueId())) { if (ent != null) { - + SiegeEquipment equipment = CrunchSiegeCore.equipment.get(ent.getUniqueId()); + double distance = player.getLocation().distance(ent.getLocation()); if (distance <= 250) { // player.sendMessage("got id"); LivingEntity living = (LivingEntity) ent; Location loc = ent.getLocation(); - + + if (equipment.RotateSideways) { + + Location direction = player.getLocation().add(player.getLocation().getDirection().multiply(50)); Vector dirBetweenLocations = direction.toVector().subtract(loc.toVector()); loc.setDirection(dirBetweenLocations); + } // loc.setYaw(player.getLocation().getYaw()); //loc.setPitch(player.getLocation().getPitch()); + + ArmorStand stand = (ArmorStand) living; - stand.setHeadPose(new EulerAngle(player.getLocation().getDirection().getY()*(-1),0,0)); + if (equipment.RotateUpDown) { + stand.setHeadPose(new EulerAngle(player.getLocation().getDirection().getY()*(-1),0,0)); + } + living.teleport(loc); } diff --git a/src/siegeCore/SiegeEquipment.java b/src/siegeCore/SiegeEquipment.java index bcb3d43..4f5fafa 100644 --- a/src/siegeCore/SiegeEquipment.java +++ b/src/siegeCore/SiegeEquipment.java @@ -36,8 +36,8 @@ public class SiegeEquipment { public Location location; public int ModelNumberToFireAt; public Boolean CycleThroughModelsBeforeFiring = false; - public Boolean RotateSideways = false; - public Boolean RoateUpDown = true; + public Boolean RotateSideways = true; + public Boolean RotateUpDown = true; public Boolean HasFired = false; public Boolean HasReloaded = false;