Fixed wrong custom spawn point
This commit is contained in:
parent
bfbaebe7b2
commit
57191936dc
4 changed files with 28 additions and 17 deletions
|
@ -74,6 +74,11 @@ public abstract class ServerPlayerMixin extends Player implements TeleportingEnt
|
|||
getXRot()
|
||||
));
|
||||
}
|
||||
else if (GeneratorOptions.changeSpawn() && destination.dimension() == Level.END) {
|
||||
BlockPos spawn = GeneratorOptions.getSpawn();
|
||||
Vec3 pos = new Vec3(spawn.getX() + 0.5, spawn.getY(), spawn.getZ() + 0.5);
|
||||
info.setReturnValue(new PortalInfo(pos, Vec3.ZERO, 90.0F, 0.0F));
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "changeDimension", at = @At("HEAD"), cancellable = true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue