mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-06 07:32:07 +01:00
Upstream merge
This commit is contained in:
parent
9263823b95
commit
3ce8cf1a9a
@ -70,8 +70,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
Chunk chunk = (Chunk) data[0];
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) data[1];
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
chunk.entitySlices[k] = new EntitySlice(Entity.class);
|
||||
}
|
||||
|
||||
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
|
||||
// CraftBukkit end
|
||||
-
|
||||
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
|
||||
|
@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class TileEntity {
|
||||
|
||||
// CraftBukkit start - add method
|
||||
public InventoryHolder getOwner() {
|
||||
if (world == null) return null;
|
||||
- org.bukkit.block.BlockState state = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState();
|
||||
+ // Spigot start
|
||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
|
||||
|
@ -26,15 +26,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.world = world;
|
||||
this.locX = i;
|
||||
this.locZ = j;
|
||||
@@ -0,0 +0,0 @@ public class Chunk {
|
||||
this.heightMap = new int[256];
|
||||
|
||||
/* CraftBukkit start
|
||||
for (int k = 0; k < this.entitySlices.length; ++k) {
|
||||
- this.entitySlices[k] = new EntitySlice(Entity.class);
|
||||
+ this.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot
|
||||
}
|
||||
// CraftBukkit end */
|
||||
|
||||
Arrays.fill(this.f, -999);
|
||||
@@ -0,0 +0,0 @@ public class Chunk {
|
||||
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
|
||||
|
||||
@ -59,45 +58,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
return this.entitySlices;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
|
||||
// CraftBukkit start - moved from Chunk.<init>
|
||||
for (int k = 0; k < chunk.entitySlices.length; ++k) {
|
||||
- chunk.entitySlices[k] = new EntitySlice(Entity.class);
|
||||
+ chunk.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot
|
||||
}
|
||||
// CraftBukkit end
|
||||
chunk.addEntities();
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
|
||||
// moved from Chunk.<init>
|
||||
for (int k = 0; k < chunk.entitySlices.length; ++k) {
|
||||
- chunk.entitySlices[k] = new EntitySlice(Entity.class);
|
||||
+ chunk.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot
|
||||
}
|
||||
// CraftBukkit end
|
||||
world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
if (chunk != null) {
|
||||
// moved from Chunk.<init>
|
||||
for (int k = 0; k < chunk.entitySlices.length; ++k) {
|
||||
- chunk.entitySlices[k] = new EntitySlice(net.minecraft.server.Entity.class);
|
||||
+ chunk.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList();
|
||||
}
|
||||
world.chunkProviderServer.chunks.put(LongHash.toLong(cx, cz), chunk);
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
|
Loading…
Reference in New Issue
Block a user