geforkt von Mirrors/Paper
2365b308c8
Upstream has released updates that appears to apply and compile correctly. This update has been tested to ensure that World Conversion still occurs correctly. Bukkit Changes: 0812ce2c SPIGOT-4397: isChunkGenerated API CraftBukkit Changes:4824655c
SPIGOT-4398: Upgrade to ASM 6.2.1 for better Java 11 supporteea43870
MC-134115: Fix issues converting tile entities1a7f2d10
SPIGOT-4397: isChunkGenerated API40aed54d
SPIGOT-4396: Improve vehicle movement Spigot Changes: f6a273b1 Rebuild patches
35 Zeilen
1.2 KiB
Diff
35 Zeilen
1.2 KiB
Diff
From f0b1febe6c35af1f97da719744d9949c81b1f92d 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 c006cc9778..e90ce79a97 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -169,8 +169,9 @@ 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;
|
|
public boolean newChunk;
|
|
@@ -1173,7 +1174,7 @@ 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) {
|
|
--
|
|
2.19.0
|
|
|