3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-10-08 11:10:06 +02:00

Small formatting

Dieser Commit ist enthalten in:
HugoDaBosss 2016-03-05 01:24:15 +01:00
Ursprung bd5f44b477
Commit a42526bb88

Datei anzeigen

@ -560,25 +560,24 @@ public class OutgoingTransformer {
if(action == 1) { // update spawner if(action == 1) { // update spawner
try { try {
DataInputStream stream = new DataInputStream(new ByteBufInputStream(input)); DataInputStream stream = new DataInputStream(new ByteBufInputStream(input));
CompoundTag tag = (CompoundTag) NBTIO.readTag(stream); CompoundTag tag = (CompoundTag) NBTIO.readTag(stream);
String entity = (String) tag.get("EntityId").getValue(); String entity = (String) tag.get("EntityId").getValue();
CompoundTag spawn = new CompoundTag("SpawnData"); CompoundTag spawn = new CompoundTag("SpawnData");
spawn.put(new StringTag("id", entity)); spawn.put(new StringTag("id", entity));
tag.put(spawn); tag.put(spawn);
PacketUtil.writeBlockPosition(output, pos[0], pos[1], pos[2]); PacketUtil.writeBlockPosition(output, pos[0], pos[1], pos[2]);
output.writeByte(action); output.writeByte(action);
DataOutputStream out = new DataOutputStream(new ByteBufOutputStream(output)); DataOutputStream out = new DataOutputStream(new ByteBufOutputStream(output));
NBTIO.writeTag(out, tag); NBTIO.writeTag(out, tag);
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block e.printStackTrace();
e.printStackTrace(); }
}
return; return;
} }
PacketUtil.writeBlockPosition(output, pos[0], pos[1], pos[2]); PacketUtil.writeBlockPosition(output, pos[0], pos[1], pos[2]);
output.writeByte(action); output.writeByte(action);
output.writeBytes(input, input.readableBytes()); output.writeBytes(input, input.readableBytes());
return; return;
} }
if (packet == PacketType.PLAY_CHUNK_DATA) { if (packet == PacketType.PLAY_CHUNK_DATA) {
// We need to catch unloading chunk packets as defined by wiki.vg // We need to catch unloading chunk packets as defined by wiki.vg