回滚直升机1p视角修改

This commit is contained in:
Atsuihsio 2025-01-17 01:17:00 +08:00
parent afd7fb550a
commit c9be90d297
4 changed files with 3 additions and 15 deletions

View file

@ -170,7 +170,8 @@ public class HelicopterHudOverlay {
if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) { if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) {
renderKillIndicator(guiGraphics, w - 7.5f + (float) (2 * (Math.random() - 0.5f)), h - 7.5f + (float) (2 * (Math.random() - 0.5f))); preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/crosshair_ind.png"), x - 8, y - 8, 0, 0, 16, 16, 16, 16);
renderKillIndicator(guiGraphics, x - 7.5f + (float) (2 * (Math.random() - 0.5f)), y - 7.5f + (float) (2 * (Math.random() - 0.5f)));
} else if (Minecraft.getInstance().options.getCameraType() == CameraType.THIRD_PERSON_BACK) { } else if (Minecraft.getInstance().options.getCameraType() == CameraType.THIRD_PERSON_BACK) {
poseStack.pushPose(); poseStack.pushPose();
poseStack.rotateAround(Axis.ZP.rotationDegrees(iHelicopterEntity.getRotZ(event.getPartialTick())), x, y, 0); poseStack.rotateAround(Axis.ZP.rotationDegrees(iHelicopterEntity.getRotZ(event.getPartialTick())), x, y, 0);

View file

@ -274,7 +274,7 @@ public class Ah6Entity extends ContainerMobileEntity implements GeoEntity, IHeli
this.entityData.set(DELTA_ROT, this.entityData.get(DELTA_ROT) + 2.5f * this.entityData.get(PROPELLER_ROT)); this.entityData.set(DELTA_ROT, this.entityData.get(DELTA_ROT) + 2.5f * this.entityData.get(PROPELLER_ROT));
} }
this.setYRot(this.getYRot() + Mth.clamp((this.onGround() ? 0.1f : 2f) * diffY * this.entityData.get(PROPELLER_ROT) - 0.5f * this.entityData.get(DELTA_ROT), -20f, 20f)); this.setYRot(this.getYRot() + Mth.clamp((this.onGround() ? 0.1f : 2f) * diffY * this.entityData.get(PROPELLER_ROT) - 0.5f * this.entityData.get(DELTA_ROT), -8f, 8f));
this.setXRot(Mth.clamp(this.getXRot() + (this.onGround() ? 0 : 1.4f) * diffX * this.entityData.get(PROPELLER_ROT), -80, 80)); this.setXRot(Mth.clamp(this.getXRot() + (this.onGround() ? 0 : 1.4f) * diffX * this.entityData.get(PROPELLER_ROT), -80, 80));
this.setZRot(Mth.clamp(this.getRoll() - this.entityData.get(DELTA_ROT) + (this.onGround() ? 0 : 0.2f) * diffY * this.entityData.get(PROPELLER_ROT), -80, 80)); this.setZRot(Mth.clamp(this.getRoll() - this.entityData.get(DELTA_ROT) + (this.onGround() ? 0 : 0.2f) * diffY * this.entityData.get(PROPELLER_ROT), -80, 80));
} }

View file

@ -72,15 +72,6 @@ public abstract class CameraMixin {
return; return;
} }
if ((player.getVehicle() instanceof Ah6Entity ah6Entity && ah6Entity.isDriver(player) && Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON)) {
setRotation(ah6Entity.getYaw(partialTicks), Mth.lerp(partialTicks, ah6Entity.xRotO, ah6Entity.getXRot()));
setPosition(Mth.lerp(partialTicks, player.xo, player.getX()), Mth.lerp(partialTicks, player.yo + player.getEyeHeight(), player.getEyeY()), Mth.lerp(partialTicks, player.zo, player.getZ()));
info.cancel();
return;
}
if (stack.is(ModItems.MONITOR.get()) && stack.getOrCreateTag().getBoolean("Using") && stack.getOrCreateTag().getBoolean("Linked")) { if (stack.is(ModItems.MONITOR.get()) && stack.getOrCreateTag().getBoolean("Using") && stack.getOrCreateTag().getBoolean("Linked")) {
DroneEntity drone = EntityFindUtil.findDrone(player.level(), stack.getOrCreateTag().getString("LinkedDrone")); DroneEntity drone = EntityFindUtil.findDrone(player.level(), stack.getOrCreateTag().getString("LinkedDrone"));
if (drone != null) { if (drone != null) {

View file

@ -44,10 +44,6 @@ public class MouseHandlerMixin {
return ClientEventHandler.zoomVehicle ? 0.15 : 0.3; return ClientEventHandler.zoomVehicle ? 0.15 : 0.3;
} }
if (player.getVehicle() instanceof Ah6Entity ah6Entity && !ah6Entity.onGround() && ah6Entity.getFirstPassenger() == player) {
return 0.3;
}
if (player.getVehicle() instanceof Lav150Entity) { if (player.getVehicle() instanceof Lav150Entity) {
return ClientEventHandler.zoomVehicle ? 0.23 : 0.28; return ClientEventHandler.zoomVehicle ? 0.23 : 0.28;
} }