Commit Graph

20 Commits

Author SHA1 Message Date
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 24e5d34ce9 Cleanup 2019-11-29 15:49:29 -09:00
AJ Ferguson 489c39e900 Start adding support for crafting
Expect bugs
2019-11-27 18:55:58 -09: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
AJ Ferguson 06358b2449 Update JavaSetSlotTranslator.java 2019-10-20 15:24:29 -08:00
AJ Ferguson 8ae803b9a5 Add delay when reopening inventory 2019-10-20 13:52:21 -08:00
AJ Ferguson 3812712a06 Remove debug messages 2019-10-20 13:29:21 -08:00
AJ Ferguson 88648f705e Work on inventory transactions
work in progress
2019-10-20 13:25:41 -08:00
RednedEpic 6ba8614612 Move inventory translators to the proper package 2019-07-29 17:28:01 -05:00