From 49a8ca37a1b4271dc2e9d5f2652d386728b3ee2c Mon Sep 17 00:00:00 2001 From: SammySemicolon <69329424+SammySemicolon@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:08:38 +0100 Subject: [PATCH] I wanna sleep on their chest I miss them lots --- gradle.properties | 2 +- .../resources/assets/malum/lang/en_us.json | 46 ++++--- .../malum/models/item/ravenous_brooch.json | 6 + .../data/curios/tags/items/brooch.json | 3 +- .../spirit_infusion/belt_of_the_starved.json | 8 +- .../spirit_infusion/ravenous_brooch.json | 26 ++++ .../ring_of_desperate_voracity.json | 14 +-- .../spirit_infusion/ring_of_the_hoarder.json | 6 +- ...ava => MalignantStrongholdArmorModel.java} | 8 +- .../codex/entries/AugmentationEntries.java | 20 +-- .../codex/entries/RuneWorkingEntries.java | 48 ++++++-- .../runic_workbench/RunicWorkbenchBlock.java | 19 +++ .../item/IMalumEventResponderItem.java | 2 +- .../systems => common}/item/IVoidItem.java | 2 +- .../item/curiosities}/MagicKnifeItem.java | 3 +- .../item/curiosities}/MalumKnifeItem.java | 2 +- .../armor/MalignantStrongholdArmorItem.java | 6 +- .../curios/AbstractMalumCurioItem.java | 74 +++++++++++ .../curiosities/curios/MalumCurioItem.java | 99 ++++++--------- .../alchemical/CurioAlchemicalRing.java | 61 --------- .../CurioGlassBrooch.java | 4 +- .../curios/brooches/CurioRavenousBrooch.java | 38 ++++++ .../CurioRunicBrooch.java | 4 +- .../CurioSacrificialBrooch.java | 2 +- .../curios/runes/MalumRuneCurioItem.java | 26 ++++ .../runes/RuneAlimentCleansingItem.java | 15 ++- .../{ => curios}/runes/RuneCullingItem.java | 2 +- .../{ => curios}/runes/RuneDexterityItem.java | 15 ++- .../curios/runes/RuneHasteItem.java | 17 +++ .../runes/RuneIdleRestorationItem.java | 14 +-- .../runes/RuneReactiveShieldingItem.java | 14 +-- .../runes/RuneReinforcementItem.java | 2 +- .../runes/RuneVolatileDistortionItem.java | 14 +-- .../runes/corrupted/RuneBolsteringItem.java | 4 +- .../runes/corrupted/RuneHereticItem.java | 16 +-- .../corrupted/RuneIgneousSolaceItem.java | 16 +-- .../RuneSacrificialEmpowermentItem.java | 16 +-- .../runes/corrupted/RuneSpellMasteryItem.java | 4 +- .../runes/corrupted/RuneToughnessItem.java | 4 +- .../corrupted/RuneTwinnedDurationItem.java | 17 ++- .../corrupted/RuneUnnaturalStaminaItem.java | 16 +-- .../sets/alchemical/CurioAlchemicalRing.java | 48 ++++++++ .../alchemical/CurioCurativeRing.java | 16 +-- .../alchemical/CurioRingOfProwess.java | 11 +- .../{ => sets}/misc/CurioHarmonyNecklace.java | 9 +- .../{ => sets}/misc/CurioNarrowNecklace.java | 9 +- .../{ => sets}/misc/CurioWaterNecklace.java | 11 +- .../prospector/CurioDemolitionistRing.java | 9 +- .../prospector/CurioHoarderRing.java | 9 +- .../prospector/CurioProspectorBelt.java | 9 +- .../{ => sets}/rotten/CurioStarvedBelt.java | 11 +- .../{ => sets}/rotten/CurioVoraciousRing.java | 29 +++-- .../soulward/CurioMagebaneBelt.java | 11 +- .../spirit/CurioArcaneSpoilRing.java | 2 +- .../spirit/CurioMirrorNecklace.java | 4 +- .../weeping/CurioGrowingFleshRing.java | 11 +- .../weeping/CurioGruesomeSatiationRing.java | 13 +- .../weeping/CurioHiddenBladeNecklace.java | 14 ++- .../weeping/CurioLimitlessBelt.java | 25 ++-- .../weeping/CurioPlentifulRing.java | 4 +- .../sets/weeping/CurioWatcherNecklace.java | 17 +++ .../soulward/CurioReinforcementRing.java | 30 ----- .../curios/weeping/CurioWatcherNecklace.java | 10 -- .../curiosities/runes/MalumRuneCurioItem.java | 51 -------- .../item/curiosities/runes/RuneHasteItem.java | 17 --- .../item/curiosities/weapons/TyrvingItem.java | 2 +- .../weapons/scythe/MalumScytheItem.java | 2 +- .../weapons/staff/AbstractStaffItem.java | 2 +- .../item/{ => misc}/BlightedGunkItem.java | 2 +- .../item/{ => misc}/BrillianceChunkItem.java | 2 +- .../item/{ => misc}/CalcifiedBlightItem.java | 2 +- .../{ => misc}/FusedConsciousnessItem.java | 4 +- .../common/recipe/AbstractMalumRecipe.java | 50 ++++++++ .../recipe/AbstractSpiritListMalumRecipe.java | 53 ++++++++ .../common/recipe/FavorOfTheVoidRecipe.java | 61 +++------ .../common/recipe/RunicWorkbenchRecipe.java | 84 +++++++++++++ .../common/recipe/SpiritFocusingRecipe.java | 101 +++------------ .../common/recipe/SpiritInfusionRecipe.java | 102 +++------------ .../common/recipe/SpiritRepairRecipe.java | 72 +++-------- .../recipe/SpiritTransmutationRecipe.java | 63 +++------- .../common/worldgen/WeepingWellStructure.java | 2 +- .../farmersdelight/FarmersDelightCompat.java | 3 +- .../malum/core/events/RuntimeEvents.java | 14 +-- .../core/handlers/EsotericReapingHandler.java | 5 +- .../handlers/ReserveStaffChargeHandler.java | 24 ---- .../malum/core/handlers/SoulWardHandler.java | 10 +- .../core/handlers/SpiritHarvestHandler.java | 2 +- .../listeners/ReapingDataReloadListener.java | 16 ++- .../listeners/RitualRecipeReloadListener.java | 3 - .../core/systems/item/ISoulContainerItem.java | 6 - .../reaping/MalumReapingDropsData.java | 18 --- .../core/systems/rites/MalumRiteType.java | 2 +- .../core/systems/ritual/MalumRitualType.java | 2 +- .../java/com/sammy/malum/data/MalumLang.java | 52 +++++--- .../malum/data/item/MalumItemModels.java | 41 +++---- .../sammy/malum/data/recipe/MalumRecipes.java | 5 +- .../data/recipe/MalumRuneworkingRecipes.java | 97 +++++++++++++++ .../builder/RunicWorkbenchRecipeBuilder.java | 116 ++++++++++++++++++ .../builder/SpiritRepairRecipeBuilder.java | 1 - .../infusion/CurioSpiritInfusionRecipes.java | 33 ++--- .../com/sammy/malum/mixin/ExplosionMixin.java | 6 +- .../sammy/malum/mixin/LocalPlayerMixin.java | 2 +- .../malum/registry/client/ModelRegistry.java | 6 +- .../registry/common/item/ItemRegistry.java | 25 ++-- .../recipe/RecipeSerializerRegistry.java | 3 +- .../common/recipe/RecipeTypeRegistry.java | 1 + .../visual_effects/ScreenParticleEffects.java | 2 +- .../malum/models/block/runic_workbench.json | 17 ++- .../malum/textures/block/runic_workbench.png | Bin 882 -> 837 bytes .../malum/textures/item/ravenous_brooch.png | Bin 0 -> 567 bytes 110 files changed, 1283 insertions(+), 928 deletions(-) create mode 100644 src/generated/resources/assets/malum/models/item/ravenous_brooch.json create mode 100644 src/generated/resources/data/malum/recipes/spirit_infusion/ravenous_brooch.json rename src/main/java/com/sammy/malum/client/model/{MalignantLeadArmorModel.java => MalignantStrongholdArmorModel.java} (99%) rename src/main/java/com/sammy/malum/{core/systems => common}/item/IMalumEventResponderItem.java (96%) rename src/main/java/com/sammy/malum/{core/systems => common}/item/IVoidItem.java (94%) rename src/main/java/com/sammy/malum/{core/systems/item => common/item/curiosities}/MagicKnifeItem.java (91%) rename src/main/java/com/sammy/malum/{core/systems/item => common/item/curiosities}/MalumKnifeItem.java (96%) create mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/AbstractMalumCurioItem.java delete mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioAlchemicalRing.java rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{brooch => brooches}/CurioGlassBrooch.java (93%) create mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioRavenousBrooch.java rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{brooch => brooches}/CurioRunicBrooch.java (93%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{brooch => brooches}/CurioSacrificialBrooch.java (94%) create mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/MalumRuneCurioItem.java rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/RuneAlimentCleansingItem.java (86%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/RuneCullingItem.java (92%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/RuneDexterityItem.java (87%) create mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneHasteItem.java rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/RuneIdleRestorationItem.java (72%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/RuneReactiveShieldingItem.java (80%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/RuneReinforcementItem.java (93%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/RuneVolatileDistortionItem.java (77%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneBolsteringItem.java (84%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneHereticItem.java (78%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneIgneousSolaceItem.java (67%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneSacrificialEmpowermentItem.java (75%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneSpellMasteryItem.java (88%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneToughnessItem.java (84%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneTwinnedDurationItem.java (78%) rename src/main/java/com/sammy/malum/common/item/curiosities/{ => curios}/runes/corrupted/RuneUnnaturalStaminaItem.java (76%) create mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioAlchemicalRing.java rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/alchemical/CurioCurativeRing.java (58%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/alchemical/CurioRingOfProwess.java (73%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/misc/CurioHarmonyNecklace.java (83%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/misc/CurioNarrowNecklace.java (75%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/misc/CurioWaterNecklace.java (87%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/prospector/CurioDemolitionistRing.java (69%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/prospector/CurioHoarderRing.java (80%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/prospector/CurioProspectorBelt.java (87%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/rotten/CurioStarvedBelt.java (86%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/rotten/CurioVoraciousRing.java (78%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/soulward/CurioMagebaneBelt.java (84%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/spirit/CurioArcaneSpoilRing.java (92%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/spirit/CurioMirrorNecklace.java (90%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/weeping/CurioGrowingFleshRing.java (80%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/weeping/CurioGruesomeSatiationRing.java (82%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/weeping/CurioHiddenBladeNecklace.java (67%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/weeping/CurioLimitlessBelt.java (81%) rename src/main/java/com/sammy/malum/common/item/curiosities/curios/{ => sets}/weeping/CurioPlentifulRing.java (88%) create mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioWatcherNecklace.java delete mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioReinforcementRing.java delete mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioWatcherNecklace.java delete mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/runes/MalumRuneCurioItem.java delete mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneHasteItem.java rename src/main/java/com/sammy/malum/common/item/{ => misc}/BlightedGunkItem.java (97%) rename src/main/java/com/sammy/malum/common/item/{ => misc}/BrillianceChunkItem.java (96%) rename src/main/java/com/sammy/malum/common/item/{ => misc}/CalcifiedBlightItem.java (95%) rename src/main/java/com/sammy/malum/common/item/{ => misc}/FusedConsciousnessItem.java (77%) create mode 100644 src/main/java/com/sammy/malum/common/recipe/AbstractMalumRecipe.java create mode 100644 src/main/java/com/sammy/malum/common/recipe/AbstractSpiritListMalumRecipe.java create mode 100644 src/main/java/com/sammy/malum/common/recipe/RunicWorkbenchRecipe.java delete mode 100644 src/main/java/com/sammy/malum/core/systems/item/ISoulContainerItem.java delete mode 100644 src/main/java/com/sammy/malum/core/systems/reaping/MalumReapingDropsData.java create mode 100644 src/main/java/com/sammy/malum/data/recipe/MalumRuneworkingRecipes.java create mode 100644 src/main/java/com/sammy/malum/data/recipe/builder/RunicWorkbenchRecipeBuilder.java create mode 100644 src/main/resources/assets/malum/textures/item/ravenous_brooch.png diff --git a/gradle.properties b/gradle.properties index d031fcd7c..82058446a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,4 +37,4 @@ modDescription=A dark magic mod focused on soul and spirit magic. # Mod Dependency Versions lodestoneVersion=1.4.2.79 jeiVersion=15.2.0.22 -curiosVersion=5.7.0+1.20.1 \ No newline at end of file +curiosVersion=5.7.1+1.20.1 \ No newline at end of file diff --git a/src/generated/resources/assets/malum/lang/en_us.json b/src/generated/resources/assets/malum/lang/en_us.json index 3664a3213..29142647d 100644 --- a/src/generated/resources/assets/malum/lang/en_us.json +++ b/src/generated/resources/assets/malum/lang/en_us.json @@ -241,8 +241,6 @@ "curios.identifier.rune": "Rune", "curios.modifiers.brooch": "When worn:", "curios.modifiers.rune": "When equipped:", - "curios.slot.brooch": "Brooch", - "curios.slot.rune": "Rune", "death.attack.scythe_sweep": "%s was sliced in half", "death.attack.scythe_sweep.player": "%s was sliced in half by %s", "death.attack.voodoo": "%s had their soul shattered", @@ -417,6 +415,7 @@ "item.malum.pride_prideweave": "Pride Prideweave", "item.malum.prismatic_focus_lens": "Prismatic Focus Lens", "item.malum.processed_soulstone": "Processed Soulstone", + "item.malum.ravenous_brooch": "Ravenous Brooch", "item.malum.raw_soulstone": "Raw Soulstone", "item.malum.ring_of_alchemical_mastery": "Ring of Alchemical Mastery", "item.malum.ring_of_arcane_prowess": "Ring of Arcane Prowess", @@ -1015,7 +1014,24 @@ "malum.gui.crucible.attribute.shielding_chance": "Shielding Chance", "malum.gui.crucible.attribute.tuning_potency": "Tuning Potency", "malum.gui.crucible.attribute.weakest_boost": "Weakest Boost", - "malum.gui.effect": "Effect: ", + "malum.gui.curio.effect.belt_of_the_limitless": "+Soul Ward Absorbs Physical Damage Equally to Magic Damage", + "malum.gui.curio.effect.belt_of_the_magebane": "+Magic Damage no Longer Impedes Soul Ward Recovery", + "malum.gui.curio.effect.belt_of_the_prospector": "+Explosions are Enchanted with Fortune III\n+Protects Valuable Items from Explosions", + "malum.gui.curio.effect.belt_of_the_starved": "+Spirit Collection Generates Gluttony\n -Gluttony Exchanges Hunger for Magic Proficiency", + "malum.gui.curio.effect.necklace_of_blissful_harmony": "+Reduces Enemy Aggression", + "malum.gui.curio.effect.necklace_of_the_hidden_blade": "+Enables a Powerful Scythe Counter Attack When Struck", + "malum.gui.curio.effect.necklace_of_the_narrow_edge": "-Disables Scythe Sweeping", + "malum.gui.curio.effect.necklace_of_the_watcher": "+Striking Full Health Targets Triggers Spirit Collection Effects", + "malum.gui.curio.effect.necklace_of_tidal_affinity": "+Conduit Power Provides Numerous Benefits", + "malum.gui.curio.effect.ravenous_brooch": "-Actively Drains Hunger", + "malum.gui.curio.effect.ring_of_alchemical_mastery": "+Spirit Collection Aids Potion Durations", + "malum.gui.curio.effect.ring_of_arcane_prowess": "+Spirit Collection Generates Experience Points", + "malum.gui.curio.effect.ring_of_curative_talent": "+Spirit Collection Replenishes Health", + "malum.gui.curio.effect.ring_of_desperate_voracity": "+Rotten Foods are Tastier\n+Eating Rotten Foods Extends Gluttony", + "malum.gui.curio.effect.ring_of_growing_flesh": "+Spirit Collection Grants Extra Hearts", + "malum.gui.curio.effect.ring_of_gruesome_satiation": "+Eating Rotten Foods Generates Gluttony", + "malum.gui.curio.effect.ring_of_the_demolitionist": "+Improves Explosions", + "malum.gui.curio.effect.ring_of_the_hoarder": "+Blown Up Blocks Are Teleported To Your Location", "malum.gui.rite.aerial_rite": "Rite of Motion", "malum.gui.rite.aqueous_rite": "Rite of Loyalty", "malum.gui.rite.arcane_rite": "Undirected Rite", @@ -1049,6 +1065,7 @@ "malum.gui.rite.sacred_rite": "Rite of Healing", "malum.gui.rite.type": "Type: ", "malum.gui.rite.wicked_rite": "Rite of Decay", + "malum.gui.rite_effect": "Effect: ", "malum.gui.ritual.cthonic_conversion": "Cthonic Conversion", "malum.gui.ritual.grotesque_expulsion": "Grotesque Expulsion", "malum.gui.ritual.hexing_transmission": "Hexing Transmission", @@ -1063,18 +1080,17 @@ "malum.gui.ritual.tier.vivid": "Vivid", "malum.gui.ritual.type": "Ritual Type: ", "malum.gui.ritual.warped_time": "Warped Time", - "malum.gui.rune.effect.aliment_cleansing": "Cleanses Negative Effects; Heals when Cleansed", - "malum.gui.rune.effect.dexterity": "Higher Speed at Low Health", - "malum.gui.rune.effect.haste": "Increased mining speed", - "malum.gui.rune.effect.heretic": "Silences Attackers", - "malum.gui.rune.effect.idle_restoration": "Passive Healing", - "malum.gui.rune.effect.igneous_solace": "Damage Resistance while Burning", - "malum.gui.rune.effect.reactive_shielding": "Damage Resistance when Struck", - "malum.gui.rune.effect.sacrificial_empowerment": "Scythe Damage on Kill", - "malum.gui.rune.effect.twinned_duration": "Doubled Positive Effect Durations", - "malum.gui.rune.effect.unnatural_stamina": "Sprinting Always Available", - "malum.gui.rune.effect.volatile_distortion": "Vorpal Damage Output", - "malum.gui.rune.plus": "+", + "malum.gui.rune.effect.aliment_cleansing": "+Cleanses Negative Effects; Heals when Cleansed", + "malum.gui.rune.effect.dexterity": "+Provides Higher Speed at Low Health", + "malum.gui.rune.effect.haste": "+Increases mining speed", + "malum.gui.rune.effect.heretic": "+Silences Attackers", + "malum.gui.rune.effect.idle_restoration": "+Provides Passive Healing", + "malum.gui.rune.effect.igneous_solace": "+Provides Damage Resistance while Burning", + "malum.gui.rune.effect.reactive_shielding": "+Grants Damage Resistance when Struck", + "malum.gui.rune.effect.sacrificial_empowerment": "+Grants Scythe Damage on Kill", + "malum.gui.rune.effect.twinned_duration": "+Doubles Positive Effect Durations", + "malum.gui.rune.effect.unnatural_stamina": "+Sprinting Always Available", + "malum.gui.rune.effect.volatile_distortion": "+Enables Vorpal Damage Output", "malum.jei.spirit_focusing": "Spirit Focusing", "malum.jei.spirit_infusion": "Spirit Infusion", "malum.jei.spirit_repair": "Spirit Repair", diff --git a/src/generated/resources/assets/malum/models/item/ravenous_brooch.json b/src/generated/resources/assets/malum/models/item/ravenous_brooch.json new file mode 100644 index 000000000..dd5185321 --- /dev/null +++ b/src/generated/resources/assets/malum/models/item/ravenous_brooch.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "malum:item/ravenous_brooch" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/curios/tags/items/brooch.json b/src/generated/resources/data/curios/tags/items/brooch.json index c3019f3c8..6df73d90a 100644 --- a/src/generated/resources/data/curios/tags/items/brooch.json +++ b/src/generated/resources/data/curios/tags/items/brooch.json @@ -2,6 +2,7 @@ "values": [ "malum:runic_brooch", "malum:sacrificial_brooch", - "malum:glass_brooch" + "malum:glass_brooch", + "malum:ravenous_brooch" ] } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipes/spirit_infusion/belt_of_the_starved.json b/src/generated/resources/data/malum/recipes/spirit_infusion/belt_of_the_starved.json index 8bd64d87a..9178a0b65 100644 --- a/src/generated/resources/data/malum/recipes/spirit_infusion/belt_of_the_starved.json +++ b/src/generated/resources/data/malum/recipes/spirit_infusion/belt_of_the_starved.json @@ -2,15 +2,15 @@ "type": "malum:spirit_infusion", "extra_items": [ { - "count": 2, + "count": 4, "item": "minecraft:bone" }, { - "count": 4, + "count": 8, "item": "malum:grim_talc" }, { - "count": 2, + "count": 4, "item": "malum:rotting_essence" }, { @@ -36,7 +36,7 @@ }, { "type": "arcane", - "count": 8 + "count": 16 } ] } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipes/spirit_infusion/ravenous_brooch.json b/src/generated/resources/data/malum/recipes/spirit_infusion/ravenous_brooch.json new file mode 100644 index 000000000..b81a0761a --- /dev/null +++ b/src/generated/resources/data/malum/recipes/spirit_infusion/ravenous_brooch.json @@ -0,0 +1,26 @@ +{ + "type": "malum:spirit_infusion", + "extra_items": [ + { + "count": 8, + "item": "malum:rotting_essence" + }, + { + "count": 4, + "item": "malum:grim_talc" + } + ], + "input": { + "count": 1, + "item": "malum:sacrificial_brooch" + }, + "output": { + "item": "malum:ravenous_brooch" + }, + "spirits": [ + { + "type": "wicked", + "count": 32 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_desperate_voracity.json b/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_desperate_voracity.json index 7257e6721..b3fca14cd 100644 --- a/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_desperate_voracity.json +++ b/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_desperate_voracity.json @@ -2,19 +2,19 @@ "type": "malum:spirit_infusion", "extra_items": [ { - "count": 2, + "count": 4, "item": "minecraft:bone" }, { - "count": 2, + "count": 4, "item": "malum:grim_talc" }, { - "count": 8, + "count": 16, "item": "minecraft:rotten_flesh" }, { - "count": 2, + "count": 4, "item": "malum:hex_ash" } ], @@ -28,15 +28,15 @@ "spirits": [ { "type": "wicked", - "count": 16 + "count": 32 }, { "type": "sacred", - "count": 8 + "count": 16 }, { "type": "arcane", - "count": 8 + "count": 16 } ] } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_the_hoarder.json b/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_the_hoarder.json index b79aa8f99..6af6aec69 100644 --- a/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_the_hoarder.json +++ b/src/generated/resources/data/malum/recipes/spirit_infusion/ring_of_the_hoarder.json @@ -28,15 +28,15 @@ "spirits": [ { "type": "earthen", - "count": 16 + "count": 32 }, { "type": "sacred", - "count": 8 + "count": 16 }, { "type": "arcane", - "count": 8 + "count": 16 } ] } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/client/model/MalignantLeadArmorModel.java b/src/main/java/com/sammy/malum/client/model/MalignantStrongholdArmorModel.java similarity index 99% rename from src/main/java/com/sammy/malum/client/model/MalignantLeadArmorModel.java rename to src/main/java/com/sammy/malum/client/model/MalignantStrongholdArmorModel.java index 2d24da9fd..8e6a618e6 100644 --- a/src/main/java/com/sammy/malum/client/model/MalignantLeadArmorModel.java +++ b/src/main/java/com/sammy/malum/client/model/MalignantStrongholdArmorModel.java @@ -7,7 +7,7 @@ import com.google.common.collect.*; import com.mojang.blaze3d.vertex.*; import com.sammy.malum.*; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.core.systems.spirit.*; import com.sammy.malum.registry.client.*; import net.minecraft.client.*; @@ -25,11 +25,11 @@ import team.lodestar.lodestone.systems.model.*; import java.awt.*; -import java.util.*; import java.util.List; +import java.util.*; import java.util.stream.*; -public class MalignantLeadArmorModel extends LodestoneArmorModel { +public class MalignantStrongholdArmorModel extends LodestoneArmorModel { public static final ModelLayerLocation LAYER = new ModelLayerLocation(MalumMod.malumPath("malignant_lead_armor"), "main"); public static final ResourceLocation GLOW_TEXTURE = MalumMod.malumPath("textures/armor/malignant_stronghold_glow.png"); private final ModelPart right_arm_glow; @@ -41,7 +41,7 @@ public class MalignantLeadArmorModel extends LodestoneArmorModel { private final List activeGlows = new ArrayList<>(); - public MalignantLeadArmorModel(ModelPart root) { + public MalignantStrongholdArmorModel(ModelPart root) { super(root); this.right_arm_glow = root.getChild("right_arm_glow"); this.left_arm_glow = root.getChild("left_arm_glow"); diff --git a/src/main/java/com/sammy/malum/client/screen/codex/entries/AugmentationEntries.java b/src/main/java/com/sammy/malum/client/screen/codex/entries/AugmentationEntries.java index 93b245a30..c73bdf007 100644 --- a/src/main/java/com/sammy/malum/client/screen/codex/entries/AugmentationEntries.java +++ b/src/main/java/com/sammy/malum/client/screen/codex/entries/AugmentationEntries.java @@ -14,8 +14,8 @@ public static void setupEntries(List entries) { Item EMPTY = ItemStack.EMPTY.getItem(); entries.add(new BookEntry<>( - "crucible_augmentation", 10, 8) - .setWidgetConfig(w -> w.setIcon(TUNING_FORK)) + "crucible_augmentation", 11, 8) + .setWidgetConfig(w -> w.setIcon(TUNING_FORK).setStyle(BookWidgetStyle.GILDED_RUNEWOOD)) .addPage(new HeadlineTextPage("crucible_augmentation", "crucible_augmentation.1")) .addPage(new TextPage("crucible_augmentation.2")) .addPage(new TextPage("crucible_augmentation.3")) @@ -23,56 +23,56 @@ public static void setupEntries(List entries) { ); entries.add(new BookEntry<>( - "mending_diffuser", 11, 7) + "mending_diffuser", 12, 7) .setWidgetConfig(w -> w.setIcon(MENDING_DIFFUSER)) .addPage(new HeadlineTextPage("mending_diffuser", "mending_diffuser.1")) .addPage(SpiritInfusionPage.fromOutput(MENDING_DIFFUSER.get())) ); entries.add(new BookEntry<>( - "impurity_stabilizer", 12, 7) + "impurity_stabilizer", 13, 7) .setWidgetConfig(w -> w.setIcon(IMPURITY_STABILIZER)) .addPage(new HeadlineTextPage("impurity_stabilizer", "impurity_stabilizer.1")) .addPage(SpiritInfusionPage.fromOutput(IMPURITY_STABILIZER.get())) ); entries.add(new BookEntry<>( - "accelerating_inlay", 13, 8) + "accelerating_inlay", 14, 8) .setWidgetConfig(w -> w.setIcon(ACCELERATING_INLAY)) .addPage(new HeadlineTextPage("accelerating_inlay", "accelerating_inlay.1")) .addPage(SpiritInfusionPage.fromOutput(ACCELERATING_INLAY.get())) ); entries.add(new BookEntry<>( - "blazing_diode", 12, 8) + "blazing_diode", 13, 8) .setWidgetConfig(w -> w.setIcon(BLAZING_DIODE)) .addPage(new HeadlineTextPage("blazing_diode", "blazing_diode.1")) .addPage(SpiritInfusionPage.fromOutput(BLAZING_DIODE.get())) ); entries.add(new BookEntry<>( - "prismatic_focus_lens", 12, 9) + "prismatic_focus_lens", 13, 9) .setWidgetConfig(w -> w.setIcon(PRISMATIC_FOCUS_LENS)) .addPage(new HeadlineTextPage("prismatic_focus_lens", "prismatic_focus_lens.1")) .addPage(SpiritInfusionPage.fromOutput(PRISMATIC_FOCUS_LENS.get())) ); entries.add(new BookEntry<>( - "intricate_assembly", 13, 9) + "intricate_assembly", 14, 9) .setWidgetConfig(w -> w.setIcon(INTRICATE_ASSEMBLY)) .addPage(new HeadlineTextPage("intricate_assembly", "intricate_assembly.1")) .addPage(SpiritInfusionPage.fromOutput(INTRICATE_ASSEMBLY.get())) ); entries.add(new BookEntry<>( - "shielding_apparatus", 13, 10) + "shielding_apparatus", 14, 10) .setWidgetConfig(w -> w.setIcon(SHIELDING_APPARATUS)) .addPage(new HeadlineTextPage("shielding_apparatus", "shielding_apparatus.1")) .addPage(SpiritInfusionPage.fromOutput(SHIELDING_APPARATUS.get())) ); entries.add(new BookEntry<>( - "warping_engine", 14, 10) + "warping_engine", 15, 10) .setWidgetConfig(w -> w.setIcon(WARPING_ENGINE)) .addPage(new HeadlineTextPage("warping_engine", "warping_engine.1")) .addPage(new TextPage("warping_engine.2")) diff --git a/src/main/java/com/sammy/malum/client/screen/codex/entries/RuneWorkingEntries.java b/src/main/java/com/sammy/malum/client/screen/codex/entries/RuneWorkingEntries.java index b2d81df1f..7a1f56de2 100644 --- a/src/main/java/com/sammy/malum/client/screen/codex/entries/RuneWorkingEntries.java +++ b/src/main/java/com/sammy/malum/client/screen/codex/entries/RuneWorkingEntries.java @@ -14,67 +14,93 @@ public static void setupEntries(List entries) { Item EMPTY = ItemStack.EMPTY.getItem(); entries.add(new BookEntry<>( - "runeworking", -10, 8) - .setWidgetConfig(w -> w.setIcon(RUNIC_BROOCH)) + "runeworking", -11, 8) + .setWidgetConfig(w -> w.setIcon(RUNIC_WORKBENCH).setStyle(BookWidgetStyle.GILDED_RUNEWOOD)) .addPage(new HeadlineTextPage("runeworking", "runeworking.1")) .addPage(new TextPage("runeworking.2")) .addPage(new TextPage("runeworking.3")) .addPage(SpiritInfusionPage.fromOutput(RUNIC_WORKBENCH.get())) - .addPage(new TextPage("runeworking.4")) + ); + + entries.add(new BookEntry<>( + "runic_brooch", -10, 9) + .setWidgetConfig(w -> w.setIcon(RUNIC_BROOCH)) + .addPage(new HeadlineTextPage("runic_brooch", "runic_brooch.1")) .addPage(CraftingBookPage.broochPage(RUNIC_BROOCH.get(), HALLOWED_GOLD_INGOT.get(), BLOCK_OF_HALLOWED_GOLD.get())) ); entries.add(new BookEntry<>( - "rune_of_idle_restoration", -11, 7) + "sacrificial_brooch", -9, 10) + .setWidgetConfig(w -> w.setIcon(SACRIFICIAL_BROOCH)) + .addPage(new HeadlineTextPage("sacrificial_brooch", "sacrificial_brooch.1")) + .addPage(CraftingBookPage.broochPage(SACRIFICIAL_BROOCH.get(), SOUL_STAINED_STEEL_INGOT.get(), BLOCK_OF_SOUL_STAINED_STEEL.get())) + ); + + entries.add(new BookEntry<>( + "glass_brooch", -11, 10) + .setWidgetConfig(w -> w.setIcon(GLASS_BROOCH)) + .addPage(new HeadlineTextPage("glass_brooch", "glass_brooch.1")) + .addPage(SpiritInfusionPage.fromOutput(GLASS_BROOCH.get())) + ); + + entries.add(new BookEntry<>( + "ravenous_brooch", -10, 11) + .setWidgetConfig(w -> w.setIcon(RAVENOUS_BROOCH)) + .addPage(new HeadlineTextPage("ravenous_brooch", "ravenous_brooch.1")) + .addPage(SpiritInfusionPage.fromOutput(RAVENOUS_BROOCH.get())) + ); + + entries.add(new BookEntry<>( + "rune_of_idle_restoration", -12, 7) .setWidgetConfig(w -> w.setIcon(RUNE_OF_IDLE_RESTORATION)) .addPage(new HeadlineTextPage("rune_of_idle_restoration", "rune_of_idle_restoration.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_IDLE_RESTORATION.get())) ); entries.add(new BookEntry<>( - "rune_of_culling", -12, 7) + "rune_of_culling", -13, 7) .setWidgetConfig(w -> w.setIcon(RUNE_OF_CULLING)) .addPage(new HeadlineTextPage("rune_of_culling", "rune_of_culling.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_CULLING.get())) ); entries.add(new BookEntry<>( - "rune_of_dexterity", -13, 8) + "rune_of_dexterity", -14, 8) .setWidgetConfig(w -> w.setIcon(RUNE_OF_DEXTERITY)) .addPage(new HeadlineTextPage("rune_of_dexterity", "rune_of_dexterity.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_DEXTERITY.get())) ); entries.add(new BookEntry<>( - "rune_of_haste", -12, 8) + "rune_of_haste", -13, 8) .setWidgetConfig(w -> w.setIcon(RUNE_OF_HASTE)) .addPage(new HeadlineTextPage("rune_of_haste", "rune_of_haste.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_HASTE.get())) ); entries.add(new BookEntry<>( - "rune_of_aliment_cleansing", -12, 9) + "rune_of_aliment_cleansing", -13, 9) .setWidgetConfig(w -> w.setIcon(RUNE_OF_ALIMENT_CLEANSING)) .addPage(new HeadlineTextPage("rune_of_aliment_cleansing", "rune_of_aliment_cleansing.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_ALIMENT_CLEANSING.get())) ); entries.add(new BookEntry<>( - "rune_of_reactive_shielding", -13, 9) + "rune_of_reactive_shielding", -14, 9) .setWidgetConfig(w -> w.setIcon(RUNE_OF_REACTIVE_SHIELDING)) .addPage(new HeadlineTextPage("rune_of_reactive_shielding", "rune_of_reactive_shielding.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_REACTIVE_SHIELDING.get())) ); entries.add(new BookEntry<>( - "rune_of_reinforcement", -13, 10) + "rune_of_reinforcement", -14, 10) .setWidgetConfig(w -> w.setIcon(RUNE_OF_REINFORCEMENT)) .addPage(new HeadlineTextPage("rune_of_reinforcement", "rune_of_reinforcement.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_REINFORCEMENT.get())) ); entries.add(new BookEntry<>( - "rune_of_volatile_distortion", -14, 10) + "rune_of_volatile_distortion", -15, 10) .setWidgetConfig(w -> w.setIcon(RUNE_OF_VOLATILE_DISTORTION)) .addPage(new HeadlineTextPage("rune_of_volatile_distortion", "rune_of_volatile_distortion.1")) .addPage(SpiritInfusionPage.fromOutput(RUNE_OF_VOLATILE_DISTORTION.get())) diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/runic_workbench/RunicWorkbenchBlock.java b/src/main/java/com/sammy/malum/common/block/curiosities/runic_workbench/RunicWorkbenchBlock.java index ef617a247..15fd8e7ba 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/runic_workbench/RunicWorkbenchBlock.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/runic_workbench/RunicWorkbenchBlock.java @@ -2,18 +2,28 @@ import net.minecraft.core.*; import net.minecraft.world.item.context.*; +import net.minecraft.world.level.*; import net.minecraft.world.level.block.*; import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.shapes.*; import team.lodestar.lodestone.systems.block.*; import static net.minecraft.world.level.block.state.properties.BlockStateProperties.*; public class RunicWorkbenchBlock extends LodestoneEntityBlock { + public static final VoxelShape SHAPE = makeShape(); + public RunicWorkbenchBlock(Properties properties) { super(properties); this.registerDefaultState(this.stateDefinition.any().setValue(HORIZONTAL_FACING, Direction.NORTH)); } + + @Override + public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { + return SHAPE; + } + @Override public BlockState getStateForPlacement(BlockPlaceContext context) { return super.getStateForPlacement(context).setValue(HORIZONTAL_FACING, context.getHorizontalDirection().getOpposite()); @@ -24,4 +34,13 @@ protected void createBlockStateDefinition(StateDefinition.Builder curiosInventory = CuriosApi.getCuriosInventory(entity); if (curiosInventory.isPresent()) { final List equippedRunes = curiosInventory @@ -68,7 +68,7 @@ public LodestoneArmorModel getHumanoidArmorModel(LivingEntity entity, ItemStack .filter(c -> c.slotContext().visible()) .map(c -> (MalumRuneCurioItem) c.stack().getItem()).collect(Collectors.toList())) .orElse(Collections.emptyList()); - malignantLeadArmorModel.updateGlow(equippedRunes); + malignantStrongholdArmorModel.updateGlow(equippedRunes); } } model.slot = armorSlot; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/AbstractMalumCurioItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/AbstractMalumCurioItem.java new file mode 100644 index 000000000..8741e7d76 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/AbstractMalumCurioItem.java @@ -0,0 +1,74 @@ +package com.sammy.malum.common.item.curiosities.curios; + +import com.google.common.collect.*; +import com.sammy.malum.registry.common.*; +import net.minecraft.*; +import net.minecraft.sounds.*; +import net.minecraft.world.entity.ai.attributes.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.enchantment.*; +import top.theillusivec4.curios.api.*; +import top.theillusivec4.curios.api.type.capability.*; + +import java.util.*; +import java.util.function.*; + +public abstract class AbstractMalumCurioItem extends Item implements ICurioItem { + + public enum MalumTrinketType { + CLOTH(SoundRegistry.CLOTH_TRINKET_EQUIP), + ORNATE(SoundRegistry.ORNATE_TRINKET_EQUIP), + GILDED(SoundRegistry.GILDED_TRINKET_EQUIP), + ALCHEMICAL(SoundRegistry.ALCHEMICAL_TRINKET_EQUIP), + ROTTEN(SoundRegistry.ROTTEN_TRINKET_EQUIP), + METALLIC(SoundRegistry.METALLIC_TRINKET_EQUIP), + RUNE(SoundRegistry.ORNATE_TRINKET_EQUIP), + VOID(SoundRegistry.VOID_TRINKET_EQUIP); + final Supplier sound; + + MalumTrinketType(Supplier sound) { + this.sound = sound; + } + } + + private final Function uuids = Util.memoize(a -> UUID.randomUUID()); + public final MalumTrinketType type; + + public AbstractMalumCurioItem(Properties properties, MalumTrinketType type) { + super(properties); + this.type = type; + } + + public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { + } + + @Override + public final Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid, ItemStack stack) { + Multimap map = LinkedHashMultimap.create(); + addAttributeModifiers(map, slotContext, stack); + return map; + } + + @Override + public void onEquipFromUse(SlotContext slotContext, ItemStack stack) { + slotContext.entity().level().playSound(null, slotContext.entity().blockPosition(), type.sound.get(), SoundSource.PLAYERS, 1.0f, 1.0f); + } + + @Override + public boolean isBookEnchantable(ItemStack stack, ItemStack book) { + Map list = EnchantmentHelper.getEnchantments(book); + if (list.size() == 1 && list.containsKey(Enchantments.BINDING_CURSE)) { + return true; + } + return super.isBookEnchantable(stack, book); + } + + @Override + public boolean canEquipFromUse(SlotContext slotContext, ItemStack stack) { + return true; + } + + public void addAttributeModifier(Multimap map, Attribute attribute, Function attributeModifier) { + map.put(attribute, attributeModifier.apply(uuids.apply(attribute))); + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java index 4fdc494fe..c84d35b29 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java @@ -1,82 +1,55 @@ package com.sammy.malum.common.item.curiosities.curios; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; -import com.sammy.malum.registry.common.SoundRegistry; -import net.minecraft.Util; -import net.minecraft.sounds.SoundEvent; -import net.minecraft.sounds.SoundSource; -import net.minecraft.world.entity.ai.attributes.Attribute; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.enchantment.Enchantment; -import net.minecraft.world.item.enchantment.EnchantmentHelper; -import net.minecraft.world.item.enchantment.Enchantments; -import top.theillusivec4.curios.api.SlotContext; -import top.theillusivec4.curios.api.type.capability.ICurioItem; +import net.minecraft.*; +import net.minecraft.network.chat.*; +import net.minecraft.world.item.*; +import top.theillusivec4.curios.api.*; +import top.theillusivec4.curios.api.type.*; +import top.theillusivec4.curios.api.type.capability.*; -import java.util.Map; -import java.util.UUID; -import java.util.function.Function; -import java.util.function.Supplier; +import java.util.*; +import java.util.function.*; -public class MalumCurioItem extends Item implements ICurioItem { +public class MalumCurioItem extends AbstractMalumCurioItem implements ICurioItem { - public enum MalumTrinketType { - CLOTH(SoundRegistry.CLOTH_TRINKET_EQUIP), - ORNATE(SoundRegistry.ORNATE_TRINKET_EQUIP), - GILDED(SoundRegistry.GILDED_TRINKET_EQUIP), - ALCHEMICAL(SoundRegistry.ALCHEMICAL_TRINKET_EQUIP), - ROTTEN(SoundRegistry.ROTTEN_TRINKET_EQUIP), - METALLIC(SoundRegistry.METALLIC_TRINKET_EQUIP), - RUNE(SoundRegistry.ORNATE_TRINKET_EQUIP), - VOID(SoundRegistry.VOID_TRINKET_EQUIP); - final Supplier sound; - - MalumTrinketType(Supplier sound) { - this.sound = sound; - } - } - - private final Function uuids = Util.memoize(a -> UUID.randomUUID()); - public final MalumTrinketType type; + private final List extraTooltipLines = new ArrayList<>(); public MalumCurioItem(Properties properties, MalumTrinketType type) { - super(properties); - this.type = type; - } - - public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { + super(properties, type); + addExtraTooltipLines(extraTooltipLines::add); } - @Override - public final Multimap getAttributeModifiers(SlotContext slotContext, UUID uuid, ItemStack stack) { - Multimap map = HashMultimap.create(); - addAttributeModifiers(map, slotContext, stack); - return map; - } + public void addExtraTooltipLines(Consumer consumer) { - @Override - public void onEquipFromUse(SlotContext slotContext, ItemStack stack) { - slotContext.entity().level().playSound(null, slotContext.entity().blockPosition(), type.sound.get(), SoundSource.PLAYERS, 1.0f, 1.0f); } @Override - public boolean isBookEnchantable(ItemStack stack, ItemStack book) { - Map list = EnchantmentHelper.getEnchantments(book); - if (list.size() == 1 && list.containsKey(Enchantments.BINDING_CURSE)) { - return true; + public List getAttributesTooltip(List tooltips, ItemStack stack) { + final List attributesTooltip = super.getAttributesTooltip(tooltips, stack); + + if (!extraTooltipLines.isEmpty()) { + if (attributesTooltip.isEmpty()) { + attributesTooltip.add(Component.empty()); + final Map itemStackSlots = CuriosApi.getItemStackSlots(stack); + + itemStackSlots.keySet().stream().findFirst().ifPresent(s -> { + attributesTooltip.add(Component.translatable("curios.modifiers." + s) + .withStyle(ChatFormatting.GOLD)); + }); + } + for (AttributeLikeTooltipEntry attributeLike : extraTooltipLines) { + attributesTooltip.add(Component.translatable(attributeLike.key).withStyle(attributeLike.formatting)); + } } - return super.isBookEnchantable(stack, book); + return attributesTooltip; } - @Override - public boolean canEquipFromUse(SlotContext slotContext, ItemStack stack) { - return true; + public static AttributeLikeTooltipEntry positiveEffect(String key) { + return new AttributeLikeTooltipEntry(key, ChatFormatting.BLUE); } - - public void addAttributeModifier(Multimap map, Attribute attribute, Function attributeModifier) { - map.put(attribute, attributeModifier.apply(uuids.apply(attribute))); + public static AttributeLikeTooltipEntry negativeEffect(String key) { + return new AttributeLikeTooltipEntry(key, ChatFormatting.RED); + } + public record AttributeLikeTooltipEntry(String key, ChatFormatting formatting) { } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioAlchemicalRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioAlchemicalRing.java deleted file mode 100644 index f2a46962e..000000000 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioAlchemicalRing.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.sammy.malum.common.item.curiosities.curios.alchemical; - -import com.google.common.collect.Multimap; -import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; -import com.sammy.malum.registry.common.MobEffectRegistry; -import com.sammy.malum.registry.common.item.ItemRegistry; -import net.minecraft.world.effect.MobEffect; -import net.minecraft.world.effect.MobEffectCategory; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.ai.attributes.Attribute; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.event.entity.living.MobEffectEvent; -import net.minecraftforge.registries.ForgeRegistries; -import team.lodestar.lodestone.helpers.CurioHelper; -import team.lodestar.lodestone.helpers.EntityHelper; -import team.lodestar.lodestone.registry.common.LodestoneAttributeRegistry; -import top.theillusivec4.curios.api.SlotContext; - -public class CurioAlchemicalRing extends MalumCurioItem implements IMalumEventResponderItem { - - public CurioAlchemicalRing(Properties builder) { - super(builder, MalumTrinketType.ALCHEMICAL); - } - - @Override - public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { - addAttributeModifier(map, LodestoneAttributeRegistry.MAGIC_RESISTANCE.get(), uuid -> new AttributeModifier(uuid, - "Curio Magic Resistance", 1f, AttributeModifier.Operation.ADDITION)); - } - - public static void onPotionApplied(MobEffectEvent.Added event) { - LivingEntity entity = event.getEntity(); - if (event.getOldEffectInstance() == null && CurioHelper.hasCurioEquipped(entity, ItemRegistry.RING_OF_ALCHEMICAL_MASTERY.get())) { - MobEffectInstance effect = event.getEffectInstance(); - MobEffect type = effect.getEffect(); - float multiplier = MobEffectRegistry.ALCHEMICAL_PROFICIENCY_MAP.getOrDefault(ForgeRegistries.MOB_EFFECTS.getKey(type), 1f); - if (type.isBeneficial()) { - EntityHelper.extendEffect(effect, entity, (int) (effect.getDuration() * 0.25f * multiplier)); - } else if (type.getCategory().equals(MobEffectCategory.HARMFUL)) { - EntityHelper.shortenEffect(effect, entity, (int) (effect.getDuration() * 0.33f * multiplier)); - } - } - } - - @Override - public void pickupSpirit(LivingEntity collector, ItemStack stack, double arcaneResonance) { - collector.getActiveEffectsMap().forEach((e, i) -> { - float multiplier = MobEffectRegistry.ALCHEMICAL_PROFICIENCY_MAP.getOrDefault(ForgeRegistries.MOB_EFFECTS.getKey(e), 1f); - if (e.isBeneficial()) { - int base = 40 + (int) (arcaneResonance * 20); - EntityHelper.extendEffect(i, collector, (int) (base * multiplier), 1200); - } else if (e.getCategory().equals(MobEffectCategory.HARMFUL)) { - int base = 60 + (int) (arcaneResonance * 30); - EntityHelper.shortenEffect(i, collector, (int) (base * multiplier)); - } - }); - } -} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioGlassBrooch.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioGlassBrooch.java similarity index 93% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioGlassBrooch.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioGlassBrooch.java index a621e813a..cd5cc3b9d 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioGlassBrooch.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioGlassBrooch.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.brooch; +package com.sammy.malum.common.item.curiosities.curios.brooches; import com.google.common.collect.*; import com.sammy.malum.common.item.curiosities.curios.*; @@ -18,8 +18,8 @@ public CurioGlassBrooch(Properties builder) { @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { + CuriosApi.addSlotModifier(map, "rune", GLASS_BROOCH_RUNE, 2, AttributeModifier.Operation.ADDITION); addAttributeModifier(map, Attributes.MAX_HEALTH, uuid -> new AttributeModifier(uuid, "Curio Max Health", -0.2f, AttributeModifier.Operation.MULTIPLY_TOTAL)); - CuriosApi.addSlotModifier(map, "rune", GLASS_BROOCH_RUNE, 2, AttributeModifier.Operation.ADDITION); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioRavenousBrooch.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioRavenousBrooch.java new file mode 100644 index 000000000..ae0e2b717 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioRavenousBrooch.java @@ -0,0 +1,38 @@ +package com.sammy.malum.common.item.curiosities.curios.brooches; + +import com.google.common.collect.*; +import com.sammy.malum.common.item.curiosities.curios.*; +import net.minecraft.world.entity.ai.attributes.*; +import net.minecraft.world.entity.player.*; +import net.minecraft.world.item.*; +import top.theillusivec4.curios.api.*; + +import java.util.*; +import java.util.function.*; + +public class CurioRavenousBrooch extends MalumCurioItem { + + public static final UUID RAVENOUS_BROOCH_BELT = UUID.fromString("f8ec834e-18ba-4deb-9156-ff70d52821e4"); + + public CurioRavenousBrooch(Properties builder) { + super(builder, MalumTrinketType.ROTTEN); + } + + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(negativeEffect("malum.gui.curio.effect.ravenous_brooch")); + } + + @Override + public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { + CuriosApi.addSlotModifier(map, "belt", RAVENOUS_BROOCH_BELT, 1, AttributeModifier.Operation.ADDITION); + } + + @Override + public void curioTick(SlotContext slotContext, ItemStack stack) { + if (slotContext.entity() instanceof Player player) { + player.causeFoodExhaustion(0.005f); + } + super.curioTick(slotContext, stack); + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioRunicBrooch.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioRunicBrooch.java similarity index 93% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioRunicBrooch.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioRunicBrooch.java index 3f7580e95..0798cd5eb 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioRunicBrooch.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioRunicBrooch.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.brooch; +package com.sammy.malum.common.item.curiosities.curios.brooches; import com.google.common.collect.*; import com.sammy.malum.common.item.curiosities.curios.*; @@ -19,7 +19,7 @@ public CurioRunicBrooch(Properties builder) { @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { - CuriosApi.addSlotModifier(map, "ring", RUNIC_BROOCH_RING, -1, AttributeModifier.Operation.ADDITION); CuriosApi.addSlotModifier(map, "rune", RUNIC_BROOCH_RUNE, 2, AttributeModifier.Operation.ADDITION); + CuriosApi.addSlotModifier(map, "ring", RUNIC_BROOCH_RING, -1, AttributeModifier.Operation.ADDITION); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioSacrificialBrooch.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioSacrificialBrooch.java similarity index 94% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioSacrificialBrooch.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioSacrificialBrooch.java index 6b42bc3ee..52f790aea 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooch/CurioSacrificialBrooch.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioSacrificialBrooch.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.brooch; +package com.sammy.malum.common.item.curiosities.curios.brooches; import com.google.common.collect.*; import com.sammy.malum.common.item.curiosities.curios.*; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/MalumRuneCurioItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/MalumRuneCurioItem.java new file mode 100644 index 000000000..1e8c100cd --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/MalumRuneCurioItem.java @@ -0,0 +1,26 @@ +package com.sammy.malum.common.item.curiosities.curios.runes; + +import com.sammy.malum.common.item.curiosities.curios.*; +import com.sammy.malum.core.systems.spirit.*; +import com.sammy.malum.visual_effects.*; +import net.minecraft.world.item.*; +import net.minecraft.world.level.*; +import net.minecraftforge.api.distmarker.*; +import team.lodestar.lodestone.handlers.screenparticle.*; +import team.lodestar.lodestone.systems.particle.screen.*; + +public class MalumRuneCurioItem extends MalumCurioItem implements ParticleEmitterHandler.ItemParticleSupplier { + + public final MalumSpiritType spiritType; + + public MalumRuneCurioItem(Properties builder, MalumSpiritType spiritType) { + super(builder, MalumTrinketType.RUNE); + this.spiritType = spiritType; + } + + @OnlyIn(Dist.CLIENT) + @Override + public void spawnLateParticles(ScreenParticleHolder target, Level level, float partialTick, ItemStack stack, float x, float y) { + ScreenParticleEffects.spawnRuneParticles(target, spiritType); + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneAlimentCleansingItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneAlimentCleansingItem.java similarity index 86% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneAlimentCleansingItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneAlimentCleansingItem.java index c5a66c86a..bcca9b37a 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneAlimentCleansingItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneAlimentCleansingItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.runes; +package com.sammy.malum.common.item.curiosities.curios.runes; import com.sammy.malum.registry.common.*; import com.sammy.malum.registry.common.item.*; @@ -8,7 +8,7 @@ import net.minecraftforge.registries.*; import team.lodestar.lodestone.helpers.*; -import java.util.*; +import java.util.function.*; public class RuneAlimentCleansingItem extends MalumRuneCurioItem { @@ -16,6 +16,11 @@ public RuneAlimentCleansingItem(Properties builder) { super(builder, SpiritTypeRegistry.AQUEOUS_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.aliment_cleansing")); + } + public static void onPotionApplied(MobEffectEvent.Added event) { LivingEntity entity = event.getEntity(); if (event.getOldEffectInstance() == null && CurioHelper.hasCurioEquipped(entity, ItemRegistry.RUNE_OF_ALIMENT_CLEANSING.get())) { @@ -33,10 +38,4 @@ public static void onPotionExpired(MobEffectEvent.Expired event) { entity.heal(Math.max(entity.getMaxHealth()/10f, 4)); } } - - - @Override - public Optional getEffectDescriptor() { - return Optional.of("aliment_cleansing"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneCullingItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneCullingItem.java similarity index 92% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneCullingItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneCullingItem.java index 9d6369a4d..4a9f2b15b 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneCullingItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneCullingItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.runes; +package com.sammy.malum.common.item.curiosities.curios.runes; import com.google.common.collect.*; import com.sammy.malum.registry.common.*; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneDexterityItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneDexterityItem.java similarity index 87% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneDexterityItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneDexterityItem.java index 368502734..f88f0fe24 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneDexterityItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneDexterityItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.runes; +package com.sammy.malum.common.item.curiosities.curios.runes; import com.google.common.collect.*; import com.sammy.malum.registry.common.*; @@ -7,7 +7,7 @@ import net.minecraft.world.item.*; import top.theillusivec4.curios.api.*; -import java.util.*; +import java.util.function.*; public class RuneDexterityItem extends MalumRuneCurioItem { @@ -15,6 +15,11 @@ public RuneDexterityItem(Properties builder) { super(builder, SpiritTypeRegistry.AERIAL_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.dexterity")); + } + @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.MOVEMENT_SPEED, uuid -> new AttributeModifier(uuid, @@ -44,10 +49,4 @@ public void curioTick(SlotContext slotContext, ItemStack stack) { } } } - - - @Override - public Optional getEffectDescriptor() { - return Optional.of("dexterity"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneHasteItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneHasteItem.java new file mode 100644 index 000000000..02e5ae073 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneHasteItem.java @@ -0,0 +1,17 @@ +package com.sammy.malum.common.item.curiosities.curios.runes; + +import com.sammy.malum.registry.common.*; + +import java.util.function.*; + +public class RuneHasteItem extends MalumRuneCurioItem { + + public RuneHasteItem(Properties builder) { + super(builder, SpiritTypeRegistry.INFERNAL_SPIRIT); + } + + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.haste")); + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneIdleRestorationItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneIdleRestorationItem.java similarity index 72% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneIdleRestorationItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneIdleRestorationItem.java index ff1882995..869e2d29c 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneIdleRestorationItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneIdleRestorationItem.java @@ -1,11 +1,11 @@ -package com.sammy.malum.common.item.curiosities.runes; +package com.sammy.malum.common.item.curiosities.curios.runes; import com.sammy.malum.registry.common.*; import net.minecraft.world.entity.*; import net.minecraft.world.item.*; import top.theillusivec4.curios.api.*; -import java.util.*; +import java.util.function.*; public class RuneIdleRestorationItem extends MalumRuneCurioItem { @@ -13,6 +13,11 @@ public RuneIdleRestorationItem(Properties builder) { super(builder, SpiritTypeRegistry.SACRED_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.idle_restoration")); + } + @Override public void curioTick(SlotContext slotContext, ItemStack stack) { final LivingEntity livingEntity = slotContext.entity(); @@ -21,9 +26,4 @@ public void curioTick(SlotContext slotContext, ItemStack stack) { } super.curioTick(slotContext, stack); } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("idle_restoration"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneReactiveShieldingItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneReactiveShieldingItem.java similarity index 80% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneReactiveShieldingItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneReactiveShieldingItem.java index 3e1ef4236..3497fc3f7 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneReactiveShieldingItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneReactiveShieldingItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.runes; +package com.sammy.malum.common.item.curiosities.curios.runes; import com.sammy.malum.registry.common.*; import net.minecraft.world.effect.*; @@ -8,7 +8,7 @@ import team.lodestar.lodestone.helpers.*; import team.lodestar.lodestone.systems.item.*; -import java.util.*; +import java.util.function.*; public class RuneReactiveShieldingItem extends MalumRuneCurioItem implements IEventResponderItem { @@ -16,6 +16,11 @@ public RuneReactiveShieldingItem(Properties builder) { super(builder, SpiritTypeRegistry.EARTHEN_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.reactive_shielding")); + } + @Override public void takeDamageEvent(LivingHurtEvent event, LivingEntity attacker, LivingEntity attacked, ItemStack stack) { MobEffect shielding = MobEffectRegistry.REACTIVE_SHIELDING.get(); @@ -27,9 +32,4 @@ public void takeDamageEvent(LivingHurtEvent event, LivingEntity attacker, Living EntityHelper.extendEffect(effect, attacked, 40, 100); } } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("reactive_shielding"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneReinforcementItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneReinforcementItem.java similarity index 93% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneReinforcementItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneReinforcementItem.java index e31be1409..57572cca0 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneReinforcementItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneReinforcementItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.runes; +package com.sammy.malum.common.item.curiosities.curios.runes; import com.google.common.collect.*; import com.sammy.malum.registry.common.*; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneVolatileDistortionItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneVolatileDistortionItem.java similarity index 77% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneVolatileDistortionItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneVolatileDistortionItem.java index fb471d708..7be9f0cab 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneVolatileDistortionItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/RuneVolatileDistortionItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.runes; +package com.sammy.malum.common.item.curiosities.curios.runes; import com.sammy.malum.registry.common.*; import net.minecraft.util.*; @@ -7,7 +7,7 @@ import net.minecraftforge.event.entity.living.*; import team.lodestar.lodestone.systems.item.*; -import java.util.*; +import java.util.function.*; public class RuneVolatileDistortionItem extends MalumRuneCurioItem implements IEventResponderItem { @@ -15,6 +15,11 @@ public RuneVolatileDistortionItem(Properties builder) { super(builder, SpiritTypeRegistry.ELDRITCH_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.volatile_distortion")); + } + @Override public void hurtEvent(LivingHurtEvent event, LivingEntity attacker, LivingEntity target, ItemStack stack) { final RandomSource random = attacker.getRandom(); @@ -24,9 +29,4 @@ public void hurtEvent(LivingHurtEvent event, LivingEntity attacker, LivingEntity } event.setAmount(event.getAmount() * multiplier); } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("volatile_distortion"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneBolsteringItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneBolsteringItem.java similarity index 84% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneBolsteringItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneBolsteringItem.java index 1ad73d7de..acfec42a6 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneBolsteringItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneBolsteringItem.java @@ -1,7 +1,7 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; import com.google.common.collect.*; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.item.*; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneHereticItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneHereticItem.java similarity index 78% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneHereticItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneHereticItem.java index 7dd434bda..8667a04f6 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneHereticItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneHereticItem.java @@ -1,6 +1,6 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.effect.*; import net.minecraft.world.entity.*; @@ -8,7 +8,7 @@ import team.lodestar.lodestone.helpers.*; import team.lodestar.lodestone.systems.item.*; -import java.util.*; +import java.util.function.*; public class RuneHereticItem extends MalumRuneCurioItem implements IEventResponderItem { @@ -16,6 +16,11 @@ public RuneHereticItem(Properties builder) { super(builder, SpiritTypeRegistry.ELDRITCH_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.heretic")); + } + @Override public void takeDamageEvent(LivingEntity attacker, LivingEntity attacked, ItemStack stack) { MobEffect silenced = MobEffectRegistry.SILENCED.get(); @@ -28,9 +33,4 @@ public void takeDamageEvent(LivingEntity attacker, LivingEntity attacked, ItemSt } attacked.level().playSound(null, attacked.getX(), attacked.getY(), attacked.getZ(), SoundRegistry.DRAINING_MOTIF.get(), attacked.getSoundSource(), 1f, 1.5f); } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("heretic"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneIgneousSolaceItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneIgneousSolaceItem.java similarity index 67% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneIgneousSolaceItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneIgneousSolaceItem.java index b8c6c6825..7e2d2169a 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneIgneousSolaceItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneIgneousSolaceItem.java @@ -1,13 +1,13 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.entity.*; import net.minecraft.world.item.*; import net.minecraftforge.event.entity.living.*; import team.lodestar.lodestone.systems.item.*; -import java.util.*; +import java.util.function.*; public class RuneIgneousSolaceItem extends MalumRuneCurioItem implements IEventResponderItem { @@ -15,15 +15,15 @@ public RuneIgneousSolaceItem(Properties builder) { super(builder, SpiritTypeRegistry.INFERNAL_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.igneous_solace")); + } + @Override public void takeDamageEvent(LivingHurtEvent event, LivingEntity attacker, LivingEntity attacked, ItemStack stack) { if (attacked.isOnFire()) { event.setAmount(event.getAmount()*0.75f); } } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("igneous_solace"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneSacrificialEmpowermentItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneSacrificialEmpowermentItem.java similarity index 75% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneSacrificialEmpowermentItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneSacrificialEmpowermentItem.java index 9e744cdad..7dcc38a69 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneSacrificialEmpowermentItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneSacrificialEmpowermentItem.java @@ -1,6 +1,6 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.effect.*; import net.minecraft.world.entity.*; @@ -8,7 +8,7 @@ import team.lodestar.lodestone.helpers.*; import team.lodestar.lodestone.systems.item.*; -import java.util.*; +import java.util.function.*; public class RuneSacrificialEmpowermentItem extends MalumRuneCurioItem implements IEventResponderItem { @@ -16,6 +16,11 @@ public RuneSacrificialEmpowermentItem(Properties builder) { super(builder, SpiritTypeRegistry.WICKED_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.sacrificial_empowerment")); + } + @Override public void killEvent(LivingEntity attacker, LivingEntity target, ItemStack stack) { MobEffect sacrificialEmpowerment = MobEffectRegistry.SACRIFICIAL_EMPOWERMENT.get(); @@ -27,9 +32,4 @@ public void killEvent(LivingEntity attacker, LivingEntity target, ItemStack stac EntityHelper.extendEffect(effect, attacker, 100, 200); } } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("sacrificial_empowerment"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneSpellMasteryItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneSpellMasteryItem.java similarity index 88% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneSpellMasteryItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneSpellMasteryItem.java index 75d155652..92ef49c2b 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneSpellMasteryItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneSpellMasteryItem.java @@ -1,7 +1,7 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; import com.google.common.collect.*; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.item.*; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneToughnessItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneToughnessItem.java similarity index 84% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneToughnessItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneToughnessItem.java index 0eb691199..a556dff73 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneToughnessItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneToughnessItem.java @@ -1,7 +1,7 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; import com.google.common.collect.*; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.item.*; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneTwinnedDurationItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneTwinnedDurationItem.java similarity index 78% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneTwinnedDurationItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneTwinnedDurationItem.java index 2eda6175b..18c6b7b86 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneTwinnedDurationItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneTwinnedDurationItem.java @@ -1,6 +1,6 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import com.sammy.malum.registry.common.item.*; import net.minecraft.world.effect.*; @@ -9,7 +9,7 @@ import net.minecraftforge.registries.*; import team.lodestar.lodestone.helpers.*; -import java.util.*; +import java.util.function.*; public class RuneTwinnedDurationItem extends MalumRuneCurioItem { @@ -17,6 +17,11 @@ public RuneTwinnedDurationItem(Properties builder) { super(builder, SpiritTypeRegistry.AQUEOUS_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.twinned_duration")); + } + public static void onPotionApplied(MobEffectEvent.Added event) { LivingEntity entity = event.getEntity(); if (event.getOldEffectInstance() == null && CurioHelper.hasCurioEquipped(entity, ItemRegistry.RUNE_OF_TWINNED_DURATION.get())) { @@ -28,10 +33,4 @@ public static void onPotionApplied(MobEffectEvent.Added event) { } } } - - - @Override - public Optional getEffectDescriptor() { - return Optional.of("twinned_duration"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneUnnaturalStaminaItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneUnnaturalStaminaItem.java similarity index 76% rename from src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneUnnaturalStaminaItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneUnnaturalStaminaItem.java index a1f4d5ed6..9bbc3fe92 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/corrupted/RuneUnnaturalStaminaItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/corrupted/RuneUnnaturalStaminaItem.java @@ -1,7 +1,7 @@ -package com.sammy.malum.common.item.curiosities.runes.corrupted; +package com.sammy.malum.common.item.curiosities.curios.runes.corrupted; import com.google.common.collect.*; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import com.sammy.malum.registry.common.item.*; import net.minecraft.world.entity.*; @@ -10,7 +10,7 @@ import team.lodestar.lodestone.helpers.*; import top.theillusivec4.curios.api.*; -import java.util.*; +import java.util.function.*; public class RuneUnnaturalStaminaItem extends MalumRuneCurioItem { @@ -18,6 +18,11 @@ public RuneUnnaturalStaminaItem(Properties builder) { super(builder, SpiritTypeRegistry.AERIAL_SPIRIT); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.rune.effect.unnatural_stamina")); + } + @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.MOVEMENT_SPEED, uuid -> new AttributeModifier(uuid, @@ -28,9 +33,4 @@ public void addAttributeModifiers(Multimap map, Sl public static boolean forceSprint(LivingEntity livingEntity) { return CurioHelper.hasCurioEquipped(livingEntity, ItemRegistry.RUNE_OF_UNNATURAL_STAMINA.get()); } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("unnatural_stamina"); - } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioAlchemicalRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioAlchemicalRing.java new file mode 100644 index 000000000..be45eb8a6 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioAlchemicalRing.java @@ -0,0 +1,48 @@ +package com.sammy.malum.common.item.curiosities.curios.sets.alchemical; + +import com.google.common.collect.*; +import com.sammy.malum.common.item.*; +import com.sammy.malum.common.item.curiosities.curios.*; +import com.sammy.malum.registry.common.*; +import net.minecraft.world.effect.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.ai.attributes.*; +import net.minecraft.world.item.*; +import net.minecraftforge.registries.*; +import team.lodestar.lodestone.helpers.*; +import team.lodestar.lodestone.registry.common.*; +import top.theillusivec4.curios.api.*; + +import java.util.function.*; + +public class CurioAlchemicalRing extends MalumCurioItem implements IMalumEventResponderItem { + + public CurioAlchemicalRing(Properties builder) { + super(builder, MalumTrinketType.ALCHEMICAL); + } + + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_alchemical_mastery")); + } + + @Override + public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { + addAttributeModifier(map, LodestoneAttributeRegistry.MAGIC_RESISTANCE.get(), uuid -> new AttributeModifier(uuid, + "Curio Magic Resistance", 1f, AttributeModifier.Operation.ADDITION)); + } + + @Override + public void pickupSpirit(LivingEntity collector, ItemStack stack, double arcaneResonance) { + collector.getActiveEffectsMap().forEach((e, i) -> { + float multiplier = MobEffectRegistry.ALCHEMICAL_PROFICIENCY_MAP.getOrDefault(ForgeRegistries.MOB_EFFECTS.getKey(e), 1f); + if (e.isBeneficial()) { + int base = 40 + (int) (arcaneResonance * 20); + EntityHelper.extendEffect(i, collector, (int) (base * multiplier), 1200); + } else if (e.getCategory().equals(MobEffectCategory.HARMFUL)) { + int base = 60 + (int) (arcaneResonance * 30); + EntityHelper.shortenEffect(i, collector, (int) (base * multiplier)); + } + }); + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioCurativeRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioCurativeRing.java similarity index 58% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioCurativeRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioCurativeRing.java index b1cf35994..aed5cbb3a 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioCurativeRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioCurativeRing.java @@ -1,20 +1,22 @@ -package com.sammy.malum.common.item.curiosities.curios.alchemical; +package com.sammy.malum.common.item.curiosities.curios.sets.alchemical; -import com.google.common.collect.Multimap; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.ai.attributes.Attribute; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.item.ItemStack; -import top.theillusivec4.curios.api.SlotContext; + +import java.util.function.*; public class CurioCurativeRing extends MalumCurioItem implements IMalumEventResponderItem { public CurioCurativeRing(Properties builder) { super(builder, MalumTrinketType.ALCHEMICAL); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_curative_talent")); + } + @Override public void pickupSpirit(LivingEntity collector, ItemStack stack, double arcaneResonance) { collector.heal(collector.getMaxHealth() * 0.1f + (float) (arcaneResonance * 0.05f)); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioRingOfProwess.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioRingOfProwess.java similarity index 73% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioRingOfProwess.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioRingOfProwess.java index fdc14788e..b2ee04ba0 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/alchemical/CurioRingOfProwess.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/alchemical/CurioRingOfProwess.java @@ -1,17 +1,24 @@ -package com.sammy.malum.common.item.curiosities.curios.alchemical; +package com.sammy.malum.common.item.curiosities.curios.sets.alchemical; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import java.util.function.*; + public class CurioRingOfProwess extends MalumCurioItem implements IMalumEventResponderItem { public CurioRingOfProwess(Properties builder) { super(builder, MalumTrinketType.ALCHEMICAL); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_arcane_prowess")); + } + @Override public void pickupSpirit(LivingEntity collector, ItemStack stack, double arcaneResonance) { Level level = collector.level(); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioHarmonyNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioHarmonyNecklace.java similarity index 83% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioHarmonyNecklace.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioHarmonyNecklace.java index 3299b1ff2..a155b03f9 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioHarmonyNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioHarmonyNecklace.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.misc; +package com.sammy.malum.common.item.curiosities.curios.sets.misc; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; import com.sammy.malum.core.helper.SpiritHelper; @@ -10,11 +10,18 @@ import net.minecraftforge.event.entity.living.LivingEvent; import team.lodestar.lodestone.helpers.CurioHelper; +import java.util.function.*; + public class CurioHarmonyNecklace extends MalumCurioItem { public CurioHarmonyNecklace(Properties builder) { super(builder, MalumTrinketType.METALLIC); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.necklace_of_blissful_harmony")); + } + public static void preventDetection(LivingEvent.LivingVisibilityEvent event) { if (event.getLookingEntity() instanceof LivingEntity watcher) { LivingEntity target = event.getEntity(); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioNarrowNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioNarrowNecklace.java similarity index 75% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioNarrowNecklace.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioNarrowNecklace.java index 7ff74b35c..6095ee6ef 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioNarrowNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioNarrowNecklace.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.misc; +package com.sammy.malum.common.item.curiosities.curios.sets.misc; import com.google.common.collect.Multimap; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; @@ -8,11 +8,18 @@ import net.minecraft.world.item.ItemStack; import top.theillusivec4.curios.api.SlotContext; +import java.util.function.*; + public class CurioNarrowNecklace extends MalumCurioItem { public CurioNarrowNecklace(Properties builder) { super(builder, MalumTrinketType.METALLIC); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(negativeEffect("malum.gui.curio.effect.necklace_of_the_narrow_edge")); + } + @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, AttributeRegistry.SCYTHE_PROFICIENCY.get(), uuid -> new AttributeModifier(uuid, diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioWaterNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioWaterNecklace.java similarity index 87% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioWaterNecklace.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioWaterNecklace.java index 83edda30c..01acae4ea 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/misc/CurioWaterNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioWaterNecklace.java @@ -1,8 +1,8 @@ -package com.sammy.malum.common.item.curiosities.curios.misc; +package com.sammy.malum.common.item.curiosities.curios.sets.misc; import com.google.common.collect.Multimap; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.ai.attributes.Attribute; @@ -13,11 +13,18 @@ import net.minecraftforge.event.entity.living.LivingHurtEvent; import top.theillusivec4.curios.api.SlotContext; +import java.util.function.*; + public class CurioWaterNecklace extends MalumCurioItem implements IMalumEventResponderItem { public CurioWaterNecklace(Properties builder) { super(builder, MalumTrinketType.GILDED); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.necklace_of_tidal_affinity")); + } + @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, ForgeMod.SWIM_SPEED.get(), uuid -> new AttributeModifier(uuid, diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioDemolitionistRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioDemolitionistRing.java similarity index 69% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioDemolitionistRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioDemolitionistRing.java index 611dde477..1b47eddf7 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioDemolitionistRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioDemolitionistRing.java @@ -1,16 +1,23 @@ -package com.sammy.malum.common.item.curiosities.curios.prospector; +package com.sammy.malum.common.item.curiosities.curios.sets.prospector; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; import com.sammy.malum.registry.common.item.ItemRegistry; import net.minecraft.world.entity.LivingEntity; import team.lodestar.lodestone.helpers.CurioHelper; +import java.util.function.*; + public class CurioDemolitionistRing extends MalumCurioItem { public CurioDemolitionistRing(Properties builder) { super(builder, MalumTrinketType.METALLIC); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_the_demolitionist")); + } + public static float increaseExplosionRadius(LivingEntity source, float original) { if (source != null && CurioHelper.hasCurioEquipped(source, ItemRegistry.RING_OF_THE_DEMOLITIONIST.get())) { return original + 1; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioHoarderRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioHoarderRing.java similarity index 80% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioHoarderRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioHoarderRing.java index a68a3eca6..752b930e6 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioHoarderRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioHoarderRing.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.prospector; +package com.sammy.malum.common.item.curiosities.curios.sets.prospector; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; import com.sammy.malum.registry.common.item.ItemRegistry; @@ -8,12 +8,19 @@ import net.minecraft.world.item.ItemStack; import team.lodestar.lodestone.helpers.CurioHelper; +import java.util.function.*; + public class CurioHoarderRing extends MalumCurioItem { public CurioHoarderRing(Properties builder) { super(builder, MalumTrinketType.METALLIC); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_the_hoarder")); + } + public static boolean hasHoarderRing(LivingEntity entity) { return entity != null && CurioHelper.hasCurioEquipped(entity, ItemRegistry.RING_OF_THE_HOARDER.get()); } diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioProspectorBelt.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioProspectorBelt.java similarity index 87% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioProspectorBelt.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioProspectorBelt.java index 13b4788ca..06a4a9f67 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/prospector/CurioProspectorBelt.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/prospector/CurioProspectorBelt.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.prospector; +package com.sammy.malum.common.item.curiosities.curios.sets.prospector; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; import com.sammy.malum.registry.common.item.ItemRegistry; @@ -15,12 +15,19 @@ import team.lodestar.lodestone.helpers.CurioHelper; import top.theillusivec4.curios.api.CuriosApi; +import java.util.function.*; + public class CurioProspectorBelt extends MalumCurioItem { public CurioProspectorBelt(Properties builder) { super(builder, MalumTrinketType.METALLIC); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.belt_of_the_prospector")); + } + public static void processExplosion(ExplosionEvent.Detonate event) { LivingEntity exploder = event.getExplosion().getIndirectSourceEntity(); if (exploder != null && CurioHelper.hasCurioEquipped(exploder, ItemRegistry.BELT_OF_THE_PROSPECTOR.get())) { diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/rotten/CurioStarvedBelt.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/rotten/CurioStarvedBelt.java similarity index 86% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/rotten/CurioStarvedBelt.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/rotten/CurioStarvedBelt.java index 4a9b0ae7b..4169d8544 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/rotten/CurioStarvedBelt.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/rotten/CurioStarvedBelt.java @@ -1,8 +1,8 @@ -package com.sammy.malum.common.item.curiosities.curios.rotten; +package com.sammy.malum.common.item.curiosities.curios.sets.rotten; import com.google.common.collect.Multimap; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import com.sammy.malum.registry.common.MobEffectRegistry; import com.sammy.malum.registry.common.SoundRegistry; import net.minecraft.sounds.SoundEvents; @@ -18,12 +18,19 @@ import team.lodestar.lodestone.helpers.EntityHelper; import top.theillusivec4.curios.api.SlotContext; +import java.util.function.*; + public class CurioStarvedBelt extends MalumCurioItem implements IMalumEventResponderItem { public CurioStarvedBelt(Properties builder) { super(builder, MalumTrinketType.ROTTEN); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.belt_of_the_starved")); + } + @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.ARMOR, uuid -> new AttributeModifier(uuid, diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/rotten/CurioVoraciousRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/rotten/CurioVoraciousRing.java similarity index 78% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/rotten/CurioVoraciousRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/rotten/CurioVoraciousRing.java index b0f7e79e1..e9c684002 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/rotten/CurioVoraciousRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/rotten/CurioVoraciousRing.java @@ -1,22 +1,22 @@ -package com.sammy.malum.common.item.curiosities.curios.rotten; +package com.sammy.malum.common.item.curiosities.curios.sets.rotten; -import com.google.common.collect.Multimap; -import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; +import com.google.common.collect.*; +import com.sammy.malum.common.item.curiosities.curios.*; import com.sammy.malum.registry.common.*; -import com.sammy.malum.registry.common.item.ItemRegistry; +import com.sammy.malum.registry.common.item.*; import net.minecraft.sounds.*; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.entity.*; +import net.minecraft.world.effect.*; import net.minecraft.world.entity.ai.attributes.*; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; +import net.minecraft.world.entity.player.*; +import net.minecraft.world.item.*; import net.minecraft.world.level.*; -import net.minecraftforge.event.entity.living.LivingEntityUseItemEvent; +import net.minecraftforge.event.entity.living.*; import team.lodestar.lodestone.helpers.*; -import top.theillusivec4.curios.api.SlotContext; +import top.theillusivec4.curios.api.*; -import static com.sammy.malum.registry.common.item.ItemTagRegistry.GROSS_FOODS; +import java.util.function.*; + +import static com.sammy.malum.registry.common.item.ItemTagRegistry.*; public class CurioVoraciousRing extends MalumCurioItem { @@ -24,6 +24,11 @@ public CurioVoraciousRing(Properties builder) { super(builder, MalumTrinketType.ROTTEN); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_desperate_voracity")); + } + @Override public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.ARMOR_TOUGHNESS, uuid -> new AttributeModifier(uuid, diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioMagebaneBelt.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/soulward/CurioMagebaneBelt.java similarity index 84% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioMagebaneBelt.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/soulward/CurioMagebaneBelt.java index 28fb50f59..c72605c4f 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioMagebaneBelt.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/soulward/CurioMagebaneBelt.java @@ -1,10 +1,10 @@ -package com.sammy.malum.common.item.curiosities.curios.soulward; +package com.sammy.malum.common.item.curiosities.curios.sets.soulward; import com.google.common.collect.*; import com.sammy.malum.common.capability.*; +import com.sammy.malum.common.item.*; import com.sammy.malum.common.item.curiosities.curios.*; import com.sammy.malum.core.handlers.*; -import com.sammy.malum.core.systems.item.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.damagesource.*; import net.minecraft.world.entity.ai.attributes.*; @@ -14,12 +14,19 @@ import team.lodestar.lodestone.registry.common.tag.*; import top.theillusivec4.curios.api.*; +import java.util.function.*; + public class CurioMagebaneBelt extends MalumCurioItem implements IMalumEventResponderItem { public CurioMagebaneBelt(Properties builder) { super(builder, MalumTrinketType.ORNATE); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.belt_of_the_magebane")); + } + @Override public void onSoulwardAbsorbDamage(LivingHurtEvent event, Player wardedPlayer, ItemStack stack, float soulwardLost, float damageAbsorbed) { DamageSource source = event.getSource(); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/spirit/CurioArcaneSpoilRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioArcaneSpoilRing.java similarity index 92% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/spirit/CurioArcaneSpoilRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioArcaneSpoilRing.java index abbad5d29..34137bb44 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/spirit/CurioArcaneSpoilRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioArcaneSpoilRing.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item.curiosities.curios.spirit; +package com.sammy.malum.common.item.curiosities.curios.sets.spirit; import com.google.common.collect.Multimap; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/spirit/CurioMirrorNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioMirrorNecklace.java similarity index 90% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/spirit/CurioMirrorNecklace.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioMirrorNecklace.java index 9ff685ef4..9b2c26f27 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/spirit/CurioMirrorNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioMirrorNecklace.java @@ -1,8 +1,8 @@ -package com.sammy.malum.common.item.curiosities.curios.spirit; +package com.sammy.malum.common.item.curiosities.curios.sets.spirit; import com.google.common.collect.Multimap; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import com.sammy.malum.registry.common.AttributeRegistry; import net.minecraft.world.entity.ai.attributes.Attribute; import net.minecraft.world.entity.ai.attributes.AttributeModifier; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioGrowingFleshRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioGrowingFleshRing.java similarity index 80% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioGrowingFleshRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioGrowingFleshRing.java index fbc0f9d97..af46e720d 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioGrowingFleshRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioGrowingFleshRing.java @@ -1,7 +1,7 @@ -package com.sammy.malum.common.item.curiosities.curios.weeping; +package com.sammy.malum.common.item.curiosities.curios.sets.weeping; +import com.sammy.malum.common.item.*; import com.sammy.malum.common.item.curiosities.curios.*; -import com.sammy.malum.core.systems.item.*; import com.sammy.malum.registry.common.*; import net.minecraft.sounds.*; import net.minecraft.world.effect.*; @@ -10,11 +10,18 @@ import net.minecraft.world.level.*; import team.lodestar.lodestone.helpers.*; +import java.util.function.*; + public class CurioGrowingFleshRing extends MalumCurioItem implements IVoidItem, IMalumEventResponderItem { public CurioGrowingFleshRing(Properties builder) { super(builder, MalumTrinketType.VOID); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_growing_flesh")); + } + @Override public void pickupSpirit(LivingEntity collector, ItemStack stack, double arcaneResonance) { MobEffect cancerousGrowth = MobEffectRegistry.CANCEROUS_GROWTH.get(); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioGruesomeSatiationRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioGruesomeSatiationRing.java similarity index 82% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioGruesomeSatiationRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioGruesomeSatiationRing.java index 6cabc68bb..6bf86096c 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioGruesomeSatiationRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioGruesomeSatiationRing.java @@ -1,17 +1,17 @@ -package com.sammy.malum.common.item.curiosities.curios.weeping; +package com.sammy.malum.common.item.curiosities.curios.sets.weeping; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IVoidItem; +import com.sammy.malum.common.item.IVoidItem; import com.sammy.malum.registry.common.*; import com.sammy.malum.registry.common.item.*; -import net.minecraft.sounds.*; import net.minecraft.world.effect.*; import net.minecraft.world.entity.player.*; import net.minecraft.world.item.*; -import net.minecraft.world.level.*; import net.minecraftforge.event.entity.living.*; import team.lodestar.lodestone.helpers.*; +import java.util.function.*; + import static com.sammy.malum.registry.common.item.ItemTagRegistry.GROSS_FOODS; public class CurioGruesomeSatiationRing extends MalumCurioItem implements IVoidItem { @@ -19,6 +19,11 @@ public CurioGruesomeSatiationRing(Properties builder) { super(builder, MalumTrinketType.VOID); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.ring_of_gruesome_satiation")); + } + public static void finishEating(LivingEntityUseItemEvent.Finish event) { if (event.getEntity() instanceof Player player) { ItemStack stack = event.getResultStack(); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioHiddenBladeNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioHiddenBladeNecklace.java similarity index 67% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioHiddenBladeNecklace.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioHiddenBladeNecklace.java index f2c981e9f..76a51e51b 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioHiddenBladeNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioHiddenBladeNecklace.java @@ -1,8 +1,8 @@ -package com.sammy.malum.common.item.curiosities.curios.weeping; +package com.sammy.malum.common.item.curiosities.curios.sets.weeping; import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; -import com.sammy.malum.core.systems.item.IVoidItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IVoidItem; import com.sammy.malum.registry.common.MobEffectRegistry; import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectInstance; @@ -10,11 +10,19 @@ import net.minecraft.world.item.ItemStack; import net.minecraftforge.event.entity.living.LivingHurtEvent; +import java.util.function.*; + public class CurioHiddenBladeNecklace extends MalumCurioItem implements IMalumEventResponderItem, IVoidItem { public CurioHiddenBladeNecklace(Properties builder) { super(builder, MalumTrinketType.VOID); } + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.necklace_of_the_hidden_blade")); + consumer.accept(negativeEffect("malum.gui.curio.effect.necklace_of_the_narrow_edge")); + } + @Override public void takeDamageEvent(LivingHurtEvent event, LivingEntity attacker, LivingEntity attacked, ItemStack stack) { float amount = event.getAmount(); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioLimitlessBelt.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioLimitlessBelt.java similarity index 81% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioLimitlessBelt.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioLimitlessBelt.java index 277c3af4e..9e32db97c 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioLimitlessBelt.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioLimitlessBelt.java @@ -1,21 +1,19 @@ -package com.sammy.malum.common.item.curiosities.curios.weeping; +package com.sammy.malum.common.item.curiosities.curios.sets.weeping; import com.google.common.collect.*; -import com.sammy.malum.common.capability.*; +import com.sammy.malum.common.item.*; import com.sammy.malum.common.item.curiosities.curios.*; import com.sammy.malum.config.*; -import com.sammy.malum.core.handlers.*; -import com.sammy.malum.core.systems.item.*; import com.sammy.malum.registry.common.*; -import net.minecraft.world.damagesource.*; import net.minecraft.world.entity.*; import net.minecraft.world.entity.ai.attributes.*; -import net.minecraft.world.entity.player.*; import net.minecraft.world.item.*; import net.minecraftforge.event.entity.living.*; import team.lodestar.lodestone.registry.common.tag.*; import top.theillusivec4.curios.api.*; +import java.util.function.*; + public class CurioLimitlessBelt extends MalumCurioItem implements IMalumEventResponderItem, IVoidItem { public CurioLimitlessBelt(Properties builder) { @@ -23,11 +21,8 @@ public CurioLimitlessBelt(Properties builder) { } @Override - public float overrideSoulwardDamageAbsorbPercentage(LivingHurtEvent event, LivingEntity wardedEntity, ItemStack stack, float original) { - if (!event.getSource().is(LodestoneDamageTypeTags.IS_MAGIC)) { - return CommonConfig.SOUL_WARD_MAGIC.getConfigValue().floatValue(); - } - return IMalumEventResponderItem.super.overrideSoulwardDamageAbsorbPercentage(event, wardedEntity, stack, original); + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.belt_of_the_limitless")); } @Override @@ -35,4 +30,12 @@ public void addAttributeModifiers(Multimap map, Sl addAttributeModifier(map, AttributeRegistry.SOUL_WARD_CAP.get(), uuid -> new AttributeModifier(uuid, "Curio Soul Ward Capacity", 1f, AttributeModifier.Operation.MULTIPLY_TOTAL)); } + + @Override + public float overrideSoulwardDamageAbsorbPercentage(LivingHurtEvent event, LivingEntity wardedEntity, ItemStack stack, float original) { + if (!event.getSource().is(LodestoneDamageTypeTags.IS_MAGIC)) { + return CommonConfig.SOUL_WARD_MAGIC.getConfigValue().floatValue(); + } + return IMalumEventResponderItem.super.overrideSoulwardDamageAbsorbPercentage(event, wardedEntity, stack, original); + } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioPlentifulRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioPlentifulRing.java similarity index 88% rename from src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioPlentifulRing.java rename to src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioPlentifulRing.java index 34db29f0e..4f6f3fff5 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioPlentifulRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioPlentifulRing.java @@ -1,8 +1,8 @@ -package com.sammy.malum.common.item.curiosities.curios.weeping; +package com.sammy.malum.common.item.curiosities.curios.sets.weeping; import com.google.common.collect.*; +import com.sammy.malum.common.item.*; import com.sammy.malum.common.item.curiosities.curios.*; -import com.sammy.malum.core.systems.item.*; import com.sammy.malum.registry.common.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.item.*; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioWatcherNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioWatcherNecklace.java new file mode 100644 index 000000000..86e955e6b --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioWatcherNecklace.java @@ -0,0 +1,17 @@ +package com.sammy.malum.common.item.curiosities.curios.sets.weeping; + +import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; +import com.sammy.malum.common.item.IVoidItem; + +import java.util.function.*; + +public class CurioWatcherNecklace extends MalumCurioItem implements IVoidItem { + public CurioWatcherNecklace(Properties builder) { + super(builder, MalumTrinketType.VOID); + } + + @Override + public void addExtraTooltipLines(Consumer consumer) { + consumer.accept(positiveEffect("malum.gui.curio.effect.necklace_of_the_watcher")); + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioReinforcementRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioReinforcementRing.java deleted file mode 100644 index 676476e2a..000000000 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioReinforcementRing.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.sammy.malum.common.item.curiosities.curios.soulward; - -import com.google.common.collect.*; -import com.sammy.malum.common.capability.*; -import com.sammy.malum.common.item.curiosities.curios.*; -import com.sammy.malum.core.handlers.*; -import com.sammy.malum.core.systems.item.*; -import com.sammy.malum.registry.common.*; -import net.minecraft.world.damagesource.*; -import net.minecraft.world.entity.ai.attributes.*; -import net.minecraft.world.entity.player.*; -import net.minecraft.world.item.*; -import net.minecraftforge.event.entity.living.*; -import team.lodestar.lodestone.registry.common.tag.*; -import top.theillusivec4.curios.api.*; - -public class CurioReinforcementRing extends MalumCurioItem { - - public CurioReinforcementRing(Properties builder) { - super(builder, MalumTrinketType.ORNATE); - } - - @Override - public void addAttributeModifiers(Multimap map, SlotContext slotContext, ItemStack stack) { - addAttributeModifier(map, AttributeRegistry.SOUL_WARD_CAP.get(), uuid -> new AttributeModifier(uuid, - "Curio Soul Ward Capacity", 3f, AttributeModifier.Operation.ADDITION)); - addAttributeModifier(map, AttributeRegistry.SOUL_WARD_STRENGTH.get(), uuid -> new AttributeModifier(uuid, - "Curio Soul Ward Strength", 1f, AttributeModifier.Operation.ADDITION)); - } -} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioWatcherNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioWatcherNecklace.java deleted file mode 100644 index eb1aa1215..000000000 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/weeping/CurioWatcherNecklace.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.sammy.malum.common.item.curiosities.curios.weeping; - -import com.sammy.malum.common.item.curiosities.curios.MalumCurioItem; -import com.sammy.malum.core.systems.item.IVoidItem; - -public class CurioWatcherNecklace extends MalumCurioItem implements IVoidItem { - public CurioWatcherNecklace(Properties builder) { - super(builder, MalumTrinketType.VOID); - } -} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/MalumRuneCurioItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/runes/MalumRuneCurioItem.java deleted file mode 100644 index 3ee1ff556..000000000 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/MalumRuneCurioItem.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.sammy.malum.common.item.curiosities.runes; - -import com.sammy.malum.common.item.curiosities.curios.*; -import com.sammy.malum.core.systems.spirit.*; -import com.sammy.malum.visual_effects.*; -import net.minecraft.*; -import net.minecraft.network.chat.*; -import net.minecraft.world.item.*; -import net.minecraft.world.level.*; -import net.minecraftforge.api.distmarker.*; -import team.lodestar.lodestone.handlers.screenparticle.*; -import team.lodestar.lodestone.systems.particle.screen.*; - -import java.util.*; - -public class MalumRuneCurioItem extends MalumCurioItem implements ParticleEmitterHandler.ItemParticleSupplier { - - public final MalumSpiritType spiritType; - public MalumRuneCurioItem(Properties builder, MalumSpiritType spiritType) { - super(builder, MalumTrinketType.RUNE); - this.spiritType = spiritType; - } - - @Override - public List getAttributesTooltip(List tooltips, ItemStack stack) { - final List attributesTooltip = super.getAttributesTooltip(tooltips, stack); - - final Optional effectDescriptor = getEffectDescriptor(); - effectDescriptor.ifPresent(s -> { - if (attributesTooltip.isEmpty()) { - attributesTooltip.add(Component.empty()); - attributesTooltip.add(Component.translatable("curios.modifiers.rune") - .withStyle(ChatFormatting.GOLD)); - } - attributesTooltip.add(Component.translatable("malum.gui.rune.plus") - .append(Component.translatable("malum.gui.rune.effect." + s)).withStyle(ChatFormatting.BLUE)); - }); - - return attributesTooltip; - } - - public Optional getEffectDescriptor() { - return Optional.empty(); - } - - @OnlyIn(Dist.CLIENT) - @Override - public void spawnLateParticles(ScreenParticleHolder target, Level level, float partialTick, ItemStack stack, float x, float y) { - ScreenParticleEffects.spawnRuneParticles(target, spiritType); - } -} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneHasteItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneHasteItem.java deleted file mode 100644 index d3a529fee..000000000 --- a/src/main/java/com/sammy/malum/common/item/curiosities/runes/RuneHasteItem.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.sammy.malum.common.item.curiosities.runes; - -import com.sammy.malum.registry.common.*; - -import java.util.*; - -public class RuneHasteItem extends MalumRuneCurioItem { - - public RuneHasteItem(Properties builder) { - super(builder, SpiritTypeRegistry.INFERNAL_SPIRIT); - } - - @Override - public Optional getEffectDescriptor() { - return Optional.of("haste"); - } -} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/TyrvingItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/TyrvingItem.java index 8aa4b2a2c..7b847176f 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/TyrvingItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/TyrvingItem.java @@ -2,7 +2,7 @@ import com.sammy.malum.common.packets.particle.curiosities.rite.generic.MajorEntityEffectParticlePacket; import com.sammy.malum.core.helper.SpiritHelper; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import com.sammy.malum.registry.common.DamageTypeRegistry; import com.sammy.malum.registry.common.SoundRegistry; import com.sammy.malum.registry.common.SpiritTypeRegistry; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/scythe/MalumScytheItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/scythe/MalumScytheItem.java index 4331a0899..4246eec38 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/scythe/MalumScytheItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/scythe/MalumScytheItem.java @@ -1,7 +1,7 @@ package com.sammy.malum.common.item.curiosities.weapons.scythe; import com.sammy.malum.common.entity.boomerang.ScytheBoomerangEntity; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import com.sammy.malum.registry.client.ParticleRegistry; import com.sammy.malum.registry.common.DamageTypeRegistry; import com.sammy.malum.registry.common.SoundRegistry; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/staff/AbstractStaffItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/staff/AbstractStaffItem.java index 2e24b764e..e8d215961 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/staff/AbstractStaffItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/staff/AbstractStaffItem.java @@ -4,8 +4,8 @@ import com.sammy.malum.common.capability.*; import com.sammy.malum.common.enchantment.*; import com.sammy.malum.common.entity.bolt.*; +import com.sammy.malum.common.item.*; import com.sammy.malum.common.item.curiosities.weapons.scythe.*; -import com.sammy.malum.core.systems.item.*; import com.sammy.malum.registry.client.*; import com.sammy.malum.registry.common.*; import net.minecraft.sounds.*; diff --git a/src/main/java/com/sammy/malum/common/item/BlightedGunkItem.java b/src/main/java/com/sammy/malum/common/item/misc/BlightedGunkItem.java similarity index 97% rename from src/main/java/com/sammy/malum/common/item/BlightedGunkItem.java rename to src/main/java/com/sammy/malum/common/item/misc/BlightedGunkItem.java index f9363490f..44c3584b8 100644 --- a/src/main/java/com/sammy/malum/common/item/BlightedGunkItem.java +++ b/src/main/java/com/sammy/malum/common/item/misc/BlightedGunkItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item; +package com.sammy.malum.common.item.misc; import net.minecraft.core.*; import net.minecraft.world.entity.player.*; diff --git a/src/main/java/com/sammy/malum/common/item/BrillianceChunkItem.java b/src/main/java/com/sammy/malum/common/item/misc/BrillianceChunkItem.java similarity index 96% rename from src/main/java/com/sammy/malum/common/item/BrillianceChunkItem.java rename to src/main/java/com/sammy/malum/common/item/misc/BrillianceChunkItem.java index 8ae8230dd..8920ccdb4 100644 --- a/src/main/java/com/sammy/malum/common/item/BrillianceChunkItem.java +++ b/src/main/java/com/sammy/malum/common/item/misc/BrillianceChunkItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item; +package com.sammy.malum.common.item.misc; import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.entity.LivingEntity; diff --git a/src/main/java/com/sammy/malum/common/item/CalcifiedBlightItem.java b/src/main/java/com/sammy/malum/common/item/misc/CalcifiedBlightItem.java similarity index 95% rename from src/main/java/com/sammy/malum/common/item/CalcifiedBlightItem.java rename to src/main/java/com/sammy/malum/common/item/misc/CalcifiedBlightItem.java index f70886550..f1ff8f114 100644 --- a/src/main/java/com/sammy/malum/common/item/CalcifiedBlightItem.java +++ b/src/main/java/com/sammy/malum/common/item/misc/CalcifiedBlightItem.java @@ -1,4 +1,4 @@ -package com.sammy.malum.common.item; +package com.sammy.malum.common.item.misc; import com.sammy.malum.registry.common.block.*; import net.minecraft.world.item.*; diff --git a/src/main/java/com/sammy/malum/common/item/FusedConsciousnessItem.java b/src/main/java/com/sammy/malum/common/item/misc/FusedConsciousnessItem.java similarity index 77% rename from src/main/java/com/sammy/malum/common/item/FusedConsciousnessItem.java rename to src/main/java/com/sammy/malum/common/item/misc/FusedConsciousnessItem.java index a7191e379..2b24f4af9 100644 --- a/src/main/java/com/sammy/malum/common/item/FusedConsciousnessItem.java +++ b/src/main/java/com/sammy/malum/common/item/misc/FusedConsciousnessItem.java @@ -1,6 +1,6 @@ -package com.sammy.malum.common.item; +package com.sammy.malum.common.item.misc; -import com.sammy.malum.core.systems.item.IVoidItem; +import com.sammy.malum.common.item.*; import net.minecraft.world.item.SimpleFoiledItem; public class FusedConsciousnessItem extends SimpleFoiledItem implements IVoidItem { diff --git a/src/main/java/com/sammy/malum/common/recipe/AbstractMalumRecipe.java b/src/main/java/com/sammy/malum/common/recipe/AbstractMalumRecipe.java new file mode 100644 index 000000000..0718233ca --- /dev/null +++ b/src/main/java/com/sammy/malum/common/recipe/AbstractMalumRecipe.java @@ -0,0 +1,50 @@ +package com.sammy.malum.common.recipe; + +import net.minecraft.resources.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import team.lodestar.lodestone.systems.recipe.*; + +import java.util.*; +import java.util.function.*; + +public abstract class AbstractMalumRecipe extends ILodestoneRecipe { + private final ResourceLocation id; + private final RecipeSerializer recipeSerializer; + private final RecipeType recipeType; + + protected AbstractMalumRecipe(ResourceLocation id, RecipeSerializer recipeSerializer, RecipeType recipeType) { + this.id = id; + this.recipeSerializer = recipeSerializer; + this.recipeType = recipeType; + } + + @Override + public ResourceLocation getId() { + return id; + } + + @Override + public RecipeSerializer getSerializer() { + return recipeSerializer; + } + + @Override + public RecipeType getType() { + return recipeType; + } + + public static T getRecipe(Level level, RecipeType recipeType, Predicate predicate) { + List recipes = getRecipes(level, recipeType); + for (T recipe : recipes) { + if (predicate.test(recipe)) { + return recipe; + } + } + return null; + } + + public static List getRecipes(Level level, RecipeType recipeType) { + return level.getRecipeManager().getAllRecipesFor(recipeType); + } +} diff --git a/src/main/java/com/sammy/malum/common/recipe/AbstractSpiritListMalumRecipe.java b/src/main/java/com/sammy/malum/common/recipe/AbstractSpiritListMalumRecipe.java new file mode 100644 index 000000000..290b63a2e --- /dev/null +++ b/src/main/java/com/sammy/malum/common/recipe/AbstractSpiritListMalumRecipe.java @@ -0,0 +1,53 @@ +package com.sammy.malum.common.recipe; + +import com.sammy.malum.core.systems.recipe.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; + +import java.util.*; + +public abstract class AbstractSpiritListMalumRecipe extends AbstractMalumRecipe{ + + public final List spirits; + + protected AbstractSpiritListMalumRecipe(ResourceLocation id, RecipeSerializer recipeSerializer, RecipeType recipeType, List spirits) { + super(id, recipeSerializer, recipeType); + this.spirits = spirits; + } + + + public List getSortedSpirits(List stacks) { + List sortedStacks = new ArrayList<>(); + for (SpiritWithCount item : spirits) { + for (ItemStack stack : stacks) { + if (item.matches(stack)) { + sortedStacks.add(stack); + break; + } + } + } + return sortedStacks; + } + + public boolean doSpiritsMatch(List spirits) { + if (this.spirits.size() == 0) { + return true; + } + if (this.spirits.size() != spirits.size()) { + return false; + } + List sortedStacks = getSortedSpirits(spirits); + if (sortedStacks.size() < this.spirits.size()) { + return false; + } + for (int i = 0; i < this.spirits.size(); i++) { + SpiritWithCount item = this.spirits.get(i); + ItemStack stack = sortedStacks.get(i); + if (!item.matches(stack)) { + return false; + } + } + return true; + } +} diff --git a/src/main/java/com/sammy/malum/common/recipe/FavorOfTheVoidRecipe.java b/src/main/java/com/sammy/malum/common/recipe/FavorOfTheVoidRecipe.java index 7c46e03d1..e5a90d760 100644 --- a/src/main/java/com/sammy/malum/common/recipe/FavorOfTheVoidRecipe.java +++ b/src/main/java/com/sammy/malum/common/recipe/FavorOfTheVoidRecipe.java @@ -1,52 +1,31 @@ package com.sammy.malum.common.recipe; -import com.google.gson.JsonObject; -import com.sammy.malum.registry.common.recipe.RecipeSerializerRegistry; -import com.sammy.malum.registry.common.recipe.RecipeTypeRegistry; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.crafting.CraftingHelper; -import team.lodestar.lodestone.systems.recipe.ILodestoneRecipe; - -import javax.annotation.Nullable; -import java.util.List; -import java.util.function.Predicate; - -public class FavorOfTheVoidRecipe extends ILodestoneRecipe { +import com.google.gson.*; +import com.sammy.malum.registry.common.recipe.*; +import net.minecraft.network.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import net.minecraftforge.common.crafting.*; + +import javax.annotation.*; +import java.util.*; +import java.util.function.*; + +public class FavorOfTheVoidRecipe extends AbstractMalumRecipe { public static final String NAME = "favor_of_the_void"; - private final ResourceLocation id; - public final Ingredient input; public final ItemStack output; public FavorOfTheVoidRecipe(ResourceLocation id, Ingredient input, ItemStack output) { - this.id = id; + super(id, RecipeSerializerRegistry.VOID_FAVOR_RECIPE_SERIALIZER.get(), RecipeTypeRegistry.VOID_FAVOR.get()); this.input = input; this.output = output; } - @Override - public RecipeSerializer getSerializer() { - return RecipeSerializerRegistry.VOID_FAVOR_RECIPE_SERIALIZER.get(); - } - - @Override - public RecipeType getType() { - return RecipeTypeRegistry.VOID_FAVOR.get(); - } - - @Override - public ResourceLocation getId() { - return id; - } - public boolean doesInputMatch(ItemStack input) { return this.input.test(input); } @@ -60,17 +39,11 @@ public static FavorOfTheVoidRecipe getRecipe(Level level, ItemStack stack) { } public static FavorOfTheVoidRecipe getRecipe(Level level, Predicate predicate) { - List recipes = getRecipes(level); - for (FavorOfTheVoidRecipe recipe : recipes) { - if (predicate.test(recipe)) { - return recipe; - } - } - return null; + return getRecipe(level, RecipeTypeRegistry.VOID_FAVOR.get(), predicate); } public static List getRecipes(Level level) { - return level.getRecipeManager().getAllRecipesFor(RecipeTypeRegistry.VOID_FAVOR.get()); + return getRecipes(level, RecipeTypeRegistry.VOID_FAVOR.get()); } public static class Serializer implements RecipeSerializer { diff --git a/src/main/java/com/sammy/malum/common/recipe/RunicWorkbenchRecipe.java b/src/main/java/com/sammy/malum/common/recipe/RunicWorkbenchRecipe.java new file mode 100644 index 000000000..159e00ac7 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/recipe/RunicWorkbenchRecipe.java @@ -0,0 +1,84 @@ +package com.sammy.malum.common.recipe; + +import com.google.gson.*; +import com.sammy.malum.registry.common.recipe.*; +import net.minecraft.network.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import net.minecraftforge.common.crafting.*; +import team.lodestar.lodestone.systems.recipe.*; + +import javax.annotation.*; +import java.util.*; +import java.util.function.*; + +public class RunicWorkbenchRecipe extends AbstractMalumRecipe { + public static final String NAME = "runeworking"; + + public final IngredientWithCount primaryInput; + public final IngredientWithCount secondaryInput; + public final ItemStack output; + + public RunicWorkbenchRecipe(ResourceLocation id, IngredientWithCount primaryInput, IngredientWithCount secondaryInput, ItemStack output) { + super(id, RecipeSerializerRegistry.RUNEWORKING_RECIPE_SERIALIZER.get(), RecipeTypeRegistry.RUNEWORKING.get()); + this.primaryInput = primaryInput; + this.secondaryInput = secondaryInput; + this.output = output; + } + + public boolean doesPrimaryInputMatch(ItemStack input) { + return this.primaryInput.matches(input); + } + + public boolean doesSecondaryInputMatch(ItemStack input) { + return this.secondaryInput.matches(input); + } + + public boolean doesOutputMatch(ItemStack output) { + return output.getItem().equals(this.output.getItem()); + } + + public static RunicWorkbenchRecipe getRecipe(Level level, ItemStack primaryStack, ItemStack secondaryStack) { + return getRecipe(level, c -> c.doesPrimaryInputMatch(primaryStack) && c.doesSecondaryInputMatch(secondaryStack)); + } + + public static RunicWorkbenchRecipe getRecipe(Level level, Predicate predicate) { + return getRecipe(level, RecipeTypeRegistry.RUNEWORKING.get(), predicate); + } + + public static List getRecipes(Level level) { + return getRecipes(level, RecipeTypeRegistry.RUNEWORKING.get()); + } + + public static class Serializer implements RecipeSerializer { + + @Override + public RunicWorkbenchRecipe fromJson(ResourceLocation recipeId, JsonObject json) { + IngredientWithCount primaryInput = IngredientWithCount.deserialize(json.getAsJsonObject("primaryInput")); + IngredientWithCount secondaryInput = IngredientWithCount.deserialize(json.getAsJsonObject("secondaryInput")); + + JsonObject outputObject = json.getAsJsonObject("output"); + ItemStack output = CraftingHelper.getItemStack(outputObject, true); + + return new RunicWorkbenchRecipe(recipeId, primaryInput, secondaryInput, output); + } + + @Nullable + @Override + public RunicWorkbenchRecipe fromNetwork(ResourceLocation recipeId, FriendlyByteBuf buffer) { + IngredientWithCount primaryInput = IngredientWithCount.read(buffer); + IngredientWithCount secondaryInput = IngredientWithCount.read(buffer); + ItemStack output = buffer.readItem(); + return new RunicWorkbenchRecipe(recipeId, primaryInput, secondaryInput, output); + } + + @Override + public void toNetwork(FriendlyByteBuf buffer, RunicWorkbenchRecipe recipe) { + recipe.primaryInput.write(buffer); + recipe.secondaryInput.write(buffer); + buffer.writeItem(recipe.output); + } + } +} diff --git a/src/main/java/com/sammy/malum/common/recipe/SpiritFocusingRecipe.java b/src/main/java/com/sammy/malum/common/recipe/SpiritFocusingRecipe.java index ad6a50a67..7199dd923 100644 --- a/src/main/java/com/sammy/malum/common/recipe/SpiritFocusingRecipe.java +++ b/src/main/java/com/sammy/malum/common/recipe/SpiritFocusingRecipe.java @@ -1,93 +1,34 @@ package com.sammy.malum.common.recipe; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.sammy.malum.core.systems.recipe.SpiritWithCount; -import com.sammy.malum.registry.common.recipe.RecipeSerializerRegistry; -import com.sammy.malum.registry.common.recipe.RecipeTypeRegistry; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.crafting.CraftingHelper; -import team.lodestar.lodestone.systems.recipe.ILodestoneRecipe; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Predicate; - -public class SpiritFocusingRecipe extends ILodestoneRecipe { +import com.google.gson.*; +import com.sammy.malum.core.systems.recipe.*; +import com.sammy.malum.registry.common.recipe.*; +import net.minecraft.network.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import net.minecraftforge.common.crafting.*; + +import javax.annotation.*; +import java.util.*; +import java.util.function.*; + +public class SpiritFocusingRecipe extends AbstractSpiritListMalumRecipe { public static final String NAME = "spirit_focusing"; - private final ResourceLocation id; - public final int time; public final int durabilityCost; public final Ingredient input; public final ItemStack output; - public final List spirits; public SpiritFocusingRecipe(ResourceLocation id, int time, int durabilityCost, Ingredient input, ItemStack output, List spirits) { - this.id = id; + super(id, RecipeSerializerRegistry.FOCUSING_RECIPE_SERIALIZER.get(), RecipeTypeRegistry.SPIRIT_FOCUSING.get(), spirits); this.time = time; this.durabilityCost = durabilityCost; this.input = input; this.output = output; - this.spirits = spirits; - } - - @Override - public RecipeSerializer getSerializer() { - return RecipeSerializerRegistry.FOCUSING_RECIPE_SERIALIZER.get(); - } - - @Override - public RecipeType getType() { - return RecipeTypeRegistry.SPIRIT_FOCUSING.get(); - } - - @Override - public ResourceLocation getId() { - return id; - } - - public List getSortedSpirits(List stacks) { - List sortedStacks = new ArrayList<>(); - for (SpiritWithCount item : spirits) { - for (ItemStack stack : stacks) { - if (item.matches(stack)) { - sortedStacks.add(stack); - break; - } - } - } - return sortedStacks; - } - - public boolean doSpiritsMatch(List spirits) { - if (this.spirits.size() == 0) { - return true; - } - if (this.spirits.size() != spirits.size()) { - return false; - } - List sortedStacks = getSortedSpirits(spirits); - if (sortedStacks.size() < this.spirits.size()) { - return false; - } - for (int i = 0; i < this.spirits.size(); i++) { - SpiritWithCount item = this.spirits.get(i); - ItemStack stack = sortedStacks.get(i); - if (!item.matches(stack)) { - return false; - } - } - return true; } public boolean doesInputMatch(ItemStack input) { @@ -103,17 +44,11 @@ public static SpiritFocusingRecipe getRecipe(Level level, ItemStack stack, List< } public static SpiritFocusingRecipe getRecipe(Level level, Predicate predicate) { - List recipes = getRecipes(level); - for (SpiritFocusingRecipe recipe : recipes) { - if (predicate.test(recipe)) { - return recipe; - } - } - return null; + return getRecipe(level, RecipeTypeRegistry.SPIRIT_FOCUSING.get(), predicate); } public static List getRecipes(Level level) { - return level.getRecipeManager().getAllRecipesFor(RecipeTypeRegistry.SPIRIT_FOCUSING.get()); + return getRecipes(level, RecipeTypeRegistry.SPIRIT_FOCUSING.get()); } public static class Serializer implements RecipeSerializer { diff --git a/src/main/java/com/sammy/malum/common/recipe/SpiritInfusionRecipe.java b/src/main/java/com/sammy/malum/common/recipe/SpiritInfusionRecipe.java index 327e2201a..c1e907988 100644 --- a/src/main/java/com/sammy/malum/common/recipe/SpiritInfusionRecipe.java +++ b/src/main/java/com/sammy/malum/common/recipe/SpiritInfusionRecipe.java @@ -1,96 +1,38 @@ package com.sammy.malum.common.recipe; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.sammy.malum.core.systems.recipe.SpiritWithCount; -import com.sammy.malum.registry.common.recipe.RecipeSerializerRegistry; -import com.sammy.malum.registry.common.recipe.RecipeTypeRegistry; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.crafting.CraftingHelper; -import team.lodestar.lodestone.systems.recipe.ILodestoneRecipe; -import team.lodestar.lodestone.systems.recipe.IngredientWithCount; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Predicate; - -public class SpiritInfusionRecipe extends ILodestoneRecipe { +import com.google.gson.*; +import com.sammy.malum.core.systems.recipe.*; +import com.sammy.malum.registry.common.recipe.*; +import net.minecraft.network.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import net.minecraftforge.common.crafting.*; +import team.lodestar.lodestone.systems.recipe.*; + +import javax.annotation.*; +import java.util.*; +import java.util.function.*; + +public class SpiritInfusionRecipe extends AbstractSpiritListMalumRecipe { public static final String NAME = "spirit_infusion"; - private final ResourceLocation id; - public final IngredientWithCount input; public final boolean useNbtFromInput; public final ItemStack output; - public final List spirits; public final List extraItems; public SpiritInfusionRecipe(ResourceLocation id, IngredientWithCount input, boolean useNbtFromInput, ItemStack output, List spirits, List extraItems) { - this.id = id; + super(id, RecipeSerializerRegistry.INFUSION_RECIPE_SERIALIZER.get(), RecipeTypeRegistry.SPIRIT_INFUSION.get(), spirits); this.input = input; this.useNbtFromInput = useNbtFromInput; this.output = output; - this.spirits = spirits; this.extraItems = extraItems; } - @Override - public RecipeSerializer getSerializer() { - return RecipeSerializerRegistry.INFUSION_RECIPE_SERIALIZER.get(); - } - - @Override - public RecipeType getType() { - return RecipeTypeRegistry.SPIRIT_INFUSION.get(); - } - - @Override - public ResourceLocation getId() { - return id; - } - - public List getSortedSpirits(List stacks) { - List sortedStacks = new ArrayList<>(); - for (SpiritWithCount item : spirits) { - for (ItemStack stack : stacks) { - if (item.matches(stack)) { - sortedStacks.add(stack); - break; - } - } - } - return sortedStacks; - } - - public boolean doSpiritsMatch(List spirits) { - if (this.spirits.size() == 0) { - return true; - } - if (this.spirits.size() != spirits.size()) { - return false; - } - List sortedStacks = getSortedSpirits(spirits); - if (sortedStacks.size() < this.spirits.size()) { - return false; - } - for (int i = 0; i < this.spirits.size(); i++) { - SpiritWithCount item = this.spirits.get(i); - ItemStack stack = sortedStacks.get(i); - if (!item.matches(stack)) { - return false; - } - } - return true; - } - public boolean doesInputMatch(ItemStack input) { return this.input.matches(input); } @@ -104,17 +46,11 @@ public static SpiritInfusionRecipe getRecipe(Level level, ItemStack stack, List< } public static SpiritInfusionRecipe getRecipe(Level level, Predicate predicate) { - List recipes = getRecipes(level); - for (SpiritInfusionRecipe recipe : recipes) { - if (predicate.test(recipe)) { - return recipe; - } - } - return null; + return getRecipe(level, RecipeTypeRegistry.SPIRIT_INFUSION.get(), predicate); } public static List getRecipes(Level level) { - return level.getRecipeManager().getAllRecipesFor(RecipeTypeRegistry.SPIRIT_INFUSION.get()); + return getRecipes(level, RecipeTypeRegistry.SPIRIT_INFUSION.get()); } public static class Serializer implements RecipeSerializer { diff --git a/src/main/java/com/sammy/malum/common/recipe/SpiritRepairRecipe.java b/src/main/java/com/sammy/malum/common/recipe/SpiritRepairRecipe.java index ef7b32c4d..29876456c 100644 --- a/src/main/java/com/sammy/malum/common/recipe/SpiritRepairRecipe.java +++ b/src/main/java/com/sammy/malum/common/recipe/SpiritRepairRecipe.java @@ -1,63 +1,37 @@ package com.sammy.malum.common.recipe; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.sammy.malum.core.systems.recipe.SpiritWithCount; -import com.sammy.malum.registry.common.recipe.RecipeSerializerRegistry; -import com.sammy.malum.registry.common.recipe.RecipeTypeRegistry; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistries; -import team.lodestar.lodestone.systems.recipe.ILodestoneRecipe; -import team.lodestar.lodestone.systems.recipe.IngredientWithCount; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -public class SpiritRepairRecipe extends ILodestoneRecipe { +import com.google.gson.*; +import com.sammy.malum.core.systems.recipe.*; +import com.sammy.malum.registry.common.recipe.*; +import net.minecraft.network.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import net.minecraftforge.registries.*; +import team.lodestar.lodestone.systems.recipe.*; + +import javax.annotation.*; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +public class SpiritRepairRecipe extends AbstractMalumRecipe { public static final String NAME = "spirit_repair"; - private final ResourceLocation id; - public final float durabilityPercentage; public final List inputs; public final IngredientWithCount repairMaterial; public final List spirits; public SpiritRepairRecipe(ResourceLocation id, float durabilityPercentage, List inputs, IngredientWithCount repairMaterial, List spirits) { - this.id = id; + super(id, RecipeSerializerRegistry.REPAIR_RECIPE_SERIALIZER.get(), RecipeTypeRegistry.SPIRIT_REPAIR.get()); this.durabilityPercentage = durabilityPercentage; this.repairMaterial = repairMaterial; this.inputs = inputs; this.spirits = spirits; } - @Override - public RecipeSerializer getSerializer() { - return RecipeSerializerRegistry.REPAIR_RECIPE_SERIALIZER.get(); - } - - @Override - public RecipeType getType() { - return RecipeTypeRegistry.SPIRIT_REPAIR.get(); - } - - @Override - public ResourceLocation getId() { - return id; - } - public List getSortedSpirits(List stacks) { List sortedStacks = new ArrayList<>(); for (SpiritWithCount item : spirits) { @@ -108,17 +82,11 @@ public static SpiritRepairRecipe getRecipe(Level level, ItemStack stack, ItemSta } public static SpiritRepairRecipe getRecipe(Level level, Predicate predicate) { - List recipes = getRecipes(level); - for (SpiritRepairRecipe recipe : recipes) { - if (predicate.test(recipe)) { - return recipe; - } - } - return null; + return getRecipe(level, RecipeTypeRegistry.SPIRIT_REPAIR.get(), predicate); } public static List getRecipes(Level level) { - return level.getRecipeManager().getAllRecipesFor(RecipeTypeRegistry.SPIRIT_REPAIR.get()); + return getRecipes(level, RecipeTypeRegistry.SPIRIT_REPAIR.get()); } public static ItemStack getRepairRecipeOutput(ItemStack input) { diff --git a/src/main/java/com/sammy/malum/common/recipe/SpiritTransmutationRecipe.java b/src/main/java/com/sammy/malum/common/recipe/SpiritTransmutationRecipe.java index ea23fd03a..177e630e5 100644 --- a/src/main/java/com/sammy/malum/common/recipe/SpiritTransmutationRecipe.java +++ b/src/main/java/com/sammy/malum/common/recipe/SpiritTransmutationRecipe.java @@ -1,28 +1,21 @@ package com.sammy.malum.common.recipe; -import com.google.gson.JsonObject; -import com.sammy.malum.registry.common.recipe.RecipeSerializerRegistry; -import com.sammy.malum.registry.common.recipe.RecipeTypeRegistry; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.crafting.CraftingHelper; -import team.lodestar.lodestone.systems.recipe.ILodestoneRecipe; - -import javax.annotation.Nullable; -import java.util.List; -import java.util.function.Predicate; - -public class SpiritTransmutationRecipe extends ILodestoneRecipe { +import com.google.gson.*; +import com.sammy.malum.registry.common.recipe.*; +import net.minecraft.network.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import net.minecraftforge.common.crafting.*; + +import javax.annotation.*; +import java.util.*; +import java.util.function.*; + +public class SpiritTransmutationRecipe extends AbstractMalumRecipe { public static final String NAME = "spirit_transmutation"; - private final ResourceLocation id; - public final Ingredient ingredient; public final ItemStack output; @@ -30,28 +23,12 @@ public class SpiritTransmutationRecipe extends ILodestoneRecipe { public final String group; public SpiritTransmutationRecipe(ResourceLocation id, Ingredient ingredient, ItemStack output, @Nullable String group) { - this.id = id; + super(id, RecipeSerializerRegistry.SPIRIT_TRANSMUTATION_RECIPE_SERIALIZER.get(), RecipeTypeRegistry.SPIRIT_TRANSMUTATION.get()); this.ingredient = ingredient; this.output = output; this.group = group; } - @Override - public RecipeSerializer getSerializer() { - return RecipeSerializerRegistry.SPIRIT_TRANSMUTATION_RECIPE_SERIALIZER.get(); - } - - @Override - public RecipeType getType() { - return RecipeTypeRegistry.SPIRIT_TRANSMUTATION.get(); - } - - @Override - public ResourceLocation getId() { - return id; - } - - public boolean doesInputMatch(ItemStack input) { return ingredient.test(input); } @@ -69,17 +46,11 @@ public static SpiritTransmutationRecipe getRecipe(Level level, ItemStack item) { } public static SpiritTransmutationRecipe getRecipe(Level level, Predicate predicate) { - List recipes = getRecipes(level); - for (SpiritTransmutationRecipe recipe : recipes) { - if (predicate.test(recipe)) { - return recipe; - } - } - return null; + return getRecipe(level, RecipeTypeRegistry.SPIRIT_TRANSMUTATION.get(), predicate); } public static List getRecipes(Level level) { - return level.getRecipeManager().getAllRecipesFor(RecipeTypeRegistry.SPIRIT_TRANSMUTATION.get()); + return getRecipes(level, RecipeTypeRegistry.SPIRIT_TRANSMUTATION.get()); } public static class Serializer implements RecipeSerializer { diff --git a/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java b/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java index 6d1962947..6fd371501 100644 --- a/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java +++ b/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java @@ -51,7 +51,7 @@ public WeepingWellStructure(Structure.StructureSettings config, Holder findGenerationPoint(GenerationContext pContext) { BlockPos blockPos = new BlockPos(pContext.chunkPos().getMinBlockX(), 0, pContext.chunkPos().getMinBlockZ()); BlockPos validPos = new BlockPos(blockPos.getX(), getValidY(pContext.chunkGenerator().getBaseColumn(blockPos.getX(), blockPos.getZ(), pContext.heightAccessor(), pContext.randomState())), blockPos.getZ()); - if (validPos.getY() != min - 1 && isSufficientlyFlat(pContext, validPos, 3)) { + if (validPos.getY() != min - 1 && isSufficientlyFlat(pContext, validPos, 4)) { return JigsawPlacement.addPieces(pContext, this.startPool, this.startJigsawName, this.size, validPos.below(-offsetInGround), false, Optional.empty(), this.maxDistanceFromCenter); } return Optional.empty(); diff --git a/src/main/java/com/sammy/malum/compability/farmersdelight/FarmersDelightCompat.java b/src/main/java/com/sammy/malum/compability/farmersdelight/FarmersDelightCompat.java index 0077cf56d..8f1ed873a 100644 --- a/src/main/java/com/sammy/malum/compability/farmersdelight/FarmersDelightCompat.java +++ b/src/main/java/com/sammy/malum/compability/farmersdelight/FarmersDelightCompat.java @@ -1,6 +1,6 @@ package com.sammy.malum.compability.farmersdelight; -import com.sammy.malum.core.systems.item.*; +import com.sammy.malum.common.item.curiosities.*; import com.sammy.malum.registry.common.item.ItemRegistry; import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.registration.IRecipeRegistration; @@ -9,7 +9,6 @@ import net.minecraftforge.fml.ModList; import vectorwing.farmersdelight.common.utility.TextUtils; -import static com.sammy.malum.registry.common.item.ItemRegistry.GEAR_PROPERTIES; import static com.sammy.malum.registry.common.item.ItemTiers.ItemTierEnum.SOUL_STAINED_STEEL; public class FarmersDelightCompat { diff --git a/src/main/java/com/sammy/malum/core/events/RuntimeEvents.java b/src/main/java/com/sammy/malum/core/events/RuntimeEvents.java index 8f1d2ad4d..1dead600f 100644 --- a/src/main/java/com/sammy/malum/core/events/RuntimeEvents.java +++ b/src/main/java/com/sammy/malum/core/events/RuntimeEvents.java @@ -7,13 +7,12 @@ import com.sammy.malum.common.enchantment.*; import com.sammy.malum.common.entity.nitrate.*; import com.sammy.malum.common.item.cosmetic.curios.*; -import com.sammy.malum.common.item.curiosities.curios.alchemical.*; -import com.sammy.malum.common.item.curiosities.curios.misc.*; -import com.sammy.malum.common.item.curiosities.curios.prospector.*; -import com.sammy.malum.common.item.curiosities.curios.rotten.*; -import com.sammy.malum.common.item.curiosities.curios.weeping.*; -import com.sammy.malum.common.item.curiosities.runes.*; -import com.sammy.malum.common.item.curiosities.runes.corrupted.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.corrupted.*; +import com.sammy.malum.common.item.curiosities.curios.sets.misc.*; +import com.sammy.malum.common.item.curiosities.curios.sets.prospector.*; +import com.sammy.malum.common.item.curiosities.curios.sets.rotten.*; +import com.sammy.malum.common.item.curiosities.curios.sets.weeping.*; import com.sammy.malum.core.handlers.*; import com.sammy.malum.core.listeners.*; import net.minecraft.core.*; @@ -156,7 +155,6 @@ public static void isPotionApplicable(MobEffectEvent.Applicable event) { @SubscribeEvent public static void onPotionApplied(MobEffectEvent.Added event) { - CurioAlchemicalRing.onPotionApplied(event); RuneTwinnedDurationItem.onPotionApplied(event); RuneAlimentCleansingItem.onPotionApplied(event); } diff --git a/src/main/java/com/sammy/malum/core/handlers/EsotericReapingHandler.java b/src/main/java/com/sammy/malum/core/handlers/EsotericReapingHandler.java index 646d88bd1..b5fb36b49 100644 --- a/src/main/java/com/sammy/malum/core/handlers/EsotericReapingHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/EsotericReapingHandler.java @@ -5,7 +5,6 @@ import com.sammy.malum.config.CommonConfig; import com.sammy.malum.core.helper.SpiritHelper; import com.sammy.malum.core.listeners.ReapingDataReloadListener; -import com.sammy.malum.core.systems.reaping.MalumReapingDropsData; import com.sammy.malum.registry.common.item.ItemRegistry; import net.minecraft.util.Mth; import net.minecraft.world.entity.LivingEntity; @@ -45,11 +44,11 @@ public static void tryCreateReapingDrops(LivingDeathEvent event) { }); } } - List data = ReapingDataReloadListener.REAPING_DATA.get(ForgeRegistries.ENTITY_TYPES.getKey(target.getType())); + List data = ReapingDataReloadListener.REAPING_DATA.get(ForgeRegistries.ENTITY_TYPES.getKey(target.getType())); if (data != null) { SoulDataHandler soulData = MalumLivingEntityDataCapability.getCapability(target).soulData; if (soulData.exposedSoulDuration > 0) { - for (MalumReapingDropsData dropData : data) { + for (ReapingDataReloadListener.MalumReapingDropsData dropData : data) { Level level = target.level(); var random = level.random; if (random.nextFloat() < dropData.chance) { diff --git a/src/main/java/com/sammy/malum/core/handlers/ReserveStaffChargeHandler.java b/src/main/java/com/sammy/malum/core/handlers/ReserveStaffChargeHandler.java index 5a40cb033..96c842caa 100644 --- a/src/main/java/com/sammy/malum/core/handlers/ReserveStaffChargeHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/ReserveStaffChargeHandler.java @@ -1,35 +1,11 @@ package com.sammy.malum.core.handlers; -import com.mojang.blaze3d.systems.*; -import com.mojang.blaze3d.vertex.*; -import com.sammy.malum.*; import com.sammy.malum.common.capability.*; -import com.sammy.malum.config.*; -import com.sammy.malum.core.systems.item.*; import com.sammy.malum.registry.common.*; -import net.minecraft.client.*; -import net.minecraft.client.gui.*; -import net.minecraft.client.player.*; import net.minecraft.nbt.*; -import net.minecraft.resources.*; -import net.minecraft.sounds.*; -import net.minecraft.util.*; -import net.minecraft.world.damagesource.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.entity.player.*; -import net.minecraft.world.item.*; -import net.minecraftforge.client.gui.overlay.*; import net.minecraftforge.event.*; -import net.minecraftforge.event.entity.living.*; -import org.joml.*; -import team.lodestar.lodestone.helpers.*; -import team.lodestar.lodestone.registry.client.*; -import team.lodestar.lodestone.registry.common.tag.*; -import team.lodestar.lodestone.systems.rendering.*; -import team.lodestar.lodestone.systems.rendering.shader.*; - -import java.lang.Math; - public class ReserveStaffChargeHandler { public int chargeCount; diff --git a/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java b/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java index a21a10415..7184de4c0 100644 --- a/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java @@ -5,10 +5,9 @@ import com.sammy.malum.MalumMod; import com.sammy.malum.common.capability.MalumPlayerDataCapability; import com.sammy.malum.config.CommonConfig; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import com.sammy.malum.registry.common.AttributeRegistry; import com.sammy.malum.registry.common.SoundRegistry; -import com.sammy.malum.registry.common.SpiritTypeRegistry; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.player.LocalPlayer; @@ -17,7 +16,6 @@ import net.minecraft.sounds.*; import net.minecraft.util.Mth; import net.minecraft.world.damagesource.DamageSource; -import net.minecraft.world.damagesource.DamageTypes; import net.minecraft.world.entity.ai.attributes.AttributeInstance; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.player.Player; @@ -26,15 +24,9 @@ import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import org.joml.Vector4f; -import team.lodestar.lodestone.handlers.screenparticle.ScreenParticleHandler; import team.lodestar.lodestone.helpers.ItemHelper; import team.lodestar.lodestone.registry.client.*; -import team.lodestar.lodestone.registry.common.particle.*; import team.lodestar.lodestone.registry.common.tag.*; -import team.lodestar.lodestone.systems.particle.builder.ScreenParticleBuilder; -import team.lodestar.lodestone.systems.particle.data.GenericParticleData; -import team.lodestar.lodestone.systems.particle.data.color.ColorParticleData; -import team.lodestar.lodestone.systems.particle.data.spin.SpinParticleData; import team.lodestar.lodestone.systems.rendering.VFXBuilders; import team.lodestar.lodestone.systems.rendering.shader.ExtendedShaderInstance; diff --git a/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java b/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java index d5a6a8de9..75deb92b2 100644 --- a/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java @@ -6,7 +6,7 @@ import com.sammy.malum.common.item.curiosities.SpiritPouchItem; import com.sammy.malum.config.CommonConfig; import com.sammy.malum.core.helper.SpiritHelper; -import com.sammy.malum.core.systems.item.IMalumEventResponderItem; +import com.sammy.malum.common.item.IMalumEventResponderItem; import com.sammy.malum.core.systems.spirit.MalumEntitySpiritData; import com.sammy.malum.registry.common.AttributeRegistry; import com.sammy.malum.registry.common.DamageTypeRegistry; diff --git a/src/main/java/com/sammy/malum/core/listeners/ReapingDataReloadListener.java b/src/main/java/com/sammy/malum/core/listeners/ReapingDataReloadListener.java index 0ba76994c..bfe96ed7e 100644 --- a/src/main/java/com/sammy/malum/core/listeners/ReapingDataReloadListener.java +++ b/src/main/java/com/sammy/malum/core/listeners/ReapingDataReloadListener.java @@ -2,7 +2,6 @@ import com.google.gson.*; import com.sammy.malum.MalumMod; -import com.sammy.malum.core.systems.reaping.MalumReapingDropsData; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener; @@ -59,4 +58,19 @@ protected void apply(Map objectIn, ResourceManage REAPING_DATA.put(resourceLocation, dropsList); } } + + public static class MalumReapingDropsData { + + public final Ingredient drop; + public final float chance; + public final int min; + public final int max; + + public MalumReapingDropsData(Ingredient drop, float chance, int min, int max) { + this.drop = drop; + this.chance = chance; + this.min = min; + this.max = max; + } + } } diff --git a/src/main/java/com/sammy/malum/core/listeners/RitualRecipeReloadListener.java b/src/main/java/com/sammy/malum/core/listeners/RitualRecipeReloadListener.java index 5e6b8cee3..468e796d5 100644 --- a/src/main/java/com/sammy/malum/core/listeners/RitualRecipeReloadListener.java +++ b/src/main/java/com/sammy/malum/core/listeners/RitualRecipeReloadListener.java @@ -2,15 +2,12 @@ import com.google.gson.*; import com.sammy.malum.*; -import com.sammy.malum.core.systems.reaping.*; import com.sammy.malum.core.systems.ritual.*; import com.sammy.malum.registry.common.*; import net.minecraft.resources.*; import net.minecraft.server.packs.resources.*; import net.minecraft.util.profiling.*; -import net.minecraft.world.item.crafting.*; import net.minecraftforge.event.*; -import net.minecraftforge.registries.*; import team.lodestar.lodestone.systems.recipe.*; import java.util.*; diff --git a/src/main/java/com/sammy/malum/core/systems/item/ISoulContainerItem.java b/src/main/java/com/sammy/malum/core/systems/item/ISoulContainerItem.java deleted file mode 100644 index 4ccdf20db..000000000 --- a/src/main/java/com/sammy/malum/core/systems/item/ISoulContainerItem.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.sammy.malum.core.systems.item; - -//TODO: fill this up with stuff once we get to soul magic -public interface ISoulContainerItem { - -} diff --git a/src/main/java/com/sammy/malum/core/systems/reaping/MalumReapingDropsData.java b/src/main/java/com/sammy/malum/core/systems/reaping/MalumReapingDropsData.java deleted file mode 100644 index 281ed5daf..000000000 --- a/src/main/java/com/sammy/malum/core/systems/reaping/MalumReapingDropsData.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.sammy.malum.core.systems.reaping; - -import net.minecraft.world.item.crafting.Ingredient; - -public class MalumReapingDropsData { - - public final Ingredient drop; - public final float chance; - public final int min; - public final int max; - - public MalumReapingDropsData(Ingredient drop, float chance, int min, int max) { - this.drop = drop; - this.chance = chance; - this.min = min; - this.max = max; - } -} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/core/systems/rites/MalumRiteType.java b/src/main/java/com/sammy/malum/core/systems/rites/MalumRiteType.java index 9da2436a4..d59afa07a 100644 --- a/src/main/java/com/sammy/malum/core/systems/rites/MalumRiteType.java +++ b/src/main/java/com/sammy/malum/core/systems/rites/MalumRiteType.java @@ -36,7 +36,7 @@ public List makeDetailedDescriptor(boolean corrupted) { if (!riteCategory.equals(MalumRiteEffect.MalumRiteEffectCategory.ONE_TIME_EFFECT)) { tooltip.add(makeDescriptorComponent("malum.gui.rite.coverage", riteEffect.getRiteCoverageDescriptor())); } - tooltip.add(makeDescriptorComponent("malum.gui.effect", "malum.gui.book.entry.page.text." + (corrupted ? "corrupt_" : "") + identifier + ".hover")); + tooltip.add(makeDescriptorComponent("malum.gui.rite_effect", "malum.gui.book.entry.page.text." + (corrupted ? "corrupt_" : "") + identifier + ".hover")); return tooltip; } diff --git a/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualType.java b/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualType.java index 763d5f991..df95843f6 100644 --- a/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualType.java +++ b/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualType.java @@ -71,7 +71,7 @@ public List makeCodexDetailedDescriptor() { List tooltip = new ArrayList<>(); var spiritStyleModifier = spirit.getItemRarity().getStyleModifier(); tooltip.add(Component.translatable(translationIdentifier()).withStyle(spiritStyleModifier)); - tooltip.add(makeDescriptorComponent("malum.gui.effect", "malum.gui.book.entry.page.text." + identifier + ".hover")); + tooltip.add(makeDescriptorComponent("malum.gui.rite_effect", "malum.gui.book.entry.page.text." + identifier + ".hover")); return tooltip; } diff --git a/src/main/java/com/sammy/malum/data/MalumLang.java b/src/main/java/com/sammy/malum/data/MalumLang.java index 734364b54..28e27cee5 100644 --- a/src/main/java/com/sammy/malum/data/MalumLang.java +++ b/src/main/java/com/sammy/malum/data/MalumLang.java @@ -4,7 +4,6 @@ import com.sammy.malum.common.block.curiosities.spirit_crucible.*; import com.sammy.malum.common.block.ether.EtherWallTorchBlock; import com.sammy.malum.common.item.spirit.SpiritJarItem; -import com.sammy.malum.core.systems.item.ISoulContainerItem; import com.sammy.malum.core.systems.rites.*; import com.sammy.malum.core.systems.ritual.*; import com.sammy.malum.core.systems.spirit.MalumSpiritType; @@ -66,7 +65,7 @@ protected void addTranslations() { name = makeProper(DataHelper.toTitleCase(correctBlockItemName(name), "_")); add(b.get().getDescriptionId(), name); }); - DataHelper.getAll(items, i -> i.get() instanceof ISoulContainerItem || i.get() instanceof SpiritJarItem).forEach(i -> { + DataHelper.getAll(items, i -> i.get() instanceof SpiritJarItem).forEach(i -> { String name = i.get().getDescriptionId().replaceFirst("item\\.malum\\.", "").replaceFirst("block\\.malum\\.", ""); String filled = "filled_" + name; add("item.malum." + filled, makeProper(DataHelper.toTitleCase(filled, "_"))); @@ -174,28 +173,43 @@ protected void addTranslations() { add("curios.identifier.brooch", "Brooch"); - add("curios.slot.brooch", "Brooch"); add("curios.modifiers.brooch", "When worn:"); add("curios.identifier.rune", "Rune"); - add("curios.slot.rune", "Rune"); add("curios.modifiers.rune", "When equipped:"); - add("malum.gui.rune.plus", "+"); - - add("malum.gui.rune.effect.idle_restoration", "Passive Healing"); - add("malum.gui.rune.effect.sacrificial_empowerment", "Scythe Damage on Kill"); - add("malum.gui.rune.effect.volatile_distortion", "Vorpal Damage Output"); - add("malum.gui.rune.effect.heretic", "Silences Attackers"); - add("malum.gui.rune.effect.twinned_duration", "Doubled Positive Effect Durations"); - add("malum.gui.rune.effect.aliment_cleansing", "Cleanses Negative Effects; Heals when Cleansed"); - add("malum.gui.rune.effect.reactive_shielding", "Damage Resistance when Struck"); - add("malum.gui.rune.effect.dexterity", "Higher Speed at Low Health"); - add("malum.gui.rune.effect.unnatural_stamina", "Sprinting Always Available"); - add("malum.gui.rune.effect.haste", "Increased mining speed"); - add("malum.gui.rune.effect.igneous_solace", "Damage Resistance while Burning"); - - add("malum.gui.effect", "Effect: "); + add("malum.gui.rune.effect.idle_restoration", "+Provides Passive Healing"); + add("malum.gui.rune.effect.sacrificial_empowerment", "+Grants Scythe Damage on Kill"); + add("malum.gui.rune.effect.volatile_distortion", "+Enables Vorpal Damage Output"); + add("malum.gui.rune.effect.heretic", "+Silences Attackers"); + add("malum.gui.rune.effect.twinned_duration", "+Doubles Positive Effect Durations"); + add("malum.gui.rune.effect.aliment_cleansing", "+Cleanses Negative Effects; Heals when Cleansed"); + add("malum.gui.rune.effect.reactive_shielding", "+Grants Damage Resistance when Struck"); + add("malum.gui.rune.effect.dexterity", "+Provides Higher Speed at Low Health"); + add("malum.gui.rune.effect.unnatural_stamina", "+Sprinting Always Available"); + add("malum.gui.rune.effect.haste", "+Increases mining speed"); + add("malum.gui.rune.effect.igneous_solace", "+Provides Damage Resistance while Burning"); + + add("malum.gui.curio.effect.ravenous_brooch", "-Actively Drains Hunger"); + add("malum.gui.curio.effect.ring_of_curative_talent", "+Spirit Collection Replenishes Health"); + add("malum.gui.curio.effect.ring_of_arcane_prowess", "+Spirit Collection Generates Experience Points"); + add("malum.gui.curio.effect.ring_of_alchemical_mastery", "+Spirit Collection Aids Potion Durations"); + add("malum.gui.curio.effect.ring_of_desperate_voracity", "+Rotten Foods are Tastier\n+Eating Rotten Foods Extends Gluttony"); + add("malum.gui.curio.effect.ring_of_the_hoarder", "+Blown Up Blocks Are Teleported To Your Location"); + add("malum.gui.curio.effect.ring_of_the_demolitionist", "+Improves Explosions"); + add("malum.gui.curio.effect.necklace_of_tidal_affinity", "+Conduit Power Provides Numerous Benefits"); + add("malum.gui.curio.effect.necklace_of_the_narrow_edge", "-Disables Scythe Sweeping"); + add("malum.gui.curio.effect.necklace_of_blissful_harmony", "+Reduces Enemy Aggression"); + add("malum.gui.curio.effect.belt_of_the_starved", "+Spirit Collection Generates Gluttony\n -Gluttony Exchanges Hunger for Magic Proficiency"); + add("malum.gui.curio.effect.belt_of_the_prospector", "+Explosions are Enchanted with Fortune III\n+Protects Valuable Items from Explosions"); + add("malum.gui.curio.effect.belt_of_the_magebane", "+Magic Damage no Longer Impedes Soul Ward Recovery"); + add("malum.gui.curio.effect.ring_of_growing_flesh", "+Spirit Collection Grants Extra Hearts"); + add("malum.gui.curio.effect.ring_of_gruesome_satiation", "+Eating Rotten Foods Generates Gluttony"); + add("malum.gui.curio.effect.necklace_of_the_hidden_blade", "+Enables a Powerful Scythe Counter Attack When Struck"); + add("malum.gui.curio.effect.necklace_of_the_watcher", "+Striking Full Health Targets Triggers Spirit Collection Effects"); + add("malum.gui.curio.effect.belt_of_the_limitless", "+Soul Ward Absorbs Physical Damage Equally to Magic Damage"); + + add("malum.gui.rite_effect", "Effect: "); addSimpleEntryHeader("chronicles_of_the_void", "Chronicles of the Void", "Otherworldly alterations"); addSimpleEntryHeader("research_of_the_rejected", "Research of the Rejected", "A thaumaturge's escalation"); diff --git a/src/main/java/com/sammy/malum/data/item/MalumItemModels.java b/src/main/java/com/sammy/malum/data/item/MalumItemModels.java index 3da0d93f8..56dd84d11 100644 --- a/src/main/java/com/sammy/malum/data/item/MalumItemModels.java +++ b/src/main/java/com/sammy/malum/data/item/MalumItemModels.java @@ -1,31 +1,24 @@ package com.sammy.malum.data.item; -import com.sammy.malum.MalumMod; -import com.sammy.malum.common.item.cosmetic.weaves.AbstractWeaveItem; -import com.sammy.malum.common.item.cosmetic.weaves.PrideweaveItem; -import com.sammy.malum.common.item.curiosities.runes.*; +import com.sammy.malum.*; +import com.sammy.malum.common.item.cosmetic.weaves.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.common.item.curiosities.weapons.*; -import com.sammy.malum.common.item.curiosities.weapons.scythe.MalumScytheItem; +import com.sammy.malum.common.item.curiosities.weapons.scythe.*; import com.sammy.malum.common.item.curiosities.weapons.staff.*; -import com.sammy.malum.common.item.impetus.CrackedImpetusItem; -import com.sammy.malum.common.item.impetus.ImpetusItem; -import com.sammy.malum.common.item.impetus.NodeItem; -import com.sammy.malum.common.item.spirit.SpiritShardItem; -import com.sammy.malum.registry.common.item.ArmorSkinRegistry; -import net.minecraft.data.PackOutput; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.DiggerItem; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.SwordItem; -import net.minecraftforge.common.data.ExistingFileHelper; -import team.lodestar.lodestone.systems.datagen.ItemModelSmithTypes; -import team.lodestar.lodestone.systems.datagen.itemsmith.AbstractItemModelSmith; -import team.lodestar.lodestone.systems.datagen.providers.LodestoneItemModelProvider; -import team.lodestar.lodestone.systems.item.ModCombatItem; - -import java.util.HashSet; -import java.util.Set; -import java.util.function.Supplier; +import com.sammy.malum.common.item.impetus.*; +import com.sammy.malum.common.item.spirit.*; +import com.sammy.malum.registry.common.item.*; +import net.minecraft.data.*; +import net.minecraft.world.item.*; +import net.minecraftforge.common.data.*; +import team.lodestar.lodestone.systems.datagen.*; +import team.lodestar.lodestone.systems.datagen.itemsmith.*; +import team.lodestar.lodestone.systems.datagen.providers.*; +import team.lodestar.lodestone.systems.item.*; + +import java.util.*; +import java.util.function.*; import java.util.stream.*; import static com.sammy.malum.registry.common.item.ItemRegistry.*; diff --git a/src/main/java/com/sammy/malum/data/recipe/MalumRecipes.java b/src/main/java/com/sammy/malum/data/recipe/MalumRecipes.java index 192b99f7f..bd819582c 100644 --- a/src/main/java/com/sammy/malum/data/recipe/MalumRecipes.java +++ b/src/main/java/com/sammy/malum/data/recipe/MalumRecipes.java @@ -23,7 +23,6 @@ public MalumRecipes(PackOutput pOutput) { protected void buildRecipes(Consumer consumer) { vanillaRecipeReplacements.buildRecipes(consumer); MalumVanillaRecipes.buildRecipes(consumer); - MalumVoidFavorRecipes.buildRecipes(consumer); ArtificeSpiritInfusionRecipes.buildRecipes(consumer); CurioSpiritInfusionRecipes.buildRecipes(consumer); @@ -33,7 +32,9 @@ protected void buildRecipes(Consumer consumer) { TotemicSpiritInfusionRecipes.buildRecipes(consumer); MiscSpiritInfusionRecipes.buildRecipes(consumer); - MalumSpiritTransmutationRecipes.buildRecipes(consumer); + MalumRuneworkingRecipes.buildRecipes(consumer); MalumSpiritFocusingRecipes.buildRecipes(consumer); + MalumSpiritTransmutationRecipes.buildRecipes(consumer); + MalumVoidFavorRecipes.buildRecipes(consumer); } } diff --git a/src/main/java/com/sammy/malum/data/recipe/MalumRuneworkingRecipes.java b/src/main/java/com/sammy/malum/data/recipe/MalumRuneworkingRecipes.java new file mode 100644 index 000000000..23b29d6a1 --- /dev/null +++ b/src/main/java/com/sammy/malum/data/recipe/MalumRuneworkingRecipes.java @@ -0,0 +1,97 @@ +package com.sammy.malum.data.recipe; + +import com.sammy.malum.data.recipe.builder.*; +import com.sammy.malum.registry.common.item.*; +import net.minecraft.data.recipes.*; +import net.minecraftforge.common.crafting.conditions.*; + +import java.util.function.*; + +public class MalumRuneworkingRecipes implements IConditionBuilder { + + protected static void buildRecipes(Consumer consumer) { + + new RunicWorkbenchRecipeBuilder(ItemRegistry.TAINTED_SLATE.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_ROCK.get(), 4) + .setSecondaryInput(ItemRegistry.PROCESSED_SOULSTONE.get(), 8) + .build(consumer, "tainted_slate"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.ALTERED_SLATE.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.NULL_SLATE.get(), 8) + .build(consumer, "altered_slate"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_IDLE_RESTORATION.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.SACRED_SPIRIT.get(), 32) + .build(consumer, "rune_of_idle_restoration"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_BOLSTERING.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.SACRED_SPIRIT.get(), 32) + .build(consumer, "rune_of_bolstering"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_CULLING.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.WICKED_SPIRIT.get(), 32) + .build(consumer, "rune_of_culling"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_SACRIFICIAL_EMPOWERMENT.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.WICKED_SPIRIT.get(), 32) + .build(consumer, "rune_of_sacrificial_empowerment"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_REINFORCEMENT.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.ARCANE_SPIRIT.get(), 32) + .build(consumer, "rune_of_reinforcement"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_SPELL_MASTERY.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.ARCANE_SPIRIT.get(), 32) + .build(consumer, "rune_of_spell_mastery"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_VOLATILE_DISTORTION.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.ELDRITCH_SPIRIT.get(), 8) + .build(consumer, "rune_of_volatile_distortion"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_THE_HERETIC.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.ELDRITCH_SPIRIT.get(), 8) + .build(consumer, "rune_of_the_heretic"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_DEXTERITY.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.AERIAL_SPIRIT.get(), 32) + .build(consumer, "rune_of_dexterity"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_UNNATURAL_STAMINA.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.AERIAL_SPIRIT.get(), 32) + .build(consumer, "rune_of_unnatural_stamina"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_ALIMENT_CLEANSING.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.AQUEOUS_SPIRIT.get(), 32) + .build(consumer, "rune_of_aliment_cleansing"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_TWINNED_DURATION.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.AQUEOUS_SPIRIT.get(), 32) + .build(consumer, "rune_of_twinned_duration"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_REACTIVE_SHIELDING.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.EARTHEN_SPIRIT.get(), 32) + .build(consumer, "rune_of_reactive_shielding"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_TOUGHNESS.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.EARTHEN_SPIRIT.get(), 32) + .build(consumer, "rune_of_toughness"); + + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_HASTE.get(), 1) + .setPrimaryInput(ItemRegistry.TAINTED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.INFERNAL_SPIRIT.get(), 32) + .build(consumer, "rune_of_haste"); + new RunicWorkbenchRecipeBuilder(ItemRegistry.RUNE_OF_IGNEOUS_SOLACE.get(), 1) + .setPrimaryInput(ItemRegistry.ALTERED_SLATE.get(), 1) + .setSecondaryInput(ItemRegistry.INFERNAL_SPIRIT.get(), 32) + .build(consumer, "rune_of_igneous_solace"); + + } +} diff --git a/src/main/java/com/sammy/malum/data/recipe/builder/RunicWorkbenchRecipeBuilder.java b/src/main/java/com/sammy/malum/data/recipe/builder/RunicWorkbenchRecipeBuilder.java new file mode 100644 index 000000000..c3604eeb7 --- /dev/null +++ b/src/main/java/com/sammy/malum/data/recipe/builder/RunicWorkbenchRecipeBuilder.java @@ -0,0 +1,116 @@ +package com.sammy.malum.data.recipe.builder; + +import com.google.gson.*; +import com.sammy.malum.*; +import com.sammy.malum.registry.common.recipe.*; +import net.minecraft.core.registries.*; +import net.minecraft.data.recipes.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.*; +import net.minecraftforge.registries.*; +import team.lodestar.lodestone.systems.recipe.*; + +import javax.annotation.*; +import java.util.function.*; + +public class RunicWorkbenchRecipeBuilder { + private IngredientWithCount primaryInput; + private IngredientWithCount secondaryInput; + + private final ItemStack output; + + public RunicWorkbenchRecipeBuilder(ItemStack output) { + this.output = output; + } + + public RunicWorkbenchRecipeBuilder(ItemLike output, int outputCount) { + this.output = new ItemStack(output.asItem(), outputCount); + } + + public RunicWorkbenchRecipeBuilder setPrimaryInput(IngredientWithCount primaryInput) { + this.primaryInput = primaryInput; + return this; + } + + public RunicWorkbenchRecipeBuilder setPrimaryInput(ItemLike primaryInput, int primaryInputCount) { + return setPrimaryInput(Ingredient.of(primaryInput), primaryInputCount); + } + + public RunicWorkbenchRecipeBuilder setPrimaryInput(Ingredient primaryInput, int primaryInputCount) { + return setPrimaryInput(new IngredientWithCount(primaryInput, primaryInputCount)); + } + + public RunicWorkbenchRecipeBuilder setSecondaryInput(IngredientWithCount secondaryInput) { + this.secondaryInput = secondaryInput; + return this; + } + + public RunicWorkbenchRecipeBuilder setSecondaryInput(ItemLike secondaryInput, int secondaryInputCount) { + return setSecondaryInput(Ingredient.of(secondaryInput), secondaryInputCount); + } + + public RunicWorkbenchRecipeBuilder setSecondaryInput(Ingredient secondaryInput, int secondaryInputCount) { + return setSecondaryInput(new IngredientWithCount(secondaryInput, secondaryInputCount)); + } + + public void build(Consumer consumerIn, String recipeName) { + build(consumerIn, MalumMod.malumPath("runeworking/" + recipeName)); + } + + public void build(Consumer consumerIn) { + build(consumerIn, ForgeRegistries.ITEMS.getKey(output.getItem()).getPath()); + } + + public void build(Consumer consumerIn, ResourceLocation id) { + consumerIn.accept(new RunicWorkbenchRecipeBuilder.Result(id)); + } + + public class Result implements FinishedRecipe { + private final ResourceLocation id; + + public Result(ResourceLocation id) { + this.id = id; + } + + @Override + public void serializeRecipeData(JsonObject json) { + JsonObject primaryInputObject = primaryInput.serialize(); + JsonObject secondaryInputObject = secondaryInput.serialize(); + JsonObject outputObject = new JsonObject(); + outputObject.addProperty("item", BuiltInRegistries.ITEM.getKey(output.getItem()).toString()); + if (output.getCount() != 1) { + outputObject.getAsJsonObject().addProperty("count", output.getCount()); + } + if (output.hasTag()) { + outputObject.getAsJsonObject().addProperty("nbt", output.getTag().toString()); + } + json.add("primaryInput", primaryInputObject); + json.add("secondaryInput", secondaryInputObject); + json.add("output", outputObject); + } + + @Override + public ResourceLocation getId() { + return id; + } + + @Override + public RecipeSerializer getType() { + return RecipeSerializerRegistry.RUNEWORKING_RECIPE_SERIALIZER.get(); + } + + @Nullable + @Override + public JsonObject serializeAdvancement() { + return null; + } + + @Nullable + @Override + public ResourceLocation getAdvancementId() { + return null; + } + } +} diff --git a/src/main/java/com/sammy/malum/data/recipe/builder/SpiritRepairRecipeBuilder.java b/src/main/java/com/sammy/malum/data/recipe/builder/SpiritRepairRecipeBuilder.java index 2ddd2b5f0..e2ba92d74 100644 --- a/src/main/java/com/sammy/malum/data/recipe/builder/SpiritRepairRecipeBuilder.java +++ b/src/main/java/com/sammy/malum/data/recipe/builder/SpiritRepairRecipeBuilder.java @@ -37,7 +37,6 @@ public SpiritRepairRecipeBuilder(String itemIdRegex, String modIdRegex, float du public SpiritRepairRecipeBuilder(String itemIdRegex, float durabilityPercentage, Ingredient repairMaterial, int repairMaterialCount) { this(itemIdRegex, "", durabilityPercentage, new IngredientWithCount(repairMaterial, repairMaterialCount)); - } public SpiritRepairRecipeBuilder(float durabilityPercentage, Ingredient repairMaterial, int repairMaterialCount) { diff --git a/src/main/java/com/sammy/malum/data/recipe/infusion/CurioSpiritInfusionRecipes.java b/src/main/java/com/sammy/malum/data/recipe/infusion/CurioSpiritInfusionRecipes.java index 43e9b895a..387e9efdd 100644 --- a/src/main/java/com/sammy/malum/data/recipe/infusion/CurioSpiritInfusionRecipes.java +++ b/src/main/java/com/sammy/malum/data/recipe/infusion/CurioSpiritInfusionRecipes.java @@ -21,6 +21,11 @@ public static void buildRecipes(Consumer consumer) { .addSpirit(AQUEOUS_SPIRIT, 32) .build(consumer); + new SpiritInfusionRecipeBuilder(ItemRegistry.SACRIFICIAL_BROOCH.get(), 1, ItemRegistry.RAVENOUS_BROOCH.get(), 1) + .addExtraItem(ItemRegistry.ROTTING_ESSENCE.get(), 8) + .addExtraItem(ItemRegistry.GRIM_TALC.get(), 4) + .addSpirit(WICKED_SPIRIT, 32) + .build(consumer); new SpiritInfusionRecipeBuilder(ItemRegistry.ORNATE_RING.get(), 1, ItemRegistry.RING_OF_ESOTERIC_SPOILS.get(), 1) .addExtraItem(ItemRegistry.PROCESSED_SOULSTONE.get(), 8) @@ -96,23 +101,23 @@ public static void buildRecipes(Consumer consumer) { .build(consumer); new SpiritInfusionRecipeBuilder(ItemRegistry.ORNATE_RING.get(), 1, ItemRegistry.RING_OF_DESPERATE_VORACITY.get(), 1) - .addExtraItem(Items.BONE, 2) - .addExtraItem(ItemRegistry.GRIM_TALC.get(), 2) - .addExtraItem(Items.ROTTEN_FLESH, 8) - .addExtraItem(ItemRegistry.HEX_ASH.get(), 2) - .addSpirit(WICKED_SPIRIT, 16) - .addSpirit(SACRED_SPIRIT, 8) - .addSpirit(ARCANE_SPIRIT, 8) + .addExtraItem(Items.BONE, 4) + .addExtraItem(ItemRegistry.GRIM_TALC.get(), 4) + .addExtraItem(Items.ROTTEN_FLESH, 16) + .addExtraItem(ItemRegistry.HEX_ASH.get(), 4) + .addSpirit(WICKED_SPIRIT, 32) + .addSpirit(SACRED_SPIRIT, 16) + .addSpirit(ARCANE_SPIRIT, 16) .build(consumer); new SpiritInfusionRecipeBuilder(ItemRegistry.GILDED_BELT.get(), 1, ItemRegistry.BELT_OF_THE_STARVED.get(), 1) - .addExtraItem(Items.BONE, 2) - .addExtraItem(ItemRegistry.GRIM_TALC.get(), 4) - .addExtraItem(ItemRegistry.ROTTING_ESSENCE.get(), 2) + .addExtraItem(Items.BONE, 4) + .addExtraItem(ItemRegistry.GRIM_TALC.get(), 8) + .addExtraItem(ItemRegistry.ROTTING_ESSENCE.get(), 4) .addExtraItem(ItemRegistry.PROCESSED_SOULSTONE.get(), 4) .addSpirit(WICKED_SPIRIT, 32) .addSpirit(AQUEOUS_SPIRIT, 16) - .addSpirit(ARCANE_SPIRIT, 8) + .addSpirit(ARCANE_SPIRIT, 16) .build(consumer); new SpiritInfusionRecipeBuilder(ItemRegistry.GILDED_RING.get(), 1, ItemRegistry.RING_OF_THE_HOARDER.get(), 1) @@ -120,9 +125,9 @@ public static void buildRecipes(Consumer consumer) { .addExtraItem(ItemRegistry.WARP_FLUX.get(), 4) .addExtraItem(Ingredient.of(Tags.Items.INGOTS_IRON), 4) .addExtraItem(Items.GUNPOWDER, 8) - .addSpirit(EARTHEN_SPIRIT, 16) - .addSpirit(SACRED_SPIRIT, 8) - .addSpirit(ARCANE_SPIRIT, 8) + .addSpirit(EARTHEN_SPIRIT, 32) + .addSpirit(SACRED_SPIRIT, 16) + .addSpirit(ARCANE_SPIRIT, 16) .build(consumer); new SpiritInfusionRecipeBuilder(ItemRegistry.GILDED_BELT.get(), 1, ItemRegistry.BELT_OF_THE_PROSPECTOR.get(), 1) diff --git a/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java b/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java index 42391f4ba..4a67dba49 100644 --- a/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java +++ b/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java @@ -1,8 +1,8 @@ package com.sammy.malum.mixin; -import com.sammy.malum.common.item.curiosities.curios.prospector.CurioDemolitionistRing; -import com.sammy.malum.common.item.curiosities.curios.prospector.CurioHoarderRing; -import com.sammy.malum.common.item.curiosities.curios.prospector.CurioProspectorBelt; +import com.sammy.malum.common.item.curiosities.curios.sets.prospector.CurioDemolitionistRing; +import com.sammy.malum.common.item.curiosities.curios.sets.prospector.CurioHoarderRing; +import com.sammy.malum.common.item.curiosities.curios.sets.prospector.CurioProspectorBelt; import net.minecraft.core.BlockPos; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; diff --git a/src/main/java/com/sammy/malum/mixin/LocalPlayerMixin.java b/src/main/java/com/sammy/malum/mixin/LocalPlayerMixin.java index 197d15c1c..0c0ca8085 100644 --- a/src/main/java/com/sammy/malum/mixin/LocalPlayerMixin.java +++ b/src/main/java/com/sammy/malum/mixin/LocalPlayerMixin.java @@ -1,6 +1,6 @@ package com.sammy.malum.mixin; -import com.sammy.malum.common.item.curiosities.runes.corrupted.*; +import com.sammy.malum.common.item.curiosities.curios.runes.corrupted.*; import net.minecraft.client.player.*; import org.spongepowered.asm.mixin.*; import org.spongepowered.asm.mixin.injection.*; diff --git a/src/main/java/com/sammy/malum/registry/client/ModelRegistry.java b/src/main/java/com/sammy/malum/registry/client/ModelRegistry.java index f4b39ac5e..93227fcab 100644 --- a/src/main/java/com/sammy/malum/registry/client/ModelRegistry.java +++ b/src/main/java/com/sammy/malum/registry/client/ModelRegistry.java @@ -26,7 +26,7 @@ public class ModelRegistry { public static SoulStainedSteelArmorModel SOUL_STAINED_ARMOR; public static AncientSoulStainedSteelArmorModel ANCIENT_SOUL_STAINED_STEEL_ARMOR; - public static MalignantLeadArmorModel MALIGNANT_LEAD_ARMOR; + public static MalignantStrongholdArmorModel MALIGNANT_LEAD_ARMOR; public static GenericSlimArmorModel GENERIC_SLIM_ARMOR; public static GenericArmorModel GENERIC_ARMOR; @@ -49,7 +49,7 @@ public class ModelRegistry { public static void registerLayerDefinitions(EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(SoulHunterArmorModel.LAYER, SoulHunterArmorModel::createBodyLayer); event.registerLayerDefinition(SoulStainedSteelArmorModel.LAYER, SoulStainedSteelArmorModel::createBodyLayer); - event.registerLayerDefinition(MalignantLeadArmorModel.LAYER, MalignantLeadArmorModel::createBodyLayer); + event.registerLayerDefinition(MalignantStrongholdArmorModel.LAYER, MalignantStrongholdArmorModel::createBodyLayer); event.registerLayerDefinition(GenericSlimArmorModel.LAYER, GenericSlimArmorModel::createBodyLayer); event.registerLayerDefinition(GenericArmorModel.LAYER, GenericArmorModel::createBodyLayer); @@ -75,7 +75,7 @@ public static void registerLayerDefinitions(EntityRenderersEvent.RegisterLayerDe public static void registerLayers(EntityRenderersEvent.AddLayers event) { SOUL_HUNTER_ARMOR = new SoulHunterArmorModel(event.getEntityModels().bakeLayer(SoulHunterArmorModel.LAYER)); SOUL_STAINED_ARMOR = new SoulStainedSteelArmorModel(event.getEntityModels().bakeLayer(SoulStainedSteelArmorModel.LAYER)); - MALIGNANT_LEAD_ARMOR = new MalignantLeadArmorModel(event.getEntityModels().bakeLayer(MalignantLeadArmorModel.LAYER)); + MALIGNANT_LEAD_ARMOR = new MalignantStrongholdArmorModel(event.getEntityModels().bakeLayer(MalignantStrongholdArmorModel.LAYER)); GENERIC_SLIM_ARMOR = new GenericSlimArmorModel(event.getEntityModels().bakeLayer(GenericSlimArmorModel.LAYER)); GENERIC_ARMOR = new GenericArmorModel(event.getEntityModels().bakeLayer(GenericArmorModel.LAYER)); diff --git a/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java b/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java index f6c55bd4e..96b1abc69 100644 --- a/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/item/ItemRegistry.java @@ -8,7 +8,6 @@ import com.sammy.malum.common.block.curiosities.spirit_crucible.*; import com.sammy.malum.common.block.curiosities.spirit_crucible.catalyzer.*; import com.sammy.malum.common.block.nature.*; -import com.sammy.malum.common.item.*; import com.sammy.malum.common.item.augment.*; import com.sammy.malum.common.item.augment.core.*; import com.sammy.malum.common.item.codex.*; @@ -18,17 +17,17 @@ import com.sammy.malum.common.item.curiosities.*; import com.sammy.malum.common.item.curiosities.armor.*; import com.sammy.malum.common.item.curiosities.curios.*; -import com.sammy.malum.common.item.curiosities.curios.alchemical.*; -import com.sammy.malum.common.item.curiosities.curios.brooch.*; -import com.sammy.malum.common.item.curiosities.curios.misc.*; -import com.sammy.malum.common.item.curiosities.curios.prospector.*; -import com.sammy.malum.common.item.curiosities.curios.rotten.*; -import com.sammy.malum.common.item.curiosities.curios.soulward.*; -import com.sammy.malum.common.item.curiosities.curios.spirit.*; -import com.sammy.malum.common.item.curiosities.curios.weeping.*; +import com.sammy.malum.common.item.curiosities.curios.brooches.*; +import com.sammy.malum.common.item.curiosities.curios.runes.*; +import com.sammy.malum.common.item.curiosities.curios.runes.corrupted.*; +import com.sammy.malum.common.item.curiosities.curios.sets.alchemical.*; +import com.sammy.malum.common.item.curiosities.curios.sets.misc.*; +import com.sammy.malum.common.item.curiosities.curios.sets.prospector.*; +import com.sammy.malum.common.item.curiosities.curios.sets.rotten.*; +import com.sammy.malum.common.item.curiosities.curios.sets.soulward.*; +import com.sammy.malum.common.item.curiosities.curios.sets.spirit.*; +import com.sammy.malum.common.item.curiosities.curios.sets.weeping.*; import com.sammy.malum.common.item.curiosities.nitrate.*; -import com.sammy.malum.common.item.curiosities.runes.*; -import com.sammy.malum.common.item.curiosities.runes.corrupted.*; import com.sammy.malum.common.item.curiosities.tools.*; import com.sammy.malum.common.item.curiosities.weapons.*; import com.sammy.malum.common.item.curiosities.weapons.scythe.*; @@ -36,6 +35,7 @@ import com.sammy.malum.common.item.ether.*; import com.sammy.malum.common.item.food.*; import com.sammy.malum.common.item.impetus.*; +import com.sammy.malum.common.item.misc.*; import com.sammy.malum.common.item.spirit.*; import com.sammy.malum.compability.farmersdelight.*; import com.sammy.malum.core.systems.ritual.*; @@ -65,8 +65,8 @@ import top.theillusivec4.curios.api.client.*; import java.awt.*; -import java.util.*; import java.util.List; +import java.util.*; import java.util.function.*; import java.util.stream.*; @@ -601,6 +601,7 @@ public static RegistryObject register(String name, Item.Prop public static final RegistryObject RUNIC_BROOCH = register("runic_brooch", GEAR_PROPERTIES(), CurioRunicBrooch::new); public static final RegistryObject SACRIFICIAL_BROOCH = register("sacrificial_brooch", GEAR_PROPERTIES(), CurioSacrificialBrooch::new); public static final RegistryObject GLASS_BROOCH = register("glass_brooch", GEAR_PROPERTIES(), CurioGlassBrooch::new); + public static final RegistryObject RAVENOUS_BROOCH = register("ravenous_brooch", GEAR_PROPERTIES(), CurioRavenousBrooch::new); public static final RegistryObject RING_OF_ESOTERIC_SPOILS = register("ring_of_esoteric_spoils", GEAR_PROPERTIES(), CurioArcaneSpoilRing::new); public static final RegistryObject RING_OF_CURATIVE_TALENT = register("ring_of_curative_talent", GEAR_PROPERTIES(), CurioCurativeRing::new); diff --git a/src/main/java/com/sammy/malum/registry/common/recipe/RecipeSerializerRegistry.java b/src/main/java/com/sammy/malum/registry/common/recipe/RecipeSerializerRegistry.java index 2e4a4e8a0..1eed9bc31 100644 --- a/src/main/java/com/sammy/malum/registry/common/recipe/RecipeSerializerRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/recipe/RecipeSerializerRegistry.java @@ -18,9 +18,10 @@ public class RecipeSerializerRegistry { public static final RegistryObject> METAL_NODE_SMELTING_SERIALIZER = RECIPE_SERIALIZERS.register(MetalNodeSmeltingRecipe.NAME, () -> new NodeCookingSerializer<>(MetalNodeSmeltingRecipe::new, 200)); public static final RegistryObject> INFUSION_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register(SpiritInfusionRecipe.NAME, SpiritInfusionRecipe.Serializer::new); - public static final RegistryObject> VOID_FAVOR_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register(FavorOfTheVoidRecipe.NAME, FavorOfTheVoidRecipe.Serializer::new); + public static final RegistryObject> RUNEWORKING_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register(RunicWorkbenchRecipe.NAME, RunicWorkbenchRecipe.Serializer::new); public static final RegistryObject> FOCUSING_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register(SpiritFocusingRecipe.NAME, SpiritFocusingRecipe.Serializer::new); public static final RegistryObject> REPAIR_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register(SpiritRepairRecipe.NAME, SpiritRepairRecipe.Serializer::new); public static final RegistryObject> SPIRIT_TRANSMUTATION_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register(SpiritTransmutationRecipe.NAME, SpiritTransmutationRecipe.Serializer::new); + public static final RegistryObject> VOID_FAVOR_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register(FavorOfTheVoidRecipe.NAME, FavorOfTheVoidRecipe.Serializer::new); } diff --git a/src/main/java/com/sammy/malum/registry/common/recipe/RecipeTypeRegistry.java b/src/main/java/com/sammy/malum/registry/common/recipe/RecipeTypeRegistry.java index 442f4d67c..42a4c7e50 100644 --- a/src/main/java/com/sammy/malum/registry/common/recipe/RecipeTypeRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/recipe/RecipeTypeRegistry.java @@ -14,6 +14,7 @@ public class RecipeTypeRegistry { public static final RegistryObject> VOID_FAVOR = RECIPE_TYPES.register(FavorOfTheVoidRecipe.NAME, () -> registerRecipeType(FavorOfTheVoidRecipe.NAME)); public static final RegistryObject> SPIRIT_INFUSION = RECIPE_TYPES.register(SpiritInfusionRecipe.NAME, () -> registerRecipeType(SpiritInfusionRecipe.NAME)); + public static final RegistryObject> RUNEWORKING = RECIPE_TYPES.register(RunicWorkbenchRecipe.NAME, () -> registerRecipeType(RunicWorkbenchRecipe.NAME)); public static final RegistryObject> SPIRIT_FOCUSING = RECIPE_TYPES.register(SpiritFocusingRecipe.NAME, () -> registerRecipeType(SpiritFocusingRecipe.NAME)); public static final RegistryObject> SPIRIT_TRANSMUTATION = RECIPE_TYPES.register(SpiritTransmutationRecipe.NAME, () -> registerRecipeType(SpiritTransmutationRecipe.NAME)); public static final RegistryObject> SPIRIT_REPAIR = RECIPE_TYPES.register(SpiritRepairRecipe.NAME, () -> registerRecipeType(SpiritRepairRecipe.NAME)); diff --git a/src/main/java/com/sammy/malum/visual_effects/ScreenParticleEffects.java b/src/main/java/com/sammy/malum/visual_effects/ScreenParticleEffects.java index dd2c536b8..4cc460168 100644 --- a/src/main/java/com/sammy/malum/visual_effects/ScreenParticleEffects.java +++ b/src/main/java/com/sammy/malum/visual_effects/ScreenParticleEffects.java @@ -1,8 +1,8 @@ package com.sammy.malum.visual_effects; import com.sammy.malum.common.capability.*; +import com.sammy.malum.common.item.*; import com.sammy.malum.core.handlers.*; -import com.sammy.malum.core.systems.item.*; import com.sammy.malum.core.systems.spirit.*; import net.minecraft.client.*; import net.minecraft.client.player.*; diff --git a/src/main/resources/assets/malum/models/block/runic_workbench.json b/src/main/resources/assets/malum/models/block/runic_workbench.json index b21a406f9..e63b03d66 100644 --- a/src/main/resources/assets/malum/models/block/runic_workbench.json +++ b/src/main/resources/assets/malum/models/block/runic_workbench.json @@ -21,8 +21,8 @@ } }, { - "from": [0, 6, 0], - "to": [16, 12, 16], + "from": [0, 8, 0], + "to": [16, 14, 16], "faces": { "north": {"uv": [0, 8, 8, 11], "texture": "#0"}, "east": {"uv": [0, 8, 8, 11], "texture": "#0"}, @@ -34,14 +34,13 @@ }, { "from": [4, 4, 4], - "to": [12, 6, 12], + "to": [12, 8, 12], "faces": { - "north": {"uv": [0, 13, 4, 14], "texture": "#0"}, - "east": {"uv": [0, 13, 4, 14], "texture": "#0"}, - "south": {"uv": [0, 13, 4, 14], "texture": "#0"}, - "west": {"uv": [0, 13, 4, 14], "texture": "#0"} + "north": {"uv": [0, 13, 4, 15], "texture": "#0"}, + "east": {"uv": [0, 13, 4, 15], "texture": "#0"}, + "south": {"uv": [0, 13, 4, 15], "texture": "#0"}, + "west": {"uv": [0, 13, 4, 15], "texture": "#0"} } } - ], - "display": {} + ] } \ No newline at end of file diff --git a/src/main/resources/assets/malum/textures/block/runic_workbench.png b/src/main/resources/assets/malum/textures/block/runic_workbench.png index 6c3857294a5969216e0bd4ff9180ec453104fa74..029a07dcb4dea6437cdc5d9f918338abb73115f9 100644 GIT binary patch delta 814 zcmV+}1JV5Q2E_)DB!3G@L_t(oN6nYNYg17a$L~YQtEomS8Hz=RigXYy2%$qJ9i7BM z=-}q;KcV2C;NmVQI6Bs;gLIHuIutQmp+mHq*w}>1lg~}Q@x0rY7+)&MUEa;T=ic)@ z=YG$RM5~obGFvFP&&_X+(P|&LVtm@oMMeKxV?Sy2_gK4n?tg+i=ydw~?cNkQ2ImLO z*^dj|qtT;kHDR(S|(*{AJ&{}y>@r1&mHb%TsuG4_Y`MBz@q}-E_mZf`1MD}UrIDUMv?FBt7Z3P ztL7d)Y4$vF(2!9e<%%%A8(=L&o-D|oltGC?U z2b(_pLU}lo2LR7E9RMc!1j+* z%F60PukAfYkZerbNw1mYlL7pj5K02bik^LiQL3 z7UvgyPiO~CgFUE=vr6sC?!*i5)62mB2{m`VRR6^jElp6xt*^Uwq1{`P-NxFn1H stS5)8A6H>`e(3w2w6d)GCJx{?BZmqqm6;~)00000NkvXXu0mjf03;@k`2YX_ delta 859 zcmV-h1El=L2J!}wB!4$aL_t(oN9|TkNK{c2J`csQF{h@Cf`Jx_xF{zO2BU$XRxX6V ziWp0T$ZfQ#m91)3n`m1EVl_lH5V&wv5EzLdr+PeoIV|EoD}zV-UH`!hS%4iqT~6l= zcnpBmL;r6J_T?^B(B6^?m~oSh9M%x{5IF+!ZuyNEPFV zCp`qkq;}!Qit!e-+8!4Sh_&pmif6Yp?{L`}0I<*-KO1h8gRvete{R8S_UK8ce2mY^ znX!TkDCQVf(q1h9+L{m$GH68-&Lyu%YVx5B-B>kKiPK0 zjHTxtIfn74T*eUUd?@Q9q7Gg0Kg(sQz0USI+2*Mr6~6T&{|ScDXv() lwqdd&z1wiU{0HzGU#Hg_d+Dd?00000NkvXXu0mjf006c3lZF5Q diff --git a/src/main/resources/assets/malum/textures/item/ravenous_brooch.png b/src/main/resources/assets/malum/textures/item/ravenous_brooch.png new file mode 100644 index 0000000000000000000000000000000000000000..f31ec70be3b6a1153daa2a68f290594b4ab0d08a GIT binary patch literal 567 zcmV-70?7S|P)aD{vQpoXx|* z#$cf$&G7NdcZPRgzk>|{0gz@PZcYY%9!`c6cb+nQ`SANF zwJaG5D`zqAvHxdiY)EIgf9*KKfh9M=hJ(QM7w^EXVFYQOxvH8$O~sd?zd4EF)#Z;2 z?W@)@?A%nvuzcrDu;NH}h=KE~7BGnE@-r0H&SSWBXEQ^3SStggv8maAK0Y=EYbAaL z8+Unz`Mt*(Rvg^V5EYu& z`|1mWxr-vh=3}oI#Dy8aVjtcyGK4sYFr3_TpW(9@4>(+|T>r{&;D$p8QV07*qoM6N<$ Ff&gig1>*n! literal 0 HcmV?d00001