Update to Minecraft 1.8.3
This commit is contained in:
@@ -33,10 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
-
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||
@@ -56,12 +52,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
+import com.mojang.authlib.Agent;
|
||||
+import com.mojang.authlib.ProfileLookupCallback;
|
||||
+// Spigot end
|
||||
+
|
||||
public class TileEntitySkull extends TileEntity {
|
||||
|
||||
private int a;
|
||||
public int rotation;
|
||||
private int rotation;
|
||||
private GameProfile g = null;
|
||||
+ // Spigot start
|
||||
+ public static final Executor executor = Executors.newFixedThreadPool(3,
|
||||
@@ -77,8 +74,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Override
|
||||
+ public GameProfile load(String key) throws Exception
|
||||
+ {
|
||||
+ GameProfile[] profiles = new GameProfile[1];
|
||||
+ GameProfileLookup gameProfileLookup = new GameProfileLookup(profiles);
|
||||
+ final GameProfile[] profiles = new GameProfile[1];
|
||||
+ ProfileLookupCallback gameProfileLookup = new ProfileLookupCallback() {
|
||||
+
|
||||
+ @Override
|
||||
+ public void onProfileLookupSucceeded(GameProfile gp) {
|
||||
+ profiles[0] = gp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onProfileLookupFailed(GameProfile gp, Exception excptn) {
|
||||
+ profiles[0] = gp;
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ MinecraftServer.getServer().getGameProfileRepository().findProfilesByNames(new String[] { key }, Agent.MINECRAFT, gameProfileLookup);
|
||||
+
|
||||
@@ -95,7 +103,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ if ( property == null )
|
||||
+ {
|
||||
+ profile = MinecraftServer.getServer().aB().fillProfileProperties( profile, true );
|
||||
+ profile = MinecraftServer.getServer().aC().fillProfileProperties( profile, true );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -153,10 +161,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ callback.apply(profile);
|
||||
} else {
|
||||
- Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null);
|
||||
-
|
||||
+ Property property = (Property) Iterables.getFirst(profile.getProperties().get("textures"), (Object) null);
|
||||
|
||||
- if (property == null) {
|
||||
- gameprofile1 = MinecraftServer.getServer().aB().fillProfileProperties(gameprofile1, true);
|
||||
- }
|
||||
- gameprofile1 = MinecraftServer.getServer().aC().fillProfileProperties(gameprofile1, true);
|
||||
+ if (property != null) {
|
||||
+ callback.apply(profile);
|
||||
+ return;
|
||||
}
|
||||
-
|
||||
- return gameprofile1;
|
||||
+ executor.execute(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user