Inverted colors to improve readability of messages.

This commit is contained in:
2026-01-14 00:44:46 +01:00
parent 984f5ca8d6
commit 859775d7b5

View File

@ -105,8 +105,8 @@ public abstract class TotemItem extends Item {
setTotemData(itemStack, totemData);
return LangAsset.MESSAGE_NOW_TARGETING.getComponent(
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.GRAY)
).withStyle(ChatFormatting.WHITE);
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.WHITE)
).withStyle(ChatFormatting.GRAY);
}
public static boolean chargeTotem(ItemStack totemStack, ItemStack chargeStack) {
@ -155,20 +155,20 @@ public abstract class TotemItem extends Item {
if (!target.isSpectator()) {
return LangAsset.MESSAGE_PLAYER_IS_NOT_DEAD.getComponent(
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.GRAY)
).withStyle(ChatFormatting.WHITE);
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.WHITE)
).withStyle(ChatFormatting.GRAY);
}
try (ServerLevel targetLevel = target.serverLevel()) {
if (!targetLevel.equals(user.serverLevel()) && !config.getCanReviveAcrossDimensions()) {
return LangAsset.MESSAGE_PLAYER_IS_IN_ANOTHER_DIMENSION.getComponent(
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.GRAY)
).withStyle(ChatFormatting.WHITE);
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.WHITE)
).withStyle(ChatFormatting.GRAY);
}
} catch (IOException e) {
return LangAsset.MESSAGE_UNABLE_TO_GET_PLAYER_WORLD.getComponent(
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.DARK_RED)
).withStyle(ChatFormatting.RED);
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.RED)
).withStyle(ChatFormatting.DARK_RED);
}
if (!totemItem.canAffordTarget(totemData)) {
@ -193,8 +193,8 @@ public abstract class TotemItem extends Item {
itemStack.hurtAndBreak(1, user, slot);
return LangAsset.MESSAGE_SUCCESSFULLY_REVIVED_TARGET.getComponent(
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.DARK_GREEN)
).withStyle(ChatFormatting.GREEN);
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.GREEN)
).withStyle(ChatFormatting.DARK_GREEN);
}
@Override