Skip to content

Commit 948fda5

Browse files
committed
fix invisible shard type text
1 parent 23be5b5 commit 948fda5

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/main/java/net/modfest/scatteredshards/block/ShardBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public static ItemStack createShardBlock(ShardType shardType, Identifier shardId
181181

182182
//Fill in name / lore
183183
stack.set(DataComponentTypes.ITEM_NAME, shard.name());
184-
Text shardTypeDesc = ShardType.getDescription(shard.shardTypeId()).copy().fillStyle(Style.EMPTY.withColor(shardType.textColor()));
184+
Text shardTypeDesc = ShardType.getDescription(shard.shardTypeId()).copy().fillStyle(Style.EMPTY.withColor(0xFF_000000 | shardType.textColor()));
185185
LoreComponent lore = new LoreComponent(List.of(shardTypeDesc));
186186
stack.set(DataComponentTypes.LORE, lore);
187187

src/main/java/net/modfest/scatteredshards/client/ShardCollectedToast.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public ShardCollectedToast(Shard shard) {
5252
}
5353

5454
this.icon = shard.icon();
55-
this.descLines = wrap(List.of(shard.name().copy().withColor(ScatteredShardsAPI.getClientLibrary().shardTypes().get(shard.shardTypeId()).orElse(ShardType.MISSING).textColor())));
55+
this.descLines = wrap(List.of(shard.name().copy().withColor(0xFF_000000 | ScatteredShardsAPI.getClientLibrary().shardTypes().get(shard.shardTypeId()).orElse(ShardType.MISSING).textColor())));
5656
this.hintLines = wrap(List.of(hint));
5757
this.height = 32 + Math.max(0, Math.max(this.descLines.size(), this.hintLines.size()) - 1) * 11;
5858
icon.ifRight(ModMetaUtil::touchIconTexture);

src/main/java/net/modfest/scatteredshards/client/screen/widget/WMiniShard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void addTooltip(TooltipBuilder tooltip) {
104104
if (ScatteredShardsClient.hasShiftDown() && !shard.name().getString().isBlank()) {
105105
tooltip.add(shard.name());
106106
}
107-
tooltip.add(ShardType.getDescription(shard.shardTypeId()).copy().withColor(shardType.textColor()));
107+
tooltip.add(ShardType.getDescription(shard.shardTypeId()).copy().withColor(0xFF_000000 | shardType.textColor()));
108108
if (ScatteredShardsClient.hasShiftDown()) {
109109
GlobalCollection globalCollection = ScatteredShardsAPI.getClientGlobalCollection();
110110
if (globalCollection != null) {

src/main/java/net/modfest/scatteredshards/client/screen/widget/WShardPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class WShardPanel extends WPlainPanel {
5252
private final WScaledLabel typeDescription = new WScaledLabel(() -> ShardType.getDescription(shard.shardTypeId()), 0.5f)
5353
.setShadow(true)
5454
.setHorizontalAlignment(HorizontalAlignment.CENTER)
55-
.setColor(() -> shardType.textColor());
55+
.setColor(() -> 0xFF_000000 | shardType.textColor());
5656
private final WScaledLabel source = new WScaledLabel(() -> Shard.getSourceForSourceId(shard.sourceId()), 0.9f)
5757
.setShadow(true)
5858
.setHorizontalAlignment(HorizontalAlignment.CENTER);
@@ -95,7 +95,7 @@ public WShardPanel setType(Identifier shardTypeId, ShardType value) {
9595
updateDimensionsAndBacking();
9696

9797
typeDescription.setText(ShardType.getDescription(shardTypeId));
98-
typeDescription.setColor(value::textColor);
98+
typeDescription.setColor(() -> 0xFF_000000 | value.textColor());
9999
return this;
100100
}
101101

src/main/java/net/modfest/scatteredshards/item/ShardItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDispla
7474

7575
Identifier shardTypeId = shard.get().shardTypeId();
7676
ShardType shardType = library.shardTypes().get(shardTypeId).orElse(ShardType.MISSING);
77-
Text shardTypeDesc = ShardType.getDescription(shardTypeId).copy().fillStyle(Style.EMPTY.withColor(shardType.textColor()));
77+
Text shardTypeDesc = ShardType.getDescription(shardTypeId).copy().fillStyle(Style.EMPTY.withColor(0xFF_000000 | shardType.textColor()));
7878

7979
textConsumer.accept(shardTypeDesc);
8080
textConsumer.accept(Text.translatable("item.scattered_shards.shard_item.description").formatted(Formatting.GRAY));

0 commit comments

Comments
 (0)