This commit is contained in:
Shaun Bennett 2014-11-30 00:13:14 -06:00
parent 4fd4a60019
commit 50fffa670c

View File

@ -1,6 +1,6 @@
From 43d9880af36fc9c26e30cdfe24fe043f0212550f Mon Sep 17 00:00:00 2001
From d9dfe49376fe2b1f709f9f20e62db39fd9381956 Mon Sep 17 00:00:00 2001
From: Shaun Bennett <shaun@mineplex.com>
Date: Sat, 29 Nov 2014 23:10:49 -0600
Date: Sun, 30 Nov 2014 00:10:38 -0600
Subject: [PATCH] Mineplex Changes
@ -1164,184 +1164,6 @@ index 0000000..c7da28c
+ this.a((PacketListenerPlayOut) packetlistener);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerINfo.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerINfo.java
new file mode 100644
index 0000000..d86abc7
--- /dev/null
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerINfo.java
@@ -0,0 +1,172 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by Fernflower decompiler)
+//
+
+package net.minecraft.server;
+
+import com.google.common.collect.Lists;
+import com.mojang.authlib.GameProfile;
+import com.mojang.authlib.properties.Property;
+import java.util.Iterator;
+import java.util.List;
+import net.minecraft.server.EntityPlayer;
+import net.minecraft.server.EnumGamemode;
+import net.minecraft.server.EnumPlayerInfoAction;
+import net.minecraft.server.IChatBaseComponent;
+import net.minecraft.server.Packet;
+import net.minecraft.server.PacketDataSerializer;
+import net.minecraft.server.PacketListenerPlayOut;
+import net.minecraft.server.PlayerInfoData;
+import net.minecraft.server.SwitchHelperPlayerInfo;
+
+public class PacketPlayOutPlayerInfo implements Packet {
+ public EnumPlayerInfoAction a;
+ public final List b = Lists.newArrayList();
+
+ public PacketPlayOutPlayerInfo() {
+ }
+
+ public PacketPlayOutPlayerInfo(EnumPlayerInfoAction var1, EntityPlayer... var2) {
+ this.a = var1;
+ EntityPlayer[] var3 = var2;
+ int var4 = var2.length;
+
+ for(int var5 = 0; var5 < var4; ++var5) {
+ EntityPlayer var6 = var3[var5];
+ this.b.add(new PlayerInfoData(this, var6.getProfile(), var6.ping, var6.playerInteractManager.getGameMode(), var6.getPlayerListName()));
+ }
+
+ }
+
+ public PacketPlayOutPlayerInfo(EnumPlayerInfoAction var1, Iterable var2) {
+ this.a = var1;
+ Iterator var3 = var2.iterator();
+
+ while(var3.hasNext()) {
+ EntityPlayer var4 = (EntityPlayer)var3.next();
+ this.b.add(new PlayerInfoData(this, var4.getProfile(), var4.ping, var4.playerInteractManager.getGameMode(), var4.getPlayerListName()));
+ }
+
+ }
+
+ public void a(PacketDataSerializer var1) {
+ this.a = (EnumPlayerInfoAction)var1.a(EnumPlayerInfoAction.class);
+ int var2 = var1.e();
+
+ for(int var3 = 0; var3 < var2; ++var3) {
+ GameProfile var4 = null;
+ int var5 = 0;
+ EnumGamemode var6 = null;
+ IChatBaseComponent var7 = null;
+ switch(this.a.ordinal()) {
+ case 1:
+ var4 = new GameProfile(var1.g(), var1.c(16));
+ int var8 = var1.e();
+
+ for(int var9 = 0; var9 < var8; ++var9) {
+ String var10 = var1.c(32767);
+ String var11 = var1.c(32767);
+ if(var1.readBoolean()) {
+ var4.getProperties().put(var10, new Property(var10, var11, var1.c(32767)));
+ } else {
+ var4.getProperties().put(var10, new Property(var10, var11));
+ }
+ }
+
+ var6 = EnumGamemode.getById(var1.e());
+ var5 = var1.e();
+ if(var1.readBoolean()) {
+ var7 = var1.d();
+ }
+ break;
+ case 2:
+ var4 = new GameProfile(var1.g(), (String)null);
+ var6 = EnumGamemode.getById(var1.e());
+ break;
+ case 3:
+ var4 = new GameProfile(var1.g(), (String)null);
+ var5 = var1.e();
+ break;
+ case 4:
+ var4 = new GameProfile(var1.g(), (String)null);
+ if(var1.readBoolean()) {
+ var7 = var1.d();
+ }
+ break;
+ case 5:
+ var4 = new GameProfile(var1.g(), (String)null);
+ }
+
+ this.b.add(new PlayerInfoData(this, var4, var5, var6, var7));
+ }
+
+ }
+
+ public void b(PacketDataSerializer var1) {
+ var1.a(this.a);
+ var1.b(this.b.size());
+ Iterator var2 = this.b.iterator();
+
+ while(var2.hasNext()) {
+ PlayerInfoData var3 = (PlayerInfoData)var2.next();
+ switch(this.a.ordinal()) {
+ case 1:
+ var1.a(var3.a().getId());
+ var1.a(var3.a().getName());
+ var1.b(var3.a().getProperties().size());
+ Iterator var4 = var3.a().getProperties().values().iterator();
+
+ while(var4.hasNext()) {
+ Property var5 = (Property)var4.next();
+ var1.a(var5.getName());
+ var1.a(var5.getValue());
+ if(var5.hasSignature()) {
+ var1.writeBoolean(true);
+ var1.a(var5.getSignature());
+ } else {
+ var1.writeBoolean(false);
+ }
+ }
+
+ var1.b(var3.c().getId());
+ var1.b(var3.b());
+ if(var3.d() == null) {
+ var1.writeBoolean(false);
+ } else {
+ var1.writeBoolean(true);
+ var1.a(var3.d());
+ }
+ break;
+ case 2:
+ var1.a(var3.a().getId());
+ var1.b(var3.c().getId());
+ break;
+ case 3:
+ var1.a(var3.a().getId());
+ var1.b(var3.b());
+ break;
+ case 4:
+ var1.a(var3.a().getId());
+ if(var3.d() == null) {
+ var1.writeBoolean(false);
+ } else {
+ var1.writeBoolean(true);
+ var1.a(var3.d());
+ }
+ break;
+ case 5:
+ var1.a(var3.a().getId());
+ }
+ }
+
+ }
+
+ public void a(PacketListenerPlayOut var1) {
+ var1.a(this);
+ }
+
+ public void a(PacketListener packetlistener) {
+ this.a((PacketListenerPlayOut) packetlistener);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntity.java b/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntity.java
new file mode 100644
index 0000000..d77bccf