Skip to content

Commit

Permalink
Fixed overlay object sync packets
Browse files Browse the repository at this point in the history
  • Loading branch information
SirEndii committed Nov 4, 2024
1 parent 0b2fcde commit 07d14d8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static CircleObject decode(FriendlyByteBuf buffer) {
int z = buffer.readInt();
int maxX = buffer.readInt();
int maxY = buffer.readInt();
int maxZ = buffer.readInt();
int radius = buffer.readInt();

CircleObject clientObject = new CircleObject(player);
Expand All @@ -74,6 +75,7 @@ public static CircleObject decode(FriendlyByteBuf buffer) {
clientObject.z = z;
clientObject.maxX = maxX;
clientObject.maxY = maxY;
clientObject.maxZ = maxZ;
clientObject.radius = radius;

return clientObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static ItemObject decode(FriendlyByteBuf buffer) {
int z = buffer.readInt();
int maxX = buffer.readInt();
int maxY = buffer.readInt();
int maxZ = buffer.readInt();
String item = buffer.readUtf();

ItemObject clientObject = new ItemObject(player);
Expand All @@ -70,6 +71,7 @@ public static ItemObject decode(FriendlyByteBuf buffer) {
clientObject.z = z;
clientObject.maxX = maxX;
clientObject.maxY = maxY;
clientObject.maxZ = maxZ;
clientObject.item = item;

return clientObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public static RectangleObject decode(FriendlyByteBuf buffer) {
int x = buffer.readInt();
int y = buffer.readInt();
int z = buffer.readInt();
int sizeX = buffer.readInt();
int sizeY = buffer.readInt();
int maxX = buffer.readInt();
int maxY = buffer.readInt();
int maxZ = buffer.readInt();

RectangleObject clientObject = new RectangleObject(player);
clientObject.setId(objectId);
Expand All @@ -61,8 +62,9 @@ public static RectangleObject decode(FriendlyByteBuf buffer) {
clientObject.x = x;
clientObject.y = y;
clientObject.z = z;
clientObject.maxX = sizeX;
clientObject.maxY = sizeY;
clientObject.maxX = maxX;
clientObject.maxY = maxY;
clientObject.maxZ = maxZ;

return clientObject;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ public static TextObject decode(FriendlyByteBuf buffer) {
int x = buffer.readInt();
int y = buffer.readInt();
int z = buffer.readInt();
int sizeX = buffer.readInt();
int sizeY = buffer.readInt();
int maxX = buffer.readInt();
int maxY = buffer.readInt();
int maxZ = buffer.readInt();
String content = buffer.readUtf();
float fontSize = buffer.readFloat();
boolean shadow = buffer.readBoolean();
Expand All @@ -111,8 +112,9 @@ public static TextObject decode(FriendlyByteBuf buffer) {
clientObject.x = x;
clientObject.y = y;
clientObject.z = z;
clientObject.maxX = sizeX;
clientObject.maxY = sizeY;
clientObject.maxX = maxX;
clientObject.maxY = maxY;
clientObject.maxZ = maxZ;
clientObject.content = content;
clientObject.fontSize = fontSize;
clientObject.shadow = shadow;
Expand Down

0 comments on commit 07d14d8

Please sign in to comment.