They for some reason changed a bit of some color code, idk what part. But now i need to add opacity manualy

This commit is contained in:
lukasabbe
2025-05-13 22:10:34 +02:00
parent 12f4848520
commit fcbfb26400
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -1,17 +1,17 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx4G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=25w17a
yarn_mappings=25w17a+build.1
loader_version=0.16.13
# check these on https://fabricmc.net/develop/
minecraft_version=25w20a
yarn_mappings=25w20a+build.1
loader_version=0.16.14
# Mod Properties
mod_version=1.11+1.21.6-SNAPSHOT.3
mod_version=1.11+1.21.6-SNAPSHOT.4
maven_group=me.lukasabbe
archives_base_name=Bookshelfinspector
# Dependencies
fabric_version=0.121.1+1.21.6
fabric_version=0.124.1+1.21.6
cloth_config=18.0.145
modmenu=14.0.0-rc.2
YAML_snake=2.4
@@ -17,6 +17,8 @@ import net.minecraft.text.MutableText;
import net.minecraft.text.Style;
import net.minecraft.text.Text;
import net.minecraft.text.Texts;
import net.minecraft.util.ColorCode;
import net.minecraft.util.Colors;
import net.minecraft.util.Formatting;
import org.joml.Matrix3x2fStack;
@@ -27,7 +29,6 @@ public class HudRenderer {
if(client.options.hudHidden) return;
if(!BookshelfinspectorClient.bookShelfData.isCurrentBookDataToggled) return;
final BookData currentBookData = BookshelfinspectorClient.currentBookData;
final int screenWidth = client.getWindow().getScaledWidth();
final int screenHeight = client.getWindow().getScaledHeight();
@@ -36,14 +37,13 @@ public class HudRenderer {
final ItemStack itemStack = currentBookData.itemStack;
int color = 0xFFFFFFFF;
final Integer colorValue = itemStack.getRarity().getFormatting().getColorValue();
if(colorValue != null){
color = colorValue;
color = colorValue + 0xFF000000;
}
float scaleFactor = ((float) BookshelfinspectorClient.config.scale /10);
float scaleFactor = ((float) BookshelfinspectorClient.config.scale / 10);
drawScaledText(context, itemStack.getName(), x,y+((int)(10*scaleFactor)), color, client.textRenderer);
ItemEnchantmentsComponent storedComponents = itemStack.getComponents().get(DataComponentTypes.STORED_ENCHANTMENTS);
@@ -68,7 +68,7 @@ public class HudRenderer {
}else {
Texts.setStyleIfAbsent(enchantmentText, Style.EMPTY.withColor(Formatting.GRAY));
}
drawScaledText(context, enchantmentText, x,y+i, 0xFFFFFFFF,client.textRenderer);
drawScaledText(context, enchantmentText, x,y+i, 0xFFFFFFFF, client.textRenderer);
i+=(int)(10*scaleFactor);
}
}