mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
feat: add nms support for camera packet
This commit is contained in:
@@ -211,4 +211,16 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendCameraPacket(int entityId, List<Player> sendTo) {
|
||||
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
|
||||
byteBuf.writeVarInt(entityId);
|
||||
try {
|
||||
ClientboundSetCameraPacket packet = cameraConstructor.newInstance(byteBuf);
|
||||
for (Player p : sendTo) sendPacket(p, packet);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user