Quite a lot of changes, but I was too lazy to split them in different commits (and they'll be squashed later anyway):
* Floodgate plugin message channels are now registered (because Spigot requires that, and I guess it's better practice)
* Updated the Statistics form to match the new Forms API
* The common jar is now much smaller, because Jackson isn't needed anymore in the common module
* Fixed some bugs in Forms where empty fields would lead to excluding them in the serialization (making Bedrock complain)
And a few other things, like a new boolean in RawSkin saying if the Skin is an Alex or Steve model.
* Fix regressions from 1.16.100
- Update mappings to fix recipe regressions and item differences
- Villager trading NBT now prefers the String identifier and not the integer ID
* Fix lodestone compass breaking
* Initial work on 1.16.100 - currently crashes the client
* Update runtime item states
* Use new Bedrock runtime IDs
Bedrock now hardcodes block runtime IDs in alphabetical order of the identifiers. This commit updates Geyser to accomodate.
- Remove runtime_block_states.dat and replace it with blockpalette.nbt
- Calculate the block runtime ID based on the order of the block palette
- Separate BlockTranslator.AIR into Bedrock and Java values
- Update the second layer of chunks to use air when not waterlogged
- Don't send item palette for now, as that's what crashes the game (will look into for v415)
- Other misc. changes
* Improve second layer chunk translation
* v415 support
- Add a message warning people they are on a beta version of Geyser
* Update to protocol v417
There are still some mappings changes that need to be gone through.
* Update runtime item states and clean up item frames
* Future-proof enchanment table
* Update for v418
* Update to v419
* Apply proper air ID to waterlogged chunk layer
* Fix missing import
* Remove beta warning
* Update mappings
* Manually patch runtime_item_states and send the ITEMS registry
* Update README
* Disable grindstone and smithing inventories (since they're broken)
* Use artifactory jenkins plugin (#1548)
* Use artifactory jenkins plugin
* Bump version to 1.2.0-SNAPSHOT
Co-authored-by: SupremeMortal <6178101+SupremeMortal@users.noreply.github.com>
* Rewrite message handling in MessageUtils to use Adventure
* Move to static Adventure commit to fix a bug
* Initial test implementation
* Add RGB downgrade test
* Move MessageUtils and rename
* Clean-up and fix tests
* Fixed sign and book content handling
* Fix blank signs causing NPEs
* Fix reset before message being stripped
* Add comment about the reset character
* Fix legacy style server motds
* Fix more messages being handled wrong
* Fix title packets being handled wrong
* Fix trailing formatting characters on the end of sign lines
* Add auto updating of Java locale files
* Add en_us locale updating and hash caching
* Changes to hash determining
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
* Fix GlobalPalette translation
Global palettes don't have their own internal palette, which cannot be iterated through to create a Bedrock palette. Therefore we simply iterate over the whole palette one time. This commit also fixes a regression with flowers/pistons being on multiple chunk sections.
* Don't declare bedrockPalette until after global palette check
* Add more interactive tags (mobile buttons)
This expands our support for showing the interactive tags on touchscreen and console setups. This is not complete - specifically, the food compatibility of creatures needs to be expanded upon (I will work on this later and does not stop this PR from being mergable). This also includes:
- Creepers who are ignited with flint and steel now show up properly
- Zombie villagers now shake properly when converting and show their region outfits
* Add more food choices and add more panda entity metadata
* Re-add eating flag
* Remove debug line
* Refactor dimension usage, finish interactive tag usage, bees
* Print statements... ._.
* Don't make eating item packet data a non-constant
* Move BAMBOO to ItemRegistry
* Add missing break
* Make changes
* Minor final changes
* Fix even more entity metadata flags
* Add comment explaining magic value
* Fix horse flags and add more information
* Add more information about the Horse eating particles
* Fix crash with GSit lay and use Java bed position data
* Fix GSit's lay position
* Move Bed Position metadata to the right class
* Actually fix lay for PosePlugin
* Revert "Actually fix lay for PosePlugin"
This reverts commit 3f21261162.
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
* Fixes some issues related to Scoreboard Teams
* The cached Score info should update no matter what kind of update the Team got.
* Team entities specified at the create Team packet should also be checked if they exist as Score in the registered Objectives
* Rewrote some Scoreboard code and fixed various issues
* Minor formatting changes
* Add config option for enabling achievements
* Disabled achievements by default and added warning about commands being disabled
* Update config.yml
* Rename achievements-enabled to xbox-achievements-enabled for clarity
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
* Fireball and ghast improvements
- Ghasts now visually show if they're charging a fireball
- Fireballs are now vastly better and will update better
* Add gravity and drag to projectiles
* Add check for session close and improve fireball
* Remove motion stuff from fireball
* Make fireball hittable
* Add wither skull entity
* Small changes
* Add note about laggy fireballs
Co-authored-by: David Choo <davchoo3@gmail.com>
* BlockEntity performance improvements
* Use chunk cache if possible for block caching
* Get new block state from ViaVersion if block entity
* Add Javadoc for FlowerPotBlockEntityTranslator.isFlowerBlock
* Remove debug line
* Don't add all RequiresBlockState instances if cache chunks is enabled
* Double chest map get optimization
* Last changes
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
* Fix bell sound and visuals
The bell sound now correctly plays.
Bells will also visually ring when rung by another player.
* Compress elses
* Add more whitespace to new code
* 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
* 1.16.4-pre1 support
* Update to support ViaVersion 3.2.0 (#1358)
* Update to support ViaVersion 3.2.0
This commit updates ViaVersion integration to support their recent mappings changes.
Co-authored-by: Nassim <jahnke.nassim@gmail.com>
* Send adventure settings on gamemode change after gamemode swap
* Update Velocity to 1.1.0 proper
* Update to 1.16.4
Co-authored-by: Nassim <jahnke.nassim@gmail.com>
* Add support for more recipes
- Tool repairing
- Book cloning
- Suspicious stew
- Tipped arrows
What still needs to be done:
- Map cloning/extending (though there may be item mapping mismatch getting in the way)
- Banner duplication (couldn't figure this out)
* Add some more spacing
* Explain recipe UUIDs
* Create and position Ender Dragon Bounding Box
Currently allows the player to "kill aura" target
the ender dragon.
* Use an entity to handle attacks for each hitbox
* Use the proper flag to make entities invisible
* Clean up and add some comments
* Ender dragon entity metadata improvements
* Add doc to segment functions
* Add changes
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
* 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
Usually this happened when joining from another dimension after the player exited to the main menu on the death screen. The player would not realize that they are dead.
- Added `GeyserCommand.isExecutableOnConsole()`. If this is set to false, the command will not appear as an option in the GUI.
- Added `GeyserCommand.getSubCommands()`. If not empty, the subcommand options will now appear in the GUI.
* Predict the trajectory of projectiles and add particles
* Correct lingering potion gravity
* Update last position on move absolute
* Clean up
* Add egg to ItemRegistry and update mappings
* 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>
* Fix mob mount positions
Uses offsets from Java Edition.
* Fix Boat mount pos for multiple passengers and Fix Ravager
Remove unnecessary horse metadata
* Fix Minecart & Boat Mount Pos, Fix Player Height Offset
* Use offset of EntityType.PLAYER
* Add back metadata
* BlockStorage is never used concurrently, no need to synchronize
* initial, semi-functional, faster chunk conversion
* faster chunk conversion works well for every situation except spigot
* delete unused ChunkPosition class
* preallocate and pool chunk encoding buffers
* make it work correctly on spigot
* make field naming more consistent
* attempt to upgrade to latest MCProtocolLib
* remove debug code
* compile against my MCProtocolLib fork while i wait for my upstream PR to be accepted
* return to Steveice10 MCProtocolLib
* fix some NPEs caused by race conditions in chunk conversion
tbh the whole session should be read-write locked for every operation
* fix code style issues
* make ChunkPosition use a hashCode implementation with far better hash distribution
this should improve the performance when used as a hash table key
* ChunkCache no longer uses position wrapper objects
this yields a roughly 15-20% increase in performance when converting chunk data
* fix code style issues
* 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.
* Various Scoreboard fixes
Fixes#1328 and a few other potential Scoreboard problems
* Consistent whitespacing
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
* 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>
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