Commit Graph

141 Commits

Author SHA1 Message Date
rtm516 b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
bundabrg fffac8a552
Fix Spawn position not using offset. (#1015) 2020-07-25 10:38:00 -04:00
Camotoy b211b9da2e
Update entity status mappings (#995)
- Add support for LIVING_BURN entity status
- Properly send sheep graze event
2020-07-22 11:03:09 -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
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
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 699ae0b88e Set strider entity offset properly if not a player entity 2020-07-01 20:27:39 -04: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 c804a6edfb Fix respawning and death not being registered on the client 2020-06-30 17:08:22 +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
DoctorMacc 6f2bf659a9 Update JavaEntityEquipmentTranslator for Java 1.16 2020-06-25 21:53:51 -04:00
DoctorMacc ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -04:00
DoctorMacc 56f9330a2d Remove ServerSpawnWeatherEntityPacket 2020-06-21 19:22:59 -04:00
DoctorMacc 65f61ec703 Finish block state changes 2020-06-19 09:06:29 -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
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
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
Heath123 5c8f6eb184
Fix relative teleports (#688) 2020-05-29 15:11:38 -04:00
Camotoy 14fcd77925
Fix entities stacking on top of each other when mounted (#660)
The offset was being called but not properly saved to a variable. The check will also not apply if there is only one mounted entity.
2020-05-25 22:43:29 -05:00
bundabrg a929c411d2
Use authData UUID when sending playerlist packets to the client (#654)
Bedrock knows its own UUID and when it receives the Java uuid it will either crash (MCEE) or add a ghost player onto the playerlist (Bedrock).
This change will check if an entity is the client and if so replace the entities UUID with the AuthData UUID.

A refactor of JavaPlayerListEntryTranslator was also done as I got confused each time what it was doing so it is now hopefully a bit clearer and also fixes the case where an entity is removed but still exists on the server (Vanished).
2020-05-25 22:39:57 -05:00
bundabrg cc6c7fe78d
When spawning don't add the player offset (#655)
Fixes falling when logging in
2020-05-25 22:35:26 -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 681cbeeae5 Add armor stand entity offset (Fixes #627) 2020-05-23 22:45:34 -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 fc6532732d
Adds skin ears from MinecraftCapes.co.uk + Clientside linked account skins + Elytra textures (#539)
* Added ears geometry support

* Added ear fetching from mc capes

* Added support for deadmau5

* Commented, documented and cleaned code

* Allow bedrock players to see their java skin/cape/ears when joining

* Optimised Imports

* Fix missing else statement

* Moved ears and fixed elytra skins

* Added ears config option

* Fixed cape/elytra transparency

* Fixed slim skin geometry

* Fixed async ears request and added alex skin

* Fixed default elytra not showing with no cape

* Moved to normal Base64 functions

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
2020-05-23 16:06:34 -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
OnlyBMan 81d3b0ef10
Fix painting rotation (#597)
* Fix painting rotation

* add comment and spacing

* Dont sleep everything :P

* Fix whitespace

* Remove whitespace

* Fix underlying issue

Instead of adding a delay, exclude Painting in HeadLookTranslator.java. Thanks AJ!

* Remove unneeded import

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-05-21 18:45:35 -05:00
Camotoy 1395b719cb
Add missing break to JavaEntityStatusTranslator (#600) 2020-05-20 10:12:31 -05:00
Camotoy fd36930502
Add entity event for drowning. (#588)
This commit translates Java's LIVING_DROWN entity status to Bedrock's HURT_ANIMATION.
2020-05-18 22:26:27 -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
James Harrison 2355c503c9
Enderchest and Invisible Players fix. (#506)
* Fix EnderChests not showing on legacy servers (Hypixel)
Fix NPCs/Players sometimes being invisible

* Remove unused import

* Fix standard
2020-05-07 21:49:44 -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
rtm516 96a7770c22
Fixed entity bugs introduced by 6642f1e and added fishing lines (#483)
* Fixed entity bugs introduced by 6642f1e

* Fixed fishing line not displaying

* Clean extra line and added todo
2020-05-05 10:48:01 -05:00
RednedEpic 1aca44ec7f Fix playsounds 2020-05-03 15:56:46 -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 f057edb526 Don't show block break animation at all in creative 2020-04-30 00:53:28 -05:00
RednedEpic 364aac7e1a Fix block break particles not displaying in survival 2020-04-29 15:47:29 -05:00
RednedEpic 1fbb755d26 Merge branch 'master' into sound-master 2020-04-29 15:14:25 -05:00
RednedEpic 31be608038 Add block break sounds for blocks with 0 hardness, and refactor some things
The refactors in this commit go a bit beyond the scope of what the sound/effects branch was meant to accomplish, however most of these changes are necessary so chunk caching could be reintroduced for the standalone version. The chunk caching here allows for us to get the block ID before the block was broken, and in the future allow us to implement newer features. Chunk caching is optional (and disabled by default) as on non-Bukkit versions, it can eat up a lot of RAM with many players online.
2020-04-29 15:01:53 -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
DoctorMacc b0a8b9219a Add effects support and block break particles/place sounds
Co-authored-by: RednedEpic <redned235@gmail.com>
2020-04-22 23:40:49 -05:00
RednedEpic 3e15d21931 Merge branch 'master' into sound-master 2020-04-22 18:18:13 -05:00
RednedEpic 987edbb217 Nitpicks and add serverbound sound packet translator 2020-04-22 18:17:34 -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
Redned 7ca1d1bea6
Merge pull request #398 from GeyserMC/inventory
Merges branch 'inventory' into master
2020-04-22 00:49:48 -05:00
Camotoy aad4536990
Fix /fly command (#396)
* Fix /fly

* Add comment
2020-04-21 14:36:13 -05:00
Jason 12b99c5b1b
Merge branch 'master' into master 2020-04-19 14:09:36 -07:00
RednedEpic 605c9ef4db Merge branch 'master' into inventory 2020-04-11 22:46:25 -05:00