9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 15:09:26 +00:00

fix: not using VarInt in some new NMS packets

This commit is contained in:
LoJoSho
2024-12-21 11:55:16 -06:00
parent 374df6848a
commit cc28221af7
6 changed files with 11 additions and 11 deletions

View File

@@ -193,7 +193,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
List<Player> sendTo List<Player> sendTo
) { ) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeDouble(x); byteBuf.writeDouble(x);
byteBuf.writeDouble(y); byteBuf.writeDouble(y);
byteBuf.writeDouble(z); byteBuf.writeDouble(z);
@@ -212,7 +212,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
@Override @Override
public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) { public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeFloat(yaw); byteBuf.writeFloat(yaw);
byteBuf.writeBoolean(onGround); byteBuf.writeBoolean(onGround);
try { try {

View File

@@ -193,7 +193,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
List<Player> sendTo List<Player> sendTo
) { ) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeDouble(x); byteBuf.writeDouble(x);
byteBuf.writeDouble(y); byteBuf.writeDouble(y);
byteBuf.writeDouble(z); byteBuf.writeDouble(z);
@@ -212,7 +212,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
@Override @Override
public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) { public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeFloat(yaw); byteBuf.writeFloat(yaw);
byteBuf.writeBoolean(onGround); byteBuf.writeBoolean(onGround);
try { try {

View File

@@ -194,7 +194,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
List<Player> sendTo List<Player> sendTo
) { ) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeDouble(x); byteBuf.writeDouble(x);
byteBuf.writeDouble(y); byteBuf.writeDouble(y);
byteBuf.writeDouble(z); byteBuf.writeDouble(z);
@@ -213,7 +213,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
@Override @Override
public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) { public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeFloat(yaw); byteBuf.writeFloat(yaw);
byteBuf.writeBoolean(onGround); byteBuf.writeBoolean(onGround);
try { try {

View File

@@ -193,7 +193,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
List<Player> sendTo List<Player> sendTo
) { ) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeDouble(x); byteBuf.writeDouble(x);
byteBuf.writeDouble(y); byteBuf.writeDouble(y);
byteBuf.writeDouble(z); byteBuf.writeDouble(z);
@@ -212,7 +212,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
@Override @Override
public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) { public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeFloat(yaw); byteBuf.writeFloat(yaw);
byteBuf.writeBoolean(onGround); byteBuf.writeBoolean(onGround);
try { try {

View File

@@ -203,7 +203,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
List<Player> sendTo List<Player> sendTo
) { ) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeDouble(x); byteBuf.writeDouble(x);
byteBuf.writeDouble(y); byteBuf.writeDouble(y);
byteBuf.writeDouble(z); byteBuf.writeDouble(z);
@@ -222,7 +222,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
@Override @Override
public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) { public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeFloat(yaw); byteBuf.writeFloat(yaw);
byteBuf.writeBoolean(onGround); byteBuf.writeBoolean(onGround);
try { try {

View File

@@ -201,7 +201,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
@Override @Override
public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) { public void sendRotationPacket(int entityId, float yaw, boolean onGround, List<Player> sendTo) {
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer()); FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeInt(entityId); byteBuf.writeVarInt(entityId);
byteBuf.writeFloat(yaw); byteBuf.writeFloat(yaw);
byteBuf.writeBoolean(onGround); byteBuf.writeBoolean(onGround);
try { try {