Commit graph

191 commits

Author SHA1 Message Date
RednedEpic
24f9651cc6 Convert map of players to list (may address #833) 2020-07-06 20:11:34 -05:00
RednedEpic
da1674c8d6 Update to Cloudburst NBT 2.0 2020-07-05 15:59:44 -05:00
DoctorMacc
4062f1ee55 Fix flower pots and item frames 2020-07-05 00:03:51 -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
DoctorMacc
c17f21eedc Fix respawn bugs - hopefully for good
Thanks to @bundabrg for spotting this one.
2020-07-01 12:28:03 -04:00
rtm516
e7fae53552 Fix Strider shaking 2020-06-30 13:51:44 +01:00
rtm516
a9bb8745f5 Fix Zombified Piglin fire flicker 2020-06-30 13:20:03 +01:00
DoctorMacc
ba6adc988b Strider mounting fixes; update mappings
This commit refactors health visual logic to make it a global system for each living entity.
2020-06-29 21:34:01 -04:00
rtm516
d394cc6280 Update entity metadata 2020-06-29 15:37:54 +01:00
rtm516
91c33242c6 Fix baby states and collisions of 1.16 mobs 2020-06-29 14:40:06 +01:00
DoctorMacc
e60f47f65d Fix zombified piglins 2020-06-25 22:52:48 -04:00
DoctorMacc
409293f1db Add new 1.16 entities 2020-06-25 22:32:04 -04:00
DoctorMacc
8be0c4b27e Update some entity properties based on wiki.vg 2020-06-24 16:40:42 -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
b9ccabb3bb According to all known laws of aviation, bees exist 2020-06-20 22:46: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
rtm516
5eef265f80
Fix display of some more entities (#726)
* Fix display of Evoker and Evoker Fangs

* Fix spawner minecart display

* Centeralise custom blocks for spawner and furnace minecarts

* Add comment explaining class
2020-06-02 18:16:04 -05: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
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
rtm516
5bb345daa6
Fix new minecart with block breaking furnace minecart display (#717)
This handles DISPLAY_ITEM and related properties separately on furnace minecarts in order to prevent overwriting furnace minecart graphics.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-06-01 15:59:46 -04:00
rtm516
ac5ab229f9
Fix Ender Crystal collision and explosion effects (#716)
Fixed the collision box being non-existent for ender crystals and fixed explosion effects not being displayed properly
2020-06-01 15:57:27 -04:00
Camotoy
215e5a7e21
Add custom minecart metadata (#713)
Adds display item, offset, and enable values.
2020-05-31 21:47:54 -04:00
rtm516
b8615874f9
Add furnace minecart (#712)
Adds the display of the furnace minecart, functions as expected.
2020-05-31 21:46:36 -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
rtm516
d0545c57c4
Fix some fireworks colors and NPE of there is no NBT (#650)
Adds Bukkit colors and an additional NPE check
2020-05-25 17:57:10 -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
Arktisfox
d918139c44
Check if firework item explosions tag is null (corresponding entity fix) (#633)
* Check if firework item explosions tag is null (corresponding entity fix)

* Add null check on flight

* Add null check around Flight

* Fix newline on if statement

* Fix newline on if statement, add null check on flight, remove debug code.

* fix missing space..
2020-05-24 13:15:02 -05:00
RednedEpic
7f5414cdef Fix painting offset if height is equal to 3 (Fixes #629) 2020-05-23 23:27:16 -05:00
RednedEpic
ebd88c76aa Don't delay item frame interactions
Causes interacting (moving) an item in an item frame to delay by about half a second. This delay is still present on chunk load where this delay is absolutely needed in order to the item frame to show up.
2020-05-23 23:14:29 -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
rtm516
d8d9fb7190
Fireworks! (#579)
* Fixed firework entity

* Added firework item translator

* Fixed mappings submodule
2020-05-23 16:33:39 -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
rtm516
8f01221275
Updated to support latest MCProtocolLib (#623)
* Updated to support latest MCProtocolLib

* Cleaned up names and imports

* Fixed minecarts

* Fixed throwables

* Fixed tnt
2020-05-23 15:56:49 -05:00
rtm516
18415d5d15
Fixed trident display and some arrow related cleanup (#609)
* Fixed trident display and some arrow related cleanup

* Renamed trident entity
2020-05-20 12:39:58 -05:00
OnlyBMan
fc5230c248
Add firework boost for elytras (#552)
* Add firework boost for elytras!

* Change how to detect player glide

* Add comments explaining code

* Remove unused ID
2020-05-18 10:46:35 -04:00
Camotoy
31d3d2e289
Add some elder guardian properties (#586)
- Adds the ELDER flag to all elder guardians, so they look like elder guardians and not giant regular guardians.
- Translates AFFECTED_BY_ELDER_GUARDIAN in JavaNotifyClientTranslator to add the elder guardian curse event.
2020-05-17 23:35:26 -05:00
rtm516
405ffb2666
Added mob spawner block entity data (#587) 2020-05-17 23:35:01 -05:00
rtm516
43ee7d6027
Fixed creepers, giants and eye of ender (#578) 2020-05-17 01:26:13 -05:00
rtm516
3220532083
Fixed fishing rod lines not connecting to other players (#580) 2020-05-16 23:57:18 -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
Camotoy
1b260c16d7
Leash fixes (#567)
* Leash fixes

- Adds visuals for leash string by translating ServerEntityAttachPacket
- Updates position offset for lead knots, making them properly appear on fences

* Add basic description of JavaEntityAttachTranslator
2020-05-15 12:50:34 -05:00
Camotoy
d4995acec6
Add support for absorption (golden hearts) (#553)
Absorption is an attribute in Bedrock and an entity metadata value in Java. This commit sends an attribute update packet when the metadata value is updated.
2020-05-14 11:30:33 -05:00
Camotoy
278f59103e
Replace illusioners with pillagers (#550)
Illusioners do not exist in Bedrock edition; this commit replaces them with pillagers so they can be somewhat replicated.
2020-05-13 16:08:32 -05:00