移除抖屏相关代码

This commit is contained in:
Atsuihsio 2024-05-20 13:17:20 +08:00
parent 359d240844
commit 2106135c2c

View file

@ -16,13 +16,6 @@ import software.bernie.geckolib.core.animation.AnimationState;
import software.bernie.geckolib.model.GeoModel;
public class AK47ItemModel extends GeoModel<AK47Item> {
static float camera_pitch;
static float camera_yaw;
static float camera_roll;
@Override
public ResourceLocation getAnimationResource(AK47Item animatable) {
return new ResourceLocation("target", "animations/ak.animation.json");
@ -151,25 +144,5 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
move.setRotZ(3.7f * (float) yaw + 2.7f * (float) m);
move.setRotY(1.9f * (float) yaw - (float) m);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
float camera_pitch = camera.getRotX();
float camera_yaw = camera.getRotY();
float camera_roll = camera.getRotZ();
}
@SubscribeEvent
public static void computeCameraAngles(ViewportEvent.ComputeCameraAngles event) {
double view_pitch = event.getPitch();
double view_yaw = event.getYaw();
double view_roll = event.getRoll();
// TODO 让下面仨等于上面仨
event.setPitch((float) view_pitch + camera_pitch);
event.setYaw((float) view_yaw + camera_yaw);
event.setRoll((float) view_roll + camera_roll);
}
}