Commit graph

228 commits

Author SHA1 Message Date
RednedEpic
64f2233581 Fix wolf collar color when it's no longer angry (Closes #1404) 2020-10-15 01:54:05 -05:00
RednedEpic
9b3cd8f725 Fix area effect clouds 2020-10-12 20:36:11 -05:00
Camotoy
ec609fa868
Make crossbows prettier (#1359)
- Fix crossbow NBT translation - now crossbows will show as loaded
- Pillagers now more closely resemble Java Edition pose behavior
2020-10-08 20:40:50 -04:00
Arktisfox
16eb2a491a
Area cloud fixes (#684)
* Fix NotNull error with particles, replace incorrect string meta with int meta.

* Add back newline

* Remove debug line

* Update Protocol and prepare for merge

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-10-08 18:33:36 -04:00
Camotoy
3c4cde9677
Tipped arrow translation (#1331)
* Tipped arrow translation

- Tipped arrow items are now properly translated both ways
- Tipped arrow particle effects are also translated, by having a list of all colors Java could send us and their Bedrock ID

* Remove a whitespace
2020-09-29 13:30:37 -04:00
Camotoy
3c1d4aae93
Fix inconsistencies with players and the player list (#1298)
* Fix inconsistencies with players and the player list

This commit makes the player list entry packet control the player cache, fixing inconsistencies that appeared when removing the override on despawning the player.

* Update comments
2020-09-16 00:18:18 -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
Camotoy
b13f5e900f
PlayerEntity: despawn even if still on the player list (#1263)
Fixes LibsDisguises not working, as it uses the same entity ID for the disguised entity and player. The player still appears on the player list.
2020-09-14 20:50:21 -04:00
Camotoy
26802e6dab
Translate CanPlaceOn/CanDestroy NBT (#1253)
* Translate CanPlaceOn/CanDestroy NBT

This commit adds support for the translation of the CanPlaceOn/CanDestroy NBT for Bedrock clients.

* Remove debug line
2020-09-14 20:50:07 -04:00
Camotoy
9643b208f3
Check if Fireworks tag is null (#1255)
Thank you Mineplex, very cool.
2020-09-14 20:40:41 -04:00
Camotoy
4f761c5bde
Translate scoreboard nametag visibility (#1240)
This commit adds support for name tag visibility in teams. If a player is set to hide their nametag, it will be hidden from the Bedrock client. Notably, this fixes most NPC nametag hiding, including Citizens. This does not fix some NPC nametag hiding - there are several NPCs in Hypixel that still have a nametag show up, and they are not a part of any team.
2020-09-01 23:39:14 -05:00
Camotoy
b21f477366
Parrot mounting fixes (#1236)
* Parrot mounting fixes

- Fix duplicate parrots when a parrot leaves the player
- Fix rotation of parrots

* Remove critical debug information
2020-09-01 23:39:06 -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
RednedEpic
6db56fd68b Disable fireworks for consoles (Addresses #1083, #1164)
Not ideal, but there isn't a whole lot we can do as this is a game bug within console versions.
2020-08-17 20:04:12 -05:00
Camotoy
b07433698a
Translate specific messages (#1161) 2020-08-16 19:02:59 -04:00
Camotoy
78e8792a2d
FireworkEntity: don't process if item is null (#1160) 2020-08-16 15:25:35 -04:00
DoctorMacc
2dc71382e7
Merge branch 'master' of https://github.com/GeyserMC/Geyser into feature/1.16.2 2020-08-11 09:07:23 -04:00
rtm516
439027d510
Fix Shulker color and open state (#1113) 2020-08-10 09:31:08 -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
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
DoctorMacc
e8df81167b
Merge latest master 2020-08-05 11:20:25 -04: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
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
rtm516
b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
rtm516
0c3a6f1a6a
Check if the passenger is null before trying to update metadata (#1001)
* Check if the passenger is null before trying to update metadata

* Fix variable name
2020-07-30 12:19:26 -04:00
DoctorMacc
43c062c23c
Update to latest master 2020-07-29 16:25:42 -04:00
rtm516
64727db67b
Fix Wolf anger display (#1021) 2020-07-25 12:53:44 -04:00
D3ATHBRINGER13
8daf4ef2b7
Add piglin brutes (#989) 2020-07-20 19:45:38 -04:00
AJ Ferguson
23f33881cd
Fix potion effect colors (#951) 2020-07-14 02:17:20 -05:00
RednedEpic
5ceb4145ac Fix fireworks (Closes #917) 2020-07-11 19:40:26 -05:00
Savagetechguy
4daa568311
Fixed Villager Position when Sleeping (#933)
* Update Entity.java

* Switched to VillagerEntity.java and added indents and whitespace

* Fix indents and whitespace and changed to pattern and matcher

* Clean up indentation problems

Co-authored-by: Savagetechguy <jakehorner@gmail.com>
Co-authored-by: Redned <redned235@gmail.com>
2020-07-11 12:20:03 -05:00
rtm516
5e664882b1
Fix no gravity falling block entities (#927)
* Fix no gravity falling block entities

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

* Add spacing

Co-authored-by: AJ Ferguson <AJ-Ferguson@users.noreply.github.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-07-10 09:43:52 -05:00
DoctorMacc
fe254380dc Clean up some TODOs 2020-07-08 12:36:26 -04:00
DoctorMacc
40032987fa Add magma cube jumping visual 2020-07-07 19:27:12 -04:00
DoctorMacc
0cea703b46 Save ItemEntry classes for items 2020-07-07 16:40:19 -04:00
rtm516
c2be7a181d Fix Piglin bartering animation (Fixes #863) 2020-07-07 16:11:52 +01:00
RednedEpic
24f9651cc6 Convert map of players to list (may address #833) 2020-07-06 20:11:34 -05:00
RednedEpic
da1674c8d6 Update to Cloudburst NBT 2.0 2020-07-05 15:59:44 -05:00
DoctorMacc
4062f1ee55 Fix flower pots and item frames 2020-07-05 00:03:51 -04:00
DoctorMacc
a7fbe995f8 Add comment and check for null when removing passengers 2020-07-04 10:26:32 -04:00
rtm516
da96a5b19c Fix Strider cold state when riding and removing of the RIDING flag when a parent is killed 2020-07-03 22:55:54 +01:00
DoctorMacc
c17f21eedc Fix respawn bugs - hopefully for good
Thanks to @bundabrg for spotting this one.
2020-07-01 12:28:03 -04:00
rtm516
e7fae53552 Fix Strider shaking 2020-06-30 13:51:44 +01:00
rtm516
a9bb8745f5 Fix Zombified Piglin fire flicker 2020-06-30 13:20:03 +01:00
DoctorMacc
ba6adc988b Strider mounting fixes; update mappings
This commit refactors health visual logic to make it a global system for each living entity.
2020-06-29 21:34:01 -04:00
rtm516
d394cc6280 Update entity metadata 2020-06-29 15:37:54 +01:00
rtm516
91c33242c6 Fix baby states and collisions of 1.16 mobs 2020-06-29 14:40:06 +01:00
DoctorMacc
e60f47f65d Fix zombified piglins 2020-06-25 22:52:48 -04:00
DoctorMacc
409293f1db Add new 1.16 entities 2020-06-25 22:32:04 -04:00