添加更多的瞄准时换弹
This commit is contained in:
parent
600d708418
commit
af6ff70613
40 changed files with 841 additions and 72 deletions
|
@ -117,6 +117,22 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.94 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.8 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
@ -124,17 +140,5 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
|||
|
||||
player.getPersistentData().putDouble("camera_rot_z", Mth.RAD_TO_DEG * camera.getRotZ());
|
||||
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float num = (float) (1 - 0.9 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(num * main.getRotX());
|
||||
main.setRotY(num * main.getRotY());
|
||||
main.setRotZ(num * main.getRotZ());
|
||||
main.setPosX(num * main.getPosX());
|
||||
main.setPosY(num * main.getPosY());
|
||||
main.setPosZ(num * main.getPosZ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,6 +99,22 @@ public class Aa12ItemModel extends GeoModel<Aa12Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.82 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.68 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
player.getPersistentData().putDouble("camera_rot_y", Mth.RAD_TO_DEG * camera.getRotY());
|
||||
|
|
|
@ -108,6 +108,22 @@ public class AbekiriItemModel extends GeoModel<Abekiri> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.42 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.48 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -662,6 +662,22 @@ public class DevotionItemModel extends GeoModel<Devotion> {
|
|||
}
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.82 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.78 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -127,6 +127,29 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
CoreGeoBone body = getAnimationProcessor().getBone("gun");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.12 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.68 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
body.setRotX(numR * body.getRotX());
|
||||
body.setRotY(numR * body.getRotY());
|
||||
body.setRotZ(numR * body.getRotZ());
|
||||
body.setPosX(numP * body.getPosX());
|
||||
body.setPosY(numP * body.getPosY());
|
||||
body.setPosZ(numP * body.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -135,6 +135,29 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
CoreGeoBone body = getAnimationProcessor().getBone("gun");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.12 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.68 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
body.setRotX(numR * body.getRotX());
|
||||
body.setRotY(numR * body.getRotY());
|
||||
body.setRotZ(numR * body.getRotZ());
|
||||
body.setPosX(numP * body.getPosX());
|
||||
body.setPosY(numP * body.getPosY());
|
||||
body.setPosZ(numP * body.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -109,6 +109,22 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.78 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -120,6 +120,22 @@ public class HuntingRifleItemModel extends GeoModel<HuntingRifle> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.82 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.78 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -118,6 +118,29 @@ public class K98ItemModel extends GeoModel<K98Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
CoreGeoBone body = getAnimationProcessor().getBone("roll");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.52 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.58 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0 || stack.getOrCreateTag().getBoolean("reloading")) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
body.setRotX(numR * body.getRotX());
|
||||
body.setRotY(numR * body.getRotY());
|
||||
body.setRotZ(numR * body.getRotZ());
|
||||
body.setPosX(numP * body.getPosX());
|
||||
body.setPosY(numP * body.getPosY());
|
||||
body.setPosZ(numP * body.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -125,6 +125,29 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
CoreGeoBone body = getAnimationProcessor().getBone("gun");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.12 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.68 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
body.setRotX(numR * body.getRotX());
|
||||
body.setRotY(numR * body.getRotY());
|
||||
body.setRotZ(numR * body.getRotZ());
|
||||
body.setPosX(numP * body.getPosX());
|
||||
body.setPosY(numP * body.getPosY());
|
||||
body.setPosZ(numP * body.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -111,6 +111,22 @@ public class M4ItemModel extends GeoModel<M4Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.8 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.65 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -154,6 +154,22 @@ public class M60ItemModel extends GeoModel<M60Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.28 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -109,6 +109,22 @@ public class M79ItemModel extends GeoModel<M79Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.58 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.58 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -112,6 +112,22 @@ public class M870ItemModel extends GeoModel<M870Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("main");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.72 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.82 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("reloading")) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -128,6 +128,31 @@ public class M98bItemModel extends GeoModel<M98bItem> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
CoreGeoBone scope = getAnimationProcessor().getBone("scope2");
|
||||
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.68 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
|
||||
scope.setRotX(numR * scope.getRotX());
|
||||
scope.setRotY(numR * scope.getRotY());
|
||||
scope.setRotZ(numR * scope.getRotZ());
|
||||
scope.setPosX(numP * scope.getPosX());
|
||||
scope.setPosY(numP * scope.getPosY());
|
||||
scope.setPosZ(numP * scope.getPosZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -46,11 +46,11 @@ public class MarlinItemModel extends GeoModel<MarlinItem> {
|
|||
|
||||
gun.setPosY(1.06f * (float) p - (float) (0.7f * zp));
|
||||
|
||||
gun.setPosZ(1.5f * (float) p + (float) (0.9f * zp));
|
||||
gun.setPosZ(4f * (float) p + (float) (0.9f * zp));
|
||||
|
||||
gun.setRotZ((float) (0.02f * zp));
|
||||
|
||||
gun.setScaleZ(1f - (0.2f * (float) p));
|
||||
gun.setScaleZ(1f - (0.5f * (float) p));
|
||||
|
||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
@ -110,6 +110,22 @@ public class MarlinItemModel extends GeoModel<MarlinItem> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.55 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("reloading")) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -142,6 +142,22 @@ public class Mk14ItemModel extends GeoModel<Mk14Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.95 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.94 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -124,6 +124,22 @@ public class Ntw20Model extends GeoModel<Ntw20> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.92 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -114,6 +114,22 @@ public class Qbz95ItemModel extends GeoModel<Qbz95Item> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.92 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -64,12 +64,10 @@ public class RpgItemModel extends GeoModel<RpgItem> {
|
|||
double zp = player.getPersistentData().getDouble("zoom_pos_z");
|
||||
|
||||
gun.setPosX(0.91f * (float) p);
|
||||
|
||||
gun.setPosY(-0.04f * (float) p - (float) (0.2f * zp));
|
||||
|
||||
gun.setPosZ(2f * (float) p + (float) (0.15f * zp));
|
||||
|
||||
gun.setRotZ(0.45f * (float) p + (float) (0.02f * zp));
|
||||
gun.setScaleZ(1f - (0.5f * (float) p));
|
||||
|
||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||
|
||||
|
@ -114,6 +112,22 @@ public class RpgItemModel extends GeoModel<RpgItem> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.82 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.78 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -127,6 +127,22 @@ public class RpkItemModel extends GeoModel<RpkItem> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.94 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.8 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -136,6 +136,22 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
|||
}
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.9 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.98 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -123,6 +123,22 @@ public class SksItemModel extends GeoModel<SksItem> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.92 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -140,6 +140,22 @@ public class SvdItemModel extends GeoModel<SvdItem> {
|
|||
glass.setPosY(0.2f * (float) fp + 0.5f * (float) vy + (float) y + PosY);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.94 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -127,6 +127,22 @@ public class TaserItemModel extends GeoModel<Taser> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.72 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.68 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -120,6 +120,22 @@ public class TracheliumItemModel extends GeoModel<Trachelium> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.22 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.48 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -127,6 +127,22 @@ public class VectorItemModel extends GeoModel<VectorItem> {
|
|||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
var data = player.getPersistentData();
|
||||
float numR = (float) (1 - 0.92 * data.getDouble("zoom_time"));
|
||||
float numP = (float) (1 - 0.88 * data.getDouble("zoom_time"));
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
main.setRotX(numR * main.getRotX());
|
||||
main.setRotY(numR * main.getRotY());
|
||||
main.setRotZ(numR * main.getRotZ());
|
||||
main.setPosX(numP * main.getPosX());
|
||||
main.setPosY(numP * main.getPosY());
|
||||
main.setPosZ(numP * main.getPosZ());
|
||||
camera.setRotX(numR * camera.getRotX());
|
||||
camera.setRotY(numR * camera.getRotY());
|
||||
camera.setRotZ(numR * camera.getRotZ());
|
||||
}
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ public class ClientEventHandler {
|
|||
handleWeaponSway(living);
|
||||
handleWeaponMove(living);
|
||||
handleWeaponZoom(living);
|
||||
handlePlayerBreath(living);
|
||||
handleWeaponFire(event, living);
|
||||
handleShockCamera(event, living);
|
||||
handlePlayerCameraShake(event, living);
|
||||
|
@ -309,18 +310,9 @@ public class ClientEventHandler {
|
|||
var data = entity.getPersistentData();
|
||||
|
||||
if ((entity.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (data.getDouble("zoom_time") < 1) {
|
||||
data.putDouble("zoom_time",
|
||||
(data.getDouble("zoom_time") + entity.getMainHandItem().getOrCreateTag().getDouble("zoom_speed") * 0.03 * times));
|
||||
} else {
|
||||
data.putDouble("zoom_time", 1);
|
||||
}
|
||||
data.putDouble("zoom_time", Mth.clamp(data.getDouble("zoom_time") + 0.03 * times,0,1));
|
||||
} else {
|
||||
if (data.getDouble("zoom_time") > 0) {
|
||||
data.putDouble("zoom_time", (data.getDouble("zoom_time") - 0.04 * times));
|
||||
} else {
|
||||
data.putDouble("zoom_time", 0);
|
||||
}
|
||||
data.putDouble("zoom_time", Mth.clamp(data.getDouble("zoom_time") - 0.04 * times,0,1));
|
||||
}
|
||||
data.putDouble("zoom_pos", (0.5 * Math.cos(Math.PI * Math.pow(Math.pow(data.getDouble("zoom_time"), 2) - 1, 2)) + 0.5));
|
||||
data.putDouble("zoom_pos_z", (-Math.pow(2 * data.getDouble("zoom_time") - 1, 2) + 1));
|
||||
|
@ -398,6 +390,21 @@ public class ClientEventHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private static void handlePlayerBreath(LivingEntity entity) {
|
||||
float fps = Minecraft.getInstance().getFps();
|
||||
if (fps <= 0) {
|
||||
fps = 1f;
|
||||
}
|
||||
float times = 110f / fps;
|
||||
var data = entity.getPersistentData();
|
||||
|
||||
if ((entity.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).breath) {
|
||||
data.putDouble("BreathTime", Mth.clamp(data.getDouble("BreathTime") + 0.06 * times,0,1));
|
||||
} else {
|
||||
data.putDouble("BreathTime", Mth.clamp(data.getDouble("BreathTime") - 0.06 * times,0,1));
|
||||
}
|
||||
}
|
||||
|
||||
private static void handleShockCamera(ViewportEvent.ComputeCameraAngles event, LivingEntity entity) {
|
||||
if (entity.hasEffect(ModMobEffects.SHOCK.get()) && Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) {
|
||||
event.setYaw(Minecraft.getInstance().gameRenderer.getMainCamera().getYRot() + (float) Mth.nextDouble(RandomSource.create(), -3, 3));
|
||||
|
@ -465,7 +472,7 @@ public class ClientEventHandler {
|
|||
double p = player.getPersistentData().getDouble("zoom_pos");
|
||||
double zoom = stack.getOrCreateTag().getDouble("zoom") + stack.getOrCreateTag().getDouble("custom_zoom");
|
||||
|
||||
event.setFOV(event.getFOV() / (1.0 + p * (zoom - 1)));
|
||||
event.setFOV(event.getFOV() / (1.0 + p * (zoom - 1)) * (1 - 0.4 * player.getPersistentData().getDouble("BreathTime")));
|
||||
player.getPersistentData().putDouble("fov", event.getFOV());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -129,9 +129,6 @@ public class PlayerEventHandler {
|
|||
}
|
||||
|
||||
private static void handleBreath(Player player) {
|
||||
if (player.getPersistentData().getInt("NoBreath") > 0) {
|
||||
player.getPersistentData().putInt("NoBreath", player.getPersistentData().getInt("NoBreath") - 1);
|
||||
}
|
||||
|
||||
if (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).breath) {
|
||||
player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||
|
@ -153,9 +150,6 @@ public class PlayerEventHandler {
|
|||
capability.breath = false;
|
||||
capability.syncPlayerVariables(player);
|
||||
});
|
||||
if (player instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.BREATH_EXHAUSTION.get(), 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).breathTime == 100) {
|
||||
|
@ -346,12 +340,7 @@ public class PlayerEventHandler {
|
|||
private static void handlePrepareZoom(Player player) {
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
|
||||
if (stack.is(ModTags.Items.GUN)
|
||||
// && !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading"))
|
||||
&& !player.isSpectator()
|
||||
// && !stack.getOrCreateTag().getBoolean("charging")
|
||||
// && !stack.getOrCreateTag().getBoolean("reloading")
|
||||
) {
|
||||
if (stack.is(ModTags.Items.GUN) && !player.isSpectator()) {
|
||||
if (player.getMainHandItem().getItem() != ModItems.MINIGUN.get()) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
player.setSprinting(false);
|
||||
|
|
|
@ -165,7 +165,7 @@ public class ModItems {
|
|||
public static final RegistryObject<Item> SENTINEL_BLUEPRINT = ITEMS.register("sentinel_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY));
|
||||
public static final RegistryObject<Item> M_60_BLUEPRINT = ITEMS.register("m_60_blueprint", () -> new BlueprintItem(Rarity.EPIC));
|
||||
public static final RegistryObject<Item> SVD_BLUEPRINT = ITEMS.register("svd_blueprint", () -> new BlueprintItem(Rarity.EPIC));
|
||||
public static final RegistryObject<Item> MARLIN_BLUEPRINT = ITEMS.register("marlin_blueprint", () -> new BlueprintItem(Rarity.RARE));
|
||||
public static final RegistryObject<Item> MARLIN_BLUEPRINT = ITEMS.register("marlin_blueprint", () -> new BlueprintItem(Rarity.COMMON));
|
||||
public static final RegistryObject<Item> M_870_BLUEPRINT = ITEMS.register("m_870_blueprint", () -> new BlueprintItem(Rarity.RARE));
|
||||
public static final RegistryObject<Item> M_98B_BLUEPRINT = ITEMS.register("m_98b_blueprint", () -> new BlueprintItem(Rarity.EPIC));
|
||||
public static final RegistryObject<Item> AK_47_BLUEPRINT = ITEMS.register("ak_47_blueprint", () -> new BlueprintItem(Rarity.RARE));
|
||||
|
|
|
@ -264,6 +264,4 @@ public class ModSounds {
|
|||
public static final RegistryObject<SoundEvent> DRONE_SOUND = REGISTRY.register("drone_sound", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "drone_sound")));
|
||||
public static final RegistryObject<SoundEvent> GRENADE_PULL = REGISTRY.register("grenade_pull", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "grenade_pull")));
|
||||
public static final RegistryObject<SoundEvent> GRENADE_THROW = REGISTRY.register("grenade_throw", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "grenade_throw")));
|
||||
public static final RegistryObject<SoundEvent> BREATH_IN = REGISTRY.register("breath_in", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "breath_in")));
|
||||
public static final RegistryObject<SoundEvent> BREATH_EXHAUSTION = REGISTRY.register("breath_exhaustion", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "breath_exhaustion")));
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
public static ItemDisplayContext transformType;
|
||||
|
||||
public MarlinItem() {
|
||||
super(new Item.Properties().stacksTo(1).rarity(Rarity.RARE));
|
||||
super(new Item.Properties().stacksTo(1).rarity(Rarity.COMMON));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package net.mcreator.superbwarfare.network.message;
|
||||
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.SoundTool;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
|
@ -50,10 +47,6 @@ public class BreathMessage {
|
|||
capability.breath = true;
|
||||
capability.syncPlayerVariables(entity);
|
||||
});
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.BREATH_IN.get(), 1, 1);
|
||||
}
|
||||
entity.getPersistentData().putInt("NoBreath", 20);
|
||||
}
|
||||
|
||||
if (!type) {
|
||||
|
|
|
@ -1009,6 +1009,204 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"scope2": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.05": {
|
||||
"vector": [2.2309, 1.32745, 5.98455]
|
||||
},
|
||||
"0.425": {
|
||||
"vector": [-24.01, 2.98, -9.37],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"0.475": {
|
||||
"vector": [-22.25012, 1.71575, -15.23679]
|
||||
},
|
||||
"0.525": {
|
||||
"vector": [-23.67625, 0.53753, -20.43357]
|
||||
},
|
||||
"0.625": {
|
||||
"vector": [-27.27359, 1.63911, -16.2464]
|
||||
},
|
||||
"0.725": {
|
||||
"vector": [-25.02119, 0.16741, -19.71243]
|
||||
},
|
||||
"0.825": {
|
||||
"vector": [-22.36586, -0.75486, -21.85957]
|
||||
},
|
||||
"0.9": {
|
||||
"vector": [-13.42984, -0.39385, -15.87027]
|
||||
},
|
||||
"1.075": {
|
||||
"vector": [-22.35117, -0.9689, -22.83651]
|
||||
},
|
||||
"1.225": {
|
||||
"vector": [-26.3817, -0.19101, -19.94063]
|
||||
},
|
||||
"1.4": {
|
||||
"vector": [-21.33329, -1.14849, -23.82073]
|
||||
},
|
||||
"1.55": {
|
||||
"vector": [-18.24, -1.53, -25.8]
|
||||
},
|
||||
"1.85": {
|
||||
"vector": [-10.66408, -4.02619, -38.55877],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"1.925": {
|
||||
"vector": [-13.44223, -4.57576, -41.51634]
|
||||
},
|
||||
"2.025": {
|
||||
"vector": [-10.27854, -4.93547, -43.49053]
|
||||
},
|
||||
"2.1": {
|
||||
"vector": [-19.33014, -4.0613, -42.67664]
|
||||
},
|
||||
"2.25": {
|
||||
"vector": [-17.01373, -1.99374, -36.83067]
|
||||
},
|
||||
"2.4": {
|
||||
"vector": [-12.09992, 3.01404, -13.77342]
|
||||
},
|
||||
"2.675": {
|
||||
"vector": [-7.40059, 2.13505, 2.35223]
|
||||
},
|
||||
"2.85": {
|
||||
"vector": [-6.51035, 1.75117, 0.30854]
|
||||
},
|
||||
"3.0": {
|
||||
"vector": [-5.22334, 2.78078, 12.97442]
|
||||
},
|
||||
"3.175": {
|
||||
"vector": [-9.62459, 3.44337, 11.29843]
|
||||
},
|
||||
"3.25": {
|
||||
"vector": [-3.52825, 1.15456, -0.01567]
|
||||
},
|
||||
"3.35": {
|
||||
"vector": [-2.59087, 0.51593, -2.26254]
|
||||
},
|
||||
"3.475": {
|
||||
"vector": [-2.96513, 0.06632, -7.37447],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"3.6": {
|
||||
"vector": [0, 0, 4.5],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"3.775": {
|
||||
"vector": [1, 0, -0.25]
|
||||
},
|
||||
"4.0": {
|
||||
"vector": [-0.5, 0, -0.1]
|
||||
},
|
||||
"4.075": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"0.0": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.075": {
|
||||
"vector": [-0.04, 0.41, 0.04]
|
||||
},
|
||||
"0.375": {
|
||||
"vector": [-1.1, 0.3, 0.9],
|
||||
"easing": "easeInQuad"
|
||||
},
|
||||
"0.475": {
|
||||
"vector": [-1.1, 0, 0.2],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"0.525": {
|
||||
"vector": [-1.13656, 0.11648, 0.43653]
|
||||
},
|
||||
"0.65": {
|
||||
"vector": [-1.11162, 0.03023, 0.28738]
|
||||
},
|
||||
"0.825": {
|
||||
"vector": [-0.96981, -0.32115, 0.20478]
|
||||
},
|
||||
"0.9": {
|
||||
"vector": [-0.75494, -0.64671, -0.12279]
|
||||
},
|
||||
"0.975": {
|
||||
"vector": [-1.1, 0, 0.3]
|
||||
},
|
||||
"1.15": {
|
||||
"vector": [-0.95347, -0.36221, 0.21435]
|
||||
},
|
||||
"1.325": {
|
||||
"vector": [-0.84854, -0.60732, 0.04107]
|
||||
},
|
||||
"1.475": {
|
||||
"vector": [-0.88449, -0.56099, 0.25543]
|
||||
},
|
||||
"1.65": {
|
||||
"vector": [-0.79, -0.44, 0.2]
|
||||
},
|
||||
"1.85": {
|
||||
"vector": [-0.89507, -0.06932, 0.3549]
|
||||
},
|
||||
"1.925": {
|
||||
"vector": [-1.16342, 0.21638, 0.44269]
|
||||
},
|
||||
"2.025": {
|
||||
"vector": [-1.03823, 0.0689, 0.38061]
|
||||
},
|
||||
"2.1": {
|
||||
"vector": [-1.27235, 0.41208, 0.43655],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"2.225": {
|
||||
"vector": [-0.8044, 0.0239, 0.36148],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"2.3": {
|
||||
"vector": [-0.55391, 0.01857, 0.28596],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"2.475": {
|
||||
"vector": [-0.27874, -0.05921, 0.2782]
|
||||
},
|
||||
"2.625": {
|
||||
"vector": [-0.38027, -0.15396, -0.28202]
|
||||
},
|
||||
"2.8": {
|
||||
"vector": [-0.21, -0.24, -0.04]
|
||||
},
|
||||
"3.0": {
|
||||
"vector": [-0.19, 0.19, -0.04]
|
||||
},
|
||||
"3.2": {
|
||||
"vector": [-0.16, -0.18, 1.11],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"3.375": {
|
||||
"vector": [-0.14, -0.16, -0.54],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"3.475": {
|
||||
"vector": [-0.02, -0.13, -0.17]
|
||||
},
|
||||
"3.7": {
|
||||
"vector": [0.05, -0.08, -0.02]
|
||||
},
|
||||
"3.875": {
|
||||
"vector": [0.1, -0.1, 0.3],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"4.0": {
|
||||
"vector": [0, 0.07, -0.21]
|
||||
},
|
||||
"4.075": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"camera": {
|
||||
"rotation": {
|
||||
"0.175": {
|
||||
|
@ -1461,6 +1659,151 @@
|
|||
"vector": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"scope2": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.05": {
|
||||
"vector": [2.2309, 1.32745, 5.98455]
|
||||
},
|
||||
"0.425": {
|
||||
"vector": [-24.01, 2.98, -9.37],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"0.475": {
|
||||
"vector": [-22.25012, 1.71575, -15.23679]
|
||||
},
|
||||
"0.525": {
|
||||
"vector": [-23.67625, 0.53753, -20.43357]
|
||||
},
|
||||
"0.625": {
|
||||
"vector": [-27.27359, 1.63911, -16.2464]
|
||||
},
|
||||
"0.725": {
|
||||
"vector": [-25.02119, 0.16741, -19.71243]
|
||||
},
|
||||
"0.825": {
|
||||
"vector": [-22.36586, -0.75486, -21.85957]
|
||||
},
|
||||
"0.9": {
|
||||
"vector": [-13.42984, -0.39385, -15.87027]
|
||||
},
|
||||
"1.075": {
|
||||
"vector": [-22.35117, -0.9689, -22.83651]
|
||||
},
|
||||
"1.225": {
|
||||
"vector": [-26.3817, -0.19101, -19.94063]
|
||||
},
|
||||
"1.4": {
|
||||
"vector": [-21.33329, -1.14849, -23.82073]
|
||||
},
|
||||
"1.55": {
|
||||
"vector": [-18.24, -1.53, -25.8]
|
||||
},
|
||||
"1.85": {
|
||||
"vector": [-10.66408, -4.02619, -38.55877],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"1.925": {
|
||||
"vector": [-13.44223, -4.57576, -41.51634]
|
||||
},
|
||||
"2.025": {
|
||||
"vector": [-10.27854, -4.93547, -43.49053]
|
||||
},
|
||||
"2.1": {
|
||||
"vector": [-19.33014, -4.0613, -42.67664]
|
||||
},
|
||||
"2.25": {
|
||||
"vector": [-17.01373, -1.99374, -36.83067]
|
||||
},
|
||||
"2.4": {
|
||||
"vector": [-12.09992, 3.01404, -13.77342]
|
||||
},
|
||||
"2.675": {
|
||||
"vector": [1, 0, -0.25]
|
||||
},
|
||||
"2.9": {
|
||||
"vector": [-0.5, 0, -0.1]
|
||||
},
|
||||
"2.975": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"0.0": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.075": {
|
||||
"vector": [-0.04, 0.41, 0.04]
|
||||
},
|
||||
"0.375": {
|
||||
"vector": [-1.1, 0.3, 0.9],
|
||||
"easing": "easeInQuad"
|
||||
},
|
||||
"0.475": {
|
||||
"vector": [-1.1, 0, 0.2],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"0.525": {
|
||||
"vector": [-1.13656, 0.11648, 0.43653]
|
||||
},
|
||||
"0.65": {
|
||||
"vector": [-1.11162, 0.03023, 0.28738]
|
||||
},
|
||||
"0.825": {
|
||||
"vector": [-0.96981, -0.32115, 0.20478]
|
||||
},
|
||||
"0.9": {
|
||||
"vector": [-0.75494, -0.64671, -0.12279]
|
||||
},
|
||||
"0.975": {
|
||||
"vector": [-1.1, 0, 0.3]
|
||||
},
|
||||
"1.15": {
|
||||
"vector": [-0.95347, -0.36221, 0.21435]
|
||||
},
|
||||
"1.325": {
|
||||
"vector": [-0.84854, -0.60732, 0.04107]
|
||||
},
|
||||
"1.475": {
|
||||
"vector": [-0.88449, -0.56099, 0.25543]
|
||||
},
|
||||
"1.65": {
|
||||
"vector": [-0.79, -0.44, 0.2]
|
||||
},
|
||||
"1.85": {
|
||||
"vector": [-0.89507, -0.06932, 0.3549]
|
||||
},
|
||||
"1.925": {
|
||||
"vector": [-1.16342, 0.21638, 0.44269]
|
||||
},
|
||||
"2.025": {
|
||||
"vector": [-1.03823, 0.0689, 0.38061]
|
||||
},
|
||||
"2.1": {
|
||||
"vector": [-1.27235, 0.41208, 0.43655],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"2.225": {
|
||||
"vector": [-0.8044, 0.0239, 0.36148],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"2.3": {
|
||||
"vector": [-0.55391, 0.01857, 0.28596],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"2.675": {
|
||||
"vector": [0, 0, -0.65]
|
||||
},
|
||||
"2.775": {
|
||||
"vector": [0, 0, 0.33]
|
||||
},
|
||||
"2.975": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sound_effects": {
|
||||
|
|
|
@ -1874,21 +1874,5 @@
|
|||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"breath_in": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "superbwarfare:breath_in",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"breath_exhaustion": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "superbwarfare:breath_exhaustion",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "superbwarfare:taser_blueprint",
|
||||
"weight": 40,
|
||||
"weight": 30,
|
||||
"functions": [
|
||||
{
|
||||
"function": "set_count",
|
||||
|
@ -105,7 +105,7 @@
|
|||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "superbwarfare:marlin_blueprint",
|
||||
"weight": 15,
|
||||
"weight": 35,
|
||||
"functions": [
|
||||
{
|
||||
"function": "set_count",
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "superbwarfare:marlin_blueprint",
|
||||
"weight": 15,
|
||||
"weight": 9,
|
||||
"functions": [
|
||||
{
|
||||
"function": "set_count",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"item": "superbwarfare:marlin_blueprint"
|
||||
},
|
||||
"base": {
|
||||
"item": "superbwarfare:rare_material_pack"
|
||||
"item": "superbwarfare:common_material_pack"
|
||||
},
|
||||
"addition": {
|
||||
"tag": "minecraft:logs"
|
||||
|
|
Loading…
Add table
Reference in a new issue