So i have a dimension called DimH with an increased build limit while all the other dimensions have the normal build limit. The problem is when teleporting a ship from DimH to say the overworld, the ship gets cut off because it gets built at half of y level which is higher than the build limit of the overworld. How do u change the height limit for shipyard?
Uh, i dont know much about that, i also just recently heard of that behvior trough https://discord.com/channels/244934352092397568/1298989899709681764
But I plan on implementing my own teleportation function to solve that problem.
It will basically try to search for an position in which the ship fits in the new world, and if it does not, it just failed to teleport.
how though? after teleportation ships apparently maintain their shipid
what I was thinking as a temporary solution for us is to simply have the shipyard default to overworld-height even in the taller dimension
I wanted to do that (or better, “do it again” originally I had already a custom function) anyway, to solve some other problems.
Your custom function does everything including moving the shipyard from scratch I assume?
yeah I tried to figure out how to change the height of the shipyard and got into obfuscated territory pretty quickly
It basically does (or will do, right now I switched back to the VS2 function, since it seemed to have ben fixed, originally it was very buggy) these things:
Scan the ship, note height/width/length etc.
Copy all ship-data (name, tag, rotation, velocity etc.)
Create new ship in target dimension
Search for an offset to apply to the original ship-coords to make it fit in the new dimension, if none found -> teleport fails
Copy the blocks into the other dimension, but do that by direct chunk access, to prevent any updates
Verify the copied blocks, if any errors (like an dropped block or something) -> teleport fails
Copy NBT data and Conuits (new world-object in my mod)
Delete chunks on the original ship, do that by direct chunk access to prevent any updates from happening.
Manually generate necessary updates on blocks in target dimension
Manually generate updates on deleted blocks
Delete original ship.
Apply all copied ship date (name, tag, rotation, velocity etc.) to the ship in target dimension
-> teleport successfull.
have you found a way to offset the blocks using/before the chunk access though?
That is a really simple mathematical problem:
You have the height of the ship from step 1
You have the max and min Y position from the target dimension.
Now you just need to check how and if it fits.
I dont see what the problem is.
Step 4 ist a solution to an problem, not a problem itself xD
If you copy blocks, you need to specify a source and a destination location.
Simply apply the offset to the destination O.o
Lets say I want to move the block at “13 504 23” down by 400 blocks.
Then i simply say `“copy from {Dimension1 13 504 23} to {Dimension2 12 104 23}”
This conversation is on Discord · Reply there