Commit Graph

102 Commits

Author SHA1 Message Date
rtm516 b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
AJ Ferguson 5b1116b15a
Creative items (#1013) 2020-07-24 15:42:15 -04:00
Camotoy ad9184ad13
Update Adventure-Legacy dependency (#996) 2020-07-22 14:52:12 -04:00
rtm516 30c007d04b
Fix buckets not working on mobile (#767)
Desktop clients send an extra item use packet for buckets whereas mobile clients dont send the second use packet causing the issue as a ClientPlayerUseItemPacket doesn't get sent to the Java server.

Buckets on mobile may still be glitchy as the player must be directly facing the block they want to place liquid on.
2020-07-21 13:17:55 -04:00
rtm516 04e73efd94
Fix enchantment conversion (#920)
* Fix java to bedrock enchantments

* Fix NBT conversion and add Soul Speed enchantment

* Remove unused import
2020-07-14 02:18:11 -05:00
RednedEpic e7657c7d07 Fix enchantments for servers that don't namespace them (Fixes #897) 2020-07-11 19:52:20 -05:00
RednedEpic 5ceb4145ac Fix fireworks (Closes #917) 2020-07-11 19:40:26 -05:00
rtm516 485ba1b8a7
Check the name tag exists for anvil renaming to prevent an NPE (#936)
* Check the name tag exists for anvil renaming to prevent an NPE

* Fix item names being empty if display tag exists with no name
2020-07-11 21:58:12 +01:00
DoctorMacc 0cea703b46 Save ItemEntry classes for items 2020-07-07 16:40:19 -04:00
rtm516 5f6566ad0e Move to dynamic item ID mapping in ItemRegistry 2020-07-07 16:23:21 +01:00
rtm516 c2be7a181d Fix Piglin bartering animation (Fixes #863) 2020-07-07 16:11:52 +01:00
rtm516 75f2891ec0 Fix map_uuid nbt type 2020-07-07 14:47:56 +01:00
DoctorMacc f9760b721c Don't process the display tag if it's empty 2020-07-07 08:30:11 -04:00
AJ Ferguson 50176e10a8 Fix inabilty to place items into brewing stand 2020-07-06 23:44:39 -08:00
rtm516 ba736575f7 Fix RGB colors on signs causing chunk issues, fix items names not being displayed correctly 2020-07-06 23:36:04 +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
rtm516 a9bb8745f5 Fix Zombified Piglin fire flicker 2020-06-30 13:20:03 +01:00
AJ Ferguson eb3bde15a7 Fix stored enchantments accidentally being dropped 2020-06-29 16:59:02 -08:00
AJ Ferguson 95144266d2 Handle int tag for enchantment level 2020-06-29 16:59:02 -08:00
rtm516 7710261b70 Add Loadstone Compass tracking 2020-06-30 00:52:32 +01:00
AJ Ferguson e77f2b5dbb Drop long array nbt tag when translating to bedrock 2020-06-29 10:59:51 -08:00
DoctorMacc 54f6fada12 Remove try/catch from BlockTranslator and ItemTranslator 2020-06-26 11:15:21 -04:00
DoctorMacc ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -04:00
DoctorMacc 117cdf282d Begin updating Geyser. Requires manual MCProtocolLib compile 2020-06-20 22:24:45 -04:00
rtm516 ad4c1ff0c7 Update Message system 2020-06-19 11:57:34 +01:00
rtm516 a6f91d5e15
Fix maps not loading in sometimes (#758)
* Fix maps not loading in sometimes
Adds a default map ID so the map item isnt invisible on bedrock.
Respond to the MapInfoRequestPacket so the image loads on first join.

* Remove debug log

* Add comments
2020-06-15 14:24:52 -04:00
DoctorMacc 4c5d80e2e9 Update to latest master 2020-06-05 22:52:11 -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
rtm516 1a92f6974c
Add byte conversion to allow int NBT values for Fireworks (#681)
Firework NBT data might be either an int or byte and bedrock only takes it as a byte.

Co-authored-by: Arktisfox <65837019+Arktisfox@users.noreply.github.com>
2020-05-28 11:38:23 -04: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
rtm516 3a39e9afee
Added Crossbow nbt translator (#590)
They still infinitely reload but they correctly track if they have data in now.
2020-05-24 15:51:30 -04:00
RednedEpic 56d84c24d3 Reduce nesting in item nbt translators 2020-05-24 14:21:06 -05:00
RednedEpic 6dabc22d22 Add null check for fireworks tag (Closes #636) 2020-05-24 13:20:38 -05:00
Camotoy fe6257bb38
Check if firework item explosions tag is null (#626) 2020-05-23 21:16:11 -04:00
Camotoy 59da87a10f
Merge entity mounts branch to master (#589)
* Initial support for entity mounts*

* This only works for viewing other players on mounts/vehicles. Currently, mounting on vehicles through Geyser with bedrock does not work at all, though, you can see other Java players on mounts just fine.

* Fix Bedrock player mounting; add minecart offset

* Remove debug code

* Fix boat animation

* Remove debug code

* Add notice of possible steering flip

* Add translator for PlayerInputPacket

* Upload WIP code for BoatEntity.java

* Add animation for rowing on Bedrock side

* Clean up debug code, start on boat movement

* Add notice about flying horses

* Rename BedrockPlayerInputPacket.java to BedrockPlayerInputTranslator.java

* Delete BedrockPlayerInputPacket.java

* Use Translator Annotation again; Thanks to LegacyGamerHD

* Upload ineffective mount-on-login code

* Upload current changes with no debug code

* Change case where applicable

* Change Integer[] to int[]; Change schedule() to execute()

* Don't use Thread.Sleep() and instead call itself again

* Fix players not being linked on login/chunk load

* Little changes

* Minor improvements/fixes to boats

* Remove empty file

* Fix horse flying.

* Various entity mounting fixes

* Add mounting offsets for skeleton and zombie horses

* Another round of entity mount-related fixes

- Add offsets for skeleton and zombie horses (Thanks to tester DirtNasty)
- Boats can now be placed in survival (Thanks again to tester DirtNasty)
- Boats and minecarts can now shake

* Add translating for ServerVehicleMovePacket

* Cleaning up

* More cleaning up

* Add interactive tag support for mountable entities

* Boats move far more nicely

* Add horse heart visuals

* Update interactive tags

Co-authored-by: RednedEpic <redned235@gmail.com>
2020-05-23 16:39:17 -05:00
rtm516 d8d9fb7190
Fireworks! (#579)
* Fixed firework entity

* Added firework item translator

* Fixed mappings submodule
2020-05-23 16:33:39 -05:00
rtm516 95b7055c10
Added map icons (#572)
* Added map icons

* Cleaned up and moved to enum
2020-05-16 23:58:00 -05:00
RednedEpic 30e38b3a2f Add basic villager trading support (incomplete)
This commit implements basic functionality for villager trading. This is still incomplete and is buggy in areas such as with villager trades that have more than one input and trade inputs and outputs containing NBT.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-05-16 23:52:39 -05:00
rtm516 919af5203d
Fix banner items loosing patterns in inventory (#560) 2020-05-14 19:41:42 -05:00
RednedEpic 3370ad3db9 Merge branch 'master' into feature/sounds 2020-05-02 23:06:53 -05:00
Camotoy 9846058377
Add item frames (#415)
* Initial attempt

* Item frames 'work'

* Blocks in the item frames work

* Remove commented code

* Small changes

* More progress

* Whittling down

* Fix swords, etc

* NBT data implemented

* Remove unused import

* Add item frame item removing; add checks for removing item frames

* Add requested changes; clean up logic

* Add license

* Always delay item frame updates by 500 milliseconds

* Switch to per-session item frame cache

* Revert item translator refactoring
2020-05-02 15:44:05 -05:00
RednedEpic 1fbb755d26 Merge branch 'master' into sound-master 2020-04-29 15:14:25 -05:00
ForceUpdate1 87be8c378e
Fix Item Name and Lore (#443)
* add basic item translator

* add licence
remove debugs

* fix default lore
2020-04-29 10:58:29 -05:00
RednedEpic 497825dd96 Fix NPE in console when a sound was missing and clean up nesting 2020-04-25 18:23:01 -05:00
OnlyBMan e82adf2cf9
Implement shield blocking (#395)
* basic shield blocking

* Offhand works

* Add Shield as id in BlockTranslator

* Change Block Translator to Item Translator

* Fix formatting

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: Redned <redned235@gmail.com>
2020-04-24 22:11:28 -05:00
RednedEpic 59b2805a4a Fix NPE for unknown enchantments/enchantments not in bedrock 2020-04-23 02:09:40 -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
RednedEpic 79185fabb5 Only send block sounds when a block is being placed
Previously, any time a block was clicked whether it be with a block in the hand or not, a sound would play. This checks if the item in the players hand is indeed a block as well as the same block in the UpdateBlockPacket, and properly plays the packet.
2020-04-23 01:01:33 -05:00