mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 01:12:47 +01:00
13d1abf01e
Upstream has released updates that appears to apply and compile correctly. This update has only been PARTIALLY tested by PaperMC and as with ANY update, please do your own testing I've tested basic region file saving as well as our oversized chunks approach. Bukkit Changes: e167e549 Clarify MerchantInventory#getSelectedRecipe. 3a1d5b8f Apply default permissions by registration order. c64cc93f Make tags Keyed ec037ed7 Added a method to get a list of tags bfb6ef86 Introduce rotation methods to the Vector class fc727372 Remove draft API from FluidLevelChangeEvent CraftBukkit Changes:6430d9c0
SPIGOT-4632: BlockState location is not fixed14cd1688
Fix CraftInventoryMerchant#getSelectedRecipe if there is no active merchant recipe.c24abab7
Load custom permissions after default permissions.bc99dfe8
Make tags Keyed6fce004f
Added a method to get a list of tags Spigot Changes: e5e5c7c6 Allow Saving Large Chunks e8d3881c Rebuild patches
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 6411f52ac4ce53d7de71028c657dfc2e6b89e001 Mon Sep 17 00:00:00 2001
|
|
From: Antony Riley <antony@cyberiantiger.org>
|
|
Date: Tue, 29 Mar 2016 06:56:23 +0300
|
|
Subject: [PATCH] Reduce IO ops opening a new region file.
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
|
index 9626396745..e2d4450e90 100644
|
|
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
|
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
|
@@ -71,9 +71,17 @@ public class RegionFile {
|
|
this.c.seek(0L);
|
|
|
|
int k;
|
|
+ // Paper Start
|
|
+ java.nio.ByteBuffer header = java.nio.ByteBuffer.allocate(8192);
|
|
+ while (header.hasRemaining()) {
|
|
+ if (this.c.getChannel().read(header) == -1) throw new java.io.EOFException();
|
|
+ }
|
|
+ header.clear();
|
|
+ java.nio.IntBuffer headerAsInts = header.asIntBuffer();
|
|
+ // Paper End
|
|
|
|
for (j = 0; j < 1024; ++j) {
|
|
- k = this.c.readInt();
|
|
+ k = headerAsInts.get(); // Paper
|
|
this.d[j] = k;
|
|
// Spigot start
|
|
int length = k & 255;
|
|
@@ -99,7 +107,7 @@ public class RegionFile {
|
|
}
|
|
|
|
for (j = 0; j < 1024; ++j) {
|
|
- k = this.c.readInt();
|
|
+ k = headerAsInts.get(); // Paper
|
|
this.e[j] = k;
|
|
}
|
|
} catch (IOException ioexception) {
|
|
--
|
|
2.20.1
|
|
|