Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ships stop sinking when sinking into void. #181

Open
wolfebersahd opened this issue Oct 30, 2019 · 16 comments
Open

Ships stop sinking when sinking into void. #181

wolfebersahd opened this issue Oct 30, 2019 · 16 comments
Labels
bug Issues causing negative effects for end users
Milestone

Comments

@wolfebersahd
Copy link

Describe the bug
When a ship sinks into the void, it stops sinking and freezes at Y=3 wihtout "squashing" like it does on land, or fading into the void.

To Reproduce
Steps to reproduce the behavior:

  1. Pilot a ship over the void
  2. Damage it to the point where is sinks
  3. Watch it sink to the void
  4. Ship stops sinking at y=3 and doesn't squash or sink into void

Expected behavior
As per previous versions (Movecraft 5) ships that sink into void fade immediately layer by layer as the descend into it.

Screenshots
I can provide a screenshot later today.

Versions (please complete the following information):

  • Movecraft: Latest beta release on spigot.
  • Java 8
  • Minecraft: Spigot 1.12.2

Additional context
Add any other context about the problem here.

@wolfebersahd wolfebersahd added the bug Issues causing negative effects for end users label Oct 30, 2019
@TomLewis
Copy link
Contributor

TomLewis commented Nov 4, 2019

I've always thought how this should be handed, there is nowhere for the ship to crash into, stopping at the bottom is most likely the best solution, it it starts eroding from the void up, so its like the ship melts as it goes into the void, a warning could be delivered beforehand.

In old versions of movecraft it used to just spam the console with errors if a ship in the end crashed.

@jamesol1
Copy link

jamesol1 commented May 20, 2020

Yeah i agree with OP, could you guys add this? It woud be a great correction/bug fix. Would love for fade wrecks to be able to function too.

@wolfebersahd
Copy link
Author

I found what mwkaicz did way back in 2014 to stop ships sinking into void on Movecraft 3. Sad this functionality wasn't carried over to newer version.

AJCStriker/Movecraft-3@a75ced8

Please if you can add this functionality back. It would be greatly appreciated.

@oh-noey
Copy link
Collaborator

oh-noey commented May 29, 2020

oh I wasn't aware this once existed, since it seems a lot of people want it I'll look into it. Would a temporary solution where the ship simply vanishes when reaching the point it would stop sinking at be helpfull?

@wolfebersahd
Copy link
Author

wolfebersahd commented May 30, 2020

If you are going to work on it and make it fade layer by layer I would be willing to wait.

Having it delete when it hits the void sounds like a great temporary solution.

Thanks for this.

@TomLewis
Copy link
Contributor

Yeah fade layer by layer is what I had in my head would be how it worked too

@wolfebersahd
Copy link
Author

wolfebersahd commented May 30, 2020

Mwkaicz wrote the fade layer by layers code back in Movecraft 3 for us. BaccaYarro had the ship fade too but it would respawn the layer at y=255 it was rather funny. He fixed that bug too, I can dig through their respective github to find it 😉 if you would like.

@TomLewis
Copy link
Contributor

@wolfebersahd If you can find the code from the old version maybe the movecraft superman can help us out.

@eirikh1996 is this something you could implement from old code for us? This would be brilliant to have sky world ships!

@wolfebersahd
Copy link
Author

I use this precisely on my skylands server, have been since 2011.

@wolfebersahd
Copy link
Author

wolfebersahd commented Jun 21, 2020

As per the discord chat just adding this here do it doesn't get lost

On all the ideas:

  • Ships fading layer by layer into the void is ideal in mine and Mineshaft's case.
  • With that said if there was a "no-fade" block list. "cannons materials, chests, valuables" etc that we want other people to be able to scavenge/loot after a ship battle over the void would be nice.

Currently ships just stop sinking at Y=3, they don't even squash.

Another option, would be that a sinking ships set all the signs in the ship to blank (or sets the first line to SUNKEN, or a configurable string) so that ships can't be re-piloted from clicking the sign again.

^^^ Just brainstorming ideas. Things that i think might be easier and more maintainable than adding sinking ships to other worlds, or having floating chests or cannons in the skies after ships sink. Our biggest concern is we're a skylands style server so floating islands with lots of void in-between.

@oh-noey oh-noey added the 8.x label May 2, 2021
@oh-noey oh-noey added this to the Movecraft 8.0 milestone May 2, 2021
@oh-noey oh-noey removed the 8.x label May 30, 2021
@TylerS1066 TylerS1066 moved this to New in Issue Triage Mar 22, 2022
@TylerS1066 TylerS1066 moved this from New to Ready for Work in Issue Triage Mar 22, 2022
@ghost
Copy link

ghost commented Apr 20, 2022

I have recently been experimenting with ways to fix this, my current solution checks when a craft moves if it is of sinking type and removes all blocks below a certain point.
This point is required to be above 0 in order for the craft to fade layer by layer, this is due to it being hardcoded in movecraft.
Here's an example of it:
XK4cJnfR1Q

I have yet to find extremely ground breaking issues with this, here are a few:

  • If a ship goes below y 4 the craft will not continue to translate downwards when sunk (this is because of a hardcoded limit to my knowledge)
  • Removing it layer by layer does take a small hit on performance

Overall this is an extremely simple solution, I would love to develop this further and contribute it too Movecraft if the demand exists (maybe even just for sake of completion or polish).

@TomLewis
Copy link
Contributor

@NotVentox this is brilliant! The only thing I would recommend is a way to alert players they are getting close so if its piloted then they know they will start to fall to bits. Unless this is only when its sinking in which its great!

@ghost
Copy link

ghost commented Apr 21, 2022

It only vanishes when the craft is actually sinking.

@wolfebersahd
Copy link
Author

wolfebersahd commented Sep 11, 2024

Was this
#181 (comment)
every merged into the code?

It still doesn't seem to work as either of the above solutions of the ship completely vanishing or the layer by layer destruction just not doing anything on the latest version.

  • Movecraft 8.0.0 Beta 5
  • PaperMC 1.20.6

The ship just stops sinking at y=4 and can be re-piloted as if nothing was wrong.

This might be a new issue:
Also ships can move lower than y=4 now on 1.20.6 (as of 1.18 AFAIK) but when they sink they stop at y=4, even if there is land or water below them.

A boat or a submarine sinking over a trench that is deeper y=4 will cause the ship to stop sinking at y=4 without squashing like it would if there were blocks under it above y=4

Edit:
Looks like this

if (craft.getHitBox().isEmpty() || craft.getHitBox().getMinY() < 5) {

might be the cause for it to stop sinking at Y=4, because there's a hard coded y < 5 here to force-release for "SUNK" reason.

@Mineshaft87
Copy link

Forgot about this, yeah i dont think this was fixed. Would be great if this could be implemented.

@wolfebersahd
Copy link
Author

@Mineshaft87 I managed to fix this for myself but i don't feel confident merging it until i find any edge case issues with it,

I did PR some small fixes with the min y sink limit and the incorrect hitbox math here #715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues causing negative effects for end users
Projects
Status: Ready for Work
Development

No branches or pull requests

5 participants