* 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>
Fishing rods pulling players is a clientside feature on Java. On Bedrock, a SetEntityMotionPacket is sent to the client. Therefore this PR implements the Java fishing rod pulling mechanics and sends it off to Bedrock, which sends MovePlayerPackets that are sent to the server.
* 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
* 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
This commit mainly focuses on fixing the crashing of villagers that occurred pre-1.14.
Co-authored-by: AJ Ferguson <AJ-Ferguson@users.noreply.github.com>
* Remove 'geyser' from parameters when executing a command under Spigot, Bungeecode, Sponge, Velocity
Fixes https://github.com/bundabrg/GeyserReversion/issues/8
* Fix case when there are no sub commands
Co-authored-by: bundabrg <bundabrg@grieve.com.au>
In vanilla Bedrock, if you have operator status, the client sends a packet to change gamemode without confirmation from the server. Since we have a custom server option to request the gamemode, we just reset the gamemode and ignore this packet.
* Fix picking up liquids with buckets
The last fix to prevent bucket placement upon interacting with an inventory had an oversight with empty buckets, making them unusable. This commit fixes that while keeping the previous fix.
* Remove debug line
* Fix milk drinking and visual bucket item apperance
* Comment elaboration
* Make indentiation better
* 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
* 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