diff --git a/src/main/java/com/extendedae_plus/ae/items/EntitySpeedTickerPartItem.java b/src/main/java/com/extendedae_plus/ae/items/EntitySpeedTickerPartItem.java index 7cb982d..d69893e 100644 --- a/src/main/java/com/extendedae_plus/ae/items/EntitySpeedTickerPartItem.java +++ b/src/main/java/com/extendedae_plus/ae/items/EntitySpeedTickerPartItem.java @@ -1,6 +1,12 @@ package com.extendedae_plus.ae.items; import appeng.items.parts.PartItem; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; +import java.util.List; import com.extendedae_plus.ae.parts.EntitySpeedTickerPart; @@ -8,4 +14,13 @@ public class EntitySpeedTickerPartItem extends PartItem { public EntitySpeedTickerPartItem(Properties properties) { super(properties, EntitySpeedTickerPart.class, EntitySpeedTickerPart::new); } + + @Override + public void appendHoverText(ItemStack stack, @Nullable Level world, List tooltip, TooltipFlag flag) { + super.appendHoverText(stack, world, tooltip, flag); + // 中文 tooltip:提示需要放入实体加速卡开始加速,显示最大加速倍率和能量消耗说明 + tooltip.add(Component.translatable("item.extendedae_plus.entity_speed_ticker.tip.requirement", "需要放入实体加速卡以启用加速")); + tooltip.add(Component.translatable("item.extendedae_plus.entity_speed_ticker.tip.max", "最高可达 1024x 加速")); + tooltip.add(Component.translatable("item.extendedae_plus.entity_speed_ticker.tip.energy", "加速将消耗 AE 网络能量,网络能量不足时无法加速")); + } } \ No newline at end of file diff --git a/src/main/resources/assets/extendedae_plus/lang/en_us.json b/src/main/resources/assets/extendedae_plus/lang/en_us.json index 7dde8f6..561e56c 100644 --- a/src/main/resources/assets/extendedae_plus/lang/en_us.json +++ b/src/main/resources/assets/extendedae_plus/lang/en_us.json @@ -50,6 +50,10 @@ "screen.extendedae_plus.entity_speed_ticker.speed": "Current speed multiplier: %d", "screen.extendedae_plus.entity_speed_ticker.multiplier": "Extra consumption multiplier: %s", + "item.extendedae_plus.entity_speed_ticker.tip.requirement": "Requires Entity Acceleration Card(s) to enable acceleration", + "item.extendedae_plus.entity_speed_ticker.tip.max": "Maximum up to 1024x speed", + "item.extendedae_plus.entity_speed_ticker.tip.energy": "Acceleration consumes AE network power; insufficient power disables acceleration", + "config.jade.plugin_extendedae_plus.wireless_transceiver_info": "Wireless Transceiver Info", "config.jade.plugin_extendedae_plus.wt_frequency": "Show Frequency", "config.jade.plugin_extendedae_plus.wt_master_mode": "Show Master/Slave Mode", diff --git a/src/main/resources/assets/extendedae_plus/lang/zh_cn.json b/src/main/resources/assets/extendedae_plus/lang/zh_cn.json index 7126a2c..8a98475 100644 --- a/src/main/resources/assets/extendedae_plus/lang/zh_cn.json +++ b/src/main/resources/assets/extendedae_plus/lang/zh_cn.json @@ -50,6 +50,10 @@ "screen.extendedae_plus.entity_speed_ticker.speed": "当前加速倍率: %d", "screen.extendedae_plus.entity_speed_ticker.multiplier": "额外消耗倍率: %s", + "item.extendedae_plus.entity_speed_ticker.tip.requirement": "需要放入实体加速卡以启用加速", + "item.extendedae_plus.entity_speed_ticker.tip.max": "最高可达 1024x 加速", + "item.extendedae_plus.entity_speed_ticker.tip.energy": "加速将消耗 AE 网络能量,网络能量不足时无法加速", + "config.jade.plugin_extendedae_plus.wireless_transceiver_info": "无线收发器信息", "config.jade.plugin_extendedae_plus.wt_frequency": "显示频率", "config.jade.plugin_extendedae_plus.wt_master_mode": "显示主/从模式",