eirikh1996 / Movecraft-Space

Space travel addon for Movecraft
8 stars 4 forks source link

Ships leaving hyperspace disappear #3

Open TuckerAndrews3 opened 2 years ago

TuckerAndrews3 commented 2 years ago

It seems in the latest version (v1.6) on 1.18.1, when a ship leaves Hyperspace it has a chance to run the exit task multiple times and it will paste the ship on top of itself up to 3-4 times, which just destroys all copies and leaves the driver stranded in Space. How can we fix this?

jobenjo commented 6 months ago

I have (kindof) figured out this issue and patched it for my server. This seems to only happen if you hyperjump above y=190, or around a gravity well.

when searching for a location to jump to, it seems to take a number of blocks below and above your ship, without taking into account the height limit.

When it comes to gravity wells, I'm not sure yet. But I have a clue. It seems to boot you out without your ship at extremely distant coordinates. Like x28763356 z3422567.

In order to patch this on my server I removed mass shadows of planets and stars, and made it so that the /jump command only works below y=200. I wanted to hyperjump in planets anyways.

TuckerAndrews3 commented 6 months ago

How did you make the jump command only work under -200?

On Mon, Mar 18, 2024 at 6:30 PM jobenjo @.***> wrote:

I have (kindof) figured out this issue and patched it for my server. This seems to only happen if you hyperjump above y=190, or around a gravity well.

when searching for a location to jump to, it seems to take a number of blocks below and above your ship, without taking into account the height limit.

When it comes to gravity wells, I'm not sure yet. But I have a clue. It seems to boot you out without your ship at extremely distant coordinates. Like x28763356 z3422567.

In order to patch this on my server I removed mass shadows of planets and stars, and made it so that the /jump command only works below y=200. I wanted to hyperjump in planets anyways.

— Reply to this email directly, view it on GitHub https://github.com/eirikh1996/Movecraft-Space/issues/3#issuecomment-2005160334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ3B6SZKU643IOZSAEJX7NTYY5TJ5AVCNFSM5NLJDGUKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBQGUYTMMBTGM2A . You are receiving this because you authored the thread.Message ID: @.***>

jobenjo commented 6 months ago

I added this line of code to Movecraft8jumpcommand.kt

if (midpoint.y > 200) { sender.sendMessage(COMMAND_PREFIX + ERROR + "Jumping does not work at this Y level. Please Descend.") return true }

TuckerAndrews3 commented 6 months ago

I am going to try this with my version here shortly

TuckerAndrews3 commented 6 months ago

Hey there, what line did you put it on specifically? Can’t seem to get it to work on my end

On Tue, Mar 19, 2024 at 10:01 AM jobenjo @.***> wrote:

I added this line of code to Movecraft8jumpcommand.kt

if (midpoint.y > 200) { sender.sendMessage(COMMAND_PREFIX + ERROR + "Jumping does not work at this Y level. Please Descend.") return true }

— Reply to this email directly, view it on GitHub https://github.com/eirikh1996/Movecraft-Space/issues/3#issuecomment-2007261352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ3B6S4YB46QNV2ZU5TBJB3YZBAMFAVCNFSM5NLJDGUKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBQG4ZDMMJTGUZA . You are receiving this because you authored the thread.Message ID: @.***>

jpg39 commented 6 months ago

The dependencies in the maven have privated packages that I'm not sure how to work around. I have the extensions downloaded but that doesn't really help while trying to compile. Any tips, @jobenjo?

jobenjo commented 6 months ago

reply for jpg39: I used this link to figure out how to compile it. https://www.reddit.com/r/admincraft/comments/6afgsa/any_have_a_tutorial_for_compiling_a_plugin_from/ I'm not a professional coder, so take my advice with mountains of salt. This plugin seems to be coded in Kotlin, which lets you only reference dependencies, and not really need them for compiling sake. I'm able to compile without any issues using the "mvn clean install" command, and editing the code in visual studio.

reply for TuckerAndrews: I put it right after midpoint was defined, at line 70.

It seems like even with this fix, the first hyperjump after I launch my server always results in the destruction of the ship used. I have to make a sacrificial jump every time I launch the server. My running theory is the plugin gets stuck in a loop, and bukkit has to break it out of it, judging from my error log. I'm going to keep fiddling with it and see if I can get a complete fix.

TuckerAndrews3 commented 5 months ago

Me and Jpg are actually working together on the same version so anything you find please post here we will be more than happy to help and test. Please please keep us updated! Feel free to add me on Discord At tucker.andrews

On Mon, Apr 1, 2024 at 10:38 AM jobenjo @.***> wrote:

reply for jpg39: I used this link to figure out how to compile it. https://www.reddit.com/r/admincraft/comments/6afgsa/any_have_a_tutorial_for_compiling_a_plugin_from/ I'm not a professional coder, so take my advice with mountains of salt. This plugin seems to be coded in Kotlin, which lets you only reference dependencies, and not really need them for compiling sake. I'm able to compile without any issues using the "mvn clean install" command, and editing the code in visual studio.

reply for TuckerAndrews: I put it right after midpoint was defined, at line 70.

It seems like even with this fix, the first hyperjump after I launch my server always results in the destruction of the ship used. I have to make a sacrificial jump every time I launch the server. My running theory is the plugin gets stuck in a loop, and bukkit has to break it out of it, judging from my error log. I'm going to keep fiddling with it and see if I can get a complete fix.

— Reply to this email directly, view it on GitHub https://github.com/eirikh1996/Movecraft-Space/issues/3#issuecomment-2029859731, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ3B6S4DXZA3GKG6COLFGBTY3FWOHAVCNFSM5NLJDGUKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBSHE4DKOJXGMYQ . You are receiving this because you authored the thread.Message ID: @.***>