Commit Graph

51 Commits

Author SHA1 Message Date
Camotoy bc0cfde8f9
Set the minimum Java version to 16; drop Bedrock 1.17.0 (#2477) 2021-09-10 14:10:56 -04:00
David Choo 8461cf76b7
Smooth Pistons (#1542)
With proper piston collision for players as well.
2021-09-09 21:20:25 -04:00
Camotoy a1d167d5f1
Ensure skull operations are done on the player thread 2021-08-21 19:38:13 -04:00
Camotoy 3d04a957d0 Ensure that exceptions in player event loop are handled
Any stray exception means that the entire event loop comes crashing down.
2021-08-17 20:57:46 -04:00
Camotoy 7ae91a40ec
Ensure every packet is ran on the same thread per player (#2473)
This removes a lot of concurrency checking that needs to be done, because there should be no way two packets can be handled at the same time.
2021-08-16 20:39:29 -04:00
Redned f7ef90278b
Implement a new registry system (#2306)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-07-12 21:19:40 -04:00
Camotoy 0162257d30
Glowing text on signs is Bedrock 1.17.10. :( 2021-06-06 09:55:38 -04:00
Camotoy fc4f2b7890
Remove usage of translation strings for code-related errors
These should never ever be seen by a normal user, and if so, developers need to see the proper error message
2021-06-06 09:35:56 -04:00
Camotoy ebf726ce9e
Yeet cache chunks
So many features require this config option, and we don't intend on supporting it being both disabled and enabled.
2021-06-01 15:36:33 -04:00
Camotoy 10c77a3214
Fix sign color changes messing with character count (#2054)
Color changes do not affect the maximum amount of characters allowed on a line.
2021-03-21 11:28:19 -04:00
Camotoy ded00dfd97
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-03-09 14:45:04 -05:00
Camotoy 9ae7c1de25
1.16.210 support (#2019)
This commit implements 1.16.210 support while still keeping 1.16.100 and 1.16.210 compatibility.

Co-authored-by: AJ Ferguson <AJ-Ferguson@users.noreply.github.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-03-09 12:51:48 -05:00
Camotoy acbcf4baf3
Fix shulker boxes resetting data and set all shulker boxes as valid 2021-02-25 21:51:50 -05:00
Camotoy 78337830c6
Use the real block for opening inventory when possible 2021-02-12 14:39:41 -05:00
Camotoy 47879c913b
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-02-04 21:25:29 -05:00
Brave Chicken db38b0d45d
Fix EndGateway translation issue (#1892)
* Fix EndGateway translation issue.

* Change contains check to instanceof LongTag as requested.

* Add space after if as requested.

Co-authored-by: Brave_Chicken <bravechickengamer@gmail.com>
2021-02-02 11:40:28 -05:00
Camotoy 4db9ec92bf
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-01-11 19:46:39 -05:00
Camotoy 396d1b6b61
Fix items on campfires (#1779) 2021-01-01 18:33:21 -05:00
Camotoy 2a5c134ea7
Update server inventory copyrights to 2021 2021-01-01 14:22:26 -05:00
Camotoy 8317961340
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-01-01 14:20:52 -05:00
Camotoy 186d94917a
Update copyright to 2021 (#1772)
* Update copyright to 2021

Free commit!

* These don't need a copyright

* Don't downgrade the mappings
2021-01-01 10:10:36 -05:00
Camotoy 0f735a8330
Block entity cleanup 2020-12-23 12:37:55 -05:00
Camotoy ff4f712eda
Implement beacon 2020-12-23 12:30:36 -05:00
Camotoy 82179797ab
Add proper ominous banner translation (#1692)
The ominous banner is a separate banner type in Bedrock. If we detect the ominous banner pattern, then we set the ominous banner type in NBT. This process is also checked vice-versa, allowing the ominous banner to be pulled from the Bedrock creative menu.
2020-12-16 12:50:16 -05:00
OnlyBMan 2c0f3ec84d
Custom skull block support (#683)
Custom skulls are now implemented within the world when placed as a block. This is achieved by placing a fake player entity in the same spot.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: bundabrg <brendan@grieve.com.au>
Co-authored-by: bundabrg <bundabrg@grieve.com.au>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-12-04 16:55:24 -05:00
rtm516 512f8cd6c2
Rewrite message handling in MessageUtils to use Adventure (#1498)
* 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>
2020-11-16 23:57:57 +00:00
Tim203 c64d57439f
Block entity performance improvements (#1481)
* 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>
2020-11-05 22:36:22 +01:00
Camotoy 172a5a6db8
Add Fabric as a platform type (#1376)
* PlatformType: Add Fabric as a platform

* Don't use XML reflections on Fabric
2020-10-07 18:51:36 -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 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
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
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
rtm516 b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
rtm516 8807d5d9c6 Fix banner block patterns 2020-07-07 14:30:33 +01:00
rtm516 cfaf4051b7
Add Translation support (#504)
Adds full multi-language support to any Bedrock-supported language.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-07-05 19:35:51 -04: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 0471fa89f4 Bedrock 1.16 updating part 2 (Doesn't work) 2020-06-22 21:21:42 -04:00
rtm516 ad4c1ff0c7 Update Message system 2020-06-19 11:57:34 +01:00
DoctorMacc d6119375b2 (Incomplete) Update MCProtocolLib 2020-06-18 21:44:50 -04:00
Camotoy 7fcd8f2daf
Fix block entities on older versions (#756)
* Fix block entities on older versions

This commit solves two problems related to block entities on older versions:

- Occasionally, tags would contain the ID under a StringTag with an empty value, and not the ID tag.
- The block entity regex did not account for block entity tags that were already in a Bedrock-compatible format (BlockEntity)

* Move BLOCK_ENTITY_TRANSLATIONS to BlockEntityTranslator
2020-06-10 18:02:29 -05:00
RednedEpic 6b68bbb413 Large refactoring to item translator and registry/util classes
- Merged ItemTranslator and ItemStackTranslator together.
- Split ItemTranslator into two classes: ItemTranslator and ItemRegistry. The registry is where items are registered, and the translator class is where item translation takes place.
- Made most of ItemTranslator's methods static and removed the initialization in Toolbox.
- Moved a handful of registry classes previously ending with 'Utils' to a 'Registry' class to be more fitting for the term.
- Moved inventory and block entity registration out of Translators.
- Renamed Translators to PacketTranslatorRegistry.
- Yeeted Toolbox.
- Minor cleanups and small refactors.
2020-05-24 20:07:05 -05:00
rtm516 405ffb2666
Added mob spawner block entity data (#587) 2020-05-17 23:35:01 -05:00
rtm516 919af5203d
Fix banner items loosing patterns in inventory (#560) 2020-05-14 19:41:42 -05:00
Camotoy 34d4817795
Add visual support for double chests (#523)
* Add visual support for double chests

* Update mappings submodule
2020-05-10 14:26:00 -05:00
Camotoy f11bae0bf0
Fix signs (#439)
* Fix signs on everything except Paper

* Fix sign line placement

* Update shulker box block entity

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
2020-05-06 16:52:57 -05:00
Luke 7195d20fae
Implement helper methods for sending packets (#487)
* Implement helper methods for sending packets, fixes an NPE when chatting before connecting to the remote server

* Change method names

* Add a space between doc comment lines

* Add debug messages
2020-05-05 10:51:43 -05:00
Camotoy b49004ddaf
Add block entity translators for Bedrock-only block entities (#478)
* Initial work on flower pots

* Flowers work in-game, not yet chunk load

* Don't overwrite my code before merge

* Finish up flower pots; add piston support on chunk load

* Clean up

* Remove debug line; update mappings
2020-05-04 21:32:02 -05:00
RednedEpic 3370ad3db9 Merge branch 'master' into feature/sounds 2020-05-02 23:06:53 -05:00
RednedEpic 1fbb755d26 Merge branch 'master' into sound-master 2020-04-29 15:14:25 -05:00