Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Nov 13, 2020
1 parent 0c36ea0 commit d300296
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Expand Up @@ -164,6 +164,7 @@ public boolean update() {
motY += (Math.signum(d1) - motY) * 0.1;
motZ += (Math.signum(d2) * 0.5D - motZ) * 0.1;
velocity.setX(motX).setY(motY).setZ(motZ).multiply(parameters.speed());
npc.getEntity().setVelocity(velocity);

float targetYaw = (float) (Math.atan2(motZ, motX) * 180.0D / Math.PI) - 90.0F;
float normalisedTargetYaw = (targetYaw - current.getYaw()) % 360;
Expand All @@ -173,8 +174,6 @@ public boolean update() {
if (normalisedTargetYaw < -180.0F) {
normalisedTargetYaw += 360.0F;
}
velocity.setX(motX).setY(motY).setZ(motZ).multiply(parameters.speed());
npc.getEntity().setVelocity(velocity);

if (npc.getEntity().getType() != EntityType.ENDER_DRAGON) {
NMS.setVerticalMovement(npc.getEntity(), 0.5);
Expand Down
2 changes: 0 additions & 2 deletions main/src/main/java/net/citizensnpcs/trait/HologramTrait.java
Expand Up @@ -193,8 +193,6 @@ private void unload() {
nameNPC.destroy();
nameNPC = null;
}
if (hologramNPCs.isEmpty())
return;
for (NPC npc : hologramNPCs) {
npc.destroy();
}
Expand Down

0 comments on commit d300296

Please sign in to comment.