mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
14w06b
This commit is contained in:
parent
9a12fe9596
commit
11c69de21b
7 changed files with 23 additions and 23 deletions
|
@ -20,10 +20,11 @@ See example/ch/spacebase/mc/protocol/test/Test.java
|
|||
--------
|
||||
|
||||
MCProtocolLib uses Maven to manage dependencies. Simply run 'mvn clean install' in the source's directory.
|
||||
You can also download a build <b>[here](http://build.spacebase.ch/job/MCProtocolLib14w04b/)</b>.
|
||||
You can also download a build <b>[here](http://build.spacebase.ch/job/MCProtocolLib14w06b/)</b>.
|
||||
|
||||
|
||||
<b>License</b>
|
||||
---------
|
||||
|
||||
MCProtocolLib is licensed under the <b>[MIT license](http://www.opensource.org/licenses/mit-license.html)</b>.
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ch.spacebase</groupId>
|
||||
<artifactId>mcprotocollib</artifactId>
|
||||
<version>14w04b-SNAPSHOT</version>
|
||||
<version>14w06b-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>MCProtocolLib</name>
|
||||
|
|
|
@ -3,8 +3,8 @@ package ch.spacebase.mc.protocol;
|
|||
public class ProtocolConstants {
|
||||
|
||||
// General Constants
|
||||
public static final String GAME_VERSION = "14w05a";
|
||||
public static final int PROTOCOL_VERSION = 9;
|
||||
public static final String GAME_VERSION = "14w06b";
|
||||
public static final int PROTOCOL_VERSION = 10;
|
||||
|
||||
// General Key Constants
|
||||
public static final String PROFILE_KEY = "profile";
|
||||
|
|
|
@ -9,8 +9,7 @@ import ch.spacebase.packetlib.packet.Packet;
|
|||
public class ClientPlayerMovementPacket implements Packet {
|
||||
|
||||
protected double x;
|
||||
protected double feetY;
|
||||
protected double headY;
|
||||
protected double y;
|
||||
protected double z;
|
||||
protected float yaw;
|
||||
protected float pitch;
|
||||
|
@ -30,12 +29,8 @@ public class ClientPlayerMovementPacket implements Packet {
|
|||
return this.x;
|
||||
}
|
||||
|
||||
public double getFeetY() {
|
||||
return this.feetY;
|
||||
}
|
||||
|
||||
public double getHeadY() {
|
||||
return this.headY;
|
||||
public double getY() {
|
||||
return this.y;
|
||||
}
|
||||
|
||||
public double getZ() {
|
||||
|
@ -58,8 +53,7 @@ public class ClientPlayerMovementPacket implements Packet {
|
|||
public void read(NetInput in) throws IOException {
|
||||
if(this.pos) {
|
||||
this.x = in.readDouble();
|
||||
this.feetY = in.readDouble();
|
||||
this.headY = in.readDouble();
|
||||
this.y = in.readDouble();
|
||||
this.z = in.readDouble();
|
||||
}
|
||||
|
||||
|
@ -75,8 +69,7 @@ public class ClientPlayerMovementPacket implements Packet {
|
|||
public void write(NetOutput out) throws IOException {
|
||||
if(this.pos) {
|
||||
out.writeDouble(this.x);
|
||||
out.writeDouble(this.feetY);
|
||||
out.writeDouble(this.headY);
|
||||
out.writeDouble(this.y);
|
||||
out.writeDouble(this.z);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,12 +6,11 @@ public class ClientPlayerPositionPacket extends ClientPlayerMovementPacket {
|
|||
this.pos = true;
|
||||
}
|
||||
|
||||
public ClientPlayerPositionPacket(boolean onGround, double x, double feetY, double headY, double z) {
|
||||
public ClientPlayerPositionPacket(boolean onGround, double x, double y, double z) {
|
||||
super(onGround);
|
||||
this.pos = true;
|
||||
this.x = x;
|
||||
this.feetY = feetY;
|
||||
this.headY = headY;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,13 +7,12 @@ public class ClientPlayerPositionRotationPacket extends ClientPlayerMovementPack
|
|||
this.rot = true;
|
||||
}
|
||||
|
||||
public ClientPlayerPositionRotationPacket(boolean onGround, double x, double feetY, double headY, double z, float yaw, float pitch) {
|
||||
public ClientPlayerPositionRotationPacket(boolean onGround, double x, double y, double z, float yaw, float pitch) {
|
||||
super(onGround);
|
||||
this.pos = true;
|
||||
this.rot = true;
|
||||
this.x = x;
|
||||
this.feetY = feetY;
|
||||
this.headY = headY;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.yaw = yaw;
|
||||
this.pitch = pitch;
|
||||
|
|
|
@ -14,16 +14,18 @@ public class ServerEntityEffectPacket implements Packet {
|
|||
private Effect effect;
|
||||
private int amplifier;
|
||||
private int duration;
|
||||
private boolean hideParticles;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private ServerEntityEffectPacket() {
|
||||
}
|
||||
|
||||
public ServerEntityEffectPacket(int entityId, Effect effect, int amplifier, int duration) {
|
||||
public ServerEntityEffectPacket(int entityId, Effect effect, int amplifier, int duration, boolean hideParticles) {
|
||||
this.entityId = entityId;
|
||||
this.effect = effect;
|
||||
this.amplifier = amplifier;
|
||||
this.duration = duration;
|
||||
this.hideParticles = hideParticles;
|
||||
}
|
||||
|
||||
public int getEntityId() {
|
||||
|
@ -41,6 +43,10 @@ public class ServerEntityEffectPacket implements Packet {
|
|||
public int getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
|
||||
public boolean getHideParticles() {
|
||||
return this.hideParticles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(NetInput in) throws IOException {
|
||||
|
@ -48,6 +54,7 @@ public class ServerEntityEffectPacket implements Packet {
|
|||
this.effect = MagicValues.key(Effect.class, in.readByte());
|
||||
this.amplifier = in.readByte();
|
||||
this.duration = in.readVarInt();
|
||||
this.hideParticles = in.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,6 +63,7 @@ public class ServerEntityEffectPacket implements Packet {
|
|||
out.writeByte(MagicValues.value(Integer.class, this.effect));
|
||||
out.writeByte(this.amplifier);
|
||||
out.writeVarInt(this.duration);
|
||||
out.writeBoolean(this.hideParticles);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue