public class MappingData extends Object
Modifier and Type | Field and Description |
---|---|
protected Mappings |
blockMappings |
protected Mappings |
blockStateMappings |
protected boolean |
hasDiffFile |
protected Int2IntBiMap |
itemMappings |
protected boolean |
loadItems |
protected String |
newVersion |
protected String |
oldVersion |
protected ParticleMappings |
particleMappings |
protected Mappings |
soundMappings |
protected Mappings |
statisticsMappings |
Constructor and Description |
---|
MappingData(String oldVersion,
String newVersion) |
MappingData(String oldVersion,
String newVersion,
boolean hasDiffFile) |
Modifier and Type | Method and Description |
---|---|
protected int |
checkValidity(int id,
int mappedId,
String type) |
@Nullable Mappings |
getBlockMappings() |
@Nullable Mappings |
getBlockStateMappings() |
@Nullable Int2IntBiMap |
getItemMappings() |
int |
getNewBlockId(int id) |
int |
getNewBlockStateId(int id) |
int |
getNewItemId(int id) |
int |
getNewParticleId(int id) |
int |
getOldItemId(int id) |
@Nullable ParticleMappings |
getParticleMappings() |
@Nullable Mappings |
getSoundMappings() |
@Nullable Mappings |
getStatisticsMappings() |
void |
load() |
protected com.google.gson.JsonObject |
loadDiffFile() |
protected void |
loadExtras(com.google.gson.JsonObject oldMappings,
com.google.gson.JsonObject newMappings,
@Nullable com.google.gson.JsonObject diffMappings)
To be overridden.
|
protected @Nullable Mappings |
loadFromArray(com.google.gson.JsonObject oldMappings,
com.google.gson.JsonObject newMappings,
@Nullable com.google.gson.JsonObject diffMappings,
String key) |
protected @Nullable Mappings |
loadFromObject(com.google.gson.JsonObject oldMappings,
com.google.gson.JsonObject newMappings,
@Nullable com.google.gson.JsonObject diffMappings,
String key) |
protected final String oldVersion
protected final String newVersion
protected final boolean hasDiffFile
protected Int2IntBiMap itemMappings
protected ParticleMappings particleMappings
protected Mappings blockMappings
protected Mappings blockStateMappings
protected Mappings soundMappings
protected Mappings statisticsMappings
protected boolean loadItems
public void load()
public int getNewBlockStateId(int id)
public int getNewBlockId(int id)
public int getNewItemId(int id)
public int getOldItemId(int id)
public int getNewParticleId(int id)
@Nullable public @Nullable Int2IntBiMap getItemMappings()
@Nullable public @Nullable ParticleMappings getParticleMappings()
@Nullable public @Nullable Mappings getBlockMappings()
@Nullable public @Nullable Mappings getBlockStateMappings()
@Nullable public @Nullable Mappings getSoundMappings()
@Nullable public @Nullable Mappings getStatisticsMappings()
@Nullable protected @Nullable Mappings loadFromArray(com.google.gson.JsonObject oldMappings, com.google.gson.JsonObject newMappings, @Nullable @Nullable com.google.gson.JsonObject diffMappings, String key)
@Nullable protected @Nullable Mappings loadFromObject(com.google.gson.JsonObject oldMappings, com.google.gson.JsonObject newMappings, @Nullable @Nullable com.google.gson.JsonObject diffMappings, String key)
protected com.google.gson.JsonObject loadDiffFile()
protected int checkValidity(int id, int mappedId, String type)
protected void loadExtras(com.google.gson.JsonObject oldMappings, com.google.gson.JsonObject newMappings, @Nullable @Nullable com.google.gson.JsonObject diffMappings)
oldMappings
- old mappingsnewMappings
- new mappingsdiffMappings
- diff mappings if presentCopyright © 2016–2021. All rights reserved.