Skip to content

RegistryElement api#13669

Draft
Lulu13022002 wants to merge 2 commits intoPaperMC:mainfrom
Lulu13022002:feat/registry-element
Draft

RegistryElement api#13669
Lulu13022002 wants to merge 2 commits intoPaperMC:mainfrom
Lulu13022002:feat/registry-element

Conversation

@Lulu13022002
Copy link
Contributor

Closes #12168
Closes #13566

Adds a convenient way to compare registry element directly on them, this is especially useful for our tag keys which
aims to replace completely bukkit tags (once custom tags are moved).
previously:
Registry.BLOCK.getTag(BlockTypeTagKeys.AIR).resolve(Registry.BLOCK).contains(BlockType.CAVE_AIR))
Registry.BLOCK.getTagValues(BlockTypeTagKeys.AIR).contains(BlockType.CAVE_AIR))

now:
BlockType.CAVE_AIR.is(BlockTypeTagKeys.AIR)

Also generate the missing #bypasses_cooldown only for DamageTypeTagKeys since bukkit tag doesn't support reloaded tags nicely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

Bypasses_cooldown damage tag lacking in paper Convenience methods for ItemType/BlockType/TypedKey/TagKey

1 participant