Class FullMappingsBase
java.lang.Object
com.viaversion.viaversion.api.data.FullMappingsBase
- All Implemented Interfaces:
BiMappings,FullMappings,Mappings
- Direct Known Subclasses:
ParticleMappings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetNewId(int id) Returns the mapped id from the given id, or -1 if invalid/out of bounds.intReturns the unmapped integer id for the given identifier, or -1 if not found.identifier(int id) Returns the unmapped string identifier for the given mapped id.@Nullable Stringidentifier(String mappedIdentifier) Returns the unmapped string identifier for the given mapped identifier.inverse()Returns the inverse of the bimappings.intReturns the mapped integer id for the given mapped identifier, or -1 if not found.@Nullable StringmappedIdentifier(int mappedId) Returns the mapped string identifier for the given mapped id.@Nullable StringmappedIdentifier(String identifier) Returns the mapped string identifier for the given unmapped identifier.intReturns the amount of new ids total, even if it does not have a direct mapping.voidsetNewId(int id, int mappedId) Manually maps a specific id.intsize()Returns amount of unmapped entries, being the size of the mapping.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.viaversion.viaversion.api.data.Mappings
contains, getNewIdOrDefault
-
Constructor Details
-
FullMappingsBase
-
-
Method Details
-
id
Description copied from interface:FullMappingsReturns the unmapped integer id for the given identifier, or -1 if not found.- Specified by:
idin interfaceFullMappings- Parameters:
identifier- unmapped string identifier- Returns:
- unmapped int id, or -1 if not found
-
mappedId
Description copied from interface:FullMappingsReturns the mapped integer id for the given mapped identifier, or -1 if not found.- Specified by:
mappedIdin interfaceFullMappings- Parameters:
mappedIdentifier- mapped string identifier- Returns:
- mapped int id, or -1 if not found
-
identifier
Description copied from interface:FullMappingsReturns the unmapped string identifier for the given mapped id.- Specified by:
identifierin interfaceFullMappings- Parameters:
id- unmapped id- Returns:
- unmapped string identifier, or null if out of bounds
-
identifier
Description copied from interface:FullMappingsReturns the unmapped string identifier for the given mapped identifier.- Specified by:
identifierin interfaceFullMappings- Parameters:
mappedIdentifier- mapped identifier- Returns:
- unmapped string identifier, or null if not found
-
mappedIdentifier
Description copied from interface:FullMappingsReturns the mapped string identifier for the given mapped id.- Specified by:
mappedIdentifierin interfaceFullMappings- Parameters:
mappedId- mapped id- Returns:
- mapped string identifier, or null if out of bounds
-
mappedIdentifier
Description copied from interface:FullMappingsReturns the mapped string identifier for the given unmapped identifier.- Specified by:
mappedIdentifierin interfaceFullMappings- Parameters:
identifier- unmapped identifier- Returns:
- mapped string identifier, or null if not found
-
getNewId
public int getNewId(int id) Description copied from interface:MappingsReturns the mapped id from the given id, or -1 if invalid/out of bounds. -
setNewId
public void setNewId(int id, int mappedId) Description copied from interface:MappingsManually maps a specific id. -
size
public int size()Description copied from interface:MappingsReturns amount of unmapped entries, being the size of the mapping. -
mappedSize
public int mappedSize()Description copied from interface:MappingsReturns the amount of new ids total, even if it does not have a direct mapping. Returns -1 if unknown.- Specified by:
mappedSizein interfaceMappings- Returns:
- amount of new ids, or -1 if unknown
-
inverse
Description copied from interface:BiMappingsReturns the inverse of the bimappings.- Specified by:
inversein interfaceBiMappings- Specified by:
inversein interfaceFullMappings- Specified by:
inversein interfaceMappings- Returns:
- inverse of the bimappings
-