LemADEC / WarpDrive

A warp drive mod for minecraft
69 stars 39 forks source link

Ship warps inside of an asteroid every so often, causing many of the blocks of the ship to be completely overwritten by astroid terrain. #544

Open CSdiscoveries opened 1 year ago

CSdiscoveries commented 1 year ago

Describe the bug Warping a ship can sometimes result in an asteroid generating and overwriting the blocks of a ship.

To Reproduce Steps to reproduce the behavior:

  1. Warp the ship around a bunch, into non-generated chunks.
  2. Ship should at some point warp inside of a generated object of some kind.

Expected behavior Some kind of warning/cancellation of the jump. I've seen a warning of "Collision detected" or something similar before... This sometimes does not happen, and can cause the ship core to be overwritten by generated blocks.

Screenshots This ship was initially symmetrical. While traveling to a waypoint, half of it was completely erased. I tried mining the asteroid away to see if any of it was still there, it wasn't. Ship core is also completely gone as far as I can tell. Screenshot (46)

Versions (latest is not a valid answer)

LemADEC commented 1 year ago

Flying blindly into an asteroid field will lead to collision, that's no surprise, some would even say it's expected to happen.
You can either move slower, or send a scout to recon the area, or simply avoid them by flying above Y=200 where world generation stops.

CSdiscoveries commented 1 year ago

I understand that collisions happen. The issue is, collisions are a different thing, that show a message in the game text chat. Usually, if a ship is about to warp somewhere where blocks already exist, it'll either say "Move aborted, obstacle (block) at (x,y,z)" or "Collision Detected at (x,y,z), send a maintenance team to investigate"... in the latter case, there would also be fire. That doesn't happen always... that is the issue I'm mentioning/trying to bring to attention. As it is, asteroid generation density is so high that my only option is to constantly fly at y-200. And, this applies to other dimensions too... Notably, Galacticraft's Asteroids dimension. Single-block asteroids are common there... And, if I warp into a chunk that's not generated yet, those asteroids can replace hull, solar panels, and even chests. While I am very inexperienced with mod development in any way, I will say that I have one suggestion... I have no way of knowing if it is viable, but I may as well say it in case it helps. During the warm-up phase for a ship, having all the surrounding chunks that a ship would travel to generated beforehand, possibly by a temporary tile entity that deletes itself after the chunk it is in is within the loading range of the player. This would hopefully allow whatever causes the ship to collide with blocks/abort warps to detect that there is in fact a block there. That is just an idea from an inexperienced end-user, though... Take it with a grain of salt.

CSdiscoveries commented 1 year ago

It seems that asteroids can overwrite ships even when a ship is taking off from a planet. Meaning, I'd have next to no way to know there was anything there before jumping. The short delay that I've noticed in world gen (which, if I recall correctly, is intentional) might actually make things worse... Just now, I had left the overworld and was about to go to Y-200 in order to safely travel to Galacticraft's Asteroids dimension for mining. Unexpectedly, a moon generated itself inside my ship, causing the warp core block, the advanced computer I had been using to control it, and most of the hull to be completely overwritten. I even started suffocating in the stone blocks that generated. Suffice it to say, I seem to be running into this problem more and more often... it is especially frustrating to have this happen in circumstances where I have no real way of even knowing what is around the location I jump to, besides to just jump there.

LemADEC commented 1 year ago

The base game won't tick/update a dimension with no players, so keeping target area loaded won't let the world generation execute. That being said, the mod already chunk-load the target area for performance reasons.
Moons and Asteroid fields are pretty scarce, it sounds like your configuration as a noticeably increased space world generation.
When going into orbit, your ship Y coordinates remains unchanged; in other words, if you're on a planet at Y=213 and request a movement above the world ceiling, you'll end up in space at Y=213...