More refactor
This commit is contained in:
parent
01391537fe
commit
071fae7ba5
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ public class MinecraftServerMixin {
|
||||||
@Inject(method = "loadLevel", at = @At(value = "RETURN"), cancellable = true)
|
@Inject(method = "loadLevel", at = @At(value = "RETURN"), cancellable = true)
|
||||||
private void be_loadLevel(CallbackInfo info) {
|
private void be_loadLevel(CallbackInfo info) {
|
||||||
be_injectRecipes();
|
be_injectRecipes();
|
||||||
EndBiomes.initRegistry((MinecraftServer) (Object) this);
|
EndBiomes.initRegistry(MinecraftServer.class.cast(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "overworld", at = @At(value = "HEAD"), cancellable = true)
|
@Inject(method = "overworld", at = @At(value = "HEAD"), cancellable = true)
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ServerLevelMixin {
|
||||||
lastWorld = session.getLevelId();
|
lastWorld = session.getLevelId();
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
ServerLevel world = (ServerLevel) (Object) this;
|
ServerLevel world = ServerLevel.class.cast(this);
|
||||||
File dir = session.getDimensionPath(world.dimension());
|
File dir = session.getDimensionPath(world.dimension());
|
||||||
if (!new File(dir, "level.dat").exists()) {
|
if (!new File(dir, "level.dat").exists()) {
|
||||||
dir = dir.getParentFile();
|
dir = dir.getParentFile();
|
||||||
|
@ -73,7 +73,7 @@ public class ServerLevelMixin {
|
||||||
@Inject(method = "getSharedSpawnPos", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "getSharedSpawnPos", at = @At("HEAD"), cancellable = true)
|
||||||
private void be_getSharedSpawnPos(CallbackInfoReturnable<BlockPos> info) {
|
private void be_getSharedSpawnPos(CallbackInfoReturnable<BlockPos> info) {
|
||||||
if (GeneratorOptions.changeSpawn()) {
|
if (GeneratorOptions.changeSpawn()) {
|
||||||
if (((ServerLevel) (Object) this).dimension() == Level.END) {
|
if (ServerLevel.class.cast(this).dimension() == Level.END) {
|
||||||
info.setReturnValue(GeneratorOptions.getSpawn());
|
info.setReturnValue(GeneratorOptions.getSpawn());
|
||||||
info.cancel();
|
info.cancel();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue