Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: /rtp looks for locations twice #1493

Open
ChiefArug opened this issue Feb 4, 2025 · 1 comment
Open

[Bug]: /rtp looks for locations twice #1493

ChiefArug opened this issue Feb 4, 2025 · 1 comment
Labels
1: Bug Problem with the usage of a mod. FTB Essentials state: Fixed in Dev 🛠️ An issue is fixed in-dev and pending for release.

Comments

@ChiefArug
Copy link

Mod

FTB Essentials

Mod version

2101.1.4

NeoForge / Forge / Fabric version

Neo 21.1.92

Modpack & version

No response

What issue are you having?

/rtp fires findBlockPos twice and displays the text twice due to WarmupCooldownTeleporter calling positionGetter#apply twice.

First time here: FTBTeam/FTB-Essentials:common/src/main/java/dev/ftb/mods/ftbessentials/util/WarmupCooldownTeleporter.java#L64
to check if it is in a dimension blacklist.
Then the second time when it actually teleports, here: FTBTeam/FTB-Essentials:common/src/main/java/dev/ftb/mods/ftbessentials/util/WarmupCooldownTeleporter.java#L95
This also means the dimension blacklist doesn't function for /rtp.

Crashlogs

No response

Steps to reproduce

Run the /rtp command
Wonder how this got through testing

Anything else to note?

No response

@ChiefArug ChiefArug added the 1: Bug Problem with the usage of a mod. label Feb 4, 2025
@desht
Copy link
Contributor

desht commented Feb 4, 2025

Yep, definitely not correct behaviour. The dest pos should only be computed a single time (also applies to other teleportation commands, although they're less critical, since /rtp is the only non-deterministic one).

This also means the dimension blacklist doesn't function for /rtp.

There's actually a separate blacklist for /rtp, which is checked as soon as the command is run - see teleportation/rtp/dimension_whitelist and dimension_blacklist in the config. Having said that, the global teleportation blacklists should also apply here, really.

desht added a commit to FTBTeam/FTB-Essentials that referenced this issue Feb 4, 2025
Most important for /rtp, which has a non-deterministic result, but
also applies to the other teleporting commands.

Also added a teleportation/admins_exempt_dimension_blacklists
(default true) to control whether players with permission level >=2
are subject to teleportation blacklists.

FTBTeam/FTB-Mods-Issues#1493
@desht desht added state: Fixed in Dev 🛠️ An issue is fixed in-dev and pending for release. FTB Essentials labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1: Bug Problem with the usage of a mod. FTB Essentials state: Fixed in Dev 🛠️ An issue is fixed in-dev and pending for release.
Projects
None yet
Development

No branches or pull requests

2 participants