|
5 | 5 | import java.util.List;
|
6 | 6 | import java.util.stream.Collectors;
|
7 | 7 | import java.util.stream.Stream;
|
8 |
| -import java.util.stream.StreamSupport; |
9 | 8 |
|
10 | 9 | import com.comphenix.protocol.reflect.accessors.Accessors;
|
11 | 10 | import com.comphenix.protocol.reflect.accessors.FieldAccessor;
|
|
58 | 57 | import org.bukkit.craftbukkit.v1_21_R1.util.CraftMagicNumbers;
|
59 | 58 | import org.bukkit.craftbukkit.v1_21_R1.util.CraftNamespacedKey;
|
60 | 59 | import org.bukkit.craftbukkit.v1_21_R1.util.Versioning;
|
| 60 | +import org.jetbrains.annotations.NotNull; |
61 | 61 | import org.spigotmc.SpigotWorldConfig;
|
62 | 62 |
|
63 | 63 | import static org.mockito.ArgumentMatchers.any;
|
@@ -122,7 +122,7 @@ private void initialize() {
|
122 | 122 | resourcePackRepository.c() /* getAvailablePacks() */ .stream().map(ResourcePackLoader::f /* openFull() */).collect(Collectors.toList()));
|
123 | 123 | LayeredRegistryAccess<RegistryLayer> layeredRegistryAccess = RegistryLayer.a(); // .createRegistryAccess()
|
124 | 124 | layeredRegistryAccess = WorldLoader.b(resourceManager, layeredRegistryAccess, RegistryLayer.b /* WORLDGEN */, RegistryDataLoader.a /* WORLDGEN_REGISTRIES */); // .loadAndReplaceLayer()
|
125 |
| - IRegistryCustom.Dimension registryCustom = layeredRegistryAccess.a().d(); // .compositeAccess().freeze() |
| 125 | + IRegistryCustom.Dimension registryCustom = layeredRegistryAccess.a().d(); // .compositeAccess().freeze() |
126 | 126 | // IRegistryCustom.Dimension registryCustom = layeredRegistryAccess.a().c(); // .compositeAccess().freeze()
|
127 | 127 |
|
128 | 128 | DataPackResources dataPackResources = DataPackResources.a(
|
@@ -264,20 +264,25 @@ private void setPackage() {
|
264 | 264 |
|
265 | 265 | class DummyRegistry<T extends Keyed> implements Registry<T> {
|
266 | 266 |
|
267 |
| - @Override |
268 |
| - public Iterator<T> iterator() { |
269 |
| - return Collections.emptyIterator(); |
270 |
| - } |
271 |
| - |
272 |
| - @Override |
273 |
| - public T get(NamespacedKey key) { |
274 |
| - return null; |
275 |
| - } |
276 |
| - |
277 |
| - @Override |
278 |
| - public Stream<T> stream() { |
279 |
| - List<T> emtpy = Collections.emptyList(); |
280 |
| - return emtpy.stream(); |
281 |
| - } |
| 267 | + @Override |
| 268 | + public Iterator<T> iterator() { |
| 269 | + return Collections.emptyIterator(); |
| 270 | + } |
| 271 | + |
| 272 | + @Override |
| 273 | + public T get(NamespacedKey key) { |
| 274 | + return null; |
| 275 | + } |
| 276 | + |
| 277 | + @Override |
| 278 | + public T getOrThrow(@NotNull NamespacedKey namespacedKey) { |
| 279 | + return null; |
| 280 | + } |
| 281 | + |
| 282 | + @Override |
| 283 | + public Stream<T> stream() { |
| 284 | + List<T> empty = Collections.emptyList(); |
| 285 | + return empty.stream(); |
| 286 | + } |
282 | 287 | }
|
283 | 288 | }
|
0 commit comments