mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-11 12:31:20 +01:00
Safety null check for dismount check code
This commit is contained in:
parent
775e1e8921
commit
7ef005006b
1 changed files with 16 additions and 14 deletions
|
@ -79,6 +79,7 @@ public class BedrockInteractTranslator extends PacketTranslator<InteractPacket>
|
||||||
session.sendDownstreamPacket(sneakPacket);
|
session.sendDownstreamPacket(sneakPacket);
|
||||||
|
|
||||||
Entity currentVehicle = session.getPlayerEntity().getVehicle();
|
Entity currentVehicle = session.getPlayerEntity().getVehicle();
|
||||||
|
if (currentVehicle != null) {
|
||||||
session.setMountVehicleScheduledFuture(session.scheduleInEventLoop(() -> {
|
session.setMountVehicleScheduledFuture(session.scheduleInEventLoop(() -> {
|
||||||
if (session.getPlayerEntity().getVehicle() == null) {
|
if (session.getPlayerEntity().getVehicle() == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -94,6 +95,7 @@ public class BedrockInteractTranslator extends PacketTranslator<InteractPacket>
|
||||||
session.sendUpstreamPacket(linkPacket);
|
session.sendUpstreamPacket(linkPacket);
|
||||||
}
|
}
|
||||||
}, 1, TimeUnit.SECONDS));
|
}, 1, TimeUnit.SECONDS));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MOUSEOVER:
|
case MOUSEOVER:
|
||||||
// Handle the buttons for mobile - "Mount", etc; and the suggestions for console - "ZL: Mount", etc
|
// Handle the buttons for mobile - "Mount", etc; and the suggestions for console - "ZL: Mount", etc
|
||||||
|
|
Loading…
Reference in a new issue