优化动画

This commit is contained in:
Atsuihsio 2024-12-03 03:40:40 +08:00
parent 1cffa87c07
commit 82b50d764d
12 changed files with 37 additions and 37 deletions

View file

@ -56,7 +56,7 @@ public class AbekiriItemModel extends GeoModel<AbekiriItem> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;

View file

@ -1,11 +1,11 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.handgun.Glock17Item;
import com.atsuishio.superbwarfare.tools.GunsTool;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -58,7 +58,7 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 20 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
@ -73,15 +73,15 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
gun.setRotZ(-11 * Mth.DEG_TO_RAD * (float) zp + (float) (0.05f * zpz));
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
shen.setPosZ((float) (5.825 * fp + 0.34f * fr + 2.35 * fpz));
shen.setRotX((float) (0.15f * fp + 0.3f * fr + 0.3f * fpz));
shen.setPosY((float) (0.21f * fp + 0.25f * fr));
shen.setPosZ((float) (2.375 * fp + 0.44f * fr + 0.75 * fpz));
shen.setRotX((float) (0.01f * fp + 0.05f * fr + 0.01f * fpz));
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));
shen.setPosX((float) (shen.getPosX() * (1 - 0.4 * zt)));
shen.setPosY((float) (shen.getPosY() * (1 - 0.5 * zt)));
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.7 * zt)));
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.3 * zt)));
shen.setRotX((float) (shen.getRotX() * (1 - 0.27 * zt)));
shen.setRotY((float) (shen.getRotY() * (1 - 0.7 * zt)));
shen.setRotZ((float) (shen.getRotZ() * (1 - 0.65 * zt)));

View file

@ -1,11 +1,11 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.handgun.Glock18Item;
import com.atsuishio.superbwarfare.tools.GunsTool;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -67,7 +67,7 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 20 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
@ -82,16 +82,16 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
gun.setRotZ(-11 * Mth.DEG_TO_RAD * (float) zp + (float) (0.05f * zpz));
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
shen.setPosZ((float) (5.825 * fp + 0.34f * fr + 2.35 * fpz));
shen.setRotX((float) (0.15f * fp + 0.3f * fr + 0.3f * fpz));
shen.setPosY((float) (0.21f * fp + 0.25f * fr));
shen.setPosZ((float) (2.375 * fp + 0.44f * fr + 0.75 * fpz));
shen.setRotX((float) (0.01f * fp + 0.05f * fr + 0.01f * fpz));
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));
shen.setPosX((float) (shen.getPosX() * (1 - 0.4 * zt)));
shen.setPosY((float) (shen.getPosY() * (1 - 0.5 * zt)));
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.7 * zt)));
shen.setRotX((float) (shen.getRotX() * (1 - 0.87 * zt)));
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.3 * zt)));
shen.setRotX((float) (shen.getRotX() * (1 - 0.27 * zt)));
shen.setRotY((float) (shen.getRotY() * (1 - 0.7 * zt)));
shen.setRotZ((float) (shen.getRotZ() * (1 - 0.65 * zt)));

View file

@ -55,7 +55,7 @@ public class HuntingRifleItemModel extends GeoModel<HuntingRifleItem> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
@ -71,7 +71,7 @@ public class HuntingRifleItemModel extends GeoModel<HuntingRifleItem> {
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
shen.setPosZ((float) (5.825 * fp + 0.34f * fr + 2.35 * fpz));
shen.setPosZ((float) (2.825 * fp + 0.17f * fr + 1.175 * fpz));
shen.setRotX((float) (0.01f * fp + 0.2f * fr + 0.01f * fpz));
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));

View file

