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

Add basic item matching support #1685

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

me4502
Copy link
Member

@me4502 me4502 commented Feb 23, 2021

So few problems atm:

  • UX maybe a bit meh when setting from ingame, may require a way to get/set the stringified thing directly to fix/filter it more.
  • List tags are a bit jank. It appears this is how it's handled in MC at least, lists of compound tags are unordered, and lists of other tags are ordered. All ordered compound lists are lists of lists with a single compound tag as a child.
  • For Tools 2.0, using a BaseItem with a matcher means we can no longer use a Map for tool lookups, so we'd need some way around this
  • This would ideally be extended to BaseBlock and BaseEntity too, so we'd need to see how that works

Definitely open to suggestions

This was done as it's the most flexible way of handling NBT data and is also usable in CraftBook (and maybe WG if blacklist is extended for item nbt or whatever)

@me4502 me4502 requested a review from a team February 23, 2021 11:31
@codecov
Copy link

codecov bot commented Feb 23, 2021

Codecov Report

Merging #1685 (1a83f42) into master (913d4d6) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1685      +/-   ##
============================================
- Coverage     11.44%   11.43%   -0.02%     
  Complexity     1002     1002              
============================================
  Files           805      805              
  Lines         32598    32646      +48     
  Branches       3783     3800      +17     
============================================
  Hits           3732     3732              
- Misses        28688    28736      +48     
  Partials        178      178              
Impacted Files Coverage Δ Complexity Δ
...main/java/com/sk89q/worldedit/blocks/BaseItem.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...in/java/com/sk89q/worldedit/util/nbt/NbtUtils.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

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 913d4d6...1a83f42. Read the comment docs.

@octylFractal octylFractal added type:feature-request Request for something new status:accepted Will be fixed / added to WorldEdit, eventually labels Mar 10, 2021
@octylFractal octylFractal added this to the 7.3.0 milestone Apr 10, 2021
@octylFractal octylFractal modified the milestones: 7.3.0, Future Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:accepted Will be fixed / added to WorldEdit, eventually type:feature-request Request for something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants