Cuberite Forum

Full Version: Packets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm not realy familiar with packets but is it possible to do for example:
World:SendPacket(PACKET_SOUND_PARTICLE_EFFECT, 2000*, BlockX, BlockY, BlockZ)
*2000 is the fire particle
to spawn smoke particles at a point?
Currently, no. It is planned that some packets may be available to plugins, but only a handful, such as the plugin channel message or the scoreboard (when I find out what it does Wink )

To make things more complicated, MCServer is trying to walk away from these cryptic functions (see, you yourself had to put a note underneath it saying what it does) towards more friendly names. So we have cProtocol::SendSpawnObject() and cProtocol::SendSpawnVehicle() functions, although they both use the same packet. This might come in handy if ever the protocol decides to spawn vehicles in a different way than "objects", but it's also handy in how people reading the code immediately know what the function does, instead of looking up parameters for packets.
then is there a way to spawn:
  • lightning
  • Particles of any kind
  • Sounds
Do you mean lightning?
(03-29-2013, 02:58 AM)bearbin Wrote: [ -> ]Do you mean lightning?

yea sorry. Wink
Lightning: cWorld:CastThunderbolt(BlockX, BlockY, BlockZ);
Particles: not available to plugins yet; C++ uses cWorld::BroadcastSoundParticleEffect()
Sounds: not available to plugins yet; C++ uses cWorld::BroadcastSoundEffect() or cWorld::BroadcastSoundParticleEffect() (depending on the sound)
thanks but maybe something to note is that i just found out that CastThunderbolt doesn't make any sound.
I'm not sure whether that's a bad thing or a good thing. Imagine a plugin wants to cast thunderbolts with different sound / no sound at all. This way it'd be possible (when sounds are exported to API)

Definitely good to mention that in the documentation, though.