Partially fix #6880 (#6888)

This commit is contained in:
Jason Penilla 2021-11-12 14:27:26 -08:00
parent d19cd1ac56
commit 66e3cb1837

View file

@ -15,8 +15,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver));
- LevelStem worlddimension = (LevelStem) registrymaterials.get(dimensionKey);
+ // Paper start - Use correct LevelStem registry
+ LevelStem worlddimension = generatorsettings.dimensions().get(dimensionKey);
+ if (worlddimension == null) {
+ final LevelStem worlddimension;
+ if (dimensionKey == LevelStem.END || dimensionKey == LevelStem.NETHER) {
+ worlddimension = generatorsettings.dimensions().get(dimensionKey);
+ } else {
+ worlddimension = registrymaterials.get(dimensionKey);
+ }
+ // Paper end