Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to remove that change + unrelated to this PR

Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public static class ItemProtection {
public boolean protectValuableConsumables = true;
}

//TODO Add an option for no icon at all
public enum SlotLockStyle {
CLASSIC(SkyblockerMod.id("textures/gui/slot_lock.png")),
FANCY(SkyblockerMod.id("textures/gui/fancy_slot_lock.png"));
Expand Down

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was more readable that way…oh well

Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@
public enum FilterOption implements Supplier<Identifier>, Predicate<String> {

ALL(_ -> true, SkyblockerMod.id("textures/gui/filter/all.png")),
ENTITIES(query -> query.endsWith("(monster)") || query.endsWith("(miniboss)") || query.endsWith("(boss)")
|| query.endsWith("(animal)") || query.endsWith("(pest)") || query.endsWith("(sea creature)"),
ENTITIES(
query -> query.endsWith("(monster)") || query.endsWith("(miniboss)") || query.endsWith("(boss)") || query.endsWith("(animal)") || query.endsWith("(pest)") || query.endsWith("(sea creature)"),
SkyblockerMod.id("textures/gui/filter/entities.png")),
NPCS(query -> query.endsWith("(npc)") || query.endsWith("(rift npc)"), SkyblockerMod.id("textures/gui/filter/npcs.png")),
MAYORS(query -> query.endsWith("(mayor)") || query.endsWith("(retired mayor)"), SkyblockerMod.id("textures/gui/filter/mayors.png")),
NPCS(
query -> query.endsWith("(npc)") || query.endsWith("(rift npc)"),
SkyblockerMod.id("textures/gui/filter/npcs.png")),
MAYORS(
query -> query.endsWith("(mayor)") || query.endsWith("(retired mayor)"),
SkyblockerMod.id("textures/gui/filter/mayors.png")),

// Basically a negation on everything else.
ITEMS(query -> !ENTITIES.test(query) && !NPCS.test(query) && !MAYORS.test(query),
ATTRIBUTES(
query -> query.endsWith("shard") && !query.contains("prismarine"),
SkyblockerMod.id("textures/gui/filter/attributes_shards.png")),
TOOLS(
query -> query.endsWith("axe") || query.endsWith("pickaxe") || query.contains("drill") || query.contains("fuel tank") || query.contains("goblin omelette") || query.contains("starfall seasoning") || query.contains("tungsten regulator") || query.contains("mk.") || query.endsWith("hoe") || query.startsWith("hoe") || query.contains("spore harvester") || query.contains("thornleaf scythe") || query.contains("farming toolkit") || query.contains("hunting toolkit") && !query.contains("drill motor"),
SkyblockerMod.id("textures/gui/filter/items.png")),
ITEMS(
query -> !ENTITIES.test(query) && !NPCS.test(query) && !MAYORS.test(query),
SkyblockerMod.id("textures/gui/filter/items.png"));

private final Predicate<String> matchingPredicate;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading