Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fzzy Update 1 - Start work on Enchantment Datagen, Enchantment Tags, … #280

Merged
merged 2 commits into from
May 28, 2024

Conversation

fzzyhmstrs
Copy link
Contributor

PR of some work I did on frameworks and other first steps, just to start getting a feel for the processes needed, and to have some templates in place.

  • Added a few ComponentTypes in McdwEffectComponentTypes. Introduced a pretty diverse selection of examples to build from
  • Made three first-pass enchantment builders in the McdwEnchantmentGenerator. Soul Devourer and Soul Siphon should be feature complete, pending any tweaks to the definition. Leeching will need the hook made for ON_DEATH
  • Added new McdwEnchantmentTagGenerator for adding enchantment tags. These will be used for (at least) creating exclusions. I made a list for EXPERIENCE_EXCLUSIVE and HEALING_EXCLUSIVE. TODO: Add the provider into the main MCDW data generator.
  • Updated the McdwTagGenerator to McdwItemTagGenerator. Moved the TagKeys themselves to McdwItemTags.
  • Added two new Entity Effects to get a feel for them and have some templates, ADD_STACKING_MOB_EFFECT and LEECH_MOB.
  • Registered those two Effects in McdwEntityEffectTypes
  • Made new IDs class EnchantmentIds, with the list of RegistryKey<Enchantment> for the enchantments. This just needs to be filled in with all the rest of the enchant ids. This is used by the data generator, or by anything that needs to refence a specific enchant in game for some reason.
  • Tested out splitting the Identifiers for Items into their own lines in the McdwAxeItemRegistry. This makes things a bit cleaner IMO, and makes tag generation a lot cleaner. Would need to be repeated on all other registries.
  • new McdwEnchantmentTags class, holding psf tagkeys for all the enchant tags that will be needed.
  • new McdwItemTags class, holding psf item tagkeys.

Misc:

  • In several places replaced usage of Identifier.of(MCDW.MODID, path) with the exsting Mcdw.ID(path)

…Entity Effects, Component Types, Enchantment IDs, and more. Will detail in PR.
…art in on custom ComponentTypes, implementing event hooks, custom Effect Types including registries
@fzzyhmstrs
Copy link
Contributor Author

Second commit:

  • Added ComponentType Entity_Aware_Damage, and new custom effect type EntityAwareValueEffectType, which allows for modification of a value with entity context.
  • Added isItemEnabled system to the McdwWeaponStatsConfig, largely for use in ResourceCondition checking.
  • Added similar is enabled checking to the previously empty McdwEnchantmentSettingsConfig
  • Created new ConfigEnchantmentEnabledCondition for resource conditions on enchantment json files
  • Update ConfigItemEnabledResourceCondition to the new Codec format.
  • Hooked enchantment tags into the data generator.
  • Added PAIN_CYCLE, ECHO, and DYNAMO to the enchantments generator
  • Added new exclusion enchantment tags
  • Added ANY_WEAPON_ENCHANTABLE item tag
  • Created onDeathHook, onJumpHook, and entityAwareDamageHook and their respective effect impl, and wired them into mixins
  • Added Relative Entity Effects
    • Damage Taken Relative effect (Echo)
    • Max Health Relative effect (Exploding)
  • AOE entity effect, will run it's effect on found entities based on radius etc.
  • Remove Mob Effect effect - removes status effect(s)
  • Added Entity Aware Value Effects
    • Experience Level value effect (Enigma resonator)
    • Multiply Status value effect (dynamo etc)
  • Introduced Identifiers for all weapon registries and a new register method which takes an identifier as well as registers the item with the configs isEnabled map.
  • Updated SoundEventsRegistry to store RegistryEntry instead of direct SoundEvent
  • updated PainCycleStatusEffect to work on a world time clock, as well as to apply the damage on application directly in the status.

Copy link
Owner

@chronosacaria chronosacaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fzzyhmstrs Everything looks good. I just need clarification on my question related to the AOEHelper#getEntitiesByPredicate method

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has the context of getEntitiesByPredicate changed to only be related to AOE statusEffect? This method, iirc, is also use for effects such as Swirling, which is not a statusEffect

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I don't remember changing anything in AOEHelper (on purpose). The only AOE checking I implemented was in the AOE Enchantment Effect, and thus far I just used the world getEntitiesByClass method. I don't know what direction you want to take the aoe permissions, so didn't touch any of that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay. Yeah, it was just in reference to the note that you made. No worries :) I'll have to figure out how we want to do the perms at a later date. Thanks, @fzzyhmstrs!

Copy link
Owner

@chronosacaria chronosacaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 20240528

@chronosacaria chronosacaria merged commit 092ad88 into chronosacaria:1.20.6 May 28, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants