Update to Minecraft 1.14

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-25 12:00:00 +10:00
parent 5ea2a0e8e4
commit badc255efc
34 changed files with 172 additions and 167 deletions

View File

@@ -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);