Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parchment_version=1.20.1:2023.09.03
loader_version=0.16.7

# Mod Properties
mod_version=2.6.4
mod_version=2.7.0
maven_group=red.jackf
archives_base_name=whereisit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ public static Screen build(Screen parent) {
.category(ConfigCategory.createBuilder()
.name(translatable("whereisit.config.title"))
.group(makeClientGroup(instance.defaults(), instance.instance()))
.group(ListOption.<String>createBuilder()
.name(translatable("whereisit.config.client.labelBlacklist"))
.description(OptionDescription.of(
translatable("whereisit.config.client.labelBlacklist.description")
))
.controller(StringControllerBuilder::create)
.binding(
instance.defaults().getClient().labelBlacklist,
() -> instance.instance().getClient().labelBlacklist,
l -> instance.instance().getClient().labelBlacklist = l
).initial("")
.insertEntriesAtEnd(true)
.build())
.group(makeCommonGroup(instance.defaults(), instance.instance()))
.group(ListOption.<String>createBuilder()
.name(translatable("whereisit.config.common.commandAliases"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ public static void renderSlotHighlight(Screen screen, GuiGraphics graphics, int
// schedule a label to be rendered; should be called before BEFORE_BLOCK_OUTLINE every frame
public static void scheduleLabel(Vec3 pos, Component name, boolean seeThrough) {
if (pos == null || name == null) return;

// check blacklist for label string
if (WhereIsItConfig.INSTANCE.instance().getClient().labelBlacklist.contains(name.getString())) return;

scheduledLabels.add(new ScheduledLabel(pos, name, seeThrough));
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/red/jackf/whereisit/config/WhereIsItConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ public static class Client {
@SerialEntry(comment = "Visual scale of the container names in the range [0.25, 2].")
public float containerNameLabelScale = 1f;

@SerialEntry(comment = "A list of container names that will not display as floating labels. Disable by removing all options.")
public List<String> labelBlacklist = new ArrayList<>(labelBlacklistDefault);
private static final List<String> labelBlacklistDefault = List.of();

@SerialEntry(comment = "Whether to use a random pride colour scheme each search.")
public boolean randomScheme = true;

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/whereisit/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"whereisit.config.client.showContainerNamesInResults": "Show Container Names for Results",
"whereisit.config.client.containerNameLabelScale": "Container Name Text Scale",
"whereisit.config.client.containerNameLabelScale.slider": "Container Name Text Scale",
"whereisit.config.client.labelBlacklist": "Container label blacklist",
"whereisit.config.client.labelBlacklist.description": "A list of container names that will not display as floating labels. Disable by removing all options.",
"whereisit.config.client.randomScheme": "Random Colour Scheme",
"whereisit.config.client.randomScheme.description": "Whether to use a random pride colour scheme each search.",
"whereisit.config.client.colourScheme": "Highlight Colour Scheme",
Expand Down