(Help I am going crazy) Replacing Blocks After Switching Dimensions.

Started by Nemmy on

Topic category: Troubleshooting, bugs, and solutions

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(Help I am going crazy) Replacing Blocks After Switching Dimensions.
Tue, 11/12/2024 - 21:47 (edited)

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:

https://ibb.co/f1RymQW

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

Edited by Nemmy on Tue, 11/12/2024 - 21:47
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you sure you break the…
Wed, 11/13/2024 - 14:47

Are you sure you break the blocks after the player teleports?

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello! thanks for replying!…
Wed, 11/13/2024 - 18:03

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.