优化开火动画,调整瞄准准心效果
|
@ -84,22 +84,13 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
shuan.setPosZ(2.4f * (float) fp);
|
shuan.setPosZ(2.4f * (float) fp);
|
||||||
|
|
||||||
|
|
|
@ -58,22 +58,13 @@ public class Aa12ItemModel extends GeoModel<Aa12Item> {
|
||||||
shen.setPosZ(1.3f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.3f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.08f * (float) (fp + 2 * fr));
|
shen.setPosY(0.08f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
|
|
|
@ -120,21 +120,11 @@ public class BocekItemModel extends GeoModel<BocekItem> {
|
||||||
fire.setPosZ(3f * (float) (fp + 0.54f * fr));
|
fire.setPosZ(3f * (float) (fp + 0.54f * fr));
|
||||||
fire.setRotX(0.003f * (float) (fp + fr));
|
fire.setRotX(0.003f * (float) (fp + fr));
|
||||||
fire.setRotZ(0f);
|
fire.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
fire.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
fire.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
fire.setPosY(-0.03f * (float) (fp + 2 * fr));
|
fire.setPosY(-0.03f * (float) (fp + 2 * fr));
|
||||||
fire.setPosZ(4f * (float) (fp + 0.54f * fr));
|
fire.setPosZ(4f * (float) (fp + 0.54f * fr));
|
||||||
fire.setRotX(0.07f * (float) (0.18f * fp + fr));
|
fire.setRotX(0.07f * (float) (0.18f * fp + fr));
|
||||||
fire.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
fire.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
fire.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
fire.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -62,44 +62,31 @@ public class DevotionItemModel extends GeoModel<Devotion> {
|
||||||
|
|
||||||
bolt.setPosZ(-2f * (float) bp);
|
bolt.setPosZ(-2f * (float) bp);
|
||||||
|
|
||||||
|
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
||||||
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
if (gun.getPosX() > 1.2) {
|
||||||
|
holo.setHidden(false);
|
||||||
|
number.setHidden(false);
|
||||||
|
} else {
|
||||||
|
holo.setHidden(true);
|
||||||
|
number.setHidden(true);
|
||||||
|
}
|
||||||
|
|
||||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
||||||
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
|
shen.setPosY(0.05f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.4f * (float) (fp + 0.54f * fr));
|
holo.setPosY(-0.03f * (float) (fp + 2.3 * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setPosZ(1.1f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotX(0.001f * (float) (fp + fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.75f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.75f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.02f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.02f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
|
||||||
if (gun.getPosX() > 1.2) {
|
|
||||||
holo.setScaleX(1);
|
|
||||||
holo.setScaleY(1);
|
|
||||||
number.setScaleX(1);
|
|
||||||
number.setScaleY(1);
|
|
||||||
} else {
|
|
||||||
holo.setScaleX(0);
|
|
||||||
holo.setScaleY(0);
|
|
||||||
number.setScaleX(0);
|
|
||||||
number.setScaleY(0);
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
|
|
@ -77,26 +77,17 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
||||||
shen.setPosY(0.02f * (float) (fp + 2 * fr));
|
shen.setPosY(0.05f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
|
holo.setPosY(-0.43f * (float) (fp + 2.3 * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setPosZ(1.1f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotX(0.015f * (float) (fp + fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.03f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.03f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
||||||
|
|
|
@ -52,22 +52,13 @@ public class KraberItemModel extends GeoModel<Kraber> {
|
||||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.1f * (float) (fp + fr));
|
shen.setRotX(0.1f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.025f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.025f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(1.2f * (float) (fp + 2 * fr));
|
shen.setPosY(1.2f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(7.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(7.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.1f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.1f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.045f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.045f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
double p = 0;
|
double p = 0;
|
||||||
p = player.getPersistentData().getDouble("zoom_pos");
|
p = player.getPersistentData().getDouble("zoom_pos");
|
||||||
|
|
|
@ -59,22 +59,13 @@ public class M4ItemModel extends GeoModel<M4Item> {
|
||||||
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.03f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.03f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.045f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.045f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
|
|
|
@ -100,22 +100,13 @@ public class M60ItemModel extends GeoModel<M60Item> {
|
||||||
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.04f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.04f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
tiba.setRotZ((float) (-0.25f * fp + 0.4 * fr));
|
tiba.setRotZ((float) (-0.25f * fp + 0.4 * fr));
|
||||||
|
|
||||||
|
|
|
@ -69,22 +69,13 @@ public class M79ItemModel extends GeoModel<M79Item> {
|
||||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.1f * (float) (fp + fr));
|
shen.setRotX(0.1f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.025f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.025f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.7f * (float) (fp + 2 * fr));
|
shen.setPosY(0.7f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(4.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(4.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.1f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.1f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.045f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.045f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
||||||
|
|
|
@ -70,22 +70,13 @@ public class M870ItemModel extends GeoModel<M870Item> {
|
||||||
shen.setPosZ(2.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(2.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.28f * (float) (fp + fr));
|
shen.setRotX(0.28f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.025f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.025f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.3f * (float) (fp + 2 * fr));
|
shen.setPosY(0.3f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(3.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(3.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.3f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.3f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.045f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.045f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
|
|
|
@ -44,22 +44,13 @@ public class M98bItemModel extends GeoModel<M98bItem> {
|
||||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.18f * (float) (fp + fr));
|
shen.setRotX(0.18f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.025f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.025f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.7f * (float) (fp + 2 * fr));
|
shen.setPosY(0.7f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(4.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(4.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.25f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.25f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.045f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.045f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
double p = 0;
|
double p = 0;
|
||||||
p = player.getPersistentData().getDouble("zoom_pos");
|
p = player.getPersistentData().getDouble("zoom_pos");
|
||||||
|
|
|
@ -58,12 +58,7 @@ public class MinigunItemModel extends GeoModel<Minigun> {
|
||||||
shen.setPosZ(2.2f * (float) (0.5 * fp + 1.54f * fr));
|
shen.setPosZ(2.2f * (float) (0.5 * fp + 1.54f * fr));
|
||||||
shen.setRotX(0.05f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.05f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.02f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.02f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
shen.setRotY(0.055f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.055f * (float) fr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
|
|
|
@ -74,22 +74,13 @@ public class Mk14ItemModel extends GeoModel<Mk14Item> {
|
||||||
shen.setPosZ(2.8f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(2.8f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(3.5f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(3.5f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
if (gun.getPosX() > 5.5f) {
|
if (gun.getPosX() > 5.5f) {
|
||||||
|
|
||||||
|
|
|
@ -55,22 +55,13 @@ public class RpgItemModel extends GeoModel<RpgItem> {
|
||||||
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(1.8f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.8f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
double p = 0;
|
double p = 0;
|
||||||
p = player.getPersistentData().getDouble("zoom_pos");
|
p = player.getPersistentData().getDouble("zoom_pos");
|
||||||
|
|
|
@ -90,22 +90,13 @@ public class RpkItemModel extends GeoModel<RpkItem> {
|
||||||
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.04f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.04f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
shuan.setPosZ(2.4f * (float) fp);
|
shuan.setPosZ(2.4f * (float) fp);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
||||||
|
|
||||||
gun.setPosX(3.08f * (float) p);
|
gun.setPosX(3.08f * (float) p);
|
||||||
|
|
||||||
gun.setPosY(-0.94f * (float) p - (float) (0.2f * zp));
|
gun.setPosY(-1.03f * (float) p - (float) (0.2f * zp));
|
||||||
|
|
||||||
gun.setPosZ(10f * (float) p + (float) (0.5f * zp));
|
gun.setPosZ(10f * (float) p + (float) (0.5f * zp));
|
||||||
|
|
||||||
|
@ -87,22 +87,13 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
||||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.12f * (float) (fp + fr));
|
shen.setRotX(0.12f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.025f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.025f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.7f * (float) (fp + 2 * fr));
|
shen.setPosY(0.7f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(4.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(4.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.15f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.15f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.045f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.045f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
CoreGeoBone charge = getAnimationProcessor().getBone("charge");
|
CoreGeoBone charge = getAnimationProcessor().getBone("charge");
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class SksItemModel extends GeoModel<SksItem> {
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("HoldOpen") == 1) {
|
if (stack.getOrCreateTag().getDouble("HoldOpen") == 1) {
|
||||||
bolt.setPosZ(3f);
|
bolt.setPosZ(2.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
double p = 0;
|
double p = 0;
|
||||||
|
@ -71,28 +71,19 @@ public class SksItemModel extends GeoModel<SksItem> {
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
||||||
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
|
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
|
holo.setPosY(-0.43f * (float) (fp + 2.3 * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotX(0.015f * (float) (fp + fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
shen.setPosY(0.08f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
shuan.setPosZ(2.5f * (float) fp);
|
shuan.setPosZ(2f * (float) fp);
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
|
|
@ -95,22 +95,13 @@ public class SvdItemModel extends GeoModel<SvdItem> {
|
||||||
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setRotX(0.003f * (float) (fp + fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotZ(0f);
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(1.8f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(1.8f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.03f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.03f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
holo.setPosY(1.1f * (float) fp);
|
holo.setPosY(1.1f * (float) fp);
|
||||||
|
|
||||||
|
|
|
@ -50,12 +50,6 @@ public class VectorItemModel extends GeoModel<VectorItem> {
|
||||||
|
|
||||||
scope.setScaleZ(1f - (0.2f * (float) p));
|
scope.setScaleZ(1f - (0.2f * (float) p));
|
||||||
|
|
||||||
float fps = Minecraft.getInstance().getFps();
|
|
||||||
if (fps <= 0) {
|
|
||||||
fps = 1f;
|
|
||||||
}
|
|
||||||
float times = 250f / fps;
|
|
||||||
|
|
||||||
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming && gun.getPosX() > 2) {
|
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming && gun.getPosX() > 2) {
|
||||||
holo.setHidden(false);
|
holo.setHidden(false);
|
||||||
|
@ -67,26 +61,17 @@ public class VectorItemModel extends GeoModel<VectorItem> {
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
|
||||||
shen.setPosY(0.02f * (float) (fp + 2 * fr));
|
shen.setPosY(0.05f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
|
holo.setPosY(-0.43f * (float) (fp + 2.3 * fr));
|
||||||
shen.setRotX(0.003f * (float) (fp + fr));
|
shen.setPosZ(0.9f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotZ(0f);
|
shen.setRotX(0.006f * (float) (fp + fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.015f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.015f * (float) fr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
shen.setPosY(0.08f * (float) (fp + 2 * fr));
|
||||||
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
shen.setPosZ(0.9f * (float) (fp + 0.54f * fr));
|
||||||
shen.setRotX(0.03f * (float) (0.18f * fp + fr));
|
shen.setRotX(0.03f * (float) (0.18f * fp + fr));
|
||||||
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
|
||||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
|
||||||
shen.setRotY(0.045f * (float) fr);
|
|
||||||
} else {
|
|
||||||
shen.setRotY(-0.045f * (float) fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
||||||
|
|
|
@ -267,52 +267,36 @@ public class ClientEventHandler {
|
||||||
amplitude = 15000 * stack.getOrCreateTag().getDouble("recoil_y")
|
amplitude = 15000 * stack.getOrCreateTag().getDouble("recoil_y")
|
||||||
* stack.getOrCreateTag().getDouble("recoil_x");
|
* stack.getOrCreateTag().getDouble("recoil_x");
|
||||||
var data = entity.getPersistentData();
|
var data = entity.getPersistentData();
|
||||||
if (entity.isShiftKeyDown() && entity.getBbHeight() >= 1 && data.getDouble("prone") == 0) {
|
|
||||||
pose = 0.9;
|
|
||||||
} else if (data.getDouble("prone") > 0) {
|
|
||||||
if (stack.getOrCreateTag().getDouble("bipod") == 1) {
|
|
||||||
pose = 0.75;
|
|
||||||
} else {
|
|
||||||
pose = 0.8;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pose = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
var capability = entity.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null);
|
var capability = entity.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null);
|
||||||
if (capability.orElse(new TargetModVariables.PlayerVariables()).firing > 0) {
|
if (capability.orElse(new TargetModVariables.PlayerVariables()).firing > 0) {
|
||||||
data.putDouble("firetime", 0.02);
|
data.putDouble("firetime", 0.001);
|
||||||
data.putDouble("fire_rotx_time", 0.02);
|
data.putDouble("fire_rotx_time", 0.001);
|
||||||
if (data.getDouble("firepos2") < 0.6) {
|
data.putDouble("firepos2", 0.1);
|
||||||
data.putDouble("firepos2", (data.getDouble("firepos2") + 0.06 * times));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (0 < data.getDouble("firepos2")) {
|
|
||||||
data.putDouble("firepos2", (data.getDouble("firepos2") - 0.015 * times));
|
|
||||||
} else {
|
|
||||||
data.putDouble("firepos2", 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data.putDouble("firepos2", Mth.clamp(data.getDouble("firepos2") - 0.01 * times,0,0.6));
|
||||||
|
|
||||||
if (0 < data.getDouble("firetime")) {
|
if (0 < data.getDouble("firetime")) {
|
||||||
data.putDouble("firetime", (data.getDouble("firetime") + 0.18 * (1.1 - data.getDouble("firetime")) * times));
|
data.putDouble("firetime", (data.getDouble("firetime") + 0.25 * (1.1 - data.getDouble("firetime")) * times));
|
||||||
}
|
}
|
||||||
if (0 < data.getDouble("firetime") && data.getDouble("firetime") < 0.454) {
|
if (0 < data.getDouble("firetime") && data.getDouble("firetime") < 0.454) {
|
||||||
data.putDouble("fire_pos",
|
data.putDouble("fire_pos",
|
||||||
(pose * ((-18.34) * Math.pow(data.getDouble("firetime"), 2) + 8.58 * data.getDouble("firetime") + data.getDouble("firepos2"))));
|
((-18.34) * Math.pow(data.getDouble("firetime"), 2) + 8.58 * data.getDouble("firetime") + data.getDouble("firepos2")));
|
||||||
}
|
}
|
||||||
if (0.454 <= data.getDouble("firetime") && data.getDouble("firetime") < 1) {
|
if (0.454 <= data.getDouble("firetime") && data.getDouble("firetime") < 1) {
|
||||||
data.putDouble("fire_pos",
|
data.putDouble("fire_pos",
|
||||||
(pose * (4.34 * Math.pow(data.getDouble("firetime"), 2) - 6.5 * data.getDouble("firetime") + 2.167 + data.getDouble("firepos2"))));
|
(4.34 * Math.pow(data.getDouble("firetime"), 2) - 6.5 * data.getDouble("firetime") + 2.167 + data.getDouble("firepos2")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (0 < data.getDouble("fire_rotx_time") && data.getDouble("fire_rotx_time") < 1.732) {
|
if (0 < data.getDouble("fire_rotx_time") && data.getDouble("fire_rotx_time") < 1.732) {
|
||||||
data.putDouble("fire_rotx_time", (data.getDouble("fire_rotx_time") + 0.18 * (1.9 - data.getDouble("fire_rotx_time")) * times));
|
data.putDouble("fire_rotx_time", (data.getDouble("fire_rotx_time") + 0.18 * (1.9 - data.getDouble("fire_rotx_time")) * times));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 < data.getDouble("fire_rotx_time") && data.getDouble("fire_rotx_time") < 1.732) {
|
if (0 < data.getDouble("fire_rotx_time") && data.getDouble("fire_rotx_time") < 1.732) {
|
||||||
data.putDouble("fire_rot",
|
data.putDouble("fire_rot",
|
||||||
(pose * (1 / 6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * Math.sin(6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * (3 - Math.pow(data.getDouble("fire_rotx_time") , 2))));
|
(1 / 6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * Math.sin(6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * (3 - Math.pow(data.getDouble("fire_rotx_time") , 2)));
|
||||||
if ((capability.orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
if ((capability.orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
|
||||||
event.setYaw((float) (yaw - 1.3 * amplitude * (1 / 6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * Math.sin(6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * (3 - Math.pow(data.getDouble("fire_rotx_time") , 2)) + 1 * Mth.clamp(0.3 - data.getDouble("fire_rotx_time"),0,1) * (2 * Math.random() - 1)));
|
event.setYaw((float) (yaw - 1.3 * amplitude * (1 / 6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * Math.sin(6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * (3 - Math.pow(data.getDouble("fire_rotx_time") , 2)) + 1 * Mth.clamp(0.3 - data.getDouble("fire_rotx_time"),0,1) * (2 * Math.random() - 1)));
|
||||||
event.setPitch((float) (pitch + 1.3 * amplitude * (1 / 6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * Math.sin(6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * (3 - Math.pow(data.getDouble("fire_rotx_time") , 2)) + 1 * Mth.clamp(0.3 - data.getDouble("fire_rotx_time"),0,1) * (2 * Math.random() - 1)));
|
event.setPitch((float) (pitch + 1.3 * amplitude * (1 / 6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * Math.sin(6.3 * (data.getDouble("fire_rotx_time") - 0.5)) * (3 - Math.pow(data.getDouble("fire_rotx_time") , 2)) + 1 * Mth.clamp(0.3 - data.getDouble("fire_rotx_time"),0,1) * (2 * Math.random() - 1)));
|
||||||
|
|
|
@ -309,22 +309,8 @@ public class GunEventHandler {
|
||||||
public static void gunShoot(Player player) {
|
public static void gunShoot(Player player) {
|
||||||
ItemStack heldItem = player.getMainHandItem();
|
ItemStack heldItem = player.getMainHandItem();
|
||||||
player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||||
if (Math.random() < 0.2) {
|
|
||||||
capability.recoilHorizon = -1;
|
|
||||||
}
|
|
||||||
if (Math.random() >= 0.2 && Math.random() < 0.4) {
|
|
||||||
capability.recoilHorizon = -0.5;
|
|
||||||
}
|
|
||||||
if (Math.random() >= 0.4 && Math.random() < 0.6) {
|
|
||||||
capability.recoilHorizon = 0;
|
|
||||||
}
|
|
||||||
if (Math.random() >= 0.6 && Math.random() < 0.8) {
|
|
||||||
capability.recoilHorizon = 0.5;
|
|
||||||
}
|
|
||||||
if (Math.random() > 0.8) {
|
|
||||||
capability.recoilHorizon = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
capability.recoilHorizon = 2 * Math.random() - 1;
|
||||||
capability.recoil = 0.1;
|
capability.recoil = 0.1;
|
||||||
capability.firing = 1;
|
capability.firing = 1;
|
||||||
capability.syncPlayerVariables(player);
|
capability.syncPlayerVariables(player);
|
||||||
|
|
|
@ -115,7 +115,6 @@ public class FireMessage {
|
||||||
}
|
}
|
||||||
|
|
||||||
player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||||
capability.recoilHorizon = Math.random() < 0.5 ? -1 : 1;
|
|
||||||
capability.recoil = 0.1;
|
capability.recoil = 0.1;
|
||||||
capability.firing = 1;
|
capability.firing = 1;
|
||||||
capability.syncPlayerVariables(player);
|
capability.syncPlayerVariables(player);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"identifier": "geometry.hk416",
|
"identifier": "geometry.hk416",
|
||||||
"texture_width": 128,
|
"texture_width": 128,
|
||||||
"texture_height": 128,
|
"texture_height": 128,
|
||||||
"visible_bounds_width": 11,
|
"visible_bounds_width": 18,
|
||||||
"visible_bounds_height": 6,
|
"visible_bounds_height": 6,
|
||||||
"visible_bounds_offset": [0, 0, 0]
|
"visible_bounds_offset": [0, 0, 0]
|
||||||
},
|
},
|
||||||
|
@ -9510,7 +9510,7 @@
|
||||||
"uv": {
|
"uv": {
|
||||||
"north": {"uv": [85.59375, 35.3125], "uv_size": [4, 4]},
|
"north": {"uv": [85.59375, 35.3125], "uv_size": [4, 4]},
|
||||||
"east": {"uv": [101.15625, 18.53125], "uv_size": [5.9375, 4]},
|
"east": {"uv": [101.15625, 18.53125], "uv_size": [5.9375, 4]},
|
||||||
"south": {"uv": [45.26233, 89.86003], "uv_size": [8, 8]},
|
"south": {"uv": [55.20764, 90.39909], "uv_size": [36, 36]},
|
||||||
"west": {"uv": [92.0625, 17.21875], "uv_size": [7.53125, 4]},
|
"west": {"uv": [92.0625, 17.21875], "uv_size": [7.53125, 4]},
|
||||||
"up": {"uv": [112.0625, 26.0625], "uv_size": [-4, -7.875]},
|
"up": {"uv": [112.0625, 26.0625], "uv_size": [-4, -7.875]},
|
||||||
"down": {"uv": [116.1875, 31.125], "uv_size": [-4, -4.625]}
|
"down": {"uv": [116.1875, 31.125], "uv_size": [-4, -4.625]}
|
||||||
|
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |