diff --git a/README.md b/README.md index 01c7a884..a8ce2e34 100644 --- a/README.md +++ b/README.md @@ -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 [here](http://build.spacebase.ch/job/MCProtocolLib14w04b/). +You can also download a build [here](http://build.spacebase.ch/job/MCProtocolLib14w06b/). License --------- MCProtocolLib is licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.html). + diff --git a/pom.xml b/pom.xml index 544c0d47..7151d9e6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 ch.spacebase mcprotocollib - 14w04b-SNAPSHOT + 14w06b-SNAPSHOT jar MCProtocolLib diff --git a/src/main/java/ch/spacebase/mc/protocol/ProtocolConstants.java b/src/main/java/ch/spacebase/mc/protocol/ProtocolConstants.java index 7b518b49..2b1e16cb 100644 --- a/src/main/java/ch/spacebase/mc/protocol/ProtocolConstants.java +++ b/src/main/java/ch/spacebase/mc/protocol/ProtocolConstants.java @@ -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"; diff --git a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerMovementPacket.java b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerMovementPacket.java index 95a18940..bec5256b 100644 --- a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerMovementPacket.java +++ b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerMovementPacket.java @@ -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); } diff --git a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionPacket.java b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionPacket.java index 42cd7fc8..101d6266 100644 --- a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionPacket.java +++ b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionPacket.java @@ -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; } diff --git a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionRotationPacket.java b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionRotationPacket.java index 6c857d84..ebd3cf10 100644 --- a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionRotationPacket.java +++ b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/client/entity/player/ClientPlayerPositionRotationPacket.java @@ -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; diff --git a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/server/entity/ServerEntityEffectPacket.java b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/server/entity/ServerEntityEffectPacket.java index 9b77b3c6..943da7ec 100644 --- a/src/main/java/ch/spacebase/mc/protocol/packet/ingame/server/entity/ServerEntityEffectPacket.java +++ b/src/main/java/ch/spacebase/mc/protocol/packet/ingame/server/entity/ServerEntityEffectPacket.java @@ -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