Commit Graph

399 Commits

Author SHA1 Message Date
Camotoy bc0cfde8f9
Set the minimum Java version to 16; drop Bedrock 1.17.0 (#2477) 2021-09-10 14:10:56 -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 ab2f5b326f
Clear chunk on dimension switch
This should resolve chunks being leftover in instances such as server switches in proxies.
2021-08-31 11:32:58 +01: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 ac17963baa
Player effect cache cleanup
Only cache effects and not their values unless we actually use the value.
2021-08-16 11:53:56 -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 d19ff657de
Ensure overworld constraints are used everywhere 2021-07-14 21:46:56 -04:00
Camotoy feb64e08df
Fix biomes crashing and more (huge thanks to @dktapps 2021-07-14 21:14:53 -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 afc1f48d5e
Use custom class for caching chunk data
Right now, our chunk cache stores the heightmap and biome data that the server sends, which we never use. This commit saves that data in a custom GeyserColumn class that only stores chunk data. In the future, it may also store NBT data.
2021-06-29 10:09:47 -04:00
Camotoy 90fa5610f5
Finish my thought 2021-06-27 23:26:32 -04:00
Camotoy ad5356472d
Create a new cached chunk when a block is created in an empty chunk 2021-06-27 23:25:51 -04:00
Camotoy 215ffc618f
Fix some SettingsUtils regressions
- Add the new 1.17 gamerules
- Don't hide exceptions in form responses
- Fix the settings form silently failing
- Fix some translation strings in the settings form
2021-06-27 19:57:53 -04:00
Camotoy 71fe2621fc
Remove obsolete chunk merging 2021-06-23 16:48:56 -04:00
Camotoy 3a2cff7864
Clean up a bunch
Mostly checked with IntelliJ, but manually performed. The only issue I possibly anticipate is item name/lore issues, but the new method should be technically better.
2021-06-20 21:42:22 -04:00
Camotoy 01822672a5
Remove debug elements 2021-06-08 08:57:03 -04:00
Camotoy bb20afb123
Warn if server is using high/low dimension heights and remove translations on some strings 2021-06-07 23:09:42 -04:00
Camotoy a2b3e1946d
Update lectern if updated via the WindowItemsPacket 2021-06-07 14:19:17 -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
Tim203 db583135eb
Improved the comment added in the previous commit 2021-05-30 00:51:04 +02:00
Tim203 360e2f4b9a
Always replace spaces in usernames when using Floodgate
Bungeecord recently started checking usernames for spaces in the login start packet. To resolve this we just always send the username without spaces in the login start packet. Floodgate is still able to get the real username of the Bedrock player and Floodgate is also still in charge of the final username.
2021-05-30 00:22:11 +02:00