Commit Graph

37 Commits

Author SHA1 Message Date
Camotoy d69896b381
Fix NPE when no item can be found from a block (#1718)
This commit also removes an old map previously used for block entity translators
2020-12-20 20:40:21 -05:00
Camotoy 2f2164f387
InventoryUtils: Don't send Java packet on hotbar item selection (#1301)
The Bedrock client sends a confirmation packet we translate regardless.
2020-09-17 23:07:20 -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
RednedEpic 04cf8b2a99 Fix javadoc errors 2020-08-08 17:56:15 -05:00
AJ Ferguson b9846fe797
Small inventory fixes (#1029)
* Increase minimum delay between closing and opening a new window

* Fix potential crash when opening player inventory
2020-07-27 11:17:55 -04:00
DoctorMacc fe254380dc Clean up some TODOs 2020-07-08 12:36:26 -04: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
Tim203 8f763dfc5f
Move common stuff used only by connector and bootstrap to connector 2020-06-28 00:27:00 +02:00
AJ Ferguson ba9129129c Quick inventory fixes. WIP
Temporary. The inventory system will be rewritten very soon.
2020-06-26 18:51:09 -08:00
DoctorMacc ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -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
rtm516 a91eaa7821
Add item name translation (#559)
* Added item name translation

* Change to more appropriate NPE catch

* Remove whitespace

* Switch from try/catch to null checking

* Update mappings

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-06-02 16:33:37 -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 4c1dae6714
Add unusable inventory space message (#492)
* Add unusable inventory space message

* Remove unused imports

* Fixed barrier pickup (#1)

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2020-05-06 16:05:03 -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
ForceUpdate1 733ec2a0ec
Implement Updated Item Translator (#388)
* add item translator

* add item translator

* add nbt item translator

* fix empty list tags

* formatting code

* use Int2ObjectMap
remove session

* rename annotation
2020-04-22 16:26:16 -05:00
RednedEpic be9396f585 Merge branch 'master' into inventory 2020-04-02 17:01:17 -05:00
Ender 13a58dc825 Begin making translators annotation based
Also, rename TranslatorsInit to Translators; makes alot more sense.
2020-03-23 23:03:33 -05:00
RednedEpic 6b22bcec2b Merge branch 'master' into inventory 2020-03-04 21:35:20 -06:00
AJ Ferguson bfca25bbe3 Fix compile errors 2020-02-25 22:31:55 -09:00
AJ Ferguson 3d61b3ce28 Bump OpenNBT lib to 1.4-SNAPSHOT
This fixes the NPE when sending an ItemStack with a null NBT tag.
This also fixes some item movement bugs on pure vanilla servers.
2020-01-30 23:15:18 -09: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 52b23950ea Merge branch 'master' into plugin (should fix building) 2020-01-18 16:46:07 -06: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
RednedEpic e38322a3ec Nuke plugin API
https://media.giphy.com/media/oe33xf3B50fsc/giphy.gif
2019-12-21 11:35:48 -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 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 88648f705e Work on inventory transactions
work in progress
2019-10-20 13:25:41 -08:00
Redned 30d15707a6
Merge pull request #41 from Tim203/master
Players spawn, skins and capes, scoreboard, bossbar, fixes and updated protocol lib
2019-10-11 18:56:32 -05:00
EOT3000 d99c285676 Entity interact? 2019-10-07 14:30:08 -04:00
Tim203 5eb7565b0a Third party capes, rotation fixed, wait for the client and updated protocol lib 2019-10-02 22:45:29 +02:00
RednedEpic 635a26dd60 Start work on inventory/item translators 2019-07-29 17:20:48 -05:00