use of com.minecolonies.coremod.network.messages.client.PlayAudioMessage in project minecolonies by Minecolonies.
the class EgyptianRaidEvent method onStart.
@Override
public void onStart() {
super.onStart();
PlayAudioMessage.sendToAll(getColony(), true, false, new PlayAudioMessage(RaidSounds.DESERT_RAID_WARNING));
}
use of com.minecolonies.coremod.network.messages.client.PlayAudioMessage in project minecolonies by Minecolonies.
the class EgyptianRaidEvent method onUpdate.
@Override
public void onUpdate() {
super.onUpdate();
if (--musicCooldown <= 0) {
PlayAudioMessage.sendToAll(getColony(), true, true, new PlayAudioMessage(RaidSounds.DESERT_RAID));
musicCooldown = 12;
}
}
use of com.minecolonies.coremod.network.messages.client.PlayAudioMessage in project minecolonies by ldtteam.
the class HordeRaidEvent method onStart.
@Override
public void onStart() {
if (spawnPathResult.isDone()) {
final Path path = spawnPathResult.getPath();
if (path != null && path.canReach()) {
spawnPoint = path.getEndNode().asBlockPos();
}
this.wayPoints = ShipBasedRaiderUtils.createWaypoints(colony.getWorld(), path, WAYPOINT_SPACING);
}
final BlockPos spawnPos = ShipBasedRaiderUtils.getLoadedPositionTowardsCenter(spawnPoint, colony, MAX_SPAWN_DEVIATION, spawnPoint, MIN_CENTER_DISTANCE, 10);
if (spawnPos == null) {
status = EventStatus.CANCELED;
return;
}
status = EventStatus.PREPARING;
spawnCampFires(spawnPos);
final double dist = colony.getCenter().distSqr(spawnPos);
if (dist < MIN_CENTER_DISTANCE * MIN_CENTER_DISTANCE) {
campFireTime = 6;
} else {
campFireTime = 3;
}
spawnHorde(spawnPos, colony, id, horde.numberOfBosses, horde.numberOfArchers, horde.numberOfRaiders);
updateRaidBar();
LanguageHandler.sendPlayersMessage(colony.getImportantMessageEntityPlayers(), RAID_EVENT_MESSAGE + horde.getMessageID(), BlockPosUtil.calcDirection(colony.getCenter(), spawnPoint), colony.getName());
PlayAudioMessage audio = new PlayAudioMessage(horde.initialSize <= SMALL_HORDE_SIZE ? RaidSounds.WARNING_EARLY : RaidSounds.WARNING, SoundCategory.RECORDS);
PlayAudioMessage.sendToAll(getColony(), false, false, audio);
}
use of com.minecolonies.coremod.network.messages.client.PlayAudioMessage in project minecolonies by ldtteam.
the class AmazonRaidEvent method onUpdate.
@Override
public void onUpdate() {
super.onUpdate();
if (--musicCooldown <= 0) {
PlayAudioMessage.sendToAll(getColony(), true, true, new PlayAudioMessage(RaidSounds.AMAZON_RAID));
musicCooldown = 20;
}
}
use of com.minecolonies.coremod.network.messages.client.PlayAudioMessage in project minecolonies by ldtteam.
the class EgyptianRaidEvent method onUpdate.
@Override
public void onUpdate() {
super.onUpdate();
if (--musicCooldown <= 0) {
PlayAudioMessage.sendToAll(getColony(), true, true, new PlayAudioMessage(RaidSounds.DESERT_RAID));
musicCooldown = 12;
}
}
Aggregations