Commit Graph

174 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 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
Camotoy b103d86ff9
Fix buckets on desktop survival (#1003) 2020-07-23 14:37:14 -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
Camotoy e5fc66d72f
Fix elytra flying in creative mode (#956)
Sending a ClientPlayerAbilitiesPacket allows the player to successfully fly.

This commit also removes the setting of the CAN_FLY entity flag on creative mode. This did not break anything in my testing.
2020-07-18 15:57:37 -05:00
Camotoy 9cc468cee9
Remove debug string 2020-07-08 12:42:20 -04:00
DoctorMacc bfdc452e3e Add emote support for Bedrock-to-Bedrock players 2020-07-08 12:38:54 -04:00
DoctorMacc 0cea703b46 Save ItemEntry classes for items 2020-07-07 16:40:19 -04:00
DoctorMacc f68632f433 Block-related updates
- Fix block breaking animation
- Fix block breaking particles
- Don't initialize Geyser's chunk cache if using Spigot
2020-07-06 21:38:10 -04:00
AJ Ferguson 699402e635 Fix bug with maps 2020-07-06 15:52:38 -08:00
rtm516 c454e443df Fix maps with negative IDs causing out of bounds errors 2020-07-06 23:36:31 +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
DoctorMacc c17f21eedc Fix respawn bugs - hopefully for good
Thanks to @bundabrg for spotting this one.
2020-07-01 12:28:03 -04:00
rtm516 7710261b70 Add Loadstone Compass tracking 2020-06-30 00:52:32 +01: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 06fa0de793 Add translator for PacketViolationWarningPacket 2020-06-25 11:16:36 -04:00
DoctorMacc 0471fa89f4 Bedrock 1.16 updating part 2 (Doesn't work) 2020-06-22 21:21:42 -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
DoctorMacc 1015b830ce Merge branch 'master' of https://github.com/GeyserMC/Geyser into mcprotocollibupdate 2020-06-20 17:50:00 -04:00
Camotoy 100d7b7759
Add villager interactive tag (#788)
* Add villager interactive tag

This adds a button/controller guide for villager trading, if the villager is able to trade.

* Use a broader variable for metadata
2020-06-20 13:44:40 -04:00
DoctorMacc 65f61ec703 Finish block state changes 2020-06-19 09:06:29 -04:00
DoctorMacc d6119375b2 (Incomplete) Update MCProtocolLib 2020-06-18 21:44:50 -04:00
Camotoy 9369b20209
Add 1.9+ PvP 'Cooldown' (#768)
* Add 1.9+ PvP 'Cooldown'

This commit adds a subtitle that acts as the Java cooldown. This is an optional feature disabled in the config with `show-cooldown`. This does not appear on plugins that use OldCombatMechanics.

* No need to bump up the config version; I was just tested with OldCombatMechanics

* Use simpler casting

* Use session variable of lastHitTime for theoretically better performance

* Reuse attribute value calculation from AttributeUtils

* Remove unused imports

* Revert config version update in config.yml
2020-06-16 19:03:28 -05: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 afb12e923b Show villager display name 2020-06-06 00:04:05 -04:00
DoctorMacc 4c5d80e2e9 Update to latest master 2020-06-05 22:52:11 -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
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
Camotoy 64e3204611
Implement translator for AdventureSettingsPacket (#691)
* Implement translator for AdventureSettingsPacket

The AdventureSettingsPacket is translated into ClientSettingsPacket so the MAY_FLY and FLYING flags are sent to the server. This fixes double-jumping on some servers that rely on the client sending their flying information through this packet.

* Remove top-secret code analysis
2020-05-29 18:56:21 -05: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
RednedEpic 286970676b Add null check for shield code (Fixes #644) 2020-05-24 13:06:25 -05:00
RednedEpic 0574feb87e Fix block breaking animations when in water (Closes #494) 2020-05-23 18:29:11 -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
Camotoy 714c450291
Add players able to sleep in beds (#575)
* Add players able to sleep in beds

This commit sets the correct metadata and flags when the Java pose changes to sleeping.

* Player view while sleeping now works

* Fixed bed offset for other players
2020-05-23 16:09:11 -05:00
AJ Ferguson 2366559694 Store villager data in the player and fix wandering trader 2020-05-19 09:41:44 -08:00
AJ Ferguson 95297e4047 Update villager xp while trading 2020-05-19 07:28:33 -08:00
AJ Ferguson e2d46c3d49 Work on villager trading 2020-05-18 21:15:29 -08: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
Heath123 720ae3c92d
Add survival-style block pick support (#526)
* Add survival-style block pick support

* Add BedrockBlockPickRequestPacketTranslator.java

* Remove unnecessary println

* Edit styling and add null check

* Fix compile error

* Remove nesting and unnecessary check

* Further reduce nesting

* Change 1-line statements and add missing comment

* Fix creating translator

* Fix imports
2020-05-10 15:05:51 -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 d0a2f6ac27
Fix movement issues #466 (#473) 2020-05-04 01:06:08 -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 99e8ca83ab Fix eating sounds and bow sounds 2020-05-02 01:29:30 -05:00
RednedEpic ff26dcad0d Start work on entity sounds, other misc implementations/fixes 2020-05-02 01:06:22 -05:00
rtm516 2e3f32d769
Only replace the first '.' in a message (#463) 2020-05-01 00:49:29 -05:00
RednedEpic ad596cdccb Add sound handlers for block interaction
These sound handlers had to be added since on Minecraft: Java Edition, these sounds are handled clientside whilst Minecraft: Bedrock Edition expects something from the server. To counter this, we emulate the sounds of that on Minecraft: Java Edition within Geyser and send it to the client. The code may seem a tadredundant, but there is not much of an alternative unfortunately.
2020-04-30 00:21:02 -05:00