添加滋崩的开发提示

This commit is contained in:
17146 2025-03-11 20:52:07 +08:00
parent b5b4d117d4
commit 28cb9e1ebf
4 changed files with 15 additions and 1 deletions

View file

@ -20,7 +20,7 @@ public class TooltipTool {
} }
public static void addDevelopingText(List<Component> tooltip) { public static void addDevelopingText(List<Component> tooltip) {
tooltip.add(Component.literal("本物品还在开发中").withStyle(ChatFormatting.LIGHT_PURPLE).withStyle(ChatFormatting.BOLD)); tooltip.add(Component.translatable("des.superbwarfare.developing").withStyle(ChatFormatting.LIGHT_PURPLE).withStyle(ChatFormatting.BOLD));
} }
public static double perkDamage(ItemStack stack) { public static double perkDamage(ItemStack stack) {

View file

@ -4,11 +4,13 @@ import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.capability.LaserCapability; import com.atsuishio.superbwarfare.capability.LaserCapability;
import com.atsuishio.superbwarfare.capability.LaserHandler; import com.atsuishio.superbwarfare.capability.LaserHandler;
import com.atsuishio.superbwarfare.capability.ModCapabilities; import com.atsuishio.superbwarfare.capability.ModCapabilities;
import com.atsuishio.superbwarfare.client.TooltipTool;
import com.atsuishio.superbwarfare.entity.projectile.LaserEntity; import com.atsuishio.superbwarfare.entity.projectile.LaserEntity;
import com.atsuishio.superbwarfare.init.ModSounds; import com.atsuishio.superbwarfare.init.ModSounds;
import com.atsuishio.superbwarfare.network.message.LaserShootMessage; import com.atsuishio.superbwarfare.network.message.LaserShootMessage;
import com.atsuishio.superbwarfare.network.message.ShakeClientMessage; import com.atsuishio.superbwarfare.network.message.ShakeClientMessage;
import com.atsuishio.superbwarfare.tools.TraceTool; import com.atsuishio.superbwarfare.tools.TraceTool;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ClientboundStopSoundPacket; import net.minecraft.network.protocol.game.ClientboundStopSoundPacket;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvent;
@ -20,12 +22,15 @@ import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import net.minecraftforge.network.PacketDistributor; import net.minecraftforge.network.PacketDistributor;
import org.jetbrains.annotations.Nullable;
import java.util.Comparator; import java.util.Comparator;
import java.util.List;
import java.util.Set; import java.util.Set;
public class BeamTest extends Item { public class BeamTest extends Item {
@ -131,4 +136,9 @@ public class BeamTest extends Item {
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) { public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {
return slotChanged; return slotChanged;
} }
@Override
public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) {
TooltipTool.addDevelopingText(pTooltipComponents);
}
} }

View file

@ -531,6 +531,8 @@
"des.superbwarfare.revolver.da": "DA", "des.superbwarfare.revolver.da": "DA",
"des.superbwarfare.revolver.sa": "SA", "des.superbwarfare.revolver.sa": "SA",
"des.superbwarfare.developing": "This item is still under development",
"jei.superbwarfare.ancient_cpu": "Mysterious ancient technology, can be found at ancient cities.", "jei.superbwarfare.ancient_cpu": "Mysterious ancient technology, can be found at ancient cities.",
"jei.superbwarfare.charging_station": "Generates power by consuming fuel or food, and can also accept FE energy input. This block supplies FE energy to adjacent blocks, and can also charge rechargeable vehicles within range.", "jei.superbwarfare.charging_station": "Generates power by consuming fuel or food, and can also accept FE energy input. This block supplies FE energy to adjacent blocks, and can also charge rechargeable vehicles within range.",

View file

@ -531,6 +531,8 @@
"des.superbwarfare.revolver.da": "双动", "des.superbwarfare.revolver.da": "双动",
"des.superbwarfare.revolver.sa": "单动", "des.superbwarfare.revolver.sa": "单动",
"des.superbwarfare.developing": "本物品还在开发中",
"jei.superbwarfare.ancient_cpu": "神秘的古代科技,可以在古城找到。", "jei.superbwarfare.ancient_cpu": "神秘的古代科技,可以在古城找到。",
"jei.superbwarfare.charging_station": "使用燃料或食物进行发电也可以接收主动输入的FE能量。能够为相邻的方块提供FE能量为周围一定范围内的可充能载具充能。", "jei.superbwarfare.charging_station": "使用燃料或食物进行发电也可以接收主动输入的FE能量。能够为相邻的方块提供FE能量为周围一定范围内的可充能载具充能。",