I want my entity to spawn a few seconds after the sound plays
player.playSound(SoundInit.HORN_DISC.get(), SoundCategory.AMBIENT, 5.0f, 1.0f);
if(entitytype.spawn((ServerWorld)world, itemstack, context.getPlayer(), blockpos1, SpawnReason.SPAWN_EGG, true, !Objects.equals(blockpos, blockpos1) && direction == Direction.UP) != null) {
if(!player.abilities.isCreativeMode) {
itemstack.setDamage(1);
}
}