eccentricdevotion / TARDIS

A Spigot / Paper plugin for all Doctor Who fans - create and use a TARDIS! It's bigger on the inside!
GNU General Public License v3.0
79 stars 27 forks source link

Strange Behaviour with 3d Armourstand Flight #825

Closed roberestarkk closed 3 months ago

roberestarkk commented 4 months ago

Describe the bug

I'm not entirely sure I can properly articulate this bug, as I'm not really sure what's going on, but I'll try!

If I try to crouch-rightclick the handbrake to 'fly' the TARDIS, what seems to happen is I'm immediately teleported out into the TARDIS model, and then a player damage sound is heard and the TARDIS starts wandering around. Using the Magic plugin to 'capture' a mob, I can tell it's riding a chicken. I do get a brief message about controls, from which I can remember the phrase "dismount", but not much more due to how briefly it appears.

Sometimes it thinks the TARDIS is still materialising, other times it doesn't (eg: Clicking the door with a key is prevented, but not Handles opening it). Additionally, I can enter and exit via the handles-opened door from the original position of the TARDIS, despite the model still wandering around elsewhere.

I cannot /tt comehere it to get it to 'land' again when trapped outside, and using shenaigans to get back in tells me I need to engage the handbrake to use the door, and the handbrake tells me I can't change it while in the time vortex, but the console gives me my 'landed' coordinates and doesn't have the 'in the time vortex' message.

I can kill the armourstand, but that doesn't put my TARDIS back in a usable state...

I suspect it might be because I'm holding 'crouch' too long, which is dismount, and that's dismounting me from my TARDIS too soon?

I'll comment back after the server's next scheduled reboot to see if that's what 'fixes' it so I can get it back to a stable place again. I've done this twice now, so it's been fixed at least once somehow, but I'm not entirely sure how (though I did have to manually kill the armourstand and invisible chicken).

To Reproduce

Not really sure tbh, still working that out.

Screenshots

image 1

Log files

filtered.log

'/tardis version' output

[Mon 10:06:29 INFO] [TARDIS] Server version: git-Paper-435 (MC: 1.20.4) [Mon 10:06:29 INFO] [TARDIS] TARDIS version: 5.4.0-b2807 [Mon 10:06:29 INFO] [TARDIS] Vault version: 1.7.3-b131 [Mon 10:06:29 INFO] [TARDIS] WorldGuard version: 7.0.9+5934e49 [Mon 10:06:29 INFO] [TARDIS] CoreProtect version: 22.2 [Mon 10:06:29 INFO] [TARDIS] Essentials version: 2.20.1 [Mon 10:06:29 INFO] [TARDIS] Towny version: 0.100.1.0 [Mon 10:06:29 INFO] [TARDIS] Checking for new TARDIS builds... [Mon 10:06:30 INFO] [TARDIS] You are 1 builds behind! Type /tadmin update_pluginsto update!

roberestarkk commented 4 months ago

Server restart does in-fact allow me to use /tt comehere to get it back to a stable state, so it's not a forever problem, though it did require me to remotely set the handbrake, even after it'd landed, which is normally not the case...

eccentricdevotion commented 4 months ago

Behaviour of external flight initiation has changed, you should be using the relativity differentiator, not shift-clicking.

https://tardis.pages.dev/flying#how-to-fly

eccentricdevotion commented 4 months ago

I probably need to prevent the shift-click alternative - I thought I had...

eccentricdevotion commented 4 months ago

I have, just don't crouch/sneak click at all...

roberestarkk commented 4 months ago

Ah fair enough, thanks! I've updated to

[Tue 01:03:09 INFO] [TARDIS] Server version: git-Paper-435 (MC: 1.20.4)
[Tue 01:03:09 INFO] [TARDIS] TARDIS version: 5.4.0-b2809
[Tue 01:03:09 INFO] [TARDIS] Vault version: 1.7.3-b131
[Tue 01:03:09 INFO] [TARDIS] WorldGuard version: 7.0.9+5934e49
[Tue 01:03:09 INFO] [TARDIS] CoreProtect version: 22.2
[Tue 01:03:09 INFO] [TARDIS] Essentials version: 2.20.1
[Tue 01:03:09 INFO] [TARDIS] Towny version: 0.100.1.0
[Tue 01:03:09 INFO] [TARDIS] Checking for new TARDIS builds...
[Tue 01:03:10 INFO] [TARDIS] You are running the latest version!

