Skip to content

Commit

Permalink
Make a static searchable and fix other items tab
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeRNG committed Jun 7, 2023
1 parent dd7fd58 commit 1a1d96a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
23 changes: 22 additions & 1 deletion src/main/java/dev/dfonline/codeclient/actiondump/Searchable.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,30 @@

import net.minecraft.item.ItemStack;

import java.util.ArrayList;
import java.util.List;

public interface Searchable {
List<String> getTerms();
ItemStack getItem();
}

class StaticSearchable implements Searchable {
private final List<String> terms;
private final ItemStack item;

public StaticSearchable(ItemStack item) {
this.terms = new ArrayList<>();
this.item = item;
}

@Override
public List<String> getTerms() {
return terms;
}

@Override
public ItemStack getItem() {
return item;
}
}
}
Loading

0 comments on commit 1a1d96a

Please sign in to comment.