Topic category: Troubleshooting, bugs, and solutions
Hello!
I am making a large (by my standards) mod. What I am trying to currently do is simulate stackable dimensions. You go to the bottom of the overworld, you end up at the top the nether (under the nether bedrock ceiling). You go to the top of the nether, you end up at the bottom of the overworld (above the bedrock floor). The teleportation also retains your XZ coordinates in order to keep the nether's fast travel capabilities.
Here are 2 possible solutions I came up with:
Sneak right clicking bedrock:
A block that generates at the bottom of the overworld. When it is right-clicked, it teleports the player ( 1/8 the distance since 1 block travelled in the nether = 8 blocks in the overworld travelled)
https://ibb.co/1fVkvWs
The Problem:
A problem that seems to occur with my methods is that the player can end up teleporting into the ground when changing dimensions. In an attempt to solve this problem I decided to have a 2x2 area clear whenever the player changes dimensions (and is suffocating.)
Here is the problem, the replace, remove, and place procedures don't seem to work after the player switches dimensions. I have the procedure in and I believe my math is right but the blocks are not replaced with air/removed. I tried to replace the blocks with water instead to see what was happening and it appears that the blocks DO get replaced but then instantly reverted to what they originally were.
Why is this happening?
Please if this is too difficult to read lmk, ill try my best to make my problem more clear.
Thanks
Are you sure you break the blocks after the player teleports?
Hello! thanks for replying!
To answer your question:
I believe so. The teleport procedure is before/above the remove block procedure.
Another guess I had:
I thought it could be because of the world/chunk not being loaded in time--since you're changing dimensions. but it turns out that that wasn't the case.
Here's why I think it cant be because of chunk load speed:
I went as far as adding a 20 tick wait before the block removal. and it still didn't work;
I also changed the block replacement from emptying the 2x2 area with air to filling it with water. This is what would happen: The water would replace all the blocks but it would instantly change back to the original material.