优化飞行器鼠标反转
This commit is contained in:
parent
e8950a1680
commit
96d59f1288
1 changed files with 4 additions and 7 deletions
|
@ -2,8 +2,7 @@ package com.atsuishio.superbwarfare.event;
|
|||
|
||||
import com.atsuishio.superbwarfare.client.MouseMovementHandler;
|
||||
import com.atsuishio.superbwarfare.config.client.VehicleControlConfig;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.Ah6Entity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.Tom6Entity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.base.AirEntity;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity;
|
||||
import com.atsuishio.superbwarfare.init.ModItems;
|
||||
import com.atsuishio.superbwarfare.init.ModMobEffects;
|
||||
|
@ -99,13 +98,11 @@ public class ClientMouseHandler {
|
|||
Minecraft mc = Minecraft.getInstance();
|
||||
Player player = mc.player;
|
||||
|
||||
// 反转鼠标
|
||||
|
||||
if (player == null) return 1;
|
||||
|
||||
if (player.getVehicle() instanceof Ah6Entity ah6Entity && ah6Entity.getFirstPassenger() == player) {
|
||||
return VehicleControlConfig.INVERT_AIRCRAFT_CONTROL.get() ? -1 : 1;
|
||||
}
|
||||
|
||||
if (player.getVehicle() instanceof Tom6Entity tom6 && tom6.getFirstPassenger() == player) {
|
||||
if (player.getVehicle() instanceof VehicleEntity vehicle && vehicle instanceof AirEntity && vehicle.getFirstPassenger() == player) {
|
||||
return VehicleControlConfig.INVERT_AIRCRAFT_CONTROL.get() ? -1 : 1;
|
||||
}
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue