Update to Minecraft 1.13

This commit is contained in:
md_5
2018-07-22 12:00:00 +10:00
parent 961295e432
commit 1a6b4f5392
73 changed files with 469 additions and 418 deletions

View File

@@ -4,9 +4,9 @@
}
@Nullable
- public static DataInputStream d(File file, int i, int j) {
- public static DataInputStream read(File file, int i, int j) {
+ // CraftBukkit start - call sites hoisted for synchronization
+ public static synchronized NBTTagCompound d(File file, int i, int j) throws IOException {
+ public static synchronized NBTTagCompound read(File file, int i, int j) throws IOException {
RegionFile regionfile = a(file, i, j);
- return regionfile.a(i & 31, j & 31);
@@ -20,12 +20,12 @@
}
@Nullable
- public static DataOutputStream e(File file, int i, int j) {
+ public static synchronized void e(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException {
- public static DataOutputStream write(File file, int i, int j) {
+ public static synchronized void write(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException {
RegionFile regionfile = a(file, i, j);
- return regionfile.b(i & 31, j & 31);
+ DataOutputStream dataoutputstream = regionfile.b(i & 31, j & 31);
- return regionfile.c(i & 31, j & 31);
+ DataOutputStream dataoutputstream = regionfile.c(i & 31, j & 31);
+ NBTCompressedStreamTools.a(nbttagcompound, (java.io.DataOutput) dataoutputstream);
+ dataoutputstream.close();
}