Mappings Update

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-12-13 11:00:00 +11:00
parent 8817bc22d9
commit 83baf22bde
80 changed files with 469 additions and 518 deletions

View File

@@ -8,18 +8,18 @@
+ public static synchronized RegionFile b(File file, int i, int j) {
+ File file1 = new File(file, "region");
+ File file2 = new File(file1, "r." + (i >> 5) + "." + (j >> 5) + ".mca");
+ RegionFile regionfile = (RegionFile) RegionFileCache.a.get(file2);
+ RegionFile regionfile = (RegionFile) RegionFileCache.cache.get(file2);
+
+ if (regionfile != null) {
+ return regionfile;
+ } else if (file1.exists() && file2.exists()) {
+ if (RegionFileCache.a.size() >= 256) {
+ if (RegionFileCache.cache.size() >= 256) {
+ a();
+ }
+
+ RegionFile regionfile1 = new RegionFile(file2);
+
+ RegionFileCache.a.put(file2, regionfile1);
+ RegionFileCache.cache.put(file2, regionfile1);
+ return regionfile1;
+ } else {
+ return null;
@@ -28,7 +28,7 @@
+ // CraftBukkit end
+
public static synchronized void a() {
Iterator iterator = RegionFileCache.a.values().iterator();
Iterator iterator = RegionFileCache.cache.values().iterator();
@@ -55,16 +78,32 @@
}