diff --git a/commons/src/main/java/net/swofty/commons/skyblock/item/ItemType.java b/commons/src/main/java/net/swofty/commons/skyblock/item/ItemType.java index 1adda1ffd..f22e3889b 100644 --- a/commons/src/main/java/net/swofty/commons/skyblock/item/ItemType.java +++ b/commons/src/main/java/net/swofty/commons/skyblock/item/ItemType.java @@ -582,7 +582,7 @@ public enum ItemType { PUMPKIN_BOOTS(Material.LEATHER_BOOTS, Rarity.COMMON), LAPIS_ARMOR_HELMET(Material.SEA_LANTERN, Rarity.UNCOMMON), LAPIS_ARMOR_CHESTPLATE(Material.LEATHER_CHESTPLATE, Rarity.UNCOMMON), - LAPIS_ARMOR_LEGGINGS(Material.SEA_LANTERN, Rarity.UNCOMMON), + LAPIS_ARMOR_LEGGINGS(Material.LEATHER_LEGGINGS, Rarity.UNCOMMON), LAPIS_ARMOR_BOOTS(Material.LEATHER_BOOTS, Rarity.UNCOMMON), MINER_ARMOR_HELMET(Material.IRON_HELMET, Rarity.RARE), MINER_ARMOR_CHESTPLATE(Material.IRON_CHESTPLATE, Rarity.RARE), @@ -665,41 +665,66 @@ public enum ItemType { /** * Mining Materials */ - ROUGH_AMBER_GEMSTONE(Material.PLAYER_HEAD, Rarity.COMMON), - ROUGH_TOPAZ_GEMSTONE(Material.PLAYER_HEAD, Rarity.COMMON), - ROUGH_SAPPHIRE_GEMSTONE(Material.PLAYER_HEAD, Rarity.COMMON), - ROUGH_AMETHYST_GEMSTONE(Material.PLAYER_HEAD, Rarity.COMMON), - ROUGH_JASPER_GEMSTONE(Material.PLAYER_HEAD, Rarity.COMMON), - ROUGH_RUBY_GEMSTONE(Material.PLAYER_HEAD, Rarity.COMMON), - ROUGH_JADE_GEMSTONE(Material.PLAYER_HEAD, Rarity.COMMON), - FLAWED_AMBER_GEMSTONE(Material.PLAYER_HEAD, Rarity.UNCOMMON), - FLAWED_TOPAZ_GEMSTONE(Material.PLAYER_HEAD, Rarity.UNCOMMON), - FLAWED_SAPPHIRE_GEMSTONE(Material.PLAYER_HEAD, Rarity.UNCOMMON), - FLAWED_AMETHYST_GEMSTONE(Material.PLAYER_HEAD, Rarity.UNCOMMON), - FLAWED_JASPER_GEMSTONE(Material.PLAYER_HEAD, Rarity.UNCOMMON), - FLAWED_RUBY_GEMSTONE(Material.PLAYER_HEAD, Rarity.UNCOMMON), - FLAWED_JADE_GEMSTONE(Material.PLAYER_HEAD, Rarity.UNCOMMON), - FINE_AMBER_GEMSTONE(Material.PLAYER_HEAD, Rarity.RARE), - FINE_TOPAZ_GEMSTONE(Material.PLAYER_HEAD, Rarity.RARE), - FINE_SAPPHIRE_GEMSTONE(Material.PLAYER_HEAD, Rarity.RARE), - FINE_AMETHYST_GEMSTONE(Material.PLAYER_HEAD, Rarity.RARE), - FINE_JASPER_GEMSTONE(Material.PLAYER_HEAD, Rarity.RARE), - FINE_RUBY_GEMSTONE(Material.PLAYER_HEAD, Rarity.RARE), - FINE_JADE_GEMSTONE(Material.PLAYER_HEAD, Rarity.RARE), - FLAWLESS_AMBER_GEMSTONE(Material.PLAYER_HEAD, Rarity.EPIC), - FLAWLESS_TOPAZ_GEMSTONE(Material.PLAYER_HEAD, Rarity.EPIC), - FLAWLESS_SAPPHIRE_GEMSTONE(Material.PLAYER_HEAD, Rarity.EPIC), - FLAWLESS_AMETHYST_GEMSTONE(Material.PLAYER_HEAD, Rarity.EPIC), - FLAWLESS_JASPER_GEMSTONE(Material.PLAYER_HEAD, Rarity.EPIC), - FLAWLESS_RUBY_GEMSTONE(Material.PLAYER_HEAD, Rarity.EPIC), - FLAWLESS_JADE_GEMSTONE(Material.PLAYER_HEAD, Rarity.EPIC), - PERFECT_AMBER_GEMSTONE(Material.PLAYER_HEAD, Rarity.LEGENDARY), - PERFECT_TOPAZ_GEMSTONE(Material.PLAYER_HEAD, Rarity.LEGENDARY), - PERFECT_SAPPHIRE_GEMSTONE(Material.PLAYER_HEAD, Rarity.LEGENDARY), - PERFECT_AMETHYST_GEMSTONE(Material.PLAYER_HEAD, Rarity.LEGENDARY), - PERFECT_JASPER_GEMSTONE(Material.PLAYER_HEAD, Rarity.LEGENDARY), - PERFECT_RUBY_GEMSTONE(Material.PLAYER_HEAD, Rarity.LEGENDARY), - PERFECT_JADE_GEMSTONE(Material.PLAYER_HEAD, Rarity.LEGENDARY), + ROUGH_AMBER_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_TOPAZ_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_SAPPHIRE_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_AMETHYST_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_JASPER_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_RUBY_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_JADE_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_OPAL_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_AQUAMARINE_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_CITRINE_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_PERIDOT_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + ROUGH_ONYX_GEM(Material.PLAYER_HEAD, Rarity.COMMON), + FLAWED_AMBER_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_TOPAZ_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_SAPPHIRE_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_AMETHYST_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_JASPER_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_RUBY_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_JADE_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_OPAL_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_AQUAMARINE_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_CITRINE_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_PERIDOT_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FLAWED_ONYX_GEM(Material.PLAYER_HEAD, Rarity.UNCOMMON), + FINE_AMBER_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_TOPAZ_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_SAPPHIRE_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_AMETHYST_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_JASPER_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_RUBY_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_JADE_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_OPAL_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_AQUAMARINE_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_CITRINE_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_PERIDOT_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FINE_ONYX_GEM(Material.PLAYER_HEAD, Rarity.RARE), + FLAWLESS_AMBER_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_TOPAZ_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_SAPPHIRE_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_AMETHYST_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_JASPER_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_RUBY_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_JADE_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_OPAL_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_AQUAMARINE_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_CITRINE_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_PERIDOT_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + FLAWLESS_ONYX_GEM(Material.PLAYER_HEAD, Rarity.EPIC), + PERFECT_AMBER_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_TOPAZ_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_SAPPHIRE_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_AMETHYST_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_JASPER_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_RUBY_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_JADE_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_OPAL_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_AQUAMARINE_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_CITRINE_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_PERIDOT_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), + PERFECT_ONYX_GEM(Material.PLAYER_HEAD, Rarity.LEGENDARY), HARD_STONE(Material.STONE, Rarity.COMMON), ENCHANTED_HARD_STONE(Material.STONE, Rarity.UNCOMMON), MITHRIL(Material.PRISMARINE_CRYSTALS, Rarity.COMMON), diff --git a/commons/src/main/java/net/swofty/commons/skyblock/item/Rarity.java b/commons/src/main/java/net/swofty/commons/skyblock/item/Rarity.java index 709210f0a..365004700 100644 --- a/commons/src/main/java/net/swofty/commons/skyblock/item/Rarity.java +++ b/commons/src/main/java/net/swofty/commons/skyblock/item/Rarity.java @@ -12,6 +12,7 @@ public enum Rarity { EPIC("§5"), LEGENDARY("§6"), MYTHIC("§d"), + DIVINE("§b"), SPECIAL("§c", false), VERY_SPECIAL("§c", false), ADMIN("§4", false), diff --git a/commons/src/main/java/net/swofty/commons/skyblock/statistics/ItemStatistic.java b/commons/src/main/java/net/swofty/commons/skyblock/statistics/ItemStatistic.java index ab335be25..a4403121d 100644 --- a/commons/src/main/java/net/swofty/commons/skyblock/statistics/ItemStatistic.java +++ b/commons/src/main/java/net/swofty/commons/skyblock/statistics/ItemStatistic.java @@ -20,7 +20,7 @@ public enum ItemStatistic { ABILITY_DAMAGE("Ability Damage", "§c", "§c", true, "๑"), TRUE_DEFENSE("True Defense", "§a", "§f", false, "❂"), FEROCITY("Ferocity", "§a", "§c", false, "⫽"), - HEALTH_REGEN("Health Regen", "§a", "§c", + HEALTH_REGENERATION("Health Regen", "§a", "§c", false, "❣", 100D, 1D), VITALITY("Vitality", "§a", "§4", false, "♨", 100D, 1D), diff --git a/configuration/skyblock/collections/mining.yml b/configuration/skyblock/collections/mining.yml index a97aaeb25..b0cdfe66b 100644 --- a/configuration/skyblock/collections/mining.yml +++ b/configuration/skyblock/collections/mining.yml @@ -702,7 +702,7 @@ collections: - type: XP data: xp: 4 -- itemType: FINE_JASPER_GEMSTONE +- itemType: FINE_JASPER_GEM rewards: - amount: 100 rewards: @@ -716,10 +716,10 @@ collections: xp: 4 - type: SPECIAL_UNLOCK data: - unlockedItemType: FLAWED_RUBY_GEMSTONE + unlockedItemType: FLAWED_RUBY_GEM isEnchantedRecipe: true recipeType: MINING - craftingMaterial: ROUGH_RUBY_GEMSTONE + craftingMaterial: ROUGH_RUBY_GEM - amount: 1000 rewards: - type: XP @@ -737,10 +737,10 @@ collections: xp: 4 - type: SPECIAL_UNLOCK data: - unlockedItemType: FINE_RUBY_GEMSTONE + unlockedItemType: FINE_RUBY_GEM isEnchantedRecipe: true recipeType: MINING - craftingMaterial: FLAWED_RUBY_GEMSTONE + craftingMaterial: FLAWED_RUBY_GEM - amount: 25000 rewards: - type: XP @@ -763,10 +763,10 @@ collections: xp: 4 - type: SPECIAL_UNLOCK data: - unlockedItemType: FLAWLESS_RUBY_GEMSTONE + unlockedItemType: FLAWLESS_RUBY_GEM isEnchantedRecipe: true recipeType: MINING - craftingMaterial: FINE_RUBY_GEMSTONE + craftingMaterial: FINE_RUBY_GEM - amount: 1000000 rewards: - type: XP diff --git a/configuration/skyblock/items/armor/lapis.yml b/configuration/skyblock/items/armor/lapis.yml index ab0cb7e74..daa9fe631 100644 --- a/configuration/skyblock/items/armor/lapis.yml +++ b/configuration/skyblock/items/armor/lapis.yml @@ -1,5 +1,5 @@ items: - - id: LAPIS_HELMET + - id: LAPIS_ARMOR_HELMET rarity: COMMON default_statistics: defense: 25 @@ -15,11 +15,13 @@ items: g: '121' b: '100' - id: SELLABLE - value: 1000.0 + value: 1000 - id: TRACKED_UNIQUE - id: MUSEUM museum_category: ARMOR_SETS - - id: LAPIS_CHESTPLATE + game_stage: AMATEUR + donation_xp: 3 + - id: LAPIS_ARMOR_CHESTPLATE rarity: COMMON default_statistics: defense: 40 @@ -31,15 +33,17 @@ items: - id: STANDARD_ITEM standard_item_type: CHESTPLATE - id: LEATHER_COLOR - r: '122' - g: '121' - b: '100' + r: '0' + g: '0' + b: '255' - id: SELLABLE - value: 2000.0 + value: 2000 - id: TRACKED_UNIQUE - id: MUSEUM museum_category: ARMOR_SETS - - id: LAPIS_LEGGINGS + game_stage: AMATEUR + donation_xp: 3 + - id: LAPIS_ARMOR_LEGGINGS rarity: COMMON default_statistics: defense: 35 @@ -51,15 +55,17 @@ items: - id: STANDARD_ITEM standard_item_type: LEGGINGS - id: LEATHER_COLOR - r: '122' - g: '121' - b: '100' + r: '0' + g: '0' + b: '255' - id: SELLABLE - value: 1750.0 + value: 1750 - id: TRACKED_UNIQUE - id: MUSEUM museum_category: ARMOR_SETS - - id: LAPIS_BOOTS + game_stage: AMATEUR + donation_xp: 3 + - id: LAPIS_ARMOR_BOOTS rarity: COMMON default_statistics: defense: 20 @@ -71,11 +77,13 @@ items: - id: STANDARD_ITEM standard_item_type: BOOTS - id: LEATHER_COLOR - r: '122' - g: '121' - b: '100' + r: '0' + g: '0' + b: '255' - id: SELLABLE - value: 1000.0 + value: 1000 - id: TRACKED_UNIQUE - id: MUSEUM museum_category: ARMOR_SETS + game_stage: AMATEUR + donation_xp: 3 diff --git a/configuration/skyblock/items/armor/mineroutfit.yml b/configuration/skyblock/items/armor/prospecting.yml similarity index 52% rename from configuration/skyblock/items/armor/mineroutfit.yml rename to configuration/skyblock/items/armor/prospecting.yml index a88a7f56c..9451cf32c 100644 --- a/configuration/skyblock/items/armor/mineroutfit.yml +++ b/configuration/skyblock/items/armor/prospecting.yml @@ -1,73 +1,92 @@ items: - - id: MINERS_OUTFIT_BOOTS - rarity: COMMON + - id: MINER_OUTFIT_HELMET + material: LEATHER_HELMET + rarity: UNCOMMON default_statistics: - defense: 15.0 + defense: 15 + mining_speed: 15 components: - id: CUSTOM_DISPLAY_NAME - display_name: Miner's Outfit Boots + display_name: Prospecting Helmet - id: STANDARD_ITEM - standard_item_type: BOOTS + standard_item_type: HELMET + - id: SELLABLE + value: 400 + - id: MUSEUM + museum_category: ARMOR_SETS + game_stage: STARTER + donation_xp: 3 - id: LEATHER_COLOR r: '122' g: '121' b: '100' - - id: SELLABLE - value: 320.0 - - id: TRACKED_UNIQUE - - id: MUSEUM - museum_category: ARMOR_SETS - - id: MINERS_OUTFIT_CHESTPLATE - rarity: COMMON + - id: NOT_FINISHED_YET + + - id: MINER_OUTFIT_CHESTPLATE + material: LEATHER_CHESTPLATE + rarity: UNCOMMON default_statistics: - defense: 40.0 + defense: 40 + mining_speed: 15 components: - id: CUSTOM_DISPLAY_NAME - display_name: Miner's Outfit Chestplate + display_name: Prospecting Chestplate - id: STANDARD_ITEM standard_item_type: CHESTPLATE + - id: SELLABLE + value: 640 + - id: MUSEUM + museum_category: ARMOR_SETS + game_stage: STARTER + donation_xp: 3 - id: LEATHER_COLOR r: '122' g: '121' b: '100' - - id: SELLABLE - value: 640.0 - - id: TRACKED_UNIQUE - - id: MUSEUM - museum_category: ARMOR_SETS - - id: MINERS_OUTFIT_HELMET - rarity: COMMON + - id: NOT_FINISHED_YET + + - id: MINER_OUTFIT_LEGGINGS + material: LEATHER_LEGGINGS + rarity: UNCOMMON default_statistics: - defense: 15.0 + defense: 30 + mining_speed: 15 components: - id: CUSTOM_DISPLAY_NAME - display_name: Miner's Outfit Helmet + display_name: Prospecting Leggings - id: STANDARD_ITEM - standard_item_type: HELMET + standard_item_type: LEGGINGS + - id: SELLABLE + value: 560 + - id: MUSEUM + museum_category: ARMOR_SETS + game_stage: STARTER + donation_xp: 3 - id: LEATHER_COLOR r: '122' g: '121' b: '100' - - id: SELLABLE - value: 400.0 - - id: TRACKED_UNIQUE - - id: MUSEUM - museum_category: ARMOR_SETS - - id: MINERS_OUTFIT_LEGGINGS - rarity: COMMON + - id: NOT_FINISHED_YET + + - id: MINER_OUTFIT_BOOTS + material: LEATHER_BOOTS + rarity: UNCOMMON default_statistics: - defense: 30.0 + defense: 15 + mining_speed: 15 components: - id: CUSTOM_DISPLAY_NAME - display_name: Miner's Outfit Leggings + display_name: Prospecting Boots - id: STANDARD_ITEM - standard_item_type: LEGGINGS + standard_item_type: BOOTS + - id: SELLABLE + value: 320 + - id: MUSEUM + museum_category: ARMOR_SETS + game_stage: STARTER + donation_xp: 3 - id: LEATHER_COLOR r: '122' g: '121' b: '100' - - id: SELLABLE - value: 560.0 - - id: TRACKED_UNIQUE - - id: MUSEUM - museum_category: ARMOR_SETS + - id: NOT_FINISHED_YET \ No newline at end of file diff --git a/configuration/skyblock/items/armor/thepark.yml b/configuration/skyblock/items/armor/thepark.yml index 4c8d6058b..098f84cdc 100644 --- a/configuration/skyblock/items/armor/thepark.yml +++ b/configuration/skyblock/items/armor/thepark.yml @@ -1,25 +1,29 @@ items: - id: MELODY_SHOES + material: LEATHER_BOOTS rarity: COMMON default_statistics: - health: 90 defense: 20 + health: 90 foraging_fortune: 6 components: - id: CUSTOM_DISPLAY_NAME display_name: Melody's Shoes - id: STANDARD_ITEM standard_item_type: BOOTS + - id: DEFAULT_SOULBOUND + coop_allowed: false + - id: MUSEUM + museum_category: ARMOR_SETS + game_stage: STARTER + donation_xp: 1 - id: LEATHER_COLOR r: '141' g: '53' b: '146' - - id: TRACKED_UNIQUE - - id: DEFAULT_SOULBOUND - coop_allowed: true - - id: MUSEUM - museum_category: ARMOR_SETS + - id: CHARLIE_TROUSERS + material: LEATHER_LEGGINGS rarity: COMMON default_statistics: defense: 15 @@ -29,51 +33,56 @@ items: - id: CUSTOM_DISPLAY_NAME display_name: Charlie's Trousers - id: STANDARD_ITEM - standard_item_type: HELMET + standard_item_type: LEGGINGS + - id: DEFAULT_SOULBOUND + coop_allowed: false + - id: MUSEUM + museum_category: ARMOR_SETS + game_stage: STARTER + donation_xp: 1 - id: LEATHER_COLOR r: '246' g: '222' b: '81' - - id: TRACKED_UNIQUE - - id: MUSEUM - museum_category: ARMOR_SETS - - id: DEFAULT_SOULBOUND - coop_allowed: true + - id: KELLY_TSHIRT + material: LEATHER_CHESTPLATE rarity: COMMON default_statistics: - health: 100 defense: 30 + health: 100 foraging_fortune: 6 components: - id: CUSTOM_DISPLAY_NAME display_name: Kelly's T-Shirt - id: STANDARD_ITEM - standard_item_type: HELMET + standard_item_type: CHESTPLATE + - id: DEFAULT_SOULBOUND + coop_allowed: false + - id: MUSEUM + museum_category: ARMOR_SETS + game_stage: STARTER + donation_xp: 1 - id: LEATHER_COLOR r: '255' g: '255' b: '255' - - id: TRACKED_UNIQUE - - id: MUSEUM - museum_category: ARMOR_SETS - - id: DEFAULT_SOULBOUND - coop_allowed: true + - id: MOLE_HAT + material: PLAYER_HEAD rarity: COMMON default_statistics: - health: 35 defense: 10 + health: 35 foraging_fortune: 6 components: - id: CUSTOM_DISPLAY_NAME display_name: Mole Hat - - id: STANDARD_ITEM - standard_item_type: HELMET - id: SKULL_HEAD texture: f20783e2743b8976b00f827ee283675d7911140c98284239f6bc1c8dd1d27c81 - - id: TRACKED_UNIQUE + - id: DEFAULT_SOULBOUND + coop_allowed: false - id: MUSEUM museum_category: ARMOR_SETS - - id: DEFAULT_SOULBOUND - coop_allowed: true \ No newline at end of file + game_stage: STARTER + donation_xp: 1 \ No newline at end of file diff --git a/configuration/skyblock/items/combat/craftable.yml b/configuration/skyblock/items/combat/craftable.yml index 25b8b7626..d4821bbe8 100644 --- a/configuration/skyblock/items/combat/craftable.yml +++ b/configuration/skyblock/items/combat/craftable.yml @@ -29,9 +29,18 @@ items: - id: STANDARD_ITEM standard_item_type: SWORD - id: GEMSTONE - gemstones: - - JASPER:50000 - - COMBAT:100000 + gemstone_slots: + - gemstone: JASPER + coins: 50000 + items: + - FINE_JASPER_GEM:20 + - gemstone: COMBAT + coins: 100000 + items: + - FINE_JASPER_GEM:40 + - FINE_SAPPHIRE_GEM:40 + - FINE_RUBY_GEM:40 + - FINE_AMETHYST_GEM:40 - id: NOT_FINISHED_YET - id: CRYSTALLIZED_HEART rarity: COMMON @@ -95,8 +104,11 @@ items: - id: STANDARD_ITEM standard_item_type: SWORD - id: GEMSTONE - gemstones: - - JASPER:50000 + gemstone_slots: + - gemstone: JASPER + coins: 50000 + items: + - FINE_JASPER_GEM:20 - id: NOT_FINISHED_YET - id: REAPER_MASK rarity: COMMON @@ -135,9 +147,13 @@ items: type: REAPER_MASK amount: 1 - id: GEMSTONE - gemstones: - - RUBY:0 - - SAPPHIRE:50000 + gemstone_slots: + - gemstone: RUBY + coins: 50000 + - gemstone: SAPPHIRE + coins: 50000 + items: + - FINE_SAPPHIRE_GEM:20 - id: TRACKED_UNIQUE - id: STANDARD_ITEM standard_item_type: HELMET @@ -237,8 +253,9 @@ items: - id: STANDARD_ITEM standard_item_type: HELMET - id: GEMSTONE - gemstones: - - RUBY:0 + gemstone_slots: + - gemstone: RUBY + coins: 50000 - id: NOT_FINISHED_YET - id: WARDEN_HELMET rarity: COMMON diff --git a/configuration/skyblock/items/darkauction.yml b/configuration/skyblock/items/darkauction.yml index 57190b849..ae09d75be 100644 --- a/configuration/skyblock/items/darkauction.yml +++ b/configuration/skyblock/items/darkauction.yml @@ -30,10 +30,23 @@ items: standard_item_type: SWORD - id: MUSEUM museum_category: WEAPONS + game_stage: EXPERT + donation_xp: 6 + mapped_item_ids: + - STARRED_MIDAS_SWORD - id: GEMSTONE - gemstones: - - "COMBAT:50000" - - "COMBAT:100000" + gemstone_slots: + - gemstone: JASPER + coins: 50000 + items: + - FINE_JASPER_GEM:20 + - gemstone: COMBAT + coins: 100000 + items: + - FINE_JASPER_GEM:40 + - FINE_SAPPHIRE_GEM:40 + - FINE_RUBY_GEM:40 + - FINE_AMETHYST_GEM:40 - id: LORE_UPDATE handler_id: MIDAS_SWORD is_absolute: false diff --git a/configuration/skyblock/items/mining/fine.yml b/configuration/skyblock/items/mining/fine.yml index 1d708d509..ccc84474a 100644 --- a/configuration/skyblock/items/mining/fine.yml +++ b/configuration/skyblock/items/mining/fine.yml @@ -1,6 +1,6 @@ items: - - id: FINE_AMBER_GEMSTONE - rarity: FINE + - id: FINE_AMBER_GEM + rarity: RARE components: - id: GEMSTONE_IMPL rarity: FINE @@ -8,8 +8,11 @@ items: skull_texture: 4b1cce22de19ed6727abc5e6c2d57864c871a44c956bbe2eb3960269b686b8b3 - id: SELLABLE value: 19200.0 - - id: FINE_AMETHYST_GEMSTONE - rarity: FINE + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Amber Gemstone + + - id: FINE_AMETHYST_GEM + rarity: RARE components: - id: GEMSTONE_IMPL rarity: FINE @@ -17,8 +20,11 @@ items: skull_texture: 7a1ee5ffce04eb7da592d42414ff35e1bf38194d6b82e310dbc6261b47fb9c91 - id: SELLABLE value: 19200.0 - - id: FINE_JADE_GEMSTONE - rarity: FINE + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Amethyst Gemstone + + - id: FINE_JADE_GEM + rarity: RARE components: - id: GEMSTONE_IMPL rarity: FINE @@ -26,8 +32,11 @@ items: skull_texture: b28f1c0c5092e12d33770df45c5845a9610886039b34abe93a16c5e942dfc8e4 - id: SELLABLE value: 19200.0 - - id: FINE_JASPER_GEMSTONE - rarity: FINE + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Jade Gemstone + + - id: FINE_JASPER_GEM + rarity: RARE components: - id: GEMSTONE_IMPL rarity: FINE @@ -35,8 +44,11 @@ items: skull_texture: aac15f6fcf2ce963ef4ca71f1a8685adb97eb769e1d11194cbbd2e964a88978c - id: SELLABLE value: 19200.0 - - id: FINE_RUBY_GEMSTONE - rarity: FINE + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Jasper Gemstone + + - id: FINE_RUBY_GEM + rarity: RARE components: - id: GEMSTONE_IMPL rarity: FINE @@ -44,8 +56,11 @@ items: skull_texture: e672959028f274b379d430f068f0f15a4f793eac12afb94ae0b4e50cf895df0f - id: SELLABLE value: 19200.0 - - id: FINE_SAPPHIRE_GEMSTONE - rarity: FINE + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Ruby Gemstone + + - id: FINE_SAPPHIRE_GEM + rarity: RARE components: - id: GEMSTONE_IMPL rarity: FINE @@ -53,8 +68,11 @@ items: skull_texture: 36161daa3589ec9c8187459ac36fd4dd2646c040678d3bfacb72a2210c6c801c - id: SELLABLE value: 19200.0 - - id: FINE_TOPAZ_GEMSTONE - rarity: FINE + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Sapphire Gemstone + + - id: FINE_TOPAZ_GEM + rarity: RARE components: - id: GEMSTONE_IMPL rarity: FINE @@ -62,3 +80,65 @@ items: skull_texture: 92cb6e51c461e7359526bea5e06209cddde7c6469a819f3405cf0a038c159502 - id: SELLABLE value: 19200.0 + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Topaz Gemstone + + - id: FINE_OPAL_GEM + rarity: RARE + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Opal Gemstone + - id: SELLABLE + value: 19200 + - id: GEMSTONE_IMPL + rarity: FINE + gemstone: OPAL + skull_texture: ad798e20a47d251a9e33d40332973c7189ac1550760ba25c4b956c9159364568 + + - id: FINE_AQUAMARINE_GEM + rarity: RARE + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Aquamarine Gemstone + - id: SELLABLE + value: 25600 + - id: GEMSTONE_IMPL + rarity: FINE + gemstone: AQUAMARINE + skull_texture: 2b822b9dc70b9ca20008c332f481cbebb52bd50669ca98a89fd33d1345fa10f2 + + - id: FINE_CITRINE_GEM + rarity: RARE + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Citrine Gemstone + - id: SELLABLE + value: 25600 + - id: GEMSTONE_IMPL + rarity: FINE + gemstone: CITRINE + skull_texture: ec0ab9c9f35a1bf44de18a0db2aa0ed2ebe8b9faa820307da3638f36a8306536 + + - id: FINE_ONYX_GEM + rarity: RARE + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Onyx Gemstone + - id: SELLABLE + value: 25600 + - id: GEMSTONE_IMPL + rarity: FINE + gemstone: ONYX + skull_texture: 787a326331fe27f7ee074f97727604c495f95c378121302e879e1f40ba4d20a8 + + - id: FINE_PERIDOT_GEM + rarity: RARE + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Fine Peridot Gemstone + - id: SELLABLE + value: 25600 + - id: GEMSTONE_IMPL + rarity: FINE + gemstone: PERIDOT + skull_texture: fcba7aefc1c4f412868739e2f2c2e651edeb1be25d3c7175e68a05b67506a1ed diff --git a/configuration/skyblock/items/mining/flawed.yml b/configuration/skyblock/items/mining/flawed.yml index 148216803..2968774cd 100644 --- a/configuration/skyblock/items/mining/flawed.yml +++ b/configuration/skyblock/items/mining/flawed.yml @@ -1,6 +1,6 @@ items: - - id: FLAWED_AMBER_GEMSTONE - rarity: FLAWED + - id: FLAWED_AMBER_GEM + rarity: UNCOMMON components: - id: GEMSTONE_IMPL rarity: FLAWED @@ -8,8 +8,11 @@ items: skull_texture: 173bcfc39eb85df1848535985214060a1bd1b3bb47defe4201476edc31671744 - id: SELLABLE value: 240.0 - - id: FLAWED_AMETHYST_GEMSTONE - rarity: FLAWED + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Amber Gemstone + + - id: FLAWED_AMETHYST_GEM + rarity: UNCOMMON components: - id: GEMSTONE_IMPL rarity: FLAWED @@ -17,8 +20,11 @@ items: skull_texture: 71db59260895578d37e59505880602de940b088e5fff8da3e65201d739c86e84 - id: SELLABLE value: 240.0 - - id: FLAWED_JADE_GEMSTONE - rarity: FLAWED + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Amethyst Gemstone + + - id: FLAWED_JADE_GEM + rarity: UNCOMMON components: - id: GEMSTONE_IMPL rarity: FLAWED @@ -26,8 +32,11 @@ items: skull_texture: 82282c6bb8343e0f0d61ee0747dada75344f332e9ff0acaa3adcdf09321d3dd - id: SELLABLE value: 240.0 - - id: FLAWED_JASPER_GEMSTONE - rarity: FLAWED + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Jade Gemstone + + - id: FLAWED_JASPER_GEM + rarity: UNCOMMON components: - id: GEMSTONE_IMPL rarity: FLAWED @@ -35,8 +44,11 @@ items: skull_texture: a73511e504c316b139edb35febe73ef591c0f455e8caf9ee353bc12b6c14a922 - id: SELLABLE value: 240.0 - - id: FLAWED_RUBY_GEMSTONE - rarity: FLAWED + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Jasper Gemstone + + - id: FLAWED_RUBY_GEM + rarity: UNCOMMON components: - id: GEMSTONE_IMPL rarity: FLAWED @@ -44,8 +56,11 @@ items: skull_texture: 46d81068cbdf4a364231a26453d6cd660a0095f9cd8795307c5be667427712e - id: SELLABLE value: 240.0 - - id: FLAWED_SAPPHIRE_GEMSTONE - rarity: FLAWED + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Ruby Gemstone + + - id: FLAWED_SAPPHIRE_GEM + rarity: UNCOMMON components: - id: GEMSTONE_IMPL rarity: FLAWED @@ -53,8 +68,11 @@ items: skull_texture: 8a0af99e8d8703194a847a55268cf5ef4ac4eb3b24c0ed86551339d10b646529 - id: SELLABLE value: 240.0 - - id: FLAWED_TOPAZ_GEMSTONE - rarity: FLAWED + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Sapphire Gemstone + + - id: FLAWED_TOPAZ_GEM + rarity: UNCOMMON components: - id: GEMSTONE_IMPL rarity: FLAWED @@ -62,3 +80,65 @@ items: skull_texture: b6392773d114be30aeb3c09c90cbe691ffeaceb399b530fe6fb53ddc0ced3714 - id: SELLABLE value: 240.0 + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Topaz Gemstone + + - id: FLAWED_OPAL_GEM + rarity: UNCOMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Opal Gemstone + - id: SELLABLE + value: 240 + - id: GEMSTONE_IMPL + rarity: FLAWED + gemstone: OPAL + skull_texture: eadc3bcdd7c701b63f8b8b4a96e429316a08388669d9a98c1a98791729b961df + + - id: FLAWED_AQUAMARINE_GEM + rarity: UNCOMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Aquamarine Gemstone + - id: SELLABLE + value: 320 + - id: GEMSTONE_IMPL + rarity: FLAWED + gemstone: AQUAMARINE + skull_texture: e4166254ac8b324c1b78eadc7c249866c6742c17586a33aea6a89fe346b2acf0 + + - id: FLAWED_CITRINE_GEM + rarity: UNCOMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Citrine Gemstone + - id: SELLABLE + value: 320 + - id: GEMSTONE_IMPL + rarity: FLAWED + gemstone: CITRINE + skull_texture: dc0b8433579f480adc685748b2bf2eccc69221137f704bbb922614191f801b26 + + - id: FLAWED_ONYX_GEM + rarity: UNCOMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Onyx Gemstone + - id: SELLABLE + value: 320 + - id: GEMSTONE_IMPL + rarity: FLAWED + gemstone: ONYX + skull_texture: 352a91f44bcbc78d4c9d045e941a23f7bdb4d99609e60bdcec842396feb315a7 + + - id: FLAWED_PERIDOT_GEM + rarity: UNCOMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawed Peridot Gemstone + - id: SELLABLE + value: 320 + - id: GEMSTONE_IMPL + rarity: FLAWED + gemstone: PERIDOT + skull_texture: 75da734e63aa22116e64703bb33271c4fbc3d1332a6a60c24af49b804193bf46 diff --git a/configuration/skyblock/items/mining/flawless.yml b/configuration/skyblock/items/mining/flawless.yml index 669453e04..186f04921 100644 --- a/configuration/skyblock/items/mining/flawless.yml +++ b/configuration/skyblock/items/mining/flawless.yml @@ -1,57 +1,132 @@ items: - - id: FLAWLESS_AMBER_GEMSTONE - rarity: FLAWLESS + - id: FLAWLESS_AMBER_GEM + rarity: EPIC components: - id: GEMSTONE_IMPL rarity: FLAWLESS gemstone: AMBER skull_texture: 9dce62f70ac046b881113c6cf862987727774e265885501c9a245b180db08c0d - id: TRACKED_UNIQUE - - id: FLAWLESS_AMETHYST_GEMSTONE - rarity: FLAWLESS + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Amber Gemstone + + - id: FLAWLESS_AMETHYST_GEM + rarity: EPIC components: - id: GEMSTONE_IMPL rarity: FLAWLESS gemstone: AMETHYST skull_texture: d3623521c8111ad29e9dcf7acc56085a9ab07da732d1518976aee61d0b3e3bd6 - id: TRACKED_UNIQUE - - id: FLAWLESS_JADE_GEMSTONE - rarity: FLAWLESS + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Amethyst Gemstone + + - id: FLAWLESS_JADE_GEM + rarity: EPIC components: - id: GEMSTONE_IMPL rarity: FLAWLESS gemstone: JADE skull_texture: d3623521c8111ad29e9dcf7acc56085a9ab07da732d1518976aee61d0b3e3bd6 - id: TRACKED_UNIQUE - - id: FLAWLESS_JASPER_GEMSTONE - rarity: FLAWLESS + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Jade Gemstone + + - id: FLAWLESS_JASPER_GEM + rarity: EPIC components: - id: GEMSTONE_IMPL rarity: FLAWLESS gemstone: JASPER skull_texture: ff993d3a43d40597b474485976160d0cf52ac64d157307d3b1c941db224d0ac6 - id: TRACKED_UNIQUE - - id: FLAWLESS_RUBY_GEMSTONE - rarity: FLAWLESS + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Jasper Gemstone + + - id: FLAWLESS_RUBY_GEM + rarity: EPIC components: - id: GEMSTONE_IMPL rarity: FLAWLESS gemstone: RUBY skull_texture: 926a248fbbc06cf06e2c920eca1cac8a2c96164d3260494bed142d553026cc6 - id: TRACKED_UNIQUE - - id: FLAWLESS_SAPPHIRE_GEMSTONE - rarity: FLAWLESS + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Ruby Gemstone + + - id: FLAWLESS_SAPPHIRE_GEM + rarity: EPIC components: - id: GEMSTONE_IMPL rarity: FLAWLESS gemstone: SAPPHIRE skull_texture: 957cfa9c75ba584645ee2af6d9867d767ddea4667cdfc72dc1061dd1975ca7d0 - id: TRACKED_UNIQUE - - id: FLAWLESS_TOPAZ_GEMSTONE - rarity: FLAWLESS + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Sapphire Gemstone + + - id: FLAWLESS_TOPAZ_GEM + rarity: EPIC components: - id: GEMSTONE_IMPL rarity: FLAWLESS gemstone: TOPAZ skull_texture: d10964f3c479ad7d9afaf68a42cab7c107d2d884f575cae2f070ec6f935b3be - id: TRACKED_UNIQUE + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Topaz Gemstone + + - id: FLAWLESS_OPAL_GEM + rarity: EPIC + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Opal Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: FLAWLESS + gemstone: OPAL + skull_texture: 5d15ed70e720040ad7311e69359dfdf5e114eadd2a4c1f971a9501341a45264b + + - id: FLAWLESS_AQUAMARINE_GEM + rarity: EPIC + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Aquamarine Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: FLAWLESS + gemstone: AQUAMARINE + skull_texture: d37699bdf8cb43eff147d9ce19b14802f9bc88a21e63ad28b669530e8a3c0b57 + + - id: FLAWLESS_CITRINE_GEM + rarity: EPIC + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Citrine Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: FLAWLESS + gemstone: CITRINE + skull_texture: f06b4f63d3d3a39c98565af4858a5135be774ad672eb236bb65adfc8cb3425e8 + + - id: FLAWLESS_ONYX_GEM + rarity: EPIC + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Onyx Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: FLAWLESS + gemstone: ONYX + skull_texture: 1ca9b2841f71ba6fc4d6d2e97e80c1801f36ca3958e5a9a81a4f8785f6434367 + + - id: FLAWLESS_PERIDOT_GEM + rarity: EPIC + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Flawless Peridot Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: FLAWLESS + gemstone: PERIDOT + skull_texture: 1884a8dcb7128341ce09cb3616c11c3e46f80d083a6f2dbb4dbe0bb932318b09 diff --git a/configuration/skyblock/items/mining/perfect.yml b/configuration/skyblock/items/mining/perfect.yml index f5f9afb19..32737a504 100644 --- a/configuration/skyblock/items/mining/perfect.yml +++ b/configuration/skyblock/items/mining/perfect.yml @@ -1,57 +1,132 @@ items: - - id: PERFECT_AMBER_GEMSTONE - rarity: PERFECT + - id: PERFECT_AMBER_GEM + rarity: LEGENDARY components: - id: GEMSTONE_IMPL rarity: PERFECT gemstone: AMBER skull_texture: 37ae236cdec3f2a6f51eae15e2c8f6228b34f137da1569fec9e803f9cd81759d - id: TRACKED_UNIQUE - - id: PERFECT_AMETHYST_GEMSTONE - rarity: PERFECT + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Amber Gemstone + + - id: PERFECT_AMETHYST_GEM + rarity: LEGENDARY components: - id: GEMSTONE_IMPL rarity: PERFECT gemstone: AMETHYST skull_texture: d886e0f41185b18a3afd89488d2ee4caa0735009247cccf039ced6aed752ff1a - id: TRACKED_UNIQUE - - id: PERFECT_JADE_GEMSTONE - rarity: PERFECT + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Amethyst Gemstone + + - id: PERFECT_JADE_GEM + rarity: LEGENDARY components: - id: GEMSTONE_IMPL rarity: PERFECT gemstone: JADE skull_texture: 3fced7977382bf71d4ee17ff5b919e0eb7972083c4cccfa175c8753ae40ba006 - id: TRACKED_UNIQUE - - id: PERFECT_JASPER_GEMSTONE - rarity: PERFECT + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Jade Gemstone + + - id: PERFECT_JASPER_GEM + rarity: LEGENDARY components: - id: GEMSTONE_IMPL rarity: PERFECT gemstone: JASPER skull_texture: 263f991b8e038e46b8ed7632f44ca2e30c15f42977070a8c8d8728e3fc04fc7c - id: TRACKED_UNIQUE - - id: PERFECT_RUBY_GEMSTONE - rarity: PERFECT + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Jasper Gemstone + + - id: PERFECT_RUBY_GEM + rarity: LEGENDARY components: - id: GEMSTONE_IMPL rarity: PERFECT gemstone: RUBY skull_texture: 39b6e047d3b2bca85e8cc49e5480f9774d8a0eafe6dfa9559530590283715142 - id: TRACKED_UNIQUE - - id: PERFECT_SAPPHIRE_GEMSTONE - rarity: PERFECT + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Ruby Gemstone + + - id: PERFECT_SAPPHIRE_GEM + rarity: LEGENDARY components: - id: GEMSTONE_IMPL rarity: PERFECT gemstone: SAPPHIRE skull_texture: 8e93ebacb60b71793355fde0d4bba43a9c5ec09c3f38897c48c1f857523a0a29 - id: TRACKED_UNIQUE - - id: PERFECT_TOPAZ_GEMSTONE - rarity: PERFECT + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Sapphire Gemstone + + - id: PERFECT_TOPAZ_GEM + rarity: LEGENDARY components: - id: GEMSTONE_IMPL rarity: PERFECT gemstone: TOPAZ skull_texture: 3da6ecdcbc3fe355ca0611192a3fbd35dd5635d5fcdf3fbc79ed2bc1f4a017fe - id: TRACKED_UNIQUE + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Topaz Gemstone + + - id: PERFECT_OPAL_GEM + rarity: LEGENDARY + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Opal Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: PERFECT + gemstone: OPAL + skull_texture: 7e509f06b8dc384358ff2472ab62ce6fdc2f646e338efdc3c9fb05ddc431f64 + + - id: PERFECT_AQUAMARINE_GEM + rarity: LEGENDARY + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Aquamarine Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: PERFECT + gemstone: AQUAMARINE + skull_texture: 255c8aac8990e456abf35030115e36c7c566782e13d81b1a770995fa5f37c822 + + - id: PERFECT_CITRINE_GEM + rarity: LEGENDARY + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Citrine Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: PERFECT + gemstone: CITRINE + skull_texture: 1c3ca0db0b9af8e98acde1c7d696dcf79eb3079702e5b554141dba663b43dd65 + + - id: PERFECT_ONYX_GEM + rarity: LEGENDARY + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Onyx Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: PERFECT + gemstone: ONYX + skull_texture: 6315486612c655a82f5ffda7a7d08ddd1bb8b31b622220a46e7781e3aa85c427 + + - id: PERFECT_PERIDOT_GEM + rarity: LEGENDARY + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Perfect Peridot Gemstone + - id: TRACKED_UNIQUE + - id: GEMSTONE_IMPL + rarity: PERFECT + gemstone: PERIDOT + skull_texture: 5a2588831cd4b282aaa16356b787d56e4eb13f0d62f414dafd1318ea09f8019c diff --git a/configuration/skyblock/items/mining/rough.yml b/configuration/skyblock/items/mining/rough.yml index 82ecd47b9..e0acdbb85 100644 --- a/configuration/skyblock/items/mining/rough.yml +++ b/configuration/skyblock/items/mining/rough.yml @@ -1,6 +1,6 @@ items: - - id: ROUGH_AMBER_GEMSTONE - rarity: ROUGH + - id: ROUGH_AMBER_GEM + rarity: COMMON components: - id: GEMSTONE_IMPL rarity: ROUGH @@ -8,8 +8,11 @@ items: skull_texture: da19436f6151a7b66d65ed7624add4325cfbbc2eee815fcf76f4c29ddf08f75b - id: SELLABLE value: 3.0 - - id: ROUGH_AMETHYST_GEMSTONE - rarity: ROUGH + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Amber Gemstone + + - id: ROUGH_AMETHYST_GEM + rarity: COMMON components: - id: GEMSTONE_IMPL rarity: ROUGH @@ -17,8 +20,11 @@ items: skull_texture: e493c6f540c7001fed97b07f6b4c89128e3a7c37563aa223f0acca314f175515 - id: SELLABLE value: 3.0 - - id: ROUGH_JADE_GEMSTONE - rarity: ROUGH + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Amethyst Gemstone + + - id: ROUGH_JADE_GEM + rarity: COMMON components: - id: GEMSTONE_IMPL rarity: ROUGH @@ -26,8 +32,11 @@ items: skull_texture: 3b4c2afd544d0a6139e6ae8ef8f0bfc09a9fd837d0cad4f5cd0fe7f607b7d1a0 - id: SELLABLE value: 3.0 - - id: ROUGH_JASPER_GEMSTONE - rarity: ROUGH + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Jade Gemstone + + - id: ROUGH_JASPER_GEM + rarity: COMMON components: - id: GEMSTONE_IMPL rarity: ROUGH @@ -35,8 +44,11 @@ items: skull_texture: 23d064ec150172d05844c11a18619c1421bbfb2ddd1dbb87cdc10e22252b773b - id: SELLABLE value: 3.0 - - id: ROUGH_RUBY_GEMSTONE - rarity: ROUGH + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Jasper Gemstone + + - id: ROUGH_RUBY_GEM + rarity: COMMON components: - id: GEMSTONE_IMPL rarity: ROUGH @@ -44,8 +56,11 @@ items: skull_texture: d159b03243be18a14f3eae763c4565c78f1f339a8742d26fde541be59b7de07 - id: SELLABLE value: 3.0 - - id: ROUGH_SAPPHIRE_GEMSTONE - rarity: ROUGH + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Ruby Gemstone + + - id: ROUGH_SAPPHIRE_GEM + rarity: COMMON components: - id: GEMSTONE_IMPL rarity: ROUGH @@ -53,8 +68,11 @@ items: skull_texture: cfcebe54dbc345ea7e22206f703e6b33befbe95b6a918bd1754b76188bc65bb5 - id: SELLABLE value: 3.0 - - id: ROUGH_TOPAZ_GEMSTONE - rarity: ROUGH + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Sapphire Gemstone + + - id: ROUGH_TOPAZ_GEM + rarity: COMMON components: - id: GEMSTONE_IMPL rarity: ROUGH @@ -62,3 +80,65 @@ items: skull_texture: 3fd960722ec29c66716ae5ca97b9b6b2628984e1d6f9d2592cd089914206a1b - id: SELLABLE value: 3.0 + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Topaz Gemstone + + - id: ROUGH_OPAL_GEM + rarity: COMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Opal Gemstone + - id: SELLABLE + value: 3 + - id: GEMSTONE_IMPL + rarity: ROUGH + gemstone: OPAL + skull_texture: a14d3c57f80824b3839b8b220f2158bca505d497fd1c9e3f29f422b1e6206a45 + + - id: ROUGH_AQUAMARINE_GEM + rarity: COMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Aquamarine Gemstone + - id: SELLABLE + value: 4 + - id: GEMSTONE_IMPL + rarity: ROUGH + gemstone: AQUAMARINE + skull_texture: 5a58a38f77b5f0f3610b164da29e901661b4628a482d5f702b71054f665e352c + + - id: ROUGH_CITRINE_GEM + rarity: COMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Citrine Gemstone + - id: SELLABLE + value: 4 + - id: GEMSTONE_IMPL + rarity: ROUGH + gemstone: CITRINE + skull_texture: 50e8517b3014e783556da47b17be931501b09da5bf8889b797ec087a8749a89 + + - id: ROUGH_ONYX_GEM + rarity: COMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Onyx Gemstone + - id: SELLABLE + value: 4 + - id: GEMSTONE_IMPL + rarity: ROUGH + gemstone: ONYX + skull_texture: c04d7b3d11143da776c25b85c0d3f4c2ba1c99ff57aea4e34b808002db7f39e9 + + - id: ROUGH_PERIDOT_GEM + rarity: COMMON + components: + - id: CUSTOM_DISPLAY_NAME + display_name: Rough Peridot Gemstone + - id: SELLABLE + value: 4 + - id: GEMSTONE_IMPL + rarity: ROUGH + gemstone: PERIDOT + skull_texture: 23c2b194d38922e493cfaf276d68f6f9ba0c0cd3a645bf2a06dc51424ea622d7 diff --git a/configuration/skyblock/items/weapons.yml b/configuration/skyblock/items/weapons.yml index 1b97f0b9d..6e30f7f8f 100644 --- a/configuration/skyblock/items/weapons.yml +++ b/configuration/skyblock/items/weapons.yml @@ -11,11 +11,20 @@ items: - id: ABILITY abilities: - INSTANT_TRANSMISSION - - id: GEMSTONE - gemstones: - - "SAPPHIRE:50000" - id: STANDARD_ITEM standard_item_type: SWORD + - id: GEMSTONE + gemstone_slots: + - gemstone: SAPPHIRE + coins: 50000 + - id: SELLABLE + value: 56000 + - id: MUSEUM + museum_category: WEAPONS + game_stage: INTERMEDIATE + donation_xp: 4 + parent: + ASPECT_OF_THE_END: ASPECT_OF_THE_VOID - id: ASPECT_OF_THE_JERRY material: WOODEN_SWORD @@ -52,8 +61,9 @@ items: abilities: - DRAGON_RAGE default_statistics: - damage: 225 - strength: 100 + damage: 225 + strength: 100 + ability_damage: 12000 components: - id: ABILITY abilities: @@ -62,6 +72,43 @@ items: value: 100000 - id: STANDARD_ITEM standard_item_type: SWORD + - id: GEMSTONE + gemstone_slots: + - gemstone: JASPER + coins: 50000 + items: + - FINE_JASPER_GEM:20 + - id: UPGRADES + levels: + - level: 1 + requirements: + - type: ESSENCE + essence: DRAGON + amount: 50 + - level: 2 + requirements: + - type: ESSENCE + essence: DRAGON + amount: 100 + - level: 3 + requirements: + - type: ESSENCE + essence: DRAGON + amount: 200 + - level: 4 + requirements: + - type: ESSENCE + essence: DRAGON + amount: 300 + - level: 5 + requirements: + - type: ESSENCE + essence: DRAGON + amount: 400 + - id: MUSEUM + museum_category: WEAPONS + game_stage: INTERMEDIATE + donation_xp: 5 - id: CUSTOM_DISPLAY_NAME display_name: "Aspect of the Dragons" @@ -93,8 +140,18 @@ items: - ETHER_TRANSMISSION - id: STANDARD_ITEM standard_item_type: SWORD + - id: GEMSTONE + gemstone_slots: + - gemstone: SAPPHIRE + coins: 50000 + - id: SELLABLE + value: 56000 - id: CUSTOM_DISPLAY_NAME display_name: "Aspect of the Void" + - id: MUSEUM + museum_category: WEAPONS + game_stage: EXPERT + donation_xp: 6 - id: FANCY_SWORD material: GOLDEN_SWORD @@ -227,9 +284,18 @@ items: abilities: - WITHER_IMPACT - id: GEMSTONE - gemstones: - - "SAPPHIRE:250000" - - "COMBAT:250000" + gemstone_slots: + - gemstone: SAPPHIRE + coins: 250000 + items: + - FLAWLESS_SAPPHIRE_GEM:4 + - gemstone: COMBAT + coins: 250000 + items: + - FLAWLESS_JASPER_GEM:1 + - FLAWLESS_SAPPHIRE_GEM:1 + - FLAWLESS_RUBY_GEM:1 + - FLAWLESS_AMETHYST_GEM:1 - id: MUSEUM museum_category: WEAPONS - id: TRACKED_UNIQUE diff --git a/service.darkauction/src/main/java/net/swofty/service/darkauction/loot/DarkAuctionItemPool.java b/service.darkauction/src/main/java/net/swofty/service/darkauction/loot/DarkAuctionItemPool.java index d6fd6dd22..dae637e28 100644 --- a/service.darkauction/src/main/java/net/swofty/service/darkauction/loot/DarkAuctionItemPool.java +++ b/service.darkauction/src/main/java/net/swofty/service/darkauction/loot/DarkAuctionItemPool.java @@ -18,7 +18,7 @@ public DarkAuctionItemPool() { // Epic Pets (weight 16) items.add(new WeightedItem(ItemType.BEE_PET, 16)); - items.add(new WeightedItem(ItemType.PERFECT_AMBER_GEMSTONE, 16)); + items.add(new WeightedItem(ItemType.PERFECT_AMBER_GEM, 16)); } /** diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemRarity.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemRarity.java index 3c5e6a3c8..c588bf290 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemRarity.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemRarity.java @@ -7,7 +7,6 @@ @Getter public enum GemRarity { - //NORMAL ROUGH("Rough", Rarity.COMMON, 1, "§f", "§7Taken right from the heart of a", "§7crystal vein in the §5Crystal", "§5Hollows§7."), FLAWED("Flawed", Rarity.UNCOMMON, 100, "§a", "§7A slightly better version of", "{GEM}§7, but it could still use some work."), FINE("Fine", Rarity.RARE, 10000, "§b", "§7A type of {GEM} §7that has", "§7clearly been treated with care."), diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemStats.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemStats.java index 67041834e..16bc46773 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemStats.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/GemStats.java @@ -4,48 +4,89 @@ import net.swofty.commons.skyblock.item.Rarity; public enum GemStats { - // RUBY - ROUGH_RUBY(1, 2, 3, 4, 5, 7), - FLAWED_RUBY(3, 4, 5, 6, 8, 10), - FINE_RUBY(4, 5, 6, 8, 10, 14), - FLAWLESS_RUBY(5, 7, 10, 14, 18, 22), - PERFECT_RUBY(6, 9, 13, 18, 24, 30), - - // AMETHYST - ROUGH_AMETHYST(1, 2, 3, 4, 5, 7), - FLAWED_AMETHYST(3, 4, 5, 6, 8, 10), - FINE_AMETHYST(4, 5, 6, 8, 10, 14), - FLAWLESS_AMETHYST(5, 7, 10, 14, 18, 22), - PERFECT_AMETHYST(6, 9, 13, 18, 24, 30), - - // JADE - ROUGH_JADE(0, 4, 6, 8, 10, 12), - FLAWED_JADE(0, 5, 7, 10, 14, 18), - FINE_JADE(0, 7, 10, 15, 20, 25), - FLAWLESS_JADE(0, 10, 15, 20, 27, 35), - PERFECT_JADE(0, 14, 20, 30, 40, 50), - - // SAPPHIRE - ROUGH_SAPPHIRE(2, 2, 3, 4, 5, 6), - FLAWED_SAPPHIRE(4, 4, 5, 6, 7, 8), - FINE_SAPPHIRE(6, 6, 7, 8, 9, 10), - FLAWLESS_SAPPHIRE(8, 9, 10, 12, 14, 16), - PERFECT_SAPPHIRE(10, 12, 14, 17, 20, 25), - - // AMBER - ROUGH_AMBER(4, 8, 12, 16, 20, 24), - FLAWED_AMBER(6, 10, 14, 18, 24, 30), - FINE_AMBER(10, 14, 20, 28, 36, 45), - FLAWLESS_AMBER(14, 20, 30, 44, 58, 75), - PERFECT_AMBER(20, 28, 40, 60, 80, 100), - - // JASPER - ROUGH_JASPER(0, 0, 1, 1, 2, 3), - FLAWED_JASPER(0, 0, 2, 3, 4, 0), - FINE_JASPER(0, 0, 3, 4, 4, 5), - FLAWLESS_JASPER(0, 0, 5, 6, 7, 8), - PERFECT_JASPER(0, 0, 7, 9, 10, 12), - ; + // RUBY - Health + ROUGH_RUBY(1, 2, 3, 4, 5, 7, 0), + FLAWED_RUBY(3, 4, 5, 6, 8, 10, 0), + FINE_RUBY(4, 5, 6, 8, 10, 14, 0), + FLAWLESS_RUBY(5, 7, 10, 14, 18, 22, 0), + PERFECT_RUBY(6, 9, 13, 18, 24, 30, 0), + + // AMBER - Mining Speed + ROUGH_AMBER(4, 8, 12, 16, 20, 24, 28), + FLAWED_AMBER(6, 10, 14, 18, 24, 30, 36), + FINE_AMBER(10, 14, 20, 28, 36, 45, 54), + FLAWLESS_AMBER(14, 20, 30, 44, 58, 75, 92), + PERFECT_AMBER(20, 28, 40, 60, 80, 100, 120), + + // TOPAZ - Pristine + ROUGH_TOPAZ(0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.5), + FLAWED_TOPAZ(0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.9), + FINE_TOPAZ(1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.3), + FLAWLESS_TOPAZ(1.6, 1.6, 1.6, 1.6, 1.6, 1.6, 1.8), + PERFECT_TOPAZ(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.2), + + // JADE - Mining Fortune + ROUGH_JADE(2, 4, 6, 8, 10, 12, 14), + FLAWED_JADE(3, 5, 7, 10, 14, 18, 22), + FINE_JADE(5, 7, 10, 15, 20, 25, 30), + FLAWLESS_JADE(7, 10, 15, 20, 27, 35, 44), + PERFECT_JADE(10, 14, 20, 30, 40, 50, 60), + + // SAPPHIRE - Intelligence + ROUGH_SAPPHIRE(2, 3, 4, 5, 6, 7, 0), + FLAWED_SAPPHIRE(5, 5, 6, 7, 8, 10, 0), + FINE_SAPPHIRE(7, 8, 9, 10, 11, 12, 0), + FLAWLESS_SAPPHIRE(10, 11, 12, 14, 17, 20, 0), + PERFECT_SAPPHIRE(12, 14, 17, 20, 24, 30, 0), + + // AMETHYST - Defense + ROUGH_AMETHYST(1, 2, 3, 4, 5, 7, 0), + FLAWED_AMETHYST(3, 4, 5, 6, 8, 10, 0), + FINE_AMETHYST(4, 5, 6, 8, 10, 14, 0), + FLAWLESS_AMETHYST(5, 7, 10, 14, 18, 22, 0), + PERFECT_AMETHYST(6, 9, 13, 18, 24, 30, 0), + + // JASPER - Strength + ROUGH_JASPER(1, 1, 1, 2, 3, 4, 0), + FLAWED_JASPER(2, 2, 3, 4, 4, 5, 0), + FINE_JASPER(3, 3, 4, 5, 6, 7, 0), + FLAWLESS_JASPER(5, 6, 7, 8, 10, 12, 0), + PERFECT_JASPER(6, 7, 9, 11, 13, 16, 0), + + // OPAL - True Defense + ROUGH_OPAL(1, 1, 1, 2, 2, 3, 0), + FLAWED_OPAL(2, 2, 2, 3, 3, 4, 0), + FINE_OPAL(3, 3, 3, 4, 4, 5, 0), + FLAWLESS_OPAL(4, 4, 5, 6, 8, 9, 0), + PERFECT_OPAL(5, 6, 7, 9, 11, 13, 0), + + // AQUAMARINE - Fishing Speed + ROUGH_AQUAMARINE(0.5, 0.5, 1.0, 1.0, 1.5, 2.0, 0.0), + FLAWED_AQUAMARINE(1.0, 1.0, 1.5, 1.5, 2.0, 2.5, 0.0), + FINE_AQUAMARINE(1.5, 1.5, 2.0, 2.0, 2.5, 3.0, 0.0), + FLAWLESS_AQUAMARINE(2.0, 2.0, 2.5, 3.0, 3.5, 4.0, 0.0), + PERFECT_AQUAMARINE(2.5, 2.5, 3.5, 4.0, 4.5, 5.0, 0.0), + + // CITRINE - Foraging Fortune + ROUGH_CITRINE(1, 2, 3, 4, 5, 6, 0), + FLAWED_CITRINE(2, 3, 4, 5, 6, 8, 0), + FINE_CITRINE(3, 4, 6, 8, 10, 12, 0), + FLAWLESS_CITRINE(4, 6, 8, 10, 12, 16, 0), + PERFECT_CITRINE(6, 8, 10, 12, 16, 20, 0), + + // ONYX - Crit Damage + ROUGH_ONYX(1, 1, 2, 2, 3, 4, 0), + FLAWED_ONYX(2, 2, 3, 3, 4, 6, 0), + FINE_ONYX(3, 3, 4, 5, 6, 8, 0), + FLAWLESS_ONYX(4, 5, 6, 7, 8, 10, 0), + PERFECT_ONYX(5, 6, 7, 8, 10, 12, 0), + + // PERIDOT - Farming Fortune + ROUGH_PERIDOT(0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 0.0), + FLAWED_PERIDOT(1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 0.0), + FINE_PERIDOT(1.5, 2.0, 3.0, 4.0, 5.0, 6.0, 0.0), + FLAWLESS_PERIDOT(2, 3, 4, 5, 6, 8, 0), + PERFECT_PERIDOT(3, 4, 5, 6, 8, 10, 0); @Getter public final Double common; @@ -59,14 +100,27 @@ public enum GemStats { public final Double legendary; @Getter public final Double mythic; + @Getter + public final Double divine; + + GemStats(Double common, Double uncommon, Double rare, Double epic, Double legendary, Double mythic, Double divine) { + this.common = common; + this.uncommon = uncommon; + this.rare = rare; + this.epic = epic; + this.legendary = legendary; + this.mythic = mythic; + this.divine = divine; + } - GemStats(Integer common, Integer uncommon, Integer rare, Integer epic, Integer legendary, Integer mythic) { + GemStats(Integer common, Integer uncommon, Integer rare, Integer epic, Integer legendary, Integer mythic, Integer divine) { this.common = Double.valueOf(common); this.uncommon = Double.valueOf(uncommon); this.rare = Double.valueOf(rare); this.epic = Double.valueOf(epic); this.legendary = Double.valueOf(legendary); this.mythic = Double.valueOf(mythic); + this.divine = Double.valueOf(divine); } public Double getFromRarity(Rarity rarity) { @@ -76,7 +130,9 @@ public Double getFromRarity(Rarity rarity) { case RARE -> getRare(); case EPIC -> getEpic(); case LEGENDARY -> getLegendary(); - default -> getMythic(); + case MYTHIC -> getMythic(); + case DIVINE -> getDivine(); + default -> 0.0; }; } @@ -91,4 +147,4 @@ public static GemStats getFromGemstoneAndRarity(Gemstone gemstone, GemRarity gem } return null; } -} +} \ No newline at end of file diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/Gemstone.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/Gemstone.java index 4d804448f..02f8e0b16 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/Gemstone.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gems/Gemstone.java @@ -14,13 +14,18 @@ @Getter public enum Gemstone { - RUBY(List.of(ItemType.ROUGH_RUBY_GEMSTONE, ItemType.FLAWED_RUBY_GEMSTONE, ItemType.FINE_RUBY_GEMSTONE, ItemType.FLAWLESS_RUBY_GEMSTONE, ItemType.PERFECT_RUBY_GEMSTONE), ChatColor.RED, ItemStatistic.HEALTH), - AMETHYST(List.of(ItemType.ROUGH_AMETHYST_GEMSTONE, ItemType.FLAWED_AMETHYST_GEMSTONE, ItemType.FINE_AMETHYST_GEMSTONE, ItemType.FLAWLESS_AMETHYST_GEMSTONE, ItemType.PERFECT_AMETHYST_GEMSTONE), ChatColor.DARK_PURPLE, ItemStatistic.DEFENSE), - JADE(List.of(ItemType.ROUGH_JADE_GEMSTONE, ItemType.FLAWED_JADE_GEMSTONE, ItemType.FINE_JADE_GEMSTONE, ItemType.FLAWLESS_JADE_GEMSTONE, ItemType.PERFECT_JADE_GEMSTONE), ChatColor.GREEN, null), - SAPPHIRE(List.of(ItemType.ROUGH_SAPPHIRE_GEMSTONE, ItemType.FLAWED_SAPPHIRE_GEMSTONE, ItemType.FINE_SAPPHIRE_GEMSTONE, ItemType.FLAWLESS_SAPPHIRE_GEMSTONE, ItemType.PERFECT_SAPPHIRE_GEMSTONE), ChatColor.DARK_AQUA, ItemStatistic.INTELLIGENCE), - AMBER(List.of(ItemType.ROUGH_AMBER_GEMSTONE, ItemType.FLAWED_AMBER_GEMSTONE, ItemType.FINE_AMBER_GEMSTONE, ItemType.FLAWLESS_AMBER_GEMSTONE, ItemType.PERFECT_AMBER_GEMSTONE), ChatColor.GOLD, ItemStatistic.MINING_SPEED), - TOPAZ(List.of(ItemType.ROUGH_TOPAZ_GEMSTONE, ItemType.FLAWED_TOPAZ_GEMSTONE, ItemType.FINE_TOPAZ_GEMSTONE, ItemType.FLAWLESS_TOPAZ_GEMSTONE, ItemType.PERFECT_TOPAZ_GEMSTONE), ChatColor.YELLOW, null), - JASPER(List.of(ItemType.ROUGH_JASPER_GEMSTONE, ItemType.FLAWED_JASPER_GEMSTONE, ItemType.FINE_JASPER_GEMSTONE, ItemType.FLAWLESS_JASPER_GEMSTONE, ItemType.PERFECT_JASPER_GEMSTONE), ChatColor.LIGHT_PURPLE, ItemStatistic.STRENGTH), + RUBY(List.of(ItemType.ROUGH_RUBY_GEM, ItemType.FLAWED_RUBY_GEM, ItemType.FINE_RUBY_GEM, ItemType.FLAWLESS_RUBY_GEM, ItemType.PERFECT_RUBY_GEM), ChatColor.RED, ItemStatistic.HEALTH), + AMETHYST(List.of(ItemType.ROUGH_AMETHYST_GEM, ItemType.FLAWED_AMETHYST_GEM, ItemType.FINE_AMETHYST_GEM, ItemType.FLAWLESS_AMETHYST_GEM, ItemType.PERFECT_AMETHYST_GEM), ChatColor.DARK_PURPLE, ItemStatistic.DEFENSE), + JADE(List.of(ItemType.ROUGH_JADE_GEM, ItemType.FLAWED_JADE_GEM, ItemType.FINE_JADE_GEM, ItemType.FLAWLESS_JADE_GEM, ItemType.PERFECT_JADE_GEM), ChatColor.GREEN, null), + SAPPHIRE(List.of(ItemType.ROUGH_SAPPHIRE_GEM, ItemType.FLAWED_SAPPHIRE_GEM, ItemType.FINE_SAPPHIRE_GEM, ItemType.FLAWLESS_SAPPHIRE_GEM, ItemType.PERFECT_SAPPHIRE_GEM), ChatColor.DARK_AQUA, ItemStatistic.INTELLIGENCE), + AMBER(List.of(ItemType.ROUGH_AMBER_GEM, ItemType.FLAWED_AMBER_GEM, ItemType.FINE_AMBER_GEM, ItemType.FLAWLESS_AMBER_GEM, ItemType.PERFECT_AMBER_GEM), ChatColor.GOLD, ItemStatistic.MINING_SPEED), + TOPAZ(List.of(ItemType.ROUGH_TOPAZ_GEM, ItemType.FLAWED_TOPAZ_GEM, ItemType.FINE_TOPAZ_GEM, ItemType.FLAWLESS_TOPAZ_GEM, ItemType.PERFECT_TOPAZ_GEM), ChatColor.YELLOW, null), + JASPER(List.of(ItemType.ROUGH_JASPER_GEM, ItemType.FLAWED_JASPER_GEM, ItemType.FINE_JASPER_GEM, ItemType.FLAWLESS_JASPER_GEM, ItemType.PERFECT_JASPER_GEM), ChatColor.LIGHT_PURPLE, ItemStatistic.STRENGTH), + OPAL(List.of(ItemType.ROUGH_OPAL_GEM, ItemType.FLAWED_OPAL_GEM, ItemType.FINE_OPAL_GEM, ItemType.FLAWLESS_OPAL_GEM, ItemType.PERFECT_OPAL_GEM), ChatColor.WHITE, ItemStatistic.TRUE_DEFENSE), + AQUAMARINE(List.of(ItemType.ROUGH_AQUAMARINE_GEM, ItemType.FLAWED_AQUAMARINE_GEM, ItemType.FINE_AQUAMARINE_GEM, ItemType.FLAWLESS_AQUAMARINE_GEM, ItemType.PERFECT_AQUAMARINE_GEM), ChatColor.AQUA, ItemStatistic.FISHING_SPEED), + CITRINE(List.of(ItemType.ROUGH_CITRINE_GEM, ItemType.FLAWED_CITRINE_GEM, ItemType.FINE_CITRINE_GEM, ItemType.FLAWLESS_CITRINE_GEM, ItemType.PERFECT_CITRINE_GEM), ChatColor.GOLD, ItemStatistic.FORAGING_FORTUNE), + PERIDOT(List.of(ItemType.ROUGH_PERIDOT_GEM, ItemType.FLAWED_PERIDOT_GEM, ItemType.FINE_PERIDOT_GEM, ItemType.FLAWLESS_PERIDOT_GEM, ItemType.PERFECT_PERIDOT_GEM), ChatColor.GREEN, ItemStatistic.FARMING_FORTUNE), + ONYX(List.of(ItemType.ROUGH_ONYX_GEM, ItemType.FLAWED_ONYX_GEM, ItemType.FINE_ONYX_GEM, ItemType.FLAWLESS_ONYX_GEM, ItemType.PERFECT_ONYX_GEM), ChatColor.BLACK, ItemStatistic.CRIT_DAMAGE), ; public final List item; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java index c89b172f6..ed4526ffd 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java @@ -27,6 +27,7 @@ import net.swofty.type.skyblockgeneric.museum.MuseumableItemCategory; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import net.swofty.type.skyblockgeneric.utility.ItemPriceCalculator; +import org.tinylog.Logger; import java.util.ArrayList; import java.util.List; @@ -159,6 +160,9 @@ public int[] getPaginatedSlots() { public PaginationList fillPaged(HypixelPlayer player, PaginationList paged) { MuseumableItemCategory.ARMOR_SETS.getItems().forEach(item -> { ArmorSetRegistry armorSet = ArmorSetRegistry.getArmorSet(item); + if (armorSet == null) { + Logger.error("ArmorSetRegistry is null! Add the armor set of " + item.getDisplayName() + " to the registry!"); + } if (paged.contains(armorSet)) return; paged.add(armorSet); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java index 59391110c..7f871309f 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java @@ -25,9 +25,11 @@ import java.util.concurrent.atomic.AtomicInteger; public class GUIYourMuseum extends HypixelInventoryGUI { - private static final int[] SLOTS = new int[]{ - 20, 22, 24 - }; + private static final Map CATEGORY_SLOTS = Map.of( + MuseumableItemCategory.WEAPONS, 20, + MuseumableItemCategory.ARMOR_SETS, 22, + MuseumableItemCategory.RARITIES, 24 + ); public GUIYourMuseum() { super("Your Museum", InventoryType.CHEST_6_ROW); @@ -133,7 +135,10 @@ public ItemStack.Builder getItem(HypixelPlayer p) { }); for (MuseumableItemCategory category : MuseumableItemCategory.values()) { - int slot = SLOTS[category.ordinal()]; + Integer slot = CATEGORY_SLOTS.get(category); + if (slot == null) { + continue; + } set(new GUIClickableItem(slot) { @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java index 2d4126958..0d2612f61 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java @@ -151,8 +151,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { e.setCancelled(true); if (isShift) { player.addAndUpdateItem(craftedItem); - } - else { + } else { p.getInventory().setCursorItem(craftedItem); } HypixelEventHandler.callCustomEvent(new ItemCraftEvent(player, new SkyBlockItem(craftedItem), finalRecipe)); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java index fb5cfe3b9..d0c364ba3 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java @@ -210,7 +210,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { List lore = new ArrayList<>(List.of("§7Gives you a better chance at", "§7fighting strong monsters. ", " ")); List stats = new ArrayList<>(List.of(ItemStatistic.HEALTH, ItemStatistic.DEFENSE, ItemStatistic.STRENGTH, ItemStatistic.INTELLIGENCE, ItemStatistic.CRIT_CHANCE, ItemStatistic.CRIT_DAMAGE, ItemStatistic.BONUS_ATTACK_SPEED, ItemStatistic.ABILITY_DAMAGE, ItemStatistic.TRUE_DEFENSE, - ItemStatistic.FEROCITY, ItemStatistic.HEALTH_REGEN, ItemStatistic.VITALITY, ItemStatistic.MENDING, ItemStatistic.SWING_RANGE)); + ItemStatistic.FEROCITY, ItemStatistic.HEALTH_REGENERATION, ItemStatistic.VITALITY, ItemStatistic.MENDING, ItemStatistic.SWING_RANGE)); statistics.allStatistics().getOverall().forEach((statistic, value) -> { if (stats.contains(statistic)) { diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/stats/GUICombatStats.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/stats/GUICombatStats.java index eb211ff0f..8a7fb3b56 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/stats/GUICombatStats.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/stats/GUICombatStats.java @@ -177,9 +177,9 @@ private enum CombatStat { } ), - HEALTH_REGEN(22, ItemStatistic.HEALTH_REGEN, new GUIMaterial(Material.POTION), + HEALTH_REGEN(22, ItemStatistic.HEALTH_REGENERATION, new GUIMaterial(Material.POTION), player -> { - double value = player.getStatistics().allStatistics().getOverall(ItemStatistic.HEALTH_REGEN); + double value = player.getStatistics().allStatistics().getOverall(ItemStatistic.HEALTH_REGENERATION); double maxHealth = player.getStatistics().allStatistics().getOverall(ItemStatistic.HEALTH); double healthRegen = value / 100D; double avgHpPerSecond = (1.5D + maxHealth / 100D) * (value / 100D) / 2D; @@ -320,7 +320,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { List lore = new ArrayList<>(List.of("§7Gives you a better chance at", "§7fighting strong monsters. ", " ")); List stats = new ArrayList<>(List.of(ItemStatistic.HEALTH, ItemStatistic.DEFENSE, ItemStatistic.STRENGTH, ItemStatistic.INTELLIGENCE, ItemStatistic.CRIT_CHANCE, ItemStatistic.CRIT_DAMAGE, ItemStatistic.BONUS_ATTACK_SPEED, ItemStatistic.ABILITY_DAMAGE, ItemStatistic.TRUE_DEFENSE, - ItemStatistic.FEROCITY, ItemStatistic.HEALTH_REGEN, ItemStatistic.VITALITY, ItemStatistic.MENDING, ItemStatistic.SWING_RANGE)); + ItemStatistic.FEROCITY, ItemStatistic.HEALTH_REGENERATION, ItemStatistic.VITALITY, ItemStatistic.MENDING, ItemStatistic.SWING_RANGE)); statistics.allStatistics().getOverall().forEach((statistic, value) -> { if (stats.contains(statistic)) { diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemConfigParser.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemConfigParser.java index 5a96e7b13..ab2ff7926 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemConfigParser.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemConfigParser.java @@ -28,484 +28,627 @@ public class ItemConfigParser { public static ConfigurableSkyBlockItem parseItem(Map config) { - String id = (String) config.get("id"); - // Clean up the ID - id = id.replaceAll("[^a-zA-Z0-9_]", ""); - - Material material = Material.values().stream().filter(loopedMaterial -> { - return loopedMaterial.key().value().equalsIgnoreCase((String) config.get("material")); - }).findFirst().orElse(Material.AIR); + SafeConfig safeConfig = SafeConfig.of(config); + + try { + String id = safeConfig.getString("id", ""); + id = id.replaceAll("[^a-zA-Z0-9_]", ""); + + String materialName = safeConfig.getString("material", "AIR"); + Material material = Material.values().stream() + .filter(m -> m.key().value().equalsIgnoreCase(materialName)) + .findFirst() + .orElse(Material.AIR); + + List lore = safeConfig.getList("lore", String.class); + Map statistics = new HashMap<>(); + + if (safeConfig.containsKey("default_statistics")) { + SafeConfig statsConfig = safeConfig.getNested("default_statistics"); + for (String key : statsConfig.getKeys()) { + double value = statsConfig.getDouble(key, 0.0); + statistics.put(key, value); + } + } - List lore = (List) config.get("lore"); - Map statistics = new HashMap<>(); + ConfigurableSkyBlockItem item = new ConfigurableSkyBlockItem(id, material, lore, statistics); - if (config.containsKey("default_statistics")) { - // Convert all the objects to doubles, noting they may be integers - for (Map.Entry entry : ((Map) config.get("default_statistics")).entrySet()) { - statistics.put(entry.getKey(), Double.parseDouble(entry.getValue().toString())); + List> components = safeConfig.getMapList("components"); + for (Map componentConfig : components) { + SafeConfig componentSafeConfig = SafeConfig.of(componentConfig); + String componentId = componentSafeConfig.getString("id"); + if (componentId != null) { + SkyBlockItemComponent component = parseComponent(id, componentId, componentConfig); + if (component != null) { + item.addComponent(component, true); + } + } } - } - ConfigurableSkyBlockItem item = new ConfigurableSkyBlockItem(id, material, lore, statistics); + item.register(); + return item; - List> components = (List>) config.get("components"); - if (components == null) components = new ArrayList<>(); - for (Map componentConfig : components) { - String componentId = (String) componentConfig.get("id"); - SkyBlockItemComponent component = parseComponent(id, componentId, componentConfig); - if (component != null) { - // Mark all components from YAML as explicit - item.addComponent(component, true); - } + } catch (SafeConfig.ConfigParseException e) { + Logger.error("Failed to parse item: {}", e.getMessage()); + return null; + } catch (Exception e) { + Logger.error("Unexpected error parsing item: {}", e.getMessage()); + e.printStackTrace(); + return null; } - - item.register(); - return item; } private static @Nullable SkyBlockItemComponent parseComponent(String itemId, String id, Map config) { - return switch (id.toUpperCase()) { - case "ABILITY" -> { - List abilities = (List) config.get("abilities"); - yield new AbilityComponent(abilities); - } - case "TALISMAN", "ACCESSORY" -> new AccessoryComponent(); - case "ANVIL_COMBINABLE" -> { - String handlerId = (String) config.get("handler_id"); - yield new AnvilCombinableComponent(handlerId); - } - case "ARMOR" -> new ArmorComponent(); - case "ARROW" -> new ArrowComponent(); - case "AUCTION_CATEGORY" -> { - String category = (String) config.get("category"); - yield new AuctionCategoryComponent(category); - } - case "AXE" -> { - int axeStrength = config.containsKey("axe_strength") ? (int) config.get("axe_strength") : 1; - yield new AxeComponent(axeStrength); - } - case "BACKPACK" -> { - int rows = (int) config.get("rows"); - String skullTexture = (String) config.get("skull-texture"); - yield new BackpackComponent(rows, skullTexture); - } - case "BOW" -> { - String handlerId = (String) config.get("handler_id"); - boolean shouldBeArrow = (boolean) config.getOrDefault("should-be-arrow", true); - yield new BowComponent(handlerId, shouldBeArrow); - } - case "CONSTANT_STATISTICS" -> new ConstantStatisticsComponent(); - case "DEFAULT_CRAFTABLE" -> { - List> recipes = (List>) config.get("recipes"); - boolean defaultCraftable = true; - if (config.containsKey("default-craftable")) { - defaultCraftable = (boolean) config.get("default-craftable"); - } - CraftableComponent component = new CraftableComponent(recipes); - component.setDefaultCraftable(defaultCraftable); - yield component; - } - case "CUSTOM_DISPLAY_NAME" -> - new CustomDisplayNameComponent((item) -> config.get("display_name").toString()); - case "DECORATION_HEAD" -> { - String texture = (String) config.get("texture"); - yield new DecorationHeadComponent(texture); - } - case "DEFAULT_SOULBOUND" -> { - boolean coopAllowed = (boolean) config.get("coop_allowed"); - yield new DefaultSoulboundComponent(coopAllowed); - } - case "DISABLE_ANIMATION" -> { - List animations = (List) config.get("disabled_animations"); - yield new DisableAnimationComponent(animations); - } - case "SOULFLOW" -> { - int amount = (int) config.get("amount"); - yield new SoulflowComponent(amount); - } - case "DRILL" -> new DrillComponent(); - case "ABIPHONE" -> { - List features = (List) config.get("features"); - List abiphoneFeatures = new ArrayList<>(); - for (String feature : features) { - abiphoneFeatures.add(AbiphoneComponent.AbiphoneFeature.valueOf(feature.toUpperCase().replace(" ", "_"))); - } - int maxContacts = (int) config.getOrDefault("max_contacts", 7); - int maxDiscs = (int) config.getOrDefault("max_discs", 0); - yield new AbiphoneComponent(maxContacts, maxDiscs, abiphoneFeatures); - } - case "ENCHANTABLE" -> { - List groups = (List) config.getOrDefault("enchant_groups", List.of()); - boolean showLores = (boolean) config.getOrDefault("show_lores", true); - yield new EnchantableComponent( - groups.stream().map(EnchantItemGroups::valueOf).toList(), - showLores - ); - } - case "ENCHANTED" -> { - if (config.containsKey("recipe_type") && config.containsKey("item_id")) { - SkyBlockRecipe.RecipeType type = SkyBlockRecipe.RecipeType.valueOf((String) config.get("recipe_type")); - String baseMaterial = (String) config.get("item_id"); - yield new EnchantedComponent(type, itemId, baseMaterial); + SafeConfig safeConfig = SafeConfig.of(config); + + try { + return switch (id.toUpperCase()) { + case "ABILITY" -> { + List abilities = safeConfig.getList("abilities", String.class); + yield new AbilityComponent(abilities); } - yield new EnchantedComponent(); - } - case "EXTRA_RARITY" -> { - String display = (String) config.get("display"); - yield new ExtraRarityComponent(display); - } - case "DUNGEON_ITEM" -> new ExtraRarityComponent("DUNGEON ITEM"); - case "EXTRA_UNDER_NAME" -> { - if (config.containsKey("displays")) { - List displays = (List) config.get("displays"); - yield new ExtraUnderNameComponent(displays); - } else { - String display = (String) config.get("display"); - yield new ExtraUnderNameComponent(display); + case "TALISMAN", "ACCESSORY" -> new AccessoryComponent(); + case "ANVIL_COMBINABLE" -> { + String handlerId = safeConfig.getString("handler_id"); + yield new AnvilCombinableComponent(handlerId); } - } - case "GEMSTONE" -> { - List gemstones = (List) config.get("gemstones"); - yield new GemstoneComponent(gemstones); - } - case "GEMSTONE_IMPL" -> { - GemRarity rarity = GemRarity.valueOf((String) config.get("rarity")); - Gemstone gemstone = Gemstone.valueOf((String) config.get("gemstone")); - String texture = (String) config.get("skull_texture"); - yield new GemstoneImplComponent(rarity, gemstone, texture); - } - case "HOE" -> new HoeComponent(); - case "HOT_POTATO" -> { - String type = (String) config.get("potato_type"); + case "ARMOR" -> new ArmorComponent(); + case "ARROW" -> new ArrowComponent(); + case "AUCTION_CATEGORY" -> { + String category = safeConfig.getString("category"); + yield new AuctionCategoryComponent(category); + } + case "AXE" -> { + int axeStrength = safeConfig.getInt("axe_strength", 1); + yield new AxeComponent(axeStrength); + } + case "BACKPACK" -> { + int rows = safeConfig.getInt("rows"); + String skullTexture = safeConfig.getString("skull-texture"); + yield new BackpackComponent(rows, skullTexture); + } + case "BOW" -> { + String handlerId = safeConfig.getString("handler_id"); + boolean shouldBeArrow = safeConfig.getBoolean("should-be-arrow", true); + yield new BowComponent(handlerId, shouldBeArrow); + } + case "CONSTANT_STATISTICS" -> new ConstantStatisticsComponent(); + case "DEFAULT_CRAFTABLE" -> { + List> recipes = safeConfig.getMapList("recipes"); + boolean defaultCraftable = safeConfig.getBoolean("default-craftable", true); + CraftableComponent component = new CraftableComponent(recipes); + component.setDefaultCraftable(defaultCraftable); + yield component; + } + case "CUSTOM_DISPLAY_NAME" -> + new CustomDisplayNameComponent((_) -> safeConfig.getString("display_name", "")); + case "DECORATION_HEAD" -> { + String texture = safeConfig.getString("texture"); + yield new DecorationHeadComponent(texture); + } + case "DEFAULT_SOULBOUND" -> { + boolean coopAllowed = safeConfig.getBoolean("coop_allowed"); + yield new DefaultSoulboundComponent(coopAllowed); + } + case "DISABLE_ANIMATION" -> { + List animations = safeConfig.getList("disabled_animations", ItemAnimation.class); + yield new DisableAnimationComponent(animations); + } + case "SOULFLOW" -> { + int amount = safeConfig.getInt("amount"); + yield new SoulflowComponent(amount); + } + case "DRILL" -> new DrillComponent(); + case "ABIPHONE" -> { + List features = safeConfig.getList("features", String.class); + List abiphoneFeatures = new ArrayList<>(); + for (String feature : features) { + abiphoneFeatures.add(AbiphoneComponent.AbiphoneFeature.valueOf(feature.toUpperCase().replace(" ", "_"))); + } + int maxContacts = safeConfig.getInt("max_contacts", 7); + int maxDiscs = safeConfig.getInt("max_discs", 0); + yield new AbiphoneComponent(maxContacts, maxDiscs, abiphoneFeatures); + } + case "ENCHANTABLE" -> { + List groups = safeConfig.getList("enchant_groups", String.class); + boolean showLores = safeConfig.getBoolean("show_lores", true); + yield new EnchantableComponent( + groups.stream().map(EnchantItemGroups::valueOf).toList(), + showLores + ); + } + case "ENCHANTED" -> { + if (safeConfig.containsKey("recipe_type") && safeConfig.containsKey("item_id")) { + SkyBlockRecipe.RecipeType type = SkyBlockRecipe.RecipeType.valueOf(safeConfig.getString("recipe_type")); + String baseMaterial = safeConfig.getString("item_id"); + yield new EnchantedComponent(type, itemId, baseMaterial); + } + yield new EnchantedComponent(); + } + case "EXTRA_RARITY" -> { + String display = safeConfig.getString("display"); + yield new ExtraRarityComponent(display); + } + case "DUNGEON_ITEM" -> new ExtraRarityComponent("DUNGEON ITEM"); + case "EXTRA_UNDER_NAME" -> { + if (safeConfig.containsKey("displays")) { + List displays = safeConfig.getList("displays", String.class); + yield new ExtraUnderNameComponent(displays); + } else { + String display = safeConfig.getString("display"); + yield new ExtraUnderNameComponent(display); + } + } + case "GEMSTONE" -> { + List> gemstoneEntries = safeConfig.getMapList("gemstone_slots"); + List gemstoneSlots = parseGemstoneEntries(gemstoneEntries); + yield new GemstoneComponent(gemstoneSlots); + } + case "GEMSTONE_IMPL" -> { + GemRarity rarity = safeConfig.getEnum("rarity", GemRarity.class); + Gemstone gemstone = safeConfig.getEnum("gemstone", Gemstone.class); + String texture = safeConfig.getString("skull_texture"); + yield new GemstoneImplComponent(rarity, gemstone, texture); + } + case "HOE" -> new HoeComponent(); + case "HOT_POTATO" -> { + String type = safeConfig.getString("potato_type"); + PotatoType potatoType = PotatoType.valueOf(type); - if (config.containsKey("appliable_items")) { - var appliableItems = (List) config.get("appliable_items"); - HashMap appliable = new HashMap<>(); + if (safeConfig.containsKey("appliable_items")) { + List appliableItems = safeConfig.getList("appliable_items", String.class); + HashMap appliable = new HashMap<>(); - for (var item : appliableItems) { - var split = item.split(":"); + for (String item : appliableItems) { + String[] split = item.split(":"); - if (split.length != 2) - continue; + if (split.length != 2) + continue; - appliable.put(ItemType.valueOf(split[0]), Integer.parseInt(split[1])); + appliable.put(ItemType.valueOf(split[0]), Integer.parseInt(split[1])); + } + + yield new HotPotatoableComponent(potatoType, appliable); } - yield new HotPotatoableComponent(PotatoType.valueOf(type), appliable); + yield new HotPotatoableComponent(potatoType); } - - yield new HotPotatoableComponent(PotatoType.valueOf(type)); - } - case "INTERACTABLE" -> { - String handlerId = (String) config.get("handler_id"); - try { - yield new InteractableComponent(handlerId); - } catch (Exception e) { - Logger.error("Failed to parse InteractableComponent for " + handlerId); - yield null; + case "INTERACTABLE" -> { + String handlerId = safeConfig.getString("handler_id"); + try { + yield new InteractableComponent(handlerId); + } catch (Exception e) { + Logger.error("Failed to parse InteractableComponent for " + handlerId); + yield null; + } } - } - case "KAT" -> { - int reducedDays = (int) config.get("reduced_days"); - yield new KatComponent(reducedDays); - } - case "LEATHER_COLOR" -> { - String r = (String) config.get("r"); - String g = (String) config.get("g"); - String b = (String) config.get("b"); + case "KAT" -> { + int reducedDays = safeConfig.getInt("reduced_days"); + yield new KatComponent(reducedDays); + } + case "LEATHER_COLOR" -> { + String r = safeConfig.getString("r"); + String g = safeConfig.getString("g"); + String b = safeConfig.getString("b"); - Color color = new Color(Integer.parseInt(r), Integer.parseInt(g), Integer.parseInt(b)); - yield new LeatherColorComponent(color); - } - case "MINION" -> { - String minionType = (String) config.get("minion_type"); - String baseItem = (String) config.get("base_item"); - boolean isByDefaultCraftable = (boolean) config.get("default_craftable"); + if (r == null || g == null || b == null) { + yield null; + } - List ingredients = (List) config.get("ingredients"); - List ingredientsMap = new ArrayList<>(); + Color color = new Color(Integer.parseInt(r), Integer.parseInt(g), Integer.parseInt(b)); + yield new LeatherColorComponent(color); + } + case "MINION" -> { + String minionType = safeConfig.getString("minion_type"); + String baseItem = safeConfig.getString("base_item"); + boolean isByDefaultCraftable = safeConfig.getBoolean("default_craftable"); + + List ingredients = safeConfig.getList("ingredients", String.class); + List ingredientsMap = new ArrayList<>(); + + for (String ingredient : ingredients) { + String[] ingredientParts = ingredient.split(":"); + ingredientsMap.add(new MinionIngredient( + ItemType.valueOf(ingredientParts[0]), + Integer.parseInt(ingredientParts[1]) + )); + } - for (String ingredient : ingredients) { - String[] ingredientParts = ingredient.split(":"); - ingredientsMap.add(new MinionIngredient( - ItemType.valueOf(ingredientParts[0]), - Integer.parseInt(ingredientParts[1]) - )); + yield new MinionComponent(minionType, baseItem, isByDefaultCraftable, ingredientsMap); + } + case "MINION_FUEL" -> { + double percentage = safeConfig.getDouble("fuel_percentage"); + long lastTime = safeConfig.getInt("last_time_ms"); + yield new MinionFuelComponent(percentage, lastTime); + } + case "MINION_SHIPPING" -> { + double percentage = safeConfig.getDouble("percentage"); + yield new MinionShippingComponent(percentage); + } + case "MINION_SKIN" -> { + String skinName = safeConfig.getString("name"); + SafeConfig helmetConfig = safeConfig.getNested("helmet"); + SafeConfig chestplateConfig = safeConfig.getNested("chestplate"); + SafeConfig leggingsConfig = safeConfig.getNested("leggings"); + SafeConfig bootsConfig = safeConfig.getNested("boots"); + + MinionSkinComponent.MinionArmorPiece helmet = helmetConfig.getKeys().isEmpty() ? + new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null) : + MinionSkinComponent.MinionArmorPiece.fromConfig(helmetConfig.config); + MinionSkinComponent.MinionArmorPiece chestplate = chestplateConfig.getKeys().isEmpty() ? + new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null) : + MinionSkinComponent.MinionArmorPiece.fromConfig(chestplateConfig.config); + MinionSkinComponent.MinionArmorPiece leggings = leggingsConfig.getKeys().isEmpty() ? + new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null) : + MinionSkinComponent.MinionArmorPiece.fromConfig(leggingsConfig.config); + MinionSkinComponent.MinionArmorPiece boots = bootsConfig.getKeys().isEmpty() ? + new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null) : + MinionSkinComponent.MinionArmorPiece.fromConfig(bootsConfig.config); + + yield new MinionSkinComponent(skinName, helmet, chestplate, leggings, boots); } + case "MINION_UPGRADE" -> { + double speedIncrease = safeConfig.getDouble("speed_increase"); + yield new MinionUpgradeComponent(speedIncrease); + } + case "MUSEUM" -> { + String category = safeConfig.getString("museum_category", null); + String gameStage = safeConfig.getString("game_stage", null); + int donationXp = safeConfig.getInt("donation_xp", 0); + + Map parent = null; + if (safeConfig.containsKey("parent")) { + Map parentMap = safeConfig.getMap("parent"); + if (!parentMap.isEmpty()) { + parent = new java.util.LinkedHashMap<>(); + for (Map.Entry entry : parentMap.entrySet()) { + parent.put(entry.getKey(), entry.getValue().toString()); + } + } + } - yield new MinionComponent(minionType, baseItem, isByDefaultCraftable, ingredientsMap); - } - case "MINION_FUEL" -> { - double percentage = (double) config.get("fuel_percentage"); - long lastTime = (int) config.get("last_time_ms"); - yield new MinionFuelComponent(percentage, lastTime); - } - case "MINION_SHIPPING" -> { - double percentage = (double) config.get("percentage"); - yield new MinionShippingComponent(percentage); - } - case "MINION_SKIN" -> { - String skinName = (String) config.get("name"); - Map helmetConfig = (Map) config.get("helmet"); - Map chestplateConfig = (Map) config.get("chestplate"); - Map leggingsConfig = (Map) config.get("leggings"); - Map bootsConfig = (Map) config.get("boots"); - - MinionSkinComponent.MinionArmorPiece helmet = helmetConfig != null ? MinionSkinComponent.MinionArmorPiece.fromConfig(helmetConfig) : - new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null); - MinionSkinComponent.MinionArmorPiece chestplate = chestplateConfig != null ? MinionSkinComponent.MinionArmorPiece.fromConfig(chestplateConfig) : - new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null); - MinionSkinComponent.MinionArmorPiece leggings = leggingsConfig != null ? MinionSkinComponent.MinionArmorPiece.fromConfig(leggingsConfig) : - new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null); - MinionSkinComponent.MinionArmorPiece boots = bootsConfig != null ? MinionSkinComponent.MinionArmorPiece.fromConfig(bootsConfig) : - new MinionSkinComponent.MinionArmorPiece(Material.AIR, null, null); - - yield new MinionSkinComponent(skinName, helmet, chestplate, leggings, boots); - } - case "MINION_UPGRADE" -> { - double speedIncrease = (double) config.get("speed_increase"); - yield new MinionUpgradeComponent(speedIncrease); - } - case "MUSEUM" -> { - String category = (String) config.get("museum_category"); - yield new MuseumComponent(category); - } - case "NOT_FINISHED_YET" -> new NotFinishedYetComponent(); - case "NEW_YEAR_CAKE" -> new NewYearCakeComponent(); - case "LORE_UPDATE" -> { - boolean isAbsolute = (boolean) config.getOrDefault("is_absolute", false); - yield new LoreUpdateComponent(config.get("handler_id").toString(), isAbsolute); - } - case "PET_ITEM" -> new PetItemComponent(); - case "PICKAXE" -> new PickaxeComponent(); - case "PLACEABLE" -> { - String blockType = (String) config.get("block_type"); - yield new PlaceableComponent(blockType); - } - case "PLACE_EVENT" -> { - String handlerId = (String) config.get("handler_id"); - yield new PlaceEventComponent(handlerId); - } - case "POWER_STONE" -> new PowerStoneComponent(); - case "QUIVER_DISPLAY" -> { - boolean shouldBeArrow = (boolean) config.get("should_be_arrow"); - yield new QuiverDisplayComponent(shouldBeArrow); - } - case "REFORGABLE" -> { - String type = (String) config.get("reforge_type"); - yield new ReforgableComponent(ReforgeType.valueOf(type)); - } - case "RIGHT_CLICK_RECIPE" -> { - String recipeItem = (String) config.get("recipe_item"); - yield new RightClickRecipeComponent(recipeItem); - } - case "RUNEABLE" -> { - String applicableTo = (String) config.get("applicable_to"); - yield new RuneableComponent(RuneableComponent.RuneApplicableTo.valueOf(applicableTo)); - } - case "CUSTOM_DROP" -> { - List> rulesConfig = (List>) config.get("rules"); - List rules = new ArrayList<>(); - - for (Map ruleConfig : rulesConfig) { - // Parse conditions - Map conditionsConfig = (Map) ruleConfig.get("conditions"); - CustomDropComponent.DropConditions conditions = CustomDropComponent.parseDropConditions(conditionsConfig); - - // Parse drops - List> dropsConfig = (List>) ruleConfig.get("drops"); - List drops = new ArrayList<>(); - - for (Map dropConfig : dropsConfig) { - String itemName = (String) dropConfig.get("item"); - ItemType itemType = ItemType.valueOf(itemName); - double chance = ((Number) dropConfig.get("chance")).doubleValue(); - String amount = dropConfig.get("amount").toString(); - - drops.add(new CustomDropComponent.Drop(itemType, chance, amount)); + List mappedItemIds = null; + if (safeConfig.containsKey("mapped_item_ids")) { + mappedItemIds = safeConfig.getList("mapped_item_ids", String.class); } - rules.add(new CustomDropComponent.DropRule(conditions, drops)); + yield new MuseumComponent(category, gameStage, donationXp, parent, mappedItemIds); + } + case "NOT_FINISHED_YET" -> new NotFinishedYetComponent(); + case "NEW_YEAR_CAKE" -> new NewYearCakeComponent(); + case "LORE_UPDATE" -> { + boolean isAbsolute = safeConfig.getBoolean("is_absolute", false); + String handlerId = safeConfig.getString("handler_id", ""); + yield new LoreUpdateComponent(handlerId, isAbsolute); + } + case "PET_ITEM" -> new PetItemComponent(); + case "PICKAXE" -> new PickaxeComponent(); + case "PLACEABLE" -> { + String blockType = safeConfig.getString("block_type"); + yield new PlaceableComponent(blockType); } + case "PLACE_EVENT" -> { + String handlerId = safeConfig.getString("handler_id"); + yield new PlaceEventComponent(handlerId); + } + case "POWER_STONE" -> new PowerStoneComponent(); + case "QUIVER_DISPLAY" -> { + boolean shouldBeArrow = safeConfig.getBoolean("should_be_arrow"); + yield new QuiverDisplayComponent(shouldBeArrow); + } + case "REFORGABLE" -> { + String type = safeConfig.getString("reforge_type"); + yield new ReforgableComponent(ReforgeType.valueOf(type)); + } + case "RIGHT_CLICK_RECIPE" -> { + String recipeItem = safeConfig.getString("recipe_item"); + yield new RightClickRecipeComponent(recipeItem); + } + case "RUNEABLE" -> { + String applicableTo = safeConfig.getString("applicable_to"); + yield new RuneableComponent(RuneableComponent.RuneApplicableTo.valueOf(applicableTo)); + } + case "CUSTOM_DROP" -> { + List> rulesConfig = safeConfig.getMapList("rules"); + List rules = new ArrayList<>(); + + for (Map ruleConfig : rulesConfig) { + SafeConfig ruleSafeConfig = SafeConfig.of(ruleConfig); + + Map conditionsConfig = ruleSafeConfig.getMap("conditions"); + CustomDropComponent.DropConditions conditions = !conditionsConfig.isEmpty() + ? CustomDropComponent.parseDropConditions(conditionsConfig) + : null; + + List> dropsConfig = ruleSafeConfig.getMapList("drops"); + List drops = new ArrayList<>(); + + for (Map dropConfig : dropsConfig) { + Object itemObj = dropConfig.get("item"); + String itemName; + if (itemObj instanceof String) { + itemName = (String) itemObj; + } else { + itemName = itemObj.toString(); + } + + ItemType itemType = ItemType.valueOf(itemName.toUpperCase().replace(" ", "_")); + + Object chanceObj = dropConfig.get("chance"); + double chance; + if (chanceObj instanceof Number) { + chance = ((Number) chanceObj).doubleValue(); + } else if (chanceObj instanceof String) { + chance = Double.parseDouble((String) chanceObj); + } else { + chance = 1.0; + } + + Object amountObj = dropConfig.get("amount"); + String amount; + if (amountObj instanceof String) { + amount = (String) amountObj; + } else if (amountObj instanceof Number) { + amount = amountObj.toString(); + } else { + amount = "1"; + } + + drops.add(new CustomDropComponent.Drop(itemType, chance, amount)); + } - yield new CustomDropComponent(rules); - } - case "RUNE" -> { - int level = (int) config.get("required_level"); - String color = (String) config.get("color"); - String applicableTo = (String) config.get("applicable_to"); - String texture = (String) config.get("skull_texture"); - yield new RuneComponent(level, color, applicableTo, texture); - } - case "SACK" -> { - List items = (List) config.get("valid_items"); - int capacity = (int) config.get("max_capacity"); - yield new SackComponent(items, capacity); - } - case "SELLABLE" -> { - Object value = config.get("value"); - if (value instanceof Double) { - yield new SellableComponent((double) value); - } else if (value instanceof Integer) { - yield new SellableComponent((int) value); - } - yield new SellableComponent(1); - } - case "SERVER_ORB" -> { - String handlerId = (String) config.get("handler_id"); - List blockStrings = ((List) config.getOrDefault("valid_blocks", List.of())).stream().map( - String::toLowerCase - ).toList(); - List materials = Material.values().stream() - .filter(material -> blockStrings.contains(material.key().value().toLowerCase())) - .toList(); - - yield new ServerOrbComponent(handlerId, materials); - } - case "SHORT_BOW" -> { - String handlerId = (String) config.get("handler_id"); - float cooldown = (float) config.get("cooldown"); - boolean shouldBeArrow = (boolean) config.getOrDefault("should-be-arrow", true); - yield new ShortBowComponent(cooldown, handlerId, shouldBeArrow); - } - case "SHOVEL" -> new ShovelComponent(); - case "SKILLABLE_MINE" -> { - String category = (String) config.get("category"); - double value = (double) config.get("mining_value"); - yield new SkillableMineComponent(category, value); - } - case "SKULL_HEAD" -> new SkullHeadComponent((item) -> config.get("texture").toString()); - case "STANDARD_ITEM" -> { - String type = (String) config.get("standard_item_type"); - yield new StandardItemComponent(type); - } - case "CUSTOM_STATISTICS" -> { - String handlerId = (String) config.get("handler_id"); - yield new CustomStatisticsComponent(handlerId); - } - case "TIERED_TALISMAN" -> { - ItemType baseTier = ItemType.valueOf((String) config.get("base_tier")); - int tier = (int) config.get("tier"); - yield new TieredTalismanComponent(baseTier, tier); - } - case "TRACKED_UNIQUE" -> new TrackedUniqueComponent(); - case "BREWING_INGREDIENT" -> { - int brewingTime = ((Number) config.getOrDefault("brewing_time_seconds", 20)).intValue(); - String effect = (String) config.getOrDefault("effect", "SPEED"); - int duration = ((Number) config.getOrDefault("effect_duration", 180)).intValue(); - int amplifier = ((Number) config.getOrDefault("effect_amplifier", 0)).intValue(); - int alchemyXp = ((Number) config.getOrDefault("alchemy_xp", 0)).intValue(); - yield new BrewingIngredientComponent(brewingTime, effect, duration, amplifier, alchemyXp); - } - case "POTION_DATA" -> { - String effect = (String) config.getOrDefault("effect", "SPEED"); - int level = ((Number) config.getOrDefault("level", 1)).intValue(); - int duration = ((Number) config.getOrDefault("base_duration", 180)).intValue(); - boolean splash = (Boolean) config.getOrDefault("splash", false); - boolean extended = (Boolean) config.getOrDefault("extended", false); - yield new PotionDataComponent(effect, level, duration, splash, extended); - } - case "TRAVEL_SCROLL" -> { - String scrollType = (String) config.get("scroll_type"); - yield new TravelScrollComponent(scrollType); - } - case "PET" -> { - String petName = (String) config.get("pet_name"); - - // Parse george price - Map georgePriceMap = (Map) config.get("george_price"); - RarityValue georgePrice = new RarityValue<>( - georgePriceMap.get("common"), - georgePriceMap.get("uncommon"), - georgePriceMap.get("rare"), - georgePriceMap.get("epic"), - georgePriceMap.get("legendary"), - georgePriceMap.get("rest") - ); - - // Parse kat upgrades if present - RarityValue katUpgrades = null; - if (config.containsKey("kat_upgrades")) { - Map> katUpgradeMap = (Map>) config.get("kat_upgrades"); - katUpgrades = new RarityValue<>( - parseKatUpgrade(katUpgradeMap.get("common")), - parseKatUpgrade(katUpgradeMap.get("uncommon")), - parseKatUpgrade(katUpgradeMap.get("rare")), - parseKatUpgrade(katUpgradeMap.get("epic")), - parseKatUpgrade(katUpgradeMap.get("legendary")), - parseKatUpgrade(katUpgradeMap.get("rest")) - ); + rules.add(new CustomDropComponent.DropRule(conditions, drops)); + } + + yield new CustomDropComponent(rules); + } + case "RUNE" -> { + int level = safeConfig.getInt("required_level"); + String color = safeConfig.getString("color"); + String applicableTo = safeConfig.getString("applicable_to"); + String texture = safeConfig.getString("skull_texture"); + yield new RuneComponent(level, color, applicableTo, texture); + } + case "SACK" -> { + List items = safeConfig.getList("valid_items", String.class); + int capacity = safeConfig.getInt("max_capacity"); + yield new SackComponent(items, capacity); + } + case "SELLABLE" -> { + double value = safeConfig.getDouble("value", 1.0); + yield new SellableComponent(value); + } + case "SERVER_ORB" -> { + String handlerId = safeConfig.getString("handler_id"); + List blockStrings = safeConfig.getList("valid_blocks", String.class); + List materials = Material.values().stream() + .filter(material -> blockStrings.contains(material.key().value().toLowerCase())) + .toList(); + + yield new ServerOrbComponent(handlerId, materials); + } + case "SHORT_BOW" -> { + String handlerId = safeConfig.getString("handler_id"); + float cooldown = (float) safeConfig.getDouble("cooldown"); + boolean shouldBeArrow = safeConfig.getBoolean("should-be-arrow", true); + yield new ShortBowComponent(cooldown, handlerId, shouldBeArrow); } + case "SHOVEL" -> new ShovelComponent(); + case "SKILLABLE_MINE" -> { + String category = safeConfig.getString("category"); + double value = safeConfig.getDouble("mining_value"); + yield new SkillableMineComponent(category, value); + } + case "SKULL_HEAD" -> new SkullHeadComponent((item) -> safeConfig.getString("texture", "")); + case "STANDARD_ITEM" -> { + String type = safeConfig.getString("standard_item_type"); + yield new StandardItemComponent(type); + } + case "CUSTOM_STATISTICS" -> { + String handlerId = safeConfig.getString("handler_id"); + yield new CustomStatisticsComponent(handlerId); + } + case "TIERED_TALISMAN" -> { + String baseTierStr = safeConfig.getString("base_tier"); + ItemType baseTier = ItemType.valueOf(baseTierStr); + int tier = safeConfig.getInt("tier"); + yield new TieredTalismanComponent(baseTier, tier); + } + case "TRACKED_UNIQUE" -> new TrackedUniqueComponent(); + case "BREWING_INGREDIENT" -> { + int brewingTime = safeConfig.getInt("brewing_time_seconds", 20); + String effect = safeConfig.getString("effect", "SPEED"); + int duration = safeConfig.getInt("effect_duration", 180); + int amplifier = safeConfig.getInt("effect_amplifier", 0); + int alchemyXp = safeConfig.getInt("alchemy_xp", 0); + yield new BrewingIngredientComponent(brewingTime, effect, duration, amplifier, alchemyXp); + } + case "POTION_DATA" -> { + String effect = safeConfig.getString("effect", "SPEED"); + int level = safeConfig.getInt("level", 1); + int duration = safeConfig.getInt("base_duration", 180); + boolean splash = safeConfig.getBoolean("splash", false); + boolean extended = safeConfig.getBoolean("extended", false); + yield new PotionDataComponent(effect, level, duration, splash, extended); + } + case "TRAVEL_SCROLL" -> { + String scrollType = safeConfig.getString("scroll_type"); + yield new TravelScrollComponent(scrollType); + } + case "PET" -> { + String petName = safeConfig.getString("pet_name"); + + // Parse george price + SafeConfig georgePriceConfig = safeConfig.getNested("george_price"); + RarityValue georgePrice = new RarityValue<>( + georgePriceConfig.getInt("common"), + georgePriceConfig.getInt("uncommon"), + georgePriceConfig.getInt("rare"), + georgePriceConfig.getInt("epic"), + georgePriceConfig.getInt("legendary"), + georgePriceConfig.getInt("rest") + ); - // Parse base statistics - Map baseStatsMap = (Map) config.get("base_statistics"); - ItemStatistics.Builder baseBuilder = ItemStatistics.builder(); - baseStatsMap.forEach((stat, value) -> - baseBuilder.withBase(ItemStatistic.valueOf(stat.toUpperCase()), value) - ); - ItemStatistics baseStatistics = baseBuilder.build(); - - // Parse per level statistics - Map perLevelStatsMap = (Map) config.get("per_level_statistics"); - Map perLevelStatistics = new HashMap<>(); - for (Map.Entry entry : perLevelStatsMap.entrySet()) { - String rarity = entry.getKey(); - ItemStatistics.Builder rarityBuilder = ItemStatistics.builder(); - try { - Map rarityStatsMap = (Map) entry.getValue(); - rarityBuilder = ItemStatistics.builder(); - for (Map.Entry e : rarityStatsMap.entrySet()) { - String stat = e.getKey(); - Double value = e.getValue(); - rarityBuilder.withBase(ItemStatistic.valueOf(stat.toUpperCase()), value); + // Parse kat upgrades if present + RarityValue katUpgrades = null; + if (safeConfig.containsKey("kat_upgrades")) { + SafeConfig katUpgradeConfig = safeConfig.getNested("kat_upgrades"); + katUpgrades = new RarityValue<>( + parseKatUpgrade(katUpgradeConfig.getNested("common").config), + parseKatUpgrade(katUpgradeConfig.getNested("uncommon").config), + parseKatUpgrade(katUpgradeConfig.getNested("rare").config), + parseKatUpgrade(katUpgradeConfig.getNested("epic").config), + parseKatUpgrade(katUpgradeConfig.getNested("legendary").config), + parseKatUpgrade(katUpgradeConfig.getNested("rest").config) + ); + } + + // Parse base statistics + SafeConfig baseStatsConfig = safeConfig.getNested("base_statistics"); + ItemStatistics.Builder baseBuilder = ItemStatistics.builder(); + for (String statKey : baseStatsConfig.getKeys()) { + double value = baseStatsConfig.getDouble(statKey); + baseBuilder.withBase(ItemStatistic.valueOf(statKey.toUpperCase()), value); + } + ItemStatistics baseStatistics = baseBuilder.build(); + + // Parse per level statistics + SafeConfig perLevelStatsConfig = safeConfig.getNested("per_level_statistics"); + Map perLevelStatistics = new HashMap<>(); + for (String rarityKey : perLevelStatsConfig.getKeys()) { + SafeConfig rarityStatsConfig = perLevelStatsConfig.getNested(rarityKey); + ItemStatistics.Builder rarityBuilder = ItemStatistics.builder(); + + for (String statKey : rarityStatsConfig.getKeys()) { + double value = rarityStatsConfig.getDouble(statKey); + rarityBuilder.withBase(ItemStatistic.valueOf(statKey.toUpperCase()), value); } - } catch (ClassCastException e) { - // Per level statistics is a map with an Integer, so we need to convert it to a double - Map rarityStatsMap = (Map) entry.getValue(); - rarityBuilder = ItemStatistics.builder(); - for (Map.Entry mapEntry : rarityStatsMap.entrySet()) { - String stat = mapEntry.getKey(); - Integer value = mapEntry.getValue(); - rarityBuilder.withBase(ItemStatistic.valueOf(stat.toUpperCase()), Double.valueOf(value)); + + perLevelStatistics.put(Rarity.valueOf(rarityKey.toUpperCase()), rarityBuilder.build()); + } + + // Parse other fields + int particleIdValue = safeConfig.getInt("particle"); + Particle particleId = Particle.fromId(particleIdValue); + String skillCategory = safeConfig.getString("skill_category"); + String skullTexture = safeConfig.getString("skull_texture"); + String handlerId = safeConfig.getString("handler_id"); + + yield new PetComponent( + petName, + georgePrice, + katUpgrades, + baseStatistics, + perLevelStatistics, + particleId, + skillCategory, + skullTexture, + handlerId + ); + } + case "UPGRADES" -> { + List> levelsConfig = safeConfig.getMapList("levels"); + List levels = new ArrayList<>(); + + for (Map levelConfig : levelsConfig) { + SafeConfig levelSafeConfig = SafeConfig.of(levelConfig); + + int level = levelSafeConfig.getInt("level"); + List> requirementsConfig = levelSafeConfig.getMapList("requirements"); + List requirements = new ArrayList<>(); + + for (Map reqConfig : requirementsConfig) { + SafeConfig reqSafeConfig = SafeConfig.of(reqConfig); + + String typeStr = reqSafeConfig.getString("type"); + UpgradesComponent.UpgradeRequirement.RequirementType type = + UpgradesComponent.UpgradeRequirement.RequirementType.valueOf(typeStr.toUpperCase()); + + Object requirementData; + + switch (type) { + case ESSENCE -> { + String essence = reqSafeConfig.getString("essence"); + int amount = reqSafeConfig.getInt("amount"); + requirementData = new UpgradesComponent.UpgradeRequirement.EssenceRequirement(essence, amount); + } + case ITEM -> { + String itemName = reqSafeConfig.getString("item"); + ItemType itemType = ItemType.valueOf(itemName); + int amount = reqSafeConfig.getInt("amount"); + requirementData = new UpgradesComponent.UpgradeRequirement.ItemRequirement(itemType, amount); + } + default -> throw new IllegalArgumentException("Unknown requirement type: " + type); + } + + requirements.add(new UpgradesComponent.UpgradeRequirement(type, requirementData)); } + + levels.add(new UpgradesComponent.UpgradeLevel(level, requirements)); } - perLevelStatistics.put(Rarity.valueOf(rarity.toUpperCase()), rarityBuilder.build()); - } - - // Parse other fields - Particle particleId = Particle.fromId((Integer) config.get("particle")); - String skillCategory = (String) config.get("skill_category"); - String skullTexture = (String) config.get("skull_texture"); - String handlerId = (String) config.get("handler_id"); - - yield new PetComponent( - petName, - georgePrice, - katUpgrades, - baseStatistics, - perLevelStatistics, - particleId, - skillCategory, - skullTexture, - handlerId - ); - } - default -> throw new IllegalArgumentException("Unknown component type: " + id); - }; + + yield new UpgradesComponent(levels); + } + default -> throw new IllegalArgumentException("Unknown component type: " + id); + }; + } catch (SafeConfig.ConfigParseException e) { + Logger.error("Failed to parse component {} for item {}: {}", id, itemId, e.getMessage()); + return null; + } catch (Exception e) { + Logger.error("Unexpected error parsing component {} for item {}: {}", id, itemId, e.getMessage()); + e.printStackTrace(); + return null; + } } private static KatUpgrade parseKatUpgrade(Map config) { - if (config == null) return null; + if (config == null || config.isEmpty()) return null; - Long time = ((Number) config.get("time")).longValue(); - Integer coins = (Integer) config.get("coins"); + SafeConfig safeConfig = SafeConfig.of(config); + Long time = safeConfig.getLong("time"); + Integer coins = safeConfig.getInt("coins"); - if (config.containsKey("item")) { - String item = (String) config.get("item"); - Integer amount = (Integer) config.get("amount"); + if (safeConfig.containsKey("item")) { + String item = safeConfig.getString("item"); + Integer amount = safeConfig.getInt("amount"); return KatUpgrade.WithItem(time, coins, ItemType.valueOf(item), amount); } return KatUpgrade.OnlyCoins(time, coins); } + + private static List parseGemstoneEntries(List> gemstoneEntries) { + List slots = new ArrayList<>(); + + for (Map entry : gemstoneEntries) { + SafeConfig entryConfig = SafeConfig.of(entry); + + String gemstoneName = entryConfig.getString("gemstone"); + Gemstone.Slots slot; + try { + slot = Gemstone.Slots.valueOf(gemstoneName); + } catch (IllegalArgumentException e) { + slot = Gemstone.Slots.UNIVERSAL; + } + + int coins = entryConfig.getInt("coins", 50000); + List itemRequirements = new ArrayList<>(); + + if (entryConfig.containsKey("items")) { + List items = entryConfig.getList("items", String.class); + for (String item : items) { + String[] itemParts = item.split(":"); + if (itemParts.length == 2) { + ItemType itemId = ItemType.valueOf(itemParts[0]); + int amount = Integer.parseInt(itemParts[1]); + itemRequirements.add(new GemstoneComponent.ItemRequirement(itemId, amount)); + } + } + } + + slots.add(new GemstoneComponent.GemstoneSlot(slot, coins, itemRequirements)); + } + + return slots; + } } \ No newline at end of file diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java index 7247d750f..50f3bc6a1 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java @@ -141,7 +141,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { List itemStatistics = new ArrayList<>(List.of(ItemStatistic.DAMAGE, ItemStatistic.STRENGTH, ItemStatistic.CRIT_CHANCE, ItemStatistic.CRIT_DAMAGE, ItemStatistic.SEA_CREATURE_CHANCE, ItemStatistic.BONUS_ATTACK_SPEED, ItemStatistic.ABILITY_DAMAGE, ItemStatistic.HEALTH, ItemStatistic.DEFENSE, - ItemStatistic.SPEED, ItemStatistic.INTELLIGENCE, ItemStatistic.MAGIC_FIND, ItemStatistic.PET_LUCK, ItemStatistic.TRUE_DEFENSE, ItemStatistic.HEALTH_REGEN, + ItemStatistic.SPEED, ItemStatistic.INTELLIGENCE, ItemStatistic.MAGIC_FIND, ItemStatistic.PET_LUCK, ItemStatistic.TRUE_DEFENSE, ItemStatistic.HEALTH_REGENERATION, ItemStatistic.MENDING, ItemStatistic.VITALITY, ItemStatistic.FEROCITY, ItemStatistic.MINING_SPEED, ItemStatistic.MINING_FORTUNE, ItemStatistic.FARMING_FORTUNE, ItemStatistic.FORAGING_FORTUNE, ItemStatistic.BONUS_PEST_CHANCE, ItemStatistic.COLD_RESISTANCE, ItemStatistic.PRISTINE, ItemStatistic.SWING_RANGE)); @@ -317,7 +317,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { } // Handle full set abilities - if (ArmorSetRegistry.getArmorSet(handler.getPotentialType()) != null) { + if (ArmorSetRegistry.getArmorSet(handler.getPotentialType()) != null && ArmorSetRegistry.getArmorSet(handler.getPotentialType()).getClazz() != null) { ArmorSet armorSet = ArmorSetRegistry.getArmorSet(handler.getPotentialType()).getClazz().getDeclaredConstructor().newInstance(); int wearingAmount = 0; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/SafeConfig.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/SafeConfig.java new file mode 100644 index 000000000..9b4bbb7ed --- /dev/null +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/SafeConfig.java @@ -0,0 +1,260 @@ +package net.swofty.type.skyblockgeneric.item; + +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; + +import java.util.*; + +public class SafeConfig { + final Map config; + private final String path; + + public SafeConfig(Map config) { + this(config, ""); + } + + private SafeConfig(Map config, String path) { + this.config = config != null ? config : new HashMap<>(); + this.path = path; + } + + @Nullable + public String getString(String key) { + return get(key, String.class, null); + } + + public String getString(String key, String defaultValue) { + Object value = config.get(key); + if (value == null) { + return defaultValue; + } + + return value.toString(); + } + + public int getInt(String key) { + return getInt(key, 0); + } + + public int getInt(String key, int defaultValue) { + Object value = config.get(key); + switch (value) { + case null -> { + return defaultValue; + } + case Number number -> { + return number.intValue(); + } + case String string -> { + try { + return Integer.parseInt(string); + } catch (NumberFormatException e) { + return defaultValue; + } + } + default -> { + } + } + + return defaultValue; + } + + public long getLong(String key) { + return getLong(key, 0); + } + + public long getLong(String key, int defaultValue) { + Object value = config.get(key); + switch (value) { + case null -> { + return defaultValue; + } + case Number number -> { + return number.intValue(); + } + case String string -> { + try { + return Long.parseLong(string); + } catch (NumberFormatException e) { + return defaultValue; + } + } + default -> { + } + } + + return defaultValue; + } + + public double getDouble(String key) { + return getDouble(key, 0.0); + } + + public double getDouble(String key, double defaultValue) { + Object value = config.get(key); + switch (value) { + case null -> { + return defaultValue; + } + case Number number -> { + return number.doubleValue(); + } + case String string -> { + try { + return Double.parseDouble(string); + } catch (NumberFormatException e) { + return defaultValue; + } + } + default -> { + } + } + + return defaultValue; + } + + public boolean getBoolean(String key) { + return getBoolean(key, false); + } + + public boolean getBoolean(String key, boolean defaultValue) { + Object value = config.get(key); + return switch (value) { + case Boolean bool -> bool; + case String string -> Boolean.parseBoolean(string); + case null, default -> defaultValue; + }; + + } + + @Nullable + public T get(String key, Class type, @Nullable T defaultValue) { + Object value = config.get(key); + if (value == null) return defaultValue; + + try { + return (T) value; + } catch (ClassCastException e) { + throw new ConfigParseException( + String.format("Expected type %s for key '%s%s', got %s", + type.getSimpleName(), path, key, value.getClass().getSimpleName()) + ); + } + } + + @NotNull + public List> getMapList(String key) { + Object value = config.get(key); + if (value == null) return new ArrayList<>(); + + if (value instanceof List list) { + List> result = new ArrayList<>(); + for (Object element : list) { + if (element instanceof Map) { + try { + result.add((Map) element); + } catch (ClassCastException e) { + throw new ConfigParseException( + String.format("Expected List> for key '%s%s'", path, key) + ); + } + } else { + throw new ConfigParseException( + String.format("Expected Map in list for key '%s%s', got %s", + path, key, element.getClass().getSimpleName()) + ); + } + } + return result; + } + throw new ConfigParseException( + String.format("Expected List for key '%s%s', got %s", path, key, value.getClass().getSimpleName()) + ); + } + + @NotNull + public List getList(String key, Class elementType) { + Object value = config.get(key); + if (value == null) return new ArrayList<>(); + + if (value instanceof List list) { + List result = new ArrayList<>(); + for (Object element : list) { + try { + result.add((T) element); + } catch (ClassCastException e) { + throw new ConfigParseException( + String.format("Expected List<%s> for key '%s%s'", + elementType.getSimpleName(), path, key) + ); + } + } + return result; + } + throw new ConfigParseException( + String.format("Expected List for key '%s%s', got %s", path, key, value.getClass().getSimpleName()) + ); + } + + @NotNull + public Map getMap(String key) { + Object value = config.get(key); + if (value == null) return new HashMap<>(); + + if (value instanceof Map) { + try { + return (Map) value; + } catch (ClassCastException e) { + throw new ConfigParseException( + String.format("Expected Map for key '%s%s'", path, key) + ); + } + } + throw new ConfigParseException( + String.format("Expected Map for key '%s%s', got %s", path, key, value.getClass().getSimpleName()) + ); + } + + @NotNull + public SafeConfig getNested(String key) { + return new SafeConfig(getMap(key), path + key + "."); + } + + public boolean containsKey(String key) { + return config.containsKey(key); + } + + @NotNull + public Set getKeys() { + return config.keySet(); + } + + @NotNull + public > T getEnum(String key, Class enumClass) { + String value = getString(key); + if (value == null) { + throw new ConfigParseException( + String.format("Missing required enum value for key '%s%s'", path, key) + ); + } + + try { + return Enum.valueOf(enumClass, value.toUpperCase()); + } catch (IllegalArgumentException e) { + throw new ConfigParseException( + String.format("Invalid enum value '%s' for key '%s%s'. Valid values: %s", + value, path, key, Arrays.toString(enumClass.getEnumConstants())) + ); + } + } + + public static SafeConfig of(Map config) { + return new SafeConfig(config); + } + + public static class ConfigParseException extends RuntimeException { + public ConfigParseException(String message) { + super(message); + } + } +} \ No newline at end of file diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/CustomDropComponent.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/CustomDropComponent.java index 040fbcf41..c9fb34370 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/CustomDropComponent.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/CustomDropComponent.java @@ -94,6 +94,8 @@ public record DropRule( List drops ) { public boolean matches(SkyBlockItem brokenWith, SkyBlockRegion region, ServerType serverType, boolean isOnIsland) { + if (conditions == null) return true; + return conditions.matches(brokenWith, region, serverType, isOnIsland); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/GemstoneComponent.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/GemstoneComponent.java index da7b86b0a..bbe3b15c3 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/GemstoneComponent.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/GemstoneComponent.java @@ -10,17 +10,18 @@ public class GemstoneComponent extends SkyBlockItemComponent { private final List slots; - public GemstoneComponent(List gemstoneConfigs) { - this.slots = gemstoneConfigs.stream() - .map(config -> { - String[] parts = config.split(":"); - return new GemstoneSlot( - Gemstone.Slots.valueOf(parts[0]), - Integer.parseInt(parts[1]) - ); - }) - .toList(); + public GemstoneComponent(List slots) { + this.slots = slots; } - public record GemstoneSlot(Gemstone.Slots slot, int unlockPrice) {} + public record GemstoneSlot( + Gemstone.Slots slot, + int unlockPrice, + List itemRequirements + ) {} + + public record ItemRequirement( + net.swofty.commons.skyblock.item.ItemType itemId, + int amount + ) {} } \ No newline at end of file diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/MuseumComponent.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/MuseumComponent.java index 35aa029f6..416d932b6 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/MuseumComponent.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/MuseumComponent.java @@ -4,11 +4,23 @@ import net.swofty.type.skyblockgeneric.item.SkyBlockItemComponent; import net.swofty.type.skyblockgeneric.museum.MuseumableItemCategory; +import java.util.List; +import java.util.Map; + @Getter public class MuseumComponent extends SkyBlockItemComponent { private final MuseumableItemCategory category; + private final String gameStage; + private final int donationXp; + private final Map parent; + private final List mappedItemIds; - public MuseumComponent(String category) { - this.category = MuseumableItemCategory.valueOf(category); + public MuseumComponent(String category, String gameStage, int donationXp, + Map parent, List mappedItemIds) { + this.category = MuseumableItemCategory.valueOf(category.toUpperCase()); + this.gameStage = gameStage; + this.donationXp = donationXp; + this.parent = parent; + this.mappedItemIds = mappedItemIds; } } \ No newline at end of file diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/UpgradesComponent.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/UpgradesComponent.java new file mode 100644 index 000000000..a220ec06b --- /dev/null +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/components/UpgradesComponent.java @@ -0,0 +1,41 @@ +package net.swofty.type.skyblockgeneric.item.components; + +import lombok.Getter; +import net.swofty.commons.skyblock.item.ItemType; +import net.swofty.type.skyblockgeneric.item.SkyBlockItemComponent; + +import java.util.List; + +@Getter +public class UpgradesComponent extends SkyBlockItemComponent { + private final List levels; + + public UpgradesComponent(List levels) { + this.levels = levels; + } + + public record UpgradeLevel( + int level, + List requirements + ) {} + + public record UpgradeRequirement( + RequirementType type, + Object requirementData + ) { + public enum RequirementType { + ESSENCE, + ITEM + } + + public record EssenceRequirement( + String essence, + int amount + ) {} + + public record ItemRequirement( + ItemType item, + int amount + ) {} + } +} \ No newline at end of file diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/ArmorSetRegistry.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/ArmorSetRegistry.java index 076adf391..3f80a039e 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/ArmorSetRegistry.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/ArmorSetRegistry.java @@ -17,7 +17,9 @@ public enum ArmorSetRegistry { MUSHROOM(MushroomSet.class, ItemType.MUSHROOM_BOOTS, ItemType.MUSHROOM_LEGGINGS, ItemType.MUSHROOM_CHESTPLATE, ItemType.MUSHROOM_HELMET), LAPIS(LapisArmorSet.class, ItemType.LAPIS_ARMOR_BOOTS, ItemType.LAPIS_ARMOR_LEGGINGS, ItemType.LAPIS_ARMOR_CHESTPLATE, ItemType.LAPIS_ARMOR_HELMET), MINER(MinerArmorSet.class, ItemType.MINER_ARMOR_BOOTS, ItemType.MINER_ARMOR_LEGGINGS, ItemType.MINER_ARMOR_CHESTPLATE, ItemType.MINER_ARMOR_HELMET), - PUMPKIN(PumpkinSet.class, ItemType.PUMPKIN_BOOTS, ItemType.PUMPKIN_LEGGINGS, ItemType.PUMPKIN_CHESTPLATE, ItemType.PUMPKIN_HELMET); + PUMPKIN(PumpkinSet.class, ItemType.PUMPKIN_BOOTS, ItemType.PUMPKIN_LEGGINGS, ItemType.PUMPKIN_CHESTPLATE, ItemType.PUMPKIN_HELMET), + PARK_ARMOR(null, ItemType.MELODY_SHOES, ItemType.CHARLIE_TROUSERS, ItemType.KELLY_TSHIRT, ItemType.MOLE_HAT), + ; private final Class clazz; private final ItemType boots; @@ -34,7 +36,7 @@ public enum ArmorSetRegistry { this.helmet = helmet; } - public static ArmorSetRegistry getArmorSet(Class clazz) { + public static @Nullable ArmorSetRegistry getArmorSet(Class clazz) { for (ArmorSetRegistry armorSetRegistry : values()) { if (armorSetRegistry.getClazz() == clazz) { return armorSetRegistry; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/CheapTuxedoSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/CheapTuxedoSet.java index 8bdf8c5a2..1538a4c99 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/CheapTuxedoSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/CheapTuxedoSet.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class CheapTuxedoSet extends SkyBlockValueEvent implements ArmorSet { @Override @@ -18,7 +19,7 @@ public String getName() { @Override public ArrayList getDescription() { - return new ArrayList<>(Arrays.asList( + return new ArrayList<>(List.of( "Max health set to §c75♥§7.", "Deal §c+50% §7damage!", "§8Very stylish." diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/ElegantTuxedoSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/ElegantTuxedoSet.java index 5838a73ee..b592cb429 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/ElegantTuxedoSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/ElegantTuxedoSet.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class ElegantTuxedoSet extends SkyBlockValueEvent implements ArmorSet { @Override @@ -18,7 +19,7 @@ public String getName() { @Override public ArrayList getDescription() { - return new ArrayList<>(Arrays.asList( + return new ArrayList<>(List.of( "Max health set to §c250♥§7.", "Deal §c+150% §7damage!", "§8Very stylish." diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/FancyTuxedoSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/FancyTuxedoSet.java index a2d9ec818..237c63b87 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/FancyTuxedoSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/FancyTuxedoSet.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class FancyTuxedoSet extends SkyBlockValueEvent implements ArmorSet { @Override @@ -18,7 +19,7 @@ public String getName() { @Override public ArrayList getDescription() { - return new ArrayList<>(Arrays.asList( + return new ArrayList<>(List.of( "Max health set to §c150♥§7.", "Deal §c+100% §7damage!", "§8Very stylish." diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/LeafletSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/LeafletSet.java index 9632ef812..adc1bde21 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/LeafletSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/LeafletSet.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class LeafletSet extends SkyBlockValueEvent implements ArmorSet { @Override @@ -18,7 +19,7 @@ public String getName() { @Override public ArrayList getDescription() { - return new ArrayList<>(Arrays.asList( + return new ArrayList<>(List.of( "While in a Forest zone you regain §a5.0", "§c♥ Health §7every second." )); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MinerOutfitSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MinerOutfitSet.java index 38db910ff..8f68704aa 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MinerOutfitSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MinerOutfitSet.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class MinerOutfitSet implements ArmorSet, SetEvents, MuseumableSet { @@ -19,7 +20,7 @@ public String getName() { @Override public ArrayList getDescription() { - return new ArrayList<>(Arrays.asList( + return new ArrayList<>(List.of( "§7Grants the wearer with §apermanent", "§aHaste II §7while worn." )); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MushroomSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MushroomSet.java index be4317347..0c3d977d1 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MushroomSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/MushroomSet.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class MushroomSet implements ArmorSet, SetEvents { @Override @@ -17,7 +18,7 @@ public String getName() { @Override public ArrayList getDescription() { - return new ArrayList<>(Arrays.asList( + return new ArrayList<>(List.of( "§7Grants the wearer permanent §aNight", "§aVision §7while worn. During the night,", "the stats of the armor pieces are", diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/PumpkinSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/PumpkinSet.java index 1b0cb0a85..fbdc0419a 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/PumpkinSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/set/sets/PumpkinSet.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class PumpkinSet extends SkyBlockValueEvent implements ArmorSet { @Override @@ -18,7 +19,7 @@ public String getName() { @Override public ArrayList getDescription() { - return new ArrayList<>(Arrays.asList( + return new ArrayList<>(List.of( "Reduces all taken damage by §a+10%", "and deal &a+10% §7more damage." )); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/potion/PotionEffectType.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/potion/PotionEffectType.java index 32fc962dc..da412154b 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/potion/PotionEffectType.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/potion/PotionEffectType.java @@ -46,7 +46,7 @@ public enum PotionEffectType { REGENERATION("Regeneration", PotionEffectCategory.BUFF, 9, 45, level -> ItemStatistics.builder() - .withBase(ItemStatistic.HEALTH_REGEN, 5.0 + (level - 1) * 5.0) // +5 to +45 Health Regen + .withBase(ItemStatistic.HEALTH_REGENERATION, 5.0 + (level - 1) * 5.0) // +5 to +45 Health Regen .build(), PotionEffect.REGENERATION), @@ -191,7 +191,7 @@ public enum PotionEffectType { WOUNDED("Wounded", PotionEffectCategory.DEBUFF, 4, 45, level -> ItemStatistics.builder() - .withBase(ItemStatistic.HEALTH_REGEN, -25.0 * level) // -25 to -100% healing + .withBase(ItemStatistic.HEALTH_REGENERATION, -25.0 * level) // -25 to -100% healing .build(), null), @@ -344,7 +344,7 @@ public String getDescription(int level) { case STRENGTH -> "Increases §cStrength §7by §c" + stats.getOverall(ItemStatistic.STRENGTH).intValue() + "§7."; case CRITICAL -> "Grants §9+" + stats.getOverall(ItemStatistic.CRIT_CHANCE).intValue() + "% Crit Chance §7and §9+" + stats.getOverall(ItemStatistic.CRIT_DAMAGE).intValue() + "% Crit Damage§7."; case HASTE -> "Increases §6Mining Speed §7by §6" + stats.getOverall(ItemStatistic.MINING_SPEED).intValue() + "§7."; - case REGENERATION -> "Increases §cHealth Regen §7by §c" + stats.getOverall(ItemStatistic.HEALTH_REGEN).intValue() + "§7."; + case REGENERATION -> "Increases §cHealth Regen §7by §c" + stats.getOverall(ItemStatistic.HEALTH_REGENERATION).intValue() + "§7."; case RESISTANCE -> "Increases §aDefense §7by §a" + stats.getOverall(ItemStatistic.DEFENSE).intValue() + "§7."; case MANA -> "Regenerate §b" + level + " Mana §7per second."; case ABSORPTION -> "Grants §6" + stats.getOverall(ItemStatistic.HEALTH).intValue() + " Absorption Hearts§7.";