|
13 | 13 | import com.ishland.c2me.rewrites.chunksystem.common.fapi.LifecycleEventInvoker; |
14 | 14 | import com.ishland.c2me.rewrites.chunksystem.common.threadstate.ChunkTaskWork; |
15 | 15 | import com.ishland.flowsched.scheduler.Cancellable; |
16 | | -import net.minecraft.class_11352; |
17 | | -import net.minecraft.class_11368; |
18 | 16 | import net.minecraft.entity.EntityType; |
19 | 17 | import net.minecraft.entity.SpawnReason; |
20 | 18 | import net.minecraft.server.world.ServerWorld; |
| 19 | +import net.minecraft.storage.NbtReadView; |
| 20 | +import net.minecraft.storage.ReadView; |
21 | 21 | import net.minecraft.util.ErrorReporter; |
22 | 22 | import net.minecraft.world.chunk.Chunk; |
23 | 23 | import net.minecraft.world.chunk.ChunkStatus; |
@@ -75,10 +75,10 @@ private static WorldChunk toFullChunk(ProtoChunk protoChunk, ServerWorld serverW |
75 | 75 | worldChunk = ((WrapperProtoChunk) protoChunk).getWrappedChunk(); |
76 | 76 | } else { |
77 | 77 | worldChunk = new WorldChunk(serverWorld, protoChunk, worldChunkx -> { |
78 | | - try (ErrorReporter.class_11340 lv = new ErrorReporter.class_11340(protoChunk.method_71412(), LOGGER)) { |
79 | | - class_11368.class_11370 arg = class_11352.method_71416(lv, serverWorld.getRegistryManager(), protoChunk.getEntities()); |
80 | | - if (!arg.method_71444()) { |
81 | | - serverWorld.addEntities(EntityType.streamFromNbt(arg, serverWorld, SpawnReason.LOAD)); |
| 78 | + try (ErrorReporter.Logging lv = new ErrorReporter.Logging(protoChunk.getErrorReporterContext(), LOGGER)) { |
| 79 | + ReadView.ListReadView arg = NbtReadView.createList(lv, serverWorld.getRegistryManager(), protoChunk.getEntities()); |
| 80 | + if (!arg.isEmpty()) { |
| 81 | + serverWorld.addEntities(EntityType.streamFromData(arg, serverWorld, SpawnReason.LOAD)); |
82 | 82 | } |
83 | 83 | } |
84 | 84 | }); |
|
0 commit comments