Examples of SoundEffectMessage


Examples of net.lightstone.msg.SoundEffectMessage

    int id = buffer.readInt();
    int x = buffer.readInt();
    int y = buffer.readUnsignedByte();
    int z = buffer.readInt();
    int data = buffer.readInt();
    return new SoundEffectMessage(id, x, y, z, data);
  }
View Full Code Here

Examples of net.lightstone.msg.SoundEffectMessage

      int oldType = chunk.getType(localX, localZ, y);
      chunk.setType(localX, localZ, y, Blocks.TYPE_AIR);

      // TODO this should also be somewhere else as well... perhaps in the chunk.setType() method itself?
      BlockChangeMessage bcmsg = new BlockChangeMessage(x, y, z, 0, 0);
      SoundEffectMessage soundMsg = new SoundEffectMessage(SoundEffectMessage.DIG_SOUND, x, y, z, oldType);
      for (Player p: world.getPlayers()) {
        p.getSession().send(bcmsg);
        if(p != player && player.isWithinDistance(p)) {
          p.getSession().send(soundMsg);
        }
View Full Code Here

Examples of org.spout.vanilla.protocol.msg.world.SoundEffectMessage

    event.getMessages().add(new WindowPropertyMessage(event.getWindow(), event.getId(), event.getValue()));
  }

  @EventHandler
  public void onSoundEffect(PlaySoundEffectEvent event) {
    event.getMessages().add(new SoundEffectMessage(event.getSound().getName(), event.getPosition(), event.getVolume(), event.getPitch(), getRepositionManager()));
  }
View Full Code Here

Examples of org.spout.vanilla.protocol.msg.world.SoundEffectMessage

    float x = (float) buffer.readInt() / 8.0f;
    float y = (float) buffer.readInt() / 8.0f;
    float z = (float) buffer.readInt() / 8.0f;
    float volume = buffer.readFloat();
    float pitch = 63f / (float) buffer.readUnsignedByte();
    return new SoundEffectMessage(soundName, x, y, z, volume, pitch, NullRepositionManager.getInstance());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.