Skip to content

Commit 16fcc03

Browse files
committed
refactor: use record for fontrenderer
1 parent 5c2a891 commit 16fcc03

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

modern/templates/java/io/github/notenoughupdates/moulconfig/platform/MoulConfigFontRenderer.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import io.github.notenoughupdates.moulconfig.common.IFontRenderer;
44
import io.github.notenoughupdates.moulconfig.common.text.StructuredText;
5-
import lombok.Value;
65
import net.minecraft.client.gui.Font;
76
import net.minecraft.network.chat.Component;
87
import net.minecraft.network.chat.Style;
@@ -12,9 +11,7 @@
1211
import java.util.List;
1312
import java.util.Optional;
1413

15-
@Value
16-
public class MoulConfigFontRenderer implements IFontRenderer {
17-
@NotNull Font font;
14+
public record MoulConfigFontRenderer(@NotNull Font font) implements IFontRenderer {
1815

1916
@Override
2017
public int getHeight() {

modern/templates/java/io/github/notenoughupdates/moulconfig/platform/MoulConfigPlatform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static StructuredText.Mutable wrap(MutableComponent text) {
9393
}
9494

9595
public static Font unwrap(IFontRenderer fontRenderer) {
96-
return ((MoulConfigFontRenderer) fontRenderer).getFont();
96+
return ((MoulConfigFontRenderer) fontRenderer).font();
9797
}
9898

9999
public static IFontRenderer wrap(Font font) {

0 commit comments

Comments
 (0)