Commit Graph

60 Commits

Author SHA1 Message Date
Camotoy b07433698a
Translate specific messages (#1161) 2020-08-16 19:02:59 -04: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
Camotoy a4339be212
Only send metadata update once per Java metadata packet (#1022)
While this doesn't fix any bugs, it may be a slight performance enhancement as we aren't sending multiple packets per one Java entity metadata packet.
2020-07-30 15:15:07 -05:00
DoctorMacc fe254380dc Clean up some TODOs 2020-07-08 12:36:26 -04:00
DoctorMacc 0cea703b46 Save ItemEntry classes for items 2020-07-07 16:40:19 -04:00
DoctorMacc a7fbe995f8 Add comment and check for null when removing passengers 2020-07-04 10:26:32 -04:00
rtm516 da96a5b19c Fix Strider cold state when riding and removing of the RIDING flag when a parent is killed 2020-07-03 22:55:54 +01:00
rtm516 a9bb8745f5 Fix Zombified Piglin fire flicker 2020-06-30 13:20:03 +01: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 d6119375b2 (Incomplete) Update MCProtocolLib 2020-06-18 21:44:50 -04:00
Camotoy 256c62ce88
Entity (mostly rotation) fixes (#675)
* Entity (mostly rotation) fixes

    This PR adds:

    - Pig health displaying. Doesn't fix pigs being able to be controlled
    - Entity rotation is *mostly* correct. Villagers and sitting cats still seem to be odd but the ender dragon works great.

* Remove debug line

* Abstract rotation updating to functions per-entity

* Don't include changes from other projects

* Minor improvements

* Make updateRotation and updatePositionAndRotation cleaner

* Javadoc
2020-06-16 18:58:06 -05:00
Camotoy 7231758a19
Prevent swimming animation from appearing on older servers (#692)
The swimming animation could be played on older servers since that was a legacy value for using an item.
2020-06-10 17:52:36 -05:00
rtm516 5fca5d5ef5
Fix position of non-marker invisible armour stands (#697)
This adds the height of the armour stand to the position if its invisible and not a marker to counteract the scale being 0 therefore having a wrong nametag position
2020-06-03 21:12:16 +01:00
Camotoy 18891a22f1
Check for instance of TranslationMessage (#722)
Checks for class of custom name ID in case it's translation message.
2020-06-02 10:45:33 -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
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
Camotoy b4ecb88d49 Add air bubble UI support (#569)
This commit translates entity metadata ID 1 into the AIR entity metadata.
2020-05-15 15:29:54 -05:00
rtm516 c84c0f23cb
Fixed invisible flag not getting set back (#535)
* Fixed invisible flag not getting set back

* Fixed indentation
2020-05-11 23:44:30 -05:00
rtm516 324bc67c97
Fixed small armour stands not respecting invisibility (#533) 2020-05-11 14:56:50 -05:00
rtm516 f9ee569cd5
Various entity fixes (#529)
* Fixed invisible entities nametags being displayed

* Fixed most entity collision boxes

* Fixed area effect cloud not displaying

* Fixed armour stand size and marker

* Fix baby collision boxes

* Fixed squid animation (rotation still broken)

* Fix Guardian beam for local player

* Fixed armour stand invisibility

* Fixed Wither boss data

* Fixed  fishing line attach to entities
2020-05-11 00:09:16 -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
RednedEpic 6642f1ec26 Fix a few entities not showing up and include identifiers for entities in EntityType 2020-05-05 00:09:36 -05:00
RednedEpic 26266bf9b6 Fix black texture of offhand item (Closes #332) 2020-05-04 22:01:34 -05:00
rtm516 bea070395f
Handle player teleports properly (#389)
* Handle player teleports properly

Co-authored-by: ForceUpdate1 <mneuhaus44@gmail.com>

* impl teleport cache

* impl teleport cache

* removed debugs

* Cleanup

Co-authored-by: ForceUpdate1 <mneuhaus44@gmail.com>
2020-04-29 11:06:25 -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 e8bf8ff2a0 Fix javadoc related errors 2020-04-22 01:03:46 -05:00
RednedEpic 2bdf3d4d7f Merge branch 'master' into plugin 2020-02-26 19:31:19 -06:00
RednedEpic f5bc328737 Merge branch 'master' into feature/new-protocol-lib 2020-02-25 18:54:31 -06:00
Redned b41d66dd19
Set can climb for entity back to true
This has nothing to do with the bug where players can "climb" up blocks, but rather disabling this feature disables the ability to climb up vines and ladders. This commit reverts that.
2020-02-23 18:02:54 -06:00
RednedEpic 720f69d913 Set can climb for entity to false 2020-02-16 14:07:40 -06:00
RednedEpic 41a24ca6ab Merge branch 'master' into plugin 2020-02-16 13:25:37 -06:00
OnlyBMan 18a50d4e3e Fix baby armorstands showing even when invisible 2020-02-15 21:35:05 -05:00
RednedEpic ee85abf34c Fix player movement not being visible, movement bugs and laggy entities
(Addresses #74, #109)
2020-02-15 17:39:34 -06:00
RednedEpic e6d166d4d4 Merge branch 'master' into feature/new-protocol-lib 2020-02-14 17:58:53 -06:00
AJ Ferguson 35bf1b455e Fix new player entity data getting lost while loading skin 2020-02-13 17:45:15 -09:00
RednedEpic 4f461bf374 Start on converting to the new NukkitX protocol library updates 2020-02-05 18:55:34 -06:00
RednedEpic 989312835f Fix custom name visible flag (Closes #137) 2020-01-26 00:05:05 -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 e38322a3ec Nuke plugin API
https://media.giphy.com/media/oe33xf3B50fsc/giphy.gif
2019-12-21 11:35:48 -06:00
RednedEpic 2c10274fc3 Break entities into separate classes and add equipment translator
This should make the process of translating entity metadata a whole lot easier and more organized. Future features involving entities and checking if they're capable of doing certain things should also be much easier now.
2019-11-30 18:19:03 -06: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
RednedEpic 9875d204e3 Add more entity metadata translations and fix autojump (Closes #73) 2019-11-27 19:30:30 -06:00
AJ Ferguson 2bab0d1d19 Calculate attribute modifiers and fix sprinting/sneaking 2019-10-17 23:54:20 -08:00
RednedEpic 0ac89f4880 Implement dimension changing and debugize 'moved too quickly' messages 2019-10-15 21:47:28 -05:00
Tim203 15506cf5b4 Edited PlayerInit behavior and updated protocol lib to 2.3.0 2019-10-09 20:39:38 +02:00
Tim203 a7bd9da644 Bugfixes 2019-10-05 00:29:33 +02:00
Tim203 5eb7565b0a Third party capes, rotation fixed, wait for the client and updated protocol lib 2019-10-02 22:45:29 +02:00