[Fix] Crash when Spawn-Point was changed (#23)
This commit is contained in:
parent
cda391ac07
commit
41d3fc8e17
1 changed files with 5 additions and 3 deletions
|
@ -17,9 +17,11 @@ public class LevelMixin {
|
|||
@Inject(method = "getSharedSpawnPos", at = @At("HEAD"), cancellable = true)
|
||||
private void be_getSharedSpawnPos(CallbackInfoReturnable<BlockPos> info) {
|
||||
if (GeneratorOptions.changeSpawn()) {
|
||||
if (ServerLevel.class.cast(this).dimension() == Level.END) {
|
||||
BlockPos pos = GeneratorOptions.getSpawn();
|
||||
info.setReturnValue(pos);
|
||||
if ((Object) this instanceof ServerLevel server) {
|
||||
if (server.dimension() == Level.END) {
|
||||
BlockPos pos = GeneratorOptions.getSpawn();
|
||||
info.setReturnValue(pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue