BaKYCoder / back-to-bed

With this mod, players can easily return to their designated respawn point with a simple right-click.
https://curseforge.com/minecraft/mc-mods/back-to-bed
MIT License
0 stars 2 forks source link

Another dimension teleportation text is not visible #16

Closed BaKYCoder closed 3 months ago

BaKYCoder commented 3 months ago

Do not show a text warning when attempting to teleport from another dimension.

Bug founded in MagicalReturner.java class:

        // Check if the player is in the overworld dimension
        if (player.getCommandSenderWorld().dimension() != Level.OVERWORLD) {
            player.displayClientMessage(Component.translatable("item.backtobed.magical_returner.condition.teleport_for_overworld"), true);

            // Stop item usage and add cooldown
            player.stopUsingItem();
            player.getCooldowns().addCooldown(this, ITEM_COOLDOWN_TICKS);
            return; <-- Needs return from `onUseTick` method
        }