fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Initial Commit: CustomRegistryEntryLists.

Open cputnam-a11y opened this issue 7 months ago • 2 comments

Implements CustomRegistryEntryLists in an attempt to fill the hole described in #3372. inspiration taken from #2586 and https://github.com/MinecraftForge/MinecraftForge/pull/8928. Edit for Clarity: What it does: This Pr adds the ability for modders to provide custom RegistryEntryList implementations, with codecs, and packet codecs, and also provides default implements of common set operations such as union, intersection, negation and subtraction, as well as a universal set, containing anything contained in the target registry. in json, these lists and their types can be identified by the fabric:type key. the implementation should also be compatible with vanilla clients, although I haven't had the opportunity to test this

Why it's needed: In many places, like worldgen and enchantments, modders must express a subset of a registry as a list. vanilla provides RegistryEntryList to accomplish this, but in certain modded scenarios, it can be cumbersome to describe specific relations, such as everything in minecraft:flowers, but without minecraft:poppy or everywhere that oak tress spawn, except places that are beaches. In vanilla, a prospective tagger must create a separate tag that includes (manually) everything in another tag, but leaves out the unliked entries. this is bad for compatibility because other mods cannot add to this list.

Lmk if you need more.

cputnam-a11y avatar Jun 05 '25 03:06 cputnam-a11y

Please can you improve the description of this PR what it does and why its needed for someone like me who isnt familar with this. Linking to other tickets and mod loaders means I have to assume that what they said is exactally what you have here. This is a very large PR that looks very complex but provides no guideance on where to start.

modmuss50 avatar Jun 10 '25 11:06 modmuss50

Please can you improve the description of this PR what it does and why its needed for someone like me who isnt familar with this. Linking to other tickets and mod loaders means I have to assume that what they said is exactally what you have here. This is a very large PR that looks very complex but provides no guideance on where to start.

Sure. I also did a lot of javadocing today that I thought I already did, but apparently didn't

cputnam-a11y avatar Jun 11 '25 01:06 cputnam-a11y