mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
consistency changes
This commit is contained in:
@ -104,7 +104,7 @@ public final class LegacyMapper {
|
||||
|
||||
for (Map.Entry<String, String> blockEntry : dataFile.blocks.entrySet()) {
|
||||
String id = blockEntry.getKey();
|
||||
Integer combinedId = getCombinedId(blockEntry.getKey());
|
||||
int combinedId = getCombinedId(blockEntry.getKey());
|
||||
final String value = blockEntry.getValue();
|
||||
blockEntries.put(id, value);
|
||||
|
||||
@ -143,8 +143,8 @@ public final class LegacyMapper {
|
||||
}
|
||||
if (state != null) {
|
||||
blockArr[combinedId] = state.getInternalId();
|
||||
blockStateToLegacyId4Data.put(state.getInternalId(), (Integer) combinedId);
|
||||
blockStateToLegacyId4Data.putIfAbsent(state.getInternalBlockTypeId(), combinedId);
|
||||
blockStateToLegacyId4Data.put(state.getInternalId(), Integer.valueOf(combinedId));
|
||||
blockStateToLegacyId4Data.putIfAbsent(state.getInternalBlockTypeId(), Integer.valueOf(combinedId));
|
||||
}
|
||||
}
|
||||
for (int id = 0; id < 256; id++) {
|
||||
@ -168,6 +168,8 @@ public final class LegacyMapper {
|
||||
if (type == null) {
|
||||
log.debug("Unknown item: " + value);
|
||||
} else {
|
||||
itemToStringMap.put(type, id);
|
||||
stringToItemMap.put(id, type);
|
||||
try {
|
||||
itemMap.put(getCombinedId(id), type);
|
||||
} catch (Exception ignored) {
|
||||
@ -214,10 +216,10 @@ public final class LegacyMapper {
|
||||
@Nullable
|
||||
public int[] getLegacyFromItem(ItemType itemType) {
|
||||
Integer combinedId = getLegacyCombined(itemType);
|
||||
if (combinedId == null) {
|
||||
return null;
|
||||
} else {
|
||||
if (combinedId != null) {
|
||||
return new int[]{combinedId >> 4, combinedId & 0xF};
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user