|
@@ -2,6 +2,7 @@ package me.shedaniel.clothconfig2.gui.entries;
|
|
|
|
|
|
import net.fabricmc.api.EnvType;
|
|
|
import net.fabricmc.api.Environment;
|
|
|
+import net.minecraft.class_5348;
|
|
|
import net.minecraft.client.MinecraftClient;
|
|
|
import net.minecraft.client.gui.Element;
|
|
|
import net.minecraft.client.util.math.MatrixStack;
|
|
@@ -45,8 +46,8 @@ public class TextListEntry extends TooltipListEntry<Object> {
|
|
|
super.render(matrices, index, y, x, entryWidth, entryHeight, mouseX, mouseY, isSelected, delta);
|
|
|
this.savedWidth = entryWidth;
|
|
|
int yy = y + 4;
|
|
|
- List<Text> strings = MinecraftClient.getInstance().textRenderer.wrapStringToWidthAsList(text, savedWidth);
|
|
|
- for (Text string : strings) {
|
|
|
+ List<class_5348> strings = MinecraftClient.getInstance().textRenderer.wrapStringToWidthAsList(text, savedWidth);
|
|
|
+ for (class_5348 string : strings) {
|
|
|
MinecraftClient.getInstance().textRenderer.drawWithShadow(matrices, string, x, yy, color);
|
|
|
yy += MinecraftClient.getInstance().textRenderer.fontHeight + 3;
|
|
|
}
|
|
@@ -56,7 +57,7 @@ public class TextListEntry extends TooltipListEntry<Object> {
|
|
|
public int getItemHeight() {
|
|
|
if (savedWidth == -1)
|
|
|
return 12;
|
|
|
- List<Text> strings = MinecraftClient.getInstance().textRenderer.wrapStringToWidthAsList(text, savedWidth);
|
|
|
+ List<class_5348> strings = MinecraftClient.getInstance().textRenderer.wrapStringToWidthAsList(text, savedWidth);
|
|
|
if (strings.isEmpty())
|
|
|
return 0;
|
|
|
return 15 + strings.size() * 12;
|