@ -1,10 +1,10 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.sniper.K98Item;
import com.atsuishio.superbwarfare.tools.GunsTool;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -67,7 +67,7 @@ public class K98ItemModel extends GeoModel<K98Item> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 8 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
@ -78,7 +78,7 @@ public class K98ItemModel extends GeoModel<K98Item> {
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
shen.setPosZ((float) (5.825 * fp + 0.34f * fr + 2.35 * fpz));
shen.setPosZ((float) (2.825 * fp + 0.17f * fr + 1.175 * fpz));
shen.setRotX((float) (0.01f * fp + 0.15f * fr + 0.01f * fpz));
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));

View file

@ -1,11 +1,11 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.handgun.M1911Item;
import com.atsuishio.superbwarfare.tools.GunsTool;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -59,7 +59,7 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
@ -72,15 +72,15 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
gun.setScaleZ(1f - (0.35f * (float) zp));
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
shen.setPosZ((float) (5.825 * fp + 0.34f * fr + 2.35 * fpz));
shen.setPosY((float) (0.25f * fp + 0.28f * fr));
shen.setPosZ((float) (2.375 * fp + 0.44f * fr + 0.75 * fpz));
shen.setRotX((float) (0.15f * fp + 0.3f * fr + 0.3f * fpz));
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));
shen.setPosX((float) (shen.getPosX() * (1 - 0.4 * zt)));
shen.setPosY((float) (shen.getPosY() * (1 - 0.5 * zt)));
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.7 * zt)));
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.3 * zt)));
shen.setRotX((float) (shen.getRotX() * (1 - 0.27 * zt)));
shen.setRotY((float) (shen.getRotY() * (1 - 0.7 * zt)));
shen.setRotZ((float) (shen.getRotZ() * (1 - 0.65 * zt)));

View file

@ -54,7 +54,7 @@ public class M870ItemModel extends GeoModel<M870Item> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;

View file

@ -1,10 +1,10 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.sniper.M98bItem;
import com.atsuishio.superbwarfare.tools.GunsTool;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -58,7 +58,7 @@ public class M98bItemModel extends GeoModel<M98bItem> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;

View file

@ -55,7 +55,7 @@ public class MarlinItemModel extends GeoModel<MarlinItem> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
@ -67,7 +67,7 @@ public class MarlinItemModel extends GeoModel<MarlinItem> {
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
shen.setPosZ((float) (5.825 * fp + 0.34f * fr + 2.35 * fpz));
shen.setPosZ((float) (2.825 * fp + 0.17f * fr + 1.175 * fpz));
shen.setRotX((float) (0.01f * fp + 0.15f * fr + 0.01f * fpz));
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));

View file

@ -1,9 +1,9 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.item.gun.sniper.MosinNagantItem;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.sniper.MosinNagantItem;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -60,7 +60,7 @@ public class MosinNagantItemModel extends GeoModel<MosinNagantItem> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
@ -87,7 +87,7 @@ public class MosinNagantItemModel extends GeoModel<MosinNagantItem> {
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
shen.setPosZ((float) (3.325 * fp + 0.34f * fr + 2.35 * fpz));
shen.setPosZ((float) (2.825 * fp + 0.17f * fr + 1.175 * fpz));
shen.setRotX((float) (0.01f * fp + 0.15f * fr + 0.01f * fpz));
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));

View file

@ -1,11 +1,11 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.event.PlayerEventHandler;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.event.PlayerEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.sniper.Ntw20Item;
import com.atsuishio.superbwarfare.tools.GunsTool;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -61,7 +61,7 @@ public class Ntw20Model extends GeoModel<Ntw20Item> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;

View file

@ -1,10 +1,10 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.item.gun.sniper.SentinelItem;
import com.atsuishio.superbwarfare.tools.GunsTool;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
@ -58,7 +58,7 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
double turnRotX = ClientEventHandler.turnRot[0];
double turnRotY = ClientEventHandler.turnRot[1];
double turnRotZ = ClientEventHandler.turnRot[2];
double fpz = ClientEventHandler.firePosZ * 13 * times;
double fpz = ClientEventHandler.firePosZ * 7 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;