mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-12-24 18:17:41 +01:00
parent
93869cb34a
commit
ac6bead52e
@ -135,6 +135,9 @@ public class IslandLevelCalculator {
|
||||
case "tan":
|
||||
x = Math.tan(Math.toRadians(x));
|
||||
break;
|
||||
case "log":
|
||||
x = Math.log(x);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Unknown function: " + func);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class ConfigSettings implements ConfigObject {
|
||||
@ConfigComment("Island level calculation formula")
|
||||
@ConfigComment("blocks - the sum total of all block values, less any death penalty")
|
||||
@ConfigComment("level_cost - in a linear equation, the value of one level")
|
||||
@ConfigComment("This formula can include +,=,*,/,sqrt,^,sin,cos,tan. Result will always be rounded to a long integer")
|
||||
@ConfigComment("This formula can include +,=,*,/,sqrt,^,sin,cos,tan,log (natural log). Result will always be rounded to a long integer")
|
||||
@ConfigComment("for example, an alternative non-linear option could be: 3 * sqrt(blocks / level_cost)")
|
||||
@ConfigEntry(path = "level-calc")
|
||||
private String levelCalc = "blocks / level_cost";
|
||||
|
@ -53,7 +53,7 @@ levelcost: 100
|
||||
# Island level calculation formula
|
||||
# blocks - the sum total of all block values, less any death penalty
|
||||
# level_cost - in a linear equation, the value of one level
|
||||
# This formula can include +,=,*,/,sqrt,^,sin,cos,tan. Result will always be rounded to a long integer
|
||||
# This formula can include +,=,*,/,sqrt,^,sin,cos,tan,log (natural log). Result will always be rounded to a long integer
|
||||
# for example, an alternative non-linear option could be: 3 * sqrt(blocks / level_cost)
|
||||
level-calc: blocks / level_cost
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user