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

feat: Refactor inventory #324

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

feat: Refactor inventory #324

wants to merge 6 commits into from

Conversation

ExE-Boss
Copy link
Member

@ExE-Boss ExE-Boss commented Jun 28, 2018

List of changes:

# List of changes:
- Completed InventoryIterator to match the spec
- Improved the Inventory interface
  - Completed JavaDoc
  - Now uses `java.util.Optional` instead of `null`
  - Methods now throw `java.lang.IndexOutOfBoundsException`
    if the requested slot is out of bounds
@ExE-Boss ExE-Boss added the in progress Pull requests that are not yet ready to be merged and issues that are being worked on. label Jun 28, 2018
@ExE-Boss ExE-Boss self-assigned this Jun 28, 2018
@ExE-Boss ExE-Boss added feature breaking change This is going to break stuff minecraft 1.7 Affects Minecraft 1.7.x wrappers minecraft 1.8 Affects Minecraft 1.8.x wrappers labels Jun 28, 2018
@ExE-Boss ExE-Boss added this to the v0.1.0 milestone Jun 28, 2018
@codecov
Copy link

codecov bot commented Jun 28, 2018

Codecov Report

Merging #324 into master will decrease coverage by 0.02%.
The diff coverage is 1%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #324      +/-   ##
============================================
- Coverage     13.24%   13.21%   -0.03%     
- Complexity     1005     1006       +1     
============================================
  Files           532      532              
  Lines         17368    17429      +61     
  Branches       1803     1818      +15     
============================================
+ Hits           2301     2304       +3     
- Misses        14920    14978      +58     
  Partials        147      147
Impacted Files Coverage Δ Complexity Δ
.../java/nova/core/component/inventory/Inventory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...c/forge/v1_11_2/wrapper/inventory/FWInventory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...r/mc/forge/v1_8/wrapper/inventory/BWInventory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...c/forge/v1_7_10/wrapper/inventory/BWInventory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...r/mc/forge/v1_8/wrapper/inventory/FWInventory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
src/main/java/nova/core/item/Item.java 30.95% <0%> (ø) 9 <0> (ø) ⬇️
...a/nova/core/component/inventory/InventoryView.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...c/forge/v1_11_2/wrapper/inventory/BWInventory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...c/forge/v1_7_10/wrapper/inventory/FWInventory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...nova/core/component/inventory/InventorySimple.java 0% <0%> (ø) 0 <0> (ø) ⬇️
... and 1 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 605895b...50b379e. Read the comment docs.

@RX14
Copy link
Contributor

RX14 commented Jun 29, 2018

The original rule of thumb was that we accept nulls into arguments and return optionals.

@ExE-Boss ExE-Boss added the minecraft 1.11 Affects Minecraft 1.11.x wrappers label Feb 21, 2019
@ExE-Boss ExE-Boss changed the title Refactor inventory feat: Refactor inventory Feb 21, 2019
@ExE-Boss ExE-Boss force-pushed the refactor/inventory branch 2 times, most recently from 3606bc2 to ff59b33 Compare February 21, 2019 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This is going to break stuff feature in progress Pull requests that are not yet ready to be merged and issues that are being worked on. minecraft 1.7 Affects Minecraft 1.7.x wrappers minecraft 1.8 Affects Minecraft 1.8.x wrappers minecraft 1.11 Affects Minecraft 1.11.x wrappers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BWInventory may throw IOOBE for cases where Inventory doesn't.
2 participants