And right-clicked without crouching, which did indeed result in me staying 'on' the TARDIS. Unfortunately, still no control over it. It just wandered around like a chicken does (I tried wasd and space, no apparent effect), and crouching to dismount just had me jump off the chicken without it actually landing where it'd wandered, and it continued to wander until I killed the entities, and my 'actual' TARDIS stays in the same place it was originally but is invisible and not easily accessible until the server reboots.

 

Also, just to clarify, when the instruction page says:

Press the Shift key to stop flying (best to do this when on the ground!)

I've rebound Crouch from Shift to Control (and swapped Sprint to Shift) because that's how all videogames work except Minecraft lmao. Does it hook the 'Shift' key explicitly, or does it hook into the 'Crouch' binding?

eccentricdevotion commented 4 months ago

The plugin intercepts the Minecraft player input packet, so I presume if you've remapped it is still receiving the correct data (even though the method is named isShiftKeyDown())

eccentricdevotion commented 4 months ago

If you've remapped WASD you'll need to use those keys to fly as well...

eccentricdevotion commented 4 months ago

Mapping crouch to left-control works fine for me.

eccentricdevotion commented 4 months ago

Sounds like the chicken is not being added as a passenger of the armour stand for some reason...

roberestarkk commented 4 months ago

With further studying I am able to reliably bring the TARDIS back to a usable state without requiring the server to reboot. All I need to do is kill the chicken and the armor_stand entities (probably optional), and then force on the handbrake and then rebuild it or summon it or whatever I need to do to make it re-visible, either by handles or by /tt command.

I've also noticed the model now appears invisible while I ride it (except for the lamp):

Previously, the whole TARDIS model would appear as expected, and my character's helmet would poke through the roof...

Happy to undertake any testing you think might help, but I'm not really sure what else I can check.

The Magic plugin has a flying broomstick that uses armor_stand shenanigans to fly, and that seems to be working fine for what it's worth.

eccentricdevotion commented 3 months ago

Need to update the TARDIS resource pack?

eccentricdevotion commented 3 months ago

It would seem the Magic server resource pack overrides the TARDIS police box models...

eccentricdevotion commented 3 months ago

But I can still fly, both the Magic broom and the TARDIS without issues.

roberestarkk commented 3 months ago

I've scripted the resource packs for all the installed plugins to update automatically, and I've also scripted the packs to merge safely, so on my end at least there shouldn't be any issues with overriding. Looks like it was just a temporary quirk, as after the most recent server reboot, it's back to doing the 'usual' thing, visuals-wise:

It is still ultimately uncontrollable though, and dismounting doesn't teleport me back inside nor lands the armor_stand.

eccentricdevotion commented 3 months ago

Until I can reproduce on my end, there's not much I can do...

roberestarkk commented 3 months ago

Is there anything I can do?

roberestarkk commented 3 months ago

I've confirmed it's happening to everyone who's tried it (one person so far) on my server. It also seems to lock our gamemode until the next restart, irrespective of whether we leave and rejoin, if that helps...?

eccentricdevotion commented 3 months ago

Yeah, gamemode changing would be restored when returning to the TARDIS, but if that isn't happening...

Some other plugin conflict? List of other plugins on server?

Never mind, I logged into your server and did a /plugins. Installed everything and still no issues flying and returning to the TARDIS interior - but of course I don't have your configs.

Have you tried flying when you're not in a Towny area for example?

roberestarkk commented 3 months ago

So it's not that a plugin is fundamentally incompatible... That's a relief I guess!

Meaning it's either specific to how we've configured our plugin(s), the version of the server implementation we're running, or the configuration for the server itself...?

As far as I know, there actually aren't any Towny areas thus far, but yes I've tried flight in the wilderness just to be sure.

I've opped you, so feel free to do any kind of further testing you think might help on the server itself. I'll just keep trying stuff and see what happens!

eccentricdevotion commented 3 months ago

Well, I can confirm it's not working as it should... though I'm no wiser as to the cause :(

eccentricdevotion commented 3 months ago

Might need to replicate your server and do a binary plugin search to see if you can narrow it down to a particular plugin.

roberestarkk commented 3 months ago

Binary plugin search completed. Culprit identified as Craftbook :(

Our .config file has the following:

enabled-mechanics:
- CommandItems
- ChunkAnchor
- Chairs
- Jukebox
- ICs
- Bridge
- Door
- Elevator
- Gate
- HiddenSwitch
- ToggleArea

Of which a further binary search has revealed the problem to be 'chairs'...

eccentricdevotion commented 3 months ago

Good sleuthing! I'll see if I can find a work around.

eccentricdevotion commented 3 months ago

Build 2818 should work better!

roberestarkk commented 3 months ago

Can confirm, works like a charm! Many thanks :)