From a3b28bf5254bf83385d62f6c29195d83a30b993b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 12 Apr 2014 18:15:24 +1000 Subject: [PATCH] Fix more legacy support --- .../0124-Old-New-Version-Support.patch | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/CraftBukkit-Patches/0124-Old-New-Version-Support.patch b/CraftBukkit-Patches/0124-Old-New-Version-Support.patch index 5bf5cee..7b55bfa 100644 --- a/CraftBukkit-Patches/0124-Old-New-Version-Support.patch +++ b/CraftBukkit-Patches/0124-Old-New-Version-Support.patch @@ -1,4 +1,4 @@ -From 2ef1e42e7e5489229c4c20ae2ae880fc992ca9b5 Mon Sep 17 00:00:00 2001 +From a075d1294c4170b06370a4ffdbc9aa912ff16640 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 12 Apr 2014 15:11:15 +1000 Subject: [PATCH] Old / New Version Support. @@ -127,6 +127,56 @@ index 0000000..011a9aa + this.a(channelhandlercontext, (Packet) object, bytebuf); + } +} +diff --git a/src/main/java/net/minecraft/server/PacketLoginOutSuccess.java b/src/main/java/net/minecraft/server/PacketLoginOutSuccess.java +new file mode 100644 +index 0000000..a244f00 +--- /dev/null ++++ b/src/main/java/net/minecraft/server/PacketLoginOutSuccess.java +@@ -0,0 +1,44 @@ ++package net.minecraft.server; ++ ++import java.io.IOException; ++import java.util.UUID; ++ ++import net.minecraft.util.com.mojang.authlib.GameProfile; ++ ++public class PacketLoginOutSuccess extends Packet { ++ ++ private GameProfile a; ++ ++ public PacketLoginOutSuccess() {} ++ ++ public PacketLoginOutSuccess(GameProfile gameprofile) { ++ this.a = gameprofile; ++ } ++ ++ public void a(PacketDataSerializer packetdataserializer) throws IOException { ++ String s = packetdataserializer.c(36); ++ String s1 = packetdataserializer.c(16); ++ UUID uuid = UUID.fromString(s); ++ ++ this.a = new GameProfile(uuid, s1); ++ } ++ ++ public void b(PacketDataSerializer packetdataserializer) throws IOException { ++ UUID uuid = this.a.getId(); ++ ++ packetdataserializer.a(uuid == null ? "" : ( ( packetdataserializer.version >= 5 ) ? uuid.toString() : uuid.toString().replaceAll( "-", "" ) ) ); ++ packetdataserializer.a(this.a.getName()); ++ } ++ ++ public void a(PacketLoginOutListener packetloginoutlistener) { ++ packetloginoutlistener.a(this); ++ } ++ ++ public boolean a() { ++ return true; ++ } ++ ++ public void handle(PacketListener packetlistener) { ++ this.a((PacketLoginOutListener) packetlistener); ++ } ++} diff --git a/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java b/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java index 7bae405..5e24f7e 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java