public class MappingDataBase extends java.lang.Object implements MappingData
Modifier and Type | Field and Description |
---|---|
protected FullMappings |
argumentTypeMappings |
protected Mappings |
attributeMappings |
protected Mappings |
blockEntityMappings |
protected Mappings |
blockMappings |
protected Mappings |
blockStateMappings |
protected Mappings |
enchantmentMappings |
protected FullMappings |
entityMappings |
protected FullMappings |
itemDataSerializerMappings |
protected BiMappings |
itemMappings |
protected java.lang.String |
mappedVersion |
protected Mappings |
menuMappings |
protected Mappings |
paintingMappings |
protected ParticleMappings |
particleMappings |
protected FullMappings |
recipeSerializerMappings |
protected Mappings |
soundMappings |
protected Mappings |
statisticsMappings |
protected java.util.Map<RegistryType,java.util.List<TagData>> |
tags |
protected java.lang.String |
unmappedVersion |
Constructor and Description |
---|
MappingDataBase(java.lang.String unmappedVersion,
java.lang.String mappedVersion) |
Modifier and Type | Method and Description |
---|---|
protected int |
checkValidity(int id,
int mappedId,
java.lang.String type)
Returns the given mapped id if valid, else 0 with a warning logged to the console.
|
@Nullable FullMappings |
getArgumentTypeMappings() |
@Nullable Mappings |
getAttributeMappings() |
@Nullable Mappings |
getBlockEntityMappings() |
@Nullable Mappings |
getBlockMappings() |
@Nullable Mappings |
getBlockStateMappings() |
@Nullable FullMappings |
getDataComponentSerializerMappings() |
@Nullable Mappings |
getEnchantmentMappings() |
@Nullable FullMappings |
getEntityMappings() |
@Nullable FullMappings |
getFullItemMappings()
Returns item mappings if they also have identifier data present.
|
@Nullable BiMappings |
getItemMappings()
Returns item mappings.
|
protected java.util.logging.Logger |
getLogger() |
@Nullable Mappings |
getMenuMappings() |
int |
getNewAttributeId(int id) |
int |
getNewBlockId(int id)
Returns the mapped block id, or -1 if unmapped.
|
int |
getNewBlockStateId(int id)
Returns the mapped block state id, or -1 if unmapped.
|
int |
getNewItemId(int id)
Returns the mapped item id, or -1 if unmapped.
|
int |
getNewParticleId(int id)
Returns the mapped particle id, or -1 if unmapped.
|
int |
getOldItemId(int id)
Returns the backwards mapped item id, or -1 if unmapped.
|
@Nullable Mappings |
getPaintingMappings() |
@Nullable ParticleMappings |
getParticleMappings() |
@Nullable FullMappings |
getRecipeSerializerMappings() |
@Nullable Mappings |
getSoundMappings() |
@Nullable Mappings |
getStatisticsMappings() |
@Nullable java.util.List<TagData> |
getTags(RegistryType type)
Returns a list of tags to send if present.
|
protected @Nullable java.util.List<java.lang.String> |
identifiersFromGlobalIds(com.github.steveice10.opennbt.tag.builtin.CompoundTag mappingsTag,
java.lang.String key) |
void |
load()
Loads the mapping data.
|
protected @Nullable BiMappings |
loadBiMappings(com.github.steveice10.opennbt.tag.builtin.CompoundTag data,
java.lang.String key) |
protected void |
loadExtras(com.github.steveice10.opennbt.tag.builtin.CompoundTag data) |
protected @Nullable FullMappings |
loadFullMappings(com.github.steveice10.opennbt.tag.builtin.CompoundTag data,
com.github.steveice10.opennbt.tag.builtin.CompoundTag unmappedIdentifiers,
com.github.steveice10.opennbt.tag.builtin.CompoundTag mappedIdentifiers,
java.lang.String key) |
protected @Nullable Mappings |
loadMappings(com.github.steveice10.opennbt.tag.builtin.CompoundTag data,
java.lang.String key) |
protected @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readMappedIdentifiersFile(java.lang.String name) |
protected @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readMappingsFile(java.lang.String name) |
protected @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readUnmappedIdentifiersFile(java.lang.String name) |
protected final java.lang.String unmappedVersion
protected final java.lang.String mappedVersion
protected BiMappings itemMappings
protected FullMappings argumentTypeMappings
protected FullMappings entityMappings
protected FullMappings recipeSerializerMappings
protected FullMappings itemDataSerializerMappings
protected ParticleMappings particleMappings
protected Mappings blockMappings
protected Mappings blockStateMappings
protected Mappings blockEntityMappings
protected Mappings soundMappings
protected Mappings statisticsMappings
protected Mappings enchantmentMappings
protected Mappings paintingMappings
protected Mappings menuMappings
protected Mappings attributeMappings
protected java.util.Map<RegistryType,java.util.List<TagData>> tags
public MappingDataBase(java.lang.String unmappedVersion, java.lang.String mappedVersion)
public void load()
MappingData
load
in interface MappingData
protected @Nullable java.util.List<java.lang.String> identifiersFromGlobalIds(com.github.steveice10.opennbt.tag.builtin.CompoundTag mappingsTag, java.lang.String key)
protected @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag readMappingsFile(java.lang.String name)
protected @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag readUnmappedIdentifiersFile(java.lang.String name)
protected @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag readMappedIdentifiersFile(java.lang.String name)
protected @Nullable Mappings loadMappings(com.github.steveice10.opennbt.tag.builtin.CompoundTag data, java.lang.String key)
protected @Nullable FullMappings loadFullMappings(com.github.steveice10.opennbt.tag.builtin.CompoundTag data, com.github.steveice10.opennbt.tag.builtin.CompoundTag unmappedIdentifiers, com.github.steveice10.opennbt.tag.builtin.CompoundTag mappedIdentifiers, java.lang.String key)
protected @Nullable BiMappings loadBiMappings(com.github.steveice10.opennbt.tag.builtin.CompoundTag data, java.lang.String key)
public int getNewBlockStateId(int id)
MappingData
getNewBlockStateId
in interface MappingData
id
- unmapped block state idpublic int getNewBlockId(int id)
MappingData
getNewBlockId
in interface MappingData
id
- unmapped block idpublic int getNewItemId(int id)
MappingData
getNewItemId
in interface MappingData
id
- unmapped item idpublic int getOldItemId(int id)
MappingData
getOldItemId
in interface MappingData
id
- mapped item idpublic int getNewParticleId(int id)
MappingData
getNewParticleId
in interface MappingData
id
- unmapped particle idpublic int getNewAttributeId(int id)
getNewAttributeId
in interface MappingData
public @Nullable java.util.List<TagData> getTags(RegistryType type)
MappingData
getTags
in interface MappingData
type
- registry tag typepublic @Nullable BiMappings getItemMappings()
MappingData
getItemMappings
in interface MappingData
public @Nullable FullMappings getFullItemMappings()
MappingData
getFullItemMappings
in interface MappingData
MappingData.getItemMappings()
public @Nullable ParticleMappings getParticleMappings()
getParticleMappings
in interface MappingData
public @Nullable Mappings getBlockMappings()
getBlockMappings
in interface MappingData
public @Nullable Mappings getBlockEntityMappings()
getBlockEntityMappings
in interface MappingData
public @Nullable Mappings getBlockStateMappings()
getBlockStateMappings
in interface MappingData
public @Nullable Mappings getSoundMappings()
getSoundMappings
in interface MappingData
public @Nullable Mappings getStatisticsMappings()
getStatisticsMappings
in interface MappingData
public @Nullable Mappings getMenuMappings()
getMenuMappings
in interface MappingData
public @Nullable Mappings getEnchantmentMappings()
getEnchantmentMappings
in interface MappingData
public @Nullable Mappings getAttributeMappings()
getAttributeMappings
in interface MappingData
public @Nullable FullMappings getEntityMappings()
getEntityMappings
in interface MappingData
public @Nullable FullMappings getArgumentTypeMappings()
getArgumentTypeMappings
in interface MappingData
public @Nullable FullMappings getDataComponentSerializerMappings()
getDataComponentSerializerMappings
in interface MappingData
public @Nullable Mappings getPaintingMappings()
getPaintingMappings
in interface MappingData
public @Nullable FullMappings getRecipeSerializerMappings()
getRecipeSerializerMappings
in interface MappingData
protected java.util.logging.Logger getLogger()
protected int checkValidity(int id, int mappedId, java.lang.String type)
id
- unmapped idmappedId
- mapped idtype
- mapping type (e.g. "item")protected void loadExtras(com.github.steveice10.opennbt.tag.builtin.CompoundTag data)