Skip to content

[Question] Mounting a seats #336

@Mirazez

Description

@Mirazez

✔️ Pre-check

  • Tested with the latest snapshot of BetterModel from Modrinth
  • Confirmed the issue occurs without other optional/experimental plugins or clients (see Disclaimer below)

🐞 Problem Description

I make a vehicles plugin and using BetterModel as a model engine. So i was see ModelMechanic.kt and copied mouting lines to my methods.

After player rightclick on main hitbox plugin find the first steer seat and mount player to it (In theory). But in reality he just teleport to seat position and don't mount it. (BetterModel marks it like player is mounted model)

All seats correctly loaded and have tag p_ or sp_. I checked and seat.bone.hitbox.mountController().canMount() returns true on all of these


📜 Server Log

Nope


🖼️ Screenshot / Video

https://youtu.be/BmAZBMX3G58


🧪 Test Model / Code

data class Seat(val bone: RenderedBone, val isSteer: Boolean, var passenger: Player?)

fun seat(player: Player, seat: Seat) {
    if (seat.passenger != null) return
    val hitBox = seat.bone.hitBox ?: return

    println(hitBox.hasMountDriver()) // false
    seat.passenger = player
    hitBox.mount(BukkitAdapter.adapt(player))
    println(hitBox.hasMountDriver()) // true
    debug.ifTrue { "$DEBUG_PREFIX Игрок <gold>${player.name}</gold> был посажен в транспорт <gold>${uuid}</gold>".logInfo() }
}

🌍 Environment

  • Linux
  • Folia version 1.21.8-6-ver/1.21.8@612d9bd

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions