Giter Club home page Giter Club logo

Comments (10)

InventivetalentDev avatar InventivetalentDev commented on August 28, 2024 2

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

from animatedframes.

dvarnai avatar dvarnai commented on August 28, 2024

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

from animatedframes.

KD181999 avatar KD181999 commented on August 28, 2024

@InventivetalentDev Could we have a fix for this?

from animatedframes.

dvarnai avatar dvarnai commented on August 28, 2024

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%

from animatedframes.

InventivetalentDev avatar InventivetalentDev commented on August 28, 2024

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.

from animatedframes.

dvarnai avatar dvarnai commented on August 28, 2024

@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()));
}

from animatedframes.

InventivetalentDev avatar InventivetalentDev commented on August 28, 2024

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

from animatedframes.

KD181999 avatar KD181999 commented on August 28, 2024

Any news on this issue?

from animatedframes.

InventivetalentDev avatar InventivetalentDev commented on August 28, 2024

@KD181999 The fourth message above this one.

from animatedframes.

stale avatar stale commented on August 28, 2024

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.

from animatedframes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.