Class FullMappingsBase
java.lang.Object
com.viaversion.viaversion.api.data.FullMappingsBase
- All Implemented Interfaces:
BiMappings
,FullMappings
,Mappings
- Direct Known Subclasses:
ParticleMappings
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getNewId
(int id) Returns the mapped id from the given id, or -1 if invalid/out of bounds.int
Returns 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 String
identifier
(String mappedIdentifier) Returns the unmapped string identifier for the given mapped identifier.inverse()
Returns the inverse of the bimappings.int
Returns the mapped integer id for the given mapped identifier, or -1 if not found.@Nullable String
mappedIdentifier
(int mappedId) Returns the mapped string identifier for the given mapped id.@Nullable String
mappedIdentifier
(String identifier) Returns the mapped string identifier for the given unmapped identifier.int
Returns the amount of new ids total, even if it does not have a direct mapping.void
setNewId
(int id, int mappedId) Manually maps a specific id.int
size()
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, wait
Methods inherited from interface com.viaversion.viaversion.api.data.Mappings
contains, getNewIdOrDefault
-
Constructor Details
-
FullMappingsBase
-
-
Method Details
-
id
Description copied from interface:FullMappings
Returns the unmapped integer id for the given identifier, or -1 if not found.- Specified by:
id
in interfaceFullMappings
- Parameters:
identifier
- unmapped string identifier- Returns:
- unmapped int id, or -1 if not found
-
mappedId
Description copied from interface:FullMappings
Returns the mapped integer id for the given mapped identifier, or -1 if not found.- Specified by:
mappedId
in interfaceFullMappings
- Parameters:
mappedIdentifier
- mapped string identifier- Returns:
- mapped int id, or -1 if not found
-
identifier
Description copied from interface:FullMappings
Returns the unmapped string identifier for the given mapped id.- Specified by:
identifier
in interfaceFullMappings
- Parameters:
id
- unmapped id- Returns:
- unmapped string identifier, or null if out of bounds
-
identifier
Description copied from interface:FullMappings
Returns the unmapped string identifier for the given mapped identifier.- Specified by:
identifier
in interfaceFullMappings
- Parameters:
mappedIdentifier
- mapped identifier- Returns:
- unmapped string identifier, or null if not found
-
mappedIdentifier
Description copied from interface:FullMappings
Returns the mapped string identifier for the given mapped id.- Specified by:
mappedIdentifier
in interfaceFullMappings
- Parameters:
mappedId
- mapped id- Returns:
- mapped string identifier, or null if out of bounds
-
mappedIdentifier
Description copied from interface:FullMappings
Returns the mapped string identifier for the given unmapped identifier.- Specified by:
mappedIdentifier
in interfaceFullMappings
- Parameters:
identifier
- unmapped identifier- Returns:
- mapped string identifier, or null if not found
-
getNewId
public int getNewId(int id) Description copied from interface:Mappings
Returns 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:Mappings
Manually maps a specific id. -
size
public int size()Description copied from interface:Mappings
Returns amount of unmapped entries, being the size of the mapping. -
mappedSize
public int mappedSize()Description copied from interface:Mappings
Returns the amount of new ids total, even if it does not have a direct mapping. Returns -1 if unknown.- Specified by:
mappedSize
in interfaceMappings
- Returns:
- amount of new ids, or -1 if unknown
-
inverse
Description copied from interface:BiMappings
Returns the inverse of the bimappings.- Specified by:
inverse
in interfaceBiMappings
- Specified by:
inverse
in interfaceFullMappings
- Specified by:
inverse
in interfaceMappings
- Returns:
- inverse of the bimappings
-