Commit Graph

63 Commits

Author SHA1 Message Date
rtm516 b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
Camotoy ad9184ad13
Update Adventure-Legacy dependency (#996) 2020-07-22 14:52:12 -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
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 f9760b721c Don't process the display tag if it's empty 2020-07-07 08:30:11 -04: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
AJ Ferguson e77f2b5dbb Drop long array nbt tag when translating to bedrock 2020-06-29 10:59:51 -08:00
DoctorMacc ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -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
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
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
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
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
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
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
DoctorMacc d7b8f08899 Fix piston/sticky piston (among others) not being able to be retrieved in creative 2020-04-15 15:24:57 -04:00
RednedEpic 1cb2e658e0 Merge branch 'master' into inventory 2020-04-14 23:40:50 -05:00
rtm516 76e29af6b8
Fixed map name 2020-04-12 01:45:31 +01:00
MrPowerGamerBR d635939c5b Add map item translators 2020-04-05 00:48:53 -05:00
MrPowerGamerBR de37046466 Add map item translators 2020-04-04 17:23:02 -03:00
RednedEpic 418026dbe6 Merge branch 'block-entities' into inventory 2020-03-05 20:00:14 -06: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 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 6bb478bda4 Merge branch 'master' into block-entities 2020-01-19 22:35:33 -06: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 da8bd8a659 Actually fix signs and start on campfire/container translators
Since signs are not sent as block (tile) entities in chunks when it comes to later Minecraft versions, caching and sending the signs after the chunk packet has been sent was the only way to fix this. Sign data sending has intentionally been delayed in JavaUpdateTileEntityTranslator in the event that a chunk takes a long time to send and the block entity data is sent first.
2019-12-30 21:55:17 -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 0720e18015 Default bedrock enchantment level to 1 2019-12-02 16:07:44 -09:00
AJ Ferguson 1b37a19280 Translate bedrock enchantments to java 2019-12-02 15:55:45 -09:00
AJ Ferguson 4eeadc6d21 Start working on translating enchantments and potions
Translation is only (java -> bedrock) for now.

Only regular potions will translate correctly. More work will be needed to translate custom potions.
2019-12-02 01:46:07 -09:00
AJ Ferguson 8bb8208a46 Merge branch 'master' into inventory 2019-11-30 15:22:50 -09:00
RednedEpic cd17dc5f4c Use FastUtil over Trove for maps/collections to reduce memory usage
This should significantly decrease the amount of RAM being used by Geyser. Previously it was using 300mb - 400mb on average. This has dropped it down to 80mb - 120mb. Ideally I'd like to decrease this value further, but that will require some more work.
2019-11-30 13:26:51 -06:00
AJ Ferguson 24e5d34ce9 Cleanup 2019-11-29 15:49:29 -09:00
AJ Ferguson 12c049709a Fix item nbt translator
Mineplex server seemed to be sensitive about quotes in string tags
2019-10-21 03:16:02 -08:00
AJ Ferguson 88648f705e Work on inventory transactions
work in progress
2019-10-20 13:25:41 -08:00
RednedEpic eabbacaaad Remove unnecessary null checks for missing mappings
"Missing mappings" are given placeholder values upon startup, so these null checks are pointless.
2019-10-15 22:21:44 -05:00
RednedEpic 5cf96ec5be Update to latest MCProtocolLib version 2019-10-13 15:28:03 -05:00
RednedEpic 8c541304a6 Convert item and block maps in Toolbox to TIntObjectMaps 2019-10-11 18:38:34 -05:00
RednedEpic a125967ec3 Implement new remapper 2019-10-09 19:11:50 -05:00
Redned ef7800a739 Move block translations to separate class
This is to be expanded upon further at a later date
2019-09-15 19:04:54 -05:00
EOT3000 26a043fd0a null is probably solid! Like dirt! 2019-09-13 22:53:16 -04:00
EOT3000 59e0aff289 Hybrid mode start + try fixing chunks (hashcodes, etc.) 2019-09-11 16:28:48 -04:00