public class MappingDataBase extends java.lang.Object implements MappingData
Modifier and Type | Field and Description |
---|---|
protected FullMappings |
argumentTypeMappings |
protected Mappings |
blockEntityMappings |
protected Mappings |
blockMappings |
protected Mappings |
blockStateMappings |
protected Mappings |
enchantmentMappings |
protected FullMappings |
entityMappings |
protected BiMappings |
itemMappings |
protected java.lang.String |
mappedVersion |
protected Mappings |
menuMappings |
protected Mappings |
paintingMappings |
protected ParticleMappings |
particleMappings |
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 |
getBlockEntityMappings() |
@Nullable Mappings |
getBlockMappings() |
@Nullable Mappings |
getBlockStateMappings() |
@Nullable Mappings |
getEnchantmentMappings() |
@Nullable FullMappings |
getEntityMappings() |
@Nullable BiMappings |
getItemMappings() |
protected java.util.logging.Logger |
getLogger() |
@Nullable Mappings |
getMenuMappings() |
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 Mappings |
getSoundMappings() |
@Nullable Mappings |
getStatisticsMappings() |
@Nullable java.util.List<TagData> |
getTags(RegistryType type)
Returns a list of tags to send if present.
|
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 |
readNBTFile(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 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 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 com.github.steveice10.opennbt.tag.builtin.CompoundTag readNBTFile(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 @Nullable java.util.List<TagData> getTags(RegistryType type)
MappingData
getTags
in interface MappingData
type
- registry tag typepublic @Nullable BiMappings getItemMappings()
getItemMappings
in interface MappingData
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 FullMappings getEntityMappings()
getEntityMappings
in interface MappingData
public @Nullable FullMappings getArgumentTypeMappings()
getArgumentTypeMappings
in interface MappingData
public @Nullable Mappings getPaintingMappings()
getPaintingMappings
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)