Commit Graph

75 Commits

Author SHA1 Message Date
RednedEpic 0b5009b415 The Great Refactor Part 1 - connector -> core 2021-11-20 13:56:40 -06:00
Camotoy 393c2b0f91
Handle chunks on the player thread 2021-11-13 11:04:12 -05:00
Camotoy dc5edc0a2c
Remove 1.17.10 support; extended world height is always enabled 2021-11-12 09:42:35 -05:00
Cybornut 4503991d37
Added a couple of comments in config.yml for clarification (#2544)
* Update config.yml

Added commented clarifications on:
1. "remote: address: auto"
2. "remote: auth-type: online"

May need formatting checks to conform with correct annotation

* Update config.yml
2021-09-27 21:51:50 -05:00
TheFloyds4240 e13643d040
Update config.yml (#2522) 2021-09-12 14:32:58 -05:00
Camotoy 52ad5c37ee
Uncomment MTU in config
It doesn't change anything if uncommented and just serves to confuse people.
2021-09-08 13:46:46 -04:00
Camotoy a197f60446
Move use-direct-adapters to system property 2021-07-31 13:54:51 -04:00
Camotoy 002be32bb3
Connect Geyser players directly to the server for plugin versions (#2413)
- 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>
2021-07-31 12:52:49 -04:00
Camotoy 8e593a55a3
Adjust language strings for new options 2021-07-16 20:06:09 -04:00
Camotoy c7d4130a44
Start of extended world height support 2021-07-13 20:48:45 -04:00
Tim203 1ded2086e3
Merge remote-tracking branch 'origin/floodgate-2.0' into feature/1.17
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/UpstreamPacketHandler.java
2021-06-06 01:16:57 +02:00
Camotoy ebf726ce9e
Yeet cache chunks
So many features require this config option, and we don't intend on supporting it being both disabled and enabled.
2021-06-01 15:36:33 -04:00
Tim203 3b9674ac29
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/dump/BootstrapDumpInfo.java
#	connector/src/main/java/org/geysermc/connector/dump/DumpInfo.java
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/translators/java/JavaJoinGameTranslator.java
#	connector/src/main/java/org/geysermc/connector/utils/SettingsUtils.java
2021-05-01 12:16:25 +02:00
Camotoy 48fcb4733d
Add emote offhand workaround (#2163)
This commit add a new config option, `emote-offhand-workaround`. If set to a value, emoting will perform the offhand swap action.
2021-04-26 16:10:32 -04:00
rtm516 f0a002f0e3
Add option to forward the connection hostname over to the remote server (#2149)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-04-21 14:55:08 -04:00
Tim203 085c122d30
Merge remote-tracking branch 'origin/master' into floodgate-2.0 2021-04-21 19:49:49 +02:00
Camotoy bb41c0f9ee
Add an option for setting Bedrock compression level (#2128) 2021-04-19 22:18:18 -04:00
Camotoy 0a1c51bdad
Merge branch 'master' of https://github.com/GeyserMC/Geyser into floodgate-2.0 2021-04-06 00:52:09 -04:00
ImDaBigBoss fb18a6493a
Add an option for actionbar hit cooldown (#2006)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-04-01 00:06:01 -04:00
Camotoy 2f42a4c630
Add furnace minecart item translation (#2003)
Conveniently enough, the minecart furnace icon still exists in the vanilla Bedrock Edition game (thanks to Kastle for this discovery). With this and the translation string still being present, we can add the item into the game with only minor issues.
2021-03-31 14:06:05 -04:00
Tim203 c16c66b860
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	connector/pom.xml
#	connector/src/main/java/org/geysermc/connector/GeyserConnector.java
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockNetworkStackLatencyTranslator.java
#	connector/src/main/java/org/geysermc/connector/skin/SkinProvider.java
#	connector/src/main/java/org/geysermc/connector/utils/SettingsUtils.java
2021-02-25 02:28:48 +01:00
Mark Vainomaa c4573bb73d
HAProxy PROXY protocol support for upstream connections (#1713)
* Ignore unknown properties on configuration subclasses

* Implement upstream PROXY protocol support
2021-02-17 18:25:41 -05:00
Camotoy 1f1d94aa81
Don't allow the sub-MOTD to be empty (#1933)
As of 1.16.210.59, the sub-MOTD cannot be blank: https://bugs.mojang.com/browse/MCPE-117979

This workaround will be implemented now so the widest range of Geyser versions will properly show a ping in 1.16.210 - better an 'outdated server' message than 'unable to connect to world.'
2021-02-15 21:41:11 -05:00
Camotoy b16e1d6b43
Threading and ping improvements (#1870)
- Don't schedule for setting jumping on and off if cache chunks is enabled, since we don't need to know that
- Add a new setting to disable player ping forwarding. Hopefully this helps with timeouts.
2021-02-10 12:18:31 -05:00
Tim203 5ad2510b87
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/command/defaults/SettingsCommand.java
#	connector/src/main/java/org/geysermc/connector/network/UpstreamPacketHandler.java
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/session/cache/WindowCache.java
#	connector/src/main/java/org/geysermc/connector/utils/LoginEncryptionUtils.java
#	connector/src/main/java/org/geysermc/connector/utils/StatisticsUtils.java
2021-02-01 12:02:49 +01:00
rtm516 1c0cc4622a
Microsoft account authentication (#1808)
Microsoft accounts can now use Geyser, while maintaining full backwards compatibility with Mojang accounts.

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-01-11 15:52:02 -05:00
Camotoy 999fa7298a
Clarify proxy protocol config message (#1824) 2021-01-10 20:01:04 -05:00
Camotoy 7cefb5713e
Clarify that enabling Xbox achievements blocks all commands (#1810) 2021-01-07 16:50:57 -05:00
Tim203 5ad495ce97
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	common/src/main/java/org/geysermc/common/window/CustomFormBuilder.java
#	common/src/main/java/org/geysermc/common/window/CustomFormWindow.java
#	common/src/main/java/org/geysermc/common/window/FormWindow.java
#	common/src/main/java/org/geysermc/common/window/ModalFormWindow.java
#	common/src/main/java/org/geysermc/common/window/SimpleFormWindow.java
#	common/src/main/java/org/geysermc/common/window/button/FormButton.java
#	common/src/main/java/org/geysermc/common/window/button/FormImage.java
#	common/src/main/java/org/geysermc/common/window/component/DropdownComponent.java
#	common/src/main/java/org/geysermc/common/window/component/InputComponent.java
#	common/src/main/java/org/geysermc/common/window/component/SliderComponent.java
#	common/src/main/java/org/geysermc/common/window/component/StepSliderComponent.java
#	common/src/main/java/org/geysermc/common/window/component/ToggleComponent.java
#	common/src/main/java/org/geysermc/common/window/response/CustomFormResponse.java
#	common/src/main/java/org/geysermc/common/window/response/ModalFormResponse.java
#	common/src/main/java/org/geysermc/common/window/response/SimpleFormResponse.java
#	common/src/main/java/org/geysermc/floodgate/util/EncryptionUtil.java
#	connector/src/main/java/org/geysermc/connector/network/session/cache/WindowCache.java
2021-01-04 13:37:58 +01:00
Mark c67d91943c
HAProxy PROXY protocol support for downstream connections (#1688)
* Implement downstream PROXY protocol support

* Clarify the configuration version updating procedure

* Bump netty-resolver-dns to 4.1.56.Final

* Update Netty to .56

* Don't increase jar size by 2MB

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2020-12-23 20:47:29 -05:00
Tim203 cd13e03730
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockNetworkStackLatencyTranslator.java
#	connector/src/main/java/org/geysermc/connector/network/translators/java/JavaJoinGameTranslator.java
#	connector/src/main/java/org/geysermc/connector/utils/SettingsUtils.java
2020-12-15 22:06:59 +01:00
Kooldude183 39a11da7e5
Fix resource pack description in config (#1649) 2020-12-10 22:13:54 +00:00
Camotoy 87c52ad524
Add a config option for toggling showing coordinates (#1645) 2020-12-10 11:13:36 -05:00
OnlyBMan 2c0f3ec84d
Custom skull block support (#683)
Custom skulls are now implemented within the world when placed as a block. This is achieved by placing a fake player entity in the same spot.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: bundabrg <brendan@grieve.com.au>
Co-authored-by: bundabrg <bundabrg@grieve.com.au>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-12-04 16:55:24 -05:00
circuit10 a70d3e2150
Fix inconsistencies with movement and position (#699)
Movement is now significant better, especially on slabs, stairs, and other half-blocks.

Co-authored-by: RednedEpic <redned235@gmail.com>
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: Tim203 <mctim203@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-11-20 14:56:39 -05:00
Tim203 b8f398aa3c
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/GeyserConnector.java
#	connector/src/main/java/org/geysermc/connector/network/translators/java/JavaJoinGameTranslator.java
2020-11-18 19:45:25 +01:00
rtm516 a6cc28ee80
Add config option for enabling achievements (#1504)
* Add config option for enabling achievements

* Disabled achievements by default and added warning about commands being disabled

* Update config.yml

* Rename achievements-enabled to xbox-achievements-enabled for clarity

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-11-07 00:52:09 +00:00
Tim203 36419e5931
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	common/src/main/java/org/geysermc/common/window/CustomFormWindow.java
#	common/src/main/java/org/geysermc/common/window/SimpleFormWindow.java
#	connector/src/main/java/org/geysermc/connector/network/UpstreamPacketHandler.java
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/utils/LoginEncryptionUtils.java
#	connector/src/main/java/org/geysermc/connector/utils/SettingsUtils.java
2020-10-30 01:25:52 +01:00
Redned 62d984da61
Make userAuths information more clear 2020-10-19 20:56:01 -05:00
DoctorMacc d75169392b
Small consistency fixes 2020-09-27 21:08:31 -04:00
rtm516 99e72f35b3
Add support for manually supplying Bedrock resource packs (#1076)
* send resource packs

A lot of this code is nukkit-credits in the classes

* send resource packs

A lot of this code is nukkit-credits in the classes

* Remove unnecessary code/debugs

* use separately generated hashes

* Updated mappings and added .mcpack support

* "packs" directory auto-create (#484)

* "packs" directory auto-create

* cleaned indentation in ResourcePack.java

* Cleaned ResourcePack.java

* Another cleanup

I hate editor on github.

* Yet another

* Another indentation cleanup

* Fix resource pack loading

(cherry picked from commit f93b07491e)

* Move back to internal sha256 hashing

(cherry picked from commit 812a3d82b2)

* Add resource pack loading back after merge

* Add comments, config option and removed unused files

* Fix packs folder location and cleanup code

* Move to better options for the client

* Fix typos in comments

* Fix pack loading

* Try to make it compile

* Final touches?

* Add Javadoc for MathUtils#constrain

Co-authored-by: EOT3000 <43685885+EOT3000@users.noreply.github.com>
Co-authored-by: Vesek <61123478+Vesek@users.noreply.github.com>
Co-authored-by: Heath123 <heath.mitchell27@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-09-16 20:08:26 -04:00
Comstepr b97bf56d99
Minor changes to config.yml (#1224) 2020-09-01 23:37:49 -05:00
Tim203 1c84993853
Scoreboard improvements (#1166)
* Added a way to check if debug logging is enabled

* Improved scoreboard performance

* Include Teams in pps and return pending pps instead when higher then pps

Some servers have a huge amount of score packets when the player logs in, but before this commit, only after the first high pps (packets per second) the ScoreboardUpdater will be used (after pending packets per second have been moved to packets per second). But this commit fixes that the ScoreboardUpdater can be used on the second that the pps is getting high.

* Fixed team pre + suffix "null" issue and added threshold config option

Fixed team pre + suffix "null" issue.
When the prefix and/or suffix of a Team is null, "null" will be returned instead of null (Due to the way that MCProtocolLib is made and designed). This is fixed by simply checking if the prefix and/or suffix equal "null" and if that is the case, replace it with "".

Added threshold option.
Gave the person who is running Geyser an option to specify the first Scoreboard packets per second threshold to further improve performance by lowering the setting or decrease performance by relaxing the setting a bit. The value can't be higher then 250 (the second threshold), because it'll always choose the lowest threshold.

* Forgot to bump config version

* Small changes

* Reverted version bump, changed Sponge config, changed FloodgateKeyLoader

Reverted version bump
Camotoy said that you only need to bump the config version if the change is breaking, the config version bump has been reverted.

Changed Sponge config
The Sponge config has been modified to look like the other platform configurations.

Changed FloodgateKeyLoader

* Changed default-locale and (remote) address as requested by Camotoy

* Reduce bandwidth and a few final tweaks

* Made the scoreboard-packet-threshold a bit higher due to improvements
2020-08-28 10:47:52 -05:00
James Cahill 81f58ee9bf
Add Server Name config option (#1170)
* Add bedrock.server-name config option

* Fix spelling mistake oops!

* Remove trailing whitespace
2020-08-25 09:29:55 -04:00
James Cahill e7363b4e9f
Add 'passthrough-protocol-name' config option (#1124)
* Initial version (tested)

* Don't bump config version

* Misc changes

* Add punctuation to config
2020-08-17 22:36:15 -05:00
Camotoy 8c514d9feb
Fix Xbox authentication and add support for proxies (#1162)
Waterdog and ProxyPass will work when `enable-proxy-connections` is set to true at the expense of security.
2020-08-17 12:04:09 -04:00
R-Josef 0e91475c62
Follows specified address/port in remote config for plugin versions: fix #1110 (#1145)
* fix #1110

* updating comments in config.yml

* Fix indentation

* Centralize localhost retrieval; remove unnecessary Docker check

* Add config.yml

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-08-16 12:45:52 -05:00
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
Camotoy 7fc14d8956
Add customizable MTU support (#1068)
* Add customizable MTU support

Fixes clients being unable to connect in rare instances.

* Make config.yml nicer
2020-07-31 19:47:23 -04:00
toinouH 427cb69a14
clone-remote-port option Updated (#1061)
* Added clone remote port option for bukkit, bungee and velocity

* Added clone remote port option for sponge

* Changed clone-remote-port description in config.yml

* Update config.yml

Updated config.yml to include a better description of the clone-remote-port option

* Updated GeyserSpongePlugin

An incorrect port was being edited before (remote instead of bedrock)

* Update config.yml

Co-authored-by: TeaNoDonuts <blackalegator@gmail.com>
2020-07-30 15:09:40 -05:00