Fix dimension types being incorrect when connecting to a non-Forge server. Closes #6203
This commit is contained in:
parent
35bd69808c
commit
dc5a06aab4
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ public class NetworkHooks
|
||||||
// internal tracking map for custom dimensions received from servers for use on client.
|
// internal tracking map for custom dimensions received from servers for use on client.
|
||||||
private static Int2ObjectMap<DimensionType> trackingMap = new Int2ObjectOpenHashMap<>();
|
private static Int2ObjectMap<DimensionType> trackingMap = new Int2ObjectOpenHashMap<>();
|
||||||
public static DimensionType getDummyDimType(final int dimension) {
|
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) {
|
static void addCachedDimensionType(final DimensionType dimensionType, final ResourceLocation dimName) {
|
||||||
|
|
Loading…
Reference in a new issue