From 5d7d06831b62489e2c8675baa2586405a69c0cd7 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 15 Apr 2019 12:29:15 -0700 Subject: [PATCH] Add default Woodcutting XP values to config, added missing stripped wood values --- Changelog.txt | 1 + .../ConfigExperienceWoodcutting.java | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index ad7f06c11..163159121 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -19,6 +19,7 @@ Version 2.2.0 Optimizations were made for many anti-exploit behaviours Acrobatic's Dodge will no longer reward XP for a few seconds after a TP Roll will not give XP for a few seconds after a TP + Added missing STRIPPED_WOOD blocks to Woodcutting's experience tables You can now disable the party system completely Many config files are now generated on demand instead of being copied from within the JAR All config nodes that used to be styled with CamelCase or otherwise now use hyphens (-) as spaces for readability and consistency diff --git a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceWoodcutting.java b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceWoodcutting.java index 221bbb35a..24a4f98f4 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceWoodcutting.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceWoodcutting.java @@ -1,7 +1,56 @@ package com.gmail.nossr50.config.hocon.experience; +import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; +import org.bukkit.Material; + +import java.util.HashMap; @ConfigSerializable public class ConfigExperienceWoodcutting { + + private static final HashMap WOODCUTTING_EXPERIENCE_DEFAULT; + + static { + WOODCUTTING_EXPERIENCE_DEFAULT = new HashMap<>(); + + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.OAK_LOG.getKey().toString(), 70); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.SPRUCE_LOG.getKey().toString(), 80); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.BIRCH_LOG.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.JUNGLE_LOG.getKey().toString(), 100); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.ACACIA_LOG.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.DARK_OAK_LOG.getKey().toString(), 90); + + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_OAK_LOG.getKey().toString(), 70); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_SPRUCE_LOG.getKey().toString(), 80); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_BIRCH_LOG.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_JUNGLE_LOG.getKey().toString(), 100); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_ACACIA_LOG.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_DARK_OAK_LOG.getKey().toString(), 90); + + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.OAK_WOOD.getKey().toString(), 70); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.SPRUCE_WOOD.getKey().toString(), 80); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.BIRCH_WOOD.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.JUNGLE_WOOD.getKey().toString(), 100); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.ACACIA_WOOD.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.DARK_OAK_WOOD.getKey().toString(), 90); + + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_OAK_WOOD.getKey().toString(), 70); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_SPRUCE_WOOD.getKey().toString(), 80); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_BIRCH_WOOD.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_JUNGLE_WOOD.getKey().toString(), 100); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_ACACIA_WOOD.getKey().toString(), 90); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.STRIPPED_DARK_OAK_WOOD.getKey().toString(), 90); + + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.RED_MUSHROOM_BLOCK.getKey().toString(), 70); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.BROWN_MUSHROOM_BLOCK.getKey().toString(), 70); + WOODCUTTING_EXPERIENCE_DEFAULT.put(Material.MUSHROOM_STEM.getKey().toString(), 80); + } + + @Setting(value = "Woodcutting-Experience") + private HashMap woodcuttingExperienceMap; + + public HashMap getWoodcuttingExperienceMap() { + return woodcuttingExperienceMap; + } }