Ported cycle totem message to lang file.

This commit is contained in:
2026-01-12 22:19:00 +01:00
parent 24d21126b0
commit 684cb23f74
3 changed files with 9 additions and 5 deletions

View File

@ -97,7 +97,7 @@ public abstract class TotemItem extends Item {
targetIndex = targetIndex >= playerList.getPlayerCount() ? 0 : targetIndex; targetIndex = targetIndex >= playerList.getPlayerCount() ? 0 : targetIndex;
ServerPlayer target = playerList.getPlayers().get(targetIndex); ServerPlayer target = playerList.getPlayers().get(targetIndex);
TotemData newTotemData = new TotemData( totemData = new TotemData(
targetIndex, targetIndex,
target.getStringUUID(), target.getStringUUID(),
target.getScoreboardName(), target.getScoreboardName(),
@ -105,8 +105,10 @@ public abstract class TotemItem extends Item {
totemData.getCharge() totemData.getCharge()
); );
setTotemData(itemStack, newTotemData); setTotemData(itemStack, totemData);
return Component.literal(ChatFormatting.WHITE + "Now targetting " + ChatFormatting.GRAY + newTotemData.getTargetName() + "."); return LangAsset.MESSAGE_NOW_TARGETING.getComponent(
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.GRAY)
).withStyle(ChatFormatting.WHITE);
} }
public static boolean chargeTotem(ItemStack totemStack, ItemStack chargeStack) { public static boolean chargeTotem(ItemStack totemStack, ItemStack chargeStack) {

View File

@ -21,7 +21,8 @@ public enum LangAsset {
MESSAGE_UNABLE_TO_GET_PLAYER_WORLD("message", "unable_to_get_player_world"), MESSAGE_UNABLE_TO_GET_PLAYER_WORLD("message", "unable_to_get_player_world"),
MESSAGE_NOT_ENOUGH_CHARGE("message", "not_enough_charge"), MESSAGE_NOT_ENOUGH_CHARGE("message", "not_enough_charge"),
MESSAGE_UNABLE_TO_GET_YOUR_WORLD("message", "unable_to_get_your_world"), MESSAGE_UNABLE_TO_GET_YOUR_WORLD("message", "unable_to_get_your_world"),
MESSAGE_SUCCESSFULLY_REVIVED_TARGET("message", "successfully_revived_target"); MESSAGE_SUCCESSFULLY_REVIVED_TARGET("message", "successfully_revived_target"),
MESSAGE_NOW_TARGETING("message", "now_targeting");
private final String category; private final String category;
private final String key; private final String key;

View File

@ -14,5 +14,6 @@
"message.totem_of_reviving.unable_to_get_player_world": "Unable to get %s's world!", "message.totem_of_reviving.unable_to_get_player_world": "Unable to get %s's world!",
"message.totem_of_reviving.not_enough_charge": "Not enough charge!", "message.totem_of_reviving.not_enough_charge": "Not enough charge!",
"message.totem_of_reviving.unable_to_get_your_world": "Unable to get your world!", "message.totem_of_reviving.unable_to_get_your_world": "Unable to get your world!",
"message.totem_of_reviving.successfully_revived_target": "Successfully revived %s!" "message.totem_of_reviving.successfully_revived_target": "Successfully revived %s!",
"message.totem_of_reviving.now_targeting": "Now targeting %s."
} }