Ported cycle totem message to lang file.
This commit is contained in:
@ -97,7 +97,7 @@ public abstract class TotemItem extends Item {
|
||||
targetIndex = targetIndex >= playerList.getPlayerCount() ? 0 : targetIndex;
|
||||
|
||||
ServerPlayer target = playerList.getPlayers().get(targetIndex);
|
||||
TotemData newTotemData = new TotemData(
|
||||
totemData = new TotemData(
|
||||
targetIndex,
|
||||
target.getStringUUID(),
|
||||
target.getScoreboardName(),
|
||||
@ -105,8 +105,10 @@ public abstract class TotemItem extends Item {
|
||||
totemData.getCharge()
|
||||
);
|
||||
|
||||
setTotemData(itemStack, newTotemData);
|
||||
return Component.literal(ChatFormatting.WHITE + "Now targetting " + ChatFormatting.GRAY + newTotemData.getTargetName() + ".");
|
||||
setTotemData(itemStack, totemData);
|
||||
return LangAsset.MESSAGE_NOW_TARGETING.getComponent(
|
||||
Component.literal(totemData.getTargetName()).withStyle(ChatFormatting.GRAY)
|
||||
).withStyle(ChatFormatting.WHITE);
|
||||
}
|
||||
|
||||
public static boolean chargeTotem(ItemStack totemStack, ItemStack chargeStack) {
|
||||
|
||||
@ -21,7 +21,8 @@ public enum LangAsset {
|
||||
MESSAGE_UNABLE_TO_GET_PLAYER_WORLD("message", "unable_to_get_player_world"),
|
||||
MESSAGE_NOT_ENOUGH_CHARGE("message", "not_enough_charge"),
|
||||
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 key;
|
||||
|
||||
@ -14,5 +14,6 @@
|
||||
"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.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."
|
||||
}
|
||||
Reference in New Issue
Block a user