Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-07 21:32:52 +02:00
Fix item loading in 1.13.2->1.13, 1.13->1.12
Dieser Commit ist enthalten in:
Ursprung
cba4d03ff0
Commit
3cddb712c8
@ -89,7 +89,7 @@ public class BackwardsMappings extends MappingDataBase {
|
|||||||
if (key.equals("items") && vvProtocolClass != null) {
|
if (key.equals("items") && vvProtocolClass != null) {
|
||||||
final MappingData mappingData = Via.getManager().getProtocolManager().getProtocol(vvProtocolClass).getMappingData();
|
final MappingData mappingData = Via.getManager().getProtocolManager().getProtocol(vvProtocolClass).getMappingData();
|
||||||
if (mappingData != null && mappingData.getItemMappings() != null) {
|
if (mappingData != null && mappingData.getItemMappings() != null) {
|
||||||
this.itemMappings = mappingData.getItemMappings().inverse();
|
return mappingData.getItemMappings().inverse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.loadBiMappings(data, key);
|
return super.loadBiMappings(data, key);
|
||||||
|
@ -32,7 +32,6 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
public class BackwardsMappings extends com.viaversion.viabackwards.api.data.BackwardsMappings {
|
public class BackwardsMappings extends com.viaversion.viabackwards.api.data.BackwardsMappings {
|
||||||
private final Int2ObjectMap<String> statisticMappings = new Int2ObjectOpenHashMap<>();
|
private final Int2ObjectMap<String> statisticMappings = new Int2ObjectOpenHashMap<>();
|
||||||
private final Map<String, String> translateMappings = new HashMap<>();
|
private final Map<String, String> translateMappings = new HashMap<>();
|
||||||
private BiMappings itemMappings;
|
|
||||||
|
|
||||||
public BackwardsMappings() {
|
public BackwardsMappings() {
|
||||||
super("1.13", "1.12", Protocol1_13To1_12_2.class);
|
super("1.13", "1.12", Protocol1_13To1_12_2.class);
|
||||||
@ -42,7 +41,7 @@ public class BackwardsMappings extends com.viaversion.viabackwards.api.data.Back
|
|||||||
public void loadExtras(final CompoundTag data) {
|
public void loadExtras(final CompoundTag data) {
|
||||||
final Mappings itemsToMapped = loadMappings(data, "items");
|
final Mappings itemsToMapped = loadMappings(data, "items");
|
||||||
final BiMappings itemsToUnmapped = Protocol1_13To1_12_2.MAPPINGS.getItemMappings();
|
final BiMappings itemsToUnmapped = Protocol1_13To1_12_2.MAPPINGS.getItemMappings();
|
||||||
itemMappings = new BiMappings() {
|
this.itemMappings = new BiMappings() {
|
||||||
@Override
|
@Override
|
||||||
public BiMappings inverse() {
|
public BiMappings inverse() {
|
||||||
return itemsToUnmapped;
|
return itemsToUnmapped;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren