mirror of
https://github.com/lukasabbe/bookshelf-inspector.git
synced 2026-04-30 10:40:53 +00:00
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:
+6
-6
@@ -1,17 +1,17 @@
|
|||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx4G
|
org.gradle.jvmargs=-Xmx4G
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://fabricmc.net/develop/
|
||||||
minecraft_version=25w17a
|
minecraft_version=25w20a
|
||||||
yarn_mappings=25w17a+build.1
|
yarn_mappings=25w20a+build.1
|
||||||
loader_version=0.16.13
|
loader_version=0.16.14
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.11+1.21.6-SNAPSHOT.3
|
mod_version=1.11+1.21.6-SNAPSHOT.4
|
||||||
maven_group=me.lukasabbe
|
maven_group=me.lukasabbe
|
||||||
archives_base_name=Bookshelfinspector
|
archives_base_name=Bookshelfinspector
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.121.1+1.21.6
|
fabric_version=0.124.1+1.21.6
|
||||||
cloth_config=18.0.145
|
cloth_config=18.0.145
|
||||||
modmenu=14.0.0-rc.2
|
modmenu=14.0.0-rc.2
|
||||||
YAML_snake=2.4
|
YAML_snake=2.4
|
||||||
@@ -17,6 +17,8 @@ import net.minecraft.text.MutableText;
|
|||||||
import net.minecraft.text.Style;
|
import net.minecraft.text.Style;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.text.Texts;
|
import net.minecraft.text.Texts;
|
||||||
|
import net.minecraft.util.ColorCode;
|
||||||
|
import net.minecraft.util.Colors;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
import org.joml.Matrix3x2fStack;
|
import org.joml.Matrix3x2fStack;
|
||||||
|
|
||||||
@@ -27,7 +29,6 @@ public class HudRenderer {
|
|||||||
if(client.options.hudHidden) return;
|
if(client.options.hudHidden) return;
|
||||||
if(!BookshelfinspectorClient.bookShelfData.isCurrentBookDataToggled) return;
|
if(!BookshelfinspectorClient.bookShelfData.isCurrentBookDataToggled) return;
|
||||||
|
|
||||||
|
|
||||||
final BookData currentBookData = BookshelfinspectorClient.currentBookData;
|
final BookData currentBookData = BookshelfinspectorClient.currentBookData;
|
||||||
final int screenWidth = client.getWindow().getScaledWidth();
|
final int screenWidth = client.getWindow().getScaledWidth();
|
||||||
final int screenHeight = client.getWindow().getScaledHeight();
|
final int screenHeight = client.getWindow().getScaledHeight();
|
||||||
@@ -36,14 +37,13 @@ public class HudRenderer {
|
|||||||
final ItemStack itemStack = currentBookData.itemStack;
|
final ItemStack itemStack = currentBookData.itemStack;
|
||||||
|
|
||||||
int color = 0xFFFFFFFF;
|
int color = 0xFFFFFFFF;
|
||||||
|
|
||||||
final Integer colorValue = itemStack.getRarity().getFormatting().getColorValue();
|
final Integer colorValue = itemStack.getRarity().getFormatting().getColorValue();
|
||||||
|
|
||||||
if(colorValue != null){
|
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);
|
drawScaledText(context, itemStack.getName(), x,y+((int)(10*scaleFactor)), color, client.textRenderer);
|
||||||
|
|
||||||
ItemEnchantmentsComponent storedComponents = itemStack.getComponents().get(DataComponentTypes.STORED_ENCHANTMENTS);
|
ItemEnchantmentsComponent storedComponents = itemStack.getComponents().get(DataComponentTypes.STORED_ENCHANTMENTS);
|
||||||
@@ -68,7 +68,7 @@ public class HudRenderer {
|
|||||||
}else {
|
}else {
|
||||||
Texts.setStyleIfAbsent(enchantmentText, Style.EMPTY.withColor(Formatting.GRAY));
|
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);
|
i+=(int)(10*scaleFactor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user