Fix entity metadata recording in spawn packets
This commit is contained in:
@@ -13,6 +13,7 @@ import net.minecraft.network.play.server.S0FPacketSpawnMob;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class PacketListener extends DataListener {
|
||||
@@ -87,6 +88,7 @@ public class PacketListener extends DataListener {
|
||||
lastSentPacket = pd.getTimestamp();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private PacketData getPacketData(ChannelHandlerContext ctx, Packet packet) throws IOException, IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException {
|
||||
|
||||
if(startTime == null) startTime = System.currentTimeMillis();
|
||||
@@ -96,28 +98,26 @@ public class PacketListener extends DataListener {
|
||||
|
||||
if(packet instanceof S0FPacketSpawnMob) {
|
||||
S0FPacketSpawnMob p = (S0FPacketSpawnMob) packet;
|
||||
p.field_149043_l = new DataWatcher(null);
|
||||
p.field_149043_l.addObject(0, (byte)0);
|
||||
/*
|
||||
if (p.field_149043_l == null) {
|
||||
p.field_149043_l = new DataWatcher(null);
|
||||
}
|
||||
if(p.func_149027_c() != null) {
|
||||
for(DataWatcher.WatchableObject wo : (List<DataWatcher.WatchableObject>) p.func_149027_c()) {
|
||||
p.field_149043_l.addObject(wo.getDataValueId(), wo.getObject());
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
if(packet instanceof S0CPacketSpawnPlayer) {
|
||||
S0CPacketSpawnPlayer p = (S0CPacketSpawnPlayer) packet;
|
||||
p.field_148960_i = new DataWatcher(null);
|
||||
p.field_148960_i.addObject(0, (byte)0);
|
||||
/*
|
||||
if (p.field_148960_i == null) {
|
||||
p.field_148960_i = new DataWatcher(null);
|
||||
}
|
||||
if(p.func_148944_c() != null) {
|
||||
for(DataWatcher.WatchableObject wo : (List<DataWatcher.WatchableObject>) p.func_148944_c()) {
|
||||
p.field_148960_i.addObject(wo.getDataValueId(), wo.getObject());
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user