移除抖屏相关代码
This commit is contained in:
parent
359d240844
commit
2106135c2c
1 changed files with 0 additions and 27 deletions
|
@ -16,13 +16,6 @@ import software.bernie.geckolib.core.animation.AnimationState;
|
||||||
import software.bernie.geckolib.model.GeoModel;
|
import software.bernie.geckolib.model.GeoModel;
|
||||||
|
|
||||||
public class AK47ItemModel extends GeoModel<AK47Item> {
|
public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
|
|
||||||
static float camera_pitch;
|
|
||||||
|
|
||||||
static float camera_yaw;
|
|
||||||
|
|
||||||
static float camera_roll;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getAnimationResource(AK47Item animatable) {
|
public ResourceLocation getAnimationResource(AK47Item animatable) {
|
||||||
return new ResourceLocation("target", "animations/ak.animation.json");
|
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.setRotZ(3.7f * (float) yaw + 2.7f * (float) m);
|
||||||
|
|
||||||
move.setRotY(1.9f * (float) yaw - (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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue