From 80bfe6faba7d1727fdca2fc2ede23442b04f1a50 Mon Sep 17 00:00:00 2001 From: Aria Sangarin Date: Tue, 10 Mar 2020 14:45:49 +0100 Subject: [PATCH] Custom EXP Curves --- .../mmocore/api/experience/Profession.java | 9 ++- .../mmocore/api/player/PlayerData.java | 6 +- .../mmocore/api/player/Professions.java | 6 +- .../api/player/profess/PlayerClass.java | 8 ++- .../command/rpg/admin/InfoCommandMap.java | 4 +- .../comp/placeholder/RPGPlaceholders.java | 6 +- .../mmocore/gui/ClassConfirmation.java | 2 +- .../net/Indyuce/mmocore/gui/PlayerStats.java | 4 +- .../mmocore/manager/ConfigManager.java | 58 ++++++++++++++----- .../resources/default/classes/arcane-mage.yml | 3 + src/main/resources/default/classes/human.yml | 3 + src/main/resources/default/classes/mage.yml | 3 + .../resources/default/classes/marksman.yml | 3 + .../resources/default/classes/paladin.yml | 3 + src/main/resources/default/classes/rogue.yml | 3 + .../resources/default/classes/warrior.yml | 3 + .../default/{ => expcurves}/levels.txt | 0 .../resources/default/expcurves/mining.txt | 25 ++++++++ .../resources/default/professions/mining.yml | 3 + 19 files changed, 119 insertions(+), 33 deletions(-) rename src/main/resources/default/{ => expcurves}/levels.txt (100%) create mode 100644 src/main/resources/default/expcurves/mining.txt diff --git a/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java b/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java index d0fccc36..8f7b62f8 100644 --- a/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java +++ b/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java @@ -15,10 +15,10 @@ import net.Indyuce.mmocore.api.util.math.formula.LinearValue; import net.mmogroup.mmolib.MMOLib; public class Profession { - private final String id, name; + private final String id, name, expCurve; private final LinearValue experience; - + /* * removed when loaded */ @@ -31,6 +31,7 @@ public class Profession { this.name = config.getString("name"); Validate.notNull(name, "Could not load name"); + expCurve = config.getString("exp-curve", "levels"); experience = new LinearValue(config.getConfigurationSection("experience")); if (config.contains("exp-sources")) @@ -109,6 +110,10 @@ public class Profession { return name; } + public String getEXPCurve() { + return expCurve; + } + public int calculateExperience(int x) { return (int) experience.calculate(x); } diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index f42d0019..9b2a37c0 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -218,13 +218,13 @@ public class PlayerData extends OfflinePlayerData { public void giveLevels(int value) { int total = 0; while (value-- > 0) - total += MMOCore.plugin.configManager.getNeededExperience(getLevel() + value + 1); + total += MMOCore.plugin.configManager.getNeededExperience(getLevel() + value + 1, profess); giveExperience(total); } public void setExperience(int value) { experience = Math.max(0, value); - refreshVanillaExp(MMOCore.plugin.configManager.getNeededExperience(getLevel() + 1)); + refreshVanillaExp(MMOCore.plugin.configManager.getNeededExperience(getLevel() + 1, profess)); } public void refreshVanillaExp(float needed) { @@ -409,7 +409,7 @@ public class PlayerData extends OfflinePlayerData { int needed; boolean check = false; - while (experience >= (needed = MMOCore.plugin.configManager.getNeededExperience(getLevel() + 1))) { + while (experience >= (needed = MMOCore.plugin.configManager.getNeededExperience(getLevel() + 1, profess))) { if (hasReachedMaxLevel()) { experience = 0; diff --git a/src/main/java/net/Indyuce/mmocore/api/player/Professions.java b/src/main/java/net/Indyuce/mmocore/api/player/Professions.java index d6bed132..4308f330 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/Professions.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/Professions.java @@ -101,7 +101,7 @@ public class Professions { public void giveLevels(Profession profession, int value) { int total = 0, level = getLevel(profession); while (value-- > 0) - total += MMOCore.plugin.configManager.getNeededExperience(level + value + 1); + total += MMOCore.plugin.configManager.getNeededExperience(level + value + 1, profession); giveExperience(profession, total); } @@ -121,11 +121,11 @@ public class Professions { int needed, exp, level; boolean check = false; - while ((exp = this.exp.get(profession.getId())) >= (needed = MMOCore.plugin.configManager.getNeededExperience((level = getLevel(profession)) + 1))) { + while ((exp = this.exp.get(profession.getId())) >= (needed = MMOCore.plugin.configManager.getNeededExperience((level = getLevel(profession)) + 1, profession))) { this.exp.put(profession.getId(), exp - needed); this.level.put(profession.getId(), level + 1); check = true; - playerData.giveExperience((int) profession.getExperience().calculate(level)); + playerData.giveExperience((int) profession.getExperience().calculate(level), null); Bukkit.getPluginManager().callEvent(new PlayerLevelUpEvent(playerData, profession, level + 1)); new ConfigMessage("profession-level-up").addPlaceholders("level", "" + (level + 1), "profession", profession.getName()).send(playerData.getPlayer()); diff --git a/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java b/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java index 1b2f036d..b8ce3c9e 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java @@ -41,7 +41,7 @@ import net.Indyuce.mmocore.manager.ClassManager; import net.mmogroup.mmolib.version.VersionMaterial; public class PlayerClass { - private final String name, id, fileName; + private final String name, id, fileName, expCurve; private final List description = new ArrayList<>(), attrDescription = new ArrayList<>(); private final ItemStack icon; private final Map options = new HashMap<>(); @@ -94,6 +94,7 @@ public class PlayerClass { manaDisplay = new ManaDisplayOptions(config.getConfigurationSection("mana")); maxLevel = config.getInt("max-level"); displayOrder = config.getInt("display-order"); + expCurve = config.getString("exp-curve", "levels"); if (config.contains("attributes")) for (String key : config.getConfigurationSection("attributes").getKeys(false)) @@ -175,6 +176,7 @@ public class PlayerClass { manaDisplay = new ManaDisplayOptions(ChatColor.BLUE, "Mana", AltChar.listSquare.charAt(0)); maxLevel = 0; displayOrder = 0; + expCurve = ""; this.icon = new ItemStack(material); setOption(ClassOption.DISPLAY, false); @@ -215,6 +217,10 @@ public class PlayerClass { return displayOrder; } + public String getEXPCurve() { + return expCurve; + } + public String getFileName() { return fileName; } diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandMap.java b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandMap.java index 615df88b..16d2080c 100644 --- a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandMap.java +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandMap.java @@ -34,12 +34,12 @@ public class InfoCommandMap extends CommandEnd { sender.sendMessage(ChatColor.YELLOW + "----------------------------------------------------"); sender.sendMessage(ChatColor.YELLOW + "Class: " + ChatColor.GOLD + playerData.getProfess().getName()); sender.sendMessage(ChatColor.YELLOW + "Level: " + ChatColor.GOLD + playerData.getLevel()); - sender.sendMessage(ChatColor.YELLOW + "Experience: " + ChatColor.GOLD + playerData.getExperience() + ChatColor.YELLOW + " / " + ChatColor.GOLD + MMOCore.plugin.configManager.getNeededExperience(playerData.getLevel() + 1)); + sender.sendMessage(ChatColor.YELLOW + "Experience: " + ChatColor.GOLD + playerData.getExperience() + ChatColor.YELLOW + " / " + ChatColor.GOLD + MMOCore.plugin.configManager.getNeededExperience(playerData.getLevel() + 1, playerData.getProfess())); sender.sendMessage(ChatColor.YELLOW + "Class Points: " + ChatColor.GOLD + playerData.getClassPoints()); sender.sendMessage(ChatColor.YELLOW + "Quests: " + ChatColor.GOLD + playerData.getQuestData().getFinishedQuests().size() + ChatColor.YELLOW + " / " + ChatColor.GOLD + MMOCore.plugin.questManager.getAll().size()); sender.sendMessage(ChatColor.YELLOW + "----------------------------------------------------"); for (Profession profession : MMOCore.plugin.professionManager.getAll()) - sender.sendMessage(ChatColor.YELLOW + profession.getName() + ": Lvl " + ChatColor.GOLD + playerData.getCollectionSkills().getLevel(profession) + ChatColor.YELLOW + " - " + ChatColor.GOLD + playerData.getCollectionSkills().getExperience(profession) + ChatColor.YELLOW + " / " + ChatColor.GOLD + MMOCore.plugin.configManager.getNeededExperience(playerData.getCollectionSkills().getLevel(profession) + 1)); + sender.sendMessage(ChatColor.YELLOW + profession.getName() + ": Lvl " + ChatColor.GOLD + playerData.getCollectionSkills().getLevel(profession) + ChatColor.YELLOW + " - " + ChatColor.GOLD + playerData.getCollectionSkills().getExperience(profession) + ChatColor.YELLOW + " / " + ChatColor.GOLD + MMOCore.plugin.configManager.getNeededExperience(playerData.getCollectionSkills().getLevel(profession) + 1, profession)); sender.sendMessage(ChatColor.YELLOW + "----------------------------------------------------"); return CommandResult.SUCCESS; } diff --git a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java index 646070c8..41ee6e90 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java +++ b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java @@ -38,7 +38,7 @@ public class RPGPlaceholders extends PlaceholderExpansion /** implements Relatio else if (identifier.equals("level_percent")) { PlayerData playerData = PlayerData.get(player); - double current = playerData.getExperience(), next = MMOCore.plugin.configManager.getNeededExperience(playerData.getLevel() + 1); + double current = playerData.getExperience(), next = MMOCore.plugin.configManager.getNeededExperience(playerData.getLevel() + 1, playerData.getProfess()); return MMOCore.plugin.configManager.decimal.format(current / next * 100); } @@ -57,7 +57,7 @@ public class RPGPlaceholders extends PlaceholderExpansion /** implements Relatio else if (identifier.startsWith("profession_percent_")) { Professions professions = PlayerData.get(player).getCollectionSkills(); String profession = identifier.substring(19).replace(" ", "-").replace("_", "-").toLowerCase(); - double current = professions.getExperience(profession), next = MMOCore.plugin.configManager.getNeededExperience(professions.getLevel(profession) + 1); + double current = professions.getExperience(profession), next = MMOCore.plugin.configManager.getNeededExperience(professions.getLevel(profession) + 1, profession); return MMOCore.plugin.configManager.decimal.format(current / next * 100); } @@ -71,7 +71,7 @@ public class RPGPlaceholders extends PlaceholderExpansion /** implements Relatio return "" + PlayerData.get(player).getExperience(); else if (identifier.equals("next_level")) - return "" + MMOCore.plugin.configManager.getNeededExperience(PlayerData.get(player).getLevel() + 1); + return "" + MMOCore.plugin.configManager.getNeededExperience(PlayerData.get(player).getLevel() + 1, PlayerData.get(player).getProfess()); else if (identifier.equals("class_points")) return "" + PlayerData.get(player).getClassPoints(); diff --git a/src/main/java/net/Indyuce/mmocore/gui/ClassConfirmation.java b/src/main/java/net/Indyuce/mmocore/gui/ClassConfirmation.java index 889a319a..34985f0d 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/ClassConfirmation.java +++ b/src/main/java/net/Indyuce/mmocore/gui/ClassConfirmation.java @@ -47,7 +47,7 @@ public class ClassConfirmation extends EditableInventory { SavedClassInformation info = inv.getPlayerData().getClassInfo(profess); Placeholders holders = new Placeholders(); - int nextLevelExp = MMOCore.plugin.configManager.getNeededExperience(info.getLevel() + 1); + int nextLevelExp = MMOCore.plugin.configManager.getNeededExperience(info.getLevel() + 1, profess); double ratio = (double) info.getExperience() / (double) nextLevelExp; String bar = "" + ChatColor.BOLD; diff --git a/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java b/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java index 73be55a6..f2943cd7 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java +++ b/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java @@ -79,7 +79,7 @@ public class PlayerStats extends EditableInventory { Placeholders holders = new Placeholders(); net.Indyuce.mmocore.api.player.stats.PlayerStats stats = inv.getPlayerData().getStats(); - double ratio = (double) inv.getPlayerData().getCollectionSkills().getExperience(profession) / MMOCore.plugin.configManager.getNeededExperience(inv.getPlayerData().getCollectionSkills().getLevel(profession) + 1); + double ratio = (double) inv.getPlayerData().getCollectionSkills().getExperience(profession) / MMOCore.plugin.configManager.getNeededExperience(inv.getPlayerData().getCollectionSkills().getLevel(profession) + 1, profession); String bar = "" + ChatColor.BOLD; int chars = (int) (ratio * 20); @@ -277,7 +277,7 @@ public class PlayerStats extends EditableInventory { PlayerData data = inv.getPlayerData(); Placeholders holders = new Placeholders(); - int nextLevelExp = MMOCore.plugin.configManager.getNeededExperience(data.getLevel() + 1); + int nextLevelExp = MMOCore.plugin.configManager.getNeededExperience(data.getLevel() + 1, data.getProfess()); double ratio = (double) data.getExperience() / (double) nextLevelExp; String bar = "" + ChatColor.BOLD; diff --git a/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java b/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java index 7a67f056..a9e4a1da 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java @@ -8,7 +8,9 @@ import java.nio.file.Files; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.logging.Level; import org.bukkit.ChatColor; @@ -18,7 +20,9 @@ import org.bukkit.util.Consumer; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.ConfigFile; +import net.Indyuce.mmocore.api.experience.Profession; import net.Indyuce.mmocore.api.player.PlayerData; +import net.Indyuce.mmocore.api.player.profess.PlayerClass; import net.Indyuce.mmocore.api.util.input.AnvilGUI; import net.Indyuce.mmocore.api.util.input.ChatInput; import net.Indyuce.mmocore.api.util.input.PlayerInput; @@ -35,7 +39,7 @@ public class ConfigManager { public final DecimalFormatSymbols formatSymbols = new DecimalFormatSymbols(); public final DecimalFormat decimal = new DecimalFormat("0.#", formatSymbols), decimals = new DecimalFormat("0.##", formatSymbols); - private List neededExp = new ArrayList<>(); + private Map> neededExp = new HashMap>(); private FileConfiguration messages; private boolean chatInput; @@ -78,11 +82,15 @@ public class ConfigManager { loadDefaultFile("classes", "rogue.yml"); loadDefaultFile("classes", "warrior.yml"); } + + if (!new File(MMOCore.plugin.getDataFolder() + "/expcurves").exists()) { + loadDefaultFile("expcurves", "levels.txt"); + loadDefaultFile("expcurves", "mining.txt"); + } loadDefaultFile("attributes.yml"); loadDefaultFile("items.yml"); loadDefaultFile("messages.yml"); - loadDefaultFile("levels.txt"); loadDefaultFile("stats.yml"); loadDefaultFile("waypoints.yml"); loadDefaultFile("restrictions.yml"); @@ -111,18 +119,22 @@ public class ConfigManager { staminaEmpty = getColorOrDefault("stamina-empty", ChatColor.WHITE); neededExp.clear(); - int line = 0; - try { - line++; - File txt = new File(MMOCore.plugin.getDataFolder(), "levels.txt"); - BufferedReader reader = new BufferedReader(new FileReader(txt)); - String readLine; - while ((readLine = reader.readLine()) != null) - neededExp.add(Integer.valueOf(readLine)); - reader.close(); - } catch (IOException | IllegalArgumentException e) { - MMOCore.plugin.getLogger().log(Level.SEVERE, "Could not read line " + line + " from levels.txt"); - e.printStackTrace(); + for(File txt : new File(MMOCore.plugin.getDataFolder() + "/expcurves").listFiles()) { + int line = 0; + try { + line++; + //File txt = new File(MMOCore.plugin.getDataFolder(), "levels.txt"); + BufferedReader reader = new BufferedReader(new FileReader(txt)); + String readLine; + List levels = new ArrayList<>(); + while ((readLine = reader.readLine()) != null) + levels.add(Integer.valueOf(readLine)); + neededExp.put(txt.getName().toLowerCase().replace(".txt", ""), levels); + reader.close(); + } catch (IOException | IllegalArgumentException e) { + MMOCore.plugin.getLogger().log(Level.SEVERE, "Could not read line " + line + " from " + txt.getName()); + e.printStackTrace(); + } } } @@ -166,10 +178,24 @@ public class ConfigManager { } } - public int getNeededExperience(int level) { - return neededExp.get(level - 1 >= neededExp.size() ? neededExp.size() - 1 : level - 1); + public int getNeededExperience(int level, PlayerClass clas) { + if(clas == null) return getNeededExperience(level, MMOCore.plugin.classManager.getDefaultClass().getEXPCurve()); + return getNeededExperience(level, clas.getEXPCurve()); } + public int getNeededExperience(int level, Profession prof) { + return getNeededExperience(level, prof.getEXPCurve()); + } + + public int getNeededExperience(int level, String curve) { + List expCurve = neededExp.get(curve); + if(expCurve == null) { + MMOCore.log(Level.SEVERE, "Couldn't load EXPCurve: '" + curve + "'. Does it exist?"); + return 1; + } + return expCurve.get(level - 1 >= expCurve.size() ? expCurve.size() - 1 : level - 1); + } + public List getMessage(String key) { return messages.getStringList(key); } diff --git a/src/main/resources/default/classes/arcane-mage.yml b/src/main/resources/default/classes/arcane-mage.yml index 3a8ea3f1..4b0bdd58 100644 --- a/src/main/resources/default/classes/arcane-mage.yml +++ b/src/main/resources/default/classes/arcane-mage.yml @@ -32,6 +32,9 @@ display: - '&7 Mana Regen: &90.2 &7(+&90.04&7)' item: BLAZE_POWDER:1 # Supports custom model data/texture by durability +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: levels + # Players cannot go further than Lvl 100 max-level: 100 diff --git a/src/main/resources/default/classes/human.yml b/src/main/resources/default/classes/human.yml index f53c86e7..b975fd39 100644 --- a/src/main/resources/default/classes/human.yml +++ b/src/main/resources/default/classes/human.yml @@ -9,6 +9,9 @@ options: off-combat-health-regen: false off-combat-mana-regen: false +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: levels + mana: char: ■ color: BLUE diff --git a/src/main/resources/default/classes/mage.yml b/src/main/resources/default/classes/mage.yml index 42ebff13..618c3386 100644 --- a/src/main/resources/default/classes/mage.yml +++ b/src/main/resources/default/classes/mage.yml @@ -26,6 +26,9 @@ display: - '&7 Mana Regen: &90.2 &7(+&90.04&7)' item: BLAZE_POWDER +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: levels + # Players cannot go further than Lvl 100 max-level: 100 diff --git a/src/main/resources/default/classes/marksman.yml b/src/main/resources/default/classes/marksman.yml index f16225cf..28e32a93 100644 --- a/src/main/resources/default/classes/marksman.yml +++ b/src/main/resources/default/classes/marksman.yml @@ -25,6 +25,9 @@ display: - '&7 Mana Regen: &90.166 &7(+&90&7)' item: BOW +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: levels + # Players cannot go further than Lvl 100 max-level: 100 diff --git a/src/main/resources/default/classes/paladin.yml b/src/main/resources/default/classes/paladin.yml index adf366f6..84ccf402 100644 --- a/src/main/resources/default/classes/paladin.yml +++ b/src/main/resources/default/classes/paladin.yml @@ -27,6 +27,9 @@ display: - '&7 Mana Regen: &90.166 &7(+&90&7)' item: ENCHANTED_GOLDEN_APPLE:0 # Supports custom model data/texture by durability +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: levels + # Players cannot go further than Lvl 100 max-level: 100 diff --git a/src/main/resources/default/classes/rogue.yml b/src/main/resources/default/classes/rogue.yml index 5713b175..bc68552d 100644 --- a/src/main/resources/default/classes/rogue.yml +++ b/src/main/resources/default/classes/rogue.yml @@ -25,6 +25,9 @@ display: - '&7 Mana Regen: &90.166 &7(+&90&7)' item: LEATHER_BOOTS +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: levels + # Players cannot go further than Lvl 100 max-level: 100 diff --git a/src/main/resources/default/classes/warrior.yml b/src/main/resources/default/classes/warrior.yml index 1f1d18f8..b85e8bf9 100644 --- a/src/main/resources/default/classes/warrior.yml +++ b/src/main/resources/default/classes/warrior.yml @@ -30,6 +30,9 @@ display: - '&7 Rage Degeneration: &9-0.5&7/s' item: IRON_SWORD:0 # Supports custom model data/texture by durability +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: levels + # Players cannot go further than Lvl 100 max-level: 100 diff --git a/src/main/resources/default/levels.txt b/src/main/resources/default/expcurves/levels.txt similarity index 100% rename from src/main/resources/default/levels.txt rename to src/main/resources/default/expcurves/levels.txt diff --git a/src/main/resources/default/expcurves/mining.txt b/src/main/resources/default/expcurves/mining.txt new file mode 100644 index 00000000..c9f11755 --- /dev/null +++ b/src/main/resources/default/expcurves/mining.txt @@ -0,0 +1,25 @@ +100 +200 +300 +400 +500 +600 +700 +800 +900 +1000 +1100 +1200 +1300 +1400 +1500 +1600 +1700 +1800 +1900 +2000 +2100 +2200 +2300 +2400 +2500 diff --git a/src/main/resources/default/professions/mining.yml b/src/main/resources/default/professions/mining.yml index 67a4ae2f..b018e5cb 100644 --- a/src/main/resources/default/professions/mining.yml +++ b/src/main/resources/default/professions/mining.yml @@ -8,6 +8,9 @@ experience: base: 20 per-level: 3 +# Must match an existing exp curve filename from the 'expcurves' folder +exp-curve: mining + # This part of the config is ONLY for custom mining. # Custom Mining must be setup in config.yml and it # will render any block not referenced in here as unminable.