Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item Entities and Dropping Items #66

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

tomlister
Copy link
Contributor

@tomlister tomlister commented Dec 6, 2021

So far:

  • Added a new entity called item.
  • Modified the play handler to drop items when done so by the player.
  • Added behaviour to allow entities to pick up items.

TODO:

  • Implement stack merging and mob pickups
  • Refactor code into methods where appropriate.
  • Events

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2021

Codecov Report

Merging #66 (46ac3f6) into master (baf2d6d) will increase coverage by 0.36%.
The diff coverage is 3.53%.

❗ Current head 46ac3f6 differs from pull request most recent head 6e96dc4. Consider uploading reports for the commit 6e96dc4 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##             master      #66      +/-   ##
============================================
+ Coverage     33.77%   34.13%   +0.36%     
+ Complexity      925      854      -71     
============================================
  Files           849      815      -34     
  Lines         23865    22912     -953     
  Branches       1841     1804      -37     
============================================
- Hits           8060     7822     -238     
+ Misses        15683    14994     -689     
+ Partials        122       96      -26     
Impacted Files Coverage Δ
...in/org/kryptonmc/api/event/player/ItemDropEvent.kt 0.00% <0.00%> (ø)
...tlin/org/kryptonmc/krypton/entity/KryptonEntity.kt 0.00% <0.00%> (ø)
...kryptonmc/krypton/entity/item/KryptonItemEntity.kt 0.00% <0.00%> (ø)
...g/kryptonmc/krypton/entity/player/KryptonPlayer.kt 0.00% <0.00%> (ø)
...ptonmc/krypton/entity/player/PlayerBlockHandler.kt 0.00% <0.00%> (ø)
.../kryptonmc/krypton/network/handlers/PlayHandler.kt 0.00% <0.00%> (ø)
...lin/org/kryptonmc/krypton/packet/PacketRegistry.kt 0.00% <0.00%> (ø)
...mc/krypton/packet/out/play/PacketOutCollectItem.kt 0.00% <0.00%> (ø)
...rc/main/kotlin/org/kryptonmc/krypton/util/world.kt 0.00% <0.00%> (ø)
.../org/kryptonmc/krypton/world/block/KryptonBlock.kt 47.25% <ø> (ø)
... and 176 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update baf2d6d...6e96dc4. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants