generated from KessokuTeaTime/Example-Mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/net/krlite/knowledges/config/modmenu/impl/InvisibleSeparatorListEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.krlite.knowledges.config.modmenu.impl; | ||
|
||
import me.shedaniel.clothconfig2.gui.entries.TextListEntry; | ||
import me.shedaniel.clothconfig2.impl.builders.FieldBuilder; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.text.Text; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class InvisibleSeparatorListEntry extends TextListEntry { | ||
public static class Builder extends FieldBuilder<Text, InvisibleSeparatorListEntry, Builder> { | ||
public Builder() { | ||
super(Text.empty(), Text.empty()); | ||
} | ||
|
||
@Override | ||
public @NotNull InvisibleSeparatorListEntry build() { | ||
return finishBuilding(new InvisibleSeparatorListEntry(getFieldNameKey())); | ||
} | ||
} | ||
|
||
public InvisibleSeparatorListEntry(Text fieldName) { | ||
super(fieldName, Text.literal(" ")); | ||
} | ||
|
||
@Override | ||
public void render(DrawContext graphics, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean isHovered, float delta) { | ||
// Does nothing | ||
} | ||
} |