Fix dimension types being incorrect when connecting to a non-Forge server. Closes #6203

This commit is contained in:
LexManos 2019-10-04 10:36:50 -07:00
parent 35bd69808c
commit dc5a06aab4

View file

@ -198,7 +198,7 @@ public class NetworkHooks
// internal tracking map for custom dimensions received from servers for use on client.
private static Int2ObjectMap<DimensionType> trackingMap = new Int2ObjectOpenHashMap<>();
public static DimensionType getDummyDimType(final int dimension) {
return trackingMap.getOrDefault(dimension, DimensionType.OVERWORLD);
return trackingMap.computeIfAbsent(dimension, id -> DimensionType.getById(id));
}
static void addCachedDimensionType(final DimensionType dimensionType, final ResourceLocation dimName) {