mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
--- a/net/minecraft/server/CommandSpreadPlayers.java
|
|
+++ b/net/minecraft/server/CommandSpreadPlayers.java
|
|
@@ -58,7 +58,7 @@
|
|
if (entity instanceof EntityHuman) {
|
|
set.add(entity.getScoreboardTeam());
|
|
} else {
|
|
- set.add((Object) null);
|
|
+ set.add((ScoreboardTeamBase) null); // CraftBukkit - decompile error
|
|
}
|
|
}
|
|
|
|
@@ -266,7 +266,7 @@
|
|
}
|
|
|
|
blockposition = blockposition.down();
|
|
- } while (iblockaccess.getType(blockposition).isAir());
|
|
+ } while (getType(iblockaccess, blockposition).isAir()); // CraftBukkit
|
|
|
|
return blockposition.getY() + 1;
|
|
}
|
|
@@ -282,7 +282,7 @@
|
|
}
|
|
|
|
blockposition = blockposition.down();
|
|
- iblockdata = iblockaccess.getType(blockposition);
|
|
+ iblockdata = getType(iblockaccess, blockposition); // CraftBukkit
|
|
} while (iblockdata.isAir());
|
|
|
|
Material material = iblockdata.getMaterial();
|
|
@@ -294,5 +294,12 @@
|
|
this.a = MathHelper.a(random, d0, d2);
|
|
this.b = MathHelper.a(random, d1, d3);
|
|
}
|
|
+
|
|
+ // CraftBukkit start - add a version of getType which force loads chunks
|
|
+ private static IBlockData getType(IBlockAccess iblockaccess, BlockPosition position) {
|
|
+ ((ChunkProviderServer) ((World) iblockaccess).chunkProvider).getChunkAt(position.getX() >> 4, position.getZ() >> 4, true);
|
|
+ return iblockaccess.getType(position);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
}
|