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

BungeeCord Animated Frames issue? #6

Closed
KD181999 opened this issue Jun 15, 2016 · 10 comments
Closed

BungeeCord Animated Frames issue? #6

KD181999 opened this issue Jun 15, 2016 · 10 comments
Assignees

Comments

@KD181999
Copy link

What steps will reproduce the problem?

  1. BungeeCord server setup
  2. Images in the hub
  3. Images in another server

What were you expecting to happen? What happened instead?

Expected the images to work perfectly on both hub and second server, however image because distorted and mixed up with hub server images as shown here: http://prntscr.com/bgseoo

What version of the plugin are you using? Type /version <Plugin Name>

4.3.1

What Spigot version are you using? Type /version

Spigot R0.1 1.9.4

What plugins are you using? Type /plugins

http://prntscr.com/bgsget

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

No errors.

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No.

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

BungeeCord Network.
1.9.4

@dvarnai
Copy link

dvarnai commented Jun 16, 2016

I can confirm this. The issue is probably client side, reconnecting to the server fixes it.

edit: the issue is actually with mapmanager. resending the image content doesn't fix it nor clearing the itemframe

@KD181999
Copy link
Author

@InventivetalentDev Could we have a fix for this?

@InventivetalentDev
Copy link
Owner

@KD181999 Could you have some patience, please? Thank you.

@dvarnai
Copy link

dvarnai commented Jun 17, 2016

The issue is caused by conflicting map ids across servers. I compiled my own version of mapmanager that used random map ids and the issue is gone, although obviously not a proper solution. is it possible to overwrite the client side cache somehow?

edit: maybe lets just use randomized ids? the chance of a conflict is only 0.0015%

@InventivetalentDev
Copy link
Owner

So, I've been trying to come up with a solution for this, but the client's map cache seems to have a very odd behaviour. It doesn't seem to care about any content updates for the images.
@dvarnai Random IDs is unlikely to not cause any conflicts with different images if you have multiple frames, which would then lead to currently non-existent issues on servers without Bungeecord. It'd also mess up vanilla map generation once again.
I will keep trying to trick the client into resetting its cache, but I can't provide a solution for this at the moment.

@InventivetalentDev InventivetalentDev self-assigned this Jun 18, 2016
@dvarnai
Copy link

dvarnai commented Jun 18, 2016

@InventivetalentDev what do you mean? id conflicts can still be resolved on the same server, it would only reduce the chance of conflicts network-wide. heres what i did:

public short getNextFreeIdFor(Player player) throws MapLimitExceededException {
        Set<Short> occupied = getOccupiedIdsFor(player);
        //Add the 'default' occupied IDs
        occupied.addAll(OCCUPIED_IDS);

        ArrayList<Short> allIDs = new ArrayList<Short>();
        for(int i=0;i<=Short.MAX_VALUE;++i) {
            allIDs.add((short)i);
        }
        allIDs.removeAll(occupied);

        if(allIDs.size() == 0) {
            //If we end up here, this player has no more free ids. Let's hope nobody uses this many Maps.
            throw new MapLimitExceededException("'" + player + "' reached the maximum amount of available Map-IDs");
        }

        return allIDs.get(rng.nextInt(allIDs.size()));
}

@InventivetalentDev
Copy link
Owner

@dvarnai Ah, I see. I though you were going for completely random ids. I'll give it a try.

@KD181999
Copy link
Author

Any news on this issue?

@InventivetalentDev
Copy link
Owner

@KD181999 The fourth message above this one.

@stale
Copy link

stale bot commented Nov 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 10, 2018
@stale stale bot closed this as completed Nov 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants