Dev import

This commit is contained in:
Sotr
2019-03-20 15:30:27 +08:00
parent dc016ecd7c
commit f468326c1b

View File

@@ -0,0 +1,50 @@
package net.minecraft.server;
import java.io.IOException;
public class PacketPlayOutEntityTeleport implements Packet<PacketListenerPlayOut> {
private int a;
private double b;
private double c;
private double d;
private byte e;
private byte f;
private boolean g;
public PacketPlayOutEntityTeleport() {}
public PacketPlayOutEntityTeleport(Entity entity) {
this.a = entity.getId();
this.b = entity.locX;
this.c = entity.locY;
this.d = entity.locZ;
this.e = (byte) ((int) (entity.yaw * 256.0F / 360.0F));
this.f = (byte) ((int) (entity.pitch * 256.0F / 360.0F));
this.g = entity.onGround;
}
public void a(PacketDataSerializer packetdataserializer) throws IOException {
this.a = packetdataserializer.g();
this.b = packetdataserializer.readDouble();
this.c = packetdataserializer.readDouble();
this.d = packetdataserializer.readDouble();
this.e = packetdataserializer.readByte();
this.f = packetdataserializer.readByte();
this.g = packetdataserializer.readBoolean();
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {
packetdataserializer.d(this.a);
packetdataserializer.writeDouble(this.b);
packetdataserializer.writeDouble(this.c);
packetdataserializer.writeDouble(this.d);
packetdataserializer.writeByte(this.e);
packetdataserializer.writeByte(this.f);
packetdataserializer.writeBoolean(this.g);
}
public void a(PacketListenerPlayOut packetlistenerplayout) {
packetlistenerplayout.a(this);
}
}