Skip to content

Commit

Permalink
Merge pull request #235 from GameModsBR/PN-88
Browse files Browse the repository at this point in the history
Fix wrong flags in MoveEntityAbsolutePacket + set onGround
  • Loading branch information
joserobjr committed May 8, 2020
2 parents 8e39fb0 + 8ad9e33 commit 9fc6ede
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Click the link above to see the future.
- [#228] Invalid enchantment order on anvil's results causing the crafting transaction to fail.
- [#226] Anvil cost calculation not applying bedrock edition reductions
- [#222] Anvil changes the level twice and fails the transaction if the player doesn't have enough.
- [#235] Wrong flags in MoveEntityAbsolutePacket

## [1.2.0.0-PN] - 2020-05-03 ([Check the milestone](https://github.com/GameModsBR/PowerNukkit/milestone/6?closed=1))
**Note:** Effort has been made to keep this list accurate but some bufixes and new features might be missing here, specially those made by the NukkitX team and contributors.
Expand Down Expand Up @@ -194,3 +195,4 @@ Click the link above to see the future.
[#224]: https://github.com/GameModsBR/PowerNukkit/pull/224
[#226]: https://github.com/GameModsBR/PowerNukkit/issues/226
[#228]: https://github.com/GameModsBR/PowerNukkit/issues/228
[#235]: https://github.com/GameModsBR/PowerNukkit/issues/235
1 change: 1 addition & 0 deletions src/main/java/cn/nukkit/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,7 @@ public void addEntityMovement(Entity entity, double x, double y, double z, doubl
pk.yaw = (float) yaw;
pk.headYaw = (float) headYaw;
pk.pitch = (float) pitch;
pk.onGround = entity.onGround;

Server.broadcastPacket(entity.getViewers().values(), pk);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public void encode() {
this.reset();
this.putEntityRuntimeId(this.eid);
byte flags = 0;
if (teleport) {
if (onGround) {
flags |= 0x01;
}
if (onGround) {
if (teleport) {
flags |= 0x02;
}
this.putByte(flags);
Expand Down

0 comments on commit 9fc6ede

Please sign in to comment.