Browse Source

Adding missing Double Drop entries for Woodcutting

nossr50 6 years ago
parent
commit
b7d33f0227

+ 5 - 2
Changelog.txt

@@ -9,10 +9,13 @@ Key:
 
 
 Version 2.1.30
 Version 2.1.30
     Fixed double drops behaving oddly
     Fixed double drops behaving oddly
+    Double_Drop config table has been renamed to Bonus_Drops, this is to jankily auto-update everyones config
     DoubleDrop config tables now must contain all things that can possibly be doubled, such as the Ore block, the ore itself, etc.
     DoubleDrop config tables now must contain all things that can possibly be doubled, such as the Ore block, the ore itself, etc.
-    Added the following items to the DoubleDrop tables for Mining: Coal, Diamond, Emerald, Glowstone_Dust, Iron_Ingot, Lapis_Lazuli, Nether_Quartz, Redstone, Cobblestone
-    Added the following items to the DoubleDrop tables for Herbalism: Beetroot, Carrot, Cocoa_Beans, Melon_Slice, Potatoe
+    Added the following items to the Bonus_Drops tables for Mining: Coal, Diamond, Emerald, Glowstone_Dust, Iron_Ingot, Lapis_Lazuli, Nether_Quartz, Redstone, Cobblestone
+    Added the following items to the Bonus_Drops tables for Herbalism: Beetroot, Carrot, Cocoa_Beans, Melon_Slice, Potatoe
+    Added the following items to the Bonus_Drops tables for Woodcutting: Birch_Wood, Spruce_Wood, Jungle_Wood, Dark_Oak_Wood, Oak_Wood, Acacia_Wood
 
 
+    NOTE: You don't need to update your configs for this one unless you had custom entries in the Double_Drop tables, the renaming of the key will auto-insert default values and give everyone correct defaults
     NOTE: I'm gonna have to blame Bukkit on this one, several API methods I used are actually unfinished and kind of janky. So I hacked something together to make them work.
     NOTE: I'm gonna have to blame Bukkit on this one, several API methods I used are actually unfinished and kind of janky. So I hacked something together to make them work.
 
 
 Version 2.1.29
 Version 2.1.29

+ 4 - 4
src/main/java/com/gmail/nossr50/config/Config.java

@@ -463,18 +463,18 @@ public class Config extends AutoUpdateConfigLoader {
     /*
     /*
      * SKILL SETTINGS
      * SKILL SETTINGS
      */
      */
-    public boolean getDoubleDropsEnabled(PrimarySkillType skill, Material material) { return config.getBoolean("Double_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_")); }
+    public boolean getDoubleDropsEnabled(PrimarySkillType skill, Material material) { return config.getBoolean("Bonus_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_")); }
 
 
     public boolean getDoubleDropsDisabled(PrimarySkillType skill) {
     public boolean getDoubleDropsDisabled(PrimarySkillType skill) {
         String skillName = StringUtils.getCapitalized(skill.toString());
         String skillName = StringUtils.getCapitalized(skill.toString());
-        ConfigurationSection section = config.getConfigurationSection("Double_Drops." + skillName);
+        ConfigurationSection section = config.getConfigurationSection("Bonus_Drops." + skillName);
         if (section == null)
         if (section == null)
             return false;
             return false;
         Set<String> keys = section.getKeys(false);
         Set<String> keys = section.getKeys(false);
         boolean disabled = true;
         boolean disabled = true;
 
 
         for (String key : keys) {
         for (String key : keys) {
-            if (config.getBoolean("Double_Drops." + skillName + "." + key)) {
+            if (config.getBoolean("Bonus_Drops." + skillName + "." + key)) {
                 disabled = false;
                 disabled = false;
                 break;
                 break;
             }
             }
@@ -540,7 +540,7 @@ public class Config extends AutoUpdateConfigLoader {
     public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
     public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
 
 
     /* Woodcutting */
     /* Woodcutting */
-    public boolean getWoodcuttingDoubleDropsEnabled(BlockData material) { return config.getBoolean("Double_Drops.Woodcutting." + StringUtils.getFriendlyConfigBlockDataString(material)); }
+    public boolean getWoodcuttingDoubleDropsEnabled(BlockData material) { return config.getBoolean("Bonus_Drops.Woodcutting." + StringUtils.getFriendlyConfigBlockDataString(material)); }
     public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
     public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
     public int getWoodcuttingGate() { return config.getInt("Skills.Woodcutting.Ability_Activation_Level_Gate", 10); }
     public int getWoodcuttingGate() { return config.getInt("Skills.Woodcutting.Ability_Activation_Level_Gate", 10); }
 
 

+ 7 - 1
src/main/resources/config.yml

@@ -426,7 +426,7 @@ Skills:
 #
 #
 #  Settings for Double Drops
 #  Settings for Double Drops
 ###
 ###
-Double_Drops:
+Bonus_Drops:
     Herbalism:
     Herbalism:
         Beetroots: true
         Beetroots: true
         Beetroot: true
         Beetroot: true
@@ -490,11 +490,17 @@ Double_Drops:
         Stone: true
         Stone: true
         Cobblestone: true
         Cobblestone: true
     Woodcutting:
     Woodcutting:
+        Acacia_Wood: true
         Acacia_Log: true
         Acacia_Log: true
+        Birch_Wood: true
         Birch_Log: true
         Birch_Log: true
+        Dark_Oak_Wood: true
         Dark_Oak_Log: true
         Dark_Oak_Log: true
+        Oak_Wood: true
         Oak_Log: true
         Oak_Log: true
+        Jungle_Wood: true
         Jungle_Log: true
         Jungle_Log: true
+        Spruce_Wood: true
         Spruce_Log: true
         Spruce_Log: true
 
 
 #
 #