Skip to content

Commit

Permalink
Fixed partial frame rendering bug
Browse files Browse the repository at this point in the history
- Added frame orientation field to Minecraft client to render frame while player is still looking at it (even from a partial viewport)
  • Loading branch information
josemmo committed Jan 22, 2021
1 parent 2974874 commit aec21f0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,32 @@ private void generateSpawnPackets() {
double z = location.getBlockZ();
int pitch = 0;
int yaw = 0;
int orientation = 3;
switch (face) {
case UP:
++y;
pitch = -64;
orientation = 1;
break;
case DOWN:
--y;
pitch = 64;
orientation = 0;
break;
case EAST:
++x;
yaw = -64;
orientation = 5;
break;
case WEST:
--x;
yaw = 64;
orientation = 4;
break;
case NORTH:
--z;
yaw = 128;
orientation = 2;
break;
case SOUTH:
++z;
Expand All @@ -110,7 +116,7 @@ private void generateSpawnPackets() {
.write(3, 0)
.write(4, pitch)
.write(5, yaw)
.write(6, 0);
.write(6, orientation);
framePacket.getUUIDs()
.write(0, UUID.randomUUID());
framePacket.getDoubles()
Expand Down

0 comments on commit aec21f0

Please sign in to comment.