Closed james090500 closed 4 years ago
I don’t see how this is an issue. If you look in EntityCache, unless I changed it, the proxy id counter begins at 2, since 1 in for the session
That's the proxy id. I am talking about the remote entity ID. As in the ID the java servers sends to the client.
For example, when a new entity is created. The entity ID is passed from the packet.
see below:
There for, by manually setting the player entityID to 1, any other entity ID with 1 will cause a clash
The java id doesnt matter as it is mapped to a proxy id when the entity is created
Fixed in 6428ce2
When a sendFakeGameStart was sent the unique entity ID of the player was hard coded as 1. This player is obviously the bedrock player so has to stay in the cache.
However, when joining the java server, entities are sent to dragonproxy with the entity ID. For example in CapeCraft's hub a floating item has an entityID of 1. Now when you walk to far away from this entity a ServerEntityDestroyPacket is sent for entityID 1 (The Item) but as DP has seemed to merge the player and item into one entry, the player is removed from the cache causing bedrock to crash.
As Entity ID's should never be negative, I have set the player entity ID to Integer.MIN_VALUE. Theoretically this could fix many other crashes players have due to entities.