Skip to content
New issue

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

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

Already on GitHub? # to your account

Chunk gets loaded multiple times #12175

Closed
ItsVaidas opened this issue Feb 24, 2025 · 1 comment
Closed

Chunk gets loaded multiple times #12175

ItsVaidas opened this issue Feb 24, 2025 · 1 comment
Labels

Comments

@ItsVaidas
Copy link

ItsVaidas commented Feb 24, 2025

Expected behavior

On teleporting with minecraft command /tp chunk should load one time

Observed/Actual behavior

Chunk gets loaded multiple times

Image

    public SomeEventListener(Plugin plugin) {
        Bukkit.getScheduler().runTaskTimer(plugin, () -> {
            map.keySet().stream()
                    .filter(key -> map.get(key) > 1)
                    .forEach(key -> {
                        Bukkit.getConsoleSender().sendMessage("Chunks that loaded: " + key + " times: " + map.get(key));
                    });
            map.clear();
        }, 20L, 20L);
    }

    @EventHandler
    public void onChunkLoad(ChunkLoadEvent e) {
        map.put(e.getChunk().toString(), map.getOrDefault(e.getChunk().toString(), 0) + 1);
    }

Steps/models to reproduce

Teleport to unloaded chunks

Plugin and Datapack List

Image
Code of the plugin is above

Paper version

[22:00:46 INFO]: This server is running Paper version 1.21.4-177-main@e5a8ee8 (2025-02-21T11:12:22Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-2389-71f219d (MC: 1.21.4)

Other

No response

@papermc-sniffer papermc-sniffer bot added the version: 1.21.4 Game version 1.21.4 label Feb 24, 2025
@Warriorrrr
Copy link
Member

Closing as a duplicate of #9581, since the root cause is the same.

@Warriorrrr Warriorrrr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants