Commit Graph

23 Commits

Author SHA1 Message Date
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 c1f5380ed1
Add horse inventory support 2020-12-26 12:20:59 -05:00
DoctorMacc 049242db4b
Update to 1.16.200 2020-12-09 01:12:02 -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 045c0e0637
Introduce CommandSender.getLocale() (#1431)
* 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
2020-10-29 18:30:52 -04:00
Camotoy ae70dbeece
JavaOpenWindowTranslator: Use MessageUtils for inventory name (#1416)
* JavaOpenWindowTranslator: Use MessageUtils for inventory name

* Remove important messaging
2020-10-17 23:13:04 -04:00
AJ Ferguson 7f4b588cdf server inventory. WORK IN PROGRESS
wip commit of implementing server authoritative inventories. there is a lot of experimental and debug code. this is NOT ready for testing or review.
2020-10-16 15:25:05 -08:00
Camotoy a5b00e09a1
Villager trade fixes (#1350)
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>
2020-09-29 13:19:37 -04:00
AJ Ferguson 1d8995efe6
Add minimum delay between closing and opening a new window (#735)
Should fix new windows not showing up with some plugins like Lottery.
2020-06-04 14:49:32 -04:00
AJ Ferguson 3d357af739
Inventory Fixes (#602)
* Fix edge case when shift clicking an output slot

* Don't send window close packet if window is already closed

* Limit amount of window close packets sent to the client

Fixes hidden inventory bar bug

* Restrict user from unusable chest inventory slots

* Fix crafting table slot mappings

* Always send cursor update
2020-06-02 08:48:26 -08: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
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
RednedEpic be9396f585 Merge branch 'master' into inventory 2020-04-02 17:01:17 -05:00
Ender bbf6683bd8 Make all translators annotation based 2020-03-23 23:24:17 -05:00
RednedEpic 6b22bcec2b Merge branch 'master' into inventory 2020-03-04 21:35:20 -06:00
AJ Ferguson 1a9aa4255f Some refactoring and bug fixes
Still much to do.
Inventory desyncing when crafting will be fixed soon.
2020-01-30 16:05:57 -09:00
AJ Ferguson 5e5aeed578 Merge remote-tracking branch 'remotes/upstream/master' into inventory 2020-01-30 12:08:39 -09:00
RednedEpic dc594ee22c Update license headers
Certain headers for classes that are to be removed (e.g. plugin api) were not updated to prevent merge conflicts.
2020-01-08 21:05:42 -06:00
AJ Ferguson 5797dc2c7e Add inventory names
Some translation identifiers such as "container.blast_furnace" are not being translated yet
2019-11-01 01:07:13 -08:00
AJ Ferguson 24c27a03a9 Various fixes
Fix offhand, use AtomicInteger for transaction id, send null stack instead of air, and clear open inventory on dimension change
2019-10-22 15:31:03 -08:00
AJ Ferguson 4074582059 Close open inventory before opening a new one 2019-10-20 19:41:46 -08:00
RednedEpic 6ba8614612 Move inventory translators to the proper package 2019-07-29 17:28:01 -05:00
Renamed from connector/src/main/java/org/geysermc/connector/network/translators/java/JavaOpenWindowTranslator.java (Browse further)