From 005c6351e8e61fe612bf055350afbec9893ba6e8 Mon Sep 17 00:00:00 2001 From: SammySemicolon <69329424+SammySemicolon@users.noreply.github.com> Date: Mon, 16 Dec 2024 04:27:15 +0100 Subject: [PATCH] Soulwoven Pouch :3 --- .../resources/assets/malum/lang/en_us.json | 13 +- .../models/item/cluster_of_brilliance.json | 6 - ...{spirit_pouch.json => raw_brilliance.json} | 2 +- ...rilliance.json => refined_brilliance.json} | 2 +- .../malum/models/item/ritual_shard.json | 10 +- .../malum/models/item/soulwoven_pouch.json | 14 ++ .../models/item/soulwoven_pouch_filled.json | 6 + .../resources/data/c/tags/item/gems.json | 2 +- .../soulwoven_banner.json | 0 .../soulwoven_banner_breeze.json | 32 +++ .../soulwoven_banner_fractal.json | 32 +++ .../soulwoven_banner_horns.json | 32 +++ .../soulwoven_banner_sigil.json | 32 +++ .../recipes/misc/block_of_brilliance.json | 2 +- .../misc/brilliance_from_blasting.json | 2 +- .../recipes/misc/brilliance_from_block.json | 2 +- .../brilliance_from_crushed_blasting.json | 2 +- .../brilliance_from_crushed_smelting.json | 2 +- .../brilliance_from_deepslate_blasting.json | 2 +- .../brilliance_from_deepslate_smelting.json | 2 +- .../misc/brilliance_from_raw_blasting.json | 2 +- .../misc/brilliance_from_raw_smelting.json | 2 +- .../misc/brilliance_from_smelting.json | 2 +- .../experience_bottle_from_brilliance.json | 2 +- ...spirit_pouch.json => soulwoven_pouch.json} | 8 +- .../malum/enchantment/spirit_plunder.json | 31 +-- .../blocks/brilliant_deepslate.json | 2 +- .../loot_table/blocks/brilliant_stone.json | 2 +- .../malum/recipe/block_of_brilliance.json | 2 +- .../recipe/brilliance_from_blasting.json | 2 +- .../malum/recipe/brilliance_from_block.json | 2 +- .../brilliance_from_crushed_blasting.json | 2 +- .../brilliance_from_crushed_smelting.json | 2 +- .../brilliance_from_deepslate_blasting.json | 2 +- .../brilliance_from_deepslate_smelting.json | 2 +- .../recipe/brilliance_from_raw_blasting.json | 4 +- .../recipe/brilliance_from_raw_smelting.json | 4 +- .../recipe/brilliance_from_smelting.json | 2 +- .../data/malum/recipe/brilliant_obelisk.json | 2 +- .../experience_bottle_from_brilliance.json | 2 +- .../data/malum/recipe/mnemonic_fragment.json | 2 +- .../mnemonic_fragment_from_cluster.json | 2 +- .../malum/recipe/ring_of_arcane_prowess.json | 2 +- .../data/malum/recipe/soulwoven_banner.json | 2 +- .../malum/recipe/soulwoven_banner_breeze.json | 16 ++ .../recipe/soulwoven_banner_fractal.json | 16 ++ .../malum/recipe/soulwoven_banner_horns.json | 16 ++ .../malum/recipe/soulwoven_banner_sigil.json | 16 ++ ...spirit_pouch.json => soulwoven_pouch.json} | 10 +- .../data/malum/tags/item/augments.json | 13 ++ .../tags/item/enchantable/spirit_spoils.json | 2 +- .../data/malum/tags/item/materials.json | 31 +++ .../data/malum/tags/item/minerals.json | 15 ++ .../data/malum/tags/item/mob_drops.json | 21 ++ ...json => soul_shatter_capable_weapons.json} | 0 .../malum/tags/item/soulhunters_treasure.json | 22 ++ .../malum/tags/item/soulwoven_banners.json | 3 + .../item/soulwoven_pouch_autocollect.json | 8 + .../tags/item/{spirit.json => spirits.json} | 0 .../renderer/block/RitualPlinthRenderer.java | 1 - .../ThrownConcentratedGluttonyRenderer.java | 1 - .../screen/codex/entries/ArtificeEntries.java | 16 +- .../codex/entries/IntroductionEntries.java | 8 +- .../tooltip/ClientSoulwovenPouchTooltip.java | 96 ++++++++ .../RepairPylonCoreBlockEntity.java | 3 +- .../RitualPlinthBlockEntity.java | 19 +- ...Block.java => IGradientedLeavesBlock.java} | 2 +- .../block/nature/MalumHangingLeavesBlock.java | 2 +- .../common/block/nature/MalumLeavesBlock.java | 2 +- .../storage/jar/SpiritJarBlockEntity.java | 4 +- .../data_components/CatalystFlingerState.java | 23 ++ .../common/data_components/RitualData.java | 16 ++ .../SoulwovenPouchContents.java | 188 +++++++++++++++ .../malum/common/effect/AscensionEffect.java | 2 +- .../malum/common/effect/GluttonyEffect.java | 2 +- .../malum/common/effect/RejectedEffect.java | 2 +- .../malum/common/effect/aura/AqueousAura.java | 6 +- .../thrown/ThrownConcentratedGluttony.java | 1 + .../common/item/SoulwovenBannerItem.java | 10 + ...ingerItem.java => CatalystLobberItem.java} | 62 ++--- .../item/curiosities/SoulwovenPouchItem.java | 178 ++++++++++++++ .../item/curiosities/SpiritPouchItem.java | 111 --------- .../armor/MalignantStrongholdArmorItem.java | 2 +- .../armor/SoulHunterArmorItem.java | 8 +- .../armor/SoulStainedSteelArmorItem.java | 2 +- .../curiosities/curios/CurioGildedBelt.java | 2 +- .../curiosities/curios/CurioGildedRing.java | 2 +- .../curios/CurioOrnateNecklace.java | 2 +- .../curiosities/curios/CurioOrnateRing.java | 2 +- .../curios/brooches/CurioGlassBrooch.java | 7 +- .../runes/madness/RuneBolsteringItem.java | 2 +- .../runes/madness/RuneSpellMasteryItem.java | 8 +- .../runes/madness/RuneToughnessItem.java | 2 +- .../madness/RuneUnnaturalStaminaItem.java | 2 +- .../curios/runes/miracle/RuneCullingItem.java | 8 +- .../runes/miracle/RuneDexterityItem.java | 2 +- .../runes/miracle/RuneReinforcementItem.java | 6 +- .../curios/sets/misc/CurioNarrowNecklace.java | 2 +- .../sets/soulward/CurioMagebaneBelt.java | 6 +- .../sets/spirit/CurioArcaneSpoilRing.java | 2 +- .../sets/spirit/CurioMirrorNecklace.java | 2 +- .../curios/sets/weeping/CurioEndlessRing.java | 2 +- .../sets/weeping/CurioWatcherNecklace.java | 13 +- .../weapons/scythe/MalumScytheItem.java | 2 +- .../common/item/spirit/RitualShardItem.java | 72 ++---- .../irons_spellbooks/IronsSpellsCompat.java | 13 +- .../malum/core/events/ClientSetupEvents.java | 16 +- .../malum/core/handlers/SoulDataHandler.java | 3 +- .../core/systems/ritual/MalumRitualTier.java | 4 +- .../core/systems/ritual/MalumRitualType.java | 30 ++- .../java/com/sammy/malum/data/MalumLang.java | 9 +- .../data/block/MalumBlockLootTables.java | 4 +- .../malum/data/item/MalumEnchantments.java | 8 +- .../data/item/MalumItemModelSmithTypes.java | 14 +- .../malum/data/item/MalumItemModels.java | 1 + .../sammy/malum/data/item/MalumItemTags.java | 93 +++++--- .../data/recipe/MalumVanillaRecipes.java | 33 +-- .../data/recipe/MalumVoidFavorRecipes.java | 4 +- .../infusion/CurioSpiritInfusionRecipes.java | 2 +- .../infusion/MiscSpiritInfusionRecipes.java | 2 +- .../malum/registry/common/RitualRegistry.java | 4 +- .../registry/common/block/BlockRegistry.java | 4 +- .../registry/common/item/ArmorTiers.java | 11 +- .../common/item/DataComponentRegistry.java | 39 ++-- .../registry/common/item/ItemRegistry.java | 218 ++++++++---------- .../registry/common/item/ItemTagRegistry.java | 61 +++-- .../common/item/tabs/CreativeTabRegistry.java | 2 +- .../RepairPylonParticleEffects.java | 14 +- ...r_of_brilliance.png => raw_brilliance.png} | Bin ..._brilliance.png => refined_brilliance.png} | Bin .../malum/textures/item/soulwoven_pouch.png | Bin 0 -> 565 bytes .../textures/item/soulwoven_pouch_filled.png | Bin 0 -> 481 bytes .../malum/textures/item/spirit_pouch.png | Bin 414 -> 0 bytes 133 files changed, 1352 insertions(+), 623 deletions(-) delete mode 100644 src/generated/resources/assets/malum/models/item/cluster_of_brilliance.json rename src/generated/resources/assets/malum/models/item/{spirit_pouch.json => raw_brilliance.json} (60%) rename src/generated/resources/assets/malum/models/item/{chunk_of_brilliance.json => refined_brilliance.json} (57%) create mode 100644 src/generated/resources/assets/malum/models/item/soulwoven_pouch.json create mode 100644 src/generated/resources/assets/malum/models/item/soulwoven_pouch_filled.json rename src/generated/resources/data/malum/advancement/recipes/{misc => building_blocks}/soulwoven_banner.json (100%) create mode 100644 src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_breeze.json create mode 100644 src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_fractal.json create mode 100644 src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_horns.json create mode 100644 src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_sigil.json rename src/generated/resources/data/malum/advancement/recipes/misc/{spirit_pouch.json => soulwoven_pouch.json} (78%) create mode 100644 src/generated/resources/data/malum/recipe/soulwoven_banner_breeze.json create mode 100644 src/generated/resources/data/malum/recipe/soulwoven_banner_fractal.json create mode 100644 src/generated/resources/data/malum/recipe/soulwoven_banner_horns.json create mode 100644 src/generated/resources/data/malum/recipe/soulwoven_banner_sigil.json rename src/generated/resources/data/malum/recipe/{spirit_pouch.json => soulwoven_pouch.json} (64%) create mode 100644 src/generated/resources/data/malum/tags/item/augments.json create mode 100644 src/generated/resources/data/malum/tags/item/materials.json create mode 100644 src/generated/resources/data/malum/tags/item/minerals.json create mode 100644 src/generated/resources/data/malum/tags/item/mob_drops.json rename src/generated/resources/data/malum/tags/item/{soul_hunter_weapon.json => soul_shatter_capable_weapons.json} (100%) create mode 100644 src/generated/resources/data/malum/tags/item/soulhunters_treasure.json create mode 100644 src/generated/resources/data/malum/tags/item/soulwoven_banners.json create mode 100644 src/generated/resources/data/malum/tags/item/soulwoven_pouch_autocollect.json rename src/generated/resources/data/malum/tags/item/{spirit.json => spirits.json} (100%) create mode 100644 src/main/java/com/sammy/malum/client/screen/tooltip/ClientSoulwovenPouchTooltip.java rename src/main/java/com/sammy/malum/common/block/nature/{iGradientedLeavesBlock.java => IGradientedLeavesBlock.java} (74%) create mode 100644 src/main/java/com/sammy/malum/common/data_components/CatalystFlingerState.java create mode 100644 src/main/java/com/sammy/malum/common/data_components/RitualData.java create mode 100644 src/main/java/com/sammy/malum/common/data_components/SoulwovenPouchContents.java create mode 100644 src/main/java/com/sammy/malum/common/item/SoulwovenBannerItem.java rename src/main/java/com/sammy/malum/common/item/curiosities/{CatalystFlingerItem.java => CatalystLobberItem.java} (64%) create mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/SoulwovenPouchItem.java delete mode 100644 src/main/java/com/sammy/malum/common/item/curiosities/SpiritPouchItem.java rename src/main/resources/assets/malum/textures/item/{cluster_of_brilliance.png => raw_brilliance.png} (100%) rename src/main/resources/assets/malum/textures/item/{chunk_of_brilliance.png => refined_brilliance.png} (100%) create mode 100644 src/main/resources/assets/malum/textures/item/soulwoven_pouch.png create mode 100644 src/main/resources/assets/malum/textures/item/soulwoven_pouch_filled.png delete mode 100644 src/main/resources/assets/malum/textures/item/spirit_pouch.png diff --git a/src/generated/resources/assets/malum/lang/en_us.json b/src/generated/resources/assets/malum/lang/en_us.json index e84198fbc..1fb77fd3a 100644 --- a/src/generated/resources/assets/malum/lang/en_us.json +++ b/src/generated/resources/assets/malum/lang/en_us.json @@ -406,8 +406,6 @@ "item.malum.calcified_blight": "Calcified Blight", "item.malum.catalyst_lobber": "Catalyst Lobber", "item.malum.charcoal_fragment": "Charcoal Fragment", - "item.malum.chunk_of_brilliance": "Chunk of Brilliance", - "item.malum.cluster_of_brilliance": "Cluster of Brilliance", "item.malum.coal_fragment": "Coal Fragment", "item.malum.complete_design": "Complete Design", "item.malum.concentrated_gluttony": "Concentrated Gluttony", @@ -509,7 +507,9 @@ "item.malum.poppet": "Poppet", "item.malum.pride_prideweave": "Pride Prideweave", "item.malum.prismatic_focus_lens": "Prismatic Focus Lens", + "item.malum.raw_brilliance": "Raw Brilliance", "item.malum.raw_soulstone": "Raw Soulstone", + "item.malum.refined_brilliance": "Refined Brilliance", "item.malum.refined_soulstone": "Refined Soulstone", "item.malum.ring_of_alchemical_mastery": "Ring of Alchemical Mastery", "item.malum.ring_of_arcane_prowess": "Ring of Arcane Prowess", @@ -577,10 +577,10 @@ "item.malum.soul_stained_steel_shovel": "Soulstained Steel Shovel", "item.malum.soul_stained_steel_sword": "Soulstained Steel Sword", "item.malum.soulwood_boat": "Soulwood Boat", + "item.malum.soulwoven_pouch": "Soulwoven Pouch", "item.malum.soulwoven_silk": "Soulwoven Silk", "item.malum.spectral_lens": "Spectral Lens", "item.malum.spectral_optic": "Spectral Optic", - "item.malum.spirit_pouch": "Spirit Pouch", "item.malum.splash_of_gluttony": "Splash of Gluttony", "item.malum.staff_of_the_auric_flame": "Staff of the Auric Flame", "item.malum.stellar_mechanism": "Stellar Mechanism", @@ -904,7 +904,6 @@ "malum.gui.book.entry.page.headline.soulwoven_pouch": "Soulwoven Pouch", "malum.gui.book.entry.page.headline.soulwoven_silk": "Soulwoven Silk", "malum.gui.book.entry.page.headline.spirit_crystals": "Spirit Crystals", - "malum.gui.book.entry.page.headline.spirit_fabric.pouch": "Spirit Pouch", "malum.gui.book.entry.page.headline.spirit_focusing": "Spirit Focusing", "malum.gui.book.entry.page.headline.spirit_infusion": "Spirit Infusion", "malum.gui.book.entry.page.headline.spirit_infusion.alchemical_calx": "Alchemical Calx", @@ -1188,9 +1187,9 @@ "malum.gui.book.entry.page.text.soulwood.color.1": "The most obvious differences with the tree itself are shape and leaf color. Soulwood is more spindly than Runewood, and its leaves are a sickly purple-red hue instead of a rich orange-yellow. It can still be used for many of the same things, though.", "malum.gui.book.entry.page.text.soulwood.intro.1": "After further study, I have discovered that the Soulwood produced by the Unchained Rite has actually become an entirely different species from the Runewood it is made from. It grows differently, it acts differently... it appears the spiritual scars that created it go deeper than just its color and magic.", "malum.gui.book.entry.page.text.soulwood.sap.1": "The sticky lifeblood of the tree also seems to well up much more often in a tree than in Runewood. The sap's effects are corrupted as well; rather than restoring my vigor, Unholy Syrup enhances it, increasing my attack strength and providing damage resistance.", - "malum.gui.book.entry.page.text.soulwoven_pouch.1": "But this fabric works wonderfully for storing spirit crystals. It keeps the arcana condensed within, and will even store spirits I pick up before they so much as clutter my pockets. It can store as many spirits as a single chest, making it quite convenient to carry around.", + "malum.gui.book.entry.page.text.soulwoven_pouch.1": "In my studies one of the most cumbersome experiences so far has been the sheer amount of magical reagents and residue I have to deal with. To solve this issue, I've designed the Soulwoven Pouch with the bundle's design in mind. The pouch hungers for the magically aligned, reserving extra room for and collecting it habitually.", "malum.gui.book.entry.page.text.soulwoven_silk.1": "Soulwoven Silk is a light yet sturdy material that acts as an insulator for spirit energies. While other materials do exhibit matching interactions with the arcane, this bond between magic and cloth should make for a unique material.", - "malum.gui.book.entry.page.text.soulwoven_silk.soulwoven_banner.1": "To further study and confirm the insulating properties of the cloth, I've heft together a set of Soulwoven Banners with patterns based on each of the spirits I've been met with thus far. If further imbued with Spirit Arcana, the Banners will gain a dim, and them powerful glow with two shards infused.", + "malum.gui.book.entry.page.text.soulwoven_silk.soulwoven_banner.1": "To further study and confirm the insulating properties of the cloth, I've heft together a set of Soulwoven Banners with patterns based on each of the spirits I've been met with thus far. If further imbued with Arcana, the Banners will gain a dim, and them powerful glow when met with an additional shard.", "malum.gui.book.entry.page.text.spirit_crystals.1": "The soul is a notoriously fickle thing. Even confirming its existence is difficult, requiring the highest thaumaturgies to get a reading. That is what sets spirit arcana apart from other magic. We don't need grand assemblies and esoteric artifice to see a soul. Simply destroying it is proof enough.", "malum.gui.book.entry.page.text.spirit_crystals.2": "A material I have named Soulstone is the means by which we do so. It appears mundane until refined, but once it is rid of impurities, it seems... out of phase with the world. By creating a blade using it as a core, I should be able to strike not only the physical form, but also the soul, shattering it to energy before it can disperse.", "malum.gui.book.entry.page.text.spirit_crystals.3": "These energies, as previously noted, have different 'frequencies' of sorts. A being burning with light would have a soul that reflects that radiance, and a being prone to adaptation would have a soul as malleable as itself. Occasionally, the energy has no flavor to it at all, leaving only the raw impulse of creation behind. That type of crystal bears further study.", @@ -1386,7 +1385,7 @@ "malum.gui.book.entry.soulwood": "A Study on Soulwood", "malum.gui.book.entry.soulwood.description": "Twisted trees", "malum.gui.book.entry.soulwoven_pouch": "Soulwoven Pouch", - "malum.gui.book.entry.soulwoven_pouch.description": "[Soulwoven Pouch Tooltip]", + "malum.gui.book.entry.soulwoven_pouch.description": "Made real through supposition", "malum.gui.book.entry.soulwoven_silk": "Soulwoven Silk", "malum.gui.book.entry.soulwoven_silk.description": "Wicked weaves", "malum.gui.book.entry.spirit_crystals": "Spirit Crystals", diff --git a/src/generated/resources/assets/malum/models/item/cluster_of_brilliance.json b/src/generated/resources/assets/malum/models/item/cluster_of_brilliance.json deleted file mode 100644 index cc263f021..000000000 --- a/src/generated/resources/assets/malum/models/item/cluster_of_brilliance.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/generated", - "textures": { - "layer0": "malum:item/cluster_of_brilliance" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/malum/models/item/spirit_pouch.json b/src/generated/resources/assets/malum/models/item/raw_brilliance.json similarity index 60% rename from src/generated/resources/assets/malum/models/item/spirit_pouch.json rename to src/generated/resources/assets/malum/models/item/raw_brilliance.json index ae340f62e..e9e24bc73 100644 --- a/src/generated/resources/assets/malum/models/item/spirit_pouch.json +++ b/src/generated/resources/assets/malum/models/item/raw_brilliance.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "malum:item/spirit_pouch" + "layer0": "malum:item/raw_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/assets/malum/models/item/chunk_of_brilliance.json b/src/generated/resources/assets/malum/models/item/refined_brilliance.json similarity index 57% rename from src/generated/resources/assets/malum/models/item/chunk_of_brilliance.json rename to src/generated/resources/assets/malum/models/item/refined_brilliance.json index 180a107ba..a7d3d4417 100644 --- a/src/generated/resources/assets/malum/models/item/chunk_of_brilliance.json +++ b/src/generated/resources/assets/malum/models/item/refined_brilliance.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "malum:item/chunk_of_brilliance" + "layer0": "malum:item/refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/assets/malum/models/item/ritual_shard.json b/src/generated/resources/assets/malum/models/item/ritual_shard.json index 7bbda83d9..3ac7e1148 100644 --- a/src/generated/resources/assets/malum/models/item/ritual_shard.json +++ b/src/generated/resources/assets/malum/models/item/ritual_shard.json @@ -4,31 +4,31 @@ { "model": "malum:item/ritual_shard_dim", "predicate": { - "minecraft:stored_ritual": 2.0 + "malum:tier": 2.0 } }, { "model": "malum:item/ritual_shard_vague", "predicate": { - "minecraft:stored_ritual": 3.0 + "malum:tier": 3.0 } }, { "model": "malum:item/ritual_shard_bright", "predicate": { - "minecraft:stored_ritual": 4.0 + "malum:tier": 4.0 } }, { "model": "malum:item/ritual_shard_vivid", "predicate": { - "minecraft:stored_ritual": 5.0 + "malum:tier": 5.0 } }, { "model": "malum:item/ritual_shard_radiant", "predicate": { - "minecraft:stored_ritual": 6.0 + "malum:tier": 6.0 } } ], diff --git a/src/generated/resources/assets/malum/models/item/soulwoven_pouch.json b/src/generated/resources/assets/malum/models/item/soulwoven_pouch.json new file mode 100644 index 000000000..48339b3e2 --- /dev/null +++ b/src/generated/resources/assets/malum/models/item/soulwoven_pouch.json @@ -0,0 +1,14 @@ +{ + "parent": "minecraft:item/generated", + "overrides": [ + { + "model": "malum:item/soulwoven_pouch_filled", + "predicate": { + "malum:filled": 1.0 + } + } + ], + "textures": { + "layer0": "malum:item/soulwoven_pouch" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/malum/models/item/soulwoven_pouch_filled.json b/src/generated/resources/assets/malum/models/item/soulwoven_pouch_filled.json new file mode 100644 index 000000000..9cde29bb0 --- /dev/null +++ b/src/generated/resources/assets/malum/models/item/soulwoven_pouch_filled.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "malum:item/soulwoven_pouch_filled" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/item/gems.json b/src/generated/resources/data/c/tags/item/gems.json index 3feaf04a7..19c3a9706 100644 --- a/src/generated/resources/data/c/tags/item/gems.json +++ b/src/generated/resources/data/c/tags/item/gems.json @@ -4,6 +4,6 @@ "malum:blazing_quartz", "malum:natural_quartz", "malum:blazing_quartz", - "malum:cluster_of_brilliance" + "malum:raw_brilliance" ] } \ No newline at end of file diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/soulwoven_banner.json b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner.json similarity index 100% rename from src/generated/resources/data/malum/advancement/recipes/misc/soulwoven_banner.json rename to src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner.json diff --git a/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_breeze.json b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_breeze.json new file mode 100644 index 000000000..f2212589a --- /dev/null +++ b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_breeze.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soulwoven_silk": { + "conditions": { + "items": [ + { + "items": "malum:soulwoven_silk" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "malum:soulwoven_banner_breeze" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soulwoven_silk" + ] + ], + "rewards": { + "recipes": [ + "malum:soulwoven_banner_breeze" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_fractal.json b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_fractal.json new file mode 100644 index 000000000..765d9180e --- /dev/null +++ b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_fractal.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soulwoven_silk": { + "conditions": { + "items": [ + { + "items": "malum:soulwoven_silk" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "malum:soulwoven_banner_fractal" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soulwoven_silk" + ] + ], + "rewards": { + "recipes": [ + "malum:soulwoven_banner_fractal" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_horns.json b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_horns.json new file mode 100644 index 000000000..ab540e698 --- /dev/null +++ b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_horns.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soulwoven_silk": { + "conditions": { + "items": [ + { + "items": "malum:soulwoven_silk" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "malum:soulwoven_banner_horns" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soulwoven_silk" + ] + ], + "rewards": { + "recipes": [ + "malum:soulwoven_banner_horns" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_sigil.json b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_sigil.json new file mode 100644 index 000000000..bde09aff9 --- /dev/null +++ b/src/generated/resources/data/malum/advancement/recipes/building_blocks/soulwoven_banner_sigil.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soulwoven_silk": { + "conditions": { + "items": [ + { + "items": "malum:soulwoven_silk" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "malum:soulwoven_banner_sigil" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soulwoven_silk" + ] + ], + "rewards": { + "recipes": [ + "malum:soulwoven_banner_sigil" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/block_of_brilliance.json b/src/generated/resources/data/malum/advancement/recipes/misc/block_of_brilliance.json index 283579021..a7adbfb06 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/block_of_brilliance.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/block_of_brilliance.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_blasting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_blasting.json index bc976317e..53dbd0246 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_blasting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_blasting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_block.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_block.json index 1c6a2de0c..6f6d8e29f 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_block.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_block.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_blasting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_blasting.json index 05b250868..53592598b 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_blasting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_blasting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_smelting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_smelting.json index 7051d4cc1..534f2ab7c 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_smelting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_crushed_smelting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_blasting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_blasting.json index e32929e1b..1cb752715 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_blasting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_blasting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_smelting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_smelting.json index b4881f9d8..20d77951d 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_smelting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_deepslate_smelting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_blasting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_blasting.json index 360f41b1c..41fa1f6b0 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_blasting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_blasting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_smelting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_smelting.json index d3f323654..99e93a41d 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_smelting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_raw_smelting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_smelting.json b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_smelting.json index 0a656f240..2a155c28c 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_smelting.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/brilliance_from_smelting.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:cluster_of_brilliance" + "items": "malum:raw_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/experience_bottle_from_brilliance.json b/src/generated/resources/data/malum/advancement/recipes/misc/experience_bottle_from_brilliance.json index bfee1a35b..3bb73cba2 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/experience_bottle_from_brilliance.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/experience_bottle_from_brilliance.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "malum:chunk_of_brilliance" + "items": "malum:refined_brilliance" } ] }, diff --git a/src/generated/resources/data/malum/advancement/recipes/misc/spirit_pouch.json b/src/generated/resources/data/malum/advancement/recipes/misc/soulwoven_pouch.json similarity index 78% rename from src/generated/resources/data/malum/advancement/recipes/misc/spirit_pouch.json rename to src/generated/resources/data/malum/advancement/recipes/misc/soulwoven_pouch.json index e3309bfe0..5e01f6685 100644 --- a/src/generated/resources/data/malum/advancement/recipes/misc/spirit_pouch.json +++ b/src/generated/resources/data/malum/advancement/recipes/misc/soulwoven_pouch.json @@ -1,7 +1,7 @@ { "parent": "minecraft:recipes/root", "criteria": { - "has_spirit_fabric": { + "has_soulwoven_silk": { "conditions": { "items": [ { @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "malum:spirit_pouch" + "recipe": "malum:soulwoven_pouch" }, "trigger": "minecraft:recipe_unlocked" } @@ -21,12 +21,12 @@ "requirements": [ [ "has_the_recipe", - "has_spirit_fabric" + "has_soulwoven_silk" ] ], "rewards": { "recipes": [ - "malum:spirit_pouch" + "malum:soulwoven_pouch" ] } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/enchantment/spirit_plunder.json b/src/generated/resources/data/malum/enchantment/spirit_plunder.json index 3355c253e..df223dad8 100644 --- a/src/generated/resources/data/malum/enchantment/spirit_plunder.json +++ b/src/generated/resources/data/malum/enchantment/spirit_plunder.json @@ -1,34 +1,21 @@ { - "anvil_cost": 10, + "anvil_cost": 1, "description": { "translate": "enchantment.malum.spirit_plunder" }, - "effects": { - "minecraft:attributes": [ - { - "amount": { - "type": "minecraft:linear", - "base": 1.0, - "per_level_above_first": 1.0 - }, - "attribute": "malum:spirit_spoils", - "id": "malum:enchantment.spirit_spoils", - "operation": "add_value" - } - ] - }, "max_cost": { - "base": 200, - "per_level_above_first": 0 + "base": 6, + "per_level_above_first": 10 }, "max_level": 2, "min_cost": { - "base": 55, - "per_level_above_first": 0 + "base": 1, + "per_level_above_first": 10 }, + "primary_items": "#malum:soul_shatter_capable_weapons", "slots": [ - "mainhand" + "hand" ], - "supported_items": "#malum:enchantable/spirit_spoils", - "weight": 1 + "supported_items": "#malum:soul_shatter_capable_weapons", + "weight": 10 } \ No newline at end of file diff --git a/src/generated/resources/data/malum/loot_table/blocks/brilliant_deepslate.json b/src/generated/resources/data/malum/loot_table/blocks/brilliant_deepslate.json index 44d15c0f7..d24ee314b 100644 --- a/src/generated/resources/data/malum/loot_table/blocks/brilliant_deepslate.json +++ b/src/generated/resources/data/malum/loot_table/blocks/brilliant_deepslate.json @@ -40,7 +40,7 @@ "function": "minecraft:explosion_decay" } ], - "name": "malum:cluster_of_brilliance" + "name": "malum:raw_brilliance" } ] } diff --git a/src/generated/resources/data/malum/loot_table/blocks/brilliant_stone.json b/src/generated/resources/data/malum/loot_table/blocks/brilliant_stone.json index d645cde7f..b2e0ada98 100644 --- a/src/generated/resources/data/malum/loot_table/blocks/brilliant_stone.json +++ b/src/generated/resources/data/malum/loot_table/blocks/brilliant_stone.json @@ -40,7 +40,7 @@ "function": "minecraft:explosion_decay" } ], - "name": "malum:cluster_of_brilliance" + "name": "malum:raw_brilliance" } ] } diff --git a/src/generated/resources/data/malum/recipe/block_of_brilliance.json b/src/generated/resources/data/malum/recipe/block_of_brilliance.json index 31d77238c..2cf073f7b 100644 --- a/src/generated/resources/data/malum/recipe/block_of_brilliance.json +++ b/src/generated/resources/data/malum/recipe/block_of_brilliance.json @@ -3,7 +3,7 @@ "category": "misc", "key": { "#": { - "item": "malum:cluster_of_brilliance" + "item": "malum:raw_brilliance" } }, "pattern": [ diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_blasting.json b/src/generated/resources/data/malum/recipe/brilliance_from_blasting.json index 475ae6f41..2631027d7 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_blasting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_blasting.json @@ -8,6 +8,6 @@ }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_block.json b/src/generated/resources/data/malum/recipe/brilliance_from_block.json index 0b8e7bf3b..5c586bba8 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_block.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_block.json @@ -8,6 +8,6 @@ ], "result": { "count": 9, - "id": "malum:cluster_of_brilliance" + "id": "malum:raw_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_crushed_blasting.json b/src/generated/resources/data/malum/recipe/brilliance_from_crushed_blasting.json index a483fb5e4..a70e403b3 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_crushed_blasting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_crushed_blasting.json @@ -8,6 +8,6 @@ }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_crushed_smelting.json b/src/generated/resources/data/malum/recipe/brilliance_from_crushed_smelting.json index 52fff3b75..b27546641 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_crushed_smelting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_crushed_smelting.json @@ -8,6 +8,6 @@ }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_blasting.json b/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_blasting.json index 9a680134e..1fe80071b 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_blasting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_blasting.json @@ -8,6 +8,6 @@ }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_smelting.json b/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_smelting.json index 3037f8ace..7d27948c9 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_smelting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_deepslate_smelting.json @@ -8,6 +8,6 @@ }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_raw_blasting.json b/src/generated/resources/data/malum/recipe/brilliance_from_raw_blasting.json index cfa093687..987740ce5 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_raw_blasting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_raw_blasting.json @@ -4,10 +4,10 @@ "cookingtime": 100, "experience": 1.0, "ingredient": { - "item": "malum:cluster_of_brilliance" + "item": "malum:raw_brilliance" }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_raw_smelting.json b/src/generated/resources/data/malum/recipe/brilliance_from_raw_smelting.json index 29f16a8c7..085088a52 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_raw_smelting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_raw_smelting.json @@ -4,10 +4,10 @@ "cookingtime": 200, "experience": 1.0, "ingredient": { - "item": "malum:cluster_of_brilliance" + "item": "malum:raw_brilliance" }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliance_from_smelting.json b/src/generated/resources/data/malum/recipe/brilliance_from_smelting.json index 7dfb674e8..c0e4ff6f8 100644 --- a/src/generated/resources/data/malum/recipe/brilliance_from_smelting.json +++ b/src/generated/resources/data/malum/recipe/brilliance_from_smelting.json @@ -8,6 +8,6 @@ }, "result": { "count": 2, - "id": "malum:chunk_of_brilliance" + "id": "malum:refined_brilliance" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/brilliant_obelisk.json b/src/generated/resources/data/malum/recipe/brilliant_obelisk.json index 9cc22792a..48de0ed94 100644 --- a/src/generated/resources/data/malum/recipe/brilliant_obelisk.json +++ b/src/generated/resources/data/malum/recipe/brilliant_obelisk.json @@ -3,7 +3,7 @@ "extraIngredients": [ { "count": 2, - "item": "malum:cluster_of_brilliance" + "item": "malum:raw_brilliance" }, { "count": 1, diff --git a/src/generated/resources/data/malum/recipe/experience_bottle_from_brilliance.json b/src/generated/resources/data/malum/recipe/experience_bottle_from_brilliance.json index f1c8bfd14..493fafcb8 100644 --- a/src/generated/resources/data/malum/recipe/experience_bottle_from_brilliance.json +++ b/src/generated/resources/data/malum/recipe/experience_bottle_from_brilliance.json @@ -3,7 +3,7 @@ "category": "misc", "ingredients": [ { - "item": "malum:chunk_of_brilliance" + "item": "malum:refined_brilliance" }, { "item": "minecraft:glass_bottle" diff --git a/src/generated/resources/data/malum/recipe/mnemonic_fragment.json b/src/generated/resources/data/malum/recipe/mnemonic_fragment.json index fab42d29d..45b8c723c 100644 --- a/src/generated/resources/data/malum/recipe/mnemonic_fragment.json +++ b/src/generated/resources/data/malum/recipe/mnemonic_fragment.json @@ -1,7 +1,7 @@ { "type": "malum:favor_of_the_void", "ingredient": { - "item": "malum:chunk_of_brilliance" + "item": "malum:refined_brilliance" }, "output": { "count": 1, diff --git a/src/generated/resources/data/malum/recipe/mnemonic_fragment_from_cluster.json b/src/generated/resources/data/malum/recipe/mnemonic_fragment_from_cluster.json index 2d2410a2d..57830b63f 100644 --- a/src/generated/resources/data/malum/recipe/mnemonic_fragment_from_cluster.json +++ b/src/generated/resources/data/malum/recipe/mnemonic_fragment_from_cluster.json @@ -1,7 +1,7 @@ { "type": "malum:favor_of_the_void", "ingredient": { - "item": "malum:cluster_of_brilliance" + "item": "malum:raw_brilliance" }, "output": { "count": 2, diff --git a/src/generated/resources/data/malum/recipe/ring_of_arcane_prowess.json b/src/generated/resources/data/malum/recipe/ring_of_arcane_prowess.json index b3be4e436..37a68c423 100644 --- a/src/generated/resources/data/malum/recipe/ring_of_arcane_prowess.json +++ b/src/generated/resources/data/malum/recipe/ring_of_arcane_prowess.json @@ -3,7 +3,7 @@ "extraIngredients": [ { "count": 4, - "item": "malum:cluster_of_brilliance" + "item": "malum:raw_brilliance" }, { "count": 4, diff --git a/src/generated/resources/data/malum/recipe/soulwoven_banner.json b/src/generated/resources/data/malum/recipe/soulwoven_banner.json index 254cacc52..00daba1ac 100644 --- a/src/generated/resources/data/malum/recipe/soulwoven_banner.json +++ b/src/generated/resources/data/malum/recipe/soulwoven_banner.json @@ -1,6 +1,6 @@ { "type": "minecraft:crafting_shaped", - "category": "misc", + "category": "building", "key": { "X": { "tag": "malum:runewood_planks" diff --git a/src/generated/resources/data/malum/recipe/soulwoven_banner_breeze.json b/src/generated/resources/data/malum/recipe/soulwoven_banner_breeze.json new file mode 100644 index 000000000..a06f8df79 --- /dev/null +++ b/src/generated/resources/data/malum/recipe/soulwoven_banner_breeze.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "ingredients": [ + { + "item": "malum:soulwoven_banner" + }, + { + "item": "minecraft:wind_charge" + } + ], + "result": { + "count": 1, + "id": "malum:soulwoven_banner_breeze" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/soulwoven_banner_fractal.json b/src/generated/resources/data/malum/recipe/soulwoven_banner_fractal.json new file mode 100644 index 000000000..f001c0f96 --- /dev/null +++ b/src/generated/resources/data/malum/recipe/soulwoven_banner_fractal.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "ingredients": [ + { + "item": "malum:soulwoven_banner" + }, + { + "tag": "c:gems/emerald" + } + ], + "result": { + "count": 1, + "id": "malum:soulwoven_banner_fractal" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/soulwoven_banner_horns.json b/src/generated/resources/data/malum/recipe/soulwoven_banner_horns.json new file mode 100644 index 000000000..d4ca99d1c --- /dev/null +++ b/src/generated/resources/data/malum/recipe/soulwoven_banner_horns.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "ingredients": [ + { + "item": "malum:soulwoven_banner" + }, + { + "item": "malum:grim_talc" + } + ], + "result": { + "count": 1, + "id": "malum:soulwoven_banner_horns" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/soulwoven_banner_sigil.json b/src/generated/resources/data/malum/recipe/soulwoven_banner_sigil.json new file mode 100644 index 000000000..7dfece129 --- /dev/null +++ b/src/generated/resources/data/malum/recipe/soulwoven_banner_sigil.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "ingredients": [ + { + "item": "malum:soulwoven_banner" + }, + { + "item": "malum:soul_stained_steel_plating" + } + ], + "result": { + "count": 1, + "id": "malum:soulwoven_banner_sigil" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/recipe/spirit_pouch.json b/src/generated/resources/data/malum/recipe/soulwoven_pouch.json similarity index 64% rename from src/generated/resources/data/malum/recipe/spirit_pouch.json rename to src/generated/resources/data/malum/recipe/soulwoven_pouch.json index c8766c755..9774a4f53 100644 --- a/src/generated/resources/data/malum/recipe/spirit_pouch.json +++ b/src/generated/resources/data/malum/recipe/soulwoven_pouch.json @@ -7,18 +7,14 @@ }, "Y": { "item": "malum:soulwoven_silk" - }, - "Z": { - "tag": "minecraft:soul_fire_base_blocks" } }, "pattern": [ - " X ", - "YZY", - " Y " + "X", + "Y" ], "result": { "count": 1, - "id": "malum:spirit_pouch" + "id": "malum:soulwoven_pouch" } } \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/augments.json b/src/generated/resources/data/malum/tags/item/augments.json new file mode 100644 index 000000000..415f3ede5 --- /dev/null +++ b/src/generated/resources/data/malum/tags/item/augments.json @@ -0,0 +1,13 @@ +{ + "values": [ + "malum:mending_diffuser", + "malum:impurity_stabilizer", + "malum:shielding_apparatus", + "malum:warping_engine", + "malum:accelerating_inlay", + "malum:prismatic_focus_lens", + "malum:blazing_diode", + "malum:intricate_assembly", + "malum:stellar_mechanism" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/enchantable/spirit_spoils.json b/src/generated/resources/data/malum/tags/item/enchantable/spirit_spoils.json index bb2123a0e..e8a4a1fd9 100644 --- a/src/generated/resources/data/malum/tags/item/enchantable/spirit_spoils.json +++ b/src/generated/resources/data/malum/tags/item/enchantable/spirit_spoils.json @@ -1,5 +1,5 @@ { "values": [ - "#malum:soul_hunter_weapon" + "#malum:soul_shatter_capable_weapons" ] } \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/materials.json b/src/generated/resources/data/malum/tags/item/materials.json new file mode 100644 index 000000000..e7ff8144d --- /dev/null +++ b/src/generated/resources/data/malum/tags/item/materials.json @@ -0,0 +1,31 @@ +{ + "values": [ + "malum:rotting_essence", + "malum:grim_talc", + "malum:astral_weave", + "malum:warp_flux", + "malum:hex_ash", + "malum:living_flesh", + "malum:alchemical_calx", + "malum:blighted_gunk", + "malum:soulwoven_silk", + "malum:ether", + "malum:iridescent_ether", + "malum:soul_stained_steel_ingot", + "malum:soul_stained_steel_nugget", + "malum:soul_stained_steel_plating", + "malum:hallowed_gold_ingot", + "malum:hallowed_gold_nugget", + "malum:malignant_pewter_ingot", + "malum:malignant_pewter_nugget", + "malum:malignant_pewter_plating", + "malum:null_slate", + "malum:void_salts", + "malum:mnemonic_fragment", + "malum:auric_embers", + "malum:malignant_lead", + "malum:anomalous_design", + "malum:complete_design", + "malum:fused_consciousness" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/minerals.json b/src/generated/resources/data/malum/tags/item/minerals.json new file mode 100644 index 000000000..e5b02a921 --- /dev/null +++ b/src/generated/resources/data/malum/tags/item/minerals.json @@ -0,0 +1,15 @@ +{ + "values": [ + "malum:raw_soulstone", + "malum:crushed_soulstone", + "malum:refined_soulstone", + "malum:raw_brilliance", + "malum:crushed_brilliance", + "malum:refined_brilliance", + "malum:blazing_quartz", + "malum:arcane_charcoal", + "malum:natural_quartz", + "malum:cthonic_gold", + "malum:cthonic_gold_fragment" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/mob_drops.json b/src/generated/resources/data/malum/tags/item/mob_drops.json new file mode 100644 index 000000000..ee8ccc8c0 --- /dev/null +++ b/src/generated/resources/data/malum/tags/item/mob_drops.json @@ -0,0 +1,21 @@ +{ + "values": [ + "malum:rotting_essence", + "malum:grim_talc", + "malum:astral_weave", + "malum:warp_flux", + "minecraft:rotten_flesh", + "minecraft:spider_eye", + "minecraft:bone", + "minecraft:gunpowder", + "minecraft:string", + "minecraft:slime_ball", + "minecraft:magma_cream", + "minecraft:blaze_rod", + "minecraft:breeze_rod", + "minecraft:leather", + "minecraft:rabbit_hide", + "minecraft:feather", + "minecraft:ink_sac" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/soul_hunter_weapon.json b/src/generated/resources/data/malum/tags/item/soul_shatter_capable_weapons.json similarity index 100% rename from src/generated/resources/data/malum/tags/item/soul_hunter_weapon.json rename to src/generated/resources/data/malum/tags/item/soul_shatter_capable_weapons.json diff --git a/src/generated/resources/data/malum/tags/item/soulhunters_treasure.json b/src/generated/resources/data/malum/tags/item/soulhunters_treasure.json new file mode 100644 index 000000000..d263345f6 --- /dev/null +++ b/src/generated/resources/data/malum/tags/item/soulhunters_treasure.json @@ -0,0 +1,22 @@ +{ + "values": [ + "#malum:soul_shatter_capable_weapons", + "#malum:spirits", + "#malum:mob_drops", + "#malum:materials", + "#malum:minerals", + "#malum:augments", + "#malum:metal_nodes", + "#malum:soulwoven_banners", + "#curios:ring", + "#curios:necklace", + "#curios:belt", + "#curios:brooch", + "#curios:rune", + "malum:tuning_fork", + "malum:lamplighters_tongs", + "malum:catalyst_lobber", + "malum:encyclopedia_arcana", + "malum:encyclopedia_esoterica" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/soulwoven_banners.json b/src/generated/resources/data/malum/tags/item/soulwoven_banners.json new file mode 100644 index 000000000..f72d209df --- /dev/null +++ b/src/generated/resources/data/malum/tags/item/soulwoven_banners.json @@ -0,0 +1,3 @@ +{ + "values": [] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/soulwoven_pouch_autocollect.json b/src/generated/resources/data/malum/tags/item/soulwoven_pouch_autocollect.json new file mode 100644 index 000000000..4659d726d --- /dev/null +++ b/src/generated/resources/data/malum/tags/item/soulwoven_pouch_autocollect.json @@ -0,0 +1,8 @@ +{ + "values": [ + "#malum:spirits", + "#malum:mob_drops", + "#malum:materials", + "#malum:minerals" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/malum/tags/item/spirit.json b/src/generated/resources/data/malum/tags/item/spirits.json similarity index 100% rename from src/generated/resources/data/malum/tags/item/spirit.json rename to src/generated/resources/data/malum/tags/item/spirits.json diff --git a/src/main/java/com/sammy/malum/client/renderer/block/RitualPlinthRenderer.java b/src/main/java/com/sammy/malum/client/renderer/block/RitualPlinthRenderer.java index 47e883f7c..18bc1bfa8 100644 --- a/src/main/java/com/sammy/malum/client/renderer/block/RitualPlinthRenderer.java +++ b/src/main/java/com/sammy/malum/client/renderer/block/RitualPlinthRenderer.java @@ -73,7 +73,6 @@ public void render(RitualPlinthBlockEntity blockEntityIn, float partialTicks, Po poseStack.pushPose(); poseStack.translate(offset.x, offset.y, offset.z); poseStack.mulPose(Minecraft.getInstance().getEntityRenderDispatcher().cameraOrientation()); - poseStack.mulPose(Axis.YP.rotationDegrees(180f)); worldVFXBuilder.setRenderType(icon).renderQuad(poseStack, scale); if (hasDecor) { worldVFXBuilder.setRenderType(decorGlow).renderQuad(poseStack, scale*2.5f); diff --git a/src/main/java/com/sammy/malum/client/renderer/entity/ThrownConcentratedGluttonyRenderer.java b/src/main/java/com/sammy/malum/client/renderer/entity/ThrownConcentratedGluttonyRenderer.java index e21b171a2..109f5857e 100644 --- a/src/main/java/com/sammy/malum/client/renderer/entity/ThrownConcentratedGluttonyRenderer.java +++ b/src/main/java/com/sammy/malum/client/renderer/entity/ThrownConcentratedGluttonyRenderer.java @@ -54,7 +54,6 @@ public void render(ThrownConcentratedGluttony entity, float entityYaw, float par poseStack.pushPose(); poseStack.scale(this.scale, this.scale, this.scale); poseStack.mulPose(this.entityRenderDispatcher.cameraOrientation()); - poseStack.mulPose(Axis.YP.rotationDegrees(180.0F)); this.itemRenderer.renderStatic(entity.getItem(), ItemDisplayContext.GROUND, packedLightIn, OverlayTexture.NO_OVERLAY, poseStack, RenderHandler.DELAYED_RENDER.getTarget(), entity.level(), entity.getId()); poseStack.popPose(); } diff --git a/src/main/java/com/sammy/malum/client/screen/codex/entries/ArtificeEntries.java b/src/main/java/com/sammy/malum/client/screen/codex/entries/ArtificeEntries.java index 8a9e108df..2885f31a8 100644 --- a/src/main/java/com/sammy/malum/client/screen/codex/entries/ArtificeEntries.java +++ b/src/main/java/com/sammy/malum/client/screen/codex/entries/ArtificeEntries.java @@ -64,14 +64,20 @@ public static void setupEntries(ArcanaProgressionScreen screen) { .addPage(new TextPage("soulwoven_silk.soulwoven_banner.1")) .addPage(new CraftingPage(new ItemStack(SOULWOVEN_BANNER.get(), 2), EMPTY, RUNEWOOD_PLANKS.get(), EMPTY, EMPTY, SOULWOVEN_SILK.get(), EMPTY, EMPTY, SOULWOVEN_SILK.get())) .addPage(new CyclingPage( - SpiritInfusionPage.fromOutput(SOULWOVEN_BANNER_HORNS.get()), - SpiritInfusionPage.fromOutput(SOULWOVEN_BANNER_SIGIL.get()), - SpiritInfusionPage.fromOutput(SOULWOVEN_BANNER_BREEZE.get()), - SpiritInfusionPage.fromOutput(SOULWOVEN_BANNER_FRACTAL.get()) + new CraftingPage(SOULWOVEN_BANNER_HORNS.get(), SOULWOVEN_BANNER.get(), GRIM_TALC.get()), + new CraftingPage(SOULWOVEN_BANNER_SIGIL.get(), SOULWOVEN_BANNER.get(), SOUL_STAINED_STEEL_PLATING.get()), + new CraftingPage(SOULWOVEN_BANNER_BREEZE.get(), SOULWOVEN_BANNER.get(), WIND_CHARGE), + new CraftingPage(SOULWOVEN_BANNER_FRACTAL.get(), SOULWOVEN_BANNER.get(), EMERALD) )) ); - screen.addEntry("something1", 5, 6, b -> {}); + screen.addEntry("soulwoven_pouch", 5, 6, b -> b + .configureWidget(w -> w.setIcon(SOULWOVEN_POUCH)) + .addPage(new HeadlineTextPage("soulwoven_pouch", "soulwoven_pouch.1")) + .addPage(new CraftingPage(new ItemStack(SOULWOVEN_POUCH.get(), 2), EMPTY, STRING, EMPTY, EMPTY, SOULWOVEN_SILK.get())) + ); + + screen.addEntry("soulhunter_armor", 6, 6, b -> b .configureWidget(w -> w.setIcon(SOUL_HUNTER_CLOAK)) .addPage(new HeadlineTextPage("soulhunter_armor", "soulhunter_armor.1")) diff --git a/src/main/java/com/sammy/malum/client/screen/codex/entries/IntroductionEntries.java b/src/main/java/com/sammy/malum/client/screen/codex/entries/IntroductionEntries.java index 9cd3503c9..342f43d93 100644 --- a/src/main/java/com/sammy/malum/client/screen/codex/entries/IntroductionEntries.java +++ b/src/main/java/com/sammy/malum/client/screen/codex/entries/IntroductionEntries.java @@ -90,11 +90,11 @@ public static void setupEntries(ArcanaProgressionScreen screen) { ); screen.addEntry("brilliance", -3, 1, b -> b - .configureWidget(w -> w.setIcon(CLUSTER_OF_BRILLIANCE).setStyle(BookWidgetStyle.SMALL_RUNEWOOD)) - .addPage(new HeadlineTextItemPage("brilliance", "brilliance.1", CLUSTER_OF_BRILLIANCE.get())) + .configureWidget(w -> w.setIcon(RAW_BRILLIANCE).setStyle(BookWidgetStyle.SMALL_RUNEWOOD)) + .addPage(new HeadlineTextItemPage("brilliance", "brilliance.1", RAW_BRILLIANCE.get())) .addPage(new TextPage("brilliance.2")) - .addPage(CraftingPage.fullPage(BLOCK_OF_BRILLIANCE.get(), CLUSTER_OF_BRILLIANCE.get())) - .addPage(new SmeltingPage(new ItemStack(CLUSTER_OF_BRILLIANCE.get()), new ItemStack(CHUNK_OF_BRILLIANCE.get(), 2))) + .addPage(CraftingPage.fullPage(BLOCK_OF_BRILLIANCE.get(), RAW_BRILLIANCE.get())) + .addPage(new SmeltingPage(new ItemStack(RAW_BRILLIANCE.get()), new ItemStack(REFINED_BRILLIANCE.get(), 2))) .addReference(new EntryReference(UMBRAL_SPIRIT, soulstoneAndBrillianceReexamination)) ); diff --git a/src/main/java/com/sammy/malum/client/screen/tooltip/ClientSoulwovenPouchTooltip.java b/src/main/java/com/sammy/malum/client/screen/tooltip/ClientSoulwovenPouchTooltip.java new file mode 100644 index 000000000..a3d354ac3 --- /dev/null +++ b/src/main/java/com/sammy/malum/client/screen/tooltip/ClientSoulwovenPouchTooltip.java @@ -0,0 +1,96 @@ +package com.sammy.malum.client.screen.tooltip; + +import com.sammy.malum.common.data_components.*; +import net.minecraft.client.gui.*; +import net.minecraft.client.gui.screens.inventory.*; +import net.minecraft.client.gui.screens.inventory.tooltip.*; +import net.minecraft.resources.*; +import net.minecraft.world.item.*; +import net.neoforged.api.distmarker.*; +import org.apache.commons.lang3.math.*; + +public class ClientSoulwovenPouchTooltip implements ClientTooltipComponent { + private static final ResourceLocation BACKGROUND_SPRITE = ResourceLocation.withDefaultNamespace("container/bundle/background"); + private final SoulwovenPouchContents contents; + + public ClientSoulwovenPouchTooltip(SoulwovenPouchContents contents) { + this.contents = contents; + } + + @Override + public int getHeight() { + return this.backgroundHeight() + 4; + } + + @Override + public int getWidth(Font font) { + return this.backgroundWidth(); + } + + private int backgroundWidth() { + return this.gridSizeX() * 18 + 2; + } + + private int backgroundHeight() { + return this.gridSizeY() * 20 + 2; + } + + @Override + public void renderImage(Font font, int x, int y, GuiGraphics guiGraphics) { + int i = this.gridSizeX(); + int j = this.gridSizeY(); + guiGraphics.blitSprite(BACKGROUND_SPRITE, x, y, this.backgroundWidth(), this.backgroundHeight()); + boolean flag = this.contents.weight().compareTo(Fraction.ONE) >= 0; + int k = 0; + + for (int l = 0; l < j; l++) { + for (int i1 = 0; i1 < i; i1++) { + int j1 = x + i1 * 18 + 1; + int k1 = y + l * 20 + 1; + this.renderSlot(j1, k1, k++, flag, guiGraphics, font); + } + } + } + + private void renderSlot(int x, int y, int itemIndex, boolean isBundleFull, GuiGraphics guiGraphics, Font font) { + if (itemIndex >= this.contents.size()) { + this.blit(guiGraphics, x, y, isBundleFull ? ClientSoulwovenPouchTooltip.Texture.BLOCKED_SLOT : ClientSoulwovenPouchTooltip.Texture.SLOT); + } else { + ItemStack itemstack = this.contents.getItemUnsafe(itemIndex); + this.blit(guiGraphics, x, y, ClientSoulwovenPouchTooltip.Texture.SLOT); + guiGraphics.renderItem(itemstack, x + 1, y + 1, itemIndex); + guiGraphics.renderItemDecorations(font, itemstack, x + 1, y + 1); + if (itemIndex == 0) { + AbstractContainerScreen.renderSlotHighlight(guiGraphics, x + 1, y + 1, 0); + } + } + } + + private void blit(GuiGraphics guiGraphics, int x, int y, ClientSoulwovenPouchTooltip.Texture texture) { + guiGraphics.blitSprite(texture.sprite, x, y, 0, texture.w, texture.h); + } + + private int gridSizeX() { + return Math.max(2, (int) Math.ceil(Math.sqrt((double) this.contents.size() + 1.0))); + } + + private int gridSizeY() { + return (int) Math.ceil(((double) this.contents.size() + 1.0) / (double) this.gridSizeX()); + } + + @OnlyIn(Dist.CLIENT) + enum Texture { + BLOCKED_SLOT(ResourceLocation.withDefaultNamespace("container/bundle/blocked_slot"), 18, 20), + SLOT(ResourceLocation.withDefaultNamespace("container/bundle/slot"), 18, 20); + + public final ResourceLocation sprite; + public final int w; + public final int h; + + Texture(ResourceLocation sprite, int w, int h) { + this.sprite = sprite; + this.w = w; + this.h = h; + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/repair_pylon/RepairPylonCoreBlockEntity.java b/src/main/java/com/sammy/malum/common/block/curiosities/repair_pylon/RepairPylonCoreBlockEntity.java index 609d2641c..f72cd85df 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/repair_pylon/RepairPylonCoreBlockEntity.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/repair_pylon/RepairPylonCoreBlockEntity.java @@ -204,7 +204,8 @@ public void tick() { if (state.equals(RepairPylonState.COOLDOWN) && timer < 1200) { timer++; } - RepairPylonParticleEffects.passiveRepairPylonParticles(this); + var blockEntity = repairablePosition != null ? Optional.ofNullable(level.getBlockEntity(repairablePosition)).map(b -> b instanceof IMalumSpecialItemAccessPoint accessPoint ? accessPoint : null).orElse(null) : null; + RepairPylonParticleEffects.passiveRepairPylonParticles(this, blockEntity); } else { if (!state.equals(RepairPylonState.IDLE) && !state.equals(RepairPylonState.COOLDOWN)) { diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/ritual_plinth/RitualPlinthBlockEntity.java b/src/main/java/com/sammy/malum/common/block/curiosities/ritual_plinth/RitualPlinthBlockEntity.java index 14703e0cc..de337ab7d 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/ritual_plinth/RitualPlinthBlockEntity.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/ritual_plinth/RitualPlinthBlockEntity.java @@ -96,7 +96,7 @@ protected void saveAdditional(CompoundTag compound, HolderLookup.Provider pRegis compound.putFloat("activeDuration", activeDuration); } if (ritualType != null) { - compound.putString("ritualType", ritualType.identifier.toString()); + compound.putString("ritualType", ritualType.id.toString()); } inventory.save(pRegistries, compound); extrasInventory.save(pRegistries, compound, "extrasInventory"); @@ -121,8 +121,8 @@ public void onBreak(@Nullable Player player) { inventory.dumpItems(level, worldPosition); extrasInventory.dumpItems(level, worldPosition); if (ritualType != null && ritualTier != null) { - ItemStack shard = new ItemStack(ItemRegistry.RITUAL_SHARD.get()); - shard.set(DataComponentRegistry.RITUAL_SHARD_PROPS, ritualType.createShardProps(ritualTier)); + var shard = new ItemStack(ItemRegistry.RITUAL_SHARD.get()); + shard.set(DataComponentRegistry.RITUAL_DATA, ritualType.createDataComponent(ritualTier)); level.addFreshEntity(new ItemEntity(level, worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), shard)); } } @@ -130,16 +130,17 @@ public void onBreak(@Nullable Player player) { @Override public ItemInteractionResult onUseWithItem(Player player, ItemStack stack, InteractionHand hand) { if (ritualType != null) { - ItemInteractionResult interactionResult = ritualType.onUsePlinth(this, player, hand); - if (!interactionResult.equals(ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION)) { - return interactionResult; + var result = ritualType.onUsePlinth(this, player, hand); + if (!result.equals(ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION)) { + return result; } } else if (inventory.getStackInSlot(0).isEmpty() && extrasInventory.isEmpty()) { - if (stack.getItem() instanceof RitualShardItem) { + var ritualData = stack.get(DataComponentRegistry.RITUAL_DATA); + if (ritualData != null) { if (!level.isClientSide) { - ritualType = RitualShardItem.getRitualType(stack); - ritualTier = RitualShardItem.getRitualTier(stack); + ritualType = ritualData.ritualType(); + ritualTier = ritualData.ritualTier(); spiritAmount = ritualTier.spiritThreshold; setupComplete = true; ParticleEffectTypeRegistry.RITUAL_PLINTH_BEGINS_CHARGING.createPositionedEffect((ServerLevel) level, new PositionEffectData(worldPosition), new ColorEffectData(ritualType.spirit)); diff --git a/src/main/java/com/sammy/malum/common/block/nature/iGradientedLeavesBlock.java b/src/main/java/com/sammy/malum/common/block/nature/IGradientedLeavesBlock.java similarity index 74% rename from src/main/java/com/sammy/malum/common/block/nature/iGradientedLeavesBlock.java rename to src/main/java/com/sammy/malum/common/block/nature/IGradientedLeavesBlock.java index 52925d1ea..17e121088 100644 --- a/src/main/java/com/sammy/malum/common/block/nature/iGradientedLeavesBlock.java +++ b/src/main/java/com/sammy/malum/common/block/nature/IGradientedLeavesBlock.java @@ -2,7 +2,7 @@ import java.awt.*; -public interface iGradientedLeavesBlock { +public interface IGradientedLeavesBlock { Color getMaxColor(); diff --git a/src/main/java/com/sammy/malum/common/block/nature/MalumHangingLeavesBlock.java b/src/main/java/com/sammy/malum/common/block/nature/MalumHangingLeavesBlock.java index 268f61cb8..e6b0e01d6 100644 --- a/src/main/java/com/sammy/malum/common/block/nature/MalumHangingLeavesBlock.java +++ b/src/main/java/com/sammy/malum/common/block/nature/MalumHangingLeavesBlock.java @@ -18,7 +18,7 @@ import static com.sammy.malum.MalumMod.RANDOM; -public class MalumHangingLeavesBlock extends Block implements SimpleWaterloggedBlock, iGradientedLeavesBlock { +public class MalumHangingLeavesBlock extends Block implements SimpleWaterloggedBlock, IGradientedLeavesBlock { protected static final VoxelShape SHAPE = Block.box(3.0D, 3.0D, 3.0D, 13.0D, 16.0D, 13.0D); diff --git a/src/main/java/com/sammy/malum/common/block/nature/MalumLeavesBlock.java b/src/main/java/com/sammy/malum/common/block/nature/MalumLeavesBlock.java index 39476f423..de6ab0410 100644 --- a/src/main/java/com/sammy/malum/common/block/nature/MalumLeavesBlock.java +++ b/src/main/java/com/sammy/malum/common/block/nature/MalumLeavesBlock.java @@ -20,7 +20,7 @@ import static com.sammy.malum.MalumMod.RANDOM; -public class MalumLeavesBlock extends LeavesBlock implements iGradientedLeavesBlock { +public class MalumLeavesBlock extends LeavesBlock implements IGradientedLeavesBlock { public static final IntegerProperty COLOR = IntegerProperty.create("color", 0, 4); public final Color maxColor; diff --git a/src/main/java/com/sammy/malum/common/block/storage/jar/SpiritJarBlockEntity.java b/src/main/java/com/sammy/malum/common/block/storage/jar/SpiritJarBlockEntity.java index 3479667bb..f5cd3dac4 100644 --- a/src/main/java/com/sammy/malum/common/block/storage/jar/SpiritJarBlockEntity.java +++ b/src/main/java/com/sammy/malum/common/block/storage/jar/SpiritJarBlockEntity.java @@ -1,6 +1,6 @@ package com.sammy.malum.common.block.storage.jar; -import com.sammy.malum.common.item.curiosities.SpiritPouchItem; +import com.sammy.malum.common.item.curiosities.SoulwovenPouchItem; import com.sammy.malum.common.item.spirit.SpiritJarItem; import com.sammy.malum.common.item.spirit.SpiritShardItem; import com.sammy.malum.common.packets.CodecUtil; @@ -181,7 +181,7 @@ public int insertAllSpirits(Player player) { public int insertFromStack(ItemStack stack) { int inserted = 0; - if (stack.getItem() instanceof SpiritPouchItem) { + if (stack.getItem() instanceof SoulwovenPouchItem) { if (type != null) { // ItemInventory inventory = SpiritPouchItem.getInventory(stack); // for (int i = 0; i < inventory.getContainerSize(); i++) { diff --git a/src/main/java/com/sammy/malum/common/data_components/CatalystFlingerState.java b/src/main/java/com/sammy/malum/common/data_components/CatalystFlingerState.java new file mode 100644 index 000000000..9ecb037c5 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/data_components/CatalystFlingerState.java @@ -0,0 +1,23 @@ +package com.sammy.malum.common.data_components; + +import com.mojang.serialization.*; +import com.mojang.serialization.codecs.*; +import io.netty.buffer.*; +import net.minecraft.network.codec.*; +import net.minecraft.util.*; + +public record CatalystFlingerState(int timer, int state, int stashedState) { + + public CatalystFlingerState() { + this(0, 0, 0); + } + + public static Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + ExtraCodecs.NON_NEGATIVE_INT.fieldOf("timer").forGetter(CatalystFlingerState::timer), + ExtraCodecs.NON_NEGATIVE_INT.fieldOf("state").forGetter(CatalystFlingerState::state), + ExtraCodecs.NON_NEGATIVE_INT.fieldOf("stashed_state").forGetter(CatalystFlingerState::stashedState) + ).apply(instance, CatalystFlingerState::new)); + + public static StreamCodec STREAM_CODEC = ByteBufCodecs.fromCodec(CatalystFlingerState.CODEC); + +} diff --git a/src/main/java/com/sammy/malum/common/data_components/RitualData.java b/src/main/java/com/sammy/malum/common/data_components/RitualData.java new file mode 100644 index 000000000..dc77ae047 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/data_components/RitualData.java @@ -0,0 +1,16 @@ +package com.sammy.malum.common.data_components; + +import com.mojang.serialization.*; +import com.mojang.serialization.codecs.*; +import com.sammy.malum.core.systems.ritual.*; +import io.netty.buffer.*; +import net.minecraft.network.codec.*; + +public record RitualData(MalumRitualType ritualType, MalumRitualTier ritualTier) { + public static Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + MalumRitualType.CODEC.fieldOf("type").forGetter(RitualData::ritualType), + MalumRitualTier.CODEC.fieldOf("tier").forGetter(RitualData::ritualTier) + ).apply(instance, RitualData::new)); + + public static StreamCodec STREAM_CODEC = ByteBufCodecs.fromCodec(RitualData.CODEC); +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/data_components/SoulwovenPouchContents.java b/src/main/java/com/sammy/malum/common/data_components/SoulwovenPouchContents.java new file mode 100644 index 000000000..6acea677b --- /dev/null +++ b/src/main/java/com/sammy/malum/common/data_components/SoulwovenPouchContents.java @@ -0,0 +1,188 @@ +package com.sammy.malum.common.data_components; + +import com.google.common.collect.*; +import com.mojang.serialization.*; +import com.sammy.malum.registry.common.item.*; +import net.minecraft.client.gui.screens.inventory.tooltip.*; +import net.minecraft.network.*; +import net.minecraft.network.codec.*; +import net.minecraft.world.entity.player.*; +import net.minecraft.world.inventory.*; +import net.minecraft.world.inventory.tooltip.*; +import net.minecraft.world.item.*; +import net.minecraft.world.item.component.*; +import org.apache.commons.lang3.math.*; + +import javax.annotation.*; +import java.util.*; +import java.util.stream.*; + +public final class SoulwovenPouchContents implements TooltipComponent { + + public static final SoulwovenPouchContents EMPTY = new SoulwovenPouchContents(List.of()); + public static final Codec CODEC = ItemStack.CODEC.listOf().xmap(SoulwovenPouchContents::new, + contents -> contents.items); + public static final StreamCodec STREAM_CODEC = ItemStack.STREAM_CODEC + .apply(ByteBufCodecs.list()) + .map(SoulwovenPouchContents::new, contents -> contents.items); + + private static final Fraction BUNDLE_IN_BUNDLE_WEIGHT = Fraction.getFraction(1, 16); + final List items; + final Fraction weight; + + SoulwovenPouchContents(List items, Fraction weight) { + this.items = items; + this.weight = weight; + } + + public SoulwovenPouchContents(List items) { + this(items, computeContentWeight(items)); + } + + private static Fraction computeContentWeight(List content) { + var fraction = Fraction.ZERO; + + for (ItemStack itemstack : content) { + fraction = fraction.add(getWeight(itemstack).multiplyBy(Fraction.getFraction(itemstack.getCount(), 1))); + } + + return fraction; + } + + static Fraction getWeight(ItemStack stack) { + var contents = stack.get(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS); + if (contents != null) { + return BUNDLE_IN_BUNDLE_WEIGHT.add(contents.weight()); + } else { + int weightMultiplier = stack.is(ItemTagRegistry.SOULHUNTERS_TREASURE) ? 8 : 1; + return Fraction.getFraction(1, stack.getMaxStackSize()*weightMultiplier); + } + } + + public ItemStack getItemUnsafe(int index) { + return this.items.get(index); + } + + public Stream itemCopyStream() { + return this.items.stream().map(ItemStack::copy); + } + + public Iterable items() { + return this.items; + } + + public Iterable itemsCopy() { + return Lists.transform(this.items, ItemStack::copy); + } + + public int size() { + return this.items.size(); + } + + public Fraction weight() { + return this.weight; + } + + public boolean isEmpty() { + return this.items.isEmpty(); + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } else { + return other instanceof SoulwovenPouchContents otherContents && this.weight.equals(otherContents.weight) && ItemStack.listMatches(this.items, otherContents.items); + } + } + + @Override + public int hashCode() { + return ItemStack.hashStackList(this.items); + } + + @Override + public String toString() { + return "BundleContents" + this.items; + } + public static class Mutable { + private final List items; + private Fraction weight; + + public Mutable(SoulwovenPouchContents contents) { + this.items = new ArrayList<>(contents.items); + this.weight = contents.weight; + } + + public SoulwovenPouchContents.Mutable clearItems() { + this.items.clear(); + this.weight = Fraction.ZERO; + return this; + } + + private int findStackIndex(ItemStack stack) { + if (stack.isStackable()) { + for (int i = 0; i < this.items.size(); i++) { + if (ItemStack.isSameItemSameComponents(this.items.get(i), stack)) { + return i; + } + } + } + return -1; + } + + private int getMaxAmountToAdd(ItemStack stack) { + Fraction fraction = Fraction.ONE.subtract(this.weight); + return Math.max(fraction.divideBy(SoulwovenPouchContents.getWeight(stack)).intValue(), 0); + } + + public int tryInsert(ItemStack stack) { + if (!stack.isEmpty() && stack.getItem().canFitInsideContainerItems()) { + int i = Math.min(stack.getCount(), this.getMaxAmountToAdd(stack)); + if (i == 0) { + return 0; + } else { + this.weight = this.weight.add(SoulwovenPouchContents.getWeight(stack).multiplyBy(Fraction.getFraction(i, 1))); + int j = this.findStackIndex(stack); + if (j != -1) { + var itemstack = this.items.remove(j); + var copy = itemstack.copyWithCount(itemstack.getCount() + i); + stack.shrink(i); + this.items.addFirst(copy); + } else { + this.items.addFirst(stack.split(i)); + } + + return i; + } + } else { + return 0; + } + } + + public int tryTransfer(Slot slot, Player player) { + ItemStack itemstack = slot.getItem(); + int i = this.getMaxAmountToAdd(itemstack); + return this.tryInsert(slot.safeTake(itemstack.getCount(), i, player)); + } + + @Nullable + public ItemStack removeOne() { + if (this.items.isEmpty()) { + return null; + } else { + ItemStack itemstack = this.items.removeFirst().copy(); + this.weight = this.weight.subtract(SoulwovenPouchContents.getWeight(itemstack).multiplyBy(Fraction.getFraction(itemstack.getCount(), 1))); + return itemstack; + } + } + + public Fraction weight() { + return this.weight; + } + + public SoulwovenPouchContents toImmutable() { + return new SoulwovenPouchContents(List.copyOf(this.items), this.weight); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/effect/AscensionEffect.java b/src/main/java/com/sammy/malum/common/effect/AscensionEffect.java index a153db2e2..484cb8fdc 100644 --- a/src/main/java/com/sammy/malum/common/effect/AscensionEffect.java +++ b/src/main/java/com/sammy/malum/common/effect/AscensionEffect.java @@ -11,7 +11,7 @@ public class AscensionEffect extends MobEffect { public AscensionEffect() { super(MobEffectCategory.BENEFICIAL, ColorHelper.getColor(SpiritTypeRegistry.AERIAL_SPIRIT.getPrimaryColor())); - addAttributeModifier(Attributes.GRAVITY, MalumMod.malumPath("ascension_lower_gravity"), -0.10f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); + addAttributeModifier(Attributes.GRAVITY, MalumMod.malumPath("ascension"), -0.10f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); } public static void onEntityFall(LivingFallEvent event) { diff --git a/src/main/java/com/sammy/malum/common/effect/GluttonyEffect.java b/src/main/java/com/sammy/malum/common/effect/GluttonyEffect.java index 6cd99e345..f05dcc65d 100644 --- a/src/main/java/com/sammy/malum/common/effect/GluttonyEffect.java +++ b/src/main/java/com/sammy/malum/common/effect/GluttonyEffect.java @@ -19,7 +19,7 @@ public class GluttonyEffect extends MobEffect { public GluttonyEffect() { super(MobEffectCategory.BENEFICIAL, ColorHelper.getColor(88, 86, 60)); - addAttributeModifier(LodestoneAttributes.MAGIC_PROFICIENCY, MalumMod.malumPath("gluttony_magic_multiplier"), 0.1f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); + addAttributeModifier(LodestoneAttributes.MAGIC_PROFICIENCY, MalumMod.malumPath("gluttony"), 0.1f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); IronsSpellsCompat.addGluttonySpellPower(this); } diff --git a/src/main/java/com/sammy/malum/common/effect/RejectedEffect.java b/src/main/java/com/sammy/malum/common/effect/RejectedEffect.java index bf1112f33..89ed5c211 100644 --- a/src/main/java/com/sammy/malum/common/effect/RejectedEffect.java +++ b/src/main/java/com/sammy/malum/common/effect/RejectedEffect.java @@ -13,7 +13,7 @@ public class RejectedEffect extends MobEffect { public RejectedEffect() { super(MobEffectCategory.NEUTRAL, ColorHelper.getColor(20, 14, 22)); - addAttributeModifier(Attributes.MOVEMENT_SPEED, MalumMod.malumPath("rejection"), -0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); + addAttributeModifier(Attributes.MOVEMENT_SPEED, MalumMod.malumPath("rejected"), -0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); } @Override diff --git a/src/main/java/com/sammy/malum/common/effect/aura/AqueousAura.java b/src/main/java/com/sammy/malum/common/effect/aura/AqueousAura.java index 495e70ac1..22a977c91 100644 --- a/src/main/java/com/sammy/malum/common/effect/aura/AqueousAura.java +++ b/src/main/java/com/sammy/malum/common/effect/aura/AqueousAura.java @@ -3,6 +3,7 @@ import com.sammy.malum.*; import com.sammy.malum.registry.common.MobEffectRegistry; import com.sammy.malum.registry.common.SpiritTypeRegistry; +import net.minecraft.resources.*; import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectCategory; import net.minecraft.world.effect.MobEffectInstance; @@ -14,8 +15,9 @@ public class AqueousAura extends MobEffect { public AqueousAura() { super(MobEffectCategory.BENEFICIAL, ColorHelper.getColor(SpiritTypeRegistry.AQUEOUS_SPIRIT.getPrimaryColor())); - addAttributeModifier(Attributes.BLOCK_INTERACTION_RANGE, MalumMod.malumPath("aqueous_aura_block_range"), 1f, AttributeModifier.Operation.ADD_VALUE); - addAttributeModifier(Attributes.ENTITY_INTERACTION_RANGE, MalumMod.malumPath("aqueous_aura_entity_range"), 1f, AttributeModifier.Operation.ADD_VALUE); + var id = MalumMod.malumPath("aqueous_aura"); + addAttributeModifier(Attributes.BLOCK_INTERACTION_RANGE, id, 1f, AttributeModifier.Operation.ADD_VALUE); + addAttributeModifier(Attributes.ENTITY_INTERACTION_RANGE, id, 1f, AttributeModifier.Operation.ADD_VALUE); } public static AABB growBoundingBox(Player player, AABB original) { diff --git a/src/main/java/com/sammy/malum/common/entity/thrown/ThrownConcentratedGluttony.java b/src/main/java/com/sammy/malum/common/entity/thrown/ThrownConcentratedGluttony.java index dc5fd34c2..df1dde171 100644 --- a/src/main/java/com/sammy/malum/common/entity/thrown/ThrownConcentratedGluttony.java +++ b/src/main/java/com/sammy/malum/common/entity/thrown/ThrownConcentratedGluttony.java @@ -126,6 +126,7 @@ protected void onHit(HitResult pResult) { var impactedEntity = pResult instanceof EntityHitResult entityHitResult ? entityHitResult.getEntity() : null; getEntityData().set(DATA_FADING_AWAY, true); setDeltaMovement(getDeltaMovement().scale(0.05f)); + setNoGravity(true); level.levelEvent(2002, blockPosition(), MobEffectRegistry.GLUTTONY.get().getColor()); level.playSound(null, blockPosition(), SoundRegistry.CONCENTRATED_GLUTTONY_DRINK.get(), SoundSource.PLAYERS, 0.5f, 1.25f + level.random.nextFloat() * 0.25f); ParticleEffectTypeRegistry.THROWN_GLUTTONY_IMPACT.createPositionedEffect(level, new PositionEffectData(position())); diff --git a/src/main/java/com/sammy/malum/common/item/SoulwovenBannerItem.java b/src/main/java/com/sammy/malum/common/item/SoulwovenBannerItem.java new file mode 100644 index 000000000..124f2af24 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/SoulwovenBannerItem.java @@ -0,0 +1,10 @@ +package com.sammy.malum.common.item; + +import net.minecraft.world.item.*; +import net.minecraft.world.level.block.*; + +public class SoulwovenBannerItem extends BlockItem { + public SoulwovenBannerItem(Block block, Properties properties) { + super(block, properties); + } +} diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/CatalystFlingerItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/CatalystLobberItem.java similarity index 64% rename from src/main/java/com/sammy/malum/common/item/curiosities/CatalystFlingerItem.java rename to src/main/java/com/sammy/malum/common/item/curiosities/CatalystLobberItem.java index dd9ca92f9..005b039c4 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/CatalystFlingerItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/CatalystLobberItem.java @@ -1,44 +1,34 @@ package com.sammy.malum.common.item.curiosities; -import com.mojang.serialization.*; -import com.mojang.serialization.codecs.*; +import com.sammy.malum.common.data_components.*; import com.sammy.malum.common.entity.nitrate.*; import com.sammy.malum.registry.common.*; import com.sammy.malum.registry.common.item.*; import net.minecraft.sounds.*; import net.minecraft.stats.*; -import net.minecraft.util.*; import net.minecraft.world.*; import net.minecraft.world.entity.*; import net.minecraft.world.entity.player.*; import net.minecraft.world.item.*; import net.minecraft.world.level.*; -import net.minecraft.world.phys.*; import java.util.function.*; -public class CatalystFlingerItem extends Item { - - public record FlingerData(int timer, int state, int stashedState) { - - public FlingerData() { - this(0, 0, 0); - } - - public static Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( - ExtraCodecs.NON_NEGATIVE_INT.fieldOf("malum:timer").forGetter(FlingerData::timer), - ExtraCodecs.NON_NEGATIVE_INT.fieldOf("malum:state").forGetter(FlingerData::state), - ExtraCodecs.NON_NEGATIVE_INT.fieldOf("malum:stashed_state").forGetter(FlingerData::stashedState) - ).apply(instance, FlingerData::new)); - - } +public class CatalystLobberItem extends Item { public final Function entitySupplier; - public CatalystFlingerItem(Properties pProperties, Function entitySupplier) { + public CatalystLobberItem(Properties pProperties, Function entitySupplier) { super(pProperties); this.entitySupplier = entitySupplier; } + public static int getStateDisplay(ItemStack stack) { + var data = stack.get(DataComponentRegistry.CATALYST_LOBBER_STATE); + if (data == null) { + return -1; + } + return data.state(); + } @Override public boolean isValidRepairItem(ItemStack stack, ItemStack repairCandidate) { return repairCandidate.getItem().equals(ItemRegistry.MALIGNANT_LEAD.get()) || super.isValidRepairItem(stack, repairCandidate); @@ -46,13 +36,12 @@ public boolean isValidRepairItem(ItemStack stack, ItemStack repairCandidate) { @Override public void inventoryTick(ItemStack pStack, Level pLevel, Entity pEntity, int pSlotId, boolean pIsSelected) { - var stateComponent = DataComponentRegistry.CATALYST_FLINGER_DATA; - if (pStack.has(stateComponent)) { - var data = pStack.get(stateComponent); - int state = data.state; + var data = pStack.get(DataComponentRegistry.CATALYST_LOBBER_STATE); + if (data != null) { + int state = data.state(); if (state != 0) { - int timer = data.timer; - int stashedState = data.stashedState; + int timer = data.timer(); + int stashedState = data.stashedState(); if (!pIsSelected) { timer++; } else if (timer > 0) { @@ -64,7 +53,7 @@ public void inventoryTick(ItemStack pStack, Level pLevel, Entity pEntity, int pS state = 0; pEntity.playSound(SoundRegistry.CATALYST_LOBBER_LOCKED.get(), 1.2f, 0.8f); } - pStack.set(stateComponent, new FlingerData(timer, state, stashedState)); + pStack.set(DataComponentRegistry.CATALYST_LOBBER_STATE, new CatalystFlingerState(timer, state, stashedState)); } } super.inventoryTick(pStack, pLevel, pEntity, pSlotId, pIsSelected); @@ -73,11 +62,10 @@ public void inventoryTick(ItemStack pStack, Level pLevel, Entity pEntity, int pS @Override public InteractionResultHolder use(Level worldIn, Player playerIn, InteractionHand handIn) { ItemStack stack = playerIn.getItemInHand(handIn); - var stateComponent = stack.getOrDefault(DataComponentRegistry.CATALYST_FLINGER_DATA, new FlingerData()); - - int timer = stateComponent.timer(); - int state = stateComponent.state(); - int stashedState = stateComponent.stashedState(); + var component = stack.getOrDefault(DataComponentRegistry.CATALYST_LOBBER_STATE, new CatalystFlingerState()); + int timer = component.timer(); + int state = component.state(); + int stashedState = component.stashedState(); int cooldown = 0; SoundEvent sound; switch (state) { @@ -88,7 +76,7 @@ public InteractionResultHolder use(Level worldIn, Player playerIn, In } case 1 -> { if (!playerIn.isCreative()) { - ItemStack ammo = ItemStack.EMPTY; + var ammo = ItemStack.EMPTY; for (int i = 0; i < playerIn.getInventory().getContainerSize(); i++) { ItemStack maybeAmmo = playerIn.getInventory().getItem(i); if (maybeAmmo.getItem().equals(ItemRegistry.AURIC_EMBERS.get())) { @@ -107,9 +95,9 @@ public InteractionResultHolder use(Level worldIn, Player playerIn, In } case 2 -> { if (!worldIn.isClientSide) { - AbstractNitrateEntity bombEntity = entitySupplier.apply(playerIn); + var bombEntity = entitySupplier.apply(playerIn); int angle = handIn == InteractionHand.MAIN_HAND ? 225 : 90; - Vec3 pos = playerIn.position().add(playerIn.getLookAngle().scale(0.5)).add(0.5 * Math.sin(Math.toRadians(angle - playerIn.yHeadRot)), playerIn.getBbHeight() * 2 / 3, 0.5 * Math.cos(Math.toRadians(angle - playerIn.yHeadRot))); + var pos = playerIn.position().add(playerIn.getLookAngle().scale(0.5)).add(0.5 * Math.sin(Math.toRadians(angle - playerIn.yHeadRot)), playerIn.getBbHeight() * 2 / 3, 0.5 * Math.cos(Math.toRadians(angle - playerIn.yHeadRot))); float pitch = -10.0F; bombEntity.shootFromRotation(playerIn, playerIn.getXRot(), playerIn.getYRot(), pitch, 1.25F, 0.9F); bombEntity.setPos(pos); @@ -123,11 +111,11 @@ public InteractionResultHolder use(Level worldIn, Player playerIn, In sound = SoundRegistry.CATALYST_LOBBER_FIRED.get(); } default -> { - stack.set(DataComponentRegistry.CATALYST_FLINGER_DATA, new FlingerData()); + stack.set(DataComponentRegistry.CATALYST_LOBBER_STATE, new CatalystFlingerState()); throw new IllegalStateException("Catalyst lobber used with an invalid state."); } } - stack.set(DataComponentRegistry.CATALYST_FLINGER_DATA, new FlingerData(timer, state, stashedState)); + stack.set(DataComponentRegistry.CATALYST_LOBBER_STATE, new CatalystFlingerState(timer, state, stashedState)); if (cooldown != 0) { playerIn.getCooldowns().addCooldown(this, cooldown); } diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/SoulwovenPouchItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/SoulwovenPouchItem.java new file mode 100644 index 000000000..736f81880 --- /dev/null +++ b/src/main/java/com/sammy/malum/common/item/curiosities/SoulwovenPouchItem.java @@ -0,0 +1,178 @@ +package com.sammy.malum.common.item.curiosities; + +import com.sammy.malum.common.data_components.*; +import com.sammy.malum.registry.common.item.*; +import net.minecraft.*; +import net.minecraft.core.component.*; +import net.minecraft.network.chat.*; +import net.minecraft.server.level.*; +import net.minecraft.sounds.*; +import net.minecraft.stats.*; +import net.minecraft.util.*; +import net.minecraft.world.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.item.*; +import net.minecraft.world.entity.player.*; +import net.minecraft.world.inventory.*; +import net.minecraft.world.inventory.tooltip.*; +import net.minecraft.world.item.*; +import net.minecraft.world.level.*; +import org.apache.commons.lang3.math.*; + +import java.util.*; + +public class SoulwovenPouchItem extends Item { + private static final int BAR_COLOR = Mth.color(0.4F, 0.4F, 1.0F); + + public SoulwovenPouchItem(Item.Properties properties) { + super(properties.component(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, SoulwovenPouchContents.EMPTY)); + } + + public static float getFullnessDisplay(ItemStack stack) { + var contents = stack.getOrDefault(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, SoulwovenPouchContents.EMPTY); + return contents.weight().floatValue(); + } + + @Override + public boolean overrideStackedOnOther(ItemStack stack, Slot slot, ClickAction action, Player player) { + if (stack.getCount() != 1 || action != ClickAction.SECONDARY) { + return false; + } else { + var contents = stack.get(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS); + if (contents == null) { + return false; + } else { + var itemstack = slot.getItem(); + var mutable = new SoulwovenPouchContents.Mutable(contents); + if (itemstack.isEmpty()) { + this.playRemoveOneSound(player); + var tryRemove = mutable.removeOne(); + if (tryRemove != null) { + var removed = slot.safeInsert(tryRemove); + mutable.tryInsert(removed); + } + } else if (itemstack.getItem().canFitInsideContainerItems()) { + int i = mutable.tryTransfer(slot, player); + if (i > 0) { + this.playInsertSound(player); + } + } + + stack.set(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, mutable.toImmutable()); + return true; + } + } + } + + @Override + public boolean overrideOtherStackedOnMe(ItemStack stack, ItemStack other, Slot slot, ClickAction action, Player player, SlotAccess access) { + if (stack.getCount() != 1) { + return false; + } + if (action == ClickAction.SECONDARY && slot.allowModification(player)) { + var contents = stack.get(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS); + if (contents == null) { + return false; + } else { + var mutable = new SoulwovenPouchContents.Mutable(contents); + if (other.isEmpty()) { + var removed = mutable.removeOne(); + if (removed != null) { + this.playRemoveOneSound(player); + access.set(removed); + } + } else { + int i = mutable.tryInsert(other); + if (i > 0) { + this.playInsertSound(player); + } + } + + stack.set(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, mutable.toImmutable()); + return true; + } + } else { + return false; + } + } + + @Override + public InteractionResultHolder use(Level level, Player player, InteractionHand usedHand) { + ItemStack itemstack = player.getItemInHand(usedHand); + if (dropContents(itemstack, player)) { + this.playDropContentsSound(player); + player.awardStat(Stats.ITEM_USED.get(this)); + return InteractionResultHolder.sidedSuccess(itemstack, level.isClientSide()); + } else { + return InteractionResultHolder.fail(itemstack); + } + } + + @Override + public boolean isBarVisible(ItemStack stack) { + var contents = stack.getOrDefault(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, SoulwovenPouchContents.EMPTY); + return contents.weight().compareTo(Fraction.ZERO) > 0; + } + + @Override + public int getBarWidth(ItemStack stack) { + var contents = stack.getOrDefault(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, SoulwovenPouchContents.EMPTY); + return Math.min(1 + Mth.mulAndTruncate(contents.weight(), 12), 13); + } + + @Override + public int getBarColor(ItemStack stack) { + return BAR_COLOR; + } + + private static boolean dropContents(ItemStack stack, Player player) { + var contents = stack.get(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS); + if (contents != null && !contents.isEmpty()) { + stack.set(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, SoulwovenPouchContents.EMPTY); + if (player instanceof ServerPlayer) { + contents.itemsCopy().forEach(item -> player.drop(item, true)); + } + + return true; + } else { + return false; + } + } + + @Override + public Optional getTooltipImage(ItemStack stack) { + return !stack.has(DataComponents.HIDE_TOOLTIP) && !stack.has(DataComponents.HIDE_ADDITIONAL_TOOLTIP) + ? Optional.ofNullable(stack.get(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS)) + : Optional.empty(); + } + + @Override + public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { + var contents = stack.get(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS); + if (contents != null) { + int i = Mth.mulAndTruncate(contents.weight(), 512); + tooltipComponents.add(Component.translatable("item.minecraft.bundle.fullness", i, 512).withStyle(ChatFormatting.GRAY)); + } + } + + @Override + public void onDestroyed(ItemEntity itemEntity) { + var contents = itemEntity.getItem().get(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS); + if (contents != null) { + itemEntity.getItem().set(DataComponentRegistry.SOULWOVEN_POUCH_CONTENTS, SoulwovenPouchContents.EMPTY); + ItemUtils.onContainerDestroyed(itemEntity, contents.itemsCopy()); + } + } + + private void playRemoveOneSound(Entity entity) { + entity.playSound(SoundEvents.BUNDLE_REMOVE_ONE, 0.8F, 0.8F + entity.level().getRandom().nextFloat() * 0.4F); + } + + private void playInsertSound(Entity entity) { + entity.playSound(SoundEvents.BUNDLE_INSERT, 0.8F, 0.8F + entity.level().getRandom().nextFloat() * 0.4F); + } + + private void playDropContentsSound(Entity entity) { + entity.playSound(SoundEvents.BUNDLE_DROP_CONTENTS, 0.8F, 0.8F + entity.level().getRandom().nextFloat() * 0.4F); + } +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/SpiritPouchItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/SpiritPouchItem.java deleted file mode 100644 index 8c2d18a72..000000000 --- a/src/main/java/com/sammy/malum/common/item/curiosities/SpiritPouchItem.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.sammy.malum.common.item.curiosities; - -import net.minecraft.world.item.Item; - -public class SpiritPouchItem extends Item { - - public SpiritPouchItem(Properties properties) { - super(properties); - } - -// @Nullable -// @Override -// public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt) { -// return new InventoryCapability(stack); -// } -// -// @Override -// public void onDestroyed(ItemEntity pItemEntity) { -// Iterator iter = new Iterator<>() { -// private int i = 0; -// private final ItemInventory inventory = getInventory(pItemEntity.getItem()); -// -// @Override -// public boolean hasNext() { -// return i < inventory.getContainerSize(); -// } -// -// @Override -// public ItemStack next() { -// return inventory.getItem(i++); -// } -// }; -// -// ItemUtils.onContainerDestroyed(pItemEntity, Stream.iterate(iter.next(), t -> iter.hasNext(), t -> iter.next())); -// } -// -// @Override -// public boolean overrideStackedOnOther(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer) { -// ItemStack stack = pSlot.getItem(); -// -// if (pAction != ClickAction.SECONDARY || !(stack.getItem() instanceof SpiritShardItem)) { -// return false; -// } else { -// ItemInventory inventory = getInventory(pStack); -// -// if (!stack.isEmpty() && stack.getItem().canFitInsideContainerItems()) { -// ItemStack toInsert = pSlot.safeTake(stack.getCount(), Integer.MAX_VALUE, pPlayer); -// ItemStack remainder = inventory.addItem(toInsert); -// pSlot.set(remainder); -// if (remainder.getCount() != toInsert.getCount()) -// pPlayer.playSound(SoundEvents.BUNDLE_INSERT, 0.8F, 0.8F + pPlayer.level().getRandom().nextFloat() * 0.4F); -// } -// -// return true; -// } -// } -// -// @Override -// public boolean overrideOtherStackedOnMe(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) { -// if (pAction != ClickAction.SECONDARY || !pSlot.allowModification(pPlayer) || !(pOther.getItem() instanceof SpiritShardItem)) { -// return false; -// } else { -// ItemInventory inventory = getInventory(pStack); -// -// if (!pOther.isEmpty() && pOther.getItem().canFitInsideContainerItems()) { -// ItemStack remainder = inventory.addItem(pOther.copy()); -// if (pOther.getCount() != remainder.getCount()) -// pPlayer.playSound(SoundEvents.BUNDLE_INSERT, 0.8F, 0.8F + pPlayer.level().getRandom().nextFloat() * 0.4F); -// -// pOther.shrink(pOther.getCount() - remainder.getCount()); -// } -// -// return true; -// } -// } -// -// @Override -// public InteractionResultHolder use(Level level, Player playerIn, InteractionHand handIn) { -// if (!level.isClientSide) { -// ItemStack stack = playerIn.getItemInHand(handIn); -// MenuProvider container = -// new SimpleMenuProvider((w, p, pl) -> new SpiritPouchContainer(w, p, stack), stack.getHoverName()); -// NetworkHooks.openScreen((ServerPlayer) playerIn, container, b -> b.writeItem(stack)); -// playerIn.level().playSound(null, playerIn.getX(), playerIn.getY(), playerIn.getZ(), SoundEvents.ARMOR_EQUIP_LEATHER, SoundSource.PLAYERS, 1, 1); -// } -// return InteractionResultHolder.success(playerIn.getItemInHand(handIn)); -// } -// -// private static class InventoryCapability implements ICapabilityProvider { -// private final LazyOptional opt; -// -// public InventoryCapability(ItemStack stack) { -// opt = LazyOptional.of(() -> new InvWrapper(getInventory(stack))); -// } -// -// @Nonnull -// @Override -// public LazyOptional getCapability(@Nonnull Capability capability, @Nullable Direction facing) { -// return ForgeCapabilities.ITEM_HANDLER.orEmpty(capability, opt); -// } -// } -// -// public static ItemInventory getInventory(ItemStack stack) { -// return new ItemInventory(stack, 27) { -// @Override -// public boolean canPlaceItem(int pIndex, ItemStack pStack) { -// return pStack.getItem() instanceof SpiritShardItem; -// } -// }; -// } -} diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/armor/MalignantStrongholdArmorItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/armor/MalignantStrongholdArmorItem.java index bb586357d..41ec1b4fc 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/armor/MalignantStrongholdArmorItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/armor/MalignantStrongholdArmorItem.java @@ -32,7 +32,7 @@ public MalignantStrongholdArmorItem(Type slot, Properties builder) { @Override public List createExtraAttributes() { var group = EquipmentSlotGroup.bySlot(getEquipmentSlot()); - var resourcelocation = MalumMod.malumPath("armor." + type.getName()); + var resourcelocation = MalumMod.malumPath("malignant_stronghold_armor." + type.getName()); ItemAttributeModifiers.Builder attributes = ItemAttributeModifiers.builder(); attributes.add(AttributeRegistry.MALIGNANT_CONVERSION, new AttributeModifier(resourcelocation, 0.25f, AttributeModifier.Operation.ADD_VALUE), diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulHunterArmorItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulHunterArmorItem.java index 8ea6dde2b..19abf3812 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulHunterArmorItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulHunterArmorItem.java @@ -25,17 +25,17 @@ import java.util.List; import java.util.function.Consumer; -import static com.sammy.malum.registry.common.item.ArmorTiers.SPIRIT_HUNTER; +import static com.sammy.malum.registry.common.item.ArmorTiers.SOUL_HUNTER; public class SoulHunterArmorItem extends MalumArmorItem { public SoulHunterArmorItem(ArmorItem.Type slot, Properties builder) { - super(SPIRIT_HUNTER, slot, builder); + super(SOUL_HUNTER, slot, builder); } @Override public List createExtraAttributes() { var group = EquipmentSlotGroup.bySlot(getEquipmentSlot()); - var resourcelocation = MalumMod.malumPath("armor." + type.getName()); + var resourcelocation = MalumMod.malumPath("soul_hunter_armor." + type.getName()); ItemAttributeModifiers.Builder attributes = ItemAttributeModifiers.builder(); attributes.add(LodestoneAttributes.MAGIC_PROFICIENCY, new AttributeModifier(resourcelocation, 0.15f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE), @@ -50,7 +50,7 @@ public void initializeClient(Consumer consumer) { consumer.accept(new IClientItemExtensions() { @Override public LodestoneArmorModel getHumanoidArmorModel(LivingEntity entity, ItemStack itemStack, EquipmentSlot armorSlot, HumanoidModel _default) { - float pticks = (float)(Minecraft.getInstance().getFrameTimeNs() / 20000000000L); + float pticks = (float) (Minecraft.getInstance().getFrameTimeNs() / 20000000000L); float f = Mth.rotLerp(pticks, entity.yBodyRotO, entity.yBodyRot); float f1 = Mth.rotLerp(pticks, entity.yHeadRotO, entity.yHeadRot); float netHeadYaw = f1 - f; diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulStainedSteelArmorItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulStainedSteelArmorItem.java index 2e7a7e33e..6c0801696 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulStainedSteelArmorItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/armor/SoulStainedSteelArmorItem.java @@ -20,7 +20,7 @@ public SoulStainedSteelArmorItem(ArmorItem.Type slot, Properties builder) { @Override public List createExtraAttributes() { var group = EquipmentSlotGroup.bySlot(getEquipmentSlot()); - var resourcelocation = MalumMod.malumPath("armor." + type.getName()); + var resourcelocation = MalumMod.malumPath("soul_stained_steel_armor." + type.getName()); return List.of( new ItemAttributeModifiers.Entry( AttributeRegistry.SOUL_WARD_CAPACITY, diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedBelt.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedBelt.java index 5e30dfb0e..1da7ae800 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedBelt.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedBelt.java @@ -18,6 +18,6 @@ public CurioGildedBelt(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.ARMOR, - new AttributeModifier(MalumMod.malumPath("curio_armor"), 2f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(MalumMod.malumPath("gilded_belt"), 2f, AttributeModifier.Operation.ADD_VALUE)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedRing.java index 3e6bea8f1..b921f6cfb 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioGildedRing.java @@ -16,6 +16,6 @@ public CurioGildedRing(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { - addAttributeModifier(map, Attributes.ARMOR, new AttributeModifier(MalumMod.malumPath("curio_armor_ring"), 1f, AttributeModifier.Operation.ADD_VALUE)); + addAttributeModifier(map, Attributes.ARMOR, new AttributeModifier(MalumMod.malumPath("gilded_ring"), 1f, AttributeModifier.Operation.ADD_VALUE)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateNecklace.java index 0c00638ca..bfb52cde3 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateNecklace.java @@ -17,6 +17,6 @@ public CurioOrnateNecklace(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.ARMOR_TOUGHNESS, - new AttributeModifier(MalumMod.malumPath("curio_armor_toughness"), 2f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(MalumMod.malumPath("ornate_necklace"), 2f, AttributeModifier.Operation.ADD_VALUE)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateRing.java index a44f5557f..e4b5187e7 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/CurioOrnateRing.java @@ -17,6 +17,6 @@ public CurioOrnateRing(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.ARMOR_TOUGHNESS, - new AttributeModifier(MalumMod.malumPath("curio_armor_toughness_ring"), 1f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(MalumMod.malumPath("ornate_ring"), 1f, AttributeModifier.Operation.ADD_VALUE)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioGlassBrooch.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioGlassBrooch.java index 77e509cd3..0a0495eda 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioGlassBrooch.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/brooches/CurioGlassBrooch.java @@ -11,16 +11,15 @@ public class CurioGlassBrooch extends MalumCurioItem { - public static final ResourceLocation GLASS_BROOCH_RUNE = MalumMod.malumPath("glass_brooch_rune"); - public CurioGlassBrooch(Properties builder) { super(builder, MalumTrinketType.METALLIC); } @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { - CuriosApi.addSlotModifier(map, "rune", GLASS_BROOCH_RUNE, 2, AttributeModifier.Operation.ADD_VALUE); + var id = MalumMod.malumPath("glass_brooch"); + CuriosApi.addSlotModifier(map, "rune", id, 2, AttributeModifier.Operation.ADD_VALUE); addAttributeModifier(map, Attributes.MAX_HEALTH, - new AttributeModifier(MalumMod.malumPath("curio_max_health"), -0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); + new AttributeModifier(id, -0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneBolsteringItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneBolsteringItem.java index f03785880..a906edf62 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneBolsteringItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneBolsteringItem.java @@ -18,6 +18,6 @@ public RuneBolsteringItem(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.MAX_HEALTH, - new AttributeModifier(MalumMod.malumPath("curio_max_health"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); + new AttributeModifier(MalumMod.malumPath("bolstering_rune"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneSpellMasteryItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneSpellMasteryItem.java index f227707b1..b9ef3993c 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneSpellMasteryItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneSpellMasteryItem.java @@ -6,6 +6,7 @@ import com.sammy.malum.compability.irons_spellbooks.IronsSpellsCompat; import com.sammy.malum.registry.common.*; import net.minecraft.core.Holder; +import net.minecraft.resources.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.item.*; import team.lodestar.lodestone.registry.common.*; @@ -19,11 +20,12 @@ public RuneSpellMasteryItem(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { + var id = MalumMod.malumPath("spell_mastery_rune"); addAttributeModifier(map, LodestoneAttributes.MAGIC_PROFICIENCY, - new AttributeModifier(MalumMod.malumPath("curio_magic_proficiency"), 0.15, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + new AttributeModifier(id, 0.15, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); addAttributeModifier(map, AttributeRegistry.RESERVE_STAFF_CHARGES, - new AttributeModifier(MalumMod.malumPath("curio_reserve_staff_charges"), 2f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(id, 2f, AttributeModifier.Operation.ADD_VALUE)); - IronsSpellsCompat.addSpellPowerToCurio(this, map, 0.1f); + IronsSpellsCompat.addSpellPowerToCurio(this, map, id,0.1f); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneToughnessItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneToughnessItem.java index 1d5ec330f..89170c1ef 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneToughnessItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneToughnessItem.java @@ -18,6 +18,6 @@ public RuneToughnessItem(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.ARMOR_TOUGHNESS, - new AttributeModifier(MalumMod.malumPath("curio_armor_toughness"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); + new AttributeModifier(MalumMod.malumPath("toughness_rune"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneUnnaturalStaminaItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneUnnaturalStaminaItem.java index abc23b537..74506923a 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneUnnaturalStaminaItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/madness/RuneUnnaturalStaminaItem.java @@ -32,7 +32,7 @@ public void addExtraTooltipLines(Consumer consumer) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, Attributes.MOVEMENT_SPEED, - new AttributeModifier(MalumMod.malumPath("curio_movement_speed"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); + new AttributeModifier(MalumMod.malumPath("unnatural_stamina_rune"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); } public static boolean forceSprint(LivingEntity livingEntity) { diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneCullingItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneCullingItem.java index 7cfdd1372..b40717c0b 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneCullingItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneCullingItem.java @@ -6,6 +6,7 @@ import com.sammy.malum.compability.irons_spellbooks.IronsSpellsCompat; import com.sammy.malum.registry.common.*; import net.minecraft.core.Holder; +import net.minecraft.resources.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.item.*; import team.lodestar.lodestone.registry.common.*; @@ -19,8 +20,9 @@ public RuneCullingItem(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { - addAttributeModifier(map, LodestoneAttributes.MAGIC_PROFICIENCY, - new AttributeModifier(MalumMod.malumPath("curio_magic_proficiency"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); - IronsSpellsCompat.addSpellPowerToCurio(this, map, 0.2f); + var id = MalumMod.malumPath("rune_of_culling"); + addAttributeModifier(map, AttributeRegistry.SCYTHE_PROFICIENCY, + new AttributeModifier(id, 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + IronsSpellsCompat.addSpellPowerToCurio(this, map, id, 0.2f); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneDexterityItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneDexterityItem.java index fcaf1765f..f2f2c61bf 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneDexterityItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneDexterityItem.java @@ -26,7 +26,7 @@ public class RuneDexterityItem extends AbstractRuneCurioItem { final float maxHealth = living.getMaxHealth(); value = 0.2f * (2 - (health / maxHealth)); } - return new AttributeModifier(MalumMod.malumPath("curio_movement_speed"), value, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); + return new AttributeModifier(MalumMod.malumPath("rune_of_dexterity"), value, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); }; public RuneDexterityItem(Properties builder) { diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneReinforcementItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneReinforcementItem.java index 18af11f65..ce1d08804 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneReinforcementItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/runes/miracle/RuneReinforcementItem.java @@ -5,6 +5,7 @@ import com.sammy.malum.common.item.curiosities.curios.runes.*; import com.sammy.malum.registry.common.*; import net.minecraft.core.Holder; +import net.minecraft.resources.*; import net.minecraft.world.entity.ai.attributes.*; import net.minecraft.world.item.*; import top.theillusivec4.curios.api.*; @@ -17,9 +18,10 @@ public RuneReinforcementItem(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { + var id = MalumMod.malumPath("reinforcement_rune"); addAttributeModifier(map, AttributeRegistry.SOUL_WARD_CAPACITY, - new AttributeModifier(MalumMod.malumPath("curio_soul_ward_capacity"), 6f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(id, 6f, AttributeModifier.Operation.ADD_VALUE)); addAttributeModifier(map, AttributeRegistry.SOUL_WARD_INTEGRITY, - new AttributeModifier(MalumMod.malumPath("curio_soul_ward_integrity"), 0.25, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + new AttributeModifier(id, 0.25, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioNarrowNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioNarrowNecklace.java index 5fd916e06..565dd82b6 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioNarrowNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/misc/CurioNarrowNecklace.java @@ -28,6 +28,6 @@ public void addExtraTooltipLines(Consumer consumer) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, AttributeRegistry.SCYTHE_PROFICIENCY, - new AttributeModifier(MalumMod.malumPath("curio_scythe_proficiency"), 0.5f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + new AttributeModifier(MalumMod.malumPath("narrow_edge_necklace"), 0.5f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); } } diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/soulward/CurioMagebaneBelt.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/soulward/CurioMagebaneBelt.java index acea67547..eef723fc8 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/soulward/CurioMagebaneBelt.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/soulward/CurioMagebaneBelt.java @@ -9,6 +9,7 @@ import com.sammy.malum.registry.common.AttributeRegistry; import net.minecraft.core.Holder; import net.minecraft.network.chat.Component; +import net.minecraft.resources.*; import net.minecraft.world.entity.*; import net.minecraft.world.entity.ai.attributes.Attribute; import net.minecraft.world.entity.ai.attributes.AttributeModifier; @@ -52,9 +53,10 @@ public void soulWardDamageEvent(SoulWardDamageEvent event, LivingEntity wardedEn @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { + final ResourceLocation id = MalumMod.malumPath("magebane_belt"); addAttributeModifier(map, AttributeRegistry.SOUL_WARD_RECOVERY_RATE, - new AttributeModifier(MalumMod.malumPath("curio_soul_ward_recovery_speed"), 0.4f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + new AttributeModifier(id, 0.4f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); addAttributeModifier(map, AttributeRegistry.SOUL_WARD_CAPACITY, - new AttributeModifier(MalumMod.malumPath("curio_soul_ward_capacity"), 6f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(id, 6f, AttributeModifier.Operation.ADD_VALUE)); } } diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioArcaneSpoilRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioArcaneSpoilRing.java index 62dc75f22..396f40df6 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioArcaneSpoilRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioArcaneSpoilRing.java @@ -19,6 +19,6 @@ public CurioArcaneSpoilRing(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, AttributeRegistry.SPIRIT_SPOILS, - new AttributeModifier(MalumMod.malumPath("curio_spirit_spoils"), 1f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(MalumMod.malumPath("arcane_spoil_ring"), 1f, AttributeModifier.Operation.ADD_VALUE)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioMirrorNecklace.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioMirrorNecklace.java index 681c563d9..4fe0d4788 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioMirrorNecklace.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/spirit/CurioMirrorNecklace.java @@ -18,6 +18,6 @@ public CurioMirrorNecklace(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, AttributeRegistry.ARCANE_RESONANCE, - new AttributeModifier(MalumMod.malumPath("curio_arcane_resonance"), 1f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + new AttributeModifier(MalumMod.malumPath("mirror_necklace"), 1f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); } } \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioEndlessRing.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioEndlessRing.java index 5e5333fce..fc2ca85ca 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioEndlessRing.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/sets/weeping/CurioEndlessRing.java @@ -18,6 +18,6 @@ public CurioEndlessRing(Properties builder) { @Override public void addAttributeModifiers(Multimap, AttributeModifier> map, SlotContext slotContext, ItemStack stack) { addAttributeModifier(map, AttributeRegistry.RESERVE_STAFF_CHARGES, - new AttributeModifier(MalumMod.malumPath("curio_reserve_staff_charges"), 3f, AttributeModifier.Operation.ADD_VALUE)); + new AttributeModifier(MalumMod.malumPath("endless_well_ring"), 3f, AttributeModifier.Operation.ADD_VALUE)); } } \ No newline at end of file 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 index 89295f498..78a3c9660 100644 --- 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 @@ -36,18 +36,15 @@ public void outgoingDamageEvent(LivingDamageEvent.Pre event, LivingEntity attack final Level level = attacker.level(); var random = level.getRandom(); Vec3 position = target.position().add(0, target.getBbHeight() / 2f, 0); - int amount = target instanceof Player ? 5 : 2; + int amount = target instanceof Player ? 2 : 1; + for (int i = 0; i < amount; i++) { SpiritCollectionActivatorEntity entity = new SpiritCollectionActivatorEntity(level, attacker.getUUID(), - position.x, - position.y, - position.z, - RandomHelper.randomBetween(random, -speed, speed), - RandomHelper.randomBetween(random, 0.05f, 0.06f), - RandomHelper.randomBetween(random, -speed, speed)); + position.x, position.y, position.z, + RandomHelper.randomBetween(random, -speed, speed), RandomHelper.randomBetween(random, 0.05f, 0.06f), RandomHelper.randomBetween(random, -speed, speed)); level.addFreshEntity(entity); } - data.watcherNecklaceCooldown = 100; + data.watcherNecklaceCooldown = 400; } } } 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 6685fe308..837b9f6ad 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 @@ -94,7 +94,7 @@ public static boolean canSweep(LivingEntity attacker) { } public static DamageSource replaceDamageSource(Player player, DamageSource source) { - if (player.getMainHandItem().is(ItemTagRegistry.SCYTHE)) { + if (player.getMainHandItem().is(ItemTagRegistry.SCYTHES)) { return DamageTypeHelper.create(player.level(), DamageTypeRegistry.SCYTHE_MELEE, player); } return source; diff --git a/src/main/java/com/sammy/malum/common/item/spirit/RitualShardItem.java b/src/main/java/com/sammy/malum/common/item/spirit/RitualShardItem.java index b13f372ab..62f0254ca 100644 --- a/src/main/java/com/sammy/malum/common/item/spirit/RitualShardItem.java +++ b/src/main/java/com/sammy/malum/common/item/spirit/RitualShardItem.java @@ -1,18 +1,12 @@ package com.sammy.malum.common.item.spirit; -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; +import com.sammy.malum.common.data_components.*; import com.sammy.malum.core.systems.ritual.*; import com.sammy.malum.core.systems.spirit.*; -import com.sammy.malum.registry.common.*; -import com.sammy.malum.registry.common.item.DataComponentRegistry; +import com.sammy.malum.registry.common.item.*; import com.sammy.malum.visual_effects.*; -import io.netty.buffer.ByteBuf; import net.minecraft.client.*; import net.minecraft.network.chat.*; -import net.minecraft.network.codec.ByteBufCodecs; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.resources.*; import net.minecraft.world.item.*; import net.minecraft.world.level.*; import team.lodestar.lodestone.handlers.screenparticle.ParticleEmitterHandler.*; @@ -29,40 +23,37 @@ public class RitualShardItem extends Item implements ItemParticleSupplier { - public static final String RITUAL_TYPE = "stored_ritual"; - public static final String STORED_SPIRITS = "stored_spirits"; - public RitualShardItem(Properties properties) { super(properties); } -// @Override -// public void readComponent(int stackQuantity, DataComponentMap.Builder mutableMap, ComponentGetter originalSupplier) { -// originalSupplier.get(DataComponentRegistry.RITUAL_SHARD_PROPS).ifPresent(props -> { -// if (originalSupplier.get(DataComponents.RARITY).isEmpty()) -// mutableMap.set(DataComponents.RARITY, getRitualType(props).spirit.getItemRarity()); -// }); -// } + public static int getStateDisplay(ItemStack stack) { + var data = stack.get(DataComponentRegistry.RITUAL_DATA); + if (data == null) { + return -1; + } + return data.ritualTier().potency; + } @Override public void appendHoverText(ItemStack stack, TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { - final MalumRitualType ritualType = getRitualType(stack); - final MalumRitualTier ritualTier = getRitualTier(stack); - if (ritualType != null && ritualTier != null) { - tooltipComponents.addAll(ritualType.makeRitualShardDescriptor(ritualTier)); + var data = stack.get(DataComponentRegistry.RITUAL_DATA); + if (data != null) { + tooltipComponents.addAll(data.ritualType().makeRitualShardDescriptor(data.ritualTier())); } } @Override public void spawnLateParticles(ScreenParticleHolder target, Level level, float partialTick, ItemStack stack, float x, float y) { - final MalumRitualType ritualType = getRitualType(stack); - final MalumRitualTier ritualTier = getRitualTier(stack); - if (ritualType != null && ritualTier != null) { - MalumSpiritType type = ritualType.spirit; - ScreenParticleEffects.spawnSpiritShardScreenParticles(target, type); + var data = stack.get(DataComponentRegistry.RITUAL_DATA); + if (data != null) { + var ritualType = data.ritualType(); + var ritualTier = data.ritualTier(); + var spiritType = ritualType.spirit; + ScreenParticleEffects.spawnSpiritShardScreenParticles(target, spiritType); if (ritualTier.isGreaterThan(MalumRitualTier.DIM)) { float distance = 2f + ritualTier.potency; - var rand = Minecraft.getInstance().level.getRandom(); + var rand = level.getRandom(); for (int i = 0; i < 2; i++) { float time = (((i == 1 ? 3.14f : 0) + ((level.getGameTime() + partialTick) * 0.05f)) % 6.28f); float scalar = 0.4f + 0.15f * ritualTier.potency; @@ -75,7 +66,7 @@ public void spawnLateParticles(ScreenParticleHolder target, Level level, float p .setTransparencyData(GenericParticleData.create(0.3f, 0.5f, 0f).setEasing(Easing.SINE_IN_OUT).build()) .setSpinData(SpinParticleData.create(RandomHelper.randomBetween(rand, 0.2f, 0.4f)).setEasing(Easing.EXPO_OUT).build()) .setScaleData(GenericParticleData.create(RandomHelper.randomBetween(rand, 0.1f, 0.2f)*scalar, 0).setEasing(Easing.EXPO_OUT).build()) - .setColorData(type.createColorData().build()) + .setColorData(spiritType.createColorData().build()) .setLifetime(RandomHelper.randomBetween(rand, 60, 80)) .setRandomOffset(0.1f) .setDiscardFunction(SimpleParticleOptions.ParticleDiscardFunctionType.ENDING_CURVE_INVISIBLE) @@ -87,27 +78,4 @@ public void spawnLateParticles(ScreenParticleHolder target, Level level, float p } } } - - public static MalumRitualType getRitualType(Props props) { - return RitualRegistry.get(ResourceLocation.parse(props.ritualType())); - } - - public static MalumRitualType getRitualType(ItemStack stack) { - try { return RitualRegistry.get(ResourceLocation.parse(stack.get(DataComponentRegistry.RITUAL_SHARD_PROPS).ritualType())); } - catch (NullPointerException noComponent) { return null; } - } - - public static MalumRitualTier getRitualTier(ItemStack stack) { - try { return MalumRitualTier.figureOutTier(stack.get(DataComponentRegistry.RITUAL_SHARD_PROPS).storedSpirits()); } - catch (NullPointerException noComponent) { return null; } - } - - public record Props(String ritualType, int storedSpirits) { - public static Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( - Codec.STRING.fieldOf(RITUAL_TYPE).forGetter(Props::ritualType), - Codec.INT.fieldOf(STORED_SPIRITS).forGetter(Props::storedSpirits) - ).apply(instance, Props::new)); - - public static StreamCodec STREAM_CODEC = ByteBufCodecs.fromCodec(RitualShardItem.Props.CODEC); - } } diff --git a/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java b/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java index 3ad5ef9c9..ec1dc8c46 100644 --- a/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java +++ b/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java @@ -10,6 +10,7 @@ import io.redspace.ironsspellbooks.api.events.*; import io.redspace.ironsspellbooks.api.magic.*; import net.minecraft.core.*; +import net.minecraft.resources.*; import net.minecraft.server.level.*; import net.minecraft.world.damagesource.*; import net.minecraft.world.entity.*; @@ -55,9 +56,9 @@ public static void addSoulHunterSpellPower(ItemAttributeModifiers.Builder attrib LoadedOnly.addSoulHunterSpellPower(attributes, group); } } - public static void addSpellPowerToCurio(MalumCurioItem item, Multimap, AttributeModifier> map, float amount) { + public static void addSpellPowerToCurio(MalumCurioItem item, Multimap, AttributeModifier> map, ResourceLocation id, float amount) { if (LOADED) { - LoadedOnly.addSpellPowerToCurio(item, map, amount); + LoadedOnly.addSpellPowerToCurio(item, map, id, amount); } } @@ -117,13 +118,13 @@ public static void recoverSpellCooldowns(ServerPlayer serverPlayer, float amount public static void addSoulHunterSpellPower(ItemAttributeModifiers.Builder attributes, EquipmentSlotGroup group) { attributes.add(io.redspace.ironsspellbooks.api.registry.AttributeRegistry.SPELL_POWER, - new AttributeModifier(MalumMod.malumPath("spell_power"), 0.1f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE), + new AttributeModifier(MalumMod.malumPath("soul_hunter_armor"), 0.1f, AttributeModifier.Operation.ADD_MULTIPLIED_BASE), group); } - public static void addSpellPowerToCurio(MalumCurioItem item, Multimap, AttributeModifier> map, float amount) { + public static void addSpellPowerToCurio(MalumCurioItem item, Multimap, AttributeModifier> map, ResourceLocation id, float amount) { item.addAttributeModifier(map, io.redspace.ironsspellbooks.api.registry.AttributeRegistry.SPELL_POWER, - new AttributeModifier(MalumMod.malumPath("spell_power"), amount, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + new AttributeModifier(id, amount, AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); } public static void addEchoingArcanaSpellCooldown(EchoingArcanaEffect effect) { @@ -131,7 +132,7 @@ public static void addEchoingArcanaSpellCooldown(EchoingArcanaEffect effect) { } public static void addGluttonySpellPower(GluttonyEffect effect) { - effect.addAttributeModifier(io.redspace.ironsspellbooks.api.registry.AttributeRegistry.SPELL_POWER, MalumMod.malumPath("gluttony_spell_power_multiplier"), 0.2f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); + effect.addAttributeModifier(io.redspace.ironsspellbooks.api.registry.AttributeRegistry.SPELL_POWER, MalumMod.malumPath("gluttony"), 0.05f, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL); } public static void addSilencedNegativeAttributeModifiers(SilencedEffect effect) { diff --git a/src/main/java/com/sammy/malum/core/events/ClientSetupEvents.java b/src/main/java/com/sammy/malum/core/events/ClientSetupEvents.java index 1365d490c..4dc3af918 100644 --- a/src/main/java/com/sammy/malum/core/events/ClientSetupEvents.java +++ b/src/main/java/com/sammy/malum/core/events/ClientSetupEvents.java @@ -2,6 +2,8 @@ import com.sammy.malum.*; import com.sammy.malum.client.renderer.item.SpiritJarItemRenderer; +import com.sammy.malum.client.screen.tooltip.*; +import com.sammy.malum.common.data_components.*; import com.sammy.malum.core.handlers.client.*; import com.sammy.malum.registry.client.*; import com.sammy.malum.registry.common.item.*; @@ -10,8 +12,7 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; -import net.neoforged.neoforge.client.event.RegisterGuiLayersEvent; -import net.neoforged.neoforge.client.event.RegisterParticleProvidersEvent; +import net.neoforged.neoforge.client.event.*; import net.neoforged.neoforge.client.extensions.common.*; import net.neoforged.neoforge.client.gui.VanillaGuiLayers; @@ -27,7 +28,7 @@ public BlockEntityWithoutLevelRenderer getCustomRenderer() { return renderer = new SpiritJarItemRenderer(Minecraft.getInstance().getBlockEntityRenderDispatcher(), Minecraft.getInstance().getEntityModels()); } - return renderer; + return null; } }; @@ -36,15 +37,20 @@ public static void registerClientExtensions(RegisterClientExtensionsEvent event) event.registerItem(SPIRIT_JAR_RENDERER, ItemRegistry.SPIRIT_JAR.get()); } + @SubscribeEvent + public static void registerTooltipComponentManagers(RegisterClientTooltipComponentFactoriesEvent event) { + event.register(SoulwovenPouchContents.class, ClientSoulwovenPouchTooltip::new); + } + @SubscribeEvent public static void registerOverlays(RegisterGuiLayersEvent event) { event.registerAbove(VanillaGuiLayers.ARMOR_LEVEL, MalumMod.malumPath("soul_ward"), SoulWardRenderHandler::renderSoulWard); - event.registerAboveAll(MalumMod.malumPath("hidden_blade_cooldown"), + event.registerAbove(VanillaGuiLayers.ARMOR_LEVEL, MalumMod.malumPath("hidden_blade_cooldown"), HiddenBladeRenderHandler::renderHiddenBladeCooldown); - event.registerAbove(VanillaGuiLayers.BOSS_OVERLAY, MalumMod.malumPath("touch_of_darkness"), + event.registerAboveAll(MalumMod.malumPath("touch_of_darkness"), TouchOfDarknessRenderHandler::renderDarknessVignette); } diff --git a/src/main/java/com/sammy/malum/core/handlers/SoulDataHandler.java b/src/main/java/com/sammy/malum/core/handlers/SoulDataHandler.java index e815f398f..2807e8065 100644 --- a/src/main/java/com/sammy/malum/core/handlers/SoulDataHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/SoulDataHandler.java @@ -8,7 +8,6 @@ import com.sammy.malum.registry.common.item.*; import net.minecraft.world.damagesource.*; import net.minecraft.world.entity.*; -import net.minecraft.world.entity.ai.goal.*; import net.minecraft.world.item.*; import net.neoforged.neoforge.event.entity.*; import net.neoforged.neoforge.event.entity.living.*; @@ -64,7 +63,7 @@ public static void exposeSoul(LivingDamageEvent.Post event) { } if (source.getEntity() instanceof LivingEntity attacker) { ItemStack stack = getSoulHunterWeapon(source, attacker); - if (stack.is(ItemTagRegistry.SOUL_HUNTER_WEAPON) || TetraCompat.hasSoulStrikeModifier(stack)) { + if (stack.is(ItemTagRegistry.SOUL_SHATTER_CAPABLE_WEAPONS) || TetraCompat.hasSoulStrikeModifier(stack)) { data.setExposed(); } } diff --git a/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualTier.java b/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualTier.java index 8d47e7ae9..8183dd2a9 100644 --- a/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualTier.java +++ b/src/main/java/com/sammy/malum/core/systems/ritual/MalumRitualTier.java @@ -61,7 +61,7 @@ public static MalumRitualTier figureOutTier(RitualPlinthBlockEntity plinthBlockE } public static MalumRitualTier figureOutTier(int spiritAmount) { - final List collect = TIERS.stream().filter(t -> (spiritAmount) >= t.spiritThreshold).toList(); - return collect.isEmpty() ? null : collect.get(collect.size()-1); + var reachedThresholds = TIERS.stream().filter(t -> (spiritAmount) >= t.spiritThreshold).toList(); + return reachedThresholds.isEmpty() ? null : reachedThresholds.getLast(); } } 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 3707e9806..d6cf8818e 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 @@ -1,8 +1,11 @@ package com.sammy.malum.core.systems.ritual; +import com.google.gson.*; +import com.mojang.serialization.*; import com.sammy.malum.common.block.curiosities.ritual_plinth.*; -import com.sammy.malum.common.item.spirit.*; +import com.sammy.malum.common.data_components.*; import com.sammy.malum.core.systems.spirit.*; +import com.sammy.malum.registry.common.*; import net.minecraft.*; import net.minecraft.network.chat.*; import net.minecraft.resources.*; @@ -14,12 +17,21 @@ import java.util.function.*; public abstract class MalumRitualType { + + public static final Codec CODEC = ResourceLocation.CODEC.comapFlatMap(s -> { + var ritual = RitualRegistry.get(s); + if (ritual == null) { + throw new JsonParseException("No Such Spirit Type: " + s); + } + return DataResult.success(ritual); + }, r -> r.id); + public final MalumSpiritType spirit; - public final ResourceLocation identifier; + public final ResourceLocation id; protected MalumRitualRecipeData recipeData; - public MalumRitualType(ResourceLocation identifier, MalumSpiritType spirit) { - this.identifier = identifier; + public MalumRitualType(ResourceLocation id, MalumSpiritType spirit) { + this.id = id; this.spirit = spirit; } @@ -41,15 +53,15 @@ public MalumRitualRecipeData getRecipeData() { } public String translationIdentifier() { - return identifier.getNamespace() + ".gui.ritual." + identifier.getPath(); + return id.getNamespace() + ".gui.ritual." + id.getPath(); } public ResourceLocation getIcon() { - return identifier.withPrefix("textures/vfx/ritual/").withSuffix(".png"); + return id.withPrefix("textures/vfx/ritual/").withSuffix(".png"); } - public RitualShardItem.Props createShardProps(MalumRitualTier tier) { - return new RitualShardItem.Props(identifier.toString(), tier.spiritThreshold); + public RitualData createDataComponent(MalumRitualTier tier) { + return new RitualData(this, tier); } public List makeRitualShardDescriptor(MalumRitualTier ritualTier) { @@ -64,7 +76,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.rite.effect", "malum.gui.book.entry.page.text." + identifier + ".hover")); + tooltip.add(makeDescriptorComponent("malum.gui.rite.effect", "malum.gui.book.entry.page.text." + id + ".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 7f0a595a8..3a04f4d41 100644 --- a/src/main/java/com/sammy/malum/data/MalumLang.java +++ b/src/main/java/com/sammy/malum/data/MalumLang.java @@ -152,7 +152,7 @@ protected void addTranslations() { add("malum.gui.ritual.tier", "Ritual Tier: "); for (MalumRitualType ritualType : RitualRegistry.RITUALS) { - final String id = ritualType.identifier.getPath(); + final String id = ritualType.id.getPath(); String name = DataHelper.toTitleCase(id, "_"); add("malum.gui.ritual." + id, name); } @@ -602,11 +602,10 @@ protected void addTranslations() { addSimpleEntryHeader("soulwoven_silk", "Soulwoven Silk", "Wicked weaves"); addPages("soulwoven_silk", "Soulwoven Silk is a light yet sturdy material that acts as an insulator for spirit energies. While other materials do exhibit matching interactions with the arcane, this bond between magic and cloth should make for a unique material."); - addPages("soulwoven_silk.soulwoven_banner", "To further study and confirm the insulating properties of the cloth, I've heft together a set of Soulwoven Banners with patterns based on each of the spirits I've been met with thus far. If further imbued with Spirit Arcana, the Banners will gain a dim, and them powerful glow with two shards infused."); + addPages("soulwoven_silk.soulwoven_banner", "To further study and confirm the insulating properties of the cloth, I've heft together a set of Soulwoven Banners with patterns based on each of the spirits I've been met with thus far. If further imbued with Arcana, the Banners will gain a dim, and them powerful glow when met with an additional shard."); - addSimpleEntryHeader("soulwoven_pouch", "Soulwoven Pouch", "[Soulwoven Pouch Tooltip]"); - addPages("soulwoven_pouch", "But this fabric works wonderfully for storing spirit crystals. It keeps the arcana condensed within, and will even store spirits I pick up before they so much as clutter my pockets. It can store as many spirits as a single chest, making it quite convenient to carry around."); - addHeadline("spirit_fabric.pouch", "Spirit Pouch"); + addSimpleEntryHeader("soulwoven_pouch", "Soulwoven Pouch", "Made real through supposition"); + addPages("soulwoven_pouch", "In my studies one of the most cumbersome experiences so far has been the sheer amount of magical reagents and residue I have to deal with. To solve this issue, I've designed the Soulwoven Pouch with the bundle's design in mind. The pouch hungers for the magically aligned, reserving extra room for and collecting it habitually."); addSimpleEntryHeader("soulhunter_armor", "Soulhunter Armor", "Shaped like glass"); addPages("soulhunter_armor", diff --git a/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java b/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java index 156727338..131279f1a 100644 --- a/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java +++ b/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java @@ -71,8 +71,8 @@ protected void generate() { add(take(blocks, BlockRegistry.BLIGHTED_EARTH).get(), createBlightedDrop(BlockRegistry.BLIGHTED_EARTH.get(), 4).withPool(LootPool.lootPool().add(applyExplosionDecay(BlockRegistry.BLIGHTED_EARTH.get(), LootItem.lootTableItem(Blocks.DIRT))))); add(take(blocks, BlockRegistry.BLIGHTED_GROWTH).get(), createBlightedPlantDrop(BlockRegistry.BLIGHTED_GROWTH.get(), 1)); - add(take(blocks, BlockRegistry.BRILLIANT_STONE).get(), createOreDrop(BlockRegistry.BRILLIANT_STONE.get(), ItemRegistry.CLUSTER_OF_BRILLIANCE.get())); - add(take(blocks, BlockRegistry.BRILLIANT_DEEPSLATE).get(), createOreDrop(BlockRegistry.BRILLIANT_DEEPSLATE.get(), ItemRegistry.CLUSTER_OF_BRILLIANCE.get())); + add(take(blocks, BlockRegistry.BRILLIANT_STONE).get(), createOreDrop(BlockRegistry.BRILLIANT_STONE.get(), ItemRegistry.RAW_BRILLIANCE.get())); + add(take(blocks, BlockRegistry.BRILLIANT_DEEPSLATE).get(), createOreDrop(BlockRegistry.BRILLIANT_DEEPSLATE.get(), ItemRegistry.RAW_BRILLIANCE.get())); add(take(blocks, BlockRegistry.SOULSTONE_ORE).get(), createOreDrop(BlockRegistry.SOULSTONE_ORE.get(), ItemRegistry.RAW_SOULSTONE.get())); add(take(blocks, BlockRegistry.DEEPSLATE_SOULSTONE_ORE).get(), createOreDrop(BlockRegistry.DEEPSLATE_SOULSTONE_ORE.get(), ItemRegistry.RAW_SOULSTONE.get())); add(take(blocks, BlockRegistry.BLAZING_QUARTZ_ORE).get(), createOreDrop(BlockRegistry.BLAZING_QUARTZ_ORE.get(), ItemRegistry.BLAZING_QUARTZ.get())); diff --git a/src/main/java/com/sammy/malum/data/item/MalumEnchantments.java b/src/main/java/com/sammy/malum/data/item/MalumEnchantments.java index b7feefa96..73c92aff1 100644 --- a/src/main/java/com/sammy/malum/data/item/MalumEnchantments.java +++ b/src/main/java/com/sammy/malum/data/item/MalumEnchantments.java @@ -56,16 +56,16 @@ public static void bootstrap(BootstrapContext context) { )).build(MalumMod.malumPath("haunted"))); context.register(rKey("replenishing"), new Enchantment.Builder(Enchantment.definition( - itemGetter.getOrThrow(ItemTagRegistry.STAFF), - itemGetter.getOrThrow(ItemTagRegistry.STAFF), + itemGetter.getOrThrow(ItemTagRegistry.STAVES), + itemGetter.getOrThrow(ItemTagRegistry.STAVES), Weights.COMMON, 2, LEGACY_LOWEST, LEGACY_HIGHEST, 1, EquipmentSlotGroup.HAND )).build(MalumMod.malumPath("replenishing"))); context.register(rKey("spirit_plunder"), new Enchantment.Builder(Enchantment.definition( - itemGetter.getOrThrow(ItemTagRegistry.SOUL_HUNTER_WEAPON), - itemGetter.getOrThrow(ItemTagRegistry.SOUL_HUNTER_WEAPON), + itemGetter.getOrThrow(ItemTagRegistry.SOUL_SHATTER_CAPABLE_WEAPONS), + itemGetter.getOrThrow(ItemTagRegistry.SOUL_SHATTER_CAPABLE_WEAPONS), Weights.COMMON, 2, LEGACY_LOWEST, LEGACY_HIGHEST, 1, EquipmentSlotGroup.HAND diff --git a/src/main/java/com/sammy/malum/data/item/MalumItemModelSmithTypes.java b/src/main/java/com/sammy/malum/data/item/MalumItemModelSmithTypes.java index 7e9cda4a5..f9b7c190f 100644 --- a/src/main/java/com/sammy/malum/data/item/MalumItemModelSmithTypes.java +++ b/src/main/java/com/sammy/malum/data/item/MalumItemModelSmithTypes.java @@ -24,7 +24,7 @@ public class MalumItemModelSmithTypes { public static ItemModelSmith IMPETUS_ITEM = new ItemModelSmith((item, provider) -> { String name = provider.getItemName(item); List split = DataHelper.reverseOrder(new ArrayList<>(), Arrays.asList(name.split("_"))); - split.remove(0); + split.removeFirst(); String alteredName = String.join("_", split); provider.createGenericModel(item, GENERATED, provider.getItemTexture(alteredName)); }); @@ -39,12 +39,20 @@ public class MalumItemModelSmithTypes { String path = ritualTier.identifier.getPath(); ResourceLocation itemTexturePath = provider.getItemTexture(base + "_" + path); provider.getBuilder(BuiltInRegistries.ITEM.getKey(item).getPath()).override() - .predicate(ResourceLocation.withDefaultNamespace(RitualShardItem.RITUAL_TYPE), ritualTier.potency) + .predicate(MalumMod.malumPath("tier"), ritualTier.potency) .model(provider.withExistingParent(provider.getItemName(item) + "_" + path, GENERATED).texture("layer0", itemTexturePath)) .end(); } }); - + public static ItemModelSmith SOULWOVEN_POUCH = new ItemModelSmith((item, provider) -> { + String base = provider.getItemName(item); + final ResourceLocation texture = provider.getItemTexture(base); + provider.createGenericModel(item, GENERATED, texture); + provider.getBuilder(BuiltInRegistries.ITEM.getKey(item).getPath()).override() + .predicate(MalumMod.malumPath("filled"), 1) + .model(provider.withExistingParent(base + "_filled", HANDHELD).texture("layer0", texture.withSuffix("_filled"))) + .end(); + }); public static ItemModelSmith CATALYST_LOBBER = new ItemModelSmith((item, provider) -> { String base = provider.getItemName(item); provider.createGenericModel(item, HANDHELD, provider.getItemTexture(base)); 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 2236b9f04..a3c88b2c4 100644 --- a/src/main/java/com/sammy/malum/data/item/MalumItemModels.java +++ b/src/main/java/com/sammy/malum/data/item/MalumItemModels.java @@ -63,6 +63,7 @@ protected void registerModels() { ItemModelSmithTypes.HANDHELD_ITEM.act(data, items.stream().filter(i -> i.get() instanceof AbstractStaffItem).collect(Collectors.toList())); ItemModelSmithTypes.HANDHELD_ITEM.act(data, SOUL_STAINED_STEEL_KNIFE, TUNING_FORK, LAMPLIGHTERS_TONGS, TOTEMIC_STAFF); MalumItemModelSmithTypes.CATALYST_LOBBER.act(data, CATALYST_LOBBER); + MalumItemModelSmithTypes.SOULWOVEN_POUCH.act(data, SOULWOVEN_POUCH); MalumItemModelSmithTypes.ARMOR_ITEM.act(data, diff --git a/src/main/java/com/sammy/malum/data/item/MalumItemTags.java b/src/main/java/com/sammy/malum/data/item/MalumItemTags.java index b5c550f87..f4054d80a 100644 --- a/src/main/java/com/sammy/malum/data/item/MalumItemTags.java +++ b/src/main/java/com/sammy/malum/data/item/MalumItemTags.java @@ -1,6 +1,9 @@ package com.sammy.malum.data.item; import com.sammy.malum.*; +import com.sammy.malum.common.block.curiosities.banner.*; +import com.sammy.malum.common.item.*; +import com.sammy.malum.common.item.augment.*; import com.sammy.malum.common.item.curiosities.curios.*; import com.sammy.malum.common.item.impetus.*; import com.sammy.malum.data.recipe.crafting.*; @@ -40,6 +43,7 @@ public String getName() { @Override protected void addTags(HolderLookup.Provider pProvider) { + var items = ITEMS.getEntries(); MalumWoodSetDatagen.addTags(this); MalumRockSetDatagen.addTags(this); @@ -71,36 +75,19 @@ protected void addTags(HolderLookup.Provider pProvider) { tag(Tags.Items.GEMS_QUARTZ).add(NATURAL_QUARTZ.get()); tag(Tags.Items.ORES_QUARTZ).add(NATURAL_QUARTZ_ORE.get(), DEEPSLATE_QUARTZ_ORE.get()); - tag(ItemTagRegistry.SAPBALLS).add(RUNIC_SAPBALL.get(), CURSED_SAPBALL.get()); - tag(ItemTagRegistry.GROSS_FOODS).add(Items.ROTTEN_FLESH, ROTTING_ESSENCE.get(), CONCENTRATED_GLUTTONY.get()); - - ITEMS.getEntries().stream().filter(i -> i.get() instanceof NodeItem).map(DeferredHolder::get).forEach(i -> { - tag(ItemTagRegistry.METAL_NODES).add(i); - }); - tag(ItemTagRegistry.PROSPECTORS_TREASURE) - .addTags(Tags.Items.ORES, Tags.Items.STORAGE_BLOCKS, Tags.Items.INGOTS, Tags.Items.NUGGETS, Tags.Items.GEMS, Tags.Items.RAW_MATERIALS, ItemTags.COALS, ItemTagRegistry.METAL_NODES) - .addOptional(ResourceLocation.parse("tetra:geode")); - - tag(ItemTagRegistry.ASPECTED_SPIRITS).add( - SACRED_SPIRIT.get(), WICKED_SPIRIT.get(), ARCANE_SPIRIT.get(), ELDRITCH_SPIRIT.get(), - AERIAL_SPIRIT.get(), AQUEOUS_SPIRIT.get(), EARTHEN_SPIRIT.get(), INFERNAL_SPIRIT.get()); - tag(ItemTagRegistry.SPIRITS).addTag(ItemTagRegistry.ASPECTED_SPIRITS).add(UMBRAL_SPIRIT.get()); - - tag(ItemTagRegistry.MAGIC_CAPABLE_WEAPON).add( + tag(ItemTagRegistry.MAGIC_CAPABLE_WEAPONS).add( CRUDE_SCYTHE.get(), SOUL_STAINED_STEEL_SCYTHE.get(), CREATIVE_SCYTHE.get(), MNEMONIC_HEX_STAFF.get(), STAFF_OF_THE_AURIC_FLAME.get(), EROSION_SCEPTER.get()); - tag(ItemTagRegistry.SCYTHE).add(CRUDE_SCYTHE.get(), SOUL_STAINED_STEEL_SCYTHE.get(), EDGE_OF_DELIVERANCE.get(), CREATIVE_SCYTHE.get()); - tag(ItemTagRegistry.STAFF).add(MNEMONIC_HEX_STAFF.get(), STAFF_OF_THE_AURIC_FLAME.get(), EROSION_SCEPTER.get()); + tag(ItemTagRegistry.SCYTHES).add(CRUDE_SCYTHE.get(), SOUL_STAINED_STEEL_SCYTHE.get(), EDGE_OF_DELIVERANCE.get(), CREATIVE_SCYTHE.get()); + tag(ItemTagRegistry.STAVES).add(MNEMONIC_HEX_STAFF.get(), STAFF_OF_THE_AURIC_FLAME.get(), EROSION_SCEPTER.get()); - tag(ItemTagRegistry.SOUL_HUNTER_WEAPON) - .addTags(ItemTagRegistry.SCYTHE, ItemTagRegistry.STAFF) - //unique weapons + tag(ItemTagRegistry.SOUL_SHATTER_CAPABLE_WEAPONS) + .addTags(ItemTagRegistry.SCYTHES, ItemTagRegistry.STAVES) .add(TYRVING.get(), WEIGHT_OF_WORLDS.get()) - //soul stained steel gear .add(SOUL_STAINED_STEEL_AXE.get(), SOUL_STAINED_STEEL_PICKAXE.get(), SOUL_STAINED_STEEL_SHOVEL.get(), SOUL_STAINED_STEEL_SWORD.get(), SOUL_STAINED_STEEL_HOE.get(), SOUL_STAINED_STEEL_KNIFE.get()); - tag(ItemTagRegistry.SOUL_HUNTER_WEAPON) + tag(ItemTagRegistry.SOUL_SHATTER_CAPABLE_WEAPONS) .addOptional(ResourceLocation.parse("irons_spellbooks:graybeard_staff")) .addOptional(ResourceLocation.parse("irons_spellbooks:artificer_cane")) .addOptional(ResourceLocation.parse("irons_spellbooks:lightning_rod")) @@ -111,15 +98,59 @@ protected void addTags(HolderLookup.Provider pProvider) { .addOptional(ResourceLocation.parse("irons_spellbooks:spellbreaker")) .addOptional(ResourceLocation.parse("irons_spellbooks:amethyst_rapier")); - tag(ItemTagRegistry.ANIMATED_ENCHANTABLE).addTag(ItemTagRegistry.SCYTHE); - tag(ItemTagRegistry.REBOUND_ENCHANTABLE).addTag(ItemTagRegistry.SCYTHE); - tag(ItemTagRegistry.ASCENSION_ENCHANTABLE).addTag(ItemTagRegistry.SCYTHE); - tag(ItemTagRegistry.REPLENISHING_ENCHANTABLE).addTag(ItemTagRegistry.STAFF); - tag(ItemTagRegistry.HAUNTED_ENCHANTABLE).addTag(ItemTagRegistry.MAGIC_CAPABLE_WEAPON); - tag(ItemTagRegistry.SPIRIT_SPOILS_ENCHANTABLE).addTag(ItemTagRegistry.SOUL_HUNTER_WEAPON); + tag(ItemTagRegistry.ANIMATED_ENCHANTABLE).addTag(ItemTagRegistry.SCYTHES); + tag(ItemTagRegistry.REBOUND_ENCHANTABLE).addTag(ItemTagRegistry.SCYTHES); + tag(ItemTagRegistry.ASCENSION_ENCHANTABLE).addTag(ItemTagRegistry.SCYTHES); + tag(ItemTagRegistry.REPLENISHING_ENCHANTABLE).addTag(ItemTagRegistry.STAVES); + tag(ItemTagRegistry.HAUNTED_ENCHANTABLE).addTag(ItemTagRegistry.MAGIC_CAPABLE_WEAPONS); + tag(ItemTagRegistry.SPIRIT_SPOILS_ENCHANTABLE).addTag(ItemTagRegistry.SOUL_SHATTER_CAPABLE_WEAPONS); + + tag(ItemTagRegistry.ASPECTED_SPIRITS).add( + SACRED_SPIRIT.get(), WICKED_SPIRIT.get(), ARCANE_SPIRIT.get(), ELDRITCH_SPIRIT.get(), + AERIAL_SPIRIT.get(), AQUEOUS_SPIRIT.get(), EARTHEN_SPIRIT.get(), INFERNAL_SPIRIT.get()); + tag(ItemTagRegistry.SPIRITS).addTag(ItemTagRegistry.ASPECTED_SPIRITS).add(UMBRAL_SPIRIT.get()); + tag(ItemTagRegistry.MOB_DROPS).add( + ROTTING_ESSENCE.get(), GRIM_TALC.get(), ASTRAL_WEAVE.get(), WARP_FLUX.get(), + Items.ROTTEN_FLESH, Items.SPIDER_EYE, Items.BONE, Items.GUNPOWDER, Items.STRING, Items.SLIME_BALL, + Items.MAGMA_CREAM, Items.BLAZE_ROD, Items.BREEZE_ROD, + Items.LEATHER, Items.RABBIT_HIDE, Items.FEATHER, Items.INK_SAC); + tag(ItemTagRegistry.MATERIALS).add( + ROTTING_ESSENCE.get(), GRIM_TALC.get(), ASTRAL_WEAVE.get(), WARP_FLUX.get(), + HEX_ASH.get(),LIVING_FLESH.get(), ALCHEMICAL_CALX.get(), BLIGHTED_GUNK.get(), + SOULWOVEN_SILK.get(), ETHER.get(), IRIDESCENT_ETHER.get(), + SOUL_STAINED_STEEL_INGOT.get(), SOUL_STAINED_STEEL_NUGGET.get(), SOUL_STAINED_STEEL_PLATING.get(), + HALLOWED_GOLD_INGOT.get(), HALLOWED_GOLD_NUGGET.get(), + MALIGNANT_PEWTER_INGOT.get(), MALIGNANT_PEWTER_NUGGET.get(), MALIGNANT_PEWTER_PLATING.get(), + NULL_SLATE.get(), VOID_SALTS.get(), MNEMONIC_FRAGMENT.get(), AURIC_EMBERS.get(), MALIGNANT_LEAD.get(), + ANOMALOUS_DESIGN.get(), COMPLETE_DESIGN.get(), FUSED_CONSCIOUSNESS.get()); + tag(ItemTagRegistry.MINERALS).add( + RAW_SOULSTONE.get(), CRUSHED_SOULSTONE.get(), REFINED_SOULSTONE.get(), + RAW_BRILLIANCE.get(), CRUSHED_BRILLIANCE.get(), REFINED_BRILLIANCE.get(), + BLAZING_QUARTZ.get(), ARCANE_CHARCOAL.get(), + NATURAL_QUARTZ.get(), CTHONIC_GOLD.get(), CTHONIC_GOLD_FRAGMENT.get()); + + tag(ItemTagRegistry.AUGMENTS).addAll(items.stream().filter(i -> i.get() instanceof AbstractAugmentItem).map(DeferredHolder::getKey).toList()); + tag(ItemTagRegistry.METAL_NODES).addAll(items.stream().filter(i -> i.get() instanceof NodeItem).map(DeferredHolder::getKey).toList()); + tag(ItemTagRegistry.SOULWOVEN_BANNERS).addAll(items.stream().filter(i -> i.get() instanceof SoulwovenBannerItem).map(DeferredHolder::getKey).toList()); + + tag(ItemTagRegistry.SAPBALLS).add(RUNIC_SAPBALL.get(), CURSED_SAPBALL.get()); + tag(ItemTagRegistry.GROSS_FOODS).add(Items.ROTTEN_FLESH, ROTTING_ESSENCE.get(), CONCENTRATED_GLUTTONY.get()); + + tag(ItemTagRegistry.PROSPECTORS_TREASURE) + .addTags(Tags.Items.ORES, Tags.Items.STORAGE_BLOCKS, Tags.Items.INGOTS, Tags.Items.NUGGETS, Tags.Items.GEMS, Tags.Items.RAW_MATERIALS, ItemTags.COALS, ItemTagRegistry.METAL_NODES) + .addOptional(ResourceLocation.parse("tetra:geode")); + + tag(ItemTagRegistry.SOULHUNTERS_TREASURE) + .addTags(ItemTagRegistry.SOUL_SHATTER_CAPABLE_WEAPONS, ItemTagRegistry.SPIRITS, ItemTagRegistry.MOB_DROPS, ItemTagRegistry.MATERIALS, ItemTagRegistry.MINERALS) + .addTags(ItemTagRegistry.AUGMENTS, ItemTagRegistry.METAL_NODES, ItemTagRegistry.SOULWOVEN_BANNERS) + .addTags(ItemTagRegistry.RING, ItemTagRegistry.NECKLACE, ItemTagRegistry.BELT, ItemTagRegistry.BROOCH, ItemTagRegistry.RUNE) + .add(TUNING_FORK.get(), LAMPLIGHTERS_TONGS.get(), CATALYST_LOBBER.get()) + .add(ENCYCLOPEDIA_ARCANA.get(), ENCYCLOPEDIA_ESOTERICA.get()); + tag(ItemTagRegistry.SOULWOVEN_POUCH_AUTOCOLLECT) + .addTags(ItemTagRegistry.SPIRITS, ItemTagRegistry.MOB_DROPS, ItemTagRegistry.MATERIALS, ItemTagRegistry.MINERALS); tag(Tags.Items.NUGGETS).add(COPPER_NUGGET.get(), HALLOWED_GOLD_NUGGET.get(), SOUL_STAINED_STEEL_NUGGET.get()); - tag(Tags.Items.GEMS).add(NATURAL_QUARTZ.get(), BLAZING_QUARTZ.get(), CLUSTER_OF_BRILLIANCE.get()); + tag(Tags.Items.GEMS).add(NATURAL_QUARTZ.get(), BLAZING_QUARTZ.get(), RAW_BRILLIANCE.get()); tag(Tags.Items.INGOTS).add(SOUL_STAINED_STEEL_INGOT.get(), HALLOWED_GOLD_INGOT.get()); tag(ItemTagRegistry.KNIVES).add(SOUL_STAINED_STEEL_KNIFE.get()); @@ -172,7 +203,7 @@ protected void addTags(HolderLookup.Provider pProvider) { // Aesthetica .add(AESTHETICA.get()); - for (DeferredHolder i : ITEMS.getEntries()) { + for (DeferredHolder i : items) { if (i.get() instanceof MalumCurioItem) { final Item item = i.get(); final ResourceLocation id = i.getId(); diff --git a/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipes.java b/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipes.java index a8ad4f00d..2a1f4dfdc 100644 --- a/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipes.java +++ b/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipes.java @@ -40,9 +40,9 @@ protected static void buildRecipes(RecipeOutput output) { shapeless(RecipeCategory.MISC, ItemRegistry.ENCYCLOPEDIA_ARCANA.get()).requires(Items.BOOK).requires(ItemRegistry.REFINED_SOULSTONE.get()).unlockedBy("has_soulstone", has(ItemRegistry.REFINED_SOULSTONE.get())).save(output); shaped(RecipeCategory.MISC, ItemRegistry.CRUDE_SCYTHE.get()).define('#', Tags.Items.RODS_WOODEN).define('Y', ItemRegistry.REFINED_SOULSTONE.get()).define('X', Tags.Items.INGOTS_IRON).pattern("XXY").pattern(" #X").pattern("# ").unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output); shaped(RecipeCategory.MISC, ItemRegistry.SPIRIT_ALTAR.get()).define('Z', Tags.Items.INGOTS_GOLD).define('Y', ItemRegistry.REFINED_SOULSTONE.get()).define('X', ItemRegistry.RUNEWOOD_PLANKS.get()).pattern(" Y ").pattern("ZXZ").pattern("XXX").unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output); - shaped(RecipeCategory.MISC, ItemRegistry.SPIRIT_JAR.get()).define('Z', ItemRegistry.HALLOWED_GOLD_INGOT.get()).define('Y', Tags.Items.GLASS_PANES).pattern("YZY").pattern("Y Y").pattern("YYY").unlockedBy("has_hallowed_gold", has(ItemRegistry.HALLOWED_GOLD_INGOT.get())).save(output); - shaped(RecipeCategory.MISC, ItemRegistry.SPIRIT_POUCH.get()).define('X', Tags.Items.STRINGS).define('Y', ItemRegistry.SOULWOVEN_SILK.get()).define('Z', ItemTags.SOUL_FIRE_BASE_BLOCKS).pattern(" X ").pattern("YZY").pattern(" Y ").unlockedBy("has_spirit_fabric", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); shaped(RecipeCategory.MISC, ItemRegistry.WEAVERS_WORKBENCH.get()).define('Z', ItemRegistry.HALLOWED_GOLD_INGOT.get()).define('Y', ItemRegistry.HEX_ASH.get()).define('X', ItemRegistry.RUNEWOOD_PLANKS.get()).pattern("XYX").pattern("XZX").unlockedBy("has_hex_ash", has(ItemRegistry.HEX_ASH.get())).save(output); + shaped(RecipeCategory.MISC, ItemRegistry.SPIRIT_JAR.get()).define('Z', ItemRegistry.HALLOWED_GOLD_INGOT.get()).define('Y', Tags.Items.GLASS_PANES).pattern("YZY").pattern("Y Y").pattern("YYY").unlockedBy("has_hallowed_gold", has(ItemRegistry.HALLOWED_GOLD_INGOT.get())).save(output); + shaped(RecipeCategory.MISC, ItemRegistry.SOULWOVEN_POUCH.get()).define('X', Tags.Items.STRINGS).define('Y', ItemRegistry.SOULWOVEN_SILK.get()).pattern("X").pattern("Y").unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); shaped(RecipeCategory.MISC, ItemRegistry.TOTEMIC_STAFF.get()).define('X', Tags.Items.RODS_WOODEN).define('Y', ItemTagRegistry.RUNEWOOD_PLANKS).pattern(" Y").pattern(" X ").pattern("X ").unlockedBy("has_runewood", has(ItemRegistry.RUNEWOOD_PLANKS.get())).save(output); //CRAFTING COMPONENTS @@ -58,8 +58,11 @@ protected static void buildRecipes(RecipeOutput output) { etherBrazier(output, ItemRegistry.TWISTED_IRIDESCENT_ETHER_BRAZIER.get(), ItemRegistry.TWISTED_ROCK.get(), ItemRegistry.IRIDESCENT_ETHER.get()); //BANNERS - shaped(RecipeCategory.MISC, ItemRegistry.SOULWOVEN_BANNER.get()).define('X', ItemTagRegistry.RUNEWOOD_PLANKS).define('Y', ItemRegistry.SOULWOVEN_SILK.get()).pattern("X").pattern("Y").pattern("Y").unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); - + shaped(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER.get()).define('X', ItemTagRegistry.RUNEWOOD_PLANKS).define('Y', ItemRegistry.SOULWOVEN_SILK.get()).pattern("X").pattern("Y").pattern("Y").unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); + shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_HORNS.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(ItemRegistry.GRIM_TALC.get()).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); + shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_SIGIL.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(ItemRegistry.SOUL_STAINED_STEEL_PLATING.get()).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); + shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_BREEZE.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(Items.WIND_CHARGE).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); + shapeless(RecipeCategory.BUILDING_BLOCKS, ItemRegistry.SOULWOVEN_BANNER_FRACTAL.get()).requires(ItemRegistry.SOULWOVEN_BANNER.get()).requires(Tags.Items.GEMS_EMERALD).unlockedBy("has_soulwoven_silk", has(ItemRegistry.SOULWOVEN_SILK.get())).save(output); //SPIRIT METALS shaped(RecipeCategory.MISC, ItemRegistry.BLOCK_OF_SOUL_STAINED_STEEL.get()).define('#', ItemRegistry.SOUL_STAINED_STEEL_INGOT.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_soul_stained_steel", has(ItemRegistry.SOUL_STAINED_STEEL_INGOT.get())).save(output); shaped(RecipeCategory.MISC, ItemRegistry.SOUL_STAINED_STEEL_INGOT.get()).define('#', ItemRegistry.SOUL_STAINED_STEEL_NUGGET.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_soul_stained_steel", has(ItemRegistry.SOUL_STAINED_STEEL_INGOT.get())).save(output, malumPath("soul_stained_steel_from_nuggets")); @@ -135,19 +138,19 @@ protected static void buildRecipes(RecipeOutput output) { blasting(Ingredient.of(ItemRegistry.NATURAL_QUARTZ_ORE.get()), RecipeCategory.MISC, ItemRegistry.NATURAL_QUARTZ.get(), 0.25f, 100).unlockedBy("has_natural_quartz", has(ItemRegistry.NATURAL_QUARTZ.get())).save(output, malumPath("natural_quartz_from_blasting")); smelting(Ingredient.of(ItemRegistry.DEEPSLATE_QUARTZ_ORE.get()), RecipeCategory.MISC, ItemRegistry.NATURAL_QUARTZ.get(), 0.25f, 200).unlockedBy("has_natural_quartz", has(ItemRegistry.NATURAL_QUARTZ.get())).save(output, malumPath("natural_quartz_from_deepslate_smelting")); blasting(Ingredient.of(ItemRegistry.DEEPSLATE_QUARTZ_ORE.get()), RecipeCategory.MISC, ItemRegistry.NATURAL_QUARTZ.get(), 0.25f, 100).unlockedBy("has_natural_quartz", has(ItemRegistry.NATURAL_QUARTZ.get())).save(output, malumPath("natural_quartz_from_deepslate_blasting")); - smeltingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_STONE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_smelting")); - blastingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_STONE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_blasting")); - smeltingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_DEEPSLATE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_deepslate_smelting")); - blastingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_DEEPSLATE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_deepslate_blasting")); + smeltingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_STONE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_smelting")); + blastingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_STONE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_blasting")); + smeltingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_DEEPSLATE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_deepslate_smelting")); + blastingWithCount(Ingredient.of(ItemRegistry.BRILLIANT_DEEPSLATE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_deepslate_blasting")); smeltingWithCount(Ingredient.of(ItemRegistry.SOULSTONE_ORE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 2, 0.25f, 200).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_smelting")); blastingWithCount(Ingredient.of(ItemRegistry.SOULSTONE_ORE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 2, 0.25f, 100).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_blasting")); smeltingWithCount(Ingredient.of(ItemRegistry.DEEPSLATE_SOULSTONE_ORE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 2, 0.25f, 200).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_deepslate_smelting")); blastingWithCount(Ingredient.of(ItemRegistry.DEEPSLATE_SOULSTONE_ORE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 2, 0.25f, 100).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_deepslate_blasting")); - smeltingWithCount(Ingredient.of(ItemRegistry.CLUSTER_OF_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_raw_smelting")); - blastingWithCount(Ingredient.of(ItemRegistry.CLUSTER_OF_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_raw_blasting")); - smeltingWithCount(Ingredient.of(ItemRegistry.CRUSHED_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_crushed_smelting")); - blastingWithCount(Ingredient.of(ItemRegistry.CRUSHED_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.CHUNK_OF_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_crushed_blasting")); + smeltingWithCount(Ingredient.of(ItemRegistry.RAW_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_raw_smelting")); + blastingWithCount(Ingredient.of(ItemRegistry.RAW_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_raw_blasting")); + smeltingWithCount(Ingredient.of(ItemRegistry.CRUSHED_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 200).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_crushed_smelting")); + blastingWithCount(Ingredient.of(ItemRegistry.CRUSHED_BRILLIANCE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_BRILLIANCE.get(), 2, 1, 100).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_crushed_blasting")); smeltingWithCount(Ingredient.of(ItemRegistry.RAW_SOULSTONE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 2, 0.25f, 200).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_raw_smelting")); blastingWithCount(Ingredient.of(ItemRegistry.RAW_SOULSTONE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 2, 0.25f, 100).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_raw_blasting")); smeltingWithCount(Ingredient.of(ItemRegistry.CRUSHED_SOULSTONE.get()), RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 2, 0.25f, 200).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_crushed_smelting")); @@ -162,8 +165,8 @@ protected static void buildRecipes(RecipeOutput output) { shapeless(RecipeCategory.MISC, ItemRegistry.BLAZING_QUARTZ.get(), 9).requires(ItemRegistry.BLOCK_OF_BLAZING_QUARTZ.get()).unlockedBy("has_blazing_quartz", has(ItemRegistry.BLAZING_QUARTZ.get())).save(output, malumPath("blazing_quartz_from_block")); shaped(RecipeCategory.MISC, ItemRegistry.BLOCK_OF_ARCANE_CHARCOAL.get()).define('#', ItemRegistry.ARCANE_CHARCOAL.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_arcane_charcoal", has(ItemRegistry.ARCANE_CHARCOAL.get())).save(output, malumPath("block_of_arcane_charcoal")); shapeless(RecipeCategory.MISC, ItemRegistry.ARCANE_CHARCOAL.get(), 9).requires(ItemRegistry.BLOCK_OF_ARCANE_CHARCOAL.get()).unlockedBy("has_arcane_charcoal", has(ItemRegistry.ARCANE_CHARCOAL.get())).save(output, malumPath("arcane_charcoal_from_block")); - shaped(RecipeCategory.MISC, ItemRegistry.BLOCK_OF_BRILLIANCE.get()).define('#', ItemRegistry.CLUSTER_OF_BRILLIANCE.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("block_of_brilliance")); - shapeless(RecipeCategory.MISC, ItemRegistry.CLUSTER_OF_BRILLIANCE.get(), 9).requires(ItemRegistry.BLOCK_OF_BRILLIANCE.get()).unlockedBy("has_brilliance", has(ItemRegistry.CLUSTER_OF_BRILLIANCE.get())).save(output, malumPath("brilliance_from_block")); + shaped(RecipeCategory.MISC, ItemRegistry.BLOCK_OF_BRILLIANCE.get()).define('#', ItemRegistry.RAW_BRILLIANCE.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("block_of_brilliance")); + shapeless(RecipeCategory.MISC, ItemRegistry.RAW_BRILLIANCE.get(), 9).requires(ItemRegistry.BLOCK_OF_BRILLIANCE.get()).unlockedBy("has_brilliance", has(ItemRegistry.RAW_BRILLIANCE.get())).save(output, malumPath("brilliance_from_block")); shaped(RecipeCategory.MISC, ItemRegistry.BLOCK_OF_SOULSTONE.get()).define('#', ItemRegistry.REFINED_SOULSTONE.get()).pattern("###").pattern("###").pattern("###").unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("block_of_soulstone")); shapeless(RecipeCategory.MISC, ItemRegistry.REFINED_SOULSTONE.get(), 9).requires(ItemRegistry.BLOCK_OF_SOULSTONE.get()).unlockedBy("has_soulstone", has(ItemRegistry.RAW_SOULSTONE.get())).save(output, malumPath("soulstone_from_block")); @@ -199,7 +202,7 @@ protected static void buildRecipes(RecipeOutput output) { //MISC shaped(RecipeCategory.MISC, Items.NETHERRACK, 2).define('Z', ItemRegistry.BLAZING_QUARTZ.get()).define('Y', Tags.Items.COBBLESTONES).pattern("ZY").pattern("YZ").unlockedBy("has_blazing_quartz", has(ItemRegistry.BLAZING_QUARTZ.get())).save(output, malumPath("netherrack_from_blazing_quartz")); - shapeless(RecipeCategory.MISC, Items.EXPERIENCE_BOTTLE).requires(ItemRegistry.CHUNK_OF_BRILLIANCE.get()).requires(Items.GLASS_BOTTLE).unlockedBy("has_brilliance", has(ItemRegistry.CHUNK_OF_BRILLIANCE.get())).save(output, malumPath("experience_bottle_from_brilliance")); + shapeless(RecipeCategory.MISC, Items.EXPERIENCE_BOTTLE).requires(ItemRegistry.REFINED_BRILLIANCE.get()).requires(Items.GLASS_BOTTLE).unlockedBy("has_brilliance", has(ItemRegistry.REFINED_BRILLIANCE.get())).save(output, malumPath("experience_bottle_from_brilliance")); shapeless(RecipeCategory.MISC, Items.BONE_MEAL, 6).requires(ItemRegistry.GRIM_TALC.get()).unlockedBy("has_grim_talc", has(ItemRegistry.GRIM_TALC.get())).save(output, malumPath("bonemeal_from_grim_talc")); shaped(RecipeCategory.MISC, Items.SKELETON_SKULL).define('#', ItemRegistry.GRIM_TALC.get()).define('&', Tags.Items.BONES).pattern("&&&").pattern("&#&").pattern("&&&").unlockedBy("has_grim_talc", has(ItemRegistry.GRIM_TALC.get())).save(output, malumPath("skeleton_skull_from_grim_talc")); diff --git a/src/main/java/com/sammy/malum/data/recipe/MalumVoidFavorRecipes.java b/src/main/java/com/sammy/malum/data/recipe/MalumVoidFavorRecipes.java index 634e69eb4..104b2f303 100644 --- a/src/main/java/com/sammy/malum/data/recipe/MalumVoidFavorRecipes.java +++ b/src/main/java/com/sammy/malum/data/recipe/MalumVoidFavorRecipes.java @@ -29,9 +29,9 @@ protected static void buildRecipes(RecipeOutput recipeOutput) { new VoidFavorRecipeBuilder(ItemRegistry.HEX_ASH.get(), ItemRegistry.VOID_SALTS.get(), 1) .save(recipeOutput); - new VoidFavorRecipeBuilder(ItemRegistry.CHUNK_OF_BRILLIANCE.get(), ItemRegistry.MNEMONIC_FRAGMENT.get(), 1) + new VoidFavorRecipeBuilder(ItemRegistry.REFINED_BRILLIANCE.get(), ItemRegistry.MNEMONIC_FRAGMENT.get(), 1) .save(recipeOutput); - new VoidFavorRecipeBuilder(ItemRegistry.CLUSTER_OF_BRILLIANCE.get(), ItemRegistry.MNEMONIC_FRAGMENT.get(), 2) + new VoidFavorRecipeBuilder(ItemRegistry.RAW_BRILLIANCE.get(), ItemRegistry.MNEMONIC_FRAGMENT.get(), 2) .save(recipeOutput, MalumMod.malumPath("mnemonic_fragment_from_cluster")); new VoidFavorRecipeBuilder(Items.BLAZE_POWDER, ItemRegistry.AURIC_EMBERS.get(), 1) 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 de176361e..4ff83a009 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 @@ -57,7 +57,7 @@ public static void buildRecipes(RecipeOutput recipeOutput) { .save(recipeOutput); new SpiritInfusionRecipeBuilder(ItemRegistry.GILDED_RING.get(), 1, ItemRegistry.RING_OF_ARCANE_PROWESS.get(), 1) - .addExtraItem(ItemRegistry.CLUSTER_OF_BRILLIANCE.get(), 4) + .addExtraItem(ItemRegistry.RAW_BRILLIANCE.get(), 4) .addExtraItem(ItemRegistry.ALCHEMICAL_CALX.get(), 4) .addSpirit(ARCANE_SPIRIT, 32) .save(recipeOutput); diff --git a/src/main/java/com/sammy/malum/data/recipe/infusion/MiscSpiritInfusionRecipes.java b/src/main/java/com/sammy/malum/data/recipe/infusion/MiscSpiritInfusionRecipes.java index 4e456039c..79f6dc747 100644 --- a/src/main/java/com/sammy/malum/data/recipe/infusion/MiscSpiritInfusionRecipes.java +++ b/src/main/java/com/sammy/malum/data/recipe/infusion/MiscSpiritInfusionRecipes.java @@ -21,7 +21,7 @@ public static void buildRecipes(RecipeOutput consumer) { .save(consumer); new SpiritInfusionRecipeBuilder(ItemRegistry.RUNEWOOD_PLANKS.get(), 2, ItemRegistry.BRILLIANT_OBELISK.get(), 1) - .addExtraItem(ItemRegistry.CLUSTER_OF_BRILLIANCE.get(), 2) + .addExtraItem(ItemRegistry.RAW_BRILLIANCE.get(), 2) .addExtraItem(ItemRegistry.HEX_ASH.get(), 1) .addSpirit(AERIAL_SPIRIT, 16) .addSpirit(AQUEOUS_SPIRIT, 8) diff --git a/src/main/java/com/sammy/malum/registry/common/RitualRegistry.java b/src/main/java/com/sammy/malum/registry/common/RitualRegistry.java index 92306e538..707e5148b 100644 --- a/src/main/java/com/sammy/malum/registry/common/RitualRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/RitualRegistry.java @@ -7,6 +7,8 @@ import java.util.*; public class RitualRegistry { + + //TODO: convert to deferred register public static List RITUALS = new ArrayList<>(); public static MalumRitualType RITUAL_OF_IDLE_MENDING = create(new IdleMendingRitualType()); @@ -24,6 +26,6 @@ public static MalumRitualType create(MalumRitualType type) { } public static MalumRitualType get(ResourceLocation resourceLocation) { - return RITUALS.stream().filter(r -> r.identifier.equals(resourceLocation)).findFirst().orElse(null); + return RITUALS.stream().filter(r -> r.id.equals(resourceLocation)).findFirst().orElse(null); } } diff --git a/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java b/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java index a1d3dade2..90a2aa46e 100644 --- a/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java @@ -479,7 +479,7 @@ public static void setBlockColors(RegisterColorHandlersEvent.Block event) { float color = s.getValue(colorProperty); float pct = (colorMax - (color / colorMax)); float value = Easing.SINE_IN_OUT.ease(pct, 0, 1, 1); - var leaves = (iGradientedLeavesBlock) s.getBlock(); + var leaves = (IGradientedLeavesBlock) s.getBlock(); int red = (int) Mth.lerp(value, leaves.getMinColor().getRed(), leaves.getMaxColor().getRed()); int green = (int) Mth.lerp(value, leaves.getMinColor().getGreen(), leaves.getMaxColor().getGreen()); int blue = (int) Mth.lerp(value, leaves.getMinColor().getBlue(), leaves.getMaxColor().getBlue()); @@ -493,7 +493,7 @@ public static void setBlockColors(RegisterColorHandlersEvent.Block event) { float color = s.getValue(colorProperty); float pct = Math.max((distanceMax - distance) / distanceMax, color / colorMax); float value = Easing.SINE_IN_OUT.ease(pct, 0, 1, 1); - var leaves = (iGradientedLeavesBlock) s.getBlock(); + var leaves = (IGradientedLeavesBlock) s.getBlock(); int red = (int) Mth.lerp(value, leaves.getMinColor().getRed(), leaves.getMaxColor().getRed()); int green = (int) Mth.lerp(value, leaves.getMinColor().getGreen(), leaves.getMaxColor().getGreen()); int blue = (int) Mth.lerp(value, leaves.getMinColor().getBlue(), leaves.getMaxColor().getBlue()); diff --git a/src/main/java/com/sammy/malum/registry/common/item/ArmorTiers.java b/src/main/java/com/sammy/malum/registry/common/item/ArmorTiers.java index bdf8d89c2..b9d879355 100644 --- a/src/main/java/com/sammy/malum/registry/common/item/ArmorTiers.java +++ b/src/main/java/com/sammy/malum/registry/common/item/ArmorTiers.java @@ -18,7 +18,7 @@ public class ArmorTiers { - public static final Holder SPIRIT_HUNTER = register("spirit_hunter", Util.make(new EnumMap<>(ArmorItem.Type.class), defense -> { + public static final Holder SOUL_HUNTER = register("spirit_hunter", Util.make(new EnumMap<>(ArmorItem.Type.class), defense -> { defense.put(ArmorItem.Type.BOOTS, 1); defense.put(ArmorItem.Type.LEGGINGS, 3); defense.put(ArmorItem.Type.CHESTPLATE, 4); @@ -43,13 +43,8 @@ public class ArmorTiers { }), 32, SoundEvents.ARMOR_EQUIP_NETHERITE, 2.0F, 0.1f, () -> Ingredient.of(ItemRegistry.MALIGNANT_PEWTER_PLATING.get())); private static Holder register( - String name, - EnumMap defense, - int enchantmentValue, - Holder equipSound, - float toughness, - float knockbackResistance, - Supplier repairIngredient + String name, EnumMap defense, int enchantmentValue, + Holder equipSound, float toughness, float knockbackResistance, Supplier repairIngredient ) { List list = List.of(new ArmorMaterial.Layer(ResourceLocation.withDefaultNamespace(name))); EnumMap enummap = new EnumMap<>(ArmorItem.Type.class); diff --git a/src/main/java/com/sammy/malum/registry/common/item/DataComponentRegistry.java b/src/main/java/com/sammy/malum/registry/common/item/DataComponentRegistry.java index c8eeec3e8..eabc7e3d4 100644 --- a/src/main/java/com/sammy/malum/registry/common/item/DataComponentRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/item/DataComponentRegistry.java @@ -2,9 +2,8 @@ import com.mojang.serialization.Codec; import com.sammy.malum.MalumMod; -import com.sammy.malum.common.item.curiosities.*; +import com.sammy.malum.common.data_components.*; import com.sammy.malum.common.item.curiosities.TemporarilyDisabledItem.Disabled; -import com.sammy.malum.common.item.spirit.RitualShardItem; import com.sammy.malum.common.item.spirit.SpiritJarItem; import net.minecraft.core.component.DataComponentType; import net.minecraft.core.registries.Registries; @@ -15,29 +14,29 @@ import java.util.function.UnaryOperator; -public interface DataComponentRegistry { - DeferredRegister> COMPONENTS = DeferredRegister.create(Registries.DATA_COMPONENT_TYPE, MalumMod.MALUM); +public class DataComponentRegistry { + public static final DeferredRegister> COMPONENTS = DeferredRegister.create(Registries.DATA_COMPONENT_TYPE, MalumMod.MALUM); - DeferredHolder, DataComponentType> RITUAL_SHARD_PROPS = register("shard_properties", RitualShardItem.Props.CODEC); + public static final DeferredHolder, DataComponentType> SOULWOVEN_POUCH_CONTENTS = register("soulwoven_pouch_data", builder -> + builder.persistent(SoulwovenPouchContents.CODEC).networkSynchronized(SoulwovenPouchContents.STREAM_CODEC)); - DeferredHolder, DataComponentType> ITEM_SKIN = register("item_skin", builder -> - builder.persistent(Codec.STRING).networkSynchronized(ByteBufCodecs.STRING_UTF8) - ); + public static final DeferredHolder, DataComponentType> RITUAL_DATA = register("ritual_data", builder -> + builder.persistent(RitualData.CODEC).networkSynchronized(RitualData.STREAM_CODEC)); - DeferredHolder, DataComponentType> CATALYST_FLINGER_DATA = register("data", CatalystFlingerItem.FlingerData.CODEC); + public static final DeferredHolder, DataComponentType> ITEM_SKIN = register("item_skin", builder -> + builder.persistent(Codec.STRING).networkSynchronized(ByteBufCodecs.STRING_UTF8)); - DeferredHolder, DataComponentType> SPIRIT_JAR_CONTENTS = register("spirit_jar_contents", builder -> - builder.persistent(SpiritJarItem.Contents.CODEC).networkSynchronized(SpiritJarItem.Contents.STREAM_CODEC) - ); + public static final DeferredHolder, DataComponentType> CATALYST_LOBBER_STATE = register("catalyst_flinger_state", builder -> + builder.persistent(CatalystFlingerState.CODEC).networkSynchronized(CatalystFlingerState.STREAM_CODEC)); - DeferredHolder, DataComponentType> SECONDARY_DYE_COLOR = register("secondary_dye_color", builder -> - builder.persistent(DyedItemColor.CODEC).networkSynchronized(DyedItemColor.STREAM_CODEC) - ); + public static final DeferredHolder, DataComponentType> SPIRIT_JAR_CONTENTS = register("spirit_jar_contents", builder -> + builder.persistent(SpiritJarItem.Contents.CODEC).networkSynchronized(SpiritJarItem.Contents.STREAM_CODEC)); - DeferredHolder, DataComponentType> DISABLED = register("disabled", builder -> - builder.persistent(Disabled.CODEC).networkSynchronized(Disabled.STREAM_CODEC) - ); + public static final DeferredHolder, DataComponentType> SECONDARY_DYE_COLOR = register("secondary_dye_color", builder -> + builder.persistent(DyedItemColor.CODEC).networkSynchronized(DyedItemColor.STREAM_CODEC)); + public static final DeferredHolder, DataComponentType> DISABLED = register("disabled_item_storage", builder -> + builder.persistent(Disabled.CODEC).networkSynchronized(Disabled.STREAM_CODEC)); static DeferredHolder, DataComponentType> register(String name, UnaryOperator> builder) { return COMPONENTS.register(name, () -> builder.apply(DataComponentType.builder()).build()); @@ -46,6 +45,4 @@ static DeferredHolder, DataComponentType> register(S static DeferredHolder, DataComponentType> register(String name, Codec codec) { return COMPONENTS.register(name, () -> DataComponentType.builder().persistent(codec).networkSynchronized(ByteBufCodecs.fromCodec(codec)).build()); } - - //ByteBufCodecs.fromCodec(CatalystFlingerItem.FlingerData.CODEC) -} +} \ No newline at end of file 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 855ec2d01..915c6cae0 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 @@ -39,13 +39,13 @@ import com.sammy.malum.common.item.impetus.*; import com.sammy.malum.common.item.spirit.*; import com.sammy.malum.compability.farmersdelight.*; -import com.sammy.malum.core.systems.spirit.*; import com.sammy.malum.registry.client.*; import com.sammy.malum.registry.common.*; import com.sammy.malum.registry.common.block.*; import com.sammy.malum.registry.common.entity.*; import com.sammy.malum.registry.common.item.tabs.*; import net.minecraft.client.color.item.*; +import net.minecraft.client.renderer.item.*; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.*; import net.minecraft.world.food.*; @@ -66,7 +66,6 @@ import team.lodestar.lodestone.systems.multiblock.*; import top.theillusivec4.curios.api.client.*; -import java.awt.*; import java.util.List; import java.util.*; import java.util.function.*; @@ -153,6 +152,9 @@ public static DeferredHolder register(String name, Ite public static final DeferredHolder ENCYCLOPEDIA_ESOTERICA = register("encyclopedia_esoterica", GEAR_PROPERTIES().rarity(EPIC), EncyclopediaEsotericaItem::new); + public static final DeferredHolder ARCANE_ELEGY = register("music_disc_arcane_elegy", HIDDEN_PROPERTIES().rarity(RARE), ArcaneElegyMusicDiscItem::new); + public static final DeferredHolder AESTHETICA = register("music_disc_aesthetica", HIDDEN_PROPERTIES().rarity(RARE), AestheticaMusicDiscItem::new); + //region random stuff public static final DeferredHolder COPPER_NUGGET = register("copper_nugget", new LodestoneItemProperties(CreativeModeTabs.INGREDIENTS), Item::new); public static final DeferredHolder COAL_FRAGMENT = register("coal_fragment", new LodestoneItemProperties(CreativeModeTabs.INGREDIENTS), (p) -> new LodestoneFuelItem(p, 200)); @@ -449,9 +451,9 @@ public static DeferredHolder register(String name, Ite public static final DeferredHolder BLOCK_OF_BRILLIANCE = register("block_of_brilliance", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_BRILLIANCE.get(), p)); public static final DeferredHolder BRILLIANT_DEEPSLATE = register("brilliant_deepslate", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BRILLIANT_DEEPSLATE.get(), p)); public static final DeferredHolder BRILLIANT_STONE = register("brilliant_stone", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BRILLIANT_STONE.get(), p)); - public static final DeferredHolder CLUSTER_OF_BRILLIANCE = register("cluster_of_brilliance", DEFAULT_PROPERTIES(), Item::new); + public static final DeferredHolder RAW_BRILLIANCE = register("raw_brilliance", DEFAULT_PROPERTIES(), Item::new); public static final DeferredHolder CRUSHED_BRILLIANCE = register("crushed_brilliance", DEFAULT_PROPERTIES(), Item::new); - public static final DeferredHolder CHUNK_OF_BRILLIANCE = register("chunk_of_brilliance", DEFAULT_PROPERTIES(), (p) -> new BrillianceChunkItem(p.food((new FoodProperties.Builder()).fast().alwaysEdible().build()))); + public static final DeferredHolder REFINED_BRILLIANCE = register("refined_brilliance", DEFAULT_PROPERTIES(), (p) -> new BrillianceChunkItem(p.food((new FoodProperties.Builder()).fast().alwaysEdible().build()))); public static final DeferredHolder BLOCK_OF_ARCANE_CHARCOAL = register("block_of_arcane_charcoal", DEFAULT_PROPERTIES(), (p) -> new LodestoneFuelBlockItem(BlockRegistry.BLOCK_OF_ARCANE_CHARCOAL.get(), p, 32000)); public static final DeferredHolder ARCANE_CHARCOAL = register("arcane_charcoal", DEFAULT_PROPERTIES(), (p) -> new LodestoneFuelItem(p, 3200)); @@ -492,11 +494,11 @@ public static DeferredHolder register(String name, Ite public static final DeferredHolder BLOCK_OF_ROTTING_ESSENCE = register("block_of_rotting_essence", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_ROTTING_ESSENCE.get(), p)); public static final DeferredHolder BLOCK_OF_GRIM_TALC = register("block_of_grim_talc", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_GRIM_TALC.get(), p)); public static final DeferredHolder BLOCK_OF_ASTRAL_WEAVE = register("block_of_astral_weave", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_ASTRAL_WEAVE.get(), p)); -// public static final DeferredHolder BLOCK_OF_WARP_FLUX = register("block_of_warp_flux", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_WARP_FLUX.get(), p)); + // public static final DeferredHolder BLOCK_OF_WARP_FLUX = register("block_of_warp_flux", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_WARP_FLUX.get(), p)); public static final DeferredHolder BLOCK_OF_HEX_ASH = register("block_of_hex_ash", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_HEX_ASH.get(), p)); public static final DeferredHolder BLOCK_OF_LIVING_FLESH = register("block_of_living_flesh", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_LIVING_FLESH.get(), p)); public static final DeferredHolder BLOCK_OF_ALCHEMICAL_CALX = register("block_of_alchemical_calx", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_ALCHEMICAL_CALX.get(), p)); -// public static final DeferredHolder BLOCK_OF_CALCIFIED_BLIGHT = register("block_of_calcified_blight", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_CALCIFIED_BLIGHT.get(), p)); + // public static final DeferredHolder BLOCK_OF_CALCIFIED_BLIGHT = register("block_of_calcified_blight", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_CALCIFIED_BLIGHT.get(), p)); public static final DeferredHolder MASS_OF_BLIGHTED_GUNK = register("mass_of_blighted_gunk", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.MASS_OF_BLIGHTED_GUNK.get(), p)); public static final DeferredHolder BLOCK_OF_NULL_SLATE = register("block_of_null_slate", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_NULL_SLATE.get(), p)); public static final DeferredHolder BLOCK_OF_VOID_SALTS = register("block_of_void_salts", DEFAULT_PROPERTIES(), (p) -> new BlockItem(BlockRegistry.BLOCK_OF_VOID_SALTS.get(), p)); @@ -541,33 +543,8 @@ public static DeferredHolder register(String name, Ite public static final DeferredHolder MALIGNANT_PEWTER_PLATING = register("malignant_pewter_plating", DEFAULT_PROPERTIES(), Item::new); public static final DeferredHolder MALIGNANT_PEWTER_NUGGET = register("malignant_pewter_nugget", DEFAULT_PROPERTIES(), Item::new); - //region ether - public static final DeferredHolder ETHER = register("ether", DEFAULT_PROPERTIES(), (p) -> new EtherItem(BlockRegistry.ETHER.get(), p, false)); - public static final DeferredHolder ETHER_TORCH = register("ether_torch", DEFAULT_PROPERTIES(), (p) -> new EtherTorchItem(BlockRegistry.ETHER_TORCH.get(), BlockRegistry.WALL_ETHER_TORCH.get(), p, false)); - public static final DeferredHolder TAINTED_ETHER_BRAZIER = register("tainted_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TAINTED_ETHER_BRAZIER.get(), p, false)); - public static final DeferredHolder TWISTED_ETHER_BRAZIER = register("twisted_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TWISTED_ETHER_BRAZIER.get(), p, false)); - - public static final DeferredHolder IRIDESCENT_ETHER = register("iridescent_ether", DEFAULT_PROPERTIES(), (p) -> new EtherItem(BlockRegistry.IRIDESCENT_ETHER.get(), p, true)); - public static final DeferredHolder IRIDESCENT_ETHER_TORCH = register("iridescent_ether_torch", DEFAULT_PROPERTIES(), (p) -> new EtherTorchItem(BlockRegistry.IRIDESCENT_ETHER_TORCH.get(), BlockRegistry.IRIDESCENT_WALL_ETHER_TORCH.get(), p, true)); - public static final DeferredHolder TAINTED_IRIDESCENT_ETHER_BRAZIER = register("tainted_iridescent_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TAINTED_IRIDESCENT_ETHER_BRAZIER.get(), p, true)); - public static final DeferredHolder TWISTED_IRIDESCENT_ETHER_BRAZIER = register("twisted_iridescent_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TWISTED_IRIDESCENT_ETHER_BRAZIER.get(), p, true)); - //endregion - - public static final DeferredHolder MENDING_DIFFUSER = register("mending_diffuser", DEFAULT_PROPERTIES(), MendingDiffuserItem::new); - public static final DeferredHolder IMPURITY_STABILIZER = register("impurity_stabilizer", DEFAULT_PROPERTIES(), ImpurityStabilizer::new); - public static final DeferredHolder SHIELDING_APPARATUS = register("shielding_apparatus", DEFAULT_PROPERTIES(), ShieldingApparatusItem::new); - public static final DeferredHolder WARPING_ENGINE = register("warping_engine", DEFAULT_PROPERTIES(), WarpingEngineItem::new); - public static final DeferredHolder ACCELERATING_INLAY = register("accelerating_inlay", DEFAULT_PROPERTIES(), AcceleratingInlayItem::new); - public static final DeferredHolder PRISMATIC_FOCUS_LENS = register("prismatic_focus_lens", DEFAULT_PROPERTIES(), PrismaticFocusLensItem::new); - public static final DeferredHolder BLAZING_DIODE = register("blazing_diode", DEFAULT_PROPERTIES(), BlazingDiodeItem::new); - public static final DeferredHolder INTRICATE_ASSEMBLY = register("intricate_assembly", DEFAULT_PROPERTIES(), IntricateAssemblyItem::new); - public static final DeferredHolder STELLAR_MECHANISM = register("stellar_mechanism", DEFAULT_PROPERTIES(), StellarMechanismItem::new); - - public static final DeferredHolder TUNING_FORK = register("tuning_fork", GEAR_PROPERTIES(), Item::new); - public static final DeferredHolder LAMPLIGHTERS_TONGS = register("lamplighters_tongs", GEAR_PROPERTIES(), LamplightersTongsItem::new); - - public static final DeferredHolder CATALYST_LOBBER = register("catalyst_lobber", GEAR_PROPERTIES(), (p) -> new CatalystFlingerItem(p.durability(500), EthericNitrateEntity::new)); + //region impetus public static final DeferredHolder CRACKED_IRON_IMPETUS = register("cracked_iron_impetus", METALLURGIC_PROPERTIES(), CrackedImpetusItem::new); public static final DeferredHolder IRON_IMPETUS = register("iron_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_IRON_IMPETUS)); public static final DeferredHolder IRON_NODE = register("iron_node", METALLURGIC_NODE_PROPERTIES(), NodeItem::new); @@ -606,13 +583,41 @@ public static DeferredHolder register(String name, Ite public static final DeferredHolder ALCHEMICAL_IMPETUS = register("alchemical_impetus", METALLURGIC_PROPERTIES().durability(800), (p) -> new ImpetusItem(p).setCrackedVariant(CRACKED_ALCHEMICAL_IMPETUS)); //endregion - //region contents - public static final DeferredHolder TOTEMIC_STAFF = register("totemic_staff", GEAR_PROPERTIES(), TotemicStaffItem::new); + //region ether + public static final DeferredHolder ETHER = register("ether", DEFAULT_PROPERTIES(), (p) -> new EtherItem(BlockRegistry.ETHER.get(), p, false)); + public static final DeferredHolder ETHER_TORCH = register("ether_torch", DEFAULT_PROPERTIES(), (p) -> new EtherTorchItem(BlockRegistry.ETHER_TORCH.get(), BlockRegistry.WALL_ETHER_TORCH.get(), p, false)); + public static final DeferredHolder TAINTED_ETHER_BRAZIER = register("tainted_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TAINTED_ETHER_BRAZIER.get(), p, false)); + public static final DeferredHolder TWISTED_ETHER_BRAZIER = register("twisted_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TWISTED_ETHER_BRAZIER.get(), p, false)); + + public static final DeferredHolder IRIDESCENT_ETHER = register("iridescent_ether", DEFAULT_PROPERTIES(), (p) -> new EtherItem(BlockRegistry.IRIDESCENT_ETHER.get(), p, true)); + public static final DeferredHolder IRIDESCENT_ETHER_TORCH = register("iridescent_ether_torch", DEFAULT_PROPERTIES(), (p) -> new EtherTorchItem(BlockRegistry.IRIDESCENT_ETHER_TORCH.get(), BlockRegistry.IRIDESCENT_WALL_ETHER_TORCH.get(), p, true)); + public static final DeferredHolder TAINTED_IRIDESCENT_ETHER_BRAZIER = register("tainted_iridescent_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TAINTED_IRIDESCENT_ETHER_BRAZIER.get(), p, true)); + public static final DeferredHolder TWISTED_IRIDESCENT_ETHER_BRAZIER = register("twisted_iridescent_ether_brazier", DEFAULT_PROPERTIES(), (p) -> new EtherBrazierItem(BlockRegistry.TWISTED_IRIDESCENT_ETHER_BRAZIER.get(), p, true)); + //endregion - public static final DeferredHolder SPIRIT_POUCH = register("spirit_pouch", GEAR_PROPERTIES(), SpiritPouchItem::new); + //region autmgnets + public static final DeferredHolder MENDING_DIFFUSER = register("mending_diffuser", DEFAULT_PROPERTIES(), MendingDiffuserItem::new); + public static final DeferredHolder IMPURITY_STABILIZER = register("impurity_stabilizer", DEFAULT_PROPERTIES(), ImpurityStabilizer::new); + public static final DeferredHolder SHIELDING_APPARATUS = register("shielding_apparatus", DEFAULT_PROPERTIES(), ShieldingApparatusItem::new); + public static final DeferredHolder WARPING_ENGINE = register("warping_engine", DEFAULT_PROPERTIES(), WarpingEngineItem::new); + public static final DeferredHolder ACCELERATING_INLAY = register("accelerating_inlay", DEFAULT_PROPERTIES(), AcceleratingInlayItem::new); + public static final DeferredHolder PRISMATIC_FOCUS_LENS = register("prismatic_focus_lens", DEFAULT_PROPERTIES(), PrismaticFocusLensItem::new); + public static final DeferredHolder BLAZING_DIODE = register("blazing_diode", DEFAULT_PROPERTIES(), BlazingDiodeItem::new); + public static final DeferredHolder INTRICATE_ASSEMBLY = register("intricate_assembly", DEFAULT_PROPERTIES(), IntricateAssemblyItem::new); + public static final DeferredHolder STELLAR_MECHANISM = register("stellar_mechanism", DEFAULT_PROPERTIES(), StellarMechanismItem::new); + //endregion + //region contents public static final DeferredHolder CONCENTRATED_GLUTTONY = register("concentrated_gluttony", DEFAULT_PROPERTIES().food(FoodPropertyRegistry.CONCENTRATED_GLUTTONY), ConcentratedGluttonyItem::new); public static final DeferredHolder SPLASH_OF_GLUTTONY = register("splash_of_gluttony", DEFAULT_PROPERTIES(), SplashOfGluttonyItem::new); + public static final DeferredHolder SOULWOVEN_POUCH = register("soulwoven_pouch", GEAR_PROPERTIES(), SoulwovenPouchItem::new); + public static final DeferredHolder TOTEMIC_STAFF = register("totemic_staff", GEAR_PROPERTIES(), TotemicStaffItem::new); + public static final DeferredHolder TUNING_FORK = register("tuning_fork", GEAR_PROPERTIES(), Item::new); + public static final DeferredHolder LAMPLIGHTERS_TONGS = register("lamplighters_tongs", GEAR_PROPERTIES(), LamplightersTongsItem::new); + + public static final DeferredHolder CATALYST_LOBBER = register("catalyst_lobber", GEAR_PROPERTIES(), (p) -> new CatalystLobberItem(p.durability(500), EthericNitrateEntity::new)); + + public static final DeferredHolder CRUDE_SCYTHE = register("crude_scythe", GEAR_PROPERTIES(), (p) -> new MalumScytheItem(Tiers.IRON, 0, 0.1f, p.durability(500))); public static final DeferredHolder SOUL_STAINED_STEEL_SCYTHE = register("soul_stained_steel_scythe", GEAR_PROPERTIES(), (p) -> new MagicScytheItem(SOUL_STAINED_STEEL, -2.5f, 0.1f, 4, p)); @@ -635,45 +640,17 @@ public static DeferredHolder register(String name, Ite public static final DeferredHolder TYRVING = register("tyrving", GEAR_PROPERTIES(), (p) -> new TyrvingItem(ItemTiers.TYRVING, 0, -0.3f, p)); - public static final DeferredHolder MALIGNANT_STRONGHOLD_HELMET = register("malignant_stronghold_helmet", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.HELMET, p)); - public static final DeferredHolder MALIGNANT_STRONGHOLD_CHESTPLATE = register("malignant_stronghold_chestplate", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.CHESTPLATE, p)); - public static final DeferredHolder MALIGNANT_STRONGHOLD_LEGGINGS = register("malignant_stronghold_leggings", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.LEGGINGS, p)); - public static final DeferredHolder MALIGNANT_STRONGHOLD_BOOTS = register("malignant_stronghold_boots", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.BOOTS, p)); - - public static final DeferredHolder WEIGHT_OF_WORLDS = register("weight_of_worlds", GEAR_PROPERTIES(), (p) -> new WeightOfWorldsItem(ItemTiers.MALIGNANT_ALLOY, 1, -0.3f, p)); - public static final DeferredHolder EDGE_OF_DELIVERANCE = register("edge_of_deliverance", GEAR_PROPERTIES(), (p) -> new EdgeOfDeliveranceItem(ItemTiers.MALIGNANT_ALLOY, 2, -0.2f, p)); - public static final DeferredHolder MNEMONIC_HEX_STAFF = register("mnemonic_hex_staff", GEAR_PROPERTIES(), (p) -> new HexStaffItem(HEX_STAFF, 5, p)); public static final DeferredHolder STAFF_OF_THE_AURIC_FLAME = register("staff_of_the_auric_flame", GEAR_PROPERTIES(), (p) -> new AuricFlameStaffItem(AURIC_STAFF, 7, p)); public static final DeferredHolder EROSION_SCEPTER = register("erosion_scepter", GEAR_PROPERTIES(), (p) -> new ErosionScepterItem(MALIGNANT_ALLOY, 5, p)); + public static final DeferredHolder WEIGHT_OF_WORLDS = register("weight_of_worlds", GEAR_PROPERTIES(), (p) -> new WeightOfWorldsItem(ItemTiers.MALIGNANT_ALLOY, 1, -0.3f, p)); + public static final DeferredHolder EDGE_OF_DELIVERANCE = register("edge_of_deliverance", GEAR_PROPERTIES(), (p) -> new EdgeOfDeliveranceItem(ItemTiers.MALIGNANT_ALLOY, 2, -0.2f, p)); - public static final DeferredHolder RUNE_OF_IDLE_RESTORATION = register("rune_of_idle_restoration", GEAR_PROPERTIES(), RuneIdleRestorationItem::new); - public static final DeferredHolder RUNE_OF_CULLING = register("rune_of_culling", GEAR_PROPERTIES(), RuneCullingItem::new); - public static final DeferredHolder RUNE_OF_REINFORCEMENT = register("rune_of_reinforcement", GEAR_PROPERTIES(), RuneReinforcementItem::new); - public static final DeferredHolder RUNE_OF_VOLATILE_DISTORTION = register("rune_of_volatile_distortion", GEAR_PROPERTIES(), RuneVolatileDistortionItem::new); - public static final DeferredHolder RUNE_OF_DEXTERITY = register("rune_of_dexterity", GEAR_PROPERTIES(), RuneDexterityItem::new); - public static final DeferredHolder RUNE_OF_ALIMENT_CLEANSING = register("rune_of_aliment_cleansing", GEAR_PROPERTIES(), RuneAlimentCleansingItem::new); - public static final DeferredHolder RUNE_OF_REACTIVE_SHIELDING = register("rune_of_reactive_shielding", GEAR_PROPERTIES(), RuneReactiveShieldingItem::new); - public static final DeferredHolder RUNE_OF_FERVOR = register("rune_of_fervor", GEAR_PROPERTIES(), RuneFervorItem::new); - - public static final DeferredHolder RUNE_OF_MOTION = register("rune_of_motion", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AERIAL_RITE, false)); - public static final DeferredHolder RUNE_OF_LOYALTY = register("rune_of_loyalty", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AQUEOUS_RITE, false)); - public static final DeferredHolder RUNE_OF_WARDING = register("rune_of_warding", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.EARTHEN_RITE, false)); - public static final DeferredHolder RUNE_OF_HASTE = register("rune_of_haste", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.INFERNAL_RITE, false)); - public static final DeferredHolder RUNE_OF_THE_AETHER = register("rune_of_the_aether", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AERIAL_RITE, true)); - public static final DeferredHolder RUNE_OF_THE_SEAS = register("rune_of_the_seas", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AQUEOUS_RITE, true)); - public static final DeferredHolder RUNE_OF_THE_ARENA = register("rune_of_the_arena", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.EARTHEN_RITE, true)); - public static final DeferredHolder RUNE_OF_THE_HELLS = register("rune_of_the_hells", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.INFERNAL_RITE, true, 10)); - - public static final DeferredHolder RUNE_OF_BOLSTERING = register("rune_of_bolstering", GEAR_PROPERTIES(), RuneBolsteringItem::new); - public static final DeferredHolder RUNE_OF_SACRIFICIAL_EMPOWERMENT = register("rune_of_sacrificial_empowerment", GEAR_PROPERTIES(), RuneSacrificialEmpowermentItem::new); - public static final DeferredHolder RUNE_OF_SPELL_MASTERY = register("rune_of_spell_mastery", GEAR_PROPERTIES(), RuneSpellMasteryItem::new); - public static final DeferredHolder RUNE_OF_THE_HERETIC = register("rune_of_the_heretic", GEAR_PROPERTIES(), RuneHereticItem::new); - public static final DeferredHolder RUNE_OF_UNNATURAL_STAMINA = register("rune_of_unnatural_stamina", GEAR_PROPERTIES(), RuneUnnaturalStaminaItem::new); - public static final DeferredHolder RUNE_OF_TWINNED_DURATION = register("rune_of_twinned_duration", GEAR_PROPERTIES(), RuneTwinnedDurationItem::new); - public static final DeferredHolder RUNE_OF_TOUGHNESS = register("rune_of_toughness", GEAR_PROPERTIES(), RuneToughnessItem::new); - public static final DeferredHolder RUNE_OF_IGNEOUS_SOLACE = register("rune_of_igneous_solace", GEAR_PROPERTIES(), RuneIgneousSolaceItem::new); + public static final DeferredHolder MALIGNANT_STRONGHOLD_HELMET = register("malignant_stronghold_helmet", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.HELMET, p)); + public static final DeferredHolder MALIGNANT_STRONGHOLD_CHESTPLATE = register("malignant_stronghold_chestplate", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.CHESTPLATE, p)); + public static final DeferredHolder MALIGNANT_STRONGHOLD_LEGGINGS = register("malignant_stronghold_leggings", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.LEGGINGS, p)); + public static final DeferredHolder MALIGNANT_STRONGHOLD_BOOTS = register("malignant_stronghold_boots", GEAR_PROPERTIES(), (p) -> new MalignantStrongholdArmorItem(ArmorItem.Type.BOOTS, p)); public static final DeferredHolder GILDED_RING = register("gilded_ring", GEAR_PROPERTIES(), CurioGildedRing::new); public static final DeferredHolder GILDED_BELT = register("gilded_belt", GEAR_PROPERTIES(), CurioGildedBelt::new); @@ -710,8 +687,33 @@ public static DeferredHolder register(String name, Ite public static final DeferredHolder NECKLACE_OF_THE_WATCHER = register("necklace_of_the_watcher", GEAR_PROPERTIES(), CurioWatcherNecklace::new); public static final DeferredHolder BELT_OF_THE_LIMITLESS = register("belt_of_the_limitless", GEAR_PROPERTIES(), CurioLimitlessBelt::new); - public static final DeferredHolder ARCANE_ELEGY = register("music_disc_arcane_elegy", HIDDEN_PROPERTIES().rarity(RARE), ArcaneElegyMusicDiscItem::new); - public static final DeferredHolder AESTHETICA = register("music_disc_aesthetica", HIDDEN_PROPERTIES().rarity(RARE), AestheticaMusicDiscItem::new); + + public static final DeferredHolder RUNE_OF_IDLE_RESTORATION = register("rune_of_idle_restoration", GEAR_PROPERTIES(), RuneIdleRestorationItem::new); + public static final DeferredHolder RUNE_OF_CULLING = register("rune_of_culling", GEAR_PROPERTIES(), RuneCullingItem::new); + public static final DeferredHolder RUNE_OF_REINFORCEMENT = register("rune_of_reinforcement", GEAR_PROPERTIES(), RuneReinforcementItem::new); + public static final DeferredHolder RUNE_OF_VOLATILE_DISTORTION = register("rune_of_volatile_distortion", GEAR_PROPERTIES(), RuneVolatileDistortionItem::new); + public static final DeferredHolder RUNE_OF_DEXTERITY = register("rune_of_dexterity", GEAR_PROPERTIES(), RuneDexterityItem::new); + public static final DeferredHolder RUNE_OF_ALIMENT_CLEANSING = register("rune_of_aliment_cleansing", GEAR_PROPERTIES(), RuneAlimentCleansingItem::new); + public static final DeferredHolder RUNE_OF_REACTIVE_SHIELDING = register("rune_of_reactive_shielding", GEAR_PROPERTIES(), RuneReactiveShieldingItem::new); + public static final DeferredHolder RUNE_OF_FERVOR = register("rune_of_fervor", GEAR_PROPERTIES(), RuneFervorItem::new); + + public static final DeferredHolder RUNE_OF_MOTION = register("rune_of_motion", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AERIAL_RITE, false)); + public static final DeferredHolder RUNE_OF_LOYALTY = register("rune_of_loyalty", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AQUEOUS_RITE, false)); + public static final DeferredHolder RUNE_OF_WARDING = register("rune_of_warding", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.EARTHEN_RITE, false)); + public static final DeferredHolder RUNE_OF_HASTE = register("rune_of_haste", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.INFERNAL_RITE, false)); + public static final DeferredHolder RUNE_OF_THE_AETHER = register("rune_of_the_aether", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AERIAL_RITE, true)); + public static final DeferredHolder RUNE_OF_THE_SEAS = register("rune_of_the_seas", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.AQUEOUS_RITE, true)); + public static final DeferredHolder RUNE_OF_THE_ARENA = register("rune_of_the_arena", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.EARTHEN_RITE, true)); + public static final DeferredHolder RUNE_OF_THE_HELLS = register("rune_of_the_hells", GEAR_PROPERTIES(), p -> new TotemicRuneCurioItem(p, SpiritRiteRegistry.INFERNAL_RITE, true, 10)); + + public static final DeferredHolder RUNE_OF_BOLSTERING = register("rune_of_bolstering", GEAR_PROPERTIES(), RuneBolsteringItem::new); + public static final DeferredHolder RUNE_OF_SACRIFICIAL_EMPOWERMENT = register("rune_of_sacrificial_empowerment", GEAR_PROPERTIES(), RuneSacrificialEmpowermentItem::new); + public static final DeferredHolder RUNE_OF_SPELL_MASTERY = register("rune_of_spell_mastery", GEAR_PROPERTIES(), RuneSpellMasteryItem::new); + public static final DeferredHolder RUNE_OF_THE_HERETIC = register("rune_of_the_heretic", GEAR_PROPERTIES(), RuneHereticItem::new); + public static final DeferredHolder RUNE_OF_UNNATURAL_STAMINA = register("rune_of_unnatural_stamina", GEAR_PROPERTIES(), RuneUnnaturalStaminaItem::new); + public static final DeferredHolder RUNE_OF_TWINNED_DURATION = register("rune_of_twinned_duration", GEAR_PROPERTIES(), RuneTwinnedDurationItem::new); + public static final DeferredHolder RUNE_OF_TOUGHNESS = register("rune_of_toughness", GEAR_PROPERTIES(), RuneToughnessItem::new); + public static final DeferredHolder RUNE_OF_IGNEOUS_SOLACE = register("rune_of_igneous_solace", GEAR_PROPERTIES(), RuneIgneousSolaceItem::new); //endregion //region cosmetics @@ -817,31 +819,20 @@ public static void addItemProperties(FMLClientSetupEvent event) { // for (LodestoneArmorItem armor : armors) { // ItemProperties.register(armor, new ResourceLocation(ArmorSkin.MALUM_SKIN_TAG), armorPropertyFunction); // } -// ItemProperties.register(RITUAL_SHARD.get(), new ResourceLocation(RitualShardItem.RITUAL_TYPE), (stack, level, holder, holderID) -> { -// if (!stack.hasTag()) { -// return -1; -// } -// CompoundTag nbt = stack.getTag(); -// if (!nbt.contains(RitualShardItem.RITUAL_TYPE)) { -// return -1; -// } -// if (!nbt.contains(RitualShardItem.STORED_SPIRITS)) { -// return -1; -// } -// MalumRitualTier tier = RitualShardItem.getRitualTier(stack); -// return tier.potency; -// }); -// -// ItemProperties.register(CATALYST_LOBBER.get(), new ResourceLocation(CatalystFlingerItem.STATE), (stack, level, holder, holderID) -> { -// if (!stack.hasTag()) { -// return -1; -// } -// CompoundTag nbt = stack.getTag(); -// if (!nbt.contains(CatalystFlingerItem.STATE)) { -// return -1; -// } -// return nbt.getInt(CatalystFlingerItem.STATE); -// }); + + ItemProperties.register( + SOULWOVEN_POUCH.get(), + MalumMod.malumPath("filled"), + (stack, level, holder, holderID) -> SoulwovenPouchItem.getFullnessDisplay(stack) + ); + ItemProperties.register( + RITUAL_SHARD.get(), + MalumMod.malumPath("tier"), + (stack, level, holder, holderID) -> RitualShardItem.getStateDisplay(stack)); + ItemProperties.register( + CATALYST_LOBBER.get(), + MalumMod.malumPath("state"), + (stack, level, holder, holderID) -> CatalystLobberItem.getStateDisplay(stack)); } @SubscribeEvent @@ -849,11 +840,12 @@ public static void setItemColors(RegisterColorHandlersEvent.Item event) { ItemColors itemColors = event.getItemColors(); HashSet> items = new HashSet<>(ITEMS.getEntries()); - DataHelper.takeAll(items, i -> i.get() instanceof BlockItem blockItem && blockItem.getBlock() instanceof iGradientedLeavesBlock).forEach(item -> { - iGradientedLeavesBlock malumLeavesBlock = (iGradientedLeavesBlock) ((BlockItem) item.get()).getBlock(); - itemColors.register((s, c) -> ColorHelper.getColor(malumLeavesBlock.getMaxColor()), item.get()); + DataHelper.takeAll(items, i -> i.get() instanceof BlockItem blockItem && blockItem.getBlock() instanceof IGradientedLeavesBlock).forEach(item -> { + IGradientedLeavesBlock malumLeavesBlock = (IGradientedLeavesBlock) ((BlockItem) item.get()).getBlock(); + event.register((stack, tintIndex) -> ColorHelper.getColor(malumLeavesBlock.getMaxColor()), + item.get()); }); - DataHelper.takeAll(items, i -> i.get() instanceof EtherTorchItem || i.get() instanceof EtherBrazierItem).forEach(i -> itemColors.register((s, c) -> { + DataHelper.takeAll(items, i -> i.get() instanceof EtherTorchItem || i.get() instanceof EtherBrazierItem).forEach(i -> event.register((s, c) -> { AbstractEtherItem etherItem = (AbstractEtherItem) s.getItem(); switch (c) { case 2 -> { @@ -867,27 +859,21 @@ public static void setItemColors(RegisterColorHandlersEvent.Item event) { } } }, i.get())); - DataHelper.takeAll(items, i -> i.get() instanceof EtherItem).forEach(i -> itemColors.register((s, c) -> { + DataHelper.takeAll(items, i -> i.get() instanceof EtherItem).forEach(i -> event.register((s, c) -> { AbstractEtherItem etherItem = (AbstractEtherItem) s.getItem(); return c == 0 ? etherItem.getFirstColor(s) : etherItem.getSecondColor(s); }, i.get())); DataHelper.takeAll(items, i -> i.get() instanceof SpiritShardItem).forEach(item -> - itemColors.register((s, c) -> ColorHelper.getColor(((SpiritShardItem) item.get()).type.getItemColor()), item.get())); - - DataHelper.takeAll(items, i -> i.get() instanceof AbstractRuneCurioItem).forEach(item -> - itemColors.register((s, c) -> { - if (c == 0) { - return -1; - } - final MalumSpiritType spiritType = ((AbstractRuneCurioItem) item.get()).spiritType; - Color color = spiritType.getItemColor(); - if (spiritType.equals(SpiritTypeRegistry.WICKED_SPIRIT) || spiritType.equals(SpiritTypeRegistry.ELDRITCH_SPIRIT)) { - color = color.brighter(); - } - return ColorHelper.getColor(color); - }, item.get())); - itemColors.register((s, c) -> RitualShardItem.getRitualType(s) == null ? -1 : ColorHelper.getColor(RitualShardItem.getRitualType(s).spirit.getItemColor()), RITUAL_SHARD.get()); + event.register((s, c) -> ColorHelper.getColor(((SpiritShardItem) item.get()).type.getItemColor()), item.get())); + + event.register((s, c) -> { + var data = s.get(DataComponentRegistry.RITUAL_DATA); + if (data == null) { + return -1; + } + return ColorHelper.getColor(data.ritualType().spirit.getItemColor()); + }, RITUAL_SHARD.get()); } } } diff --git a/src/main/java/com/sammy/malum/registry/common/item/ItemTagRegistry.java b/src/main/java/com/sammy/malum/registry/common/item/ItemTagRegistry.java index 42f91406c..c51073f34 100644 --- a/src/main/java/com/sammy/malum/registry/common/item/ItemTagRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/item/ItemTagRegistry.java @@ -7,10 +7,13 @@ import net.minecraft.world.item.*; public class ItemTagRegistry { - public static final TagKey SOUL_HUNTER_WEAPON = malumTag("soul_hunter_weapon"); - public static final TagKey MAGIC_CAPABLE_WEAPON = malumTag("magic_capable_weapon"); - public static final TagKey SCYTHE = malumTag("scythe"); - public static final TagKey STAFF = malumTag("staff"); + + public static final TagKey SOUL_SHATTER_CAPABLE_WEAPONS = malumTag("soul_shatter_capable_weapons"); + public static final TagKey MAGIC_CAPABLE_WEAPONS = malumTag("magic_capable_weapon"); + public static final TagKey SCYTHES = malumTag("scythe"); + public static final TagKey STAVES = malumTag("staff"); + public static final TagKey KNIVES_FD = modTag("farmersdelight:tools/knives"); + public static final TagKey KNIVES = forgeTag("tools/knives"); public static final TagKey ANIMATED_ENCHANTABLE = malumTag("enchantable/animated"); public static final TagKey REBOUND_ENCHANTABLE = malumTag("enchantable/rebound"); @@ -19,8 +22,36 @@ public class ItemTagRegistry { public static final TagKey HAUNTED_ENCHANTABLE = malumTag("enchantable/haunted"); public static final TagKey SPIRIT_SPOILS_ENCHANTABLE = malumTag("enchantable/spirit_spoils"); - public static final TagKey SPIRITS = malumTag("spirit"); + public static final TagKey SPIRITS = malumTag("spirits"); public static final TagKey ASPECTED_SPIRITS = malumTag("aspected_spirits"); + public static final TagKey MOB_DROPS = malumTag("mob_drops"); + public static final TagKey MATERIALS = malumTag("materials"); + public static final TagKey MINERALS = malumTag("minerals"); + public static final TagKey AUGMENTS = malumTag("augments"); + public static final TagKey METAL_NODES = malumTag("metal_nodes"); + public static final TagKey SOULWOVEN_BANNERS = malumTag("soulwoven_banners"); + + public static final TagKey SAPBALLS = malumTag("sapballs"); + public static final TagKey GROSS_FOODS = malumTag("gross_foods"); + + public static final TagKey PROSPECTORS_TREASURE = malumTag("prospectors_treasure"); + + public static final TagKey SOULHUNTERS_TREASURE = malumTag("soulhunters_treasure"); + public static final TagKey SOULWOVEN_POUCH_AUTOCOLLECT = malumTag("soulwoven_pouch_autocollect"); + + public static final TagKey HIDDEN_ALWAYS = malumTag("hidden_items/always"); + public static final TagKey HIDDEN_UNTIL_VOID = malumTag("hidden_items/void"); + public static final TagKey HIDDEN_UNTIL_BLACK_CRYSTAL = malumTag("hidden_items/black_crystal"); + + public static final TagKey ARCANE_ELEGY_COMPONENTS = malumTag("arcane_elegy_component"); + + public static final TagKey BROOCH = modTag("curios:brooch"); + public static final TagKey BELT = modTag("curios:belt"); + public static final TagKey CHARM = modTag("curios:charm"); + public static final TagKey NECKLACE = modTag("curios:necklace"); + public static final TagKey RING = modTag("curios:ring"); + public static final TagKey RUNE = modTag("curios:rune"); + public static final TagKey RUNEWOOD_BOARD_INGREDIENT = malumTag("runewood_board_ingredient"); public static final TagKey RUNEWOOD_LOGS = malumTag("runewood_logs"); @@ -46,28 +77,8 @@ public class ItemTagRegistry { public static final TagKey TWISTED_STAIRS = malumTag("twisted_rock_stairs"); public static final TagKey TWISTED_WALLS = malumTag("twisted_rock_walls"); - public static final TagKey SAPBALLS = malumTag("sapballs"); - public static final TagKey GROSS_FOODS = malumTag("gross_foods"); - public static final TagKey PROSPECTORS_TREASURE = malumTag("prospectors_treasure"); - public static final TagKey METAL_NODES = malumTag("metal_nodes"); - - public static final TagKey HIDDEN_ALWAYS = malumTag("hidden_items/always"); - public static final TagKey HIDDEN_UNTIL_VOID = malumTag("hidden_items/void"); - public static final TagKey HIDDEN_UNTIL_BLACK_CRYSTAL = malumTag("hidden_items/black_crystal"); - - public static final TagKey KNIVES_FD = modTag("farmersdelight:tools/knives"); - public static final TagKey KNIVES = forgeTag("tools/knives"); - public static final TagKey STRIPPED_LOGS = forgeTag("stripped_logs"); - public static final TagKey ARCANE_ELEGY_COMPONENTS = malumTag("arcane_elegy_component"); - - public static final TagKey BROOCH = modTag("curios:brooch"); - public static final TagKey BELT = modTag("curios:belt"); - public static final TagKey CHARM = modTag("curios:charm"); - public static final TagKey NECKLACE = modTag("curios:necklace"); - public static final TagKey RING = modTag("curios:ring"); - public static final TagKey RUNE = modTag("curios:rune"); private static TagKey modTag(String path) { diff --git a/src/main/java/com/sammy/malum/registry/common/item/tabs/CreativeTabRegistry.java b/src/main/java/com/sammy/malum/registry/common/item/tabs/CreativeTabRegistry.java index fb49cdb67..5064c6e3d 100644 --- a/src/main/java/com/sammy/malum/registry/common/item/tabs/CreativeTabRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/item/tabs/CreativeTabRegistry.java @@ -63,7 +63,7 @@ public class CreativeTabRegistry { for (MalumRitualType ritualType : RitualRegistry.RITUALS) { for (MalumRitualTier ritualTier : MalumRitualTier.TIERS) { ItemStack shard = new ItemStack(RITUAL_SHARD.get()); - shard.set(DataComponentRegistry.RITUAL_SHARD_PROPS, ritualType.createShardProps(ritualTier)); + shard.set(DataComponentRegistry.RITUAL_DATA, ritualType.createDataComponent(ritualTier)); o.accept(shard); } } diff --git a/src/main/java/com/sammy/malum/visual_effects/RepairPylonParticleEffects.java b/src/main/java/com/sammy/malum/visual_effects/RepairPylonParticleEffects.java index fd190fd5f..237bb9607 100644 --- a/src/main/java/com/sammy/malum/visual_effects/RepairPylonParticleEffects.java +++ b/src/main/java/com/sammy/malum/visual_effects/RepairPylonParticleEffects.java @@ -16,6 +16,7 @@ import team.lodestar.lodestone.systems.easing.*; import team.lodestar.lodestone.systems.particle.builder.*; +import javax.annotation.*; import java.util.function.*; import static com.sammy.malum.visual_effects.SpiritLightSpecs.*; @@ -37,7 +38,7 @@ public static MalumSpiritType getCentralSpiritType(RepairPylonCoreBlockEntity py return spiritItem.type; } - public static void passiveRepairPylonParticles(RepairPylonCoreBlockEntity pylon) { + public static void passiveRepairPylonParticles(RepairPylonCoreBlockEntity pylon, @Nullable IMalumSpecialItemAccessPoint holder) { MalumSpiritType activeSpiritType = getCentralSpiritType(pylon); if (activeSpiritType == null) { return; @@ -48,8 +49,15 @@ public static void passiveRepairPylonParticles(RepairPylonCoreBlockEntity pylon) LodestoneBlockEntityInventory spiritInventory = pylon.spiritInventory; SpiritRepairRecipe recipe = pylon.recipe; final RepairPylonCoreBlockEntity.RepairPylonState state = pylon.state; - if (recipe != null && !state.equals(RepairPylonCoreBlockEntity.RepairPylonState.COOLDOWN)) { - SpiritLightSpecs.rotatingLightSpecs(level, itemPos, activeSpiritType, 0.5f, 3, b -> b.multiplyLifetime(1.2f).modifyData(b::getScaleData, d -> d.multiplyValue(1.2f))); + if (recipe != null) { + if (!state.equals(RepairPylonCoreBlockEntity.RepairPylonState.COOLDOWN)) { + SpiritLightSpecs.rotatingLightSpecs(level, itemPos, activeSpiritType, 0.5f, 3, b -> b.multiplyLifetime(1.2f).modifyData(b::getScaleData, d -> d.multiplyValue(1.2f))); + } + if (state.equals(RepairPylonCoreBlockEntity.RepairPylonState.CHARGING) && holder != null) { + Vec3 targetItemPos = holder.getItemPos(); + SpiritLightSpecs.rotatingLightSpecs(level, targetItemPos, activeSpiritType, 0.5f, 2, b -> b.multiplyLifetime(0.6f).modifyData(b::getScaleData, d -> d.multiplyValue(1.2f))); + SpiritLightSpecs.rotatingLightSpecs(level, targetItemPos, activeSpiritType, 0.75f, 3, b -> b.multiplyLifetime(1.2f).modifyData(b::getScaleData, d -> d.multiplyValue(0.8f))); + } } int spiritsRendered = 0; diff --git a/src/main/resources/assets/malum/textures/item/cluster_of_brilliance.png b/src/main/resources/assets/malum/textures/item/raw_brilliance.png similarity index 100% rename from src/main/resources/assets/malum/textures/item/cluster_of_brilliance.png rename to src/main/resources/assets/malum/textures/item/raw_brilliance.png diff --git a/src/main/resources/assets/malum/textures/item/chunk_of_brilliance.png b/src/main/resources/assets/malum/textures/item/refined_brilliance.png similarity index 100% rename from src/main/resources/assets/malum/textures/item/chunk_of_brilliance.png rename to src/main/resources/assets/malum/textures/item/refined_brilliance.png diff --git a/src/main/resources/assets/malum/textures/item/soulwoven_pouch.png b/src/main/resources/assets/malum/textures/item/soulwoven_pouch.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0c99cf6d4eb49fbf3380f1ae5e590af0ba22af GIT binary patch literal 565 zcmV-50?Pe~P)Px$?@2^KR5*>rl0j<|K^TUgO&h9Wb|K8#uGv~rB@`tZltrkhph7`GF^68QJ=LQ( z!9(dG5Il*OUi$;Yo_p{j)JrMeq7}L+b)~U81a?!jF_7_)?lf(GfbVJMo%tT#Z{~yl zE#tURo}5<6I_fltqZrwe0MvJa6Zel8<;iK~+QT%BE&#uGLwy!?8u)>K0-`tfy*uj4 z`D-+dE*rH~WJ|Kw-skMlDMUsvDhe9(aqW|?OZC%&@E2K?(w7r$$$&5Q&-{?zadJhx zLP;F~c!iRh`Lm!4O5!26Za(4m#69-f``RBB1+prIX_?v^OcqP0=b4EYSY{FIbsnUz zvn>W-;xLJ84+C)5nZnuk5LOFD($LHbkKh<0YKhyRbrZ!sX+iw;}P$Qkdu;t!=q8kdI~=00000NkvXXu0mjf D5)=OV literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/malum/textures/item/soulwoven_pouch_filled.png b/src/main/resources/assets/malum/textures/item/soulwoven_pouch_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..6d205117c40be98a994b4067b806da9381cfa8b9 GIT binary patch literal 481 zcmV<70UrK|P)Px$n@L1LR5*>LlD|qEQ51*2F^Qny3@kHIVT5D}V^~rQ!ZZpt7FISAtbGKZAg|#A zqz$o7l_EuoMF<2|S%P9*aou}axObOz2Vt+pI5#`a1Pf1he~0tk-}wX245v!mUEebR z>aJ@wtuz45_OC)s39!4qXTo3+fS)HnkOOIR{(@hE%v3q(I}_GsV|Lyj;4ksDcjaXCE)Xi?*`!8yDyA-!s_a-i&nbO z!pq0STgj&3HY?u#^N~j20nieP^ZEs!n)`)M3xFhwjrVE^ZlPvoXapWDp*V66QFC4N zsV1oTM)YObK@!DgwXs1oNoWRNE%eAe1pck@ag(lqo>qDy$25IXD*BH%7i+ny-k4-@?ubu={GhC|!4J z`#4`dL1nXoPNRd*zQJkp$iZ_03bWIme~9hq01v@6s@TC@;|A7_6L3O+uvsz*tC}2h zV9nm&3CzMwo@Go)p4Rpd{X`OIYKUrmnzWJ8DNOsUhP@Y&x9)p#3PFBlQVVMWvV$f~ zD9cG)#G^nVUqq?EIYKaUknm*O=$Op{TbJ3>_T-00000NkvXX Iu0mjf00Kj@HUIzs