优化AK动画,禁止实用无人机时操控载具,修复类名错误
This commit is contained in:
parent
6b7da3b749
commit
104a3f26e4
4 changed files with 1064 additions and 1026 deletions
|
@ -389,7 +389,7 @@ public class ClickHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void handleVehicleMove(int key, int state, Player player) {
|
private static void handleVehicleMove(int key, int state, Player player) {
|
||||||
if (player.getVehicle() != null && player.getVehicle() instanceof IArmedVehicleEntity && player.getVehicle().getFirstPassenger() == player) {
|
if (player.getVehicle() != null && player.getVehicle() instanceof MobileVehicleEntity && player.getVehicle().getFirstPassenger() == player) {
|
||||||
var options = Minecraft.getInstance().options;
|
var options = Minecraft.getInstance().options;
|
||||||
|
|
||||||
if (key == options.keyLeft.getKey().getValue()) {
|
if (key == options.keyLeft.getKey().getValue()) {
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class VehicleHudOverlay {
|
||||||
private static boolean shouldRenderCrossHair(Player player) {
|
private static boolean shouldRenderCrossHair(Player player) {
|
||||||
if (player == null) return false;
|
if (player == null) return false;
|
||||||
return !player.isSpectator()
|
return !player.isSpectator()
|
||||||
&& (player.getVehicle() != null && player.getVehicle() instanceof IArmedVehicleEntity);
|
&& (player.getVehicle() != null && player.getVehicle() instanceof VehicleEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getVehicleAmmoType(ItemStack stack, IArmedVehicleEntity iVehicle) {
|
private static String getVehicleAmmoType(ItemStack stack, IArmedVehicleEntity iVehicle) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.atsuishio.superbwarfare.network.message;
|
package com.atsuishio.superbwarfare.network.message;
|
||||||
|
|
||||||
import com.atsuishio.superbwarfare.entity.MobileVehicleEntity;
|
import com.atsuishio.superbwarfare.entity.MobileVehicleEntity;
|
||||||
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraftforge.network.NetworkEvent;
|
import net.minecraftforge.network.NetworkEvent;
|
||||||
|
@ -53,6 +54,17 @@ public class VehicleMovementMessage {
|
||||||
mobileVehicleEntity.downInputDown = message.clicked;
|
mobileVehicleEntity.downInputDown = message.clicked;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (player.getMainHandItem().is(ModItems.MONITOR.get())) {
|
||||||
|
if (player.getMainHandItem().getOrCreateTag().getBoolean("Using") && player.getMainHandItem().getOrCreateTag().getBoolean("Linked")) {
|
||||||
|
mobileVehicleEntity.leftInputDown = false;
|
||||||
|
mobileVehicleEntity.rightInputDown = false;
|
||||||
|
mobileVehicleEntity.forwardInputDown = false;
|
||||||
|
mobileVehicleEntity.backInputDown = false;
|
||||||
|
mobileVehicleEntity.upInputDown = false;
|
||||||
|
mobileVehicleEntity.downInputDown = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue