添加波塞克描述
This commit is contained in:
parent
78c4a78aaa
commit
43e3a66c9c
2 changed files with 14 additions and 13 deletions
|
@ -8,6 +8,7 @@ import net.mcreator.target.item.AnimatedItem;
|
||||||
import net.mcreator.target.procedures.BocekreloadProcedure;
|
import net.mcreator.target.procedures.BocekreloadProcedure;
|
||||||
import net.mcreator.target.tools.GunsTool;
|
import net.mcreator.target.tools.GunsTool;
|
||||||
import net.mcreator.target.tools.RarityTool;
|
import net.mcreator.target.tools.RarityTool;
|
||||||
|
import net.mcreator.target.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -136,8 +137,8 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack itemstack, Level world, List<Component> list, TooltipFlag flag) {
|
public void appendHoverText(ItemStack stack, Level world, List<Component> list, TooltipFlag flag) {
|
||||||
super.appendHoverText(itemstack, world, list, flag);
|
TooltipTool.addBocekTips(list, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -68,17 +68,17 @@ public class TooltipTool {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addBocekTips(List<Component> tooltip, ItemStack stack) {
|
public static void addBocekTips(List<Component> tooltip, ItemStack stack) {
|
||||||
// tooltip.add(Component.literal(""));
|
tooltip.add(Component.literal(""));
|
||||||
//
|
|
||||||
// double damage = (ItemNBTTool.getDouble(stack, "damage", 0) +
|
double total = ItemNBTTool.getDouble(stack, "damage", 0) * ItemNBTTool.getDouble(stack, "damageadd", 1);
|
||||||
// ItemNBTTool.getDouble(stack, "adddamage", 0))
|
|
||||||
// * ItemNBTTool.getDouble(stack, "damageadd", 1);
|
tooltip.add(Component.translatable("des.target.tips.damage").withStyle(ChatFormatting.GRAY)
|
||||||
//
|
.append(Component.literal("").withStyle(ChatFormatting.RESET))
|
||||||
// tooltip.add(Component.translatable("des.target.tips.damage").withStyle(ChatFormatting.GRAY)
|
.append(Component.literal(new DecimalFormat("##.#").format(total * 0.1) + " * 10").withStyle(ChatFormatting.GREEN))
|
||||||
// .append(Component.literal("").withStyle(ChatFormatting.RESET))
|
.append(Component.literal(" / ").withStyle(ChatFormatting.RESET))
|
||||||
// .append(Component.literal(new DecimalFormat("##.#").format(damage)).withStyle(ChatFormatting.GREEN)));
|
.append(Component.literal(new DecimalFormat("##.#").format(total)).withStyle(ChatFormatting.GREEN)));
|
||||||
//
|
|
||||||
// addLevelTips(tooltip, stack);
|
addLevelTips(tooltip, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addSentinelTips(List<Component> tooltip, ItemStack stack) {
|
public static void addSentinelTips(List<Component> tooltip, ItemStack stack) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue