New API to hook into level loading
This commit is contained in:
parent
0e31f9b22e
commit
a489655ddd
2 changed files with 125 additions and 0 deletions
|
@ -17,6 +17,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import ru.bclib.api.BiomeAPI;
|
||||
import ru.bclib.api.LifeCycleAPI;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
|
@ -40,5 +41,8 @@ public abstract class ServerLevelMixin extends Level {
|
|||
}
|
||||
|
||||
bclib_lastWorld = session.getLevelId();
|
||||
|
||||
ServerLevel world = ServerLevel.class.cast(this);
|
||||
LifeCycleAPI._onLevelLoad(world, server, workerExecutor, session, properties, registryKey, dimensionType, worldGenerationProgressListener, chunkGenerator, debugWorld, l, list, bl);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue