* Scoreboard: update score on UpdateType.ADD
* Actually fix
* Readd the Objective when a score changes
It looks like Objectives only update when you Remove the Objective and add it back using the SetDisplayObjective. This is hopefully a hotfix, but I think that there is no better way.
* Explain score tracking
Co-authored-by: Tim203 <mctim203@gmail.com>
* send resource packs
A lot of this code is nukkit-credits in the classes
* send resource packs
A lot of this code is nukkit-credits in the classes
* Remove unnecessary code/debugs
* use separately generated hashes
* Updated mappings and added .mcpack support
* "packs" directory auto-create (#484)
* "packs" directory auto-create
* cleaned indentation in ResourcePack.java
* Cleaned ResourcePack.java
* Another cleanup
I hate editor on github.
* Yet another
* Another indentation cleanup
* Fix resource pack loading
(cherry picked from commit f93b07491e)
* Move back to internal sha256 hashing
(cherry picked from commit 812a3d82b2)
* Add resource pack loading back after merge
* Add comments, config option and removed unused files
* Fix packs folder location and cleanup code
* Move to better options for the client
* Fix typos in comments
* Fix pack loading
* Try to make it compile
* Final touches?
* Add Javadoc for MathUtils#constrain
Co-authored-by: EOT3000 <43685885+EOT3000@users.noreply.github.com>
Co-authored-by: Vesek <61123478+Vesek@users.noreply.github.com>
Co-authored-by: Heath123 <heath.mitchell27@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
* 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
* 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
* Pick block improvements
- Creative block picking is now implemented. If the survival-styled block picking fails, then the item is created, following Java-style mechanics.
- Entity 'picking' is also implemented. The item is crafted using the same mechanics, and the same rules apply as normal block-picking (except it only works in creative mode, following Java.
* Switch some logic around
* Translate CanPlaceOn/CanDestroy NBT
This commit adds support for the translation of the CanPlaceOn/CanDestroy NBT for Bedrock clients.
* Remove debug line
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.
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.
* 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
- Relocate all of our dependencies. This does not include MCProtocolLib and Nukkit dependencies at this time as there are no other known plugins that use these dependencies.
- Switch to a static commit for Adventure dependencies.
Tested working on all versions.
* 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
* Downgrade reflections to 0.9.11
* Add comment explaining downgrade
* Move to pre-build reflections
* Update skins to use https and relative cache dir
* Move to https OptiFine cape url
* Add javadoc to isProduction
* Add ANDROID as a platform type
* Re-ordered PlatformType
* Change stop command to call onDisable
* 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
* Added config option to standalone Geyser
* Cleanup
* Added --gui, --nogui options
* Made new options read default config.yml from correct place internally
* Changed to locale strings rather than hardcoded English
* Using separate options texts
* Changed '-c' to be string parameter so it isn't translated
* Translate client-computed recipes
A handful of recipes are complex enough on Java Edition that the client simply calculates them after getting an assurance that they are valid recipes. This PR stores those recipes in a Bedrock-compatible format in mappings, then generates the CraftingData information on startup to send to the Bedrock client when called. This fixes firework rocket and star crafting, and fixes leather armor and shulker box dyeing.
The recipe information for everything except leather armor was taken right from the Bedrock server. The leather armor had to be created separately (see https://github.com/DoctorMacc/LeatherDyeingCreation). There will be a slight visual difference in the crafting result preview if the armor is not perfectly dyed to one of the sixteen colors, but this is a visual issue that will persist unless we calculate every single possbile combination.
* Revert other changes
* Register shulker box recipes properly
* Add break
* Update mappings
* Add shulker box item tooltip translating
This commit adds support for previewing the items inside of a shulker box. This does not do a full translation, and only does enough to translate the item information to the client, so as to prevent any accidental item modifying/removing on creative mode.
* Swap values
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.