ExtendedAE_Plus/src/main/java/com/extendedae_plus/items/EntitySpeedTickerPartItem.java
2025-11-17 02:17:59 +08:00

27 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.extendedae_plus.items;
import appeng.items.parts.PartItem;
import com.extendedae_plus.ae.parts.EntitySpeedTickerPart;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public class EntitySpeedTickerPartItem extends PartItem<EntitySpeedTickerPart> {
public EntitySpeedTickerPartItem(Properties properties) {
super(properties, EntitySpeedTickerPart.class, EntitySpeedTickerPart::new);
}
@Override
public void appendHoverText(ItemStack stack, @Nullable Level world, List<Component> 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 网络能量,网络能量不足时无法加速"));
}
}