Commit Graph

168 Commits

Author SHA1 Message Date
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
Camotoy 045c0e0637
Introduce CommandSender.getLocale() (#1431)
* Introduce CommandSender.getLocale()

This allows Geyser-specific commands (e.g. `/geyser help`) to be displayed in the (Java or Bedrock) player's default language, which stops those commands from simply being displayed in the default locale.

* Tweak Javadoc

* Set CommandManager's GeyserConnector to final

* Clean up
2020-10-29 18:30:52 -04:00
Camotoy 1b00eaca4a
Set AuthType in Metrics to lowercase (#1395) 2020-10-12 21:28:54 -04:00
Luke 3f7120d9da
Add player device OS to metrics (#1391)
* Add player device os to metrics

* Add player version, Geyser version, and default locale

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-10-12 21:17:15 -04:00
Camotoy 172a5a6db8
Add Fabric as a platform type (#1376)
* PlatformType: Add Fabric as a platform

* Don't use XML reflections on Fabric
2020-10-07 18:51:36 -04:00
Tim203 f8939ca5de
Updated to latest Geyser 2020-09-19 14:45:36 +02:00
Tim203 5b317ec595
Merge remote-tracking branch 'origin/master' into floodgate-2.0
# Conflicts:
#	bootstrap/bungeecord/src/main/java/org/geysermc/platform/bungeecord/GeyserBungeeConfiguration.java
#	bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotConfiguration.java
#	connector/src/main/java/org/geysermc/connector/GeyserConnector.java
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
2020-09-19 14:40:12 +02:00
Tim203 7fbc401dfa
Added RawSkins, Toppings and renamed the Floodgate plugin name 2020-09-19 14:21:54 +02: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
Tim203 bb20b14e4c
Merge remote-tracking branch 'fork/floodgate-2.0' into floodgate-2.0
# Conflicts:
#	common/src/main/java/org/geysermc/floodgate/util/BedrockData.java
#	common/src/main/java/org/geysermc/floodgate/util/EncryptionUtil.java
#	connector/src/main/java/org/geysermc/connector/GeyserConnector.java
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
2020-09-12 15:57:16 +02:00
Tim203 2997760521
Switch Floodgate encryption from RSA to AES 2020-09-12 15:29:18 +02:00
rtm516 79bf56a75c
Tweaks to support Android (#1206)
* Downgrade reflections to 0.9.11

* Add comment explaining downgrade

* Move to pre-build reflections

* Update skins to use https and relative cache dir

* Move to https OptiFine cape url

* Add javadoc to isProduction

* Add ANDROID as a platform type

* Re-ordered PlatformType

* Change stop command to call onDisable
2020-08-28 19:36:24 +01:00
Camotoy c1a70c7754
Translate client-computed recipes (#1181)
* Translate client-computed recipes

A handful of recipes are complex enough on Java Edition that the client simply calculates them after getting an assurance that they are valid recipes. This PR stores those recipes in a Bedrock-compatible format in mappings, then generates the CraftingData information on startup to send to the Bedrock client when called. This fixes firework rocket and star crafting, and fixes leather armor and shulker box dyeing.

The recipe information for everything except leather armor was taken right from the Bedrock server. The leather armor had to be created separately (see https://github.com/DoctorMacc/LeatherDyeingCreation). There will be a slight visual difference in the crafting result preview if the armor is not perfectly dyed to one of the sixteen colors, but this is a visual issue that will persist unless we calculate every single possbile combination.

* Revert other changes

* Register shulker box recipes properly

* Add break

* Update mappings
2020-08-24 21:14:44 -05:00
E404NNF 1d5b453595
Add a warning at start about movement translation (#1069)
Co-authored-by: Redned <redned235@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-08-23 11:34:09 -04:00
Camotoy 94d6c872b1
Prevent a comma from appearing if Geyser fails to bind (#1174) 2020-08-21 12:01:50 -05: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
DoctorMacc 6ccf629a8a
Update to 1.16.2-rc2; add multiversion support 2020-08-11 10:00:14 -04:00
DoctorMacc 009381d9c7
Update for protocol v409 2020-08-11 09:06:28 -04:00
DoctorMacc e8df81167b
Merge latest master 2020-08-05 11:20:25 -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
DoctorMacc 43c062c23c
Update to latest master 2020-07-29 16:25:42 -04:00
Camotoy f5e78371be
Hide stack trace if an SRV record is unable to be found. (#1046) 2020-07-28 17:47:08 -05:00
Camotoy 5c2a225533
Check for null when looking for SRV (#1025) 2020-07-25 17:21:13 -05:00
Phillipp W af484a425b
SRV resolving / Small Handshake rework (#968)
Handshake now uses the server address directly from the config and no longer the IP from a domain (Some servers use the address that is given during the handshake)
2020-07-25 13:42:43 -04:00
DoctorMacc ae77388b2e
Allow compilation; update GeyserConnector 2020-07-24 10:45:36 -04:00
DoctorMacc 3b8d1758b3
Initial update for 20w29a 2020-07-20 19:02:18 -04:00
rtm516 225e2a9fb8
Make a copy of the players list when disconnecting them all on shutdown (#928) 2020-07-10 09:43:30 -05:00
Camotoy cbb2586fba
Don't throw a stack trace when detecting for GUI (#919) 2020-07-08 18:44:10 -04:00
AJ Ferguson 50176e10a8 Fix inabilty to place items into brewing stand 2020-07-06 23:44:39 -08:00
RednedEpic 24f9651cc6 Convert map of players to list (may address #833) 2020-07-06 20:11:34 -05:00
rtm516 cfaf4051b7
Add Translation support (#504)
Adds full multi-language support to any Bedrock-supported language.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-07-05 19:35:51 -04:00
rtm516 61072948b9 Add GUI to standalone 2020-07-02 20:10:43 -04:00
Tim203 8f763dfc5f
Move common stuff used only by connector and bootstrap to connector 2020-06-28 00:27:00 +02:00
DoctorMacc 3ea1059a62 Update for 1.16 2020-06-23 09:34:12 -04:00
DoctorMacc 0471fa89f4 Bedrock 1.16 updating part 2 (Doesn't work) 2020-06-22 21:21:42 -04:00
DoctorMacc ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -04:00
rtm516 5eb7c9d1dc
Add a setter to the auth type to allow for changing at runtime (#784)
This is mainly for GeyserConnect but may be useful in other cases
2020-06-19 08:50:10 -04:00
Camotoy 34b367bfc3
Configuration updates (#653)
* Configuration updates

The main feature of this commit is switching Bukkit and BungeeCord to using Jackson configuration. This allows comments to load. Along with this, the Jackson configs have been consolidated into one abstract class, and a check is made to ensure auth-type cannot be set to Floodgate if Floodgate is not installed.

* Add deleted file; remove imports

* Re-add changing of Bukkit port

* Alphabetize import

* Alphabetize Bungee import

* Updates

* Swap values in GeyserJacksonConfiguration

* Add a null check for GeyserConnector in Bukkit's onDisable
2020-06-10 17:58:29 -05:00
RednedEpic 6b68bbb413 Large refactoring to item translator and registry/util classes
- Merged ItemTranslator and ItemStackTranslator together.
- Split ItemTranslator into two classes: ItemTranslator and ItemRegistry. The registry is where items are registered, and the translator class is where item translation takes place.
- Made most of ItemTranslator's methods static and removed the initialization in Toolbox.
- Moved a handful of registry classes previously ending with 'Utils' to a 'Registry' class to be more fitting for the term.
- Moved inventory and block entity registration out of Translators.
- Renamed Translators to PacketTranslatorRegistry.
- Yeeted Toolbox.
- Minor cleanups and small refactors.
2020-05-24 20:07:05 -05:00
Camotoy 99f69b3a7d
Rewrite Ping Passthrough (#468)
* Fix ping passthrough on BungeeCord

* Initial implementation of direct ping passthrough

* Finished implementation of direct ping passthrough

* Remove test for something else entirely

* Fix standalone

* Add config option for ping passthrough interval

* Use GeyserPingInfo to reduce methods

* Add querying; modify ping passthrough

* Add separate config options for passthrough MOTD and player counts

* Convert all plugin bootstraps to use internal ping events to that other plugins can handle ping modifications

* Small changes

* Fix invalid packet spawm

* Add legacy ping passthrough option

* Fix BungeeCord

* Proper UUID for BungeeCord, thanks @theminecoder

* Update config version and messages

* Merge master... again

* Add missing javadocs and minor changes

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
Co-authored-by: theminecoder <theminecoder.dev@gmail.com>
Co-authored-by: Redned <redned235@gmail.com>
2020-05-23 16:50:04 -05:00
Camotoy 1664221fa9
Add optional workaround for >Y128 Nether building (#615)
* Add optional workaround for >Y128 Nether building

This commit adds a config option for building above the Nether by changing the Nether's dimension ID to match the End's.

* Only check for workaround application once

* Fix mappings?

* Include a bit more for the above bedrock nether building config option

Co-authored-by: Redned <redned235@gmail.com>
2020-05-23 16:02:51 -05:00
rtm516 c0f678a8af
Added a docker container IP warning (#584)
* Added a docker container IP warning

* Corrected messages

* Moved to normal java file read instead of starting cat

* Fixed capitalisation on method name
2020-05-18 22:27:35 -05:00
rtm516 129e10c920
Added automatic git version infomation to startup (#327)
* Added automatic git version infomation to startup

* Moved to compile time replacement

* Cleaned up old functions

* Removed redundant variable

* Added project version to version string
2020-05-04 14:17:25 -05:00
RednedEpic 31be608038 Add block break sounds for blocks with 0 hardness, and refactor some things
The refactors in this commit go a bit beyond the scope of what the sound/effects branch was meant to accomplish, however most of these changes are necessary so chunk caching could be reintroduced for the standalone version. The chunk caching here allows for us to get the block ID before the block was broken, and in the future allow us to implement newer features. Chunk caching is optional (and disabled by default) as on non-Bukkit versions, it can eat up a lot of RAM with many players online.
2020-04-29 15:01:53 -05:00
Redned 7ca1d1bea6
Merge pull request #398 from GeyserMC/inventory
Merges branch 'inventory' into master
2020-04-22 00:49:48 -05:00
RednedEpic bab2b4a420 Pull command descriptions from Bukkit and Sponge versions when listing commands
This allows the description of the commands to display when listing the commands in bedrock by tab-completing. This is currently only available on Sponge and Bukkit versions as there is no support in BungeeCord and Velocity to get these values. This data is also not sent in any packet, so we cannot retrieve that from standalone either.
2020-04-19 18:08:14 -05:00
RednedEpic 4b001593fc Merge branch 'master' into inventory 2020-04-17 18:37:22 -05:00
rtm516 03f8074619 Update Protocol to v390 2020-04-17 17:38:18 +01:00
DoctorMacc 204035323b Update everything else 2020-04-17 12:34:09 -04:00
rtm516 b43a3e9abd Fixed players not getting removed from the players map on disconnect 2020-04-09 15:26:14 +01:00
rtm516 8e1b5de4b0
Merge branch 'master' into shutdown-fix 2020-04-08 01:07:12 +01:00
rtm516 70975a1d36 Updated player count for ade40d5 2020-04-08 01:03:25 +01:00
Redned ade40d5a8b
Only add the player to the players map once 2020-04-07 18:54:58 -05:00
rtm516 41e0de4484 Cleaned up language 2020-04-06 14:35:18 +01:00
rtm516 c114f49e84 Fixed player count and removed debug code 2020-04-06 14:34:45 +01:00
rtm516 d4fa651427 Made the server kick all players before we shutdown and close the window when we finish on standalone. 2020-04-06 14:33:36 +01:00
Ender 13a58dc825 Begin making translators annotation based
Also, rename TranslatorsInit to Translators; makes alot more sense.
2020-03-23 23:03:33 -05:00
RednedEpic 21dc2e8362 Add Geyser reload command and commands for platforms (Closes #141) 2020-03-17 11:43:09 -05:00
RednedEpic 52b23950ea Merge branch 'master' into plugin (should fix building) 2020-01-18 16:46:07 -06:00
RednedEpic dc594ee22c Update license headers
Certain headers for classes that are to be removed (e.g. plugin api) were not updated to prevent merge conflicts.
2020-01-08 21:05:42 -06:00
RednedEpic 2fc591e341 Merge Floodgate changes 2020-01-03 23:58:58 -06:00
RednedEpic 0c24ffc629 Merge branch 'master' into plugin 2020-01-03 23:25:00 -06:00
LegacyGamerHD 1f7b8ba5d5 Update Nukkit Protocol Library to 1.14 (#117)
* Update nukkit protocolib to 1.14

* Fixes

* Remove debug
2019-12-23 11:47:31 -06:00
RednedEpic b70edac3cc Update Geyser help command message on startup 2019-12-21 16:19:32 -06:00
RednedEpic 1fbbb87689 Add PlatformType enum and add bStats platform chart 2019-12-21 11:53:19 -06:00
RednedEpic 0960ab2365 Close bedrock server upon shutdown 2019-12-21 11:38:45 -06:00
RednedEpic e38322a3ec Nuke plugin API
https://media.giphy.com/media/oe33xf3B50fsc/giphy.gif
2019-12-21 11:35:48 -06:00
RednedEpic d062e36fae Merge branch 'master' into plugin 2019-12-21 10:05:21 -06:00
RednedEpic f0e02aad32 Initial 1.14 Bedrock support 2019-12-10 19:06:18 -06:00
RednedEpic 3e7e34dfb9 Move command reader into standalone module 2019-12-01 18:28:36 -06:00
RednedEpic 1c2ef99a54 Separate bootstrap and allow for Geyser to run on Bukkit (Addresses #54) 2019-12-01 15:16:52 -06:00
Tim203 f1b19fc04e Little changes 2019-11-30 19:10:29 +01:00
Tim203 1c48279a9f Little changes 2019-11-30 18:38:09 +01:00
Tim203 7d645fbf16 First Flootgate commit 2019-11-30 13:34:45 +01:00
RednedEpic 98cb8f406d Suppress "could not submit stats" warning
This error usually means nothing (as said by Bastian himself) and it can be ignored. This does not appear to cause issues with displaying information on bStats itself.
2019-11-28 20:54:47 -06:00
Redned 7a4621cf51
Fix 'version' typo in startup message 2019-11-27 22:33:45 -06:00
RednedEpic cfdaacf017 Minor cleanup 2019-11-12 22:28:47 -06:00
RednedEpic 90e6ebc1be More work on 1.13 2019-11-05 18:55:59 -06:00
Redned 5fee344743 Fix block palette 2019-11-02 15:50:04 -05:00
RednedEpic 9b7fe5c879 Remove init method from previous testing 2019-10-30 21:27:34 -05:00
RednedEpic 0e2f64b95a Start on 1.13 changes (not functional yet)
Cached palette still needs fixing, therefore this build actually does nothing yet.
2019-10-30 21:14:23 -05:00
RednedEpic 7571df9903 Attempt to reduce memory usage and fix not being disconnected from Java 2019-10-16 13:55:05 -05:00
RednedEpic a125967ec3 Implement new remapper 2019-10-09 19:11:50 -05:00
EOT3000 da0c59446f Try fixing block break (didn't work). Also add more metrics 2019-09-30 12:44:25 -04:00
Nicolas Znamenski 1d4837f5e0 Finished moving thread pool size to config 2019-09-22 18:15:27 -04:00
Nicolas Znamenski 550d94c4c3 Changed the thread pool size to be part of the config. 2019-09-22 18:08:12 -04:00
RednedEpic 0bcf4aa7ec Fix metrics, remove JSONSimple dependency 2019-09-21 11:00:13 -05:00
Redned 5d87b7ccab Cleanup startup messages 2019-09-15 18:46:05 -05:00
Tim203 0690b30c02 Made logging a bit more useful 2019-09-15 09:57:02 +02:00
EOT3000 3f45b21689 Block changes work (again) 2019-09-14 19:21:55 -04:00
SupremeMortal ab55050d11
Close remote java connection when bedrock player leaves. 2019-09-13 14:37:31 +01:00
EOT3000 59e0aff289 Hybrid mode start + try fixing chunks (hashcodes, etc.) 2019-09-11 16:28:48 -04:00
RednedEpic bd8a00b5eb Merge branch 'master' into chunks 2019-08-30 16:56:34 -05:00
RednedEpic 1c1785ac51 Start work on chunks
- There are probably many errors and issues with this code (some dumb ones probably). As of right now it crashes the client.
2019-08-30 16:47:33 -05:00
RednedEpic b611f8facb Rewrite remapper 2019-08-09 22:16:34 -05:00
RednedEpic 7dae4cbd0f Fix NPE for items with missing mappings (Closes #24) 2019-08-09 16:09:47 -05:00
EOT3000 c621ead6d9 fix things 2019-08-08 21:50:29 -04:00
RednedEpic ba21acc9c8 Cleanup adding/removing players 2019-08-08 20:42:55 -05:00
EOT3000 202e3e584c new remapper (: 2019-08-05 21:59:54 -04:00
Blue Kelp f62aa390d2 support auto-login of configured users
- fall back to window/form prompt if user is not configured
2019-08-02 13:15:32 -07:00