mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Fix display values for RNG
This commit is contained in:
		@@ -1,5 +0,0 @@
 | 
				
			|||||||
package com.gmail.nossr50.util.random;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class InvalidActivationException extends Exception {
 | 
					 | 
				
			||||||
    //Weee
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -59,7 +59,7 @@ public class RandomChanceUtil {
 | 
				
			|||||||
    public static double chanceOfSuccessPercentage(@NotNull Player player, @NotNull SubSkillType subSkillType, boolean isLucky) {
 | 
					    public static double chanceOfSuccessPercentage(@NotNull Player player, @NotNull SubSkillType subSkillType, boolean isLucky) {
 | 
				
			||||||
        Probability probability = SkillUtils.getSubSkillProbability(subSkillType, player);
 | 
					        Probability probability = SkillUtils.getSubSkillProbability(subSkillType, player);
 | 
				
			||||||
        //Probability values are on a 0-1 scale and need to be "transformed" into a 1-100 scale
 | 
					        //Probability values are on a 0-1 scale and need to be "transformed" into a 1-100 scale
 | 
				
			||||||
        double percentageValue = probability.getValue() * 100;
 | 
					        double percentageValue = probability.getValue(); //Doesn't need to be scaled
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Apply lucky modifier
 | 
					        //Apply lucky modifier
 | 
				
			||||||
        if(isLucky) {
 | 
					        if(isLucky) {
 | 
				
			||||||
@@ -71,7 +71,7 @@ public class RandomChanceUtil {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public static double chanceOfSuccessPercentage(@NotNull Probability probability, boolean isLucky) {
 | 
					    public static double chanceOfSuccessPercentage(@NotNull Probability probability, boolean isLucky) {
 | 
				
			||||||
        //Probability values are on a 0-1 scale and need to be "transformed" into a 1-100 scale
 | 
					        //Probability values are on a 0-1 scale and need to be "transformed" into a 1-100 scale
 | 
				
			||||||
        double percentageValue = probability.getValue() * 100;
 | 
					        double percentageValue = probability.getValue();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Apply lucky modifier
 | 
					        //Apply lucky modifier
 | 
				
			||||||
        if(isLucky) {
 | 
					        if(isLucky) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user