Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-20 06:50:10 +01:00
Set mappings default values to -1
Dieser Commit ist enthalten in:
Ursprung
71f4012537
Commit
888441b81d
@ -21,6 +21,8 @@ import com.viaversion.viaversion.api.data.IntArrayMappings;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.data.Mappings;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public final class VBMappings extends IntArrayMappings {
|
||||
|
||||
private VBMappings(final int[] oldToNew, final int mappedIds) {
|
||||
@ -42,6 +44,7 @@ public final class VBMappings extends IntArrayMappings {
|
||||
final int size = this.size != -1 ? this.size : size(unmapped);
|
||||
final int mappedSize = this.mappedSize != -1 ? this.mappedSize : size(mapped);
|
||||
final int[] mappings = new int[size];
|
||||
Arrays.fill(mappings, -1);
|
||||
// Do conversion if one is an array and the other an object, otherwise directly map
|
||||
if (unmapped.isJsonArray()) {
|
||||
if (mapped.isJsonObject()) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren