Commit Graph

27 Commits

Author SHA1 Message Date
Camotoy ade4c14911
Block breaking refactors (#1336)
Client-side block animations and reach checks are now added.

This commit also includes cleanup in BlockChangeTranslator as well as proper Netherite tool support for calculating block breaking.

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-01-07 22:43:36 -05: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
DoctorMacc ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -04:00
DoctorMacc 65f61ec703 Finish block state changes 2020-06-19 09:06:29 -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
RednedEpic 0574feb87e Fix block breaking animations when in water (Closes #494) 2020-05-23 18:29:11 -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 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 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
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 e76b67265a Rebase 2020-04-02 17:53:45 -05:00
William Johnstone eb707a71df Add requested changes 2020-03-28 16:03:09 +00:00
William Johnstone 0caee67e43 Finalise block breaking, (water calculations omitted because of no access to server api) 2020-03-27 23:39:53 +00:00
Ender bbf6683bd8 Make all translators annotation based 2020-03-23 23:24:17 -05:00
William Johnstone 60662ae06c Moved break time checks to BlockUtils class, Created ItemUtils and added helper function to get enchantment levels on items, implemented a entity effect cache, added haste and mining fatigue check for block breaking animations, fixed block breaking animations for blocks with speeds that are not affected by tools. 2020-03-22 22:59:34 +00:00
William Johnstone 4b40b07bf8 Refactor code and improve sword breaking 2020-03-21 21:37:55 +00:00
William Johnstone 09cdcbdf94 Add block breaking animations that actually work (still incomplete, doesn't take enchantments or player effects into account, also doesn't account for being in the air or underwater) 2020-03-21 20:14:09 +00:00
William Johnstone 350bb28c7c revert last commit as I'm starting over 2020-03-20 21:28:20 +00:00
William Johnstone 650a1e2ab1 Start block breaking animations (inventory is broken) 2020-03-20 20:34:16 +00: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
AJ Ferguson d06f963b67 Block states and fix waterlogged blocks 2019-12-20 20:05:20 -09:00
RednedEpic 3c9fab9fc4 Merge branch 'remapper' into master 2019-10-11 19:24:08 -05:00
AJ Ferguson c0c9fe95fb Also fix digging acknowledgement block update 2019-10-09 17:41:41 -08:00
RednedEpic a125967ec3 Implement new remapper 2019-10-09 19:11:50 -05:00
Tim203 15506cf5b4 Edited PlayerInit behavior and updated protocol lib to 2.3.0 2019-10-09 20:39:38 +02:00
AJ Ferguson ac8fd0cde8 Handle digging acknowledgement from server 2019-09-30 14:18:29 -08:00