mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-19 05:31:32 +01:00
Made Chunk.getEntities() account for the world height increase. Fixes BUKKIT-1059
By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
parent
2cb004b945
commit
e9f7ab207b
1 changed files with 2 additions and 2 deletions
|
@ -84,13 +84,13 @@ public class CraftChunk implements Chunk {
|
||||||
int count = 0, index = 0;
|
int count = 0, index = 0;
|
||||||
net.minecraft.server.Chunk chunk = getHandle();
|
net.minecraft.server.Chunk chunk = getHandle();
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
count += chunk.entitySlices[i].size();
|
count += chunk.entitySlices[i].size();
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity[] entities = new Entity[count];
|
Entity[] entities = new Entity[count];
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
for (Object obj : chunk.entitySlices[i].toArray()) {
|
for (Object obj : chunk.entitySlices[i].toArray()) {
|
||||||
if (!(obj instanceof net.minecraft.server.Entity)) {
|
if (!(obj instanceof net.minecraft.server.Entity)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue