还是优化动画

This commit is contained in:
Atsuihsio 2024-09-20 04:17:37 +08:00
parent 9411c752e5
commit 4316f1d866
30 changed files with 576 additions and 962 deletions

View file

@ -79,42 +79,30 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
shuan.setPosZ(2.4f * (float) fp);
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2 * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.7f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.7f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -63,43 +63,30 @@ public class AbekiriItemModel extends GeoModel<AbekiriItem> {
shen.setRotY(-0.15f * (float) fr);
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -109,38 +109,30 @@ public class BocekItemModel extends GeoModel<BocekItem> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double yaw = player.getPersistentData().getDouble("yaw");
double pit = player.getPersistentData().getDouble("gun_pitch");
double vy = player.getPersistentData().getDouble("vy");
move.setPosY(-1 * (float) vy);
move.setPosX(9.3f * (float) m);
move.setRotX(0.5f * (float) pit);
move.setRotZ(0.7f * (float) yaw + 2.7f * (float) m);
move.setRotY(0.9f * (float) yaw - 1.7f * (float) m);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");

View file

@ -614,43 +614,30 @@ public class DevotionItemModel extends GeoModel<DevotionItem> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2 * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(1.8f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(1.6f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
if (player.getPersistentData().getDouble("prone") > 0) {
l.setRotX(1.5f);

View file

@ -88,43 +88,30 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.7f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.7f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -96,43 +96,30 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.7f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.7f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -72,43 +72,30 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.75f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.75f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -75,43 +75,30 @@ public class HuntingRifleItemModel extends GeoModel<HuntingRifleItem> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -64,43 +64,30 @@ public class JavelinItemModel extends GeoModel<JavelinItem> {
shen.setPosX((float)(0.75f * fr * (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.75f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.75f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");

View file

@ -81,43 +81,30 @@ public class K98ItemModel extends GeoModel<K98Item> {
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.75f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.75f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -86,43 +86,30 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.7f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.7f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -72,43 +72,30 @@ public class M4ItemModel extends GeoModel<M4Item> {
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.65f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.65f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -115,43 +115,30 @@ public class M60ItemModel extends GeoModel<M60Item> {
tiba.setRotZ((float) (-0.25f * fp + 0.4 * fr));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -70,43 +70,30 @@ public class M79ItemModel extends GeoModel<M79Item> {
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -73,43 +73,30 @@ public class M870ItemModel extends GeoModel<M870Item> {
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("main");

View file

@ -71,47 +71,33 @@ public class M98bItemModel extends GeoModel<M98bItem> {
CoreGeoBone root = getAnimationProcessor().getBone("root");
CoreGeoBone zhunxing = getAnimationProcessor().getBone("shi");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
zhunxing.setPosX(75 * movePosX);
zhunxing.setPosY(75 * movePosY);
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(movePosX);
root.setRotZ(movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
zhunxing.setPosX(75 * PosX);
zhunxing.setPosY(75 * PosY);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -70,43 +70,30 @@ public class MarlinItemModel extends GeoModel<MarlinItem> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -64,43 +64,30 @@ public class MinigunItemModel extends GeoModel<MinigunItem> {
shen.setPosX(0.5f * (float) fr * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");

View file

@ -103,43 +103,30 @@ public class Mk14ItemModel extends GeoModel<Mk14Item> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.9f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.9f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -93,43 +93,30 @@ public class MosinNagantItemModel extends GeoModel<MosinNagantItem> {
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.75f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.75f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -85,43 +85,30 @@ public class Ntw20Model extends GeoModel<Ntw20Item> {
stack.getOrCreateTag().putBoolean("HoloHidden", !(gun.getPosX() > 4.3));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.8f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.6f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -77,43 +77,30 @@ public class Qbz95ItemModel extends GeoModel<Qbz95Item> {
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.75f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.75f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -73,43 +73,30 @@ public class RpgItemModel extends GeoModel<RpgItem> {
gun.setScaleZ(1f - (0.5f * (float) zp));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -89,43 +89,30 @@ public class RpkItemModel extends GeoModel<RpkItem> {
shuan.setPosZ(2.4f * (float) fp);
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.6f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.6f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -92,43 +92,30 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
charge.setRotZ(charge.getRotZ() + times * 0.05f);
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(1.4f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(1.4f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
if ((stack.getOrCreateTag().getDouble("ammo") <= 5)) {
ammo.setScaleX((float) (stack.getOrCreateTag().getDouble("ammo") / 5));

View file

@ -84,43 +84,30 @@ public class SksItemModel extends GeoModel<SksItem> {
shuan.setPosZ(2f * (float) fp);
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -91,54 +91,39 @@ public class SvdItemModel extends GeoModel<SvdItem> {
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
}
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
holo.setPosY(0.05f + 1.1f * (float) fp);
holo.setRotZ(-0.04f * (float) fp);
holo.setScaleX(0.75f);
holo.setScaleY(0.75f);
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
glass.setPosX(0.25f * -PosX);
glass.setPosY(0.2f * (float) fp + 0.5f * (float) vy + (float) swayY + PosY);
glass.setPosX(0.25f * -movePosX);
glass.setPosY(0.2f * (float) fp + 0.5f * (float) vY + (float) swayY + movePosY);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -96,42 +96,30 @@ public class TaserItemModel extends GeoModel<TaserItem> {
gun.setRotZ((float) (0.05f * zpz));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2 * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -64,43 +64,30 @@ public class TracheliumItemModel extends GeoModel<Trachelium> {
shen.setRotZ(-0.1f * (float) (fp + 1.3 * fr));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");

View file

@ -88,43 +88,30 @@ public class VectorItemModel extends GeoModel<VectorItem> {
shen.setPosX(0.5f * (float) fr * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
CoreGeoBone move = getAnimationProcessor().getBone("move");
double swayX = ClientEventHandler.getSwayX();
double swayY = ClientEventHandler.getSwayY();
root.setPosX(PosX);
root.setPosY((float) swayY + PosY);
float moveRotZ = (float) ClientEventHandler.getMoveRotZ();
float movePosX = (float) ClientEventHandler.getMovePosX();
float movePosY = (float) ClientEventHandler.getMovePosY();
double mph = ClientEventHandler.getMovePosHorizon();
double vY = ClientEventHandler.getVelocityY();
double turnRotX = ClientEventHandler.getTurnRotX();
double turnRotY = ClientEventHandler.getTurnRotY();
double turnRotZ = ClientEventHandler.getTurnRotZ();
root.setPosX(movePosX);
root.setPosY((float) swayY + movePosY);
root.setRotX((float) swayX);
root.setRotY(0.2f * movePosX);
root.setRotZ(0.2f * movePosX + moveRotZ);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.7f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.7f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
move.setPosX(9.3f * (float) mph);
move.setPosY(-2f * (float) vY);
move.setRotX(Mth.DEG_TO_RAD * (float) turnRotX - 0.15f * (float) vY);
move.setRotY(Mth.DEG_TO_RAD * (float) turnRotY);
move.setRotZ(2.7f * (float) mph + Mth.DEG_TO_RAD * (float) turnRotZ);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
CoreGeoBone main = getAnimationProcessor().getBone("0");