Fixed latest patch, thanks snowleo!
Dieser Commit ist enthalten in:
Ursprung
f000c40643
Commit
076af791cc
@ -1,4 +1,4 @@
|
||||
From 8afd877d7c450801ee8bd0f63c87341e6c41a9cf Mon Sep 17 00:00:00 2001
|
||||
From 14cfdef4dcf4444bb77a94f927077588e4a58bd5 Mon Sep 17 00:00:00 2001
|
||||
From: snowleo <schneeleo@gmail.com>
|
||||
Date: Wed, 8 May 2013 12:09:45 +1000
|
||||
Subject: [PATCH] Optimized version of LocaleLanguage
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Optimized version of LocaleLanguage
|
||||
This patch reduces the memory footprint of each EntityPlayer by about 300 KB. The original class looks very unfinished and future versions might use the commented code.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
index d88f864..cd165b9 100644
|
||||
index d88f864..2a52fe3 100644
|
||||
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
@@ -1,5 +1,10 @@
|
||||
@ -20,7 +20,7 @@ index d88f864..cd165b9 100644
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
@@ -12,15 +17,22 @@ import java.util.TreeMap;
|
||||
@@ -12,15 +17,23 @@ import java.util.TreeMap;
|
||||
|
||||
public class LocaleLanguage {
|
||||
|
||||
@ -41,14 +41,15 @@ index d88f864..cd165b9 100644
|
||||
private String e;
|
||||
- private boolean f;
|
||||
+ // private boolean f; // Spigot - removed
|
||||
+ static { e(); } // Spigot - initializer
|
||||
|
||||
public LocaleLanguage(String s) {
|
||||
- this.e();
|
||||
+ //this.e(); // Spigot: moved up
|
||||
+ // this.e(); // Spigot: moved up
|
||||
this.a(s, false);
|
||||
}
|
||||
|
||||
@@ -28,7 +40,7 @@ public class LocaleLanguage {
|
||||
@@ -28,7 +41,7 @@ public class LocaleLanguage {
|
||||
return a;
|
||||
}
|
||||
|
||||
@ -57,7 +58,7 @@ index d88f864..cd165b9 100644
|
||||
TreeMap treemap = new TreeMap();
|
||||
|
||||
try {
|
||||
@@ -46,23 +58,25 @@ public class LocaleLanguage {
|
||||
@@ -46,23 +59,25 @@ public class LocaleLanguage {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -88,7 +89,7 @@ index d88f864..cd165b9 100644
|
||||
for (String s1 = bufferedreader.readLine(); s1 != null; s1 = bufferedreader.readLine()) {
|
||||
s1 = s1.trim();
|
||||
if (!s1.startsWith("#")) {
|
||||
@@ -73,22 +87,32 @@ public class LocaleLanguage {
|
||||
@@ -73,22 +88,32 @@ public class LocaleLanguage {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -124,7 +125,7 @@ index d88f864..cd165b9 100644
|
||||
Enumeration enumeration = properties.propertyNames();
|
||||
|
||||
while (enumeration.hasMoreElements() && !this.f) {
|
||||
@@ -106,22 +130,25 @@ public class LocaleLanguage {
|
||||
@@ -106,22 +131,25 @@ public class LocaleLanguage {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -154,7 +155,7 @@ index d88f864..cd165b9 100644
|
||||
String s1 = this.b.getProperty(s, s);
|
||||
|
||||
try {
|
||||
@@ -131,11 +158,11 @@ public class LocaleLanguage {
|
||||
@@ -131,11 +159,11 @@ public class LocaleLanguage {
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,7 +165,7 @@ index d88f864..cd165b9 100644
|
||||
}
|
||||
|
||||
- public synchronized String c(String s) {
|
||||
+ public String c(String s) { //S pigot - removed synchronized, b is volatile
|
||||
+ public String c(String s) { // Spigot - removed synchronized, b is volatile
|
||||
return this.b.getProperty(s + ".name", "");
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren