Commit graph

161 commits

Author SHA1 Message Date
Kas-tle
2471de100b
Add system property Geyser.RakSendCookie to allow disabling cookie send (#4598) 2024-04-24 06:56:15 -07:00
Kas-tle
3bd5ab7f35
Use old SetEntityMotionSerializer for codec < 662 (#4593) 2024-04-23 11:23:09 -07:00
Camotoy
d706e9e70f
Serialize disconnects 2024-04-23 12:34:24 -04:00
Kas-tle
3fa7952936
1.20.80 Support and Protocol Changes (#4561)
* Make evil more harder

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Deregister more unused packets

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Add more unused packets

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Pin protocol to 68dc192

* Correction

* Update Protocol

* More kicking

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* stop reading when there is no item to read (#9)

* Bump protocol

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* 1.20.80

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Remove unused postinitchannel GeyserServerInitializer

* Pull protocol jitpack from cloudburst again

* Actually builds

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Bump protocol to fix BossEventPacket & EmotePacket

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Add remove before merge comment

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Bump protocol to fix BlockEntityDataPacket and ignore serverbound BossEventPacket

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Bump protocol & add more illegal/ignored packets

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Remove deprecated packet

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Ignore ClientCacheStatusPacket instead of disallow

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Define static serializers

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Less static class nonsense more correct order

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Remove unused import

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Bump protocol

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Move codec processing to CodecProcessor

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Falsify recipe symetry assumption

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Update Protocol for 2 wrong packet IDs & 5 wrong directions

* Jitpack protocol from Geyser repo

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
Co-authored-by: chris <github@onechris.mozmail.com>
2024-04-23 09:16:18 -07:00
chris
94f664ad8d
Fix: Properly check whether the so_reuseport socket option is available (#4579)
* Try to properly check if so_reuseport is available

* io_uring "support"

* comment out io_uring, for now

* Make IO_uring opt-in via `-DGeyser.io_uring=true` flag

* dont include io_uring

* oops - bungee 

editing on mobile is hard

* oops - spigot

* oops - velocity

* properly exclude all io_uring on all platforms except standalone

---------

Co-authored-by: Kas-tle <26531652+Kas-tle@users.noreply.github.com>
2024-04-19 11:50:40 +02:00
Kas-tle
5151c25e1a
Support RakNet Cookies (#4554)
* Support cookies

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Use cloudburst upstream raknet

* Comment out mavenLocal()

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-04-16 20:52:46 -07:00
Camotoy
fa2e4e5a94
Reduce processing for incoming TrimDataPackets 2024-04-07 22:44:58 -04:00
Denys Loshkarev
3d9f3ac645
Show 1.20.73 as being supported (#4543)
* update version supported by plugin

* Update README.md
2024-04-07 01:12:56 +03:00
Kas-tle
08aa5282d4
Ensure proxiedAddresses is not null before lookup (#4539) 2024-04-01 15:50:58 -07:00
Sage
fa441f1c7b
Add ConnectionRequestEvent (#4533)
* Add ConnectionRequestEvent and implement it

* Add debug message and use InetSocketAddress instead of string

* Provide both proxy and real client ip

And add some minor javadocs

* Make ProxyIp nullable

* Apply changes from pr

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

* Apply changes from pr

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

* Apply changes from pr

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

* Bump API version

* Dont JiJ common on mod platforms

---------

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
Co-authored-by: Kas-tle <26531652+Kas-tle@users.noreply.github.com>
2024-04-01 14:33:12 -07:00
Kas-tle
c9ca4c82f7
Allow configuration of RakNet limits (#4532)
* Allow configuration of RakNet limits

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Validate packet limiter system properties

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-03-31 21:42:31 -07:00
CloudyOrk
c64e8afcce
Indicate existing 1.20.72 support (#4515)
* update supported version

* Update GameProtocol.java

* Update GameProtocol.java

---------

Co-authored-by: Kas-tle <26531652+Kas-tle@users.noreply.github.com>
2024-03-22 12:03:17 -07:00
chris
c3d4277ae6
More error-robust kernel version parsing (#4496)
* should resolve https://github.com/GeyserMC/Geyser/issues/4492

* Use regex to parse version

* yeet debug

* Only log the throwable message
2024-03-15 13:52:34 +01:00
Kas-tle
7e4d97f6e1
Fix wooden slabs (#4489)
* Fix wooden slabs

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Update submodule

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Also indicate 1.20.71 support

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-03-13 02:05:41 -07:00
Kas-tle
1df63c6de8
Support Bedrock 1.20.70 (#4477)
* Support 1.20.70

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Update readme

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Use 1.20.70 mappings

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Creative lectern drops work but not survival yet

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Fix lectern book pickup in survival

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Add copyright notices to new files

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Temp fix for incorrect creative_items from Cloudburst/Data

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Fix item frame breaking in creative

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Clarify what to remove when 1.20.60 support is dropped

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Don't use dim change enum pre 1.20.70

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-03-11 00:29:27 -07:00
chris
6a51d8298f
Feature: Rework startup logic (#4377)
* This makes `geyser reload` work the same across all platforms. For example, it ensures that we reload the config to the greatest extent possible (with the exception of compression/injection settings). Additionally, this clears up issues where Extensions were previously disabled during reloading - instead, the new Pre and Post reload events allow extensions to reload whatever necessary on their own.
2024-02-14 12:50:50 +01:00
chris
19a3dc3c4b
Support Bedrock 1.20.60 (#4415)
* Start on 1.20.60 support

* fix dimension switching

* Fix custom item icons... thanks mojang

* fix custom blocks/custom skulls breaking all block mappings

* - replace 10000 with static final variable

* fix: creative items not being found

* versioned custom item registration

* fix compression level setting
* show 1.20.61 as supported
2024-02-06 20:11:17 +01:00
千飞夏
226a4bb151
Use multiple channels at startup, fix the occasional issue of all pla… (#4329)
* Use multiple channels at startup, fix the occasional issue of all players getting disconnected.

* Standardized shutdown periods and refactored network handlers for improved consistency.

* tiny fix

* Let's use the system property

---------

Co-authored-by: chris <github@onechris.mozmail.com>
2024-02-02 16:25:50 +01:00
chris
f555dc0a92
Feature: Camera/Input locking API (#4332)
Adds API methods to control player cameras - including fancy transitions,  color fades, or simple input locks.
2024-01-31 11:21:06 +01:00
chris
61b3ffd0de
Feature: Allow setting a different port in the motd (#4293)
* Allow changing the broadcasted port using a system property. This may be needed if the port Geyser runs on & the port Bedrock players connect on do not match - e.g. due to port forwarding/different routing.

* initial stab at making the broadcast port an (unsafe) config option

* Automatically set broadcast port to be the bind port unless manually overridden

* Warn about broadcast port mismatch

* Use 0 instead of -1 as indicator to broadcast the port geyser is running on
2024-01-24 22:28:03 +01:00
chris
97ba6a25e6
Don't warn if clients send subchunkrequest packets (#4395) 2024-01-24 21:18:09 +01:00
Camotoy
7613bdbafe
Fix https://github.com/GeyserMC/Geyser/issues/4378 2024-01-04 13:49:01 -05:00
Konicai
d3a4b13364 cleanup 2023-12-14 21:31:14 -05:00
Konicai
22009054ab Crafter translation 2023-12-14 21:31:14 -05:00
Konicai
e2062dd182 Reimplement support for 1.20.40 2023-12-14 21:31:14 -05:00
Konicai
701e567818 Enable 1.21 experimental features 2023-12-14 21:31:14 -05:00
Konicai
f38d82c19c Drop <1.20.50 2023-12-14 21:31:14 -05:00
chris
95d65350e4
Project wide syntax/annotation cleanup (#4238)
Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2023-12-05 18:54:42 -05:00
chris
119fbc86bc
Don't send an awkward "null" when a exeption disconnect cause doesn't have a message (#4306)
* Don't send an awkward "null" when a cause doesn't have a message

* Fix accidental regression leading to unhandled "CraftingEventPackets"
2023-11-22 21:03:24 +00:00
chris
44174fdc04
Add 1.20.50 Bedrock support (#4296)
* Start on 1.20.50

* Add 1.20.50 block_palette.1_20_50.nbt, creative_items.1_20_50.json and runtime_item_states.1_20_50.json

* fix stone and planks mappings

* add and do something with the new SetPlayerInventoryOptionsPacket

* Add readme version bump

* Cleanup/Explain the new BedrockSetPlayerInventoryOptionsTranslator
2023-11-21 23:31:56 +01:00
chris
118e769976
Fix issues with empty MOTDs - fallback to configured MOTD (#4259)
* Fix issues with empty MOTDs - fallback to configured MOTD

---------

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2023-11-14 00:33:34 +01:00
Konicai
bb6a1ec40a
Simply pingpassthrough logic, add fabric ping passthrough (#3930)
* Check if PingPassthrough is null
* Remove QueryPacketHandler
* Fabric ping passthrough
2023-11-13 18:17:40 -05:00
chris
9dad1acfe5
Feature: Add recipe unlocking on Bedrock edition (#4016)
* Start on 1.20.10+ recipe unlocking system

* Keeping track of multiple Bedrock recipes to unlock for a single Java recipe

* Unlock stonecutter recipes

* Stonecutter recipes

* Unlock tipped arrows/shulker box recipes even when Java doesnt (why..?), and dont send trims if Java doesn't

* Translate FurnaceDataRecipes

* Revert FurnaceRecipe translation, revert stone cutter recipe identifier caching - Bedrock does not need the smelting recipe, and doesn't (un)lock stonecutter recipes (yet...?)

* Remove debug message

* Make decorated pot crafting just a little bit smoother :p

* formatting

* Use itemTag descriptors to fix https://github.com/GeyserMC/Geyser/issues/3784

* Use hashmap instead to store item tag overrides

* remove unnecessary comment

* Address review by @Konicai

* Support for 1.20.30

* undo add whitespace

* Merge upstream, use FastUtil maps, rename a few methods

* Address Camotoy's review

* Fix formatting
2023-11-10 20:45:15 +01:00
Konicai
8173917623 Merge remote-tracking branch 'upstream/master' into feature/1.20.40 2023-10-24 10:37:28 -04:00
chris
450e3b61fe
Bring back accidentally removed MTU option (#4229) 2023-10-20 20:14:16 +02:00
Konicai
647a73d9f6
Support 1.20.40 connections 2023-10-19 01:11:59 -04:00
chris
7983448ce6
Remove Mojang account sign-in option (#4147)
* Remove Mojang auth

* Yeet Connector wrapper, ensure that empty config arrays (e.g. saved user logins) are empty lists instead of null to avoid NPE exceptions
2023-10-03 01:12:54 +02:00
petersv5
7d489c7354
Close threads at server shutdown (#4029)
Co-authored-by: Peter Svensson <petersv@psv.nu>
Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2023-10-01 18:15:44 -04:00
Konicai
c2cd99c829
Support Java 1.20.2 (#4112)
* Initial pass for 1.20.2, compiling
* Remove unused level events
* handle null GameProfile in ClientboundPlayerInfoUpdatePacket
* Handle level events BRUSH_BLOCK_COMPLETE and EGG_CRACK
* Account for null tag in DecoratedPotBlockEntityTranslator
* Explicitly show that 1.20.31 is supported
2023-09-29 17:14:49 -04:00
Konicai
9a8015e8b6
Support Bedrock 1.20.30 (#4115) 2023-09-11 22:22:50 -04:00
chris
806ec35a84
Feature: Allow client-side "game settings" menu gamemode/difficulty changes (#4062)
Removes difficulty/Gamemode settings from the custom server settings form since these are now present in the client side settings.
2023-09-09 00:34:19 +02:00
chris
0d5cb51d5f
Make geyser connectiontest command more foolproof (#3951)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2023-09-05 23:16:44 -04:00
Konicai
d4ae428225
Drop support for 1.19.80 (#4091)
* Initial removal of any 1.19.80 logic
* Re-add isPre1_20_1 method
2023-08-29 16:58:51 -04:00
Konicai
396f4e4900
Update latency translator for 1.20.10 (#3993) 2023-07-17 14:45:45 -04:00
Konicai
3a0c1b788a
Support for 1.20.10 (#3961)
Co-authored-by: chris <github@onechris.mozmail.com>
Co-authored-by: RednedEpic <redned235@gmail.com>
2023-07-11 18:17:01 -05:00
DeveloperDragon
50d3945477
Fix/proxy protocol missing message (#3898)
* Show proxy protocol ip for debug message

* Make sure that first message that contains proxy protocol also gets sent. This caused issues with serverlists and console players
2023-06-20 08:28:31 -05:00
chris
903e61f1a3
Exposing resourcepack loading to api (#3696)
Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
Co-authored-by: RednedEpic <redned235@gmail.com>
2023-06-16 20:39:53 -05:00
Camotoy
3ec0d82d46
Kick pre-1.19.30 players for not sending a RequestNetworkSettingsPacket 2023-06-09 12:10:59 -04:00
Konicai
4ab9eb4920
Misc 1.20 fixes (#3828)
* Update mappings

diff: f69b4db9a6...2989dbd7e1

* 1.20 boat entity variants and remove old check in UpstreamPacketHandler
2023-06-08 07:23:27 -07:00
RednedEpic
13c9063368 Update to use protocol 589 and other 1.20 updates 2023-06-07 09:44:18 -05:00