Commit Graph

1457 Commits

Author SHA1 Message Date
Camotoy f9c1d3f218
Remove Protocol v409 support (#1300)
* Remove Protocol v409 support

Protocol has dropped support for this version.

* Fix movement

* Use a static commit for Protocol
2020-09-16 00:11:56 -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 f5a9254fae
Disconnect player if Java sends disconnection (#1274) 2020-09-14 20:53:47 -04:00
Camotoy 9c8eb00cd5
JavaCollectItemTranslator: check null for entities (#1267) 2020-09-14 20:52:50 -04:00
Camotoy 3b274ef9d1
Pick block improvements (#1265)
* 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
2020-09-14 20:52:16 -04:00
Camotoy 1e1402a23f
DumpInfo: Mark internal IP as sensitive (#1264)
Sometimes the internal IP is the external IP of the server.
2020-09-14 20:51:07 -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 46c34842d8
BedrockInventoryTransactionTranslator: check to make sure bucket usage is on purpose (#1280)
Otherwise buckets can be activated when opening block inventories.
2020-09-12 09:47:43 -04:00
Camotoy 8c8630814d
Update to 1.16.3 (#1272)
* Update for 1.16.3-rc1

* Update to 1.16.3

* Update README

* Update MCProtocolLib
2020-09-10 10:30:56 -05:00
Camotoy d47360d6fb
GeyserSession: send command permission level OPERATOR if qualified (#1254)
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.
2020-09-05 16:22:31 -04:00
Camotoy 854849f63c
Update mappings to fix 1.16 wood slabs (#1249) 2020-09-04 14:08:04 -04:00
Camotoy 5b76a85895
Non-full-chunk support (#574)
This commit adds non-full chunk support if chunk caching is enabled.
2020-09-03 19:00:36 -04:00
Camotoy 4c58568eb4
Relocate Google Common (#1242)
Fixes NoSuchMethodErrors from occuring on certain Spigot servers.
2020-09-02 23:42:53 -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
Camotoy dcf1731d8a
Implement correct sign wrapping (#1228)
* 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
2020-09-01 23:38:36 -05:00
Camotoy 81a48bf96d
Relocate the rest of our dependencies (#1227)
- 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.
2020-09-01 23:38:10 -05:00
Comstepr b97bf56d99
Minor changes to config.yml (#1224) 2020-09-01 23:37:49 -05:00
Camotoy 6f161a380f
GeyserSession: Always set Keep Inventory to true (#1213)
* 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
2020-09-01 23:37:24 -05:00
Camotoy d717085c6b
JaveNotifyClientTranslator: Translate invalid bed message (#1212)
This isn't sent as its own message but as a specific event.
2020-09-01 23:36:53 -05:00
Camotoy 7c4868cada
LocaleUtils: don't NPE if no default locale mapping exists (#1239) 2020-09-01 18:29:53 -04:00
Camotoy b5f6ada4ae
ScoreboardUpdater: Quick fix to lessen CPU usage (#1238)
This prevents one/multiple CPU cores from taking up 100% usage. A better, permanent fix will replace this in the coming days.
2020-09-01 19:30:40 +02:00
Camotoy 2f9ff0c622
ShulkerBoxItemTranslator: Ensure Items ListTag is present (#1221)
* ShulkerBoxItemTranslator: Ensure Items ListTag is present

* Compile
2020-08-30 00:18:23 -04:00
RednedEpic 37c4192c12 Show the supported Bedrock versions in the version command rather than just the default codec 2020-08-28 19:11:32 -05:00
jackson-57 caa5098d2c
Fix minor spelling error in issue template (#1214) 2020-08-28 16:58:37 -04:00
Camotoy 3f00803499
connector/pom.xml: Move back to main MCProtocolLib repository (#1211)
Fixes a regression where ClientPlayerAbilitiesPacket was sending the incorrect flag.
2020-08-28 15:16:35 -04:00
rtm516 79bf56a75c
Tweaks to support Android (#1206)
* 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
2020-08-28 19:36:24 +01: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
rtm516 7cbfdcf521
Fix reflections relocation (#1199) 2020-08-28 10:29:48 -05:00
abeshi-softwire 5458a85ed7
Adding option to use different config file for standalone (#1102)
* 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
2020-08-25 17:39:51 -04:00
James Cahill 81f58ee9bf
Add Server Name config option (#1170)
* Add bedrock.server-name config option

* Fix spelling mistake oops!

* Remove trailing whitespace
2020-08-25 09:29:55 -04:00
Camotoy c1a70c7754
Translate client-computed recipes (#1181)
* 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
2020-08-24 21:14:44 -05:00
Camotoy 6e8106eeec
Add shulker box item tooltip translating (#1189)
* 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
2020-08-24 21:05:39 -05:00
Camotoy 65c45386b9
Update mappings (#1196) 2020-08-24 21:04:25 -05:00
Camotoy aaa3d7238d
BedrockEmoteTranslator: ensure sending player is valid for all other sessions (#1194) 2020-08-24 10:26:37 -04:00
Camotoy 8b7165a564
Implement (hopefully) temporary dimension switching fix (#1188)
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.
2020-08-24 09:31:21 -04:00
E404NNF 1d5b453595
Add a warning at start about movement translation (#1069)
Co-authored-by: Redned <redned235@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-08-23 11:34:09 -04:00
Comstepr a306e9d35b
Add smithing table to what's left to be added/fixed (#1187)
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-08-23 11:29:02 -04:00
EasyClifton 73e09def06
Add Loom to fix list (#1185)
Added loom to the What's Left to be Added/Fixed list.
2020-08-23 11:24:31 -04:00
Jordie 2d6264d7c1
Add visual support for signs colored with dye (#1180)
* Fix dyed signs in Bedrock Edition

Add visual support (in Bedrock Edition) for signs colored with dye (in Java Edition)

* Javadoc for getBedrockSignColor(string)

* Simplified getBedrockSignColor(string)
2020-08-22 16:39:40 -04:00
Camotoy 713085adf2
Fix NPE if block data string isn't in mappings (#1172)
This happens when the server version is below the current version and the block state changed. A better solution would be to use ViaVersion to translate the block state strings but this would require getting the server version and figuring out mappings from there.
2020-08-21 12:02:09 -05:00
Camotoy 94d6c872b1
Prevent a comma from appearing if Geyser fails to bind (#1174) 2020-08-21 12:01:50 -05:00
Camotoy ee42067d87
Don't play a sound when falling onto a block (#1175) 2020-08-21 12:01:38 -05:00
Camotoy 7fcfa7d54d
Implement an enchantment table GUI (#1177)
Until 1.16, enchantment tables were impossible to implement properly in Geyser. When a user selects an enchantment in Bedrock, the client creates the book on its end and assumes the server is OK with it. Java requires a button to be pressed to select the enchantment. With 1.16, server authoritative inventories remove that on Bedrock. However, until our inventory rewrite is finished we are still stuck without enchantment table support. This commit serves as an alternative as we wait.

Enchantment table GUI support is still impossible since we are using the pre-1.16 inventory system. To solve this, this commit replaces the enchantment table GUI with a hopper GUI. The first slot serves as the spot you place the weapon. The second slot acts as the lapis slot - Geyser prevents any item from going in there that is not lapis. The final three slots act as the buttons; an enchanted book acts as each button, with the ability to show the translated text of each enchantment.

https://cdn.discordapp.com/attachments/613194828359925800/746164042359504927/unknown.png
2020-08-20 20:53:47 -04:00
Camotoy d6290ccb66
Auto-configure more if setting is enabled (#1168)
* Auto-configure more if setting is enabled

- Geyser dumps now show if the config was automatic
- Floodgate is now automatically detected if the address is also automatically found
- If the plugin versions' servers have the listening address set to something different, set our remote address to that

* Fix Sponge config

* Remove redundant Getter
2020-08-19 13:14:17 -04:00
James Cahill e7363b4e9f
Add 'passthrough-protocol-name' config option (#1124)
* Initial version (tested)

* Don't bump config version

* Misc changes

* Add punctuation to config
2020-08-17 22:36:15 -05:00
RednedEpic 80a36344eb Only one of the values here needs to be greater than 0 2020-08-17 20:46:03 -05:00
RednedEpic 44f521ed04 Set player motion when explosion takes place 2020-08-17 20:40:57 -05:00