Commit Graph

10 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
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 fe23c79053
Implement book editing (#1117)
* Implement book editing

Updates the PR created by @ForceUpdate1 for 1.16 support. Seems to work fine now that hand support is in MCProtocolLib.

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>

* Remove debug line

* Simplify code

Currently still borked for creative mode.

* Fix books on creative

* Bug fixes

* Fix NPE?

* Blind fixes

* Send Book update before any player actions

* Remove debug prints

* Fix out of bounds for page replace and add

* Fix editing desync and remove empty pages from the end

* Send edit packet after signing

* Refactor

* Clean up and fix creative

* Apply suggestions from code review

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

Co-authored-by: ForceUpdate1 <mneuhaus44@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
Co-authored-by: David Choo <davchoo3@gmail.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-01-07 19:40:34 -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
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
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
Arktisfox 0178492b59
Fix some book translation failures (#661)
Book pages can be sent as plain text rather than JSON. The text library doesn't use lenient parsing, so this fails, and the book isn't visible in the inventory.

This will convert the text into JSON if it's not already, before feeding it to the text library.
2020-05-25 21:19:37 -04: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
RednedEpic 56d84c24d3 Reduce nesting in item nbt translators 2020-05-24 14:21:06 -05:00
ForceUpdate1 6f7ad4b569
Implement Book pages (#408)
* add text component library
implement books

* add licence header
2020-04-23 01:26:54 -05:00