Skip to content

Commit

Permalink
rename readers
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Jan 14, 2024
1 parent 81cf5d5 commit 833ed46
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public class OreDictionaryItemFilter extends ItemFilter {

private OreGlob glob = ImpossibleOreGlob.getInstance();
private OreGlobCompileResult result;
private final OreDictionaryFilterReader filterReader;
private final OreDictionaryItemFilterReader filterReader;

public OreDictionaryItemFilter(ItemStack stack) {
this.filterReader = new OreDictionaryFilterReader(stack, 0);
this.filterReader = new OreDictionaryItemFilterReader(stack, 0);
setFilterReader(this.filterReader);
recompile();
}
Expand Down Expand Up @@ -402,13 +402,13 @@ public void readFromNBT(NBTTagCompound tag) {
recompile();
}

protected class OreDictionaryFilterReader extends BaseFilterReader {
protected class OreDictionaryItemFilterReader extends BaseItemFilterReader {

private static final String EXPRESSION = "expression";
private static final String CASE_SENSITIVE = "case_sensitive";
private static final String MATCH_ALL = "match_all";

public OreDictionaryFilterReader(ItemStack container, int slots) {
public OreDictionaryItemFilterReader(ItemStack container, int slots) {
super(container, slots);
setCaseSensitive(true);
setMatchAll(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
public class SimpleItemFilter extends ItemFilter {

private static final int MAX_MATCH_SLOTS = 9;
private final SimpleFilterReader filterReader;
private final SimpleItemFilterReader filterReader;

public SimpleItemFilter(ItemStack stack) {
this.filterReader = new SimpleFilterReader(stack, MAX_MATCH_SLOTS);
this.filterReader = new SimpleItemFilterReader(stack, MAX_MATCH_SLOTS);
setFilterReader(this.filterReader);
}

Expand Down Expand Up @@ -110,7 +110,7 @@ public ParentWidget<?> createWidgets(GuiSyncManager syncManager) {
.tooltipBuilder(tooltip -> {
int count = this.filterReader.getItemsNbt()
.getCompoundTagAt(index)
.getInteger(SimpleFilterReader.COUNT);
.getInteger(SimpleItemFilterReader.COUNT);
if (count > 64)
tooltip.addLine(IKey.format("Count: %s", TextFormattingUtil.formatNumbers(count)));
})
Expand Down Expand Up @@ -181,11 +181,11 @@ private boolean areItemsEqual(boolean ignoreDamage, boolean ignoreNBTData, ItemS
return ignoreNBTData || ItemStack.areItemStackTagsEqual(filterStack, itemStack);
}

protected class SimpleFilterReader extends BaseFilterReader {
protected class SimpleItemFilterReader extends BaseItemFilterReader {

public static final String IGNORE_NBT = "ignore_nbt";
public static final String IGNORE_DAMAGE = "ignore_damage";
public SimpleFilterReader(ItemStack container, int slots) {
public SimpleItemFilterReader(ItemStack container, int slots) {
super(container, slots);
setIgnoreDamage(true);
setIgnoreNBT(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
import java.util.function.Consumer;

public class SmartItemFilter extends ItemFilter {
private SmartFilterReader filterReader;
private SmartItemFilterReader filterReader;

public SmartItemFilter(ItemStack stack) {
this.filterReader = new SmartFilterReader(stack);
this.filterReader = new SmartItemFilterReader(stack);
setFilterReader(this.filterReader);
}

Expand Down Expand Up @@ -180,10 +180,10 @@ public String getName() {
}
}

protected class SmartFilterReader extends BaseFilterReader {
protected class SmartItemFilterReader extends BaseItemFilterReader {

private static final String FILTER_MODE = "FilterMode";
public SmartFilterReader(ItemStack container) {
public SmartItemFilterReader(ItemStack container) {
super(container, 0);
}

Expand Down

0 comments on commit 833ed46

Please sign in to comment.