修改等级显示
This commit is contained in:
parent
4e7119befb
commit
6fc74e3592
2 changed files with 5 additions and 12 deletions
|
@ -226,13 +226,6 @@ public class PlayerEventHandler {
|
|||
if (player.getPersistentData().getDouble("prone") > 0) {
|
||||
player.getPersistentData().putDouble("prone", (player.getPersistentData().getDouble("prone") - 1));
|
||||
}
|
||||
|
||||
// boolean flag = !(player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).refresh;
|
||||
//
|
||||
// player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||
// capability.refresh = flag;
|
||||
// capability.syncPlayerVariables(player);
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -271,7 +264,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.33334);
|
||||
tag.putDouble("UpgradePoint", tag.getDouble("UpgradePoint") + 0.25);
|
||||
}
|
||||
tag.putDouble("damagenow", (tag.getDouble("damagetotal") - tag.getDouble("exp1")));
|
||||
tag.putDouble("damageneed", (tag.getDouble("exp2") - tag.getDouble("exp1")));
|
||||
|
|
|
@ -62,13 +62,13 @@ public class TooltipTool {
|
|||
double rate = ItemNBTTool.getDouble(stack, "damagenow", 0) / ItemNBTTool.getDouble(stack, "damageneed", 1);
|
||||
|
||||
ChatFormatting formatting;
|
||||
if (level < 4) {
|
||||
if (level < 10) {
|
||||
formatting = ChatFormatting.WHITE;
|
||||
} else if (level < 6) {
|
||||
} else if (level < 20) {
|
||||
formatting = ChatFormatting.AQUA;
|
||||
} else if (level < 8) {
|
||||
} else if (level < 30) {
|
||||
formatting = ChatFormatting.LIGHT_PURPLE;
|
||||
} else if (level < 10) {
|
||||
} else if (level < 40) {
|
||||
formatting = ChatFormatting.GOLD;
|
||||
} else {
|
||||
formatting = ChatFormatting.RED;
|
||||
|
|
Loading…
Add table
Reference in a new issue