添加升级点数的tips、重铸台的合成表
This commit is contained in:
parent
f544173ad0
commit
40050a79fa
7 changed files with 43 additions and 3 deletions
|
@ -246,7 +246,7 @@ public class PlayerEventHandler {
|
|||
if (tag.getDouble("damagetotal") >= tag.getDouble("exp2")) {
|
||||
tag.putDouble("exp1", (tag.getDouble("exp2")));
|
||||
tag.putInt("level", tag.getInt("level") + 1);
|
||||
tag.putDouble("UpgradePoint", tag.getDouble("UpgradePoint") + 0.2);
|
||||
tag.putDouble("UpgradePoint", tag.getDouble("UpgradePoint") + 0.33334);
|
||||
}
|
||||
tag.putDouble("damagenow", (tag.getDouble("damagetotal") - tag.getDouble("exp1")));
|
||||
tag.putDouble("damageneed", (tag.getDouble("exp2") - tag.getDouble("exp1")));
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
|
@ -77,6 +78,12 @@ public class TooltipTool {
|
|||
.append(Component.literal("").withStyle(ChatFormatting.RESET))
|
||||
.append(Component.literal(level + " " + new DecimalFormat("##.##").format(rate * 100) + "%").withStyle(formatting).withStyle(ChatFormatting.BOLD)));
|
||||
|
||||
int upgradePoint = Mth.floor(ItemNBTTool.getDouble(stack, "UpgradePoint", 0));
|
||||
|
||||
tooltip.add(Component.translatable("des.superbwarfare.tips.upgradepoint").withStyle(ChatFormatting.GRAY)
|
||||
.append(Component.literal("").withStyle(ChatFormatting.RESET))
|
||||
.append(Component.literal(String.valueOf(upgradePoint)).withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.BOLD)));
|
||||
|
||||
}
|
||||
|
||||
private static void addBypassTips(List<Component> tooltip, ItemStack stack) {
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
"des.superbwarfare.tips.level": "Level: ",
|
||||
"des.superbwarfare.tips.bypass": "Armor Piercing: ",
|
||||
"des.superbwarfare.tips.distance": "Drone Distance: ",
|
||||
"des.superbwarfare.tips.upgradepoint": "Ppgrade Point: ",
|
||||
|
||||
"item.superbwarfare.vector_blueprint": "VECTOR Blueprint",
|
||||
"item.superbwarfare.m_60_blueprint": "M60 Blueprint",
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
"item.superbwarfare.qbz_95": "95-1式自动步枪",
|
||||
"item.superbwarfare.k_98": "KAR-98K",
|
||||
|
||||
"des.superbwarfare.tips.upgradepoint": "升级点数: ",
|
||||
"des.superbwarfare.tips.damage": "伤害: ",
|
||||
"des.superbwarfare.tips.level": "等级: ",
|
||||
"des.superbwarfare.tips.bypass": "护甲穿透: ",
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
"superbwarfare:epic_chest",
|
||||
"superbwarfare:epic_chest_2",
|
||||
"superbwarfare:epic_chest_3",
|
||||
"superbwarfare:epic_chest_4"
|
||||
"superbwarfare:epic_chest_4",
|
||||
"superbwarfare:ancient_cpu_chest"
|
||||
],
|
||||
"replace": false
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:random_chance",
|
||||
"chance": 0.2
|
||||
"chance": 0.4
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"abc",
|
||||
"ded",
|
||||
"ddd"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "minecraft:gold_ingot"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:diamond"
|
||||
},
|
||||
"c": {
|
||||
"item": "minecraft:redstone"
|
||||
},
|
||||
"d": {
|
||||
"item": "minecraft:polished_basalt"
|
||||
},
|
||||
"e": {
|
||||
"item": "superbwarfare:ancient_cpu"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "superbwarfare:reforging_table",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue