Package org.empirewar.orbis.flag
Class MutableRegionFlag<T>
java.lang.Object
org.empirewar.orbis.flag.RegionFlag<T>
org.empirewar.orbis.flag.MutableRegionFlag<T>
- Type Parameters:
T- the type this flag has
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed
- Direct Known Subclasses:
GroupedMutableRegionFlag
Represents a flag that has a changeable
MutableRegionFlag value.
This flag is added to a Region.
A RegistryRegionFlag may be converted to a Mutable instance by calling RegistryRegionFlag.asMutable().
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<MutableRegionFlag<?>> static final com.mojang.serialization.Codec<MutableRegionFlag<?>> Fields inherited from class org.empirewar.orbis.flag.RegionFlag
codec, key -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends MutableRegionFlag<T>> getCodec(RegistryRegionFlag<?> registry) Gets the codec for this flag.getType()getValue()voidMethods inherited from class org.empirewar.orbis.flag.RegionFlag
equals, hashCode, key, typeCodec
-
Field Details
-
CODEC
-
TYPE_CODEC
-
-
Method Details
-
getValue
-
setValue
-
getType
-
getCodec
public com.mojang.serialization.MapCodec<? extends MutableRegionFlag<T>> getCodec(RegistryRegionFlag<?> registry) Description copied from class:RegionFlagGets the codec for this flag.The parameter provided is the instance of this flag type in the
OrbisRegistries.FLAGSregistry. This allows for transformation within the codec to occur.- Overrides:
getCodecin classRegionFlag<T>- Parameters:
registry- the registry value of this flag- Returns:
- the codec
-