mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 10:11:29 +01:00
d10ea572de
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
32 lines
No EOL
1.2 KiB
Diff
32 lines
No EOL
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 28 Aug 2018 21:35:05 -0400
|
|
Subject: [PATCH] Optimize Chunk#getPos
|
|
|
|
Don't create an object just to get chunk coords.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
|
index 6f8e6db820..82d8aca47f 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
|
// CraftBukkit start
|
|
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
|
|
this.chunkKey = ChunkCoordIntPair.a(this.locX, this.locZ);
|
|
+ this.chunkCoords = new ChunkCoordIntPair(this.locX, this.locZ); // Paper
|
|
}
|
|
-
|
|
+ private final ChunkCoordIntPair chunkCoords; // Paper
|
|
public org.bukkit.Chunk bukkitChunk;
|
|
public boolean mustSave;
|
|
private boolean needsDecoration;
|
|
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
|
}
|
|
|
|
public ChunkCoordIntPair getPos() {
|
|
- return new ChunkCoordIntPair(this.locX, this.locZ);
|
|
+ return this.chunkCoords; // Paper
|
|
}
|
|
|
|
public boolean b(int i, int j) {
|
|
--
|