Interdimensional

Interdimensional

1k Downloads

`/execute in` tab complete not updating for online players

bonn2 opened this issue ยท 6 comments

commented

I discovered this little quirk while trying to teleport into a dimension I created

Steps to reproduce:

  1. Create a new dimension with /dim create test:one minecraft:overworld
  2. Type /execute in and notice that the new dimension is not listed in the suggestions
  3. Leave and join the server
  4. Type /execute in and notice the new dimension now exists in the suggestion list
  5. Delete test dimension with /dim delete test:one
  6. Type /execute in and notice that the deleted dimension is persisting in the suggestion list
  7. Leave and join the server
  8. Type /execute in and notice the new dimension no longer exists in the suggestion list
commented

This has been discussed on the discord, might require some packet trickery to fix

commented

I have noticed the same behaviour with the portal command, where the portal will only work after a server restart.
It seems that the state is not updated immediately, but only on startup.

Seen behaviour:

  1. /dim create test minecraft:overworld
  2. /dim portal add test test aqua minecraft:stone false
[08:07:01] [Server thread/INFO]: [STDOUT]: [customportalapi]ERROR: Dimension not found
[08:07:01] [Server thread/INFO]: [STDOUT]: minecraft:overworld
[08:07:01] [Server thread/INFO]: [STDOUT]: minecraft:the_end
[08:07:01] [Server thread/INFO]: [STDOUT]: minecraft:the_nether
  1. restart the server
[08:09:21] [Server thread/INFO]: [STDOUT]: minecraft:test
[08:09:21] [Server thread/INFO]: [STDOUT]: minecraft:overworld
[08:09:21] [Server thread/INFO]: [STDOUT]: minecraft:the_end
[08:09:21] [Server thread/INFO]: [STDOUT]: minecraft:the_nether
  1. /dim portal add test test aqua minecraft:cobblestone false
  2. portal is created correctly and works for teleporting back and forth.

I have seen similar issues with portal remove where it does not actually remove it and complains about it existing when trying to create a new portal with the same block type.

commented

You canโ€™t have two portals with the same block type

commented

I would assume if I created a portal with a certain block type, and then remove that portal, that the blocktype would become available again. Is the actual behaviour different?

I also did some more testing and it looks like my dimensions.json file is not updated immediately when running the /dim create command, but only on shutdown of my minecraft server. It then adds it and can be used on the next boot.

commented

You would need to restart the server for it to become available again

commented

This has been implemented as a custom suggestor