Commit graph

351 commits

Author SHA1 Message Date
Camotoy
69d4d9f0d6
Send position update every 3 seconds if idle (#1421)
* Send position update every 3 seconds if idle

Prevents timeouts in certain instances when AFK.

* Cancel position sending on dimension switching

* Remove debug lines

* Create function to centralize movement translation
2020-11-02 16:04:08 -05: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
Tim203
0e7dca551e
Merge remote-tracking branch 'fork/floodgate-2.0' into floodgate-2.0
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/utils/PluginMessageUtils.java
2020-10-30 01:05:03 +01:00
Tim203
c9102348de
First version of the Forms rewrite
The next version will split the implementation from the api
2020-10-30 00:58:17 +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
rtm516
c30cb78e74
Add statistics menu (#1424)
* Add statistics menu

* Changed back button text

* Add check to make sure the player requested the statistics display

* Better item translation support; misc changes

* Clean up session getting?

* Remove extra debug that is likely unnecessary

* Remove unused function

* Update languages submodule

* Clean up javadoc comment

* Fix typo

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-10-24 23:33:49 +01:00
RednedEpic
dfba278f4d Use correct methods in refreshEmotes 2020-10-23 01:36:34 -05:00
RednedEpic
ee8c718c62 Translate emote list packet 2020-10-23 01:25:24 -05:00
Camotoy
b02bc33393
GeyserSession: Set a default value for attackSpeed (#1419)
Fixes cooldowns not showing on a fresh world.
2020-10-19 19:03:31 -04:00
AJ Ferguson
7f4b588cdf server inventory. WORK IN PROGRESS
wip commit of implementing server authoritative inventories. there is a lot of experimental and debug code. this is NOT ready for testing or review.
2020-10-16 15:25:05 -08:00
Camotoy
96db37c14c
Fix bucket interactions on creative mode (#1369)
* Fix bucket interactions on creative mode

Bedrock uses the BLOCK_INTERACT enum of BedrockActionTranslator to truly indicate if a bucket should be used or not. In order to hook into this, we need to delay the bucket placing by about 5 milliseconds - this gives us time to cancel the interaction if needed.

Bucket sounds will now not play in this case as well.
2020-10-12 20:02:41 -04:00
Camotoy
772cb246f0
Forward keep alive packets to the client (#1344)
* Forward keep alive packets to the client

Previously, MCProtocolLib (our Java protocol library) handled keep alive packets for us. This commit disables that option and 'forwards' the keep alive packets to the client, and sending the keep alive packet back once Bedrock sends us a ping response.

* Delete DataCache

* Update to latest MCProtocolLib

* Swap values around as a sanity check
2020-09-29 14:15:11 -04:00
rtm516
7c49391b9d
Fix gamemodes not fully applying on server switch (#1348)
* Fix gamemodes not fully applying on server switch

* Revert previous commit and move session flag updating to the adventure settings method
2020-09-28 17:43:50 -04:00
DoctorMacc
0ea648b472
Merge branch 'master' of https://github.com/GeyserMC/Geyser into floodgate-2.0 2020-09-26 20:35:54 -04:00
Camotoy
1ec768d95d
Fix interaction spam bug (#1324)
* Fix interaction spam bug

This references the Nukkit 1.0 fix for the client bug of spamming to interact. Holding down still works.

* Remove interaction position set at action type 1

* Remove debug line
2020-09-24 12:54:18 -04: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
Camotoy
f9c1d3f218
Remove Protocol v409 support (#1300)
* Remove Protocol v409 support

Protocol has dropped support for this version.

* Fix movement

* Use a static commit for Protocol
2020-09-16 00:11:56 -04:00
Camotoy
6638c53029
Implement command block and jigsaw support (#1291)
* Implement command block and jigsaw support

- Command block UI is now fully implemented to match Java Edition.
- Command block minecarts are now supported.
- Command blocks now show the correct type of command block.
- Jigsaw blocks are translated.

Structure blocks can be implemented, but these will be trickier as there are significant GUI differences between Java and Bedrock.

* Add more detail about command block minecart color

* Set PlayerPermission.OPERATOR to allow command blocks to be destroyed
2020-09-14 20:54:19 -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
Camotoy
d47360d6fb
GeyserSession: send command permission level OPERATOR if qualified (#1254)
Mobile clients have a GUI for commands that shows if CommandPermission.OPERATOR or higher is sent. The commands present all require OP permission 2 or higher; therefore we set that command permission if the server tells us we have a OP permission level of 2 or higher.
2020-09-05 16:22:31 -04:00
Camotoy
dcf1731d8a
Implement correct sign wrapping (#1228)
* Implement correct sign wrapping

This commit ensures that the auto-wrapping nature of Bedrock with signs is corrected. If a Bedrock player sends a sign that is auto-wrapped, it will now be interpreted by Geyser to fit on multiple lines. Additionally, Geyser will crop incoming sign text to prevent auto-wrapping.

* Don't wrap if it's the last line
2020-09-01 23:38:36 -05:00
Camotoy
6f161a380f
GeyserSession: Always set Keep Inventory to true (#1213)
* GeyserSession: Always set Keep Inventory to true

This prevents the client from removing items on death in creative mode if Keep Inventory is true, but doesn't break existing behavior. Essentially, this assures full server-side behavior of the inventory during death.

* Small comment update

* OK, it was fine before the last commit, but make it better
2020-09-01 23:37:24 -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
Camotoy
8b7165a564
Implement (hopefully) temporary dimension switching fix (#1188)
This fixes rare (?) instances where dimension switching doesn't finish loading on the client. Ideally a proper fix would send the finishing packets in the correct order but I didn't get far in this regard.

Fixes #1154 and #1072.

Other miscellaeous chunk-related fixes have also been included here.
2020-08-24 09:31:21 -04:00
Camotoy
7fcfa7d54d
Implement an enchantment table GUI (#1177)
Until 1.16, enchantment tables were impossible to implement properly in Geyser. When a user selects an enchantment in Bedrock, the client creates the book on its end and assumes the server is OK with it. Java requires a button to be pressed to select the enchantment. With 1.16, server authoritative inventories remove that on Bedrock. However, until our inventory rewrite is finished we are still stuck without enchantment table support. This commit serves as an alternative as we wait.

Enchantment table GUI support is still impossible since we are using the pre-1.16 inventory system. To solve this, this commit replaces the enchantment table GUI with a hopper GUI. The first slot serves as the spot you place the weapon. The second slot acts as the lapis slot - Geyser prevents any item from going in there that is not lapis. The final three slots act as the buttons; an enchanted book acts as each button, with the ability to show the translated text of each enchantment.

https://cdn.discordapp.com/attachments/613194828359925800/746164042359504927/unknown.png
2020-08-20 20:53:47 -04:00
DoctorMacc
ec87344a77
Initial skin support 2020-08-19 23:13:05 -04:00
DoctorMacc
bf6f6fddb2
Merge branch 'master' of https://github.com/GeyserMC/Geyser into floodgate-2.0 2020-08-18 10:21:57 -04:00
Camotoy
1ead2900a3
Translate RAIN_STRENGTH to Bedrock client (#1151)
* Translate RAIN_STRENGTH to Bedrock client

Previously Geyser ignored RAIN_STRENGTH and instead relied on START_RAIN and STOP_RAIN only. This is unreliable on a vanilla server as these values are swapped around. This commit also implements thunder strength which was untranslated.

* Update rain code in JavaRespawnTranslator
2020-08-16 12:43:16 -05:00
RednedEpic
04cf8b2a99 Fix javadoc errors 2020-08-08 17:56:15 -05:00
rtm516
0a5048232f
Add support for client side settings (#1035)
* Port code from #486

Co-authored-by: Luke <32024335+lukeeey@users.noreply.github.com>

* Fix and clean code and add default gamemode changing

* Clean copyright

* Remove direct modification of server, clean up code and add player list xuid fetching.

* Move to custom settings menu

* Move sendAdventureSettings to GeyserSession

* Add javadoc comments

* Add translation support

* Remove updated copyright

* Clean up

* Clarify some javadoc comments

* Remove obsolete code

* Update languages submodule

* Fix javadoc comments

* Fix compile

Co-authored-by: Luke <32024335+lukeeey@users.noreply.github.com>
Co-authored-by: Redned <redned235@gmail.com>
2020-08-08 17:41:12 -05:00
Camotoy
0fde30fc78
GeyserSession: always send naturalRegeneration=false gamerule (#1097)
This essentially gives the server full control over the health visual.
2020-08-08 16:50:49 -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
Tim203
35d8edd15e
Floodgate 2.0 update 2020-07-29 12:53:00 +02:00
AJ Ferguson
5b1116b15a
Creative items (#1013) 2020-07-24 15:42:15 -04:00
Camotoy
221e5bd103
Disconnect client if using an invalid Mojang account (#975)
This commit supresses the NPE that was previously sent when using an invalid Mojang account. Instead, the Bedrock client is disconnected with an error message.
2020-07-18 15:56:12 -05:00
RednedEpic
24f9651cc6 Convert map of players to list (may address #833) 2020-07-06 20:11:34 -05:00
AJ Ferguson
699402e635 Fix bug with maps 2020-07-06 15:52:38 -08: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
RednedEpic
da1674c8d6 Update to Cloudburst NBT 2.0 2020-07-05 15:59:44 -05:00
rtm516
f5da962f6f Fix disconnect message formatting 2020-06-28 23:38:27 +01:00
AJ Ferguson
e3e8bb2799 Fix first item of creative inventory not showing 2020-06-27 20:47:10 -08:00
Tim203
8f763dfc5f
Move common stuff used only by connector and bootstrap to connector 2020-06-28 00:27:00 +02:00
DoctorMacc
75f470cb33 Fix creative items 2020-06-27 11:35:02 -04:00
DoctorMacc
ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -04:00
DoctorMacc
117cdf282d Begin updating Geyser. Requires manual MCProtocolLib compile 2020-06-20 22:24:45 -04:00
DoctorMacc
d6119375b2 (Incomplete) Update MCProtocolLib 2020-06-18 21:44:50 -04:00
Camotoy
9369b20209
Add 1.9+ PvP 'Cooldown' (#768)
* Add 1.9+ PvP 'Cooldown'

This commit adds a subtitle that acts as the Java cooldown. This is an optional feature disabled in the config with `show-cooldown`. This does not appear on plugins that use OldCombatMechanics.

* No need to bump up the config version; I was just tested with OldCombatMechanics

* Use simpler casting

* Use session variable of lastHitTime for theoretically better performance

* Reuse attribute value calculation from AttributeUtils

* Remove unused imports

* Revert config version update in config.yml
2020-06-16 19:03:28 -05:00
rtm516
a6f91d5e15
Fix maps not loading in sometimes (#758)
* Fix maps not loading in sometimes
Adds a default map ID so the map item isnt invisible on bedrock.
Respond to the MapInfoRequestPacket so the image loads on first join.

* Remove debug log

* Add comments
2020-06-15 14:24:52 -04:00
6e127edfd6
Stop using TrigMath class (#753)
* Stop using TrigMath class

* Use MathUtils
2020-06-09 14:50:21 +02:00
1da130ab07
Fix initial movement speed (#751)
Bedrock clients move very fast by default until they get an attribute packet correcting the speed.
2020-06-08 08:13:25 -04:00
DoctorMacc
afb12e923b Show villager display name 2020-06-06 00:04:05 -04:00
DoctorMacc
4c5d80e2e9 Update to latest master 2020-06-05 22:52:11 -04:00
AJ Ferguson
3d357af739
Inventory Fixes (#602)
* Fix edge case when shift clicking an output slot

* Don't send window close packet if window is already closed

* Limit amount of window close packets sent to the client

Fixes hidden inventory bar bug

* Restrict user from unusable chest inventory slots

* Fix crafting table slot mappings

* Always send cursor update
2020-06-02 08:48:26 -08:00
Camotoy
b8a3009c9d
Ignore all downstream packet errors (#693)
* Ignore all downstream packet errors

Instead of kicking the client off because of an error, we simply display a logger warning and suppress the error.

* If debug mode, print stacktrace
2020-05-30 17:31:20 -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
59da87a10f
Merge entity mounts branch to master (#589)
* Initial support for entity mounts*

* This only works for viewing other players on mounts/vehicles. Currently, mounting on vehicles through Geyser with bedrock does not work at all, though, you can see other Java players on mounts just fine.

* Fix Bedrock player mounting; add minecart offset

* Remove debug code

* Fix boat animation

* Remove debug code

* Add notice of possible steering flip

* Add translator for PlayerInputPacket

* Upload WIP code for BoatEntity.java

* Add animation for rowing on Bedrock side

* Clean up debug code, start on boat movement

* Add notice about flying horses

* Rename BedrockPlayerInputPacket.java to BedrockPlayerInputTranslator.java

* Delete BedrockPlayerInputPacket.java

* Use Translator Annotation again; Thanks to LegacyGamerHD

* Upload ineffective mount-on-login code

* Upload current changes with no debug code

* Change case where applicable

* Change Integer[] to int[]; Change schedule() to execute()

* Don't use Thread.Sleep() and instead call itself again

* Fix players not being linked on login/chunk load

* Little changes

* Minor improvements/fixes to boats

* Remove empty file

* Fix horse flying.

* Various entity mounting fixes

* Add mounting offsets for skeleton and zombie horses

* Another round of entity mount-related fixes

- Add offsets for skeleton and zombie horses (Thanks to tester DirtNasty)
- Boats can now be placed in survival (Thanks again to tester DirtNasty)
- Boats and minecarts can now shake

* Add translating for ServerVehicleMovePacket

* Cleaning up

* More cleaning up

* Add interactive tag support for mountable entities

* Boats move far more nicely

* Add horse heart visuals

* Update interactive tags

Co-authored-by: RednedEpic <redned235@gmail.com>
2020-05-23 16:39:17 -05:00
rtm516
fc6532732d
Adds skin ears from MinecraftCapes.co.uk + Clientside linked account skins + Elytra textures (#539)
* Added ears geometry support

* Added ear fetching from mc capes

* Added support for deadmau5

* Commented, documented and cleaned code

* Allow bedrock players to see their java skin/cape/ears when joining

* Optimised Imports

* Fix missing else statement

* Moved ears and fixed elytra skins

* Added ears config option

* Fixed cape/elytra transparency

* Fixed slim skin geometry

* Fixed async ears request and added alex skin

* Fixed default elytra not showing with no cape

* Moved to normal Base64 functions

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
2020-05-23 16:06:34 -05:00
AJ Ferguson
2366559694 Store villager data in the player and fix wandering trader 2020-05-19 09:41:44 -08:00
AJ Ferguson
e2d46c3d49 Work on villager trading 2020-05-18 21:15:29 -08:00
RednedEpic
30e38b3a2f Add basic villager trading support (incomplete)
This commit implements basic functionality for villager trading. This is still incomplete and is buggy in areas such as with villager trades that have more than one input and trade inputs and outputs containing NBT.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-05-16 23:52:39 -05:00
rtm516
0c60af66b2
Fixed customised skins causing strange display (#534)
* Fixed customised skins causing strange display

* Cleaned up floodgate player checking

* Fixed cape scale

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
2020-05-11 23:45:16 -05:00
rtm516
5ae95433e5
Bedrock to Bedrock legacy skin support (#276)
* Added legacy skin support for bedrock to bedrock clients

* Added bedrock to bedrock cape handling

* Added bedrock geometry support

* Bedrock skins now work in all auth modes

* Tonne of debug info

* Added fix to prevent customised skins from being loaded

* Added skin size to bedrock client data

* Cleaned debugging code

* Made bedrock cape take priority over third party

* Cut the customised skin image in half to hopefully get it to map

* Removed hacky conversion attempt

* Fixed bedrock skin caching on load and 1.14.60 support

* Cleaned up debug messages

* Added linked player ignore
2020-05-06 16:50:01 -05:00
Camotoy
48147c2ce3
Fix Floodgate players causing errors on Bukkit. (#490)
Co-authored-by: Tim203 <mctim203@gmail.com>
2020-05-05 12:53:25 -05:00
Luke
7195d20fae
Implement helper methods for sending packets (#487)
* Implement helper methods for sending packets, fixes an NPE when chatting before connecting to the remote server

* Change method names

* Add a space between doc comment lines

* Add debug messages
2020-05-05 10:51:43 -05:00
ForceUpdate1
d0a2f6ac27
Fix movement issues #466 (#473) 2020-05-04 01:06:08 -05:00
RednedEpic
3370ad3db9 Merge branch 'master' into feature/sounds 2020-05-02 23:06:53 -05:00
Camotoy
9846058377
Add item frames (#415)
* Initial attempt

* Item frames 'work'

* Blocks in the item frames work

* Remove commented code

* Small changes

* More progress

* Whittling down

* Fix swords, etc

* NBT data implemented

* Remove unused import

* Add item frame item removing; add checks for removing item frames

* Add requested changes; clean up logic

* Add license

* Always delay item frame updates by 500 milliseconds

* Switch to per-session item frame cache

* Revert item translator refactoring
2020-05-02 15:44:05 -05:00
RednedEpic
ad596cdccb Add sound handlers for block interaction
These sound handlers had to be added since on Minecraft: Java Edition, these sounds are handled clientside whilst Minecraft: Bedrock Edition expects something from the server. To counter this, we emulate the sounds of that on Minecraft: Java Edition within Geyser and send it to the client. The code may seem a tadredundant, but there is not much of an alternative unfortunately.
2020-04-30 00:21:02 -05:00
RednedEpic
1fbb755d26 Merge branch 'master' into sound-master 2020-04-29 15:14: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
rtm516
bea070395f
Handle player teleports properly (#389)
* Handle player teleports properly

Co-authored-by: ForceUpdate1 <mneuhaus44@gmail.com>

* impl teleport cache

* impl teleport cache

* removed debugs

* Cleanup

Co-authored-by: ForceUpdate1 <mneuhaus44@gmail.com>
2020-04-29 11:06:25 -05:00
RednedEpic
c22eb170ec Merge branch 'master' into feature/sounds 2020-04-26 00:26:14 -05:00
RednedEpic
08b7857292 Remove unused imports in GeyserSession 2020-04-26 00:24:06 -05:00
rtm516
257918904b
Fixed spawn egg colours not loading in (#429) 2020-04-25 23:55:06 -05:00
RednedEpic
497825dd96 Fix NPE in console when a sound was missing and clean up nesting 2020-04-25 18:23:01 -05:00
RednedEpic
8b487df698 Properly remove players from Geyser playerlist (Fixes #421 2020-04-25 17:53:35 -05:00
RednedEpic
79185fabb5 Only send block sounds when a block is being placed
Previously, any time a block was clicked whether it be with a block in the hand or not, a sound would play. This checks if the item in the players hand is indeed a block as well as the same block in the UpdateBlockPacket, and properly plays the packet.
2020-04-23 01:01:33 -05:00
DoctorMacc
b0a8b9219a Add effects support and block break particles/place sounds
Co-authored-by: RednedEpic <redned235@gmail.com>
2020-04-22 23:40:49 -05:00
RednedEpic
4b001593fc Merge branch 'master' into inventory 2020-04-17 18:37:22 -05:00
rtm516
dc59be3901
Fix blank login causing error 2020-04-17 14:34:44 +01:00
RednedEpic
1cb2e658e0 Merge branch 'master' into inventory 2020-04-14 23:40:50 -05:00
RednedEpic
b15d37a4c5 Print throwable for disconnection if present 2020-04-14 23:27:16 -05:00
RednedEpic
605c9ef4db Merge branch 'master' into inventory 2020-04-11 22:46:25 -05:00
AJ Ferguson
f04a267d98 Only show login form if AuthType is Online 2020-04-11 10:53:27 -08:00
AJ Ferguson
95bcc04177 Fix crash on some devices when logging into a different dimension 2020-04-11 10:33:06 -08:00
rtm516
78fdab2090 Removed left in debug line 2020-04-09 17:34:49 +01:00
rtm516
81c1533ee2 en_us user now gets a chat message if the locale isnt already loaded 2020-04-09 17:21:51 +01:00
rtm516
013bca024c Removed auto download and load of en_us 2020-04-09 17:06:17 +01:00
rtm516
c51a48221b Merge remote-tracking branch 'origin/master' into server-language-processing 2020-04-09 13:58:45 +01:00
rtm516
c61d87714b On demand downloading and loading of language files 2020-04-09 00:20:41 +01:00
rtm516
55b2fd0259 Kick the user on incorrect login info 2020-04-05 10:42:02 +01:00
RednedEpic
392b0b5727 Merge branch 'master' into inventory 2020-04-04 03:12:23 -05:00
Redned
ddf2f471ea
Merge branch 'master' into chunk-fix 2020-04-04 02:00:18 -05:00
RednedEpic
5222232e72 Add rest of fixes for operator bug 2020-03-26 23:00:52 -05:00
William Johnstone
a0884596e3 Fix issue with players being able to update their own gamemode 2020-03-21 22:59:16 +00:00
RednedEpic
1bcee8d36f Merge branch 'master' into inventory 2020-03-15 13:21:37 -05:00
RednedEpic
e203cfd4a7 Move back to XUID for Floodgate
The normal identity UUID caused problems and caused the bedrock client to crash when using Floodgate. This was likely because on bedrock edition, it's a version 3 UUID opposed to java edition which uses version 4.
2020-03-14 14:03:44 -05:00
RednedEpic
6eac178305 Merge branch 'master' into inventory 2020-03-10 18:46:27 -05:00
Tim203
37d377b483
Floodgate now uses identity instead of xuid 2020-03-09 21:32:19 +01:00
RednedEpic
b2d611e24c Fix some problems brought from merge conflicts 2020-03-05 20:53:58 -06:00
RednedEpic
418026dbe6 Merge branch 'block-entities' into inventory 2020-03-05 20:00:14 -06:00
AJ Ferguson
eaf45ff6f7 Fix chunk view position bugs on some servers 2020-03-05 16:26:36 -09:00
RednedEpic
6b22bcec2b Merge branch 'master' into inventory 2020-03-04 21:35:20 -06:00
RednedEpic
1670c77672 Only allow console to shut down Geyser with a command 2020-03-04 20:44:42 -06:00
RednedEpic
2bdf3d4d7f Merge branch 'master' into plugin 2020-02-26 19:31:19 -06:00
AJ Ferguson
bc3992f775 Merge remote-tracking branch 'remotes/upstream/master' into inventory
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/translators/TranslatorsInit.java
#	connector/src/main/java/org/geysermc/connector/network/translators/inventory/updater/ChestInventoryUpdater.java
2020-02-25 22:12:39 -09:00
RednedEpic
f5bc328737 Merge branch 'master' into feature/new-protocol-lib 2020-02-25 18:54:31 -06:00
RednedEpic
41a24ca6ab Merge branch 'master' into plugin 2020-02-16 13:25:37 -06:00
RednedEpic
9ffec0021c Fix movement bugs *and* allow for teleportation 2020-02-16 12:40:54 -06:00
RednedEpic
4bb34cdcce Merge branch 'master' into feature/new-protocol-lib 2020-02-14 17:57:28 -06:00
RednedEpic
4186715083 Update to NukkitX Protocol Lib 2.5.0 release 2020-02-14 17:39:26 -06:00
AJ Ferguson
b1a0ed3e91 Merge remote-tracking branch 'remotes/upstream/master' into inventory
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/translators/TranslatorsInit.java
#	connector/src/main/java/org/geysermc/connector/utils/Toolbox.java
2020-02-12 21:58:09 -09:00
AJ Ferguson
7f194b2d54 Increase render distance instead of chunkpublisher radius 2020-02-11 13:42:02 -09:00
AJ Ferguson
9008036ee4 Merge remote-tracking branch 'remotes/upstream/master' into chunk-fix
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/translators/block/BlockTranslator.java
#	connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaChunkDataTranslator.java
#	connector/src/main/java/org/geysermc/connector/utils/ChunkUtils.java
#	connector/src/main/java/org/geysermc/connector/utils/Toolbox.java
2020-02-10 17:38:56 -09:00
SupremeMortal
f9cd88eaa2
Merge branch 'master' of https://github.com/GeyserMC/Geyser into feature/direct-block-mapping
 Conflicts:
	connector/src/main/java/org/geysermc/connector/utils/Toolbox.java
2020-02-09 22:53:57 +00:00
AJ Ferguson
e4ab4b336c Chunk fixes 2020-02-05 19:32:33 -09:00
AJ Ferguson
13f198845c Fix bugs when rapidly switching dimensions 2020-02-05 19:21:09 -09:00
OnlyBMan
0bb18d26b0 Load biome definitions only once instead of everytime a new player joins 2020-02-05 22:02:23 -05:00
OnlyBMan
4dff067faa Add biomes 2020-02-05 21:10:34 -05:00
RednedEpic
0cf574ddcb Merge branch 'master' into feature/direct-block-mapping 2020-02-05 18:59:20 -06:00
RednedEpic
4f461bf374 Start on converting to the new NukkitX protocol library updates 2020-02-05 18:55:34 -06:00
AJ Ferguson
5e5aeed578 Merge remote-tracking branch 'remotes/upstream/master' into inventory 2020-01-30 12:08:39 -09:00
RednedEpic
240f41ff03 Use Path instead of File for floodgate key file in config
...and fix related issues with the file not being found.
2020-01-26 11:22:21 -06:00
RednedEpic
cc3cf70257 Search for key in Geyser plugin folder in plugin versions 2020-01-25 22:59:00 -06:00
RednedEpic
6bb478bda4 Merge branch 'master' into block-entities 2020-01-19 22:35:33 -06: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
AJ Ferguson
66f5ed9495 Merge remote-tracking branch 'remotes/upstream/master' into inventory
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/translators/TranslatorsInit.java
#	connector/src/main/java/org/geysermc/connector/network/translators/java/JavaRespawnTranslator.java
2020-01-04 14:39:01 -09: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
SupremeMortal
94851ef4b8
Move all block related code into BlockTranslator
It makes more sense.
2019-12-31 00:14:38 +00:00
AJ Ferguson
782feed641 Fix lighting when reloading world 2019-12-28 18:17:00 -09:00
AJ Ferguson
b2f86ec20b Rewrite dimension code
New code does not rely on pausing the thread
2019-12-28 04:35:21 -09:00
AJ Ferguson
cc0b3293bf Start fixing dimension switching and respawning 2019-12-27 02:29:46 -09:00
AJ Ferguson
8061e2d76d Merge remote-tracking branch 'remotes/upstream/master' into inventory
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java
#	connector/src/main/java/org/geysermc/connector/utils/Toolbox.java
2019-12-23 16:58:59 -09:00
RednedEpic
e1ba1fa3e8 Merge remote-tracking branch 'origin/master' into block-entities 2019-12-23 13:49:20 -06:00
RednedEpic
e38322a3ec Nuke plugin API
https://media.giphy.com/media/oe33xf3B50fsc/giphy.gif
2019-12-21 11:35:48 -06:00
AJ Ferguson
d06f963b67 Block states and fix waterlogged blocks 2019-12-20 20:05:20 -09:00
Tim203
64b04330c3 Added the player his IP to the transferable data 2019-12-17 23:27:29 +01:00
Tim203
9527709c59 Merge branch 'master' of https://github.com/GeyserMC/Geyser
 Conflicts:
	common/pom.xml
	connector/src/main/java/org/geysermc/connector/utils/SkinUtils.java
2019-12-10 20:52:42 +01:00
AJ Ferguson
211436c1e0 Merge remote-tracking branch 'remotes/upstream/master' into inventory
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
2019-12-06 14:06:24 -09:00
SupremeMortal
6e8a0847b4
Fix typo from protocol lib 2019-12-04 18:13:49 +00: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
b12256bc1e Changed a method name 2019-11-30 15:32:13 +01:00
Tim203
7d645fbf16 First Flootgate commit 2019-11-30 13:34:45 +01:00
AJ Ferguson
24e5d34ce9 Cleanup 2019-11-29 15:49:29 -09:00
AJ Ferguson
489c39e900 Start adding support for crafting
Expect bugs
2019-11-27 18:55:58 -09:00
AJ Ferguson
af85d6e4d2 Merge branch 'master' into 1.13-inventory 2019-11-27 18:39:52 -09:00
RednedEpic
51c1792d67 Only send one empty chunk upon login 2019-11-15 22:21:26 -06:00
AJ Ferguson
ce7237392b Merge branch 'feature/1.13-bedrock' into 1.13-inventory 2019-11-15 14:55:15 -09:00
AJ Ferguson
7d4cb06fbe Fix crash on login 2019-11-13 17:26:45 -09:00
RednedEpic
cfdaacf017 Minor cleanup 2019-11-12 22:28:47 -06:00
RednedEpic
3ffaf5c0e5 Attempt to fix crashes on login 2019-11-10 16:53:01 -06:00
AJ Ferguson
2d36a8b43b Begin adding support for creative
Still need to complete item mappings
2019-11-09 17:20:47 -09:00
RednedEpic
21ddf8af1e Update block palette 2019-11-09 11:14:31 -06:00
AJ Ferguson
659d52d18a Merge branch 'master' into inventory 2019-11-07 23:20:19 -09:00
RednedEpic
90e6ebc1be More work on 1.13 2019-11-05 18:55:59 -06:00
Redned
a4b2a016f8 Set version for pong and StartGamePacket from bedrock packet codec 2019-11-02 15:58:50 -05:00
Redned
5fee344743 Fix block palette 2019-11-02 15:50:04 -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
AJ Ferguson
a65a14c2f2 Fix block breaking in creative 2019-10-27 01:56:47 -08:00
AJ Ferguson
88648f705e Work on inventory transactions
work in progress
2019-10-20 13:25:41 -08:00
RednedEpic
7571df9903 Attempt to reduce memory usage and fix not being disconnected from Java 2019-10-16 13:55:05 -05:00
Tim203
15506cf5b4 Edited PlayerInit behavior and updated protocol lib to 2.3.0 2019-10-09 20:39:38 +02:00
Tim203
89550a5ecb Bugfixes 2019-10-04 19:25:08 +02:00
Tim203
ee97585036
Merge branch 'master' into master 2019-10-03 19:09:59 +02:00
Tim203
5eb7565b0a Third party capes, rotation fixed, wait for the client and updated protocol lib 2019-10-02 22:45:29 +02:00
AJ Ferguson
4b0d777128 Fix crash after first disconnect 2019-10-01 15:36:33 -08:00
AJ Ferguson
fe845710b6 Fix for block breaking 2019-09-30 14:17:36 -08:00
EOT3000
da0c59446f Try fixing block break (didn't work). Also add more metrics 2019-09-30 12:44:25 -04:00
Tim203
0b193c04e7 Players spawn, player skins, scoreboard, bossbar and updated protocol lib 2019-09-25 23:52:28 +02:00
Tim203
cbdf4f7633 Made paintings not crash the client, bugfixes and improvements 2019-09-21 09:42:44 +02:00
Tim203
1c74a6252a Some fixes, added playerlist. Entity spawning doesn't work yet 2019-09-17 00:28:29 +02:00
Redned
7f051bd6bc Start work on a basic chunk cache and block collision detection 2019-09-15 18:34:14 -05:00
SupremeMortal
c9be13d487
Fix AIOOBE and remove PlayerSession usage. 2019-09-13 15:45:55 +01:00
SupremeMortal
ab55050d11
Close remote java connection when bedrock player leaves. 2019-09-13 14:37:31 +01:00
SupremeMortal
9a9f67b45f
Get chunks working to some degree. 2019-09-13 11:49:18 +01:00
EOT3000
59e0aff289 Hybrid mode start + try fixing chunks (hashcodes, etc.) 2019-09-11 16:28:48 -04:00
Redned
7aa4457f34
Uncomment disconnect code for downstream disconnect
- This should hopefully reduce spam in console when a java client is disconnected. The disconnect handler will be rewritten later to address the not being able to reconnect issue.
2019-08-23 22:49:48 -05:00
RednedEpic
ba21acc9c8 Cleanup adding/removing players 2019-08-08 20:42:55 -05:00
RednedEpic
295d8d5256 Fix double disconnect bug and minor code cleanups 2019-08-08 18:16:46 -05:00
EOT3000
de78c93b72 chunks. Still don't work, but hey, it doesn't crash or hang! 2019-08-08 18:14:08 -04:00
EOT3000
b66631407b api stuff 2019-08-05 22:14:41 -04:00
EOT3000
7fccb0d69d new remapper (: 2019-08-05 22:09:45 -04:00
EOT3000
202e3e584c new remapper (: 2019-08-05 21:59:54 -04:00
Blue Kelp
5f93b5bec4 null safety on auth/handshake errors 2019-08-02 13:54:40 -07:00
Logicism
c7869e77e8 Scoreboard Fix 2019-07-29 19:57:43 -07:00
RednedEpic
635a26dd60 Start work on inventory/item translators 2019-07-29 17:20:48 -05:00
RednedEpic
dbfbaf47cd Cleanup and refactor translator code 2019-07-24 15:13:07 -05:00
RednedEpic
df6836e12b Add authentication/online mode support 2019-07-24 01:29:54 -05:00
RednedEpic
657f12654b Add form API and other small changes 2019-07-23 18:16:25 -05:00
RednedEpic
ccb52007fc Allow connected sessions to run Geyser commands 2019-07-21 19:52:20 -05:00
EOT3000
266d374167 completely re-do console 2019-07-13 15:00:51 -04:00
EOT3000
c44fdb2951 Merge remote-tracking branch 'origin/master' 2019-07-11 18:40:02 -04:00
EOT3000
43f6dcc2f4 registries/start some packets 2019-07-11 18:39:28 -04:00
RednedEpic
539a52f64a Switch to MIT license 2019-07-11 16:30:35 -05:00