Commit Graph

599 Commits

Author SHA1 Message Date
RednedEpic d951ee83b4 Initial plugin message and forum support for GeyserAddons 2020-08-08 16:37:01 -05:00
Camotoy d49856cd7f
Change scoreboard errors to debug only (#781)
Prevents errors from occuring that don't stop operation of Geyser.
2020-08-07 14:10:26 -04: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
AJ Ferguson 61dbcb0c80
Update effects mappings (#949)
* Update effects mappings

* Use STOP_RECORD as the default record instead of null

* Add comments

* Update mappings submodule

* Update MCProtocolLib and effects

* Change level event used for EVAPORATE effect

The bedrock client plays an additional sound when using CAULDRON_EXPLODE.
The java client does not play any sound.

* Update mappings submodule
2020-08-03 13:42:43 -08:00
Camotoy 11c713dc6f
JavaEntityMetadataTranslator: replace stack trace with concise warning (#1086)
* JavaEntityMetadataTranslator: replace stack trace with concise warning

Removes the stack trace given when a ClassCastException occurs and replaces it with a friendlier message. Class cast errors will happen since some servers send incorrect values, and apparently it is default Minecraft behavior to ignore them.

* Update languages submodule
2020-08-03 16:29:52 -05:00
AJ Ferguson 86f18c9392
Remove Y pos workaround in BedrockItemFrameDropItemTranslator (#1037) 2020-08-01 14:41:59 -04:00
Camotoy 07f3d45cc4
Check for display tag when translating anvil contents (#1073) 2020-08-01 11:57:25 -05:00
Arktisfox 54bee1f868
Small entity metadata fix, other player bow implementation (#685)
* Move blocking case to LivingEntity, and make other players bows animate.

This moves metadata ID 7 to LivingEntity, it's proper place. It also sets the 'USING_ITEM' flag which animates other players bows.

* Add skeleton aiming support

Skeletons don't have support of pushing their bows back on Bedrock, but this allows them to hold their arms up

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-07-30 22:10:55 -04:00
Camotoy 238a3a8df1
Support immediate respawn gamerule (#970)
* Support immediate respawn gamerule

This commit now supports immediate respawn if the server enables it - both on the setting being applied on join and the setting being modified in-game. This also refactors the respawning process to more closely match BDS behavior - nothing broke in my testing but more testing is needed.

* Reuse spawned variable instead of creating new variable
2020-07-30 15:31:12 -05:00
Camotoy a4339be212
Only send metadata update once per Java metadata packet (#1022)
While this doesn't fix any bugs, it may be a slight performance enhancement as we aren't sending multiple packets per one Java entity metadata packet.
2020-07-30 15:15:07 -05:00
Camotoy 9097f8547b
Add rabbit jumping animation (#1027)
* Add rabbit jumping animation

This isn't perfect as Bedrock uses a duration and Java just sends the jumping animation. There may be something else missing from the puzzle piece.

* Remove debug line
2020-07-30 15:12:09 -05:00
bundabrg 784cb73301
Test if slot 50 used and under what conditions. (#1028) 2020-07-30 15:11:35 -05:00
bundabrg 11300254f0
Fix Anvil renames by trying a component first then fallback to plain text (#1052)
Closes #1039
2020-07-30 15:10:43 -05:00
rtm516 b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
Camotoy fe75320d6d
Add WORLD_IMMUTABLE flag to spectator mode (#1034)
Prevents the client from trying to interact with blocks
2020-07-27 18:18:22 -04:00
AJ Ferguson b9846fe797
Small inventory fixes (#1029)
* Increase minimum delay between closing and opening a new window

* Fix potential crash when opening player inventory
2020-07-27 11:17:55 -04:00
bundabrg d03f56e7e8
Fix Merchant Inventory Transaction (#1017) 2020-07-25 23:06:06 -04:00
bundabrg fffac8a552
Fix Spawn position not using offset. (#1015) 2020-07-25 10:38:00 -04:00
AJ Ferguson 5b1116b15a
Creative items (#1013) 2020-07-24 15:42:15 -04:00
Camotoy b103d86ff9
Fix buckets on desktop survival (#1003) 2020-07-23 14:37:14 -04:00
Camotoy ad9184ad13
Update Adventure-Legacy dependency (#996) 2020-07-22 14:52:12 -04:00
Camotoy b211b9da2e
Update entity status mappings (#995)
- Add support for LIVING_BURN entity status
- Properly send sheep graze event
2020-07-22 11:03:09 -04:00
ForceUpdate1 765efe8a33
Fix anvil item rename (#992)
* fix anvil item rename

* fix anvil item rename
2020-07-21 15:01:55 -05:00
rtm516 30c007d04b
Fix buckets not working on mobile (#767)
Desktop clients send an extra item use packet for buckets whereas mobile clients dont send the second use packet causing the issue as a ClientPlayerUseItemPacket doesn't get sent to the Java server.

Buckets on mobile may still be glitchy as the player must be directly facing the block they want to place liquid on.
2020-07-21 13:17:55 -04:00
Camotoy e5fc66d72f
Fix elytra flying in creative mode (#956)
Sending a ClientPlayerAbilitiesPacket allows the player to successfully fly.

This commit also removes the setting of the CAN_FLY entity flag on creative mode. This did not break anything in my testing.
2020-07-18 15:57:37 -05:00
rtm516 04e73efd94
Fix enchantment conversion (#920)
* Fix java to bedrock enchantments

* Fix NBT conversion and add Soul Speed enchantment

* Remove unused import
2020-07-14 02:18:11 -05:00
Camotoy c4db0e2e63
Manually disconnect client on LoginDisconnectPacket (#950)
The client will not get kicked on a LoginDisconnectPacket causing them to remain in an empty world perpetually.
2020-07-13 21:53:55 -04:00
RednedEpic e7657c7d07 Fix enchantments for servers that don't namespace them (Fixes #897) 2020-07-11 19:52:20 -05:00
RednedEpic 5ceb4145ac Fix fireworks (Closes #917) 2020-07-11 19:40:26 -05:00
rtm516 485ba1b8a7
Check the name tag exists for anvil renaming to prevent an NPE (#936)
* Check the name tag exists for anvil renaming to prevent an NPE

* Fix item names being empty if display tag exists with no name
2020-07-11 21:58:12 +01:00
Camotoy 3e0cb28a63
Fix scoreboard prefix/suffix translation errors (#929)
Uses getTranslatedBedrockMessage() instead of getBedrockMessage().

Fixes #923.
2020-07-10 14:14:54 -04:00
Camotoy 9cc468cee9
Remove debug string 2020-07-08 12:42:20 -04:00
DoctorMacc bfdc452e3e Add emote support for Bedrock-to-Bedrock players 2020-07-08 12:38:54 -04:00
DoctorMacc 21ea1f2408 Update MCProtocolLib to fix #836 2020-07-07 20:14:50 -04:00
DoctorMacc 0cea703b46 Save ItemEntry classes for items 2020-07-07 16:40:19 -04:00
rtm516 5f6566ad0e Move to dynamic item ID mapping in ItemRegistry 2020-07-07 16:23:21 +01:00
rtm516 c2be7a181d Fix Piglin bartering animation (Fixes #863) 2020-07-07 16:11:52 +01:00
rtm516 75f2891ec0 Fix map_uuid nbt type 2020-07-07 14:47:56 +01:00
rtm516 8807d5d9c6 Fix banner block patterns 2020-07-07 14:30:33 +01:00
DoctorMacc f9760b721c Don't process the display tag if it's empty 2020-07-07 08:30:11 -04:00
AJ Ferguson 50176e10a8 Fix inabilty to place items into brewing stand 2020-07-06 23:44:39 -08:00
DoctorMacc f68632f433 Block-related updates
- Fix block breaking animation
- Fix block breaking particles
- Don't initialize Geyser's chunk cache if using Spigot
2020-07-06 21:38:10 -04:00
AJ Ferguson 699402e635 Fix bug with maps 2020-07-06 15:52:38 -08:00
rtm516 c454e443df Fix maps with negative IDs causing out of bounds errors 2020-07-06 23:36:31 +01:00
rtm516 ba736575f7 Fix RGB colors on signs causing chunk issues, fix items names not being displayed correctly 2020-07-06 23:36:04 +01:00
DoctorMacc 545dfa38f0 JavaUpdateTileEntityTranslator improvements
- Remove the use of deprecated functions
- Check for empty NBT (fixes errors on CubeCraft)
2020-07-06 16:22:07 -04:00
theminecoder 66570a623d
Fix scoreboards bleeding into other servers (#902) 2020-07-06 08:10:36 -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
RednedEpic d1e5960d69 Send a dimension change upon join game packet now sent by bungeecord on 1.16 2020-07-05 18:33:05 -05:00
RednedEpic da1674c8d6 Update to Cloudburst NBT 2.0 2020-07-05 15:59:44 -05:00