From f9879be4399ae5db886866458f3a9212dc42a121 Mon Sep 17 00:00:00 2001 From: Maxim Van de Wynckel Date: Sun, 27 Sep 2015 00:50:26 +0200 Subject: [PATCH 01/10] Fixed NPE when skill is not in config When a skill is not configured this would throw an NPE as the section is not found. Found while trying to get information from an McMMOLevelUp event --- src/main/java/com/gmail/nossr50/config/Config.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index 2c363b6d8..b0f53220d 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -451,6 +451,8 @@ public class Config extends AutoUpdateConfigLoader { public boolean getDoubleDropsDisabled(SkillType skill) { String skillName = StringUtils.getCapitalized(skill.toString()); ConfigurationSection section = config.getConfigurationSection("Double_Drops." + skillName); + if (section == null) + return false; Set keys = section.getKeys(false); boolean disabled = true; From 6cf7167c09cae3330a63ad20215219b3226b91e1 Mon Sep 17 00:00:00 2001 From: Very Evil Olaf Date: Thu, 10 Dec 2015 21:37:42 +0100 Subject: [PATCH 02/10] Fix space and color code --- src/main/resources/locale/locale_de.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index afa7d84fa..5fa745238 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -901,7 +901,7 @@ Hardcore.DeathStatLoss.PlayerDeath=[[GOLD]][mcMMO] [[DARK_RED]]Du hast durch den Hardcore.DeathStatLoss.PercentageChanged=[[GOLD]][mcMMO] Der Verlustprozentsatz wurde auf {0} ge\u00E4ndert. Hardcore.Vampirism.Name=Vampirismus Hardcore.Vampirism.Killer.Failure=[[GOLD]][mcMMO] [[YELLOW]]{0}[[GRAY]] war nicht erfahren genug um dir Wissen zu hinterlassen. -Hardcore.Vampirism.Killer.Success=[[GOLD]][mcMMO] [[DARK_AQUA]]Du hast[[BLUE]]{0}[[DARK_AQUA]] Level von [[YELLOW]]{1} [DARK_AQUA] gestohlen. +Hardcore.Vampirism.Killer.Success=[[GOLD]][mcMMO] [[DARK_AQUA]]Du hast [[BLUE]]{0}[[DARK_AQUA]] Level von [[YELLOW]]{1} [[DARK_AQUA]] gestohlen. Hardcore.Vampirism.Victim.Failure=[[GOLD]][mcMMO] [[YELLOW]]{0}[[GRAY]] hat es nicht geschafft Wissen von dir zu stehlen! Hardcore.Vampirism.Victim.Success=[[GOLD]][mcMMO] [[YELLOW]]{0}[[DARK_RED]] hat[[BLUE]]{1}[[DARK_RED]] Level von dir gestohlen! Hardcore.Vampirism.PercentageChanged=[[GOLD]][mcMMO] Der Vampirismus Prozentsatz wurde auf {0} ge\u00E4ndert. From 9677653c545d850bc96ca5cbb216d3bb93554ca1 Mon Sep 17 00:00:00 2001 From: JamieSinn Date: Fri, 11 Dec 2015 23:30:21 -0500 Subject: [PATCH 03/10] If sender is console, strip colours for mctop Ugly ugly colours. --- .../commands/MctopCommandDisplayTask.java | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index b7c63199b..3f8d1cc10 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -1,17 +1,16 @@ package com.gmail.nossr50.runnables.commands; -import java.util.List; - +import com.gmail.nossr50.datatypes.database.PlayerStat; +import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.util.scoreboards.ScoreboardManager; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.datatypes.database.PlayerStat; -import com.gmail.nossr50.datatypes.skills.SkillType; -import com.gmail.nossr50.locale.LocaleLoader; -import com.gmail.nossr50.util.scoreboards.ScoreboardManager; +import java.util.List; /** * Display the results of {@link MctopCommandAsyncTask} to the sender. @@ -45,15 +44,23 @@ public class MctopCommandDisplayTask extends BukkitRunnable { if (sender instanceof Player) { ((Player) sender).removeMetadata(mcMMO.databaseCommandKey, mcMMO.p); } - sender.sendMessage(LocaleLoader.getString("Commands.mctop.Tip")); + if(sender instanceof Player) + sender.sendMessage(LocaleLoader.getString("Commands.mctop.Tip")); } private void displayChat() { + if (skill == null) { - sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); + if(sender instanceof Player) + sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); + else + sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.PowerLevel.Leaderboard"))); } else { - sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())); + if(sender instanceof Player) + sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())); + else + sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName()))); } int place = (page * 10) - 9; @@ -62,7 +69,8 @@ public class MctopCommandDisplayTask extends BukkitRunnable { // Format: // 01. Playername - skill value // 12. Playername - skill value - sender.sendMessage(String.format("%2d. %s%s - %s%s", place, ChatColor.GREEN, stat.name, ChatColor.WHITE, stat.statVal)); + sender.sendMessage(String.format("%2d. %s%s - %s%s", place, sender instanceof Player ? ChatColor.GREEN : "", + stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal)); place++; } } From a0635eeb08c1aa5c261f671e2074039a1b42b240 Mon Sep 17 00:00:00 2001 From: JamieSinn Date: Fri, 11 Dec 2015 23:45:17 -0500 Subject: [PATCH 04/10] Remove escape character at EOL --- .../nossr50/runnables/commands/MctopCommandDisplayTask.java | 6 +++--- .../com/gmail/nossr50/runnables/party/PartyChatTask.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index 3f8d1cc10..5c2c571fe 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -54,13 +54,13 @@ public class MctopCommandDisplayTask extends BukkitRunnable { if(sender instanceof Player) sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); else - sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.PowerLevel.Leaderboard"))); + sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")).replaceAll("\\033\\[m", "")); } else { if(sender instanceof Player) sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())); else - sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName()))); + sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())).replaceAll("\\033\\[m", "")); } int place = (page * 10) - 9; @@ -70,7 +70,7 @@ public class MctopCommandDisplayTask extends BukkitRunnable { // 01. Playername - skill value // 12. Playername - skill value sender.sendMessage(String.format("%2d. %s%s - %s%s", place, sender instanceof Player ? ChatColor.GREEN : "", - stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal)); + stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal).replaceAll("\\033\\[m", "")); place++; } } diff --git a/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java b/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java index ff4b4999f..6d2c3a7af 100644 --- a/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java @@ -45,6 +45,6 @@ public class PartyChatTask extends BukkitRunnable { } } - plugin.getServer().getConsoleSender().sendMessage(ChatColor.stripColor("[mcMMO] [P]<" + party.getName() + ">" + message)); + plugin.getServer().getConsoleSender().sendMessage(ChatColor.stripColor("[mcMMO] [P]<" + party.getName() + ">" + message).replaceAll("\\033\\[m", "")); } } From 2dd1775d9af94adc466223161946e4e048edac79 Mon Sep 17 00:00:00 2001 From: JamieSinn Date: Fri, 11 Dec 2015 23:52:14 -0500 Subject: [PATCH 05/10] Remove regex replace, does nothing --- .../nossr50/runnables/commands/MctopCommandDisplayTask.java | 6 +++--- .../com/gmail/nossr50/runnables/party/PartyChatTask.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index 5c2c571fe..3f8d1cc10 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -54,13 +54,13 @@ public class MctopCommandDisplayTask extends BukkitRunnable { if(sender instanceof Player) sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); else - sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")).replaceAll("\\033\\[m", "")); + sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.PowerLevel.Leaderboard"))); } else { if(sender instanceof Player) sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())); else - sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())).replaceAll("\\033\\[m", "")); + sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName()))); } int place = (page * 10) - 9; @@ -70,7 +70,7 @@ public class MctopCommandDisplayTask extends BukkitRunnable { // 01. Playername - skill value // 12. Playername - skill value sender.sendMessage(String.format("%2d. %s%s - %s%s", place, sender instanceof Player ? ChatColor.GREEN : "", - stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal).replaceAll("\\033\\[m", "")); + stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal)); place++; } } diff --git a/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java b/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java index 6d2c3a7af..ff4b4999f 100644 --- a/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/party/PartyChatTask.java @@ -45,6 +45,6 @@ public class PartyChatTask extends BukkitRunnable { } } - plugin.getServer().getConsoleSender().sendMessage(ChatColor.stripColor("[mcMMO] [P]<" + party.getName() + ">" + message).replaceAll("\\033\\[m", "")); + plugin.getServer().getConsoleSender().sendMessage(ChatColor.stripColor("[mcMMO] [P]<" + party.getName() + ">" + message)); } } From 3a9c55a9eabb386813ac60d5d387095450f59e4e Mon Sep 17 00:00:00 2001 From: JamieSinn Date: Sat, 12 Dec 2015 00:04:23 -0500 Subject: [PATCH 06/10] Remove ternary operators and use if/else --- .../runnables/commands/MctopCommandDisplayTask.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index 3f8d1cc10..cf3547cf2 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -69,8 +69,11 @@ public class MctopCommandDisplayTask extends BukkitRunnable { // Format: // 01. Playername - skill value // 12. Playername - skill value - sender.sendMessage(String.format("%2d. %s%s - %s%s", place, sender instanceof Player ? ChatColor.GREEN : "", - stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal)); + if(sender instanceof Player) + sender.sendMessage(String.format("%2d. %s%s - %s%s", place, ChatColor.GREEN, stat.name, ChatColor.WHITE, stat.statVal)); + else + sender.sendMessage(String.format("%2d. %s - %s", place, stat.name, stat.statVal)); + place++; } } From 0e34202d4d9f417bca4e2a7fc786276c6a10d2eb Mon Sep 17 00:00:00 2001 From: Jamie Sinn Date: Sun, 20 Dec 2015 23:05:48 -0500 Subject: [PATCH 07/10] Curly braces as toothpick requested @andrewkm --- .../commands/MctopCommandDisplayTask.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index cf3547cf2..f1c9ffc7a 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -51,16 +51,20 @@ public class MctopCommandDisplayTask extends BukkitRunnable { private void displayChat() { if (skill == null) { - if(sender instanceof Player) + if(sender instanceof Player) { sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); - else + } + else { sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.PowerLevel.Leaderboard"))); + } } else { - if(sender instanceof Player) + if(sender instanceof Player) { sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())); - else + } + else { sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName()))); + } } int place = (page * 10) - 9; @@ -69,11 +73,13 @@ public class MctopCommandDisplayTask extends BukkitRunnable { // Format: // 01. Playername - skill value // 12. Playername - skill value - if(sender instanceof Player) + if(sender instanceof Player) { sender.sendMessage(String.format("%2d. %s%s - %s%s", place, ChatColor.GREEN, stat.name, ChatColor.WHITE, stat.statVal)); - else + } + else { sender.sendMessage(String.format("%2d. %s - %s", place, stat.name, stat.statVal)); - + } + place++; } } From 635a4f7265da1ec16e670dc47e7ab5860be6f21c Mon Sep 17 00:00:00 2001 From: Very Evil Olaf Date: Mon, 28 Dec 2015 20:18:55 +0100 Subject: [PATCH 08/10] fixed typo smelt = Schmelzung, not Schmelung --- src/main/resources/locale/locale_de.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index afa7d84fa..486f5e573 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -920,7 +920,7 @@ Smelting.Ability.FluxMining=[[RED]]Schmelztiegel: [[YELLOW]]{0} Smelting.Ability.FuelEfficiency=[[RED]]Brennstoff Effizienz Multiplikator: [[YELLOW]]{0}x Smelting.Ability.Locked.0=GESPERRT bis {0}+ Skill (XP BOOST) Smelting.Ability.Locked.1=GESPERRT bis {0}+ Skill (SCHMELZTIEGEL) -Smelting.Ability.SecondSmelt=[[RED]]Extra Schmelung: [[YELLOW]]{0} +Smelting.Ability.SecondSmelt=[[RED]]Extra Schmelzung: [[YELLOW]]{0} Smelting.Ability.VanillaXPBoost=[[RED]]Vanilla XP Multiplikator: [[YELLOW]]{0}x Smelting.Effect.0=Brennstoff Effizienz Smelting.Effect.1=Erh\u00F6he die Brenndauer des Brennstoffes in \u00D6fen From a238b7029d70bbe861ced153297e12eb63945941 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Sat, 12 Mar 2016 17:45:00 -0500 Subject: [PATCH 09/10] Update default potions.yml and add tool to do so in the future. --- src/main/resources/potions.yml | 1880 ++++++++++++----- .../java/mcMMO/PotionConfigGenerator.java | 616 ++++++ 2 files changed, 1910 insertions(+), 586 deletions(-) create mode 100644 src/util/java/mcMMO/PotionConfigGenerator.java diff --git a/src/main/resources/potions.yml b/src/main/resources/potions.yml index 6bd7ed5b1..2f63666ce 100644 --- a/src/main/resources/potions.yml +++ b/src/main/resources/potions.yml @@ -53,653 +53,1361 @@ Concoctions: ### Potions: - - ### NON-EFFECT POTIONS ##################################################### - - WATER: + POTION_OF_EMPTY: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Children: + SULPHUR: SPLASH_POTION_OF_EMPTY + POTION_OF_WATER: Material: POTION PotionData: PotionType: WATER Children: - BLAZE_POWDER: MUNDANE_POTION - FERMENTED_SPIDER_EYE: 8200 - GHAST_TEAR: MUNDANE_POTION - GLOWSTONE_DUST: THICK - MAGMA_CREAM: MUNDANE_POTION - NETHER_STALK: AWKWARD - REDSTONE: MUNDANE_POTION_EXTENDED - SPECKLED_MELON: MUNDANE_POTION - SPIDER_EYE: MUNDANE_POTION - SUGAR: MUNDANE_POTION - - AWKWARD: + SPIDER_EYE: POTION_OF_MUNDANE + GHAST_TEAR: POTION_OF_MUNDANE + SUGAR: POTION_OF_MUNDANE + FERMENTED_SPIDER_EYE: POTION_OF_WEAKNESS + SULPHUR: SPLASH_POTION_OF_WATER + NETHER_WARTS: POTION_OF_AWKWARD + REDSTONE: POTION_OF_MUNDANE + SPECKLED_MELON: POTION_OF_MUNDANE + BLAZE_POWDER: POTION_OF_MUNDANE + MAGMA_CREAM: POTION_OF_MUNDANE + RABBIT_FOOT: POTION_OF_MUNDANE + GLOWSTONE_DUST: POTION_OF_THICK + POTION_OF_MUNDANE: Material: POTION PotionData: - PotionType: AWKWARD + PotionType: MUNDANE Children: - APPLE: 5376 # Potion of Health Boost - BLAZE_POWDER: 8201 # Potion of Strength - BROWN_MUSHROOM: 2304 # Potion of Nausea - CARROT_ITEM: 768 # Potion of Haste - FERMENTED_SPIDER_EYE: 8200 # Potion of Weakness - GHAST_TEAR: 8193 # Potion of Regeneration - 'GOLDEN_APPLE:0': 2816 # Potion of Resistance - GOLDEN_CARROT: 8198 # Potion of Night Vision - 'INK_SACK:0': 3840 # Potion of Blindness - 'LONG_GRASS:2': 5888 # Potion of Saturation - MAGMA_CREAM: 8195 # Potion of Fire Resistance - POISONOUS_POTATO: 5120 # Potion of Decay - QUARTZ: 5632 # Potion of Absorption - RED_MUSHROOM: 2048 # Potion of Leaping - ROTTEN_FLESH: 4352 # Potion of Hunger - SLIME_BALL: 1024 # Potion of Dullness - SPECKLED_MELON: 8197 # Potion of Healing - SPIDER_EYE: 8196 # Potion of Poison - SUGAR: SWIFTNESS # Potion of Swiftness - WATER_LILY: 8205 # Potion of Water Breathing (Minecraft 1.6) - 'RAW_FISH:3': 8205 # Potion of Water Breathing (Minecraft 1.7) - - THICK: + SULPHUR: SPLASH_POTION_OF_MUNDANE + POTION_OF_THICK: Material: POTION PotionData: PotionType: THICK Children: - FERMENTED_SPIDER_EYE: 8200 - - MUNDANE_POTION: + SULPHUR: SPLASH_POTION_OF_THICK + POTION_OF_AWKWARD: Material: POTION PotionData: - PotionType: MUNDANE + PotionType: AWKWARD Children: - FERMENTED_SPIDER_EYE: 8200 - SULPHUR: 16384 - - ### DRINKABLE POTIONS ###################################################### - - SWIFTNESS: + MAGMA_CREAM: POTION_OF_FIRE_RESISTANCE + ROTTEN_FLESH: POTION_OF_HUNGER + SULPHUR: SPLASH_POTION_OF_AWKWARD + RABBIT_FOOT: POTION_OF_LEAPING + GOLDEN_CARROT: POTION_OF_NIGHT_VISION + CARROT_ITEM: POTION_OF_HASTE + SLIME_BALL: POTION_OF_DULLNESS + 'RAW_FISH:3': POTION_OF_WATER_BREATHING + SPECKLED_MELON: POTION_OF_HEALING + SPIDER_EYE: POTION_OF_POISON + GHAST_TEAR: POTION_OF_REGENERATION + INK_SACK: POTION_OF_BLINDNESS + BROWN_MUSHROOM: POTION_OF_NAUSEA + BLAZE_POWDER: POTION_OF_STRENGTH + POISONOUS_POTATO: POTION_OF_DECAY + QUARTZ: POTION_OF_ABSORPTION + 'LONG_GRASS:2': POTION_OF_SATURATION + APPLE: POTION_OF_HEALTH_BOOST + SUGAR: POTION_OF_SWIFTNESS + GOLDEN_APPLE: POTION_OF_RESISTANCE + POTION_OF_NIGHT_VISION: + Material: POTION + PotionData: + PotionType: NIGHT_VISION + Children: + FERMENTED_SPIDER_EYE: POTION_OF_INVISIBILITY + SULPHUR: SPLASH_POTION_OF_NIGHT_VISION + REDSTONE: POTION_OF_NIGHT_VISION_EXTENDED + POTION_OF_NIGHT_VISION_EXTENDED: + Material: POTION + PotionData: + PotionType: NIGHT_VISION + Extended: true + Children: + SULPHUR: SPLASH_POTION_OF_NIGHT_VISION_EXTENDED + FERMENTED_SPIDER_EYE: POTION_OF_INVISIBILITY_EXTENDED + POTION_OF_INVISIBILITY: + Material: POTION + PotionData: + PotionType: INVISIBILITY + Children: + SULPHUR: SPLASH_POTION_OF_INVISIBILITY + REDSTONE: POTION_OF_INVISIBILITY_EXTENDED + POTION_OF_INVISIBILITY_EXTENDED: + Material: POTION + PotionData: + PotionType: INVISIBILITY + Extended: true + Children: + SULPHUR: SPLASH_POTION_OF_INVISIBILITY_EXTENDED + POTION_OF_LEAPING: + Material: POTION + PotionData: + PotionType: JUMP + Children: + REDSTONE: POTION_OF_LEAPING_EXTENDED + FERMENTED_SPIDER_EYE: POTION_OF_SLOWNESS + SULPHUR: SPLASH_POTION_OF_LEAPING + GLOWSTONE_DUST: POTION_OF_LEAPING_II + POTION_OF_LEAPING_EXTENDED: + Material: POTION + PotionData: + PotionType: JUMP + Extended: true + Children: + SULPHUR: SPLASH_POTION_OF_LEAPING_EXTENDED + POTION_OF_LEAPING_II: + Material: POTION + PotionData: + PotionType: JUMP + Upgraded: true + Children: + SULPHUR: SPLASH_POTION_OF_LEAPING_II + POTION_OF_FIRE_RESISTANCE: + Material: POTION + PotionData: + PotionType: FIRE_RESISTANCE + Children: + SULPHUR: SPLASH_POTION_OF_FIRE_RESISTANCE + FERMENTED_SPIDER_EYE: POTION_OF_SLOWNESS + REDSTONE: POTION_OF_FIRE_RESISTANCE_EXTENDED + POTION_OF_FIRE_RESISTANCE_EXTENDED: + Material: POTION + PotionData: + PotionType: FIRE_RESISTANCE + Extended: true + Children: + FERMENTED_SPIDER_EYE: POTION_OF_SLOWNESS_EXTENDED + SULPHUR: SPLASH_POTION_OF_FIRE_RESISTANCE_EXTENDED + POTION_OF_SWIFTNESS: + Material: POTION PotionData: PotionType: SPEED Children: - FERMENTED_SPIDER_EYE: 8202 - GLOWSTONE_DUST: SWIFTNESS_2 - REDSTONE: SWIFTNESS_EXT - SULPHUR: 16386 - SWIFTNESS_2: + FERMENTED_SPIDER_EYE: POTION_OF_SLOWNESS + GLOWSTONE_DUST: POTION_OF_SWIFTNESS_II + SULPHUR: SPLASH_POTION_OF_SWIFTNESS + REDSTONE: POTION_OF_SWIFTNESS_EXTENDED + POTION_OF_SWIFTNESS_II: + Material: POTION PotionData: PotionType: SPEED Upgraded: true Children: - FERMENTED_SPIDER_EYE: 8266 - REDSTONE: SWIFTNESS_EXT - SULPHUR: 16418 - SWIFTNESS_EXT: # Potion of Swiftness Extended + FERMENTED_SPIDER_EYE: POTION_OF_SLOWNESS_EXTENDED + SULPHUR: SPLASH_POTION_OF_SWIFTNESS_II + POTION_OF_SWIFTNESS_EXTENDED: + Material: POTION PotionData: PotionType: SPEED Extended: true Children: - FERMENTED_SPIDER_EYE: 8202 - GLOWSTONE_DUST: SWIFTNESS_2 - SULPHUR: 16450 - - 8202: # Potion of Slowness + SULPHUR: SPLASH_POTION_OF_SWIFTNESS_EXTENDED + FERMENTED_SPIDER_EYE: POTION_OF_SLOWNESS_EXTENDED + POTION_OF_SLOWNESS: + Material: POTION + PotionData: + PotionType: SLOWNESS Children: - REDSTONE: 8266 - SULPHUR: 16394 - 8266: # Potion of Slowness Extended + SULPHUR: SPLASH_POTION_OF_SLOWNESS + REDSTONE: POTION_OF_SLOWNESS_EXTENDED + POTION_OF_SLOWNESS_EXTENDED: + Material: POTION + PotionData: + PotionType: SLOWNESS + Extended: true Children: - GLOWSTONE_DUST: 8202 - SULPHUR: 16458 - - 768: # Potion of Haste - Effects: ["FAST_DIGGING 0 3600"] + SULPHUR: SPLASH_POTION_OF_SLOWNESS_EXTENDED + POTION_OF_WATER_BREATHING: + Material: POTION + PotionData: + PotionType: WATER_BREATHING Children: - GLOWSTONE_DUST: 800 - REDSTONE: 832 - SULPHUR: 17152 - - 800: # Potion of Haste II - Effects: ["FAST_DIGGING 1 1800"] + FERMENTED_SPIDER_EYE: POTION_OF_HARMING + REDSTONE: POTION_OF_WATER_BREATHING_EXTENDED + SULPHUR: SPLASH_POTION_OF_WATER_BREATHING + POTION_OF_WATER_BREATHING_EXTENDED: + Material: POTION + PotionData: + PotionType: WATER_BREATHING + Extended: true Children: - REDSTONE: 832 - SULPHUR: 17184 - - 832: # Potion of Haste Extended - Effects: ["FAST_DIGGING 0 9600"] + SULPHUR: SPLASH_POTION_OF_WATER_BREATHING_EXTENDED + POTION_OF_HEALING: + Material: POTION + PotionData: + PotionType: INSTANT_HEAL Children: - GLOWSTONE_DUST: 800 - SULPHUR: 17216 - - 1024: # Potion of Dullness - Effects: ["SLOW_DIGGING 0 3600"] + GLOWSTONE_DUST: POTION_OF_HEALING_II + SULPHUR: SPLASH_POTION_OF_HEALING + FERMENTED_SPIDER_EYE: POTION_OF_HARMING + POTION_OF_HEALING_II: + Material: POTION + PotionData: + PotionType: INSTANT_HEAL + Upgraded: true Children: - GLOWSTONE_DUST: 1056 - REDSTONE: 1088 - SULPHUR: 17408 - 1056: # Potion of Dullness II - Effects: ["SLOW_DIGGING 1 1800"] + FERMENTED_SPIDER_EYE: POTION_OF_HARMING_II + SULPHUR: SPLASH_POTION_OF_HEALING_II + POTION_OF_HARMING: + Material: POTION + PotionData: + PotionType: INSTANT_DAMAGE Children: - REDSTONE: 1088 - SULPHUR: 17408 - 1088: # Potion of Dullness Extended - Effects: ["SLOW_DIGGING 0 9600"] + GLOWSTONE_DUST: POTION_OF_HARMING_II + SULPHUR: SPLASH_POTION_OF_HARMING + POTION_OF_HARMING_II: + Material: POTION + PotionData: + PotionType: INSTANT_DAMAGE + Upgraded: true Children: - GLOWSTONE_DUST: 1056 - SULPHUR: 17472 - - 8201: # Potion of Strength + SULPHUR: SPLASH_POTION_OF_HARMING_II + POTION_OF_POISON: + Material: POTION + PotionData: + PotionType: POISON Children: - FERMENTED_SPIDER_EYE: 8200 - GLOWSTONE_DUST: 8233 - REDSTONE: 8265 - SULPHUR: 16393 - 8233: # Potion of Strength II + GLOWSTONE_DUST: POTION_OF_POISON_II + REDSTONE: POTION_OF_POISON_EXTENDED + FERMENTED_SPIDER_EYE: POTION_OF_HARMING + SULPHUR: SPLASH_POTION_OF_POISON + POTION_OF_POISON_EXTENDED: + Material: POTION + PotionData: + PotionType: POISON + Extended: true Children: - FERMENTED_SPIDER_EYE: 8200 - REDSTONE: 8265 - SULPHUR: 16425 - 8265: # Potion of Strength Extended + SULPHUR: SPLASH_POTION_OF_POISON_EXTENDED + FERMENTED_SPIDER_EYE: POTION_OF_HARMING_II + POTION_OF_POISON_II: + Material: POTION + PotionData: + PotionType: POISON + Upgraded: true Children: - FERMENTED_SPIDER_EYE: 8264 - GLOWSTONE_DUST: 8233 - SULPHUR: 16457 - - 8197: # Potion of Healing + FERMENTED_SPIDER_EYE: POTION_OF_HARMING_II + SULPHUR: SPLASH_POTION_OF_POISON_II + POTION_OF_REGENERATION: + Material: POTION + PotionData: + PotionType: REGEN Children: - FERMENTED_SPIDER_EYE: 8204 - GLOWSTONE_DUST: 8229 - SULPHUR: 16389 - 8229: # Potion of Healing II + REDSTONE: POTION_OF_REGENERATION_EXTENDED + SULPHUR: SPLASH_POTION_OF_REGENERATION + GLOWSTONE_DUST: POTION_OF_REGENERATION_II + POTION_OF_REGENERATION_II: + Material: POTION + PotionData: + PotionType: REGEN + Upgraded: true Children: - FERMENTED_SPIDER_EYE: 8236 - REDSTONE: 8197 - SULPHUR: 16421 - - 8204: # Potion of Harming + SULPHUR: SPLASH_POTION_OF_REGENERATION_II + POTION_OF_REGENERATION_EXTENDED: + Material: POTION + PotionData: + PotionType: REGEN + Extended: true Children: - GLOWSTONE_DUST: 8236 - SULPHUR: 16396 - 8236: # Potion of Harming II + SULPHUR: SPLASH_POTION_OF_REGENERATION_EXTENDED + POTION_OF_STRENGTH: + Material: POTION + PotionData: + PotionType: STRENGTH Children: - REDSTONE: 8204 - SULPHUR: 16428 - - 2048: # Potion of Leaping - Effects: ["JUMP 0 3600"] + GLOWSTONE_DUST: POTION_OF_STRENGTH_II + REDSTONE: POTION_OF_STRENGTH_EXTENDED + SULPHUR: SPLASH_POTION_OF_STRENGTH + POTION_OF_STRENGTH_EXTENDED: + Material: POTION + PotionData: + PotionType: STRENGTH + Extended: true Children: - GLOWSTONE_DUST: 2080 - REDSTONE: 2112 - SULPHUR: 18432 - 2080: # Potion of Leaping II - Effects: ["JUMP 1 1800"] + SULPHUR: SPLASH_POTION_OF_STRENGTH_EXTENDED + POTION_OF_STRENGTH_II: + Material: POTION + PotionData: + PotionType: STRENGTH + Upgraded: true Children: - REDSTONE: 2112 - SULPHUR: 18464 - 2112: # Potion of Leaping Extended - Effects: ["JUMP 0 9600"] + SULPHUR: SPLASH_POTION_OF_STRENGTH_II + POTION_OF_WEAKNESS: + Material: POTION + PotionData: + PotionType: WEAKNESS Children: - GLOWSTONE_DUST: 2080 - SULPHUR: 18496 - - 2304: # Potion of Nausea - Effects: ["CONFUSION 0 450"] + SULPHUR: SPLASH_POTION_OF_WEAKNESS + REDSTONE: POTION_OF_WEAKNESS_EXTENDED + POTION_OF_WEAKNESS_EXTENDED: + Material: POTION + PotionData: + PotionType: WEAKNESS + Extended: true Children: - REDSTONE: 2368 - SULPHUR: 18688 - 2368: # Potion of Nausea Extended - Effects: ["CONFUSION 0 1200"] + SULPHUR: SPLASH_POTION_OF_WEAKNESS_EXTENDED + POTION_OF_LUCK: + Material: POTION + PotionData: + PotionType: LUCK Children: - GLOWSTONE_DUST: 2304 - SULPHUR: 18752 - - 8193: # Potion of Regeneration - Children: - FERMENTED_SPIDER_EYE: 8200 - GLOWSTONE_DUST: 8225 - REDSTONE: 8257 - SULPHUR: 16385 - 8225: # Potion of Regeneration II - Children: - FERMENTED_SPIDER_EYE: 8200 - REDSTONE: 8257 - SULPHUR: 16417 - 8257: # Potion of Regeneration Extended - Children: - FERMENTED_SPIDER_EYE: 8264 - GLOWSTONE_DUST: 8225 - SULPHUR: 16449 - - 2816: # Potion of Resistance - Effects: ["DAMAGE_RESISTANCE 0 450"] - Children: - GLOWSTONE_DUST: 2848 - REDSTONE: 2880 - SULPHUR: 19200 - 2848: # Potion of Resistance II - Effects: ["DAMAGE_RESISTANCE 1 225"] - Children: - REDSTONE: 2880 - SULPHUR: 19232 - 2880: # Potion of Resistance Extended - Effects: ["DAMAGE_RESISTANCE 0 1200"] - Children: - GLOWSTONE_DUST: 2848 - SULPHUR: 19264 - - 8195: # Potion of Fire Resistance - Children: - FERMENTED_SPIDER_EYE: 8202 - REDSTONE: 8259 - SULPHUR: 16387 - 8259: # Potion of Fire Resistance Extended - Children: - FERMENTED_SPIDER_EYE: 8266 - GLOWSTONE_DUST: 8195 - SULPHUR: 16451 - - 8205: # Potion of Water Breathing - Children: - REDSTONE: 8269 - SULPHUR: 16397 - 8269: # Potion of Water Breathing Extended - Children: - GLOWSTONE_DUST: 8205 - SULPHUR: 16461 - - 8206: # Potion of Invisibility - Children: - REDSTONE: 8270 - SULPHUR: 16398 - 8270: # Potion of Invisibility Extended - Children: - GLOWSTONE_DUST: 8206 - SULPHUR: 16462 - - 3840: # Potion of Blindness - Effects: ["BLINDNESS 0 225"] - Children: - REDSTONE: 3904 - SULPHUR: 20224 - 3904: # Potion of Blindness Extended - Effects: ["BLINDNESS 0 600"] - Children: - GLOWSTONE_DUST: 3840 - SULPHUR: 20288 - - 8198: # Potion of Night Vision - Children: - FERMENTED_SPIDER_EYE: 8206 - REDSTONE: 8262 - SULPHUR: 16390 - 8262: # Potion of Night Vision Extended - Children: - FERMENTED_SPIDER_EYE: 8270 - GLOWSTONE_DUST: 8198 - SULPHUR: 16454 - - 4352: # Potion of Hunger - Effects: ["HUNGER 0 900"] - Children: - GLOWSTONE_DUST: 4384 - REDSTONE: 4416 - SULPHUR: 20736 - 4384: # Potion of Hunger II - Effects: ["HUNGER 1 450"] - Children: - REDSTONE: 4416 - SULPHUR: 20768 - 4416: # Potion of Hunger Extended - Effects: ["HUNGER 0 2400"] - Children: - GLOWSTONE_DUST: 4384 - SULPHUR: 20800 - - 8200: # Potion of Weakness - Children: - REDSTONE: 8264 - SULPHUR: 16392 - 8264: # Potion of Weakness Extended - Children: - GLOWSTONE_DUST: 8200 - SULPHUR: 16456 - - 8196: # Potion of Poison - Children: - FERMENTED_SPIDER_EYE: 8204 - GLOWSTONE_DUST: 8228 - REDSTONE: 8260 - SULPHUR: 16388 - 8228: # Potion of Poison II - Children: - FERMENTED_SPIDER_EYE: 8236 - REDSTONE: 8260 - SULPHUR: 16420 - 8260: # Potion of Poison Extended - Children: - FERMENTED_SPIDER_EYE: 8204 - GLOWSTONE_DUST: 8228 - SULPHUR: 16452 - - 5120: # Potion of Decay - Effects: ["WITHER 0 450"] - Children: - GLOWSTONE_DUST: 5152 - REDSTONE: 5184 - SULPHUR: 21504 - 5152: # Potion of Decay II - Effects: ["WITHER 1 225"] - Children: - REDSTONE: 5184 - SULPHUR: 21536 - 5184: # Potion of Decay Extended - Effects: ["WITHER 0 1200"] - Children: - GLOWSTONE_DUST: 5152 - SULPHUR: 21568 - - 5376: # Potion of Health Boost - Effects: ["HEALTH_BOOST 0 1800"] - Children: - GLOWSTONE_DUST: 5408 - REDSTONE: 5440 - SULPHUR: 21760 - 5408: # Potion of Health Boost II - Effects: ["HEALTH_BOOST 1 900"] - Children: - REDSTONE: 5440 - SULPHUR: 21792 - 5440: # Potion of Health Boost Extended - Effects: ["HEALTH_BOOST 0 4800"] - Children: - GLOWSTONE_DUST: 5408 - SULPHUR: 21824 - - 5632: # Potion of Absorption + SULPHUR: SPLASH_POTION_OF_LUCK + POTION_OF_ABSORPTION: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE Effects: ["ABSORPTION 0 1800"] Children: - GLOWSTONE_DUST: 5664 - REDSTONE: 5696 - SULPHUR: 22016 - 5664: # Potion of Absorption II - Effects: ["ABSORPTION 1 900"] + SULPHUR: SPLASH_POTION_OF_ABSORPTION + GLOWSTONE_DUST: POTION_OF_ABSORPTION_II + REDSTONE: POTION_OF_ABSORPTION_EXTENDED + POTION_OF_BLINDNESS: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 0 225"] Children: - REDSTONE: 5696 - SULPHUR: 22048 - 5696: # Potion of Absorption Extended - Effects: ["ABSORPTION 0 4800"] + REDSTONE: POTION_OF_BLINDNESS_EXTENDED + GLOWSTONE_DUST: POTION_OF_BLINDNESS_II + SULPHUR: SPLASH_POTION_OF_BLINDNESS + POTION_OF_DECAY: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 0 450"] Children: - GLOWSTONE_DUST: 5664 - SULPHUR: 22080 - - 5888: # Potion of Saturation + REDSTONE: POTION_OF_DECAY_EXTENDED + SULPHUR: SPLASH_POTION_OF_DECAY + GLOWSTONE_DUST: POTION_OF_DECAY_II + POTION_OF_DULLNESS: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 0 3600"] + Children: + GLOWSTONE_DUST: POTION_OF_DULLNESS_II + REDSTONE: POTION_OF_DULLNESS_EXTENDED + SULPHUR: SPLASH_POTION_OF_DULLNESS + POTION_OF_HASTE: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 0 3600"] + Children: + SULPHUR: SPLASH_POTION_OF_HASTE + REDSTONE: POTION_OF_HASTE_EXTENDED + GLOWSTONE_DUST: POTION_OF_HASTE_II + POTION_OF_HUNGER: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 0 900"] + Children: + REDSTONE: POTION_OF_HUNGER_EXTENDED + GLOWSTONE_DUST: POTION_OF_HUNGER_II + SULPHUR: SPLASH_POTION_OF_HUNGER + POTION_OF_NAUSEA: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 0 450"] + Children: + GLOWSTONE_DUST: POTION_OF_NAUSEA_II + REDSTONE: POTION_OF_NAUSEA_EXTENDED + SULPHUR: SPLASH_POTION_OF_NAUSEA + POTION_OF_RESISTANCE: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 0 450"] + Children: + GLOWSTONE_DUST: POTION_OF_RESISTANCE_II + REDSTONE: POTION_OF_RESISTANCE_EXTENDED + SULPHUR: SPLASH_POTION_OF_RESISTANCE + POTION_OF_SATURATION: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE Effects: ["SATURATION 0 8"] Children: - GLOWSTONE_DUST: 5920 - SULPHUR: 22272 - 5920: # Potion of Saturation II - Effects: ["SATURATION 1 8"] - Children: - REDSTONE: 5888 - SULPHUR: 22304 - - ### SPLASH POTIONS ######################################################### - - 16384: # Splash Mundane Potion - Children: - FERMENTED_SPIDER_EYE: 16392 - - 16386: # Splash Potion of Swiftness - Children: - FERMENTED_SPIDER_EYE: 16394 - GLOWSTONE_DUST: 16418 - REDSTONE: 16450 - 16418: # Splash Potion of Swiftness II - Children: - FERMENTED_SPIDER_EYE: 16394 - REDSTONE: 16450 - 16450: # Splash Potion of Swiftness Extended - Children: - FERMENTED_SPIDER_EYE: 16394 - GLOWSTONE_DUST: 16418 - - 16394: # Splash Potion of Slowness - Children: - REDSTONE: 16458 - 16458: # Splash Potion of Slowness Extended - Children: - GLOWSTONE_DUST: 16394 - - 17152: # Splash Potion of Haste - Effects: ["FAST_DIGGING 0 2700"] - Children: - GLOWSTONE_DUST: 17184 - REDSTONE: 17216 - 17184: # Splash Potion of Haste II - Effects: ["FAST_DIGGING 1 1350"] - Children: - REDSTONE: 17216 - 17216: # Splash Potion of Haste Extended - Effects: ["FAST_DIGGING 0 7200"] - Children: - GLOWSTONE_DUST: 17184 - - 17408: # Splash Potion of Dullness - Effects: ["SLOW_DIGGING 0 2700"] - Children: - GLOWSTONE_DUST: 17440 - REDSTONE: 17472 - 17440: # Splash Potion of Dullness II - Effects: ["SLOW_DIGGING 1 1350"] - Children: - REDSTONE: 17472 - 17472: # Splash Potion of Dullness Extended - Effects: ["SLOW_DIGGING 0 7200"] - Children: - GLOWSTONE_DUST: 17440 - - 16393: # Splash Potion of Strength - Children: - FERMENTED_SPIDER_EYE: 16392 - GLOWSTONE_DUST: 16425 - REDSTONE: 16457 - 16425: # Splash Potion of Strength II - Children: - FERMENTED_SPIDER_EYE: 16392 - REDSTONE: 16457 - 16457: # Splash Potion of Strength Extended - Children: - FERMENTED_SPIDER_EYE: 16456 - GLOWSTONE_DUST: 16425 - - 16389: # Splash Potion of Healing - Children: - FERMENTED_SPIDER_EYE: 16396 - GLOWSTONE_DUST: 16421 - 16421: # Splash Potion of Healing II - Children: - FERMENTED_SPIDER_EYE: 16428 - REDSTONE: 16389 - - 16396: # Splash Potion of Harming - Children: - GLOWSTONE_DUST: 16428 - 16428: # Splash Potion of Harming II - Children: - REDSTONE: 16396 - - 18432: # Splash Potion of Leaping - Effects: ["JUMP 0 2700"] - Children: - GLOWSTONE_DUST: 18464 - REDSTONE: 18496 - 18464: # Splash Potion of Leaping II - Effects: ["JUMP 1 1350"] - Children: - REDSTONE: 18496 - 18496: # Splash Potion of Leaping Extended - Effects: ["JUMP 0 7200"] - Children: - GLOWSTONE_DUST: 18464 - - 18688: # Splash Potion of Nausea - Effects: ["CONFUSION 0 338"] - Children: - REDSTONE: 18752 - 18752: # Splash Potion of Nausea Extended - Effects: ["CONFUSION 0 900"] - Children: - GLOWSTONE_DUST: 18688 - - 16385: # Splash Potion of Regeneration - Children: - FERMENTED_SPIDER_EYE: 16392 - GLOWSTONE_DUST: 16417 - REDSTONE: 16449 - 16417: # Splash Potion of Regeneration II - Children: - FERMENTED_SPIDER_EYE: 16392 - REDSTONE: 16449 - 16449: # Splash Potion of Regeneration Extended - Children: - FERMENTED_SPIDER_EYE: 16456 - GLOWSTONE_DUST: 16417 - - 19200: # Splash Potion of Resistance - Effects: ["DAMAGE_RESISTANCE 0 338"] - Children: - GLOWSTONE_DUST: 19232 - REDSTONE: 19264 - 19232: # Splash Potion of Resistance II - Effects: ["DAMAGE_RESISTANCE 1 169"] - Children: - REDSTONE: 19264 - 19264: # Splash Potion of Resistance Extended - Effects: ["DAMAGE_RESISTANCE 0 900"] - Children: - GLOWSTONE_DUST: 19232 - - 16387: # Splash Potion of Fire Resistance - Children: - FERMENTED_SPIDER_EYE: 16394 - REDSTONE: 16451 - 16451: # Splash Potion of Fire Resistance Extended - Children: - FERMENTED_SPIDER_EYE: 16458 - GLOWSTONE_DUST: 16387 - - 16397: # Splash Potion of Water Breathing - Children: - REDSTONE: 16461 - 16461: # Splash Potion of Water Breathing Extended - Children: - GLOWSTONE_DUST: 16397 - - 16398: # Splash Potion of Invisibility - Children: - REDSTONE: 16462 - 16462: # Splash Potion of Invisibility Extended - Children: - GLOWSTONE_DUST: 16398 - - 20224: # Splash Potion of Blindness - Effects: ["BLINDNESS 0 169"] - Children: - REDSTONE: 20288 - 20288: # Splash Potion of Blindness Extended + SULPHUR: SPLASH_POTION_OF_SATURATION + GLOWSTONE_DUST: POTION_OF_SATURATION_II + REDSTONE: POTION_OF_SATURATION_EXTENDED + POTION_OF_ABSORPTION_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["ABSORPTION 0 3600"] + POTION_OF_BLINDNESS_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE Effects: ["BLINDNESS 0 450"] - Children: - GLOWSTONE_DUST: 20224 - - 16390: # Splash Potion of Night Vision - Children: - FERMENTED_SPIDER_EYE: 16398 - REDSTONE: 16454 - 16454: # Splash Potion of Night Vision Extended - Children: - FERMENTED_SPIDER_EYE: 16462 - GLOWSTONE_DUST: 16390 - - 20736: # Splash Potion of Hunger - Effects: ["HUNGER 0 675"] - Children: - GLOWSTONE_DUST: 20768 - REDSTONE: 20800 - 20768: # Splash Potion of Hunger II - Effects: ["HUNGER 1 338"] - Children: - REDSTONE: 20800 - 20800: # Splash Potion of Hunger Extended - Effects: ["HUNGER 0 1800"] - Children: - GLOWSTONE_DUST: 20768 - - 16392: # Splash Potion of Weakness - Children: - REDSTONE: 16456 - 16456: # Splash Potion of Weakness Extended - Children: - GLOWSTONE_DUST: 16392 - - 16388: # Splash Potion of Poison - Children: - FERMENTED_SPIDER_EYE: 16396 - GLOWSTONE_DUST: 16420 - REDSTONE: 16452 - 16420: # Splash Potion of Poison II - Children: - FERMENTED_SPIDER_EYE: 16428 - REDSTONE: 16452 - 16452: # Splash Potion of Poison Extended - Children: - FERMENTED_SPIDER_EYE: 16396 - GLOWSTONE_DUST: 16420 - - 21504: # Splash Potion of Decay - Effects: ["WITHER 0 338"] - Children: - GLOWSTONE_DUST: 21536 - REDSTONE: 21568 - 21536: # Splash Potion of Decay II - Effects: ["WITHER 1 169"] - Children: - REDSTONE: 21568 - 21568: # Splash Potion of Decay Extended + POTION_OF_DECAY_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE Effects: ["WITHER 0 900"] + POTION_OF_DULLNESS_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 0 7200"] + POTION_OF_HASTE_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 0 7200"] + POTION_OF_HUNGER_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 0 1800"] + POTION_OF_NAUSEA_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 0 900"] + POTION_OF_RESISTANCE_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 0 900"] + POTION_OF_SATURATION_EXTENDED: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SATURATION 0 16"] + POTION_OF_ABSORPTION_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["ABSORPTION 1 900"] + POTION_OF_BLINDNESS_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 1 112"] + POTION_OF_DECAY_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 1 225"] + POTION_OF_DULLNESS_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 1 1800"] + POTION_OF_HASTE_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 1 1800"] + POTION_OF_HUNGER_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 1 450"] + POTION_OF_NAUSEA_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 1 225"] + POTION_OF_RESISTANCE_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 1 225"] + POTION_OF_SATURATION_II: + Material: POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SATURATION 1 4"] + SPLASH_POTION_OF_EMPTY: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE Children: - GLOWSTONE_DUST: 21536 - - 21760: # Splash Potion of Health Boost - Effects: ["HEALTH_BOOST 0 1350"] + DRAGONS_BREATH: LINGERING_POTION_OF_EMPTY + SPLASH_POTION_OF_WATER: + Material: SPLASH_POTION + PotionData: + PotionType: WATER Children: - GLOWSTONE_DUST: 21792 - REDSTONE: 5440 - 21792: # Splash Potion of Health Boost II - Effects: ["HEALTH_BOOST 1 675"] + RABBIT_FOOT: SPLASH_POTION_OF_MUNDANE + MAGMA_CREAM: SPLASH_POTION_OF_MUNDANE + REDSTONE: SPLASH_POTION_OF_MUNDANE + GLOWSTONE_DUST: SPLASH_POTION_OF_THICK + DRAGONS_BREATH: LINGERING_POTION_OF_WATER + SPECKLED_MELON: SPLASH_POTION_OF_MUNDANE + GHAST_TEAR: SPLASH_POTION_OF_MUNDANE + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_WEAKNESS + SPIDER_EYE: SPLASH_POTION_OF_MUNDANE + BLAZE_POWDER: SPLASH_POTION_OF_MUNDANE + NETHER_WARTS: SPLASH_POTION_OF_AWKWARD + SUGAR: SPLASH_POTION_OF_MUNDANE + SPLASH_POTION_OF_MUNDANE: + Material: SPLASH_POTION + PotionData: + PotionType: MUNDANE Children: - REDSTONE: 21824 - 21824: # Splash Potion of Health Boost Extended - Effects: ["HEALTH_BOOST 0 3600"] + DRAGONS_BREATH: LINGERING_POTION_OF_MUNDANE + SPLASH_POTION_OF_THICK: + Material: SPLASH_POTION + PotionData: + PotionType: THICK Children: - GLOWSTONE_DUST: 21792 - - 22016: # Splash Potion of Absorption + DRAGONS_BREATH: LINGERING_POTION_OF_THICK + SPLASH_POTION_OF_AWKWARD: + Material: SPLASH_POTION + PotionData: + PotionType: AWKWARD + Children: + RABBIT_FOOT: SPLASH_POTION_OF_LEAPING + ROTTEN_FLESH: SPLASH_POTION_OF_HUNGER + QUARTZ: SPLASH_POTION_OF_ABSORPTION + GOLDEN_CARROT: SPLASH_POTION_OF_NIGHT_VISION + POISONOUS_POTATO: SPLASH_POTION_OF_DECAY + DRAGONS_BREATH: LINGERING_POTION_OF_AWKWARD + MAGMA_CREAM: SPLASH_POTION_OF_FIRE_RESISTANCE + 'RAW_FISH:3': SPLASH_POTION_OF_WATER_BREATHING + INK_SACK: SPLASH_POTION_OF_BLINDNESS + 'LONG_GRASS:2': SPLASH_POTION_OF_SATURATION + GOLDEN_APPLE: SPLASH_POTION_OF_RESISTANCE + CARROT_ITEM: SPLASH_POTION_OF_HASTE + BLAZE_POWDER: SPLASH_POTION_OF_STRENGTH + SUGAR: SPLASH_POTION_OF_SWIFTNESS + SPIDER_EYE: SPLASH_POTION_OF_POISON + SPECKLED_MELON: SPLASH_POTION_OF_HEALING + BROWN_MUSHROOM: SPLASH_POTION_OF_NAUSEA + SLIME_BALL: SPLASH_POTION_OF_DULLNESS + GHAST_TEAR: SPLASH_POTION_OF_REGENERATION + APPLE: SPLASH_POTION_OF_HEALTH_BOOST + SPLASH_POTION_OF_NIGHT_VISION: + Material: SPLASH_POTION + PotionData: + PotionType: NIGHT_VISION + Children: + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_INVISIBILITY + DRAGONS_BREATH: LINGERING_POTION_OF_NIGHT_VISION + REDSTONE: SPLASH_POTION_OF_NIGHT_VISION_EXTENDED + SPLASH_POTION_OF_NIGHT_VISION_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: NIGHT_VISION + Extended: true + Children: + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_INVISIBILITY_EXTENDED + DRAGONS_BREATH: LINGERING_POTION_OF_NIGHT_VISION_EXTENDED + SPLASH_POTION_OF_INVISIBILITY: + Material: SPLASH_POTION + PotionData: + PotionType: INVISIBILITY + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_INVISIBILITY + REDSTONE: SPLASH_POTION_OF_INVISIBILITY_EXTENDED + SPLASH_POTION_OF_INVISIBILITY_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: INVISIBILITY + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_INVISIBILITY_EXTENDED + SPLASH_POTION_OF_LEAPING: + Material: SPLASH_POTION + PotionData: + PotionType: JUMP + Children: + GLOWSTONE_DUST: SPLASH_POTION_OF_LEAPING_II + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_SLOWNESS + DRAGONS_BREATH: LINGERING_POTION_OF_LEAPING + REDSTONE: SPLASH_POTION_OF_LEAPING_EXTENDED + SPLASH_POTION_OF_LEAPING_II: + Material: SPLASH_POTION + PotionData: + PotionType: JUMP + Upgraded: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_LEAPING_II + SPLASH_POTION_OF_LEAPING_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: JUMP + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_LEAPING_EXTENDED + SPLASH_POTION_OF_FIRE_RESISTANCE: + Material: SPLASH_POTION + PotionData: + PotionType: FIRE_RESISTANCE + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_FIRE_RESISTANCE + REDSTONE: SPLASH_POTION_OF_FIRE_RESISTANCE_EXTENDED + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_SLOWNESS + SPLASH_POTION_OF_FIRE_RESISTANCE_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: FIRE_RESISTANCE + Extended: true + Children: + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_SLOWNESS_EXTENDED + DRAGONS_BREATH: LINGERING_POTION_OF_FIRE_RESISTANCE_EXTENDED + SPLASH_POTION_OF_SWIFTNESS: + Material: SPLASH_POTION + PotionData: + PotionType: SPEED + Children: + REDSTONE: SPLASH_POTION_OF_SWIFTNESS_EXTENDED + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_SLOWNESS + GLOWSTONE_DUST: SPLASH_POTION_OF_SWIFTNESS_II + DRAGONS_BREATH: LINGERING_POTION_OF_SWIFTNESS + SPLASH_POTION_OF_SWIFTNESS_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: SPEED + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_SWIFTNESS_EXTENDED + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_SLOWNESS_EXTENDED + SPLASH_POTION_OF_SWIFTNESS_II: + Material: SPLASH_POTION + PotionData: + PotionType: SPEED + Upgraded: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_SWIFTNESS_II + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_SLOWNESS_EXTENDED + SPLASH_POTION_OF_SLOWNESS: + Material: SPLASH_POTION + PotionData: + PotionType: SLOWNESS + Children: + REDSTONE: SPLASH_POTION_OF_SLOWNESS_EXTENDED + DRAGONS_BREATH: LINGERING_POTION_OF_SLOWNESS + SPLASH_POTION_OF_SLOWNESS_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: SLOWNESS + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_SLOWNESS_EXTENDED + SPLASH_POTION_OF_WATER_BREATHING: + Material: SPLASH_POTION + PotionData: + PotionType: WATER_BREATHING + Children: + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_HARMING + REDSTONE: SPLASH_POTION_OF_WATER_BREATHING_EXTENDED + DRAGONS_BREATH: LINGERING_POTION_OF_WATER_BREATHING + SPLASH_POTION_OF_WATER_BREATHING_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: WATER_BREATHING + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_WATER_BREATHING_EXTENDED + SPLASH_POTION_OF_HEALING: + Material: SPLASH_POTION + PotionData: + PotionType: INSTANT_HEAL + Children: + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_HARMING + GLOWSTONE_DUST: SPLASH_POTION_OF_HEALING_II + DRAGONS_BREATH: LINGERING_POTION_OF_HEALING + SPLASH_POTION_OF_HEALING_II: + Material: SPLASH_POTION + PotionData: + PotionType: INSTANT_HEAL + Upgraded: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_HEALING_II + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_HARMING_II + SPLASH_POTION_OF_HARMING: + Material: SPLASH_POTION + PotionData: + PotionType: INSTANT_DAMAGE + Children: + GLOWSTONE_DUST: SPLASH_POTION_OF_HARMING_II + DRAGONS_BREATH: LINGERING_POTION_OF_HARMING + SPLASH_POTION_OF_HARMING_II: + Material: SPLASH_POTION + PotionData: + PotionType: INSTANT_DAMAGE + Upgraded: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_HARMING_II + SPLASH_POTION_OF_POISON: + Material: SPLASH_POTION + PotionData: + PotionType: POISON + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_POISON + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_HARMING + REDSTONE: SPLASH_POTION_OF_POISON_EXTENDED + GLOWSTONE_DUST: SPLASH_POTION_OF_POISON_II + SPLASH_POTION_OF_POISON_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: POISON + Extended: true + Children: + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_HARMING_II + DRAGONS_BREATH: LINGERING_POTION_OF_POISON_EXTENDED + SPLASH_POTION_OF_POISON_II: + Material: SPLASH_POTION + PotionData: + PotionType: POISON + Upgraded: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_POISON_II + FERMENTED_SPIDER_EYE: SPLASH_POTION_OF_HARMING_II + SPLASH_POTION_OF_REGENERATION: + Material: SPLASH_POTION + PotionData: + PotionType: REGEN + Children: + GLOWSTONE_DUST: SPLASH_POTION_OF_REGENERATION_II + DRAGONS_BREATH: LINGERING_POTION_OF_REGENERATION + REDSTONE: SPLASH_POTION_OF_REGENERATION_EXTENDED + SPLASH_POTION_OF_REGENERATION_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: REGEN + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_REGENERATION_EXTENDED + SPLASH_POTION_OF_REGENERATION_II: + Material: SPLASH_POTION + PotionData: + PotionType: REGEN + Upgraded: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_REGENERATION_II + SPLASH_POTION_OF_STRENGTH: + Material: SPLASH_POTION + PotionData: + PotionType: STRENGTH + Children: + REDSTONE: SPLASH_POTION_OF_STRENGTH_EXTENDED + GLOWSTONE_DUST: SPLASH_POTION_OF_STRENGTH_II + DRAGONS_BREATH: LINGERING_POTION_OF_STRENGTH + SPLASH_POTION_OF_STRENGTH_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: STRENGTH + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_STRENGTH_EXTENDED + SPLASH_POTION_OF_STRENGTH_II: + Material: SPLASH_POTION + PotionData: + PotionType: STRENGTH + Upgraded: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_STRENGTH_II + SPLASH_POTION_OF_WEAKNESS: + Material: SPLASH_POTION + PotionData: + PotionType: WEAKNESS + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_WEAKNESS + REDSTONE: SPLASH_POTION_OF_WEAKNESS_EXTENDED + SPLASH_POTION_OF_WEAKNESS_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: WEAKNESS + Extended: true + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_WEAKNESS_EXTENDED + SPLASH_POTION_OF_LUCK: + Material: SPLASH_POTION + PotionData: + PotionType: LUCK + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_LUCK + SPLASH_POTION_OF_ABSORPTION: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE Effects: ["ABSORPTION 0 1350"] Children: - GLOWSTONE_DUST: 22048 - REDSTONE: 22080 - 22048: # Splash Potion of Absorption II - Effects: ["ABSORPTION 1 675"] + REDSTONE: SPLASH_POTION_OF_ABSORPTION_EXTENDED + GLOWSTONE_DUST: SPLASH_POTION_OF_ABSORPTION_II + DRAGONS_BREATH: LINGERING_POTION_OF_ABSORPTION + SPLASH_POTION_OF_BLINDNESS: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 0 168"] Children: - REDSTONE: 22080 - 22080: # Splash Potion of Absorption Extended - Effects: ["ABSORPTION 0 3600"] + DRAGONS_BREATH: LINGERING_POTION_OF_BLINDNESS + REDSTONE: SPLASH_POTION_OF_BLINDNESS_EXTENDED + GLOWSTONE_DUST: SPLASH_POTION_OF_BLINDNESS_II + SPLASH_POTION_OF_DECAY: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 0 337"] Children: - GLOWSTONE_DUST: 22048 - - 22272: # Splash Potion of Saturation + REDSTONE: SPLASH_POTION_OF_DECAY_EXTENDED + GLOWSTONE_DUST: SPLASH_POTION_OF_DECAY_II + DRAGONS_BREATH: LINGERING_POTION_OF_DECAY + SPLASH_POTION_OF_DULLNESS: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 0 2700"] + Children: + GLOWSTONE_DUST: SPLASH_POTION_OF_DULLNESS_II + DRAGONS_BREATH: LINGERING_POTION_OF_DULLNESS + REDSTONE: SPLASH_POTION_OF_DULLNESS_EXTENDED + SPLASH_POTION_OF_HASTE: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 0 2700"] + Children: + DRAGONS_BREATH: LINGERING_POTION_OF_HASTE + REDSTONE: SPLASH_POTION_OF_HASTE_EXTENDED + GLOWSTONE_DUST: SPLASH_POTION_OF_HASTE_II + SPLASH_POTION_OF_HUNGER: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 0 675"] + Children: + GLOWSTONE_DUST: SPLASH_POTION_OF_HUNGER_II + REDSTONE: SPLASH_POTION_OF_HUNGER_EXTENDED + DRAGONS_BREATH: LINGERING_POTION_OF_HUNGER + SPLASH_POTION_OF_NAUSEA: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 0 337"] + Children: + GLOWSTONE_DUST: SPLASH_POTION_OF_NAUSEA_II + DRAGONS_BREATH: LINGERING_POTION_OF_NAUSEA + REDSTONE: SPLASH_POTION_OF_NAUSEA_EXTENDED + SPLASH_POTION_OF_RESISTANCE: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 0 337"] + Children: + GLOWSTONE_DUST: SPLASH_POTION_OF_RESISTANCE_II + DRAGONS_BREATH: LINGERING_POTION_OF_RESISTANCE + REDSTONE: SPLASH_POTION_OF_RESISTANCE_EXTENDED + SPLASH_POTION_OF_SATURATION: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE Effects: ["SATURATION 0 6"] Children: - GLOWSTONE_DUST: 22304 - 22304: # Splash Potion of Saturation II - Effects: ["SATURATION 1 6"] + DRAGONS_BREATH: LINGERING_POTION_OF_SATURATION + GLOWSTONE_DUST: SPLASH_POTION_OF_SATURATION_II + REDSTONE: SPLASH_POTION_OF_SATURATION_EXTENDED + SPLASH_POTION_OF_ABSORPTION_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["ABSORPTION 0 2700"] + SPLASH_POTION_OF_BLINDNESS_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 0 336"] + SPLASH_POTION_OF_DECAY_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 0 674"] + SPLASH_POTION_OF_DULLNESS_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 0 5400"] + SPLASH_POTION_OF_HASTE_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 0 5400"] + SPLASH_POTION_OF_HUNGER_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 0 1350"] + SPLASH_POTION_OF_NAUSEA_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 0 674"] + SPLASH_POTION_OF_RESISTANCE_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 0 674"] + SPLASH_POTION_OF_SATURATION_EXTENDED: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SATURATION 0 12"] + SPLASH_POTION_OF_ABSORPTION_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["ABSORPTION 1 675"] + SPLASH_POTION_OF_BLINDNESS_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 1 84"] + SPLASH_POTION_OF_DECAY_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 1 168"] + SPLASH_POTION_OF_DULLNESS_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 1 1350"] + SPLASH_POTION_OF_HASTE_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 1 1350"] + SPLASH_POTION_OF_HUNGER_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 1 337"] + SPLASH_POTION_OF_NAUSEA_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 1 168"] + SPLASH_POTION_OF_RESISTANCE_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 1 168"] + SPLASH_POTION_OF_SATURATION_II: + Material: SPLASH_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SATURATION 1 3"] + LINGERING_POTION_OF_EMPTY: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + LINGERING_POTION_OF_WATER: + Material: LINGERING_POTION + PotionData: + PotionType: WATER Children: - REDSTONE: 22272 + NETHER_WARTS: LINGERING_POTION_OF_AWKWARD + MAGMA_CREAM: LINGERING_POTION_OF_MUNDANE + BLAZE_POWDER: LINGERING_POTION_OF_MUNDANE + RABBIT_FOOT: LINGERING_POTION_OF_MUNDANE + SUGAR: LINGERING_POTION_OF_MUNDANE + GLOWSTONE_DUST: LINGERING_POTION_OF_THICK + SPIDER_EYE: LINGERING_POTION_OF_MUNDANE + REDSTONE: LINGERING_POTION_OF_MUNDANE + SPECKLED_MELON: LINGERING_POTION_OF_MUNDANE + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_WEAKNESS + GHAST_TEAR: LINGERING_POTION_OF_MUNDANE + LINGERING_POTION_OF_MUNDANE: + Material: LINGERING_POTION + PotionData: + PotionType: MUNDANE + LINGERING_POTION_OF_THICK: + Material: LINGERING_POTION + PotionData: + PotionType: THICK + LINGERING_POTION_OF_AWKWARD: + Material: LINGERING_POTION + PotionData: + PotionType: AWKWARD + Children: + ROTTEN_FLESH: LINGERING_POTION_OF_HUNGER + APPLE: LINGERING_POTION_OF_HEALTH_BOOST + CARROT_ITEM: LINGERING_POTION_OF_HASTE + SPIDER_EYE: LINGERING_POTION_OF_POISON + GOLDEN_CARROT: LINGERING_POTION_OF_NIGHT_VISION + BLAZE_POWDER: LINGERING_POTION_OF_STRENGTH + GHAST_TEAR: LINGERING_POTION_OF_REGENERATION + 'RAW_FISH:3': LINGERING_POTION_OF_WATER_BREATHING + BROWN_MUSHROOM: LINGERING_POTION_OF_NAUSEA + SPECKLED_MELON: LINGERING_POTION_OF_HEALING + GOLDEN_APPLE: LINGERING_POTION_OF_RESISTANCE + RABBIT_FOOT: LINGERING_POTION_OF_LEAPING + MAGMA_CREAM: LINGERING_POTION_OF_FIRE_RESISTANCE + QUARTZ: LINGERING_POTION_OF_ABSORPTION + SLIME_BALL: LINGERING_POTION_OF_DULLNESS + 'LONG_GRASS:2': LINGERING_POTION_OF_SATURATION + SUGAR: LINGERING_POTION_OF_SWIFTNESS + INK_SACK: LINGERING_POTION_OF_BLINDNESS + POISONOUS_POTATO: LINGERING_POTION_OF_DECAY + LINGERING_POTION_OF_NIGHT_VISION: + Material: LINGERING_POTION + PotionData: + PotionType: NIGHT_VISION + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_INVISIBILITY + REDSTONE: LINGERING_POTION_OF_NIGHT_VISION_EXTENDED + LINGERING_POTION_OF_NIGHT_VISION_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: NIGHT_VISION + Extended: true + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_INVISIBILITY_EXTENDED + LINGERING_POTION_OF_INVISIBILITY: + Material: LINGERING_POTION + PotionData: + PotionType: INVISIBILITY + Children: + REDSTONE: LINGERING_POTION_OF_INVISIBILITY_EXTENDED + LINGERING_POTION_OF_INVISIBILITY_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: INVISIBILITY + Extended: true + LINGERING_POTION_OF_LEAPING: + Material: LINGERING_POTION + PotionData: + PotionType: JUMP + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_SLOWNESS + REDSTONE: LINGERING_POTION_OF_LEAPING_EXTENDED + GLOWSTONE_DUST: LINGERING_POTION_OF_LEAPING_II + LINGERING_POTION_OF_LEAPING_II: + Material: LINGERING_POTION + PotionData: + PotionType: JUMP + Upgraded: true + LINGERING_POTION_OF_LEAPING_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: JUMP + Extended: true + LINGERING_POTION_OF_FIRE_RESISTANCE: + Material: LINGERING_POTION + PotionData: + PotionType: FIRE_RESISTANCE + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_SLOWNESS + REDSTONE: LINGERING_POTION_OF_FIRE_RESISTANCE_EXTENDED + LINGERING_POTION_OF_FIRE_RESISTANCE_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: FIRE_RESISTANCE + Extended: true + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_SLOWNESS_EXTENDED + LINGERING_POTION_OF_SWIFTNESS: + Material: LINGERING_POTION + PotionData: + PotionType: SPEED + Children: + REDSTONE: LINGERING_POTION_OF_SWIFTNESS_EXTENDED + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_SLOWNESS + GLOWSTONE_DUST: LINGERING_POTION_OF_SWIFTNESS_II + LINGERING_POTION_OF_SWIFTNESS_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: SPEED + Extended: true + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_SLOWNESS_EXTENDED + LINGERING_POTION_OF_SWIFTNESS_II: + Material: LINGERING_POTION + PotionData: + PotionType: SPEED + Upgraded: true + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_SLOWNESS_EXTENDED + LINGERING_POTION_OF_SLOWNESS: + Material: LINGERING_POTION + PotionData: + PotionType: SLOWNESS + Children: + REDSTONE: LINGERING_POTION_OF_SLOWNESS_EXTENDED + LINGERING_POTION_OF_SLOWNESS_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: SLOWNESS + Extended: true + LINGERING_POTION_OF_WATER_BREATHING: + Material: LINGERING_POTION + PotionData: + PotionType: WATER_BREATHING + Children: + REDSTONE: LINGERING_POTION_OF_WATER_BREATHING_EXTENDED + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_HARMING + LINGERING_POTION_OF_WATER_BREATHING_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: WATER_BREATHING + Extended: true + LINGERING_POTION_OF_HEALING: + Material: LINGERING_POTION + PotionData: + PotionType: INSTANT_HEAL + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_HEALING_II + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_HARMING + LINGERING_POTION_OF_HEALING_II: + Material: LINGERING_POTION + PotionData: + PotionType: INSTANT_HEAL + Upgraded: true + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_HARMING_II + LINGERING_POTION_OF_HARMING: + Material: LINGERING_POTION + PotionData: + PotionType: INSTANT_DAMAGE + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_HARMING_II + LINGERING_POTION_OF_HARMING_II: + Material: LINGERING_POTION + PotionData: + PotionType: INSTANT_DAMAGE + Upgraded: true + LINGERING_POTION_OF_POISON: + Material: LINGERING_POTION + PotionData: + PotionType: POISON + Children: + REDSTONE: LINGERING_POTION_OF_POISON_EXTENDED + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_HARMING + GLOWSTONE_DUST: LINGERING_POTION_OF_POISON_II + LINGERING_POTION_OF_POISON_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: POISON + Extended: true + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_HARMING_II + LINGERING_POTION_OF_POISON_II: + Material: LINGERING_POTION + PotionData: + PotionType: POISON + Upgraded: true + Children: + FERMENTED_SPIDER_EYE: LINGERING_POTION_OF_HARMING_II + LINGERING_POTION_OF_REGENERATION: + Material: LINGERING_POTION + PotionData: + PotionType: REGEN + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_REGENERATION_II + REDSTONE: LINGERING_POTION_OF_REGENERATION_EXTENDED + LINGERING_POTION_OF_REGENERATION_II: + Material: LINGERING_POTION + PotionData: + PotionType: REGEN + Upgraded: true + LINGERING_POTION_OF_REGENERATION_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: REGEN + Extended: true + LINGERING_POTION_OF_STRENGTH: + Material: LINGERING_POTION + PotionData: + PotionType: STRENGTH + Children: + REDSTONE: LINGERING_POTION_OF_STRENGTH_EXTENDED + GLOWSTONE_DUST: LINGERING_POTION_OF_STRENGTH_II + LINGERING_POTION_OF_STRENGTH_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: STRENGTH + Extended: true + LINGERING_POTION_OF_STRENGTH_II: + Material: LINGERING_POTION + PotionData: + PotionType: STRENGTH + Upgraded: true + LINGERING_POTION_OF_WEAKNESS: + Material: LINGERING_POTION + PotionData: + PotionType: WEAKNESS + Children: + REDSTONE: LINGERING_POTION_OF_WEAKNESS_EXTENDED + LINGERING_POTION_OF_WEAKNESS_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: WEAKNESS + Extended: true + LINGERING_POTION_OF_LUCK: + Material: LINGERING_POTION + PotionData: + PotionType: LUCK + LINGERING_POTION_OF_ABSORPTION: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["ABSORPTION 0 450"] + Children: + REDSTONE: LINGERING_POTION_OF_ABSORPTION_EXTENDED + GLOWSTONE_DUST: LINGERING_POTION_OF_ABSORPTION_II + LINGERING_POTION_OF_BLINDNESS: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 0 56"] + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_BLINDNESS_II + REDSTONE: LINGERING_POTION_OF_BLINDNESS_EXTENDED + LINGERING_POTION_OF_DECAY: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 0 112"] + Children: + REDSTONE: LINGERING_POTION_OF_DECAY_EXTENDED + GLOWSTONE_DUST: LINGERING_POTION_OF_DECAY_II + LINGERING_POTION_OF_DULLNESS: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 0 900"] + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_DULLNESS_II + REDSTONE: LINGERING_POTION_OF_DULLNESS_EXTENDED + LINGERING_POTION_OF_HASTE: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 0 900"] + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_HASTE_II + REDSTONE: LINGERING_POTION_OF_HASTE_EXTENDED + LINGERING_POTION_OF_HUNGER: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 0 225"] + Children: + REDSTONE: LINGERING_POTION_OF_HUNGER_EXTENDED + GLOWSTONE_DUST: LINGERING_POTION_OF_HUNGER_II + LINGERING_POTION_OF_NAUSEA: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 0 112"] + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_NAUSEA_II + REDSTONE: LINGERING_POTION_OF_NAUSEA_EXTENDED + LINGERING_POTION_OF_RESISTANCE: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 0 112"] + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_RESISTANCE_II + REDSTONE: LINGERING_POTION_OF_RESISTANCE_EXTENDED + LINGERING_POTION_OF_SATURATION: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SATURATION 0 2"] + Children: + GLOWSTONE_DUST: LINGERING_POTION_OF_SATURATION_II + REDSTONE: LINGERING_POTION_OF_SATURATION_EXTENDED + LINGERING_POTION_OF_ABSORPTION_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["ABSORPTION 0 900"] + LINGERING_POTION_OF_BLINDNESS_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 0 112"] + LINGERING_POTION_OF_DECAY_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 0 224"] + LINGERING_POTION_OF_DULLNESS_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 0 1800"] + LINGERING_POTION_OF_HASTE_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 0 1800"] + LINGERING_POTION_OF_HUNGER_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 0 450"] + LINGERING_POTION_OF_NAUSEA_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 0 224"] + LINGERING_POTION_OF_RESISTANCE_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 0 224"] + LINGERING_POTION_OF_SATURATION_EXTENDED: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SATURATION 0 4"] + LINGERING_POTION_OF_ABSORPTION_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["ABSORPTION 1 225"] + LINGERING_POTION_OF_BLINDNESS_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["BLINDNESS 1 28"] + LINGERING_POTION_OF_DECAY_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["WITHER 1 56"] + LINGERING_POTION_OF_DULLNESS_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SLOW_DIGGING 1 450"] + LINGERING_POTION_OF_HASTE_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["FAST_DIGGING 1 450"] + LINGERING_POTION_OF_HUNGER_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["HUNGER 1 112"] + LINGERING_POTION_OF_NAUSEA_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["CONFUSION 1 56"] + LINGERING_POTION_OF_RESISTANCE_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["DAMAGE_RESISTANCE 1 56"] + LINGERING_POTION_OF_SATURATION_II: + Material: LINGERING_POTION + PotionData: + PotionType: UNCRAFTABLE + Effects: ["SATURATION 1 1"] diff --git a/src/util/java/mcMMO/PotionConfigGenerator.java b/src/util/java/mcMMO/PotionConfigGenerator.java new file mode 100644 index 000000000..6121e733d --- /dev/null +++ b/src/util/java/mcMMO/PotionConfigGenerator.java @@ -0,0 +1,616 @@ +package com.gmail.nossr50; + + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.bukkit.Material; +import org.bukkit.potion.PotionType; + +import org.bukkit.potion.PotionData; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +public class PotionConfigGenerator { + + public static class Ingredient { + + public Material mat; + public int data; + public String name; + + public Ingredient(Material mat) { + this.mat = mat; + this.data = 0; + name = mat.name(); + } + + public Ingredient(Material mat, int data) { + this.mat = mat; + this.data = data; + name = "'" + mat.name() + ":" + data + "'"; + } + } + public static class WriteablePotion { + + public String name; + public Material mat; + public PotionData data; + public PotionEffect effect; + public String baseName; + + public WriteablePotion(PotionData data) { + this(Material.POTION, data); + } + + public WriteablePotion(Material type, PotionData data) { + this(type, data, null, getMCName(data.getType())); + } + + public WriteablePotion(Material mat, PotionType type, PotionEffect effect, String baseName) { + this(mat, new PotionData(type, false, false), effect, baseName); + } + + public WriteablePotion(Material type, PotionData data, PotionEffect effect, String baseName) { + this.data = data; + this.effect = effect; + this.mat = type; + this.baseName = baseName; + this.name = "POTION_OF_" + baseName; + if (mat == Material.SPLASH_POTION) { + this.name = "SPLASH_" + this.name; + } + if (mat == Material.LINGERING_POTION) { + this.name = "LINGERING_" + this.name; + } + if (data.isExtended()) { + this.name += "_EXTENDED"; + } + if (data.isUpgraded()) { + this.name += "_II"; + } + } + + public WriteablePotion(PotionType type) { + this(new PotionData(type, false, false)); + } + + public WriteablePotion(Material mat, PotionType type) { + this(mat, new PotionData(type, false, false)); + } + + private static String getMCName(PotionType type) { + switch (type) { + case INSTANT_DAMAGE : + return "HARMING"; + case INSTANT_HEAL : + return "HEALING"; + case JUMP : + return "LEAPING"; + case REGEN : + return "REGENERATION"; + case SPEED : + return "SWIFTNESS"; + case UNCRAFTABLE : + return "EMPTY"; + case LUCK : + case MUNDANE : + case NIGHT_VISION : + case POISON : + case INVISIBILITY : + case SLOWNESS : + case AWKWARD : + case STRENGTH : + case THICK : + case FIRE_RESISTANCE : + case WATER : + case WATER_BREATHING : + case WEAKNESS : + return type.name(); + default : + return ""; + } + } + + public int hashCode() { + return name.hashCode(); + } + + public boolean equals(Object obj) { + if (!(obj instanceof WriteablePotion)) { + return false; + } + return name.equals(((WriteablePotion) obj).name); + } + } + + public static void main(String[] args) throws IOException { + Map> vanillaPotions = new HashMap>(); + populateVanillaPotions(vanillaPotions); + Map> mcMMOPotions = new HashMap>(); + populateCustomPotions(mcMMOPotions); + List sorted = new ArrayList(); + sorted.addAll(vanillaPotions.keySet()); + sorted.addAll(mcMMOPotions.keySet()); + // Get all mcMMO potions without children + for (Map map : mcMMOPotions.values()) { + for (WriteablePotion potion : map.values()) { + if (!sorted.contains(potion)) { + sorted.add(potion); + } + } + } + sorted.sort(new Comparator() { + + @Override + public int compare(WriteablePotion a, WriteablePotion b) { + // All normal potions first + if (a.mat == Material.POTION && b.mat != Material.POTION) { + return -1; + } + if (b.mat == Material.POTION && a.mat != Material.POTION) { + return 1; + } + // All splash potions second + if (a.mat == Material.SPLASH_POTION && b.mat != Material.SPLASH_POTION) { + return -1; + } + if (b.mat == Material.SPLASH_POTION && a.mat != Material.SPLASH_POTION) { + return 1; + } + // Vanilla Potions first + if (a.effect == null && b.effect != null) { + return -1; + } + if (b.effect == null && a.effect != null) { + return 1; + } + // Vanilla potions + if (a.effect == null && b.effect == null) { + // Order by PotionType + if (a.data.getType() != b.data.getType()) { + return Integer.compare(a.data.getType().ordinal(), b.data.getType().ordinal()); + } + // Plain before extended or upgraded + if (!a.data.isExtended() && !a.data.isUpgraded() && (b.data.isExtended() || b.data.isUpgraded())) { + return -1; + } + if (!b.data.isExtended() && !b.data.isUpgraded() && (a.data.isExtended() || a.data.isUpgraded())) { + return 1; + } + // Extended before Upgraded + if (a.data.isExtended() && b.data.isUpgraded()) { + return -1; + } + if (b.data.isExtended() && a.data.isUpgraded()) { + return -1; + } + // Same potion somehow? + return 0; + } + // mcMMO Potions + else { + if ((a.baseName.contains("II") || a.baseName.contains("EXTENDED")) && !(b.baseName.contains("II") || b.baseName.contains("EXTENDED"))) { + return 1; + } + if ((b.baseName.contains("II") || b.baseName.contains("EXTENDED")) && !(a.baseName.contains("II") || a.baseName.contains("EXTENDED"))) { + return -1; + } + if (!a.baseName.contains("II") && b.baseName.contains("II")) { + return -1; + } + if (!b.baseName.contains("II") && a.baseName.contains("II")) { + return 1; + } + return a.baseName.split("_")[0].compareTo(b.baseName.split("_")[0]); + } + } + + }); + for (WriteablePotion potion : sorted) { + Map children; + if (vanillaPotions.containsKey(potion)) { + children = vanillaPotions.get(potion); + } else { + children = mcMMOPotions.get(potion); + } + System.out.println(" " + potion.name + ":"); + System.out.println(" Material: " + potion.mat.name()); + System.out.println(" PotionData:"); + System.out.println(" PotionType: " + potion.data.getType().name()); + if (potion.data.isExtended()) { + System.out.println(" Extended: true"); + } + if (potion.data.isUpgraded()) { + System.out.println(" Upgraded: true"); + } + if (potion.effect != null) { + System.out.println(" Effects: [\"" + getName(potion.effect.getType()) + " " + potion.effect.getAmplifier() + " " + potion.effect.getDuration() + "\"]"); + } + if (children == null || children.isEmpty()) { + continue; + } + System.out.println(" Children:"); + for (Entry child : children.entrySet()) { + System.out.println(" " + child.getKey().name + ": " + child.getValue().name); + } + } + } + + private static String getName(PotionEffectType type) { + switch (type.getId()) { + case 1: + return "SPEED"; + case 2: + return "SLOW"; + case 3: + return "FAST_DIGGING"; + case 4: + return "SLOW_DIGGING"; + case 5: + return "INCREASE_DAMAGE"; + case 6: + return "HEAL"; + case 7: + return "HARM"; + case 8: + return "JUMP"; + case 9: + return "CONFUSION"; + case 10: + return "REGENERATION"; + case 11: + return "DAMAGE_RESISTANCE"; + case 12: + return "FIRE_RESISTANCE"; + case 13: + return "WATER_BREATHING"; + case 14: + return "INVISIBILITY"; + case 15: + return "BLINDNESS"; + case 16: + return "NIGHT_VISION"; + case 17: + return "HUNGER"; + case 18: + return "WEAKNESS"; + case 19: + return "POISON"; + case 20: + return "WITHER"; + case 21: + return "HEALTH_BOOST"; + case 22: + return "ABSORPTION"; + case 23: + return "SATURATION"; + case 24: + return "GLOWING"; + case 25: + return "LEVITATION"; + case 26: + return "LUCK"; + case 27: + return "UNLUCK"; + default: + return "UNKNOWN_EFFECT_TYPE_" + type.getId(); + } + } + + private static void populateVanillaPotions(Map> vanillaPotions) { + for (PotionType type : PotionType.values()) { + for (Material material : new Material[]{Material.POTION, Material.SPLASH_POTION, Material.LINGERING_POTION}) { + WriteablePotion data = new WriteablePotion(material, type); + HashMap children = new HashMap(); + getChildren(data, children); + vanillaPotions.put(data, children); + if (type.isExtendable()) { + data = new WriteablePotion(material, new PotionData(type, true, false)); + children = new HashMap(); + getChildren(data, children); + vanillaPotions.put(data, children); + } + if (type.isUpgradeable()) { + data = new WriteablePotion(material, new PotionData(type, false, true)); + children = new HashMap(); + getChildren(data, children); + vanillaPotions.put(data, children); + } + } + } + for (Entry> entry : vanillaPotions.entrySet()) { + if (entry.getKey().mat == Material.POTION) { + entry.getValue().put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, entry.getKey().data)); + } + if (entry.getKey().mat == Material.SPLASH_POTION) { + entry.getValue().put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, entry.getKey().data)); + } + } + } + + private static void getChildren(WriteablePotion current, HashMap children) { + switch (current.data.getType()) { + case WATER : + assert(!current.data.isExtended()); + assert(!current.data.isUpgraded()); + children.put(new Ingredient(Material.NETHER_WARTS), new WriteablePotion(current.mat, PotionType.AWKWARD)); + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.WEAKNESS)); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, PotionType.MUNDANE)); + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, PotionType.THICK)); + children.put(new Ingredient(Material.BLAZE_POWDER), new WriteablePotion(current.mat, PotionType.MUNDANE)); + children.put(new Ingredient(Material.SUGAR), new WriteablePotion(current.mat, PotionType.MUNDANE)); + children.put(new Ingredient(Material.RABBIT_FOOT), new WriteablePotion(current.mat, PotionType.MUNDANE)); + children.put(new Ingredient(Material.SPIDER_EYE), new WriteablePotion(current.mat, PotionType.MUNDANE)); + children.put(new Ingredient(Material.MAGMA_CREAM), new WriteablePotion(current.mat, PotionType.MUNDANE)); + children.put(new Ingredient(Material.SPECKLED_MELON), new WriteablePotion(current.mat, PotionType.MUNDANE)); + children.put(new Ingredient(Material.GHAST_TEAR), new WriteablePotion(current.mat, PotionType.MUNDANE)); + return; + case AWKWARD : + assert(!current.data.isExtended()); + assert(!current.data.isUpgraded()); + children.put(new Ingredient(Material.GOLDEN_CARROT), new WriteablePotion(current.mat, PotionType.NIGHT_VISION)); + children.put(new Ingredient(Material.RABBIT_FOOT), new WriteablePotion(current.mat, PotionType.JUMP)); + children.put(new Ingredient(Material.MAGMA_CREAM), new WriteablePotion(current.mat, PotionType.FIRE_RESISTANCE)); + children.put(new Ingredient(Material.SUGAR), new WriteablePotion(current.mat, PotionType.SPEED)); + children.put(new Ingredient(Material.RAW_FISH, 3), new WriteablePotion(current.mat, PotionType.WATER_BREATHING)); + children.put(new Ingredient(Material.SPECKLED_MELON), new WriteablePotion(current.mat, PotionType.INSTANT_HEAL)); + children.put(new Ingredient(Material.SPIDER_EYE), new WriteablePotion(current.mat, PotionType.POISON)); + children.put(new Ingredient(Material.GHAST_TEAR), new WriteablePotion(current.mat, PotionType.REGEN)); + children.put(new Ingredient(Material.BLAZE_POWDER), new WriteablePotion(current.mat, PotionType.STRENGTH)); + // mcMMO custom potions + double mod = 1; + if (current.mat == Material.SPLASH_POTION) { + mod = 0.75; + } + if (current.mat == Material.LINGERING_POTION) { + mod = 0.25; + } + children.put(new Ingredient(Material.BROWN_MUSHROOM), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.CONFUSION, (int) (450 * mod), 0), "NAUSEA")); + children.put(new Ingredient(Material.CARROT_ITEM), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.FAST_DIGGING, (int) (3600 * mod), 0), "HASTE")); + children.put(new Ingredient(Material.SLIME_BALL), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.SLOW_DIGGING, (int) (3600 * mod), 0), "DULLNESS")); + children.put(new Ingredient(Material.GOLDEN_APPLE), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, (int) (450 * mod), 0), "RESISTANCE")); + children.put(new Ingredient(Material.INK_SACK), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.BLINDNESS, (int) (225 * mod), 0), "BLINDNESS")); + children.put(new Ingredient(Material.ROTTEN_FLESH), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.HUNGER, (int) (900 * mod), 0), "HUNGER")); + children.put(new Ingredient(Material.POISONOUS_POTATO), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.WITHER, (int) (450 * mod), 0), "DECAY")); + children.put(new Ingredient(Material.QUARTZ), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.ABSORPTION, (int) (1800 * mod), 0), "ABSORPTION")); + children.put(new Ingredient(Material.LONG_GRASS, 2), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.SATURATION, (int) (8 * mod), 0), "SATURATION")); + children.put(new Ingredient(Material.APPLE), new WriteablePotion(current.mat, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.HEALTH_BOOST, (int) (1800 * mod), 0), "HEALTH_BOOST")); + return; + case FIRE_RESISTANCE : + assert(!current.data.isUpgraded()); + if (current.data.isExtended()) { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, new PotionData(PotionType.SLOWNESS, true, false))); + } else { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.SLOWNESS)); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case INSTANT_DAMAGE : + assert(!current.data.isExtended()); + if (!current.data.isUpgraded()) { + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, new PotionData(current.data.getType(), false, true))); + } + return; + case INSTANT_HEAL : + assert(!current.data.isExtended()); + if (!current.data.isUpgraded()) { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.INSTANT_DAMAGE)); + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, new PotionData(current.data.getType(), false, true))); + } else { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, new PotionData(PotionType.INSTANT_DAMAGE, false, true))); + } + return; + case INVISIBILITY : + assert(!current.data.isUpgraded()); + if (!current.data.isExtended()) { + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case JUMP : + if (!current.data.isUpgraded() && !current.data.isExtended()) { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.SLOWNESS)); + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, new PotionData(current.data.getType(), false, true))); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case NIGHT_VISION : + assert(!current.data.isUpgraded()); + if (!current.data.isExtended()) { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.INVISIBILITY)); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } else { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, new PotionData(PotionType.INVISIBILITY, true, false))); + } + return; + case POISON : + if (!current.data.isUpgraded() && !current.data.isExtended()) { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.INSTANT_DAMAGE)); + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, new PotionData(current.data.getType(), false, true))); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } else { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, new PotionData(PotionType.INSTANT_DAMAGE, false, true))); + } + return; + case REGEN : + if (!current.data.isUpgraded() && !current.data.isExtended()) { + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, new PotionData(current.data.getType(), false, true))); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case SLOWNESS : + assert(!current.data.isUpgraded()); + if (!current.data.isExtended()) { + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case SPEED : + if (!current.data.isUpgraded() && !current.data.isExtended()) { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.SLOWNESS)); + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, new PotionData(current.data.getType(), false, true))); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } else { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, new PotionData(PotionType.SLOWNESS, true, false))); + } + return; + case STRENGTH : + if (!current.data.isUpgraded() && !current.data.isExtended()) { + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(current.mat, new PotionData(current.data.getType(), false, true))); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case WATER_BREATHING : + assert(!current.data.isUpgraded()); + if (!current.data.isExtended()) { + children.put(new Ingredient(Material.FERMENTED_SPIDER_EYE), new WriteablePotion(current.mat, PotionType.INSTANT_DAMAGE)); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case WEAKNESS : + assert(!current.data.isUpgraded()); + if (!current.data.isExtended()) { + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(current.mat, new PotionData(current.data.getType(), true, false))); + } + return; + case LUCK : + case MUNDANE : + case THICK : + case UNCRAFTABLE : + assert(!current.data.isExtended()); + assert(!current.data.isUpgraded()); + return; + default : + assert(false); + break; + } + } + + private static void populateCustomPotions(Map> mcMMOPotions) { + for (Material material : new Material[]{Material.POTION, Material.SPLASH_POTION, Material.LINGERING_POTION}) { + WriteablePotion data = new WriteablePotion(material, PotionType.AWKWARD); + double mod = 1; + if (material == Material.SPLASH_POTION) { + mod = 0.75; + } + if (material == Material.LINGERING_POTION) { + mod = 0.25; + } + HashMap children = new HashMap(); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.CONFUSION, (int) (450 * mod), 0), "NAUSEA"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.FAST_DIGGING, (int) (3600 * mod), 0), "HASTE"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.SLOW_DIGGING, (int) (3600 * mod), 0), "DULLNESS"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, (int) (450 * mod), 0), "RESISTANCE"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.BLINDNESS, (int) (225 * mod), 0), "BLINDNESS"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.HUNGER, (int) (900 * mod), 0), "HUNGER"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.WITHER, (int) (450 * mod), 0), "DECAY"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.ABSORPTION, (int) (1800 * mod), 0), "ABSORPTION"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.SATURATION, (int) (8 * mod), 0), "SATURATION"); + children = new HashMap(); + if (material == Material.POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.75), data.effect.getAmplifier()); + children.put(new Ingredient(Material.SULPHUR), new WriteablePotion(Material.SPLASH_POTION, data.data, effect, data.baseName)); + } else if (material == Material.SPLASH_POTION) { + PotionEffect effect = new PotionEffect(data.effect.getType(), (int) (data.effect.getDuration() * 0.33), data.effect.getAmplifier()); + children.put(new Ingredient(Material.DRAGONS_BREATH), new WriteablePotion(Material.LINGERING_POTION, data.data, effect, data.baseName)); + } + children.put(new Ingredient(Material.GLOWSTONE_DUST), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() / 2, 1), data.baseName + "_II")); + children.put(new Ingredient(Material.REDSTONE), new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(data.effect.getType(), data.effect.getDuration() * 2, 0), data.baseName + "_EXTENDED")); + mcMMOPotions.put(data, children); + data = new WriteablePotion(material, PotionType.UNCRAFTABLE, new PotionEffect(PotionEffectType.HEALTH_BOOST, (int) (1800 * mod), 0), "HEALTH_BOOST"); + } + } +} From c75715b18642a8075472c2ae18ebf9282a94a152 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Sat, 12 Mar 2016 17:52:19 -0500 Subject: [PATCH 10/10] We need to name the custom potions. --- src/main/resources/potions.yml | 81 +++++++++++++++++++ .../java/mcMMO/PotionConfigGenerator.java | 29 ++++++- 2 files changed, 109 insertions(+), 1 deletion(-) diff --git a/src/main/resources/potions.yml b/src/main/resources/potions.yml index 2f63666ce..6c2e90d78 100644 --- a/src/main/resources/potions.yml +++ b/src/main/resources/potions.yml @@ -356,6 +356,7 @@ Potions: Children: SULPHUR: SPLASH_POTION_OF_LUCK POTION_OF_ABSORPTION: + Name: Potion Of Absorption Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -365,6 +366,7 @@ Potions: GLOWSTONE_DUST: POTION_OF_ABSORPTION_II REDSTONE: POTION_OF_ABSORPTION_EXTENDED POTION_OF_BLINDNESS: + Name: Potion Of Blindness Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -374,6 +376,7 @@ Potions: GLOWSTONE_DUST: POTION_OF_BLINDNESS_II SULPHUR: SPLASH_POTION_OF_BLINDNESS POTION_OF_DECAY: + Name: Potion Of Decay Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -383,6 +386,7 @@ Potions: SULPHUR: SPLASH_POTION_OF_DECAY GLOWSTONE_DUST: POTION_OF_DECAY_II POTION_OF_DULLNESS: + Name: Potion Of Dullness Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -392,6 +396,7 @@ Potions: REDSTONE: POTION_OF_DULLNESS_EXTENDED SULPHUR: SPLASH_POTION_OF_DULLNESS POTION_OF_HASTE: + Name: Potion Of Haste Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -401,6 +406,7 @@ Potions: REDSTONE: POTION_OF_HASTE_EXTENDED GLOWSTONE_DUST: POTION_OF_HASTE_II POTION_OF_HUNGER: + Name: Potion Of Hunger Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -410,6 +416,7 @@ Potions: GLOWSTONE_DUST: POTION_OF_HUNGER_II SULPHUR: SPLASH_POTION_OF_HUNGER POTION_OF_NAUSEA: + Name: Potion Of Nausea Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -419,6 +426,7 @@ Potions: REDSTONE: POTION_OF_NAUSEA_EXTENDED SULPHUR: SPLASH_POTION_OF_NAUSEA POTION_OF_RESISTANCE: + Name: Potion Of Resistance Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -428,6 +436,7 @@ Potions: REDSTONE: POTION_OF_RESISTANCE_EXTENDED SULPHUR: SPLASH_POTION_OF_RESISTANCE POTION_OF_SATURATION: + Name: Potion Of Saturation Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -437,91 +446,109 @@ Potions: GLOWSTONE_DUST: POTION_OF_SATURATION_II REDSTONE: POTION_OF_SATURATION_EXTENDED POTION_OF_ABSORPTION_EXTENDED: + Name: Potion Of Absorption Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["ABSORPTION 0 3600"] POTION_OF_BLINDNESS_EXTENDED: + Name: Potion Of Blindness Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["BLINDNESS 0 450"] POTION_OF_DECAY_EXTENDED: + Name: Potion Of Decay Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["WITHER 0 900"] POTION_OF_DULLNESS_EXTENDED: + Name: Potion Of Dullness Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SLOW_DIGGING 0 7200"] POTION_OF_HASTE_EXTENDED: + Name: Potion Of Haste Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["FAST_DIGGING 0 7200"] POTION_OF_HUNGER_EXTENDED: + Name: Potion Of Hunger Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["HUNGER 0 1800"] POTION_OF_NAUSEA_EXTENDED: + Name: Potion Of Nausea Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["CONFUSION 0 900"] POTION_OF_RESISTANCE_EXTENDED: + Name: Potion Of Resistance Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["DAMAGE_RESISTANCE 0 900"] POTION_OF_SATURATION_EXTENDED: + Name: Potion Of Saturation Extended Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SATURATION 0 16"] POTION_OF_ABSORPTION_II: + Name: Potion Of Absorption II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["ABSORPTION 1 900"] POTION_OF_BLINDNESS_II: + Name: Potion Of Blindness II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["BLINDNESS 1 112"] POTION_OF_DECAY_II: + Name: Potion Of Decay II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["WITHER 1 225"] POTION_OF_DULLNESS_II: + Name: Potion Of Dullness II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SLOW_DIGGING 1 1800"] POTION_OF_HASTE_II: + Name: Potion Of Haste II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["FAST_DIGGING 1 1800"] POTION_OF_HUNGER_II: + Name: Potion Of Hunger II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["HUNGER 1 450"] POTION_OF_NAUSEA_II: + Name: Potion Of Nausea II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["CONFUSION 1 225"] POTION_OF_RESISTANCE_II: + Name: Potion Of Resistance II Material: POTION PotionData: PotionType: UNCRAFTABLE Effects: ["DAMAGE_RESISTANCE 1 225"] POTION_OF_SATURATION_II: + Name: Potion Of Saturation II Material: POTION PotionData: PotionType: UNCRAFTABLE @@ -829,6 +856,7 @@ Potions: Children: DRAGONS_BREATH: LINGERING_POTION_OF_LUCK SPLASH_POTION_OF_ABSORPTION: + Name: Splash Potion Of Absorption Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -838,6 +866,7 @@ Potions: GLOWSTONE_DUST: SPLASH_POTION_OF_ABSORPTION_II DRAGONS_BREATH: LINGERING_POTION_OF_ABSORPTION SPLASH_POTION_OF_BLINDNESS: + Name: Splash Potion Of Blindness Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -847,6 +876,7 @@ Potions: REDSTONE: SPLASH_POTION_OF_BLINDNESS_EXTENDED GLOWSTONE_DUST: SPLASH_POTION_OF_BLINDNESS_II SPLASH_POTION_OF_DECAY: + Name: Splash Potion Of Decay Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -856,6 +886,7 @@ Potions: GLOWSTONE_DUST: SPLASH_POTION_OF_DECAY_II DRAGONS_BREATH: LINGERING_POTION_OF_DECAY SPLASH_POTION_OF_DULLNESS: + Name: Splash Potion Of Dullness Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -865,6 +896,7 @@ Potions: DRAGONS_BREATH: LINGERING_POTION_OF_DULLNESS REDSTONE: SPLASH_POTION_OF_DULLNESS_EXTENDED SPLASH_POTION_OF_HASTE: + Name: Splash Potion Of Haste Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -874,6 +906,7 @@ Potions: REDSTONE: SPLASH_POTION_OF_HASTE_EXTENDED GLOWSTONE_DUST: SPLASH_POTION_OF_HASTE_II SPLASH_POTION_OF_HUNGER: + Name: Splash Potion Of Hunger Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -883,6 +916,7 @@ Potions: REDSTONE: SPLASH_POTION_OF_HUNGER_EXTENDED DRAGONS_BREATH: LINGERING_POTION_OF_HUNGER SPLASH_POTION_OF_NAUSEA: + Name: Splash Potion Of Nausea Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -892,6 +926,7 @@ Potions: DRAGONS_BREATH: LINGERING_POTION_OF_NAUSEA REDSTONE: SPLASH_POTION_OF_NAUSEA_EXTENDED SPLASH_POTION_OF_RESISTANCE: + Name: Splash Potion Of Resistance Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -901,6 +936,7 @@ Potions: DRAGONS_BREATH: LINGERING_POTION_OF_RESISTANCE REDSTONE: SPLASH_POTION_OF_RESISTANCE_EXTENDED SPLASH_POTION_OF_SATURATION: + Name: Splash Potion Of Saturation Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -910,91 +946,109 @@ Potions: GLOWSTONE_DUST: SPLASH_POTION_OF_SATURATION_II REDSTONE: SPLASH_POTION_OF_SATURATION_EXTENDED SPLASH_POTION_OF_ABSORPTION_EXTENDED: + Name: Splash Potion Of Absorption Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["ABSORPTION 0 2700"] SPLASH_POTION_OF_BLINDNESS_EXTENDED: + Name: Splash Potion Of Blindness Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["BLINDNESS 0 336"] SPLASH_POTION_OF_DECAY_EXTENDED: + Name: Splash Potion Of Decay Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["WITHER 0 674"] SPLASH_POTION_OF_DULLNESS_EXTENDED: + Name: Splash Potion Of Dullness Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SLOW_DIGGING 0 5400"] SPLASH_POTION_OF_HASTE_EXTENDED: + Name: Splash Potion Of Haste Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["FAST_DIGGING 0 5400"] SPLASH_POTION_OF_HUNGER_EXTENDED: + Name: Splash Potion Of Hunger Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["HUNGER 0 1350"] SPLASH_POTION_OF_NAUSEA_EXTENDED: + Name: Splash Potion Of Nausea Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["CONFUSION 0 674"] SPLASH_POTION_OF_RESISTANCE_EXTENDED: + Name: Splash Potion Of Resistance Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["DAMAGE_RESISTANCE 0 674"] SPLASH_POTION_OF_SATURATION_EXTENDED: + Name: Splash Potion Of Saturation Extended Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SATURATION 0 12"] SPLASH_POTION_OF_ABSORPTION_II: + Name: Splash Potion Of Absorption II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["ABSORPTION 1 675"] SPLASH_POTION_OF_BLINDNESS_II: + Name: Splash Potion Of Blindness II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["BLINDNESS 1 84"] SPLASH_POTION_OF_DECAY_II: + Name: Splash Potion Of Decay II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["WITHER 1 168"] SPLASH_POTION_OF_DULLNESS_II: + Name: Splash Potion Of Dullness II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SLOW_DIGGING 1 1350"] SPLASH_POTION_OF_HASTE_II: + Name: Splash Potion Of Haste II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["FAST_DIGGING 1 1350"] SPLASH_POTION_OF_HUNGER_II: + Name: Splash Potion Of Hunger II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["HUNGER 1 337"] SPLASH_POTION_OF_NAUSEA_II: + Name: Splash Potion Of Nausea II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["CONFUSION 1 168"] SPLASH_POTION_OF_RESISTANCE_II: + Name: Splash Potion Of Resistance II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["DAMAGE_RESISTANCE 1 168"] SPLASH_POTION_OF_SATURATION_II: + Name: Splash Potion Of Saturation II Material: SPLASH_POTION PotionData: PotionType: UNCRAFTABLE @@ -1250,6 +1304,7 @@ Potions: PotionData: PotionType: LUCK LINGERING_POTION_OF_ABSORPTION: + Name: Lingering Potion Of Absorption Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1258,6 +1313,7 @@ Potions: REDSTONE: LINGERING_POTION_OF_ABSORPTION_EXTENDED GLOWSTONE_DUST: LINGERING_POTION_OF_ABSORPTION_II LINGERING_POTION_OF_BLINDNESS: + Name: Lingering Potion Of Blindness Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1266,6 +1322,7 @@ Potions: GLOWSTONE_DUST: LINGERING_POTION_OF_BLINDNESS_II REDSTONE: LINGERING_POTION_OF_BLINDNESS_EXTENDED LINGERING_POTION_OF_DECAY: + Name: Lingering Potion Of Decay Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1274,6 +1331,7 @@ Potions: REDSTONE: LINGERING_POTION_OF_DECAY_EXTENDED GLOWSTONE_DUST: LINGERING_POTION_OF_DECAY_II LINGERING_POTION_OF_DULLNESS: + Name: Lingering Potion Of Dullness Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1282,6 +1340,7 @@ Potions: GLOWSTONE_DUST: LINGERING_POTION_OF_DULLNESS_II REDSTONE: LINGERING_POTION_OF_DULLNESS_EXTENDED LINGERING_POTION_OF_HASTE: + Name: Lingering Potion Of Haste Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1290,6 +1349,7 @@ Potions: GLOWSTONE_DUST: LINGERING_POTION_OF_HASTE_II REDSTONE: LINGERING_POTION_OF_HASTE_EXTENDED LINGERING_POTION_OF_HUNGER: + Name: Lingering Potion Of Hunger Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1298,6 +1358,7 @@ Potions: REDSTONE: LINGERING_POTION_OF_HUNGER_EXTENDED GLOWSTONE_DUST: LINGERING_POTION_OF_HUNGER_II LINGERING_POTION_OF_NAUSEA: + Name: Lingering Potion Of Nausea Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1306,6 +1367,7 @@ Potions: GLOWSTONE_DUST: LINGERING_POTION_OF_NAUSEA_II REDSTONE: LINGERING_POTION_OF_NAUSEA_EXTENDED LINGERING_POTION_OF_RESISTANCE: + Name: Lingering Potion Of Resistance Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1314,6 +1376,7 @@ Potions: GLOWSTONE_DUST: LINGERING_POTION_OF_RESISTANCE_II REDSTONE: LINGERING_POTION_OF_RESISTANCE_EXTENDED LINGERING_POTION_OF_SATURATION: + Name: Lingering Potion Of Saturation Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE @@ -1322,91 +1385,109 @@ Potions: GLOWSTONE_DUST: LINGERING_POTION_OF_SATURATION_II REDSTONE: LINGERING_POTION_OF_SATURATION_EXTENDED LINGERING_POTION_OF_ABSORPTION_EXTENDED: + Name: Lingering Potion Of Absorption Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["ABSORPTION 0 900"] LINGERING_POTION_OF_BLINDNESS_EXTENDED: + Name: Lingering Potion Of Blindness Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["BLINDNESS 0 112"] LINGERING_POTION_OF_DECAY_EXTENDED: + Name: Lingering Potion Of Decay Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["WITHER 0 224"] LINGERING_POTION_OF_DULLNESS_EXTENDED: + Name: Lingering Potion Of Dullness Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SLOW_DIGGING 0 1800"] LINGERING_POTION_OF_HASTE_EXTENDED: + Name: Lingering Potion Of Haste Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["FAST_DIGGING 0 1800"] LINGERING_POTION_OF_HUNGER_EXTENDED: + Name: Lingering Potion Of Hunger Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["HUNGER 0 450"] LINGERING_POTION_OF_NAUSEA_EXTENDED: + Name: Lingering Potion Of Nausea Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["CONFUSION 0 224"] LINGERING_POTION_OF_RESISTANCE_EXTENDED: + Name: Lingering Potion Of Resistance Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["DAMAGE_RESISTANCE 0 224"] LINGERING_POTION_OF_SATURATION_EXTENDED: + Name: Lingering Potion Of Saturation Extended Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SATURATION 0 4"] LINGERING_POTION_OF_ABSORPTION_II: + Name: Lingering Potion Of Absorption II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["ABSORPTION 1 225"] LINGERING_POTION_OF_BLINDNESS_II: + Name: Lingering Potion Of Blindness II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["BLINDNESS 1 28"] LINGERING_POTION_OF_DECAY_II: + Name: Lingering Potion Of Decay II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["WITHER 1 56"] LINGERING_POTION_OF_DULLNESS_II: + Name: Lingering Potion Of Dullness II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["SLOW_DIGGING 1 450"] LINGERING_POTION_OF_HASTE_II: + Name: Lingering Potion Of Haste II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["FAST_DIGGING 1 450"] LINGERING_POTION_OF_HUNGER_II: + Name: Lingering Potion Of Hunger II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["HUNGER 1 112"] LINGERING_POTION_OF_NAUSEA_II: + Name: Lingering Potion Of Nausea II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["CONFUSION 1 56"] LINGERING_POTION_OF_RESISTANCE_II: + Name: Lingering Potion Of Resistance II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE Effects: ["DAMAGE_RESISTANCE 1 56"] LINGERING_POTION_OF_SATURATION_II: + Name: Lingering Potion Of Saturation II Material: LINGERING_POTION PotionData: PotionType: UNCRAFTABLE diff --git a/src/util/java/mcMMO/PotionConfigGenerator.java b/src/util/java/mcMMO/PotionConfigGenerator.java index 6121e733d..3e1a60a33 100644 --- a/src/util/java/mcMMO/PotionConfigGenerator.java +++ b/src/util/java/mcMMO/PotionConfigGenerator.java @@ -214,13 +214,14 @@ public class PotionConfigGenerator { }); for (WriteablePotion potion : sorted) { + System.out.println(" " + potion.name + ":"); Map children; if (vanillaPotions.containsKey(potion)) { children = vanillaPotions.get(potion); } else { + System.out.println(" Name: " + prettify(potion.name)); children = mcMMOPotions.get(potion); } - System.out.println(" " + potion.name + ":"); System.out.println(" Material: " + potion.mat.name()); System.out.println(" PotionData:"); System.out.println(" PotionType: " + potion.data.getType().name()); @@ -243,6 +244,32 @@ public class PotionConfigGenerator { } } + private static String prettify(String name) { + String[] substrings = name.split("_"); + String prettyString = ""; + int size = 1; + + for (String string : substrings) { + prettyString = prettyString.concat(getCapitalized(string)); + + if (size < substrings.length) { + prettyString = prettyString.concat(" "); + } + + size++; + } + + return prettyString; + } + + public static String getCapitalized(String target) { + if (target.equals("II")) { // hacks + return target; + } + return target.substring(0, 1).toUpperCase() + target.substring(1).toLowerCase(); + } + + private static String getName(PotionEffectType type) { switch (type.getId()) { case 1: