@@ -146,20 +146,20 @@
|
||||
+ super.spawnIn(world);
|
||||
+ if (world == null) {
|
||||
+ this.dead = false;
|
||||
+ BlockPosition position = null;
|
||||
+ Vec3D position = null;
|
||||
+ if (this.spawnWorld != null && !this.spawnWorld.equals("")) {
|
||||
+ CraftWorld cworld = (CraftWorld) Bukkit.getServer().getWorld(this.spawnWorld);
|
||||
+ if (cworld != null && this.getBed() != null) {
|
||||
+ world = cworld.getHandle();
|
||||
+ position = EntityHuman.getBed(cworld.getHandle(), this.getBed(), false);
|
||||
+ position = EntityHuman.getBed(cworld.getHandle(), this.getBed(), false).orElse(null);
|
||||
+ }
|
||||
+ }
|
||||
+ if (world == null || position == null) {
|
||||
+ world = ((CraftWorld) Bukkit.getServer().getWorlds().get(0)).getHandle();
|
||||
+ position = world.getSpawn();
|
||||
+ position = new Vec3D(world.getSpawn());
|
||||
+ }
|
||||
+ this.world = world;
|
||||
+ this.setPosition(position.getX() + 0.5, position.getY(), position.getZ() + 0.5);
|
||||
+ this.setPosition(position.getX(), position.getY(), position.getZ());
|
||||
+ }
|
||||
+ this.dimension = ((WorldServer) this.world).dimension;
|
||||
+ this.playerInteractManager.a((WorldServer) world);
|
||||
|
||||
Reference in New Issue
Block a user