mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 14:59:19 +00:00
fix NoSuchMethodError
This commit is contained in:
@@ -2,6 +2,7 @@ package re.imc.geysermodelengine.model;
|
||||
|
||||
import com.comphenix.protocol.wrappers.Pair;
|
||||
import com.ticxo.modelengine.api.ModelEngineAPI;
|
||||
import com.ticxo.modelengine.api.entity.BukkitEntity;
|
||||
import com.ticxo.modelengine.api.model.ActiveModel;
|
||||
import com.ticxo.modelengine.api.model.bone.type.Mount;
|
||||
import com.ticxo.modelengine.api.mount.controller.MountController;
|
||||
@@ -21,7 +22,8 @@ public class BedrockMountControl {
|
||||
if (!FloodgateApi.getInstance().isFloodgatePlayer(player.getUniqueId())) {
|
||||
continue;
|
||||
}
|
||||
float pitch = player.getPitch();
|
||||
|
||||
float pitch = player.getLocation().getPitch();
|
||||
Pair<ActiveModel, Mount> seat = GeyserModelEngine.getInstance().getDrivers().get(player);
|
||||
if (seat != null) {
|
||||
if (pitch < -30) {
|
||||
@@ -36,8 +38,14 @@ public class BedrockMountControl {
|
||||
}
|
||||
}
|
||||
if (pitch > 80) {
|
||||
if (seat.getFirst().getModeledEntity().getBase() instanceof BukkitEntity bukkitEntity) {
|
||||
if (bukkitEntity.getOriginal().isOnGround()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
MountController controller = ModelEngineAPI.getMountPairManager()
|
||||
.getController(player.getUniqueId());
|
||||
|
||||
if (controller != null) {
|
||||
MountController.MountInput input = controller.getInput();
|
||||
if (input != null) {
|
||||
|
||||
Reference in New Issue
Block a user