mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
SkillProperty pt 1
This commit is contained in:
parent
8c164749e2
commit
b63280a2aa
@ -6,10 +6,10 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
@ConfigSerializable
|
||||
public class ConfigSectionExploitAcrobatics {
|
||||
|
||||
public static final int ACROBATIC_LOCATION_LIMIT_DEFAULT = 50;
|
||||
public static final boolean PREVENT_ACROBATICS_ABUSE_DEFAULT = true;
|
||||
public static final int TELEPORT_COOLDOWN_DEFAULT = 30;
|
||||
public static final int ROLL_XP_GAIN_CD_DEFAULT = 60;
|
||||
private static final int ACROBATIC_LOCATION_LIMIT_DEFAULT = 50;
|
||||
private static final boolean PREVENT_ACROBATICS_ABUSE_DEFAULT = true;
|
||||
private static final int TELEPORT_COOLDOWN_DEFAULT = 30;
|
||||
private static final int ROLL_XP_GAIN_CD_DEFAULT = 60;
|
||||
|
||||
@Setting(value = "Player-Fall-Location-Tracking",
|
||||
comment = "The amount of locations to keep track of for player falls." +
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.gmail.nossr50.config.hocon.skills.repair.repairmastery;
|
||||
|
||||
import com.gmail.nossr50.annotation.SkillProperty;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
|
||||
public abstract class AbstractScalingProperty implements ScalingProperty {
|
||||
public SubSkillType subSkillType;
|
||||
|
||||
public AbstractScalingProperty(SubSkillType subSkillType) {
|
||||
super();
|
||||
this.subSkillType = subSkillType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubSkillType getSubSkillType() {
|
||||
return subSkillType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AbstractScalingProperty{" +
|
||||
"subSkillType=" + subSkillType +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
public class MaxBonusLevel extends AbstractScalingProperty {
|
||||
public MaxBonusLevel(SubSkillType subSkillType) {
|
||||
super(subSkillType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the appropriate value for this scaling property whether it is Standard or Retro
|
||||
*
|
||||
* @return the value used in scaling calculations for this ScalingProperty
|
||||
*/
|
||||
@Override
|
||||
public double getValue() {
|
||||
if(mcMMO.getConfigManager().isRetroMode())
|
||||
{
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
public interface ScalingProperty extends SkillProperty {
|
||||
/**
|
||||
* Returns the appropriate value for this scaling property whether it is Standard or Retro
|
||||
* @return the value used in scaling calculations for this ScalingProperty
|
||||
*/
|
||||
double getValue();
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
|
||||
/**
|
||||
* Skill Properties are various values used for interactions of sub-skills
|
||||
*/
|
||||
public interface SkillProperty {
|
||||
SubSkillType getSubSkillType();
|
||||
}
|
@ -12,6 +12,7 @@ public class Repair {
|
||||
public Repair() {
|
||||
anvilMaterial = mcMMO.getConfigManager().getConfigRepair().getRepairGeneral().getRepairAnvilMaterial();
|
||||
|
||||
//TODO: Replace this horrid shit
|
||||
if(mcMMO.isRetroModeEnabled())
|
||||
{
|
||||
repairMasteryMaxBonus = mcMMO.getConfigManager().getConfigRepair().getRepairSubSkills().getRepairMastery().getSettings().getRetro().getMaxBonusPercentage();
|
||||
|
Loading…
Reference in New Issue
Block a user