A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock edition.
Find a file
bundabrg 0ca1096f45
Fix Skin Caching and Fix Skin Restorer (#680)
* Fix Skin Caching

Changes:
* Instead of caching a skin based upon the player we cached it based upon the textureURL. This means multiple players with the same skin will benefit from the cache and more importantly will mean a player changing their skin will not get a false cache hit.
* This should fix all issues with SkinRestorer and will now correctly show the skin both to the player themselves and to other players

Closes #518

* Remove duplicated code

* Minimize playerlist updates

Changes:
* All async skin stuff will now just update skins and not be involved with sending the session to the player. This eliminates issues where the player list changes whilst an async task is occuring plus it means no invisible players while retrieving skin.
* Fix bug when retrieving cached skin

* When sending PlayerList packets ensure the skins have appropriate skinIds so the Bedrock client will cache hit/miss as needed

* Make sure to add and remove player when setting skin if they do not belong on the playerlist

* Make use of AuthData UUID when removing the player

* Revert removal of checking if entity is valid when initialized

This section is supposed to send all spawned entities in the java world to a player only after they've initialized. By removing this check it would also be sending entities that exist but are not spawned.

* Optimizations

Changes:
* Check for duplicate requests based on textureURL instead of player ID
* Don't use the PlayerSkinPacket. It duplicates the data sent in the PlayerListPacket and without it the players still get skin updates.

* Support caching of skins to disk based on configuration variable

If a skin is downloaded it will be saved to `cache/skins` using a base64 encoded filename of the textureUrl, if allowed by setting a non 0 value for the configuration variable `cache-skins`

When reading a skin we try load it from a cache file first before trying to download it.

We don't yet expire them but do update their last modification so we know which ones have been accessed.

* Update `config.yml` with cache-skins directive, defaulting to disabled

* Merge Fixes

* Cache all images instead of just skins

Changes:
* Move the image caching from skins to where images may get downloaded so this also covers capes and anything else that uses the same method of image retrieval
* Updated config value from `cache-skins` to `cache-images`
* Updated cache location from `cache/skins` to `cache/images`
* Images are stored in png format with a uuid. This may make debugging easier as they can be directly opened.

* Implement cached image expiry

If `cache-images` is set to a value greater than 0 then a scheduled task will occur once a day that will remove images with a modification date older than the value in days.

* Force skin changes as trusted

* Resolve PR queries

* Fix signed int causing issues calculating expiry time for images

* Reset Defaults to 0 and implement Google Timed Eviction cache for Images

* Add memory cache for Capes

Co-authored-by: Brendan Grieve <brendan.grieve@zepli.com.au>
Co-authored-by: bundabrg <bundabrg@grieve.com.au>
2020-08-07 12:33:21 -04:00
.github Update bug report template (#954) 2020-07-14 23:21:13 +01:00
.idea/copyright Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
bootstrap Fix Skin Caching and Fix Skin Restorer (#680) 2020-08-07 12:33:21 -04:00
common Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
connector Fix Skin Caching and Fix Skin Restorer (#680) 2020-08-07 12:33:21 -04:00
screenshots Add more screenshots 2020-03-04 21:26:27 -06:00
.gitignore Fix Skin Caching and Fix Skin Restorer (#680) 2020-08-07 12:33:21 -04:00
.gitmodules Don't use 1.16 branch of mappings 2020-07-06 21:54:33 -04:00
CONTRIBUTING.md Update CONTRIBUTING.md (#940) 2020-07-14 17:29:08 -05:00
Jenkinsfile Remove javadoc stage as we no longer have a plugin api 2020-03-04 21:06:21 -06:00
LICENSE Update license headers 2020-01-08 21:05:42 -06:00
licenseheader.txt Update license headers 2020-01-08 21:05:42 -06:00
pom.xml Add the adventure-api maven repo 2020-07-06 23:41:54 +01:00
README.md Add test server to README 2020-07-31 14:57:06 -05:00

Geyser

forthebadge made-with-java

License: MIT Build Status Discord HitCount Crowdin

Geyser is a bridge between Minecraft: Bedrock Edition and Minecraft: Java Edition, closing the gap from those wanting to play true cross-platform.

Geyser is an open collaboration project by CubeCraft Games.

What is Geyser?

Geyser is a proxy, bridging the gap between Minecraft: Bedrock Edition and Minecraft: Java Edition servers. The ultimate goal of this project is to allow Minecraft: Bedrock Edition users to join Minecraft: Java Edition servers as seamlessly as possible. Please note, this project is still a work in progress and should not be used on production. Expect bugs!

Special thanks to the DragonProxy project for being a trailblazer in protocol translation and for all the team members who have now joined us here!

Currently supporting Minecraft Bedrock v1.16.0/1 and Minecraft Java v1.16.1.

Setting Up

Take a look here for how to set up Geyser.

YouTube Video

What's Left to be Added/Fixed

  • The Following Inventories
    • Enchantment Table
    • Beacon
    • Cartography Table
    • Stonecutter
  • Some Entity Flags

Compiling

  1. Clone the repo to your computer
  2. Install Maven
  3. Navigate to the Geyser root directory and run git submodule update --init --recursive. This downloads all the needed submodules for Geyser and is a crucial step in this process.
  4. Run mvn clean install and locate to the target folder.

Contributing

Any contributions are appreciated. Please feel free to reach out to us on Discord if you're interested in helping out with Geyser.

Libraries Used: