See #2540 - not confirmed to be resolved as we weren't able to replicate a cause for this issue but this solved the issue from artifically invoking it.
By introducing fixed maps, we are able to reduce the overhead of needing to store arbitrary numbers; fixed maps start at one number and must be sequential. This commit also reduces some overhead of lecterns in block updating as we are able to utilize our own maps to reduce object boxing and removing the function of Map#compute of trying to re-insert a value.
As Bedrock does not have world border support, this PR translates what the Java server sends us for a world border into particles and fog, while also preventing the Bedrock client from moving outside of the world border.
Co-authored-by: Luke <32024335+lukeeey@users.noreply.github.com>
Co-authored-by: ofunny <play@ofunny.world>
- Most importantly, redesign lodestone caches to be per-player.
- Redesign lodestone caches with the expectation that a client will never re-request the same value.
- Re-use lodestone IDs in a WeakHashMap to be re-used but successfully garbage-collected.
- Improved detection of query packet
- Don't initialize the QueryPacketHandler class until we verified we have query data
- Encode strings like the vanilla Minecraft server
- Faster loading times and improved latency; Geyser no longer creates a physical TCP connection to join the server
- Less configuration: remote address and port are now irrelevant
- Accurate IP addresses without needing Floodgate.
Co-authored-by: Redned <redned235@gmail.com>
* Fix trapdoor collision
* Add EqualsAndHashCode to all Collision subclasses and shift code around
EqualsAndHashCode are required on subclasses otherwise blocks will be assigned an incorrect collision instance. (Doors and trapdoors are mixed and ladder sometimes gets a DoorCollision instance).
Added protected constructor to BlockCollision to make boundingBoxes final.
Removed EmptyCollision because I don't think it is useful.
Moved conversion from ArrayNode to BoundingBoxes[] from OtherCollision to CollisionRegistryLoader
Removed regex from SnowCollision and use default bounding boxes.
* Deduplicate BlockCollision instances
* Create one set of bounding boxes for all BlockCollisions
* Don't depend on the player's block position in DoorCollision
* Fix dirt path position corrections
Grass paths were renamed to dirt path in 1.17
Fix position correction for y=1, y=2, y=255, and y=256
* Increase pushAwayTolerance depending on distance from origin
This should fix position corrections for blocks less than 1 unit in length/width at high coordinates.
This includes ladders after x 4096 or z 4096
Not too sure about the math here though
* Use ThreadLocal for position
Hopefully resolves concurrency issues
* Remove comment and add layer check to SnowCollision
- Don't allow the player to toggle flight status in spectator mode
- Fix weird flight movement when player was previously on the ground
- The player is always flying in spectator mode, no exceptions
- Introduce biome mappings for having a constant reference between Java biome identifier and their Bedrock equivalents
- Don't assume biome IDs and instead listen to the server for biome IDs
- Ensure that only valid Bedrock biomes are sent. With the caves and cliffs experimental toggle, Bedrock will crash if an invalid biome ID is sent its way.
Previously Geyser was storing a reference of every single asset hash provided by the server, including things like sound files. We never used this files, and their existence caused the amount of Asset classes present in Geyser to be over 3000. With this change, we only cache the 118 language files.
Specifically created to address InteractionVisualizer updating all metadata properties when updating the nametag - this commit prevents the item from jumping on updating. It also prevents the entity from being respawned if just the stack size updated.
Technically LocaleUtils is not thread safe and people running Geyser for the first time on slow internet connections may see some untranslated messages. However, we were seeing startup times of about 1+ minutes on these slow connections, and it's better that players see untranslated messages for a short period of time rather than having to wait over a minute for the program to start up.
Once the locale is installed, it doesn't need to be redownloaded again (unless there is a game update) and all translated messages will just work once this download is complete without clients needing to relog.