Commit Graph

37 Commits

Author SHA1 Message Date
Camotoy 86b2901f02
1.16.220 support (#2105)
This update does not break compatibility with any other currently supported version of Bedrock.

Co-authored-by: Redned <redned235@gmail.com>
2021-04-06 00:14:06 -04:00
Camotoy 2f42a4c630
Add furnace minecart item translation (#2003)
Conveniently enough, the minecart furnace icon still exists in the vanilla Bedrock Edition game (thanks to Kastle for this discovery). With this and the translation string still being present, we can add the item into the game with only minor issues.
2021-03-31 14:06:05 -04:00
Camotoy 85b8fe2734
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-02-17 19:33:51 -05:00
Camotoy d9f8e9eec2
Improve command freezing and fix up command suggestion translation (#1936)
Merge commands with the same parameters (thanks Supreme)
    Add more suggestion types (blocks, items, entities)
    More optimizations


Co-authored-by: SupremeMortal <6178101+SupremeMortal@users.noreply.github.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-02-17 18:00:00 -05:00
Camotoy 4db9ec92bf
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-01-11 19:46:39 -05:00
Camotoy fe23c79053
Implement book editing (#1117)
* Implement book editing

Updates the PR created by @ForceUpdate1 for 1.16 support. Seems to work fine now that hand support is in MCProtocolLib.

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>

* Remove debug line

* Simplify code

Currently still borked for creative mode.

* Fix books on creative

* Bug fixes

* Fix NPE?

* Blind fixes

* Send Book update before any player actions

* Remove debug prints

* Fix out of bounds for page replace and add

* Fix editing desync and remove empty pages from the end

* Send edit packet after signing

* Refactor

* Clean up and fix creative

* Apply suggestions from code review

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

Co-authored-by: ForceUpdate1 <mneuhaus44@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
Co-authored-by: David Choo <davchoo3@gmail.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-01-07 19:40:34 -05:00
Camotoy a88678a5c1
Add manual recipes as Recipe classes for future usage 2021-01-04 22:15:55 -05:00
AJ Ferguson ff69752d2c Remove unnecessary is_block null check 2021-01-04 15:16:21 -09:00
AJ Ferguson 57e176efd6 Optimize stackSize
Co-Authored-By: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-01-04 15:12:26 -09:00
AJ Ferguson a160e3694b Add stackSize to ItemEntry 2021-01-04 14:47:48 -09: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 ffd0c211fc
Fix villagers accepting books (#1605)
* Hopefully fix villagers accepting books

Fixes a couple of inconsistencies getting books from the creative menu.

* Fix fake news
2020-11-30 10:55:35 -05:00
Camotoy 199778faea
Fix regressions from 1.16.100 (#1558)
* Fix regressions from 1.16.100

- Update mappings to fix recipe regressions and item differences
- Villager trading NBT now prefers the String identifier and not the integer ID

* Fix lodestone compass breaking
2020-11-18 01:10:49 -05:00
Camotoy 123b074cc7
Update to Bedrock 1.16.100 (#1552)
* Initial work on 1.16.100 - currently crashes the client

* Update runtime item states

* Use new Bedrock runtime IDs

Bedrock now hardcodes block runtime IDs in alphabetical order of the identifiers. This commit updates Geyser to accomodate.

- Remove runtime_block_states.dat and replace it with blockpalette.nbt
- Calculate the block runtime ID based on the order of the block palette
- Separate BlockTranslator.AIR into Bedrock and Java values
- Update the second layer of chunks to use air when not waterlogged
- Don't send item palette for now, as that's what crashes the game (will look into for v415)
- Other misc. changes

* Improve second layer chunk translation

* v415 support

- Add a message warning people they are on a beta version of Geyser

* Update to protocol v417

There are still some mappings changes that need to be gone through.

* Update runtime item states and clean up item frames

* Future-proof enchanment table

* Update for v418

* Update to v419

* Apply proper air ID to waterlogged chunk layer

* Fix missing import

* Remove beta warning

* Update mappings

* Manually patch runtime_item_states and send the ITEMS registry

* Update README

* Disable grindstone and smithing inventories (since they're broken)

* Use artifactory jenkins plugin (#1548)

* Use artifactory jenkins plugin

* Bump version to 1.2.0-SNAPSHOT

Co-authored-by: SupremeMortal <6178101+SupremeMortal@users.noreply.github.com>
2020-11-17 11:03:12 -06:00
Camotoy e748240a02
Add more interactive tags (mobile buttons) (#1443)
* Add more interactive tags (mobile buttons)

This expands our support for showing the interactive tags on touchscreen and console setups. This is not complete - specifically, the food compatibility of creatures needs to be expanded upon (I will work on this later and does not stop this PR from being mergable). This also includes:

- Creepers who are ignited with flint and steel now show up properly
- Zombie villagers now shake properly when converting and show their region outfits

* Add more food choices and add more panda entity metadata

* Re-add eating flag

* Remove debug line

* Refactor dimension usage, finish interactive tag usage, bees

* Print statements... ._.

* Don't make eating item packet data a non-constant

* Move BAMBOO to ItemRegistry

* Add missing break

* Make changes

* Minor final changes
2020-11-11 19:28:45 -05:00
rtm516 3676dd185f
Fix even more entity metadata flags (#1483)
* Fix even more entity metadata flags

* Add comment explaining magic value

* Fix horse flags and add more information

* Add more information about the Horse eating particles
2020-11-11 18:13:13 +00:00
Tim203 c64d57439f
Block entity performance improvements (#1481)
* BlockEntity performance improvements

* Use chunk cache if possible for block caching

* Get new block state from ViaVersion if block entity

* Add Javadoc for FlowerPotBlockEntityTranslator.isFlowerBlock

* Remove debug line

* Don't add all RequiresBlockState instances if cache chunks is enabled

* Double chest map get optimization

* Last changes

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-11-05 22:36:22 +01:00
David Choo d93d4d0942
Projectile fixes (#1451)
* Predict the trajectory of projectiles and add particles

* Correct lingering potion gravity

* Update last position on move absolute

* Clean up

* Add egg to ItemRegistry and update mappings
2020-10-26 11:54:37 -04:00
Camotoy 3c4cde9677
Tipped arrow translation (#1331)
* Tipped arrow translation

- Tipped arrow items are now properly translated both ways
- Tipped arrow particle effects are also translated, by having a list of all colors Java could send us and their Bedrock ID

* Remove a whitespace
2020-09-29 13:30:37 -04:00
Camotoy 26802e6dab
Translate CanPlaceOn/CanDestroy NBT (#1253)
* Translate CanPlaceOn/CanDestroy NBT

This commit adds support for the translation of the CanPlaceOn/CanDestroy NBT for Bedrock clients.

* Remove debug line
2020-09-14 20:50:07 -04:00
Camotoy c1a70c7754
Translate client-computed recipes (#1181)
* Translate client-computed recipes

A handful of recipes are complex enough on Java Edition that the client simply calculates them after getting an assurance that they are valid recipes. This PR stores those recipes in a Bedrock-compatible format in mappings, then generates the CraftingData information on startup to send to the Bedrock client when called. This fixes firework rocket and star crafting, and fixes leather armor and shulker box dyeing.

The recipe information for everything except leather armor was taken right from the Bedrock server. The leather armor had to be created separately (see https://github.com/DoctorMacc/LeatherDyeingCreation). There will be a slight visual difference in the crafting result preview if the armor is not perfectly dyed to one of the sixteen colors, but this is a visual issue that will persist unless we calculate every single possbile combination.

* Revert other changes

* Register shulker box recipes properly

* Add break

* Update mappings
2020-08-24 21:14:44 -05:00
Camotoy 7df476183a
Implement proper mappings for pistons, dropper, dispenser (#1103)
This commit gets rid of the hacky workaround implemented for pistons, droppers and dispensers and actually implements the vanilla data values.
2020-08-08 16:50:32 -05:00
Arktisfox 54bee1f868
Small entity metadata fix, other player bow implementation (#685)
* Move blocking case to LivingEntity, and make other players bows animate.

This moves metadata ID 7 to LivingEntity, it's proper place. It also sets the 'USING_ITEM' flag which animates other players bows.

* Add skeleton aiming support

Skeletons don't have support of pushing their bows back on Bedrock, but this allows them to hold their arms up

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-07-30 22:10:55 -04:00
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
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
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 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
rtm516 7710261b70 Add Loadstone Compass tracking 2020-06-30 00:52:32 +01: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
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
Renamed from connector/src/main/java/org/geysermc/connector/utils/Toolbox.java (Browse further)