Commit Graph

351 Commits

Author SHA1 Message Date
RednedEpic 0b5009b415 The Great Refactor Part 1 - connector -> core 2021-11-20 13:56:40 -06:00
Camotoy 66d578eadc
Implement proper biome palette reading probably
With thanks to @kennytv for the magic required to get global palette bits.
2021-11-19 19:11:36 -05:00
Camotoy e0a7887f3f
Entity refactor bug fixes and other 1.18 changes 2021-11-18 20:44:03 -05:00
Camotoy 11997ed82b
Entity refactory aaaaaaAAAAAAA 2021-11-17 22:02:38 -05:00
RednedEpic e5869c00d6 Update to new renames in MCProtocolLib 2021-11-13 23:07:24 -06:00
Camotoy 393c2b0f91
Handle chunks on the player thread 2021-11-13 11:04:12 -05:00
Camotoy 768b09e7fd
Update to latest MCProtocolLib with Mojang mappings 2021-11-12 22:44:15 -05:00
Camotoy 5d58394bc0
Move all PacketLib local channel classes to Geyser 2021-11-12 11:25:15 -05:00
Camotoy dc5edc0a2c
Remove 1.17.10 support; extended world height is always enabled 2021-11-12 09:42:35 -05:00
Camotoy 09e3793fb2
Refactor GeyserSession tracking for better concurrency 2021-11-12 09:02:14 -05:00
Konicai f883dfdf2c
Remove commands from autocomplete/help list that cannot be run (#2602)
* only tabcomplete for commands the sender has permission for

* set permission defaults for spigot

* Make velocity autocomplete on arg length 0 and 1

* fix advancements perm in spigot plugin.yml and add settings perm

(whoops)

* don't show bedrock commands to java players

* modify spigot perm defaults

* censor help menu, abstract tab complete code

* Bedrock players don't get cmd argument suggestions

* update spigot plugin.yml
2021-10-30 20:57:54 -05:00
Camotoy 11bc083885
Update MCProtocolLib; add clearer errors for various connection issues
Errors that are a result of online mode and offline mode clashes are now clarified.
Users will now get a clearer message stating that the server is offline.

Resolves #2501
2021-10-07 11:00:43 -04:00
Camotoy 7d176cd669
Fix regressions in handling invalid account cases 2021-09-28 09:46:12 -04:00
Camotoy c28364c5dd
Prevent large ArrayLists from growing on collision checks
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.
2021-09-21 21:06:07 -04:00
Camotoy e0ae4c1b85
Fix disconnect message formatting 2021-09-21 14:58:35 -04:00
Camotoy 93f5298ee3
Introduce specialized maps for block state operations
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.
2021-09-09 21:33:48 -04:00
Camotoy f22d286ea1
Add world border translation (#1839)
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>
2021-09-09 21:27:38 -04:00
David Choo 8461cf76b7
Smooth Pistons (#1542)
With proper piston collision for players as well.
2021-09-09 21:20:25 -04:00
Camotoy 95ba2a10ad
Properly error if Microsoft authentication sends an error 2021-09-08 10:13:46 -04:00
Camotoy 0069566803
Dependency update; re-use Thread.MAX_PRIORITY for Spigot; other network optimizations 2021-08-31 19:57:56 -04:00
Camotoy b89cc1aef0
Refactor lodestones to be more memory efficient
- 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.
2021-08-31 19:49:55 -04:00
Camotoy 77119316f5
Check for closed immediately before processing a packet 2021-08-24 09:31:19 -04:00
Camotoy a1d167d5f1
Ensure skull operations are done on the player thread 2021-08-21 19:38:13 -04:00
Camotoy 89dde2aec3
Do a null check on downstream channel when sending packets 2021-08-19 12:37:14 -04:00
David Choo 57c0185b45
Prevent projectiles from blocking the player's vision (#2472)
Prevent Snowballs, Eggs, and other throwable projectiles from blocking the player's screen
2021-08-17 22:44:33 -04:00
Camotoy 3d04a957d0 Ensure that exceptions in player event loop are handled
Any stray exception means that the entire event loop comes crashing down.
2021-08-17 20:57:46 -04:00
Camotoy 7ae91a40ec
Ensure every packet is ran on the same thread per player (#2473)
This removes a lot of concurrency checking that needs to be done, because there should be no way two packets can be handled at the same time.
2021-08-16 20:39:29 -04:00
Camotoy ce748990a4
Javadoc fix and tiny teleport optimization 2021-08-15 14:57:02 -04:00
Camotoy 5d90ba91f7
Move LoginSuccessPacket handling to its own translator 2021-08-14 12:52:35 -04:00
Camotoy 919e84c23f
Don't try to connect to the remote server with invalid credentials
Fixes #2458
2021-08-12 14:35:26 -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 7a99aa0ddf
Merge branch 'biomes' 2021-07-28 20:27:34 -04:00
Konicai b86648332a
Auth type refactor in internal config (#2410) 2021-07-28 19:44:09 -04:00
Camotoy 5529a1cc1c
Fix spectator gamemode movement
- 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
2021-07-28 13:21:18 -04:00
Camotoy 8c96c3b11d
Biome reworkings
- 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.
2021-07-27 20:29:27 -04:00
RednedEpic 9817dc932a Merge branch 'feature/optimizations' into master 2021-07-21 21:44:49 -05:00
Redned ef7c673276 Properly use CompleteableFuture for MSA auth 2021-07-21 21:39:30 -05:00
Redned 39324ce95d Go back to normal thread for now using MSA auth, and only toggle leak detector on standalone 2021-07-18 17:41:47 -05:00
Redned ae4e4397e3 Use a CompleteableFuture rather than constructing a new thread for logins 2021-07-18 17:04:16 -05:00
David Choo 2766038db9
Update player bounding box in more scenarios (#2377)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-07-18 10:58:08 -04:00
Camotoy c7d4130a44
Start of extended world height support 2021-07-13 20:48:45 -04:00
Redned f7ef90278b
Implement a new registry system (#2306)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-07-12 21:19:40 -04:00
Camotoy 32bbd8ae1c
Attribute rewrite
This commit solves a couple issues:
- Entities that don't implement LivingEntity don't need to bother with attributes
- We don't need to cache all attributes for every entity
- Mounted entities' hearts were inconsistent

No entity as of this commit caches their attributes except for the player entity.
2021-07-08 10:30:59 -04:00
Camotoy 01822672a5
Remove debug elements 2021-06-08 08:57:03 -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
Tim203 01492647fc
Some small changes 2021-06-06 01:05:05 +02:00
Camotoy f5c5d0cd39
Support 1.17-pre3 and Bedrock 1.17.0.58 2021-06-01 21:12:58 -04: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
Camotoy 5376ba49b8
._. 2021-05-30 21:37:32 -04:00
Camotoy 2f2e2cc285
Only upload the skin on Floodgate 2021-05-30 21:36:25 -04:00