Class MappedRegistry<Mc,Adv>
java.lang.Object
net.kyori.adventure.platform.fabric.impl.MappedRegistry<Mc,Adv>
- Type Parameters:
Mc- The Minecraft typeAdv- The Adventure type
Represents a mapping between an enum-like set of values controlled by Minecraft, and an enum-like set of values controlled by
Adventure.
Because these enums both refer to known constants, it is relatively easy to generate an automated mapping between the two of them. As the two enums represent the same set of values, it is required that any element that appears in one is present in the other, so mappings will never return null.
-
Method Summary
Modifier and TypeMethodDescriptiontoAdventure(Mc mcItem) Given a Minecraft enum element, return the equivalent Adventure element.toMinecraft(Adv advItem) Given an Adventure enum element, return the equivalent Minecraft element.
-
Method Details
-
toAdventure
Given a Minecraft enum element, return the equivalent Adventure element.- Parameters:
mcItem- The Minecraft element- Returns:
- The adventure equivalent.
-
toMinecraft
Given an Adventure enum element, return the equivalent Minecraft element.- Parameters:
advItem- The Minecraft element- Returns:
- The adventure equivalent.